@a-t-h-i/bot-lobby 0.6.16 → 0.6.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,92 +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 ee(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return ee(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function te(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?te(``+e.key):t.toString(36)}function j(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 ne(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ne(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),ne(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+A(a,u),c+=ne(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+A(a,u++),c+=ne(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ne(j(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function re(e,t,n){if(e==null)return e;var r=[],i=0;return ne(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function M(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 ie=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 ae(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,ie)}catch(e){ie(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function oe(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 ae(oe.bind(null,e))}var se={map:re,forEach:function(e,t,n){re(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return re(e,function(){t++}),t},toArray:function(e){return re(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=se,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=oe,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 ee(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 ee(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:M}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ae,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),p=o(((e,t)=>{t.exports=f()})),m=l(p(),1),h,g=new Set;function _(){for(let e of[...g])e()}typeof window<`u`&&(window.addEventListener(`beforeinstallprompt`,e=>{e.preventDefault(),h=e,_()}),window.addEventListener(`appinstalled`,()=>{h=void 0,_()}));function v(e){return g.add(e),()=>{g.delete(e)}}function y(){return{available:(0,m.useSyncExternalStore)(v,()=>h!==void 0,()=>!1),install:async()=>{let e=h;e&&(await e.prompt().catch(()=>void 0),await e.userChoice?.catch(()=>void 0),h=void 0,_())}}}function b(){let e=`(display-mode: fullscreen), (display-mode: standalone), (display-mode: minimal-ui)`,[t,n]=(0,m.useState)(()=>typeof window<`u`&&window.matchMedia(e).matches);return(0,m.useEffect)(()=>{let t=window.matchMedia(e),r=()=>n(t.matches);return t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[]),t}function x(){let e=typeof document<`u`&&typeof document.documentElement.requestFullscreen==`function`,[t,n]=(0,m.useState)(()=>typeof document<`u`&&document.fullscreenElement!==null);return(0,m.useEffect)(()=>{let e=()=>n(document.fullscreenElement!==null);return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]),{supported:e,on:t,toggle:async()=>{document.fullscreenElement?await document.exitFullscreen().catch(()=>void 0):await document.documentElement.requestFullscreen().catch(()=>void 0)}}}var S=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})),C=o(((e,t)=>{t.exports=S()})),w=(0,m.createContext)({});function T(e){let t=(0,m.useRef)(null);return t.current===null&&(t.current=e()),t.current}var E=typeof window<`u`?m.useLayoutEffect:m.useEffect,ee=(0,m.createContext)(null);function D(e,t){e.indexOf(t)===-1&&e.push(t)}function O(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var te=(e,t,n)=>n>t?t:n<e?e:n,k={},A=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),j=e=>typeof e==`object`&&!!e,ne=e=>/^0[^.\s]+$/u.test(e);function re(e){let t;return()=>(t===void 0&&(t=e()),t)}var M=e=>e,ie=(...e)=>e.reduce((e,t)=>n=>t(e(n))),ae=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},oe=class{constructor(){this.subscriptions=[]}add(e){return D(this.subscriptions,e),()=>this.remove(e)}remove(e){O(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},se=e=>e*1e3,ce=e=>e/1e3,le=(e,t)=>t?1e3/t*e:0,ue=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},de=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,fe=1e-7,pe=12;function me(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=de(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>fe&&++s<pe);return o}function he(e,t,n,r){if(e===t&&n===r)return M;let i=t=>me(t,0,1,e,n);return e=>e===0||e===1?e:de(i(e),t,r)}var N=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,P=e=>t=>1-e(1-t),ge=he(.33,1.53,.69,.99),_e=P(ge),ve=N(_e),ye=e=>e>=1?1:(e*=2)<1?.5*_e(e):.5*(2-2**(-10*(e-1))),be=e=>1-Math.sin(Math.acos(e)),xe=P(be),Se=N(be),Ce=he(.42,0,1,1),we=he(0,0,.58,1),Te=he(.42,0,.58,1),Ee=e=>Array.isArray(e)&&typeof e[0]!=`number`;function De(e,t){return Ee(e)?e[ue(0,e.length,t)]:e}var Oe=e=>Array.isArray(e)&&typeof e[0]==`number`,ke={linear:M,easeIn:Ce,easeInOut:Te,easeOut:we,circIn:be,circInOut:Se,circOut:xe,backIn:_e,backInOut:ve,backOut:ge,anticipate:ye},Ae=e=>typeof e==`string`,je=e=>{if(Oe(e)){e.length;let[t,n,r,i]=e;return he(t,n,r,i)}return Ae(e)?(ke[e],`${e}`,ke[e]):e},Me={delta:0,timestamp:0,isProcessing:!1},Ne;function Pe(){Ne=void 0}var Fe={now:()=>(Ne===void 0&&Fe.set(Me.isProcessing||k.useManualTiming?Me.timestamp:performance.now()),Ne),set:e=>{Ne=e,queueMicrotask(Pe)}},Ie=e=>Math.round(e*1e5)/1e5,Le=e=>t=>typeof t==`string`&&t.startsWith(e),Re=Le(`--`),ze=Le(`var(--`),Be=e=>ze(e)?Ve.test(e.split(`/*`)[0].trim()):!1,Ve=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function He(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var Ue={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},We={...Ue,transform:e=>te(0,1,e)},Ge={...Ue,default:1},Ke=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function qe(e){return e==null}var Je=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ye=(e,t)=>n=>!!(typeof n==`string`&&Je.test(n)&&n.startsWith(e)||t&&!qe(n)&&Object.prototype.hasOwnProperty.call(n,t)),Xe=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Ke);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Ze=e=>te(0,255,e),Qe={...Ue,transform:e=>Math.round(Ze(e))},$e={test:Ye(`rgb`,`red`),parse:Xe(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Qe.transform(e)+`, `+Qe.transform(t)+`, `+Qe.transform(n)+`, `+Ie(We.transform(r))+`)`};function et(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var tt={test:Ye(`#`),parse:et,transform:$e.transform},nt=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),rt=nt(`deg`),it=nt(`%`),F=nt(`px`),at=nt(`vh`),ot=nt(`vw`),st={...it,parse:e=>it.parse(e)/100,transform:e=>it.transform(e*100)},ct={test:Ye(`hsl`,`hue`),parse:Xe(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+it.transform(Ie(t))+`, `+it.transform(Ie(n))+`, `+Ie(We.transform(r))+`)`},lt={test:e=>$e.test(e)||tt.test(e)||ct.test(e),parse:e=>$e.test(e)?$e.parse(e):ct.test(e)?ct.parse(e):tt.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?$e.transform(e):ct.transform(e),getAnimatableNone:e=>{let t=lt.parse(e);return t.alpha=0,lt.transform(t)}},ut=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,dt=new RegExp(Ke.source),ft=new RegExp(ut.source,`i`);function pt(e){return isNaN(e)&&typeof e==`string`&&(dt.test(e)||ft.test(e))}var mt=`number`,ht=`color`,gt=`var`,_t=`var(`,vt="${}",yt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function bt(e){let t=e.toString();return dt.test(t)||ft.test(t)}function xt(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(yt,e=>(lt.test(e)?(r.color.push(a),i.push(ht),n.push(lt.parse(e))):e.startsWith(_t)?(r.var.push(a),i.push(gt),n.push(e)):(r.number.push(a),i.push(mt),n.push(parseFloat(e))),++a,vt)).split(vt),indexes:r,types:i}}function St(e){return xt(e).values}function Ct({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===mt?Ie(r[a]):e===ht?lt.transform(r[a]):r[a]}return i}}function wt(e){return Ct(xt(e))}var Tt=e=>typeof e==`number`?0:lt.test(e)?lt.getAnimatableNone(e):e,Et=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Tt(e);function Dt(e){let t=xt(e);return Ct(t)(t.values.map((e,n)=>Et(e,t.split[n])))}var Ot={test:pt,parse:St,createTransformer:wt,getAnimatableNone:Dt};function kt(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function At({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=kt(s,r,e+1/3),a=kt(s,r,e),o=kt(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function jt(e,t){return n=>n>0?t:e}var Mt=(e,t,n)=>e+(t-e)*n,Nt=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Pt=[tt,$e,ct],Ft=e=>Pt.find(t=>t.test(e));function It(e){let t=Ft(e);if(!t)return`${e}`,!1;let n=t.parse(e);return t===ct&&(n=At(n)),n}var Lt=(e,t)=>{let n=It(e),r=It(t);if(!n||!r)return jt(e,t);let i={...n};return e=>(i.red=Nt(n.red,r.red,e),i.green=Nt(n.green,r.green,e),i.blue=Nt(n.blue,r.blue,e),i.alpha=Mt(n.alpha,r.alpha,e),$e.transform(i))},Rt=new Set([`none`,`hidden`]);function zt(e,t){return Rt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Bt(e,t){return n=>Mt(e,t,n)}function Vt(e){return typeof e==`number`?Bt:typeof e==`string`?Be(e)?jt:lt.test(e)?Lt:Gt:Array.isArray(e)?Ht:typeof e==`object`?lt.test(e)?Lt:Ut:jt}function Ht(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Vt(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Ut(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Vt(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Wt(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var Gt=(e,t)=>{let n=Ot.createTransformer(t),r=xt(e),i=xt(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Rt.has(e)&&!i.values.length||Rt.has(t)&&!r.values.length?zt(e,t):ie(Ht(Wt(r,i),i.values),n):(`${e}${t}`,jt(e,t))},Kt=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function qt(e,t){let n=Kt.exec(e);if(!n)return;let r=Kt.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>Ie(Mt(a,o,e))+i}function Jt(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return Mt(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=qt(e,t);if(n)return n}return Vt(e)(e,t)}var Yt=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function Xt(e){let t=new Set,n=new Set,r=!1,i=!1,a=new Set,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(n.add(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var Zt=40;function Qt(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=Yt.reduce((e,t)=>(e[t]=Xt(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=k.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,Zt),1)),n.timestamp=o,n.isProcessing=!0,s.process(n),c.process(n),l.process(n),u.process(n),d.process(n),f.process(n),p.process(n),m.process(n),n.isProcessing=!1,r&&t&&(i=!1,e(h))},g=()=>{r=!0,i=!0,n.isProcessing||e(h)};return{schedule:Yt.reduce((e,t)=>{let n=o[t];return e[t]=(e,t=!1,i=!1)=>(r||g(),n.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Yt.length;t++)o[Yt[t]].cancel(e)},state:n,steps:o}}var{schedule:$t,cancel:en,steps:tn}=Qt(typeof requestAnimationFrame<`u`?requestAnimationFrame:M,!0,Me),nn=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>$t.update(t,e),stop:()=>en(t),now:()=>Me.isProcessing?Me.timestamp:Fe.now()}},rn=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},an=2e4;function on(e,t=50,n=an,r){let i=0,a=e.next(i);for(r?.push(a.value);!a.done&&i<n;)i+=t,a=e.next(i),r?.push(a.value);return i>=n?1/0:i}function sn(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(on(r),an);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:ce(i)}}var cn={stiffness:100,damping:10,mass:1,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05},ln=e=>e<0?1/Math.max(1+e,cn.minDamping):Math.max(1-e,cn.minDamping);function un(e,t){if(!(e>1))return 1;let n=Math.sqrt(e*e-1),r=e-n,i=e+n,a=2*n*Math.exp(-t)*(1+t);return pn(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function dn(e,t){return e*Math.sqrt(1-t*t)}var fn=12;function pn(e,t,n){let r=n;for(let n=1;n<fn;n++)r-=e(r)/t(r);return r}var mn=.001;function hn({duration:e=cn.duration,bounce:t=cn.bounce}){let n,r;cn.maxDuration;let i=ln(t);e=te(cn.minDuration,cn.maxDuration,ce(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=dn(t,i),o=Math.exp(-r);return mn-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=dn(t*t,i);return(-n(t)+mn>0?-1:1)*-a*o/s}):(n=t=>-.001+Math.exp(-t*e)*(t*e+1),r=t=>Math.exp(-t*e)*(-t*(e*e)));let a=5/e,o=pn(n,r,a),s=o*un(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:se(e)}}var gn=(e,t)=>(t?e>=0:e>0)&&e<1/0;function _n(e,t){if(gn(e,t))return e}function vn(e){let t=_n(e.stiffness),n=_n(e.damping,!0),r=_n(e.mass),i={...e,stiffness:t??cn.stiffness,damping:n??cn.damping,mass:r??cn.mass,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=ln(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*un(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,hn(i)),i.isResolvedFromDuration=!0;(!gn(i.stiffness)||!gn(i.damping,!0))&&(i.stiffness=cn.stiffness,i.damping=cn.damping)}return i}function yn(e=cn.visualDuration,t=cn.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},r=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:o,damping:s,mass:c,duration:l,isResolvedFromDuration:u,isTimeDefined:d}=vn({...n}),f=e=>d?0:-ce(e),p=s/(2*Math.sqrt(o*c)),m=ce(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:f(n.velocity||0)||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?cn.restSpeed.granular:cn.restSpeed.default),g.restDelta=n.restDelta||(e?cn.restDelta.granular:cn.restDelta.default)};_();let v,y,b;if(p<1){let e=dn(m,p),t={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{t.A=(g.velocity+h*g.delta)/e,t.sinC=h*t.A+g.delta*e,t.cosC=h*g.delta-t.A*e};let n=n=>{n!==t.t&&(t.t=n,t.env=Math.exp(-h*n),t.sin=Math.sin(e*n),t.cos=Math.cos(e*n))};v=e=>(n(e),g.target-t.env*(t.A*t.sin+g.delta*t.cos)),y=e=>(n(e),t.env*(t.sinC*t.sin+t.cosC*t.cos))}else if(p===1){v=e=>g.target-Math.exp(-m*e)*(g.delta+(g.velocity+m*g.delta)*e);let e={C:0};b=()=>{e.C=g.velocity+m*g.delta},y=t=>Math.exp(-m*t)*(m*e.C*t-g.velocity)}else{let e=m*Math.sqrt(p*p-1),t=h-e,n=h+e,r=d?1/0:300/e,i=(e,t)=>Math.exp(t>r?-e*r-h*(t-r):-e*t),a={S:0,F:0};b=()=>{let t=(g.velocity+h*g.delta)/e;a.S=(g.delta+t)/2,a.F=(g.delta-t)/2},v=e=>g.target-a.S*i(t,e)-a.F*i(n,e),y=e=>t*a.S*i(t,e)+n*a.F*i(n,e)}b();let x=u&&l||null,S={calculatedDuration:x,retarget:(e,t)=>{g.target=e[e.length-1],g.delta=g.target-e[0],g.velocity=f(t),n.restSpeed&&n.restDelta||_(),S.calculatedDuration=x,a.done=!1,b()},velocity:e=>se(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=se(y(e));a.done=Math.abs(n)<=g.restSpeed&&Math.abs(g.target-t)<=g.restDelta}return a.value=a.done?g.target:t,a},toString:()=>{let e=Math.min(on(S),an),t=rn(t=>S.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return S}yn.applyToOptions=e=>{let t=sn(e,100,yn);return e.ease=t.ease,e.duration=se(t.duration),e.type=`keyframes`,e};function bn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>e<s||e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>{let t=v(e);f.done=Math.abs(t)<=l,f.value=f.done?_:_+t},b,x,S=e=>{p(f.value)&&(b=e,x=yn({keyframes:[f.value,m(f.value)],velocity:-v(e)/r*1e3,damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return!x&&b===void 0&&(t=!0,y(e),S(e)),b!==void 0&&e>=b?x.next(e-b):(!t&&y(e),f)}}}function xn(e,t,n){let r=[],i=n||k.mix||Jt,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=ie(Array.isArray(t)?t[n]||M:t,a)),r.push(a)}return r}function Sn(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=xn(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=ae(e[r],e[r+1],n);return s[r](i)};return n?t=>l(te(e[0],e[a-1],t)):l}function Cn(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=ae(0,t,r);e.push(Mt(n,1,i))}}function wn(e){let t=[0];return Cn(t,e.length-1),t}function Tn(e,t){return e.map(e=>e*t)}function En(e,t){return e.map(()=>t||Te).splice(0,e.length-1)}function Dn({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Ee(r)?r.map(je):je(r)||Te,a={done:!1,value:t[0]};if(t.length===2&&!Array.isArray(i)&&(!n||n.length!==2||n[0]===0&&n[1]===1)){let[n,r]=t,o=n===r?void 0:(k.mix||Jt)(n,r);return{calculatedDuration:e,next:t=>(a.value=o?o(i(e>0?te(0,1,t/e):1)):r,a.done=t>=e,a)}}let o=Sn(Tn(n&&n.length===t.length?n:wn(t),e),t,{ease:Array.isArray(i)?i:En(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var On=5;function kn(e,t,n){let r=Math.max(t-On,0);return le(n-e(r),t-r)}function An(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):kn(t=>e.next(t).value,t,e.next(t).value)}var jn=e=>e!==null;function Mn(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(jn),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Nn={decay:bn,inertia:bn,tween:Dn,keyframes:Dn,spring:yn};function Pn(e){typeof e.type==`string`&&(e.type=Nn[e.type])}function Fn(e,t){return{kind:e,animation:t,timestamp:Fe.now(),frameTimestamp:Me.timestamp,frameIsProcessing:Me.isProcessing}}function In(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...Fn(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function Ln(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Fn(`layout-animation-start`,e),node:t})}catch{}}var Rn=class{constructor(){this.isResolved=!1}get finished(){return this._finished||=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e}),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,t){return this.finished.then(e,t)}},zn=e=>e/100,Bn=class extends Rn{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==Fe.now()&&this.tick(Fe.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),In(this,this.options)}initAnimation(){let{options:e}=this;Pn(e);let{type:t=Dn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Dn;s!==Dn&&typeof o[0]!=`number`&&(this.mixKeyframes=ie(zn,Jt(o[0],o[1])),o=[0,100]);let c=s(o===e.keyframes?e:{...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=on(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=te(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==bn&&(b.value=Mn(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return ce(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+ce(e)}get time(){return ce(this.currentTime)}set time(e){e=se(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){return An(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Fe.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=ce(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=nn,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(Fe.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}},Vn=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Hn(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Ke)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Vn.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Un=/\b([a-z-]*)\(.*?\)/gu,Wn={...Ot,getAnimatableNone:e=>{let t=e.match(Un);return t?t.map(Hn).join(` `):e}},Gn={...Ot,getAnimatableNone:e=>{let t=Ot.parse(e);return Ot.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Kn={...Ue,transform:Math.round},qn={rotate:rt,pathRotation:rt,rotateX:rt,rotateY:rt,rotateZ:rt,scale:Ge,scaleX:Ge,scaleY:Ge,scaleZ:Ge,skew:rt,skewX:rt,skewY:rt,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:We,originX:st,originY:st,originZ:F},Jn={borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,top:F,right:F,bottom:F,left:F,inset:F,insetBlock:F,insetBlockStart:F,insetBlockEnd:F,insetInline:F,insetInlineStart:F,insetInlineEnd:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,paddingBlock:F,paddingBlockStart:F,paddingBlockEnd:F,paddingInline:F,paddingInlineStart:F,paddingInlineEnd:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,marginBlock:F,marginBlockStart:F,marginBlockEnd:F,marginInline:F,marginInlineStart:F,marginInlineEnd:F,fontSize:F,backgroundPositionX:F,backgroundPositionY:F,...qn,zIndex:Kn,fillOpacity:We,strokeOpacity:We,numOctaves:Kn},Yn={...Jn,color:lt,backgroundColor:lt,outlineColor:lt,fill:lt,stroke:lt,borderColor:lt,borderTopColor:lt,borderRightColor:lt,borderBottomColor:lt,borderLeftColor:lt,filter:Wn,WebkitFilter:Wn,mask:Gn,WebkitMask:Gn},Xn=e=>Yn[e],Zn=new Set([Wn,Gn]);function Qn(e,t){let n=Xn(e);return Zn.has(n)||(n=Ot),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function $n(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var er=e=>e*180/Math.PI,tr=e=>rr(er(Math.atan2(e[1],e[0]))),nr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:tr,rotateZ:tr,skewX:e=>er(Math.atan(e[1])),skewY:e=>er(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},rr=e=>(e%=360,e<0&&(e+=360),e),ir=tr,ar=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),or=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),sr={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ar,scaleY:or,scale:e=>(ar(e)+or(e))/2,rotateX:e=>rr(er(Math.atan2(e[6],e[5]))),rotateY:e=>rr(er(Math.atan2(-e[2],e[0]))),rotateZ:ir,rotate:ir,skewX:e=>er(Math.atan(e[4])),skewY:e=>er(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function cr(e){return+!!e.includes(`scale`)}function lr(e,t){if(!e||e===`none`)return cr(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=sr,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=nr,i=t}if(!i)return cr(t);let a=r[t],o=i[1].split(`,`).map(dr);return typeof a==`function`?a(o):o[a]}var ur=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return lr(n,t)};function dr(e){return parseFloat(e.trim())}var fr=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],pr=new Set([...fr,`pathRotation`]),mr=e=>e===Ue||e===F,hr=new Set([`x`,`y`,`z`]),gr=fr.filter(e=>!hr.has(e));function _r(e){let t=[];return gr.forEach(n=>{let r=e.getValue(n);if(r!==void 0){let e=r.get(),i=+!!n.startsWith(`scale`);if(e===i)return;t.push([n,e]),r.set(i)}}),t}var vr=new Set([`bottom`,`right`]);function yr(e,t,n,r,i,a){let o=parseFloat(e);if(!isNaN(o))return o;let{min:s,max:c}=t()[n],l=c-s;return a===`border-box`?l:l-parseFloat(r)-parseFloat(i)}var br={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>yr(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>yr(e,i,`y`,t,n,r),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{let{y:n}=t();return parseFloat(e)+(n.max-n.min)},right:({left:e},t)=>{let{x:n}=t();return parseFloat(e)+(n.max-n.min)},x:({transform:e})=>lr(e,`x`),y:({transform:e})=>lr(e,`y`)};br.translateX=br.x,br.translateY=br.y;var xr=new Set,Sr=!1,Cr=!1,wr=!1;function Tr(){if(Cr){let e=[],t=new Set,n=new Set;xr.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),vr.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=_r(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Cr=!1,Sr=!1,xr.forEach(e=>e.complete(wr)),xr.clear()}function Er(){xr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Cr=!0)})}function Dr(){wr=!0,Er(),Tr(),wr=!1}function Or(e,t,n){if(typeof e==`string`){if(A(e)||ne(e))return parseFloat(e);if(!Ot.test(e)&&Ot.test(n))return Qn(t,n)}return e??void 0}var kr=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(xr.add(this),Sr||(Sr=!0,$t.read(Er),$t.resolveKeyframes(Tr))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=Or(n.readValue(t,a),t,a);r!==void 0&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}$n(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),xr.delete(this)}cancel(){this.state===`scheduled`&&(xr.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Ar=e=>e.startsWith(`--`);function jr(e,t,n){Ar(t)?e.style.setProperty(t,n):e.style[t]=n}var Mr={};function Nr(e,t){let n=re(e);return()=>Mr[t]??n()}var Pr=Nr(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Fr=Nr(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Ir=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Lr={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Ir([0,.65,.55,1]),circOut:Ir([.55,0,1,.45]),backIn:Ir([.31,.01,.66,-.59]),backOut:Ir([.33,1.53,.69,.99])};function Rr(e,t){if(e)return typeof e==`function`?Fr()?rn(e,t):`ease-out`:Oe(e)?Ir(e):Array.isArray(e)?e.map(e=>Rr(e,t)||Lr.easeOut):Lr[e]}function zr(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Rr(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function Br(e){return typeof e==`function`&&`applyToOptions`in e}function Vr({type:e,...t}){return Br(e)&&Fr()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Hr=class extends Rn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Vr(e);this.animation=zr(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Mn(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),jr(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},In(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e!==`idle`&&e!==`finished`&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return ce(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+ce(e)}get time(){return ce(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=se(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,onAttach:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Pr()?(this.animation.timeline=e,t?.(this.animation),M):n(this)}},Ur={anticipate:ye,backInOut:ve,circInOut:Se};function Wr(e){return e in Ur}function Gr(e){typeof e.ease==`string`&&Wr(e.ease)&&(e.ease=Ur[e.ease])}var Kr=10,qr=class extends Hr{constructor(e){Gr(e),Pn(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new Bn({...a,autoplay:!1}),s=Math.max(Kr,Fe.now()-this.startTime),c=te(0,Kr,s-Kr),l=o.sample(s).value,{name:u}=this.options;i&&u&&jr(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},Jr=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Ot.test(e)||e===`0`)&&!e.startsWith(`url(`));function Yr(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Xr(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=Jr(i,t),s=Jr(a,t);return!o||!s?(o!==s&&`${t}${i}${a}${o?a:i}`,!1):Yr(e)||(n===`spring`||Br(n))&&r}function Zr(e){e.duration=0,e.type=`keyframes`}var Qr=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),$r=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function ei(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&$r.test(e[t]))return!0;return!1}var ti=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),ni=re(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function ri(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(Qr.has(n)||ti.has(n)))return!1;let c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return ni()&&(Qr.has(n)||ti.has(n)&&ei(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var ii=40,ai=class extends Rn{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Fe.now();let{keyframes:t,name:n,motionValue:r,element:i}=e,a=e;a.autoplay??=!0,a.delay??=0,a.type??=`keyframes`,a.repeat??=0,a.repeatDelay??=0,a.repeatType??=`loop`;let o=i?.KeyframeResolver||kr;this.keyframeResolver=new o(t,(e,t,n)=>this.onKeyframesResolved(e,t,a,!n),n,r,i),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=Fe.now();let u=!0;Xr(e,i,a,o)||(u=!1,(k.instantAnimations||!s)&&l?.(Mn(e,n,t)),e[0]=e[e.length-1],Zr(n),n.repeat=0);let d=r?this.resolvedAt&&this.resolvedAt-this.createdAt>ii?this.resolvedAt:this.createdAt:void 0,{onComplete:f}=n;n.startTime??=d,n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{f?.(),this.notifyFinished()};let p=u&&!c&&ri(n),m;if(p){n.element=n.motionValue?.owner?.current;try{m=new qr(n)}catch{m=new Bn(n)}}else m=new Bn(n);this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Dr()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},oi=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return si(this.animations,`duration`)}get iterationDuration(){return si(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function si(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var ci=class extends oi{then(e,t){return this.finished.finally(e).then(()=>{})}};function li(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var ui=30,di=e=>!isNaN(parseFloat(e)),fi={current:void 0},pi=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Fe.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Fe.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=di(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){var n;return e===`change`?this.onChangeSubscribe(t):((n=this.events)[e]||(n[e]=new oe)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new oe,t.change.add(this.changeSubscriber),this.changeSubscriber=void 0),t.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:t.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){$t.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){let{current:e,changeSubscriber:t}=this;t?t(e):this.events.change?.notify(e)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return fi.current&&fi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=Fe.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ui)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,ui);return le(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0;let n=!1,r;r=e(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===r&&this.clearAnimation(),t()}),n||(this.animation=r),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function mi(e,t){return new pi(e,t)}function hi(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function gi(e,t){let n=e?.[t]??e?.default??e;return n===e?n:hi(n,e)}var _i={type:`spring`,stiffness:500,damping:25,restSpeed:10},vi=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),yi={type:`keyframes`,duration:.8},bi={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},xi=(e,{keyframes:t})=>t.length>2?yi:pr.has(e)?e.startsWith(`scale`)?vi(t[1]):_i:bi,Si=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Ci(e){for(let t in e)if(!Si.has(t))return!0;return!1}var wi=(e,t,n,r={},i,a)=>o=>{let s=gi(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=se(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Ci(s)||Object.assign(u,xi(e,u)),u.duration&&=se(u.duration),u.repeatDelay&&=se(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Zr(u),u.delay===0&&(d=!0)),(k.instantAnimations||k.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Zr(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Mn(u.keyframes,s);if(e!==void 0){$t.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Bn(u):new ai(u)},Ti=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ei(e){let t=Ti.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Di(e,t,n=1){`${e}`;let[r,i]=Ei(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return A(e)?parseFloat(e):e}return Be(i)?Di(i,t,n+1):i}function Oi(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ki(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...Oi(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function Ai(e,t,n){return ki(e.getProps(),t,n,e)}var ji=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,Mi=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...fr]),Ni=e=>Array.isArray(e);function Pi(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,mi(n))}function Fi(e){return Ni(e)?e[e.length-1]||0:e}function Ii(e,t){let{transitionEnd:n={},transition:r={},...i}=Ai(e,t)||{};i={...i,...n};for(let t in i)Pi(e,t,Fi(i[t]))}var Li=e=>!!(e&&e.getVelocity);function Ri(e){return!!(Li(e)&&e.add)}function zi(e,t){let n=e.getValue(`willChange`);if(Ri(n))return n.add(t);if(!n&&k.WillChange){let n=new k.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Bi(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Vi=`data-`+Bi(`framerAppearId`);function Hi(e){return e.props[Vi]}var Ui=typeof window<`u`;function Wi({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function Gi(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?hi(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&Wi(f,t))continue;let o={delay:n,...gi(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){$t.update(()=>r.set(i));continue}let p=!1;if(Ui&&window.MotionHandoffAnimation){let n=Hi(e);if(n){let e=window.MotionHandoffAnimation(n,t,$t);e!==null&&(o.startTime=e,p=!0)}}zi(e,t);let m=l??e.shouldReduceMotion;r.start(wi(t,r,i,m&&Mi.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>$t.update(()=>{o&&Ii(e,o)});d.length?Promise.all(d).then(t):t()}return d}function Ki(e,t,n={}){let r=Ai(e,t,ji(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?Gi(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(Ki(e,t,{...n,delay:r+(typeof o==`function`?0:o)+li(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function qi(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>Ki(e,t,n))):typeof t==`string`?Ki(e,t,n):Promise.all(Gi(e,Ai(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var Ji={test:e=>e===`auto`,parse:e=>e},Yi=e=>t=>t.test(e),Xi=[Ue,F,it,rt,ot,at,Ji],Zi=e=>Xi.find(Yi(e));function Qi(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||ne(e)}var $i=new Set([`auto`,`none`,`0`]);function ea(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!$i.has(t)&&bt(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=Qn(n,i))}var ta=class extends kr{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Be(r))){let i=Di(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Mi.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=Zi(r),o=Zi(i);if(He(r)!==He(i)&&br[n]){this.needsMeasurement=!0;return}if(a!==o){if(mr(a)&&mr(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else br[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Qi(e[t]))&&n.push(t);n.length&&ea(e,n,t)}measure(){let{element:e,name:t}=this;return br[t](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&this.motionValue?.jump(r,!1)}measureEndState(){let{element:e,unresolvedKeyframes:t}=this;if(!e||!e.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let n=t.length-1,r=t[n];t[n]=this.measure(),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},na=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`],ra=[];function ia(e){typeof e.test==`function`&&e.read,aa(e),ra.unshift(e)}function aa(e){O(ra,e)}function oa(e){return ra.find(t=>t.test(e))}function I(e,t,n={},r){let i=[],{velocity:a}=n,o=n.reduceMotion??r?.shouldReduceMotion;for(let s in t){if(s===`transition`||s===`transitionEnd`)continue;let c=t[s];if(c===void 0)continue;let l=e(s),u=l.get();if(u!==void 0&&!l.isAnimating()&&!Array.isArray(c)&&c===u&&!a){$t.update(()=>l.set(c));continue}l.start(wi(s,l,c,o&&Mi.has(s)?{type:!1}:n,r)),l.animation&&i.push(l.animation)}let{transitionEnd:s}=t;if(s){let t=()=>$t.update(()=>{for(let t in s)e(t).set(s[t])});i.length?Promise.all(i).then(t):t()}return i}function sa(e,t,n,r,i){return I(r=>{let a=e.get(t,r);if(!a){let o;if(!i){let i=n[r];o=ca(i)??e.read(t,r,i),`${r}`}a=mi(o,{owner:i}),e(t,{[r]:a})}return a},n,r,i)}function ca(e){let t=Array.isArray(e)?e[0]:void 0;return t===null?void 0:t}function la(e){return j(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function ua(e){return j(e)&&`ownerSVGElement`in e}var da=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function fa(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var pa=class{constructor(e=$t.render){this.step=e,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{let{pending:e,numPending:t}=this;this.numPending=0;for(let n=0;n<t;n++)e[n]()}}set(e,t,n,r){if(this.values.get(e)?.onRemove(),r)for(let e of this.values.values())e.value===r&&(n=e.render);let i=()=>n&&this.schedule(n);t.get()!==void 0&&i();let a=t.on(`change`,i),o=()=>{a(),n&&!r&&this.cancel(n),this.values.get(e)?.onRemove===o&&this.values.delete(e)};return this.values.set(e,{value:t,render:r?void 0:n,onRemove:o}),o}get(e){return this.values.get(e)?.value}release(){let e=new Map;return this.values.forEach((t,n)=>{e.set(n,t.value),t.onRemove()}),this.transformKeys=this.transformValues=void 0,e}schedule(e){let{pending:t,numPending:n}=this;for(let r=0;r<n;r++)if(t[r]===e)return;n||this.step(this.flush),t[this.numPending++]=e}cancel(e){let{pending:t}=this;for(let n=0;n<this.numPending;n++)if(t[n]===e){t[n]=t[--this.numPending];return}}};function ma(e,{step:t,...n}={}){let r=new WeakMap;return Object.assign((n,i)=>{let a=r.get(n)??new pa(t);r.set(n,a);let o=[];for(let t in i){let r=i[t],s=e(n,a,t,r);o.push(s)}return()=>{for(let e of o)e()}},n,{get:(e,t)=>r.get(e)?.get(t),flush:e=>r.get(e)?.flush(),state:e=>r.get(e)})}var ha={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},ga={};function _a(e){let t=``,{transformKeys:n=[],transformValues:r={}}=e;for(let e=0;e<n.length;e++){let i=n[e],a=r[i].get();a!==void 0&&(typeof a==`number`?a:parseFloat(a))!==+!!i.startsWith(`scale`)&&(t+=(t&&` `)+(ga[i]||(ga[i]=(ha[i]||i)+`(`))+da(a,qn[i])+`)`)}let i=e.get(`pathRotation`)?.get();return i&&(t+=(t&&` `)+`rotate(`+da(i,qn.pathRotation)+`)`),t||`none`}var va=new Set([`originX`,`originY`,`originZ`]),ya=(e,t)=>da(e.get(t)?.get(),Jn[t]),ba=(e,t,n,r)=>{let i,a;if(pr.has(n)){if(n!==`pathRotation`){let e=t.transformKeys??=[];(t.transformValues??={})[n]=r,e.includes(n)||(e.push(n),e.sort((e,t)=>fr.indexOf(e)-fr.indexOf(t)))}t.get(`transform`)||(!la(e)&&!t.get(`transformBox`)&&ba(e,t,`transformBox`,new pi(`fill-box`)),t.set(`transform`,new pi(`none`),()=>{e.style.transform=_a(t)})),a=t.get(`transform`)}else va.has(n)?(t.get(`transformOrigin`)||t.set(`transformOrigin`,new pi(``),()=>{let n=ya(t,`originX`)??`50%`,r=ya(t,`originY`)??`50%`,i=ya(t,`originZ`)??0;e.style.transformOrigin=`${n} ${r} ${i}`}),a=t.get(`transformOrigin`)):i=Ar(n)?()=>{e.style.setProperty(n,r.get())}:()=>{e.style[n]=da(r.get(),Jn[n])};return t.set(n,r,i,a)},xa=e=>la(e)||ua(e),Sa=(e,t)=>{if(pr.has(t))return ur(e,t);let n=getComputedStyle(e),r=Ar(t)?n.getPropertyValue(t):n[t];return typeof r==`string`&&r.trim()||0},Ca=ma(ba,{test:xa,read:Sa}),wa={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Ta=fr.length;function Ea(e,t,n){let r=``,i=!0;for(let a=0;a<Ta;a++){let o=fr[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=da(s,Jn[o]);if(!c){i=!1;let t=wa[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${da(a,Jn.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Da(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(pr.has(e)){o=!0;continue}if(Re(e)){i[e]=n;continue}{let t=da(n,Jn[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Ea(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var Oa={offset:`stroke-dashoffset`,array:`stroke-dasharray`},ka={offset:`strokeDashoffset`,array:`strokeDasharray`};function Aa(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Oa:ka;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var ja=[`transform`,`opacity`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Ma(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Da(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of ja)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Aa(d,i,a,o,!1)}function Na(e,t){if(!(t in e))return!1;let n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t)||Object.getOwnPropertyDescriptor(e,t);return n&&typeof n.set==`function`}var Pa=(e,t,n,r,i=n)=>{let a=Na(e,i);!a&&(i.startsWith(`data`)||i.startsWith(`aria`))&&(i=Bi(i));let o=Jn[n]||Jn[i],s=a?()=>{e[i]=da(r.get(),Jn[n])}:()=>{let t=da(r.get(),o);t==null?e.removeAttribute(i):e.setAttribute(i,String(t))};return t.set(n,r,s)};function Fa(e,t,n,r){return $t.render(()=>e.setAttribute(`pathLength`,`1`)),n===`pathOffset`?t.set(n,r,()=>{let t=r.get();e.setAttribute(`stroke-dashoffset`,`${-t}`)}):(t.get(`stroke-dasharray`)||t.set(`stroke-dasharray`,new pi(`1 1`),()=>{let n=t.get(`pathLength`)?.get()??1,r=t.get(`pathSpacing`)?.get();e.setAttribute(`stroke-dasharray`,`${n} ${r??1-Number(n)}`)}),t.set(n,r,void 0,t.get(`stroke-dasharray`)))}var Ia=ma((e,t,n,r)=>n.startsWith(`path`)?Fa(e,t,n,r):n.startsWith(`attr`)?Pa(e,t,n,r,La(n)):(pr.has(n)||va.has(n)||Ar(n)||n in e.style?ba:Pa)(e,t,n,r),{test:ua,read:(e,t)=>pr.has(t)?Jn[t]?.default||0:Ar(t)||ja.includes(t)?Sa(e,t)||e.getAttribute(Bi(t))||0:(t=La(t),e.getAttribute(Bi(t))??e.getAttribute(t)??void 0)});function La(e){return e.replace(/^attr([A-Z])/,(e,t)=>t.toLowerCase())}function Ra({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function za({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ba(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Va(e){return e===void 0||e===1}function Ha({scale:e,scaleX:t,scaleY:n}){return!Va(e)||!Va(t)||!Va(n)}function Ua(e){return Ha(e)||Wa(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Wa(e){return Ga(e.x)||Ga(e.y)}function Ga(e){return e&&e!==`0%`}function Ka(e,t,n){return n+t*(e-n)}function qa(e,t,n,r,i){return i!==void 0&&(e=Ka(e,i,r)),Ka(e,n,r)+t}function Ja(e,t=0,n=1,r,i){e.min=qa(e.min,t,n,r,i),e.max=qa(e.max,t,n,r,i)}function Ya(e,{x:t,y:n}){Ja(e.x,t.translate,t.scale,t.originPoint),Ja(e.y,n.translate,n.scale,n.originPoint)}var Xa=.999999999999,Za=1.0000000000001;function Qa(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&($a(e.x,-a.scroll.offset.x),$a(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Ya(e,o)),r&&Ua(a.latestValues)&&no(e,a.latestValues,a.layout?.layoutBox))}t.x<Za&&t.x>Xa&&(t.x=1),t.y<Za&&t.y>Xa&&(t.y=1)}function $a(e,t){e.min+=t,e.max+=t}function eo(e,t,n,r,i=.5){Ja(e,t,n,Mt(e.min,e.max,i),r)}function to(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function no(e,t,n){let r=n??e;eo(e.x,to(t.x,r.x),t.scaleX,t.scale,t.originX),eo(e.y,to(t.y,r.y),t.scaleY,t.scale,t.originY)}function ro(e,t){return Ra(Ba(e.getBoundingClientRect(),t))}function io(e,t,n){let r=ro(e,n),{scroll:i}=t;return i&&($a(r.x,i.offset.x),$a(r.y,i.offset.y)),r}var ao={},oo=e=>ua(e)?Ia:Ca,so=class{constructor(e,t){this.effect=e,this.current=t,this.KeyframeResolver=ta}getValue(e){return this.effect.get(this.current,e)}readValue(e,t){return this.effect.read(this.current,e,t)}render(){this.effect.flush(this.current)}measureViewportBox(){return ro(this.current)}getProps(){return ao}};function co(e,t,n,r){if(r)return I(e=>r.getValue(e,null),t,n,r);let i=oo(e);return sa(i,e,t,n,new so(i,e))}var lo=ma((e,t,n,r)=>t.set(n,r,()=>{e[n]=r.get()}),{test:e=>j(e),read:(e,t)=>{let n=e[t];return typeof n==`string`||typeof n==`number`?n:void 0}}),{schedule:uo,cancel:fo}=Qt(queueMicrotask,!1),po={x:!1,y:!1};function mo(){return po.x||po.y}function ho(e){return e===`x`||e===`y`?po[e]?null:(po[e]=!0,()=>{po[e]=!1}):po.x||po.y?null:(po.x=po.y=!0,()=>{po.x=po.y=!1})}function go(e,t){let n=fa(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function _o(e){return!(e.pointerType===`touch`||mo())}function vo(e,t,n={}){let[r,i,a]=go(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!_o(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var yo=(e,t)=>t?e===t||yo(e,t.parentElement):!1,bo=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,xo=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function So(e){return xo.has(e.tagName)||e.isContentEditable===!0}var Co=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function wo(e){return Co.has(e.tagName)||e.isContentEditable===!0}var To=new WeakSet;function Eo(e){return t=>{t.key===`Enter`&&e(t)}}function Do(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Oo=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Eo(()=>{if(To.has(n))return;Do(n,`down`);let e=Eo(()=>{Do(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Do(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function ko(e){return bo(e)&&!mo()}var Ao=new WeakSet;function jo(e,t,n={}){let[r,i,a]=go(e,n),o=e=>{let r=e.currentTarget;if(!ko(e)||Ao.has(e))return;To.add(r),n.stopPropagation&&Ao.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),To.has(r)&&To.delete(r),ko(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||yo(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),la(e)&&(e.addEventListener(`focus`,e=>Oo(e,i)),!So(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var Mo=new WeakMap,No,Po=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:ua(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Fo=Po(`inline`,`width`,`offsetWidth`),Io=Po(`block`,`height`,`offsetHeight`);function Lo({target:e,borderBoxSize:t}){Mo.get(e)?.forEach(n=>{n(e,{get width(){return Fo(e,t)},get height(){return Io(e,t)}})})}function Ro(e){e.forEach(Lo)}function zo(){typeof ResizeObserver<`u`&&(No=new ResizeObserver(Ro))}function Bo(e,t){No||zo();let n=fa(e);return n.forEach(e=>{let n=Mo.get(e);n||(n=new Set,Mo.set(e,n)),n.add(t),No?.observe(e)}),()=>{n.forEach(e=>{let n=Mo.get(e);n?.delete(t),n?.size||No?.unobserve(e)})}}var Vo=new Set,Ho;function Uo(){Ho=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Vo.forEach(t=>t(e))},window.addEventListener(`resize`,Ho)}function Wo(e){return Vo.add(e),Ho||Uo(),()=>{Vo.delete(e),!Vo.size&&typeof Ho==`function`&&(window.removeEventListener(`resize`,Ho),Ho=void 0)}}function L(e,t){return typeof e==`function`?Wo(e):Bo(e,t)}var Go={value:null,addProjectionMetrics:null};function Ko(e){return ua(e)&&e.tagName===`svg`}var qo=e=>typeof e==`number`?e:parseFloat(e),Jo=()=>({translate:0,scale:1,origin:0,originPoint:0}),Yo=()=>({x:Jo(),y:Jo()}),Xo=()=>({min:0,max:0}),Zo=()=>({x:Xo(),y:Xo()}),Qo=new WeakMap;function $o(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function es(e){return typeof e==`string`||Array.isArray(e)}var ts=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],ns=[`initial`,...ts];function rs(e){if($o(e.animate))return!0;for(let t=0;t<ns.length;t++)if(es(e[ns[t]]))return!0;return!1}function is(e){return!!(rs(e)||e.variants)}function as(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Li(i))e.addValue(r,i);else if(Li(a))e.addValue(r,mi(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,mi(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var os={current:null},ss={current:!1},cs=typeof window<`u`;function ls(){if(ss.current=!0,cs){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>os.current=e.matches;e.addEventListener(`change`,t),t()}else os.current=!1}}var us=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],ds={};function fs(e){ds=e}function ps(){return ds}var ms=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=kr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=Fe.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,$t.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=rs(t),this.isVariantNode=is(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&Li(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];if(this.current=e,Qo.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.isVariantNode&&!this.isControllingVariants){let e=this;do e=e.props.inherit!==!1&&e.parent;while(e&&!e.isVariantNode);if(e){let{variantChildren:t}=e;t.add(this),this.removeFromVariantTree=()=>t.delete(this)}}this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(ss.current||ls(),this.shouldReduceMotion=os.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),en(this.notifyUpdate),en(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Qr.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Hr({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:se(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=pr.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&$t.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!e.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in ds){let t=ds[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Zo()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<us.length;t++){let n=us[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=as(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(e,t){let n=this.values.get(e);if(t!==n){n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t);let r=t.get();r!==void 0&&(this.latestValues[e]=r)}}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=mi(t??this.getDefaultValue?.(e),{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(A(n)||ne(n))?n=parseFloat(n):typeof n!=`number`&&!Ot.test(n)&&Ot.test(t)&&(n=Qn(e,t)),this.setBaseTarget(e,Li(n)?n.get():n)),Li(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return this.events[e]||(this.events[e]=new oe),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){uo.render(this.render)}},hs=class extends ms{constructor(){super(...arguments),this.KeyframeResolver=ta}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Li(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},gs=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function _s(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}var vs={};function ys(e,{layout:t,layoutId:n}){return pr.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!vs[e]||e===`opacity`)}function bs(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(Li(r[t])||i&&Li(i[t])||ys(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function xs(e){return window.getComputedStyle(e)}var Ss=class extends hs{constructor(){super(...arguments),this.type=`html`,this.renderInstance=_s}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(pr.has(t))return this.projection?.isProjecting?cr(t):ur(e,t);{let n=xs(e),r=(Re(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return ro(e,t)}build(e,t,n){Da(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return bs(e,t,n)}},Cs=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),ws=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Ts(e,t,n,r){_s(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Cs.has(n)?n:Bi(n),t.attrs[n])}function Es(e,t,n){let r=bs(e,t,n);for(let n in e)if(Li(e[n])||Li(t[n])){let t=fr.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Ds=class extends hs{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Zo}getBaseTargetFromProps(e,t){return pr.has(t)?super.getBaseTargetFromProps(e,t)??cr(t):e[t]}getDefaultValue(e){return pr.has(e)?this.latestValues[e]??cr(e):void 0}readValueFromInstance(e,t){if(pr.has(t)){let e=Xn(t);return e&&e.default||0}if(ja.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=Cs.has(t)?t:Bi(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Es(e,t,n)}build(e,t,n){Ma(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Ts(e,t,n,r)}mount(e){this.isSVGTag=ws(e.tagName),super.mount(e)}};function Os(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var ks=[...ts].reverse();function As(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>qi(e,t,n))),n=Ms(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,l=r||i,u=[],d=new Set,f={},p=1/0,m=e;do m=m.props.inherit!==!1&&m.parent;while(m&&!m.isControllingVariants);if(ks.forEach((t,r)=>{let i=n[t],h=o[t],g=m&&m.props[t],_=h===void 0?es(g)||g===!1?g:void 0:h,v=es(_),y=t===a?i.isActive:null;y===!1&&(p=r);let b=v&&h===void 0&&!(l&&c);if(i.protectedKeys={...f},!i.isActive&&y===null||!_&&!i.prevProp||$o(_)||typeof _==`boolean`)return;if(t===`exit`&&i.isActive&&y!==!0){f={...f,...i.prevResolvedValues};return}let x=js(i.prevProp,_),S=x||v&&(y&&!b||r>p),C=!1,w=Array.isArray(_)?_:[_],T={};if(y!==!1)for(let n of w){let{transition:r,transitionEnd:i,...a}=Ai(e,n,ji(e,t))||{};T={...T,...a,...i}}let{prevResolvedValues:E}=i;for(let t in{...E,...T}){if(t in f)continue;let n=T[t],r=E[t],a=Array.isArray(n)&&Array.isArray(r)?!Os(n,r)||x:n!==r;if(a&&n==null)d.add(t);else if(a||n!==void 0&&d.has(t)){S=!0,d.delete(t)&&(C=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0}if(i.prevProp=_,i.prevResolvedValues=T,i.isActive&&(f={...f,...T}),S&&(!(b&&x)||C))for(let n of w){let r={type:t};if(typeof n==`string`&&l&&c&&s?.enteringChildren){let t=Ai(s,n)?.transition?.delayChildren;r.delay=li(s.enteringChildren,e,t)}u.push({animation:n,options:r})}}),d.size){let{initial:t}=o,n={},r=typeof t!=`boolean`&&Ai(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom);r&&r.transition&&(n.transition=r.transition),d.forEach(i=>{let a=e.getValue(i);a&&(a.liveStyle=!0);let s=r&&!Array.isArray(t)?r[i]:void 0,c=e.getBaseTargetFromProps(o,i);n[i]=(s===void 0?c!==void 0&&!Li(c)?c:e.initialValues[i]===void 0?e.baseTarget[i]:void 0:s)??null}),u.push({animation:n})}let h=l&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!h&&u.length?t(u):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=Ms(),i=!0}}}function js(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Os(t,e):!1}function Ms(){let e={};for(let t of ts)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return e}function Ns(e,t){e.min=t.min,e.max=t.max}function Ps(e,t){Ns(e.x,t.x),Ns(e.y,t.y)}function Fs(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Is=.9999,Ls=1.0001,Rs=-.01,zs=.01;function Bs(e){return e.max-e.min}function Vs(e,t,n){return Math.abs(e-t)<=n}function Hs(e,t,n,r=.5){e.origin=r,e.originPoint=Mt(t.min,t.max,e.origin),e.scale=Bs(n)/Bs(t),e.translate=Mt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Is&&e.scale<=Ls||isNaN(e.scale))&&(e.scale=1),(e.translate>=Rs&&e.translate<=zs||isNaN(e.translate))&&(e.translate=0)}function Us(e,t,n,r){Hs(e.x,t.x,n.x,r?r.originX:void 0),Hs(e.y,t.y,n.y,r?r.originY:void 0)}function Ws(e,t,n,r=0){e.min=(r?Mt(n.min,n.max,r):n.min)+t.min,e.max=e.min+Bs(t)}function Gs(e,t,n,r){Ws(e.x,t.x,n.x,r?.x),Ws(e.y,t.y,n.y,r?.y)}function Ks(e,t,n,r=0){let i=r?Mt(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Bs(t)}function qs(e,t,n,r){Ks(e.x,t.x,n.x,r?.x),Ks(e.y,t.y,n.y,r?.y)}function Js(e,t,n,r,i){return e-=t,e=Ka(e,1/n,r),i!==void 0&&(e=Ka(e,1/i,r)),e}function Ys(e,t=0,n=1,r=.5,i,a=e,o=e){if(it.test(t)&&(t=parseFloat(t),t=Mt(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=Mt(a.min,a.max,r);e===a&&(s-=t),e.min=Js(e.min,t,n,s,i),e.max=Js(e.max,t,n,s,i)}function Xs(e,t,[n,r,i],a,o){Ys(e,t[n],t[r],t[i],t.scale,a,o)}var Zs=[`x`,`scaleX`,`originX`],Qs=[`y`,`scaleY`,`originY`];function $s(e,t,n,r){Xs(e.x,t,Zs,n?n.x:void 0,r?r.x:void 0),Xs(e.y,t,Qs,n?n.y:void 0,r?r.y:void 0)}function ec(e){return e.translate===0&&e.scale===1}function tc(e){return ec(e.x)&&ec(e.y)}function nc(e,t){return e.min===t.min&&e.max===t.max}function rc(e,t){return nc(e.x,t.x)&&nc(e.y,t.y)}function ic(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ac(e,t){return ic(e.x,t.x)&&ic(e.y,t.y)}function oc(e){return Bs(e.x)/Bs(e.y)}function sc(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function cc(e){return[e(`x`),e(`y`)]}function lc(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var uc={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(F.test(e))e=parseFloat(e);else return e}return`${lc(e,t.target.x)}% ${lc(e,t.target.y)}%`}},dc={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Ot.parse(e);if(i.length>5)return r;let a=Ot.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Mt(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}};function fc(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var pc=na.length,mc=e=>typeof e==`number`||F.test(e);function hc(e,t,n,r,i,a){i?(e.opacity=Mt(0,n.opacity??1,_c(r)),e.opacityExit=Mt(t.opacity??1,0,vc(r))):a&&(e.opacity=Mt(t.opacity??1,n.opacity??1,r));for(let i=0;i<pc;i++){let a=na[i],o=gc(t,a),s=gc(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||mc(o)===mc(s)?(e[a]=Math.max(Mt(qo(o),qo(s),r),0),(it.test(s)||it.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=Mt(t.rotate||0,n.rotate||0,r))}function gc(e,t){return e[t]===void 0?e.borderRadius:e[t]}var _c=yc(0,.5,xe),vc=yc(.5,.95,M);function yc(e,t,n){return r=>r<e?0:r>t?1:n(ae(e,t,r))}function bc(e,t,n){let r=Li(e)?e:mi(e);return r.start(wi(``,r,t,n)),r.animation}function xc(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var Sc=(e,t)=>e.depth-t.depth,Cc=class{constructor(){this.children=[],this.isDirty=!1}add(e){D(this.children,e),this.isDirty=!0}remove(e){O(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Sc),this.isDirty=!1,this.children.forEach(e)}};function wc(e,t){let n=Fe.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(en(r),e(a-t))};return $t.setup(r,!0),()=>en(r)}function Tc(e){return Li(e)?e.get():e}var Ec=class{constructor(){this.members=[]}add(e){D(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(O(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(O(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},Dc={borderRadius:{...uc,applyTo:[...na]},borderTopLeftRadius:uc,borderTopRightRadius:uc,borderBottomLeftRadius:uc,borderBottomRightRadius:uc,boxShadow:dc},Oc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(vs,{...Dc,...vs});var kc={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Ac=[``,`X`,`Y`,`Z`],jc=1e3,Mc=0;function Nc(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Pc(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Hi(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,$t,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Pc(r)}function Fc({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Mc++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Go.value&&(kc.nodes=kc.calculatedTargetDeltas=kc.calculatedProjections=0),this.nodes.forEach(Rc),this.nodes.forEach(Jc),this.nodes.forEach(Yc),this.nodes.forEach(zc),Go.addProjectionMetrics&&Go.addProjectionMetrics(kc)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Cc)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new oe),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=ua(t)&&!Ko(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;$t.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=wc(i,250),Oc.hasAnimatedSinceResize&&(Oc.hasAnimatedSinceResize=!1,this.nodes.forEach(qc)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||nl,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!ac(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...gi(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||qc(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),en(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Xc),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Pc(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Hc),this.nodes.forEach(Vc);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Uc);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Wc),this.nodes.forEach(Gc),this.nodes.forEach(Kc),this.nodes.forEach(Ic),this.nodes.forEach(Lc)):this.nodes.forEach(Uc),this.clearAllSnapshots();let e=Fe.now();Me.delta=te(0,1e3/60,e-Me.timestamp),Me.timestamp=e,Me.isProcessing=!0,tn.update.process(Me),tn.preRender.process(Me),tn.render.process(Me),Me.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,uo.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Bc),this.sharedNodes.forEach(Zc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,$t.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){$t.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!Bs(this.snapshot.measuredBox.x)&&!Bs(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=Zo(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!tc(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Ua(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),ol(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Zo();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(cl))){let{scroll:e}=this.root;e&&($a(t.x,e.offset.x),$a(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Zo();if(Ps(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Ps(t,e),$a(t.x,i.offset.x),$a(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||Zo();Ps(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&($a(r.x,-n.scroll.offset.x),$a(r.y,-n.scroll.offset.y)),Ua(n.latestValues)&&no(r,n.latestValues,n.layout?.layoutBox)}return Ua(this.latestValues)&&no(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=Zo();Ps(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!Ua(n.latestValues))continue;let r;n.instance&&(Ha(n.latestValues)&&n.updateSnapshot(),r=Zo(),Ps(r,n.measurePageBox())),$s(t,n.latestValues,n.snapshot?.layoutBox,r)}return Ua(this.latestValues)&&$s(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Me.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=Me.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=Zo(),this.targetWithTransforms=Zo()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Gs(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Ps(this.target,this.layout.layoutBox),Ya(this.target,this.targetDelta)):Ps(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),Go.value&&kc.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Ha(this.parent.latestValues)||Wa(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Zo(),this.relativeTargetOrigin=Zo(),qs(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Ps(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Me.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Ps(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Qa(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Zo());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Fs(this.prevProjectionDelta.x,this.projectionDelta.x),Fs(this.prevProjectionDelta.y,this.projectionDelta.y)),Us(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!sc(this.projectionDelta.x,this.prevProjectionDelta.x)||!sc(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Go.value&&kc.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Yo(),this.projectionDelta=Yo(),this.projectionDeltaWithTransform=Yo()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=Yo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=Zo(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(tl));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=Mt(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=Mt(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(Qc(o.x,e.x,n),Qc(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(qs(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),el(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&rc(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=Zo(),Ps(f,this.relativeTarget)),c&&(this.animationValues=a,hc(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(en(this.pendingAnimation),void 0),this.pendingAnimation=$t.update(()=>{Oc.hasAnimatedSinceResize=!0,this.motionValue||=mi(0),this.motionValue.jump(0,!1),this.currentAnimation=bc(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),Ln(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(jc),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&sl(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||Zo();let t=Bs(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let n=Bs(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+n}Ps(t,i),no(t,r),Us(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Ec),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&Nc(`z`,e,r,this.animationValues);for(let t=0;t<Ac.length;t++)Nc(`rotate${Ac[t]}`,e,r,this.animationValues),Nc(`skew${Ac[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Tc(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Tc(t?.pointerEvents)||``),this.hasProjected&&!Ua(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=fc(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in vs){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=vs[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?Tc(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Vc),this.root.sharedNodes.clear()}}}function Ic(e){e.updateLayout()}function Lc(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)cc(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Bs(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Ns(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else sl(i,t.layoutBox,n)&&cc(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Bs(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Yo();Us(o,n,t.layoutBox);let s=Yo();a?Us(s,e.applyTransform(r,!0),t.measuredBox):Us(s,n,t.layoutBox);let c=!tc(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=Zo();qs(s,t.layoutBox,i.layoutBox,o);let c=Zo();qs(c,n,a.layoutBox,o),ac(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Rc(e){Go.value&&kc.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function zc(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Bc(e){e.clearSnapshot()}function Vc(e){e.clearMeasurements()}function Hc(e){e.isLayoutDirty=!0,e.updateLayout()}function Uc(e){e.isLayoutDirty=!1}function Wc(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Gc(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function Kc(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function qc(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Jc(e){e.resolveTargetDelta()}function Yc(e){e.calcProjection()}function Xc(e){e.resetSkewAndRotation()}function Zc(e){e.removeLeadSnapshot()}function Qc(e,t,n){e.translate=Mt(t.translate,0,n),e.scale=Mt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function $c(e,t,n,r){e.min=Mt(t.min,n.min,r),e.max=Mt(t.max,n.max,r)}function el(e,t,n,r){$c(e.x,t.x,n.x,r),$c(e.y,t.y,n.y,r)}function tl(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var nl={duration:.45,ease:[.4,0,.1,1]},rl=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),il=rl(`applewebkit/`)&&!rl(`chrome/`)?Math.round:M;function al(e){e.min=il(e.min),e.max=il(e.max)}function ol(e){al(e.x),al(e.y)}function sl(e,t,n){return e===`position`||e===`preserve-aspect`&&!Vs(oc(t),oc(n),.2)}function cl(e){return e!==e.root&&e.scroll?.wasRoot}var ll=Fc({attachResizeListener:(e,t)=>xc(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),ul={current:void 0},dl=Fc({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ul.current){let e=new ll({});e.mount(window),e.setOptions({layoutScroll:!0}),ul.current=e}return ul.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),fl=(0,m.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function pl(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function ml(...e){return t=>{let n=!1,r=e.map(e=>{let r=pl(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():pl(e[t],null)}}}}function hl(...e){return m.useCallback(ml(...e),e)}var R=C(),gl=class extends m.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(la(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=la(e)&&e.offsetWidth||0,r=la(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function _l({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,m.useId)(),s=(0,m.useRef)(null),c=(0,m.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:l}=(0,m.useContext)(fl),u=hl(s,a===!1?void 0:e.props?.ref??e?.ref);return(0,m.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!u)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);l&&(y.nonce=l);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
2
- [data-motion-pop-id="${o}"] {
3
- position: absolute !important;
4
- width: ${e}px !important;
5
- height: ${u}px !important;
6
- ${_}px !important;
7
- ${v}px !important;
8
- }
9
- `),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,R.jsx)(gl,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:m.cloneElement(e,{ref:u})})}var vl=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=T(yl),d=(0,m.useId)(),f=(0,m.useRef)(n),p=(0,m.useRef)(r);E(()=>{f.current=n,p.current=r});let h=!0,g=(0,m.useMemo)(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>{u.delete(e),!f.current&&!u.size&&p.current?.()})}),[n,u,r]);return a&&h&&(g={...g}),(0,m.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),m.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,R.jsx)(_l,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,R.jsx)(ee.Provider,{value:g,children:e})};function yl(){return new Map}function bl(e=!0){let t=(0,m.useContext)(ee);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,m.useId)();(0,m.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,m.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var xl=e=>e.key||``;function Sl(e){let t=[];return m.Children.forEach(e,e=>{(0,m.isValidElement)(e)&&t.push(e)}),t}var Cl=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=bl(o),f=(0,m.useMemo)(()=>Sl(e),[e]),p=o&&!u?[]:f.map(xl),h=(0,m.useRef)(!0),g=T(()=>new Map),_=(0,m.useRef)(new Set),[v,y]=(0,m.useState)(f),[b,x]=(0,m.useState)(f);E(()=>{o&&!u&&!b.length&&d?.()},[u,o,b.length,d]),E(()=>{h.current=!1;for(let e=0;e<b.length;e++){let t=xl(b[e]);p.includes(t)?(g.delete(t),_.current.delete(t)):g.get(t)!==!0&&g.set(t,!1)}},[b,p.length,p.join(`-`)]);let S=[];if(f!==v){let e=[...f],t=0;for(let n of b){let r=p.indexOf(xl(n));r===-1?(e.splice(t++,0,n),S.push(n)):t=r+S.length+1}return S.every(e=>g.get(xl(e)))?e=f:a===`wait`&&(e=S),x(Sl(e)),y(f),null}let{forceRender:C}=(0,m.useContext)(w);return(0,R.jsx)(R.Fragment,{children:b.map(e=>{let m=xl(e),v=o&&!u?!1:f===b||p.includes(m);return(0,R.jsx)(vl,{isPresent:v,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:v?void 0:()=>{if(_.current.has(m))return;if(g.has(m))_.current.add(m),g.set(m,!0);else return;let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(C?.(),y([]),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},m)})})},wl=(0,m.createContext)({strict:!1}),Tl={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},El=!1;function Dl(){if(El)return;let e={};for(let t in Tl)e[t]={isEnabled:e=>Tl[t].some(t=>!!e[t])};fs(e),El=!0}function Ol(){return Dl(),ps()}function kl(e){let t=Ol();for(let n in e)t[n]={...t[n],...e[n]};fs(t)}function Al({children:e,...t}){let n=(0,m.useContext)(fl);t={...n,...t},t.transition=hi(t.transition,n.transition),t.isStatic=T(()=>t.isStatic);let r=(0,m.useMemo)(()=>t,[JSON.stringify(t.transition),t.transformPagePoint,t.reducedMotion,t.skipAnimations,t.isValidProp]);return(0,R.jsx)(fl.Provider,{value:r,children:e})}var jl=(0,m.createContext)({});function Ml(e,t){if(rs(e)){let{initial:t,animate:n}=e;return{initial:t===!1||es(t)?t:void 0,animate:es(n)?n:void 0}}return e.inherit===!1?{}:t}function Nl(e){let{initial:t,animate:n}=Ml(e,(0,m.useContext)(jl));return(0,m.useMemo)(()=>({initial:t,animate:n}),[Pl(t),Pl(n)])}function Pl(e){return Array.isArray(e)?e.join(` `):e}var Fl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Il(e,t,n){for(let r in t)!Li(t[r])&&!ys(r,n)&&(e[r]=t[r])}function Ll({transformTemplate:e},t){return(0,m.useMemo)(()=>{let n=Fl();return Da(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Rl(e,t){let n=e.style||{},r={};return Il(r,n,e),Object.assign(r,Ll(e,t)),r}function zl(e,t){let n={},r=Rl(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Bl=()=>({...Fl(),attrs:{}});function Vl(e,t,n,r){let i=(0,m.useMemo)(()=>{let n=Bl();return Ma(n,t,ws(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Il(t,e.style,e),i.style={...t,...i.style}}return i}var Hl=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function Ul(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Hl.has(e)}function Wl(e,t){return e.startsWith(`on`)?!Ul(e):t?.(e)??!Ul(e)}function Gl(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(Li(e[a])||(Wl(a,r)||n===!0&&Ul(a)||!t&&!Ul(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}var Kl=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function ql(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Kl.indexOf(e)>-1||/[A-Z]/u.test(e))}function Jl(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??ql(e)?Vl:zl)(t,r,i,e),l=Gl(t,typeof e==`string`,a,s),u=e===m.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,m.useMemo)(()=>Li(d)?d.get():d,[d]);return(0,m.createElement)(e,{...u,children:f})}function Yl({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Xl(n,r,i,e),renderState:t()}}function Xl(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Tc(a[e]);let{initial:o,animate:s}=e,c=rs(e),l=is(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!$o(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=ki(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Zl=e=>(t,n)=>{let r=(0,m.useContext)(jl),i=(0,m.useContext)(ee),a=()=>Yl(e,t,r,i);return n?a():T(a)},Ql=Zl({scrapeMotionValuesFromProps:bs,createRenderState:Fl}),$l=Zl({scrapeMotionValuesFromProps:Es,createRenderState:Bl}),eu=Symbol.for(`motionComponentSymbol`);function tu(e,t,n){let r=(0,m.useRef)(n);(0,m.useInsertionEffect)(()=>{r.current=n});let i=(0,m.useRef)(null);return(0,m.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}var nu=(0,m.createContext)({});function ru(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function iu(e,t,n,r,i,a){let{visualElement:o}=(0,m.useContext)(jl),s=(0,m.useContext)(wl),c=(0,m.useContext)(ee),l=(0,m.useContext)(fl),u=l.reducedMotion,d=l.skipAnimations,f=(0,m.useRef)(null),p=(0,m.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let h=f.current,g=(0,m.useContext)(nu);h&&!h.projection&&i&&(h.type===`html`||h.type===`svg`)&&au(f.current,n,i,g);let _=(0,m.useRef)(!1);(0,m.useInsertionEffect)(()=>{h&&_.current&&h.update(n,c)});let v=n[Vi],y=(0,m.useRef)(!!v&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return E(()=>{p.current&&h&&(h.animationState?.animateChanges(),h.enteringChildren=void 0)},[]),E(()=>{p.current=!0,h&&(_.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),y.current&&h.animationState&&h.animationState.animateChanges())}),(0,m.useEffect)(()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),!1),h.enteringChildren=void 0)}),h}function au(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:ou(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&ru(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function ou(e){if(e)return e.options.allowProjection===!1?ou(e.parent):e.projection}function su(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&kl(r);let a=n?n===`svg`:ql(e),o=a?$l:Ql;function s(n,s){let c,l={...(0,m.useContext)(fl),...n,layoutId:cu(n)},{isStatic:u,isValidProp:d}=l,f=Nl(n),p=o(n,u);if(!u&&typeof window<`u`){lu(l,r);let t=uu(l);c=t.MeasureLayout,f.visualElement=iu(e,p,l,i,t.ProjectionNode,a)}return(0,R.jsxs)(jl.Provider,{value:f,children:[c&&f.visualElement?(0,R.jsx)(c,{visualElement:f.visualElement,...l}):null,Jl(e,n,tu(p,f.visualElement,s),p,u,t,a,d)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,m.forwardRef)(s);return c[eu]=e,c}function cu({layoutId:e}){let t=(0,m.useContext)(w).id;return t&&e!==void 0?t+`-`+e:e}function lu(e,t){(0,m.useContext)(wl).strict}function uu(e){let{drag:t,layout:n}=Ol();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function du(e,t){if(typeof Proxy>`u`)return su;let n=new Map,r=(n,r)=>su(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,su(a,void 0,e,t)),n.get(a))})}var fu=(e,t)=>t.isSVG??ql(e)?new Ds(t):new Ss(t,{allowProjection:e!==m.Fragment}),pu=class extends gs{constructor(e){super(e),e.animationState||=As(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();$o(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},mu=0,hu={animation:{Feature:pu},exit:{Feature:class extends gs{constructor(){super(...arguments),this.id=mu++}update(){let{presenceContext:e,prevPresenceContext:t,animationState:n}=this.node;if(!e||!n)return;let{isPresent:r,onExitComplete:i}=e,a=t?.isPresent;if(r===a)return;if(r&&a===!1){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=Ai(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive(`exit`,!1);this.exit=void 0;return}let o=this.exit=n.setActive(`exit`,!r);i&&!r&&o.then(()=>{this.exit===o&&(this.exit=!0,i(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function gu(e){return{point:{x:e.pageX,y:e.pageY}}}var _u=e=>t=>bo(t)&&e(t,gu(t));function vu(e,t,n,r){return xc(e,t,_u(n),r)}var yu=({current:e})=>e?e.ownerDocument.defaultView:null,bu=(e,t)=>Math.abs(e-t);function xu(e,t){let n=bu(e.x,t.x),r=bu(e.y,t.y);return Math.sqrt(n**2+r**2)}var Su=new Set([`auto`,`scroll`]),Cu=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=wu(this.lastRawMoveEventInfo,this.transformPagePoint));let e=Eu(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=xu(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:Fe.now()});let{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=wu(t,this.transformPagePoint),this.hasPendingMove=!0,$t.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=Eu(e.type===`pointercancel`?this.lastMoveEventInfo:wu(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!bo(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=wu(gu(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=Me;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,Eu(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=ie(vu(this.contextWindow,`pointermove`,this.handlePointerMove,d),vu(this.contextWindow,`pointerup`,this.handlePointerUp,d),vu(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Su.has(e.overflowX)||Su.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),$t.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),en(this.updatePoint)}};function wu(e,t){return t?{point:t(e.point)}:e}function Tu(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Eu({point:e},t){return{point:e,delta:Tu(e,Ou(t)),offset:Tu(e,Du(t)),velocity:ku(t,.1)}}function Du(e){return e[0]}function Ou(e){return e[e.length-1]}function ku(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Ou(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>se(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>se(t)*2&&(r=e[1]);let a=ce(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Au(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Mt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Mt(n,e,r.max):Math.min(e,n)),e}function ju(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Mu(e,{top:t,left:n,bottom:r,right:i}){return{x:ju(e.x,n,i),y:ju(e.y,t,r)}}function Nu(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Pu(e,t){return{x:Nu(e.x,t.x),y:Nu(e.y,t.y)}}function Fu(e,t){let n=.5,r=Bs(e),i=Bs(t);return i>r?n=ae(t.min,t.max-r,e.min):r>i&&(n=ae(e.min,e.max-i,t.min)),te(0,1,n)}function Iu(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Lu=.35;function Ru(e=Lu){return e===!1?e=0:e===!0&&(e=Lu),{x:zu(e,`left`,`right`),y:zu(e,`top`,`bottom`)}}function zu(e,t,n){return{min:Bu(e,t),max:Bu(e,n)}}function Bu(e,t){return typeof e==`number`?e:e[t]||0}var Vu=new WeakMap,Hu=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Zo(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(e),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ho(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),cc(e=>{let t=this.getAxisMotionValue(e).get()||0;if(it.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Bs(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&$t.update(()=>i(e,t),!1,!0),zi(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Ku(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&$t.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new Cu(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:yu(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&$t.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Gu(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Au(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&ru(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?Mu(n.layoutBox,e):!1,this.elastic=Ru(t),r!==this.constraints&&!ru(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&cc(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Iu(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!ru(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=io(n,r.root,this.visualElement.getTransformPagePoint()),a=Pu(r.layout.layoutBox,i);if(t){let e=t(za(a));this.hasMutatedConstraints=!!e,e&&(a=Ra(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=cc(o=>{if(!Gu(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return zi(this.visualElement,e),n.start(wi(e,n,0,t,this.visualElement,!1))}stopAnimation(){cc(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();cc(e=>{if(!Gu(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-Mt(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!ru(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};cc(e=>{let t=this.getAxisMotionValue(e).get();i[e]=Fu({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),cc(t=>{let n=this.getAxisMotionValue(t);if(!Gu(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(Mt(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Vu.set(this.visualElement,this);let e=this.visualElement.current,t=vu(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&wo(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();ru(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Wu(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),$t.read(r);let o=xc(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(cc(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Lu,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Uu(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Wu(e,t,n){let r=L(e,Uu(n)),i=L(t,Uu(n));return()=>{r(),i()}}function Gu(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Ku(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var qu=class extends gs{constructor(e){super(e),this.removeGroupControls=M,this.removeListeners=M,this.controls=new Hu(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||M}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Ju=e=>(t,n)=>{e&&$t.update(()=>e(t,n),!1,!0)},Yu=class extends gs{constructor(){super(...arguments),this.removePointerDownListener=M}onPointerDown(e){this.session=new Cu(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:yu(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ju(e),onStart:Ju(t),onMove:Ju(n),onEnd:(e,t)=>{delete this.session,r&&$t.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=vu(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Xu=!1,Zu=class extends m.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Xu&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Oc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Xu=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||$t.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),uo.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Xu=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Qu(e){let[t,n]=bl(),r=(0,m.useContext)(w);return(0,R.jsx)(Zu,{...e,layoutGroup:r,switchLayoutGroup:(0,m.useContext)(nu),isPresent:t,safeToRemove:n})}var $u={pan:{Feature:Yu},drag:{Feature:qu,ProjectionNode:dl,MeasureLayout:Qu}};function ed(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&$t.postRender(()=>i(t,gu(t)))}var td=class extends gs{mount(){let{current:e}=this.node;e&&(this.unmount=vo(e,(e,t)=>(ed(this.node,t,`Start`),e=>ed(this.node,e,`End`))))}unmount(){}},nd=class extends gs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=ie(xc(this.node.current,`focus`,()=>this.onFocus()),xc(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function rd(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&$t.postRender(()=>i(t,gu(t)))}var id=class extends gs{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=jo(e,(e,t)=>(rd(this.node,t,`Start`),(e,{success:t})=>rd(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},ad=new WeakMap,od=new WeakMap,z=e=>{let t=ad.get(e.target);t&&t(e)},B=e=>{e.forEach(z)};function sd({root:e,...t}){let n=e||document;od.has(n)||od.set(n,{});let r=od.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(B,{root:e,...t})),r[i]}function cd(e,t,n){let r=sd(t);return ad.set(e,n),r.observe(e),()=>{ad.delete(e),r.unobserve(e)}}var ld={some:0,all:1},ud=class extends gs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:ld[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=cd(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(dd(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function dd({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var fd={inView:{Feature:ud},tap:{Feature:id},focus:{Feature:nd},hover:{Feature:td}},pd={layout:{ProjectionNode:dl,MeasureLayout:Qu}},md=du({...hu,...fd,...$u,...pd},fu);function hd(e){return typeof e==`object`&&!Array.isArray(e)}function gd(e,t,n,r){return e==null?[]:typeof e==`string`&&hd(t)?fa(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function _d(e,t,n){return e*(t+1)+n*t}function vd(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function yd(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(O(e,i),r--)}}function bd(e,t,n,r,i,a){yd(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:Mt(i,a,r[o]),easing:De(n,o)})}function xd(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function Sd(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var Cd=`easeInOut`,wd=20;function Td(e,{defaultTransition:t={},...n}={},r,i){let a=t.duration||.3,o=new Map,s=new Map,c={},l=new Map,u=0,d=0,f=0;for(let n=0;n<e.length;n++){let o=e[n];if(typeof o==`string`){l.set(o,d);continue}if(!Array.isArray(o)){l.set(o.name,vd(d,o.at,u,l));continue}let[p,m,h={}]=o;h.at!==void 0&&(d=vd(d,h.at,u,l));let g=0,_=(e,n,r,o=0,s=0)=>{let c=Od(e),{delay:l=0,times:u=wn(c),type:p=t.type||`keyframes`,repeat:m,repeatType:h,repeatDelay:_=0,...v}=n,{ease:y=t.ease||`easeOut`,duration:b}=n,x=typeof l==`function`?l(o,s):l,S=c.length,C=Br(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&jd(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=se(b));let r=sn(n,e,C);y=r.ease,b=r.duration}b??=a;let w=d+x;u.length===1&&u[0]===0&&(u[1]=1);let T=u.length-c.length;if(T>0&&Cn(u,T),c.length===1&&c.unshift(null),m&&`${m}${wd}`,m&&m<wd){let e=b>0?_/b:0;b=_d(b,m,_);let t=[...c],n=[...u];y=Array.isArray(y)?[...y]:[y];let r=[...y],i=h===`reverse`||h===`mirror`,a=t,o=r;i&&(a=[...t].reverse(),h===`reverse`&&(o=[...r].reverse().map(e=>typeof e==`function`?P(e):e)));for(let s=0;s<m;s++){let l=i&&s%2==0,d=l?a:t,f=l?o:r,p=(s+1)*(1+e);e>0&&(c.push(c[c.length-1]),u.push(p),y.push(`linear`)),c.push(...d);for(let e=0;e<d.length;e++)u.push(n[e]+p),y.push(e===0?`linear`:De(f,e-1))}xd(u,m,e)}let E=w+b;bd(r,c,y,u,w,E),g=Math.max(x+b,g),f=Math.max(E,f)};if(Li(p)){let e=Ed(p,s);_(m,h,Dd(`default`,e))}else{let e=gd(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,h=h;let r=e[n],i=Ed(r,s);for(let e in m)_(m[e],kd(h,e),Dd(e,i),n,t)}}u=d,d+=g}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(Sd);let s=[],c=[],l=[];for(let e=0;e<a.length;e++){let{at:t,value:n,easing:r}=a[e];s.push(n),c.push(ae(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(Cd)),c[c.length-1]!==1&&(c.push(1),s.push(null)),o.has(r)||o.set(r,{keyframes:{},transition:{}});let u=o.get(r);u.keyframes[i]=s;let{type:d,...p}=t;u.transition[i]={...p,duration:f,ease:l,times:c,...n}}}),o}function Ed(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Dd(e,t){return t[e]||(t[e]=[]),t[e]}function Od(e){return Array.isArray(e)?e:[e]}function kd(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var Ad=e=>typeof e==`number`,jd=e=>e.every(Ad);function Md(e,t){return Li(e)||typeof e==`number`||typeof e==`string`&&!hd(t)}function Nd(e,t,n,r){let i=[];if(Md(e,t))i.push(bc(e,hd(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=gd(e,t,r),o=a.length;for(let e=0;e<o;e++){let r=a[e],s={...n};`delay`in s&&typeof s.delay==`function`&&(s.delay=s.delay(e,o)),r instanceof Element?i.push(...co(r,t,s,Qo.get(r))):i.push(...sa(oa(r)??lo,r,t,s))}}return i}function Pd(e,t,n){let r=[];return Td(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=mi(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring:yn}).forEach(({keyframes:e,transition:t},n)=>{r.push(...Nd(n,e,t))}),r}function Fd(e){return Array.isArray(e)&&e.some(Array.isArray)}function Id(e={}){let{scope:t,reduceMotion:n,skipAnimations:r}=e;function i(e,i,a){let o=[],s,c={};if(n!==void 0&&(c.reduceMotion=n),r!==void 0&&(c.skipAnimations=r),Fd(e)){let{onComplete:n,...r}=i||{};typeof n==`function`&&(s=n),o=Pd(e,{...c,...r},t)}else{let{onComplete:n,...r}=a||{};typeof n==`function`&&(s=n),o=Nd(e,i,{...c,...r},t)}let l=new ci(o);return s&&l.finished.then(s),t&&(t.animations.push(l),l.finished.then(()=>{O(t.animations,l)})),l}return i}var Ld=Object.assign(Id(),{addEffect:ia,removeEffect:aa}),Rd=md,zd=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,D());else{var t=n(l);t!==null&&k(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function ee(){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&&k(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?D():S=!1}}}var D;if(typeof y==`function`)D=function(){y(ee)};else if(typeof MessageChannel<`u`){var O=new MessageChannel,te=O.port2;O.port1.onmessage=ee,D=function(){te.postMessage(null)}}else D=function(){_(ee,0)};function k(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,k(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,D()))),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}}}})),Bd=o(((e,t)=>{t.exports=zd()})),Vd=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`})),Hd=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=Vd()})),Ud=o((e=>{var t=Bd(),n=p(),r=Hd();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 x(e,t,n){return e===n||e===t&&(y=e,!0)}function S(e,t,n){return e===n?(b=e,!1):e===t&&(b!==null&&(y=e),!0)}function C(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 w(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 T=Object.assign,E=Symbol.for(`react.element`),ee=Symbol.for(`react.transitional.element`),D=Symbol.for(`react.portal`),O=Symbol.for(`react.fragment`),te=Symbol.for(`react.strict_mode`),k=Symbol.for(`react.profiler`),A=Symbol.for(`react.consumer`),j=Symbol.for(`react.context`),ne=Symbol.for(`react.forward_ref`),re=Symbol.for(`react.suspense`),M=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 O:return`Fragment`;case k:return`Profiler`;case te:return`StrictMode`;case re:return`Suspense`;case M:return`SuspenseList`;case oe:return`Activity`;case le:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case D:return`Portal`;case j:return e.displayName||`Context`;case A:return(e._context.displayName||`Context`)+`.Consumer`;case ne: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,N=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge={pending:!1,data:null,method:null,action:null},_e=[],ve=-1;function ye(e){return{current:e}}function be(e){0>ve||(e.current=_e[ve],_e[ve]=null,ve--)}function xe(e,t){ve++,_e[ve]=e.current,e.current=t}var Se=ye(null),Ce=ye(null),we=ye(null),Te=ye(null);function Ee(e,t){switch(xe(we,t),xe(Ce,e),xe(Se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?bp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=bp(t),e=xp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}be(Se),xe(Se,e)}function De(){be(Se),be(Ce),be(we)}function Oe(e){var t=e.memoizedState;t!==null&&(_h._currentValue=t.memoizedState,xe(Te,e)),t=Se.current;var n=xp(t,e.type);t!==n&&(xe(Ce,e),xe(Se,n))}function ke(e){Ce.current===e&&(be(Se),be(Ce)),Te.current===e&&(be(Te),_h._currentValue=ge)}var Ae,je;function Me(e){if(Ae===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ae=t&&t[1]||``,je=-1<e.stack.indexOf(`
10
- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
11
- `+Ae+e+je}var Ne=!1;function Pe(e,t){if(!e||Ne)return``;Ne=!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(`
12
- `),l=s.split(`
13
- `);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=`
14
- `+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{Ne=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Me(n):``}function Fe(e,t){switch(e.tag){case 26:case 27:case 5:return Me(e.type);case 16:return Me(`Lazy`);case 13:return e.child!==t&&t!==null?Me(`Suspense Fallback`):Me(`Suspense`);case 19:return Me(`SuspenseList`);case 0:case 15:return Pe(e.type,!1);case 11:return Pe(e.type.render,!1);case 1:return Pe(e.type,!0);case 31:return Me(`Activity`);case 30:return Me(`ViewTransition`);default:return``}}function Ie(e){try{var t=``,n=null;do t+=Fe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
15
- Error generating stack: `+e.message+`
16
- `+e.stack}}var Le=Object.prototype.hasOwnProperty,Re=t.unstable_scheduleCallback,ze=t.unstable_cancelCallback,Be=t.unstable_shouldYield,Ve=t.unstable_requestPaint,He=t.unstable_now,Ue=t.unstable_getCurrentPriorityLevel,We=t.unstable_ImmediatePriority,Ge=t.unstable_UserBlockingPriority,Ke=t.unstable_NormalPriority,qe=t.unstable_LowPriority,Je=t.unstable_IdlePriority,Ye=t.log,Xe=t.unstable_setDisableYieldValue,Ze=null,Qe=null;function $e(e){if(typeof Ye==`function`&&Xe(e),Qe&&typeof Qe.setStrictMode==`function`)try{Qe.setStrictMode(Ze,e)}catch{}}var et=Math.clz32?Math.clz32:rt,tt=Math.log,nt=Math.LN2;function rt(e){return e>>>=0,e===0?32:31-(tt(e)/nt|0)|0}var it=256,F=262144,at=4194304;function ot(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 st(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=ot(n))):i=ot(o):i=ot(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=ot(n))):i=ot(o)):i=ot(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 ct(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function lt(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-et(n),i=1<<r;t|=e[r],n&=~i}return t}function ut(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 dt(){var e=at;return at<<=1,!(at&62914560)&&(at=4194304),e}function ft(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function pt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function mt(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-et(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&&ht(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ht(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-et(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function gt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-et(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function _t(e,t){var n=t&-t;return n=n&42?1:vt(n),(n&(e.suspendedLanes|t))===0?n:0}function vt(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 yt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function bt(){var e=P.p;return e===0?(e=window.event,e===void 0?32:Nh(e.type)):e}function xt(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var St=Math.random().toString(36).slice(2),Ct=`__reactFiber$`+St,wt=`__reactProps$`+St,Tt=`__reactContainer$`+St,Et=`__reactEvents$`+St,Dt=`__reactListeners$`+St,Ot=`__reactHandles$`+St,kt=`__reactResources$`+St,At=`__reactMarker$`+St,jt=`__reactLoad$`+St;function Mt(e){delete e[Ct],delete e[wt],delete e[Dt],delete e[Ot]}function Nt(e){var t;if(t=e[Ct])return t;for(var n=e.parentNode;n;){if(t=n[Tt]||n[Ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Sm(e);e!==null;){if(n=e[Ct])return n;e=Sm(e)}return t}e=n,n=e.parentNode}return null}function Pt(e){if(e=e[Ct]||e[Tt]){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 It(e){var t=e[kt];return t||=e[kt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Lt(e){e[At]=!0}function Rt(e){e[jt]=void 0}var zt=new Set,Bt={};function Vt(e,t){Ht(e,t),Ht(e+`Capture`,t)}function Ht(e,t){for(Bt[e]=t,e=0;e<t.length;e++)zt.add(t[e])}var Ut=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]*$`),Wt={},Gt={};function Kt(e){return Le.call(Gt,e)?!0:Le.call(Wt,e)?!1:Ut.test(e)?Gt[e]=!0:(Wt[e]=!0,!1)}var qt=!1;function Jt(){var e=qt;return qt=!1,e}function Yt(e,t,n){if(Kt(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 Xt(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 Zt(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 Qt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function $t(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function en(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 tn(e){if(!e._valueTracker){var t=$t(e)?`checked`:`value`;e._valueTracker=en(e,t,``+e[t])}}function nn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=$t(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var rn=/[\n"\\]/g;function an(e){return e.replace(rn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function on(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=``+Qt(t)):e.value!==``+Qt(t)&&(e.value=``+Qt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):cn(e,Qt(n)):o===`number`&&e.value==t?cn(e,Qt(e.value)):cn(e,Qt(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=``+Qt(s):e.removeAttribute(`name`)}function sn(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)){tn(e);return}n=n==null?``:``+Qt(n),t=t==null?n:``+Qt(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),tn(e)}function cn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function ln(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=``+Qt(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 un(e,t,n){if(t!=null&&(t=``+Qt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Qt(n)}function dn(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=Qt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),tn(e)}function fn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pn=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 mn(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||pn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function hn(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]=``,qt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(mn(e,a,r),qt=!0)}else for(var o in t)t.hasOwnProperty(o)&&mn(e,o,t[o])}function gn(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 _n=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`]]),vn=/^[\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 yn(e){return vn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function bn(){}var xn=null;function Sn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cn=null,wn=null;function Tn(e){var t=Pt(e);if(t&&(e=t.stateNode)){var n=e[wt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(on(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="`+an(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[wt]||null;if(!a)throw Error(i(90));on(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&&nn(r)}break a;case`textarea`:un(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&ln(e,!!n.multiple,t,!1)}}}var En=!1;function Dn(e,t,n){if(En)return e(t,n);En=!0;try{return e(t)}finally{if(En=!1,(Cn!==null||wn!==null)&&(Yd(),Cn&&(t=Cn,e=wn,wn=Cn=null,Tn(t),e)))for(t=0;t<e.length;t++)Tn(e[t])}}function On(e,t){var n=e.stateNode;if(n===null)return null;var r=n[wt]||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 kn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,An=!1;if(kn)try{var jn={};Object.defineProperty(jn,"passive",{get:function(){An=!0}}),window.addEventListener(`test`,jn,jn),window.removeEventListener(`test`,jn,jn)}catch{An=!1}var Mn=null,Nn=null,Pn=null;function Fn(){if(Pn)return Pn;var e,t=Nn,n=t.length,r,i=`value`in Mn?Mn.value:Mn.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 Pn=i.slice(e,1<r?1-r:void 0)}function In(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 Ln(){return!0}function Rn(){return!1}function zn(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)?Ln:Rn,this.isPropagationStopped=Rn,this}return T(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Ln)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Ln)},persist:function(){},isPersistent:Ln}),t}var Bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vn=zn(Bn),Hn=T({},Bn,{view:0,detail:0}),Un=zn(Hn),Wn,Gn,Kn,qn=T({},Hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ir,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!==Kn&&(Kn&&e.type===`mousemove`?(Wn=e.screenX-Kn.screenX,Gn=e.screenY-Kn.screenY):Gn=Wn=0,Kn=e),Wn)},movementY:function(e){return`movementY`in e?e.movementY:Gn}}),Jn=zn(qn),Yn=zn(T({},qn,{dataTransfer:0})),Xn=zn(T({},Hn,{relatedTarget:0})),Zn=zn(T({},Bn,{animationName:0,elapsedTime:0,pseudoElement:0})),Qn=zn(T({},Bn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),$n=zn(T({},Bn,{data:0})),er={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},tr={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`},nr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function rr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nr[e])?!!t[e]:!1}function ir(){return rr}var ar=zn(T({},Hn,{key:function(e){if(e.key){var t=er[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=In(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?tr[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ir,charCode:function(e){return e.type===`keypress`?In(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?In(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),or=zn(T({},qn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),sr=zn(T({},Bn,{submitter:0})),cr=zn(T({},Hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ir})),lr=zn(T({},Bn,{propertyName:0,elapsedTime:0,pseudoElement:0})),ur=zn(T({},qn,{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})),dr=zn(T({},Bn,{newState:0,oldState:0,source:0})),fr=[9,13,27,32],pr=kn&&`CompositionEvent`in window,mr=null;kn&&`documentMode`in document&&(mr=document.documentMode);var hr=kn&&`TextEvent`in window&&!mr,gr=kn&&(!pr||mr&&8<mr&&11>=mr),_r=` `,vr=!1;function yr(e,t){switch(e){case`keyup`:return fr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function br(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var xr=!1;function Sr(e,t){switch(e){case`compositionend`:return br(t);case`keypress`:return t.which===32?(vr=!0,_r):null;case`textInput`:return e=t.data,e===_r&&vr?null:e;default:return null}}function Cr(e,t){if(xr)return e===`compositionend`||!pr&&yr(e,t)?(e=Fn(),Pn=Nn=Mn=null,xr=!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 gr&&t.locale!==`ko`?null:t.data;default:return null}}var wr={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 Tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!wr[e.type]:t===`textarea`}function Er(e,t,n,r){Cn?wn?wn.push(r):wn=[r]:Cn=r,t=rp(t,`onChange`),0<t.length&&(n=new Vn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Dr=null,Or=null;function kr(e){Xf(e,0)}function Ar(e){if(nn(Ft(e)))return e}function jr(e,t){if(e===`change`)return t}var Mr=!1;if(kn){var Nr;if(kn){var Pr=`oninput`in document;if(!Pr){var Fr=document.createElement(`div`);Fr.setAttribute(`oninput`,`return;`),Pr=typeof Fr.oninput==`function`}Nr=Pr}else Nr=!1;Mr=Nr&&(!document.documentMode||9<document.documentMode)}function Ir(){Dr&&(Dr.detachEvent(`onpropertychange`,Lr),Or=Dr=null)}function Lr(e){if(e.propertyName===`value`&&Ar(Or)){var t=[];Er(t,Or,e,Sn(e)),Dn(kr,t)}}function Rr(e,t,n){e===`focusin`?(Ir(),Dr=t,Or=n,Dr.attachEvent(`onpropertychange`,Lr)):e===`focusout`&&Ir()}function zr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Ar(Or)}function Br(e,t){if(e===`click`)return Ar(t)}function Vr(e,t){if(e===`input`||e===`change`)return Ar(t)}function Hr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Ur=typeof Object.is==`function`?Object.is:Hr;function Wr(e,t){if(Ur(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(!Le.call(t,i)||!Ur(e[i],t[i]))return!1}return!0}function Gr(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 Kr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qr(e,t){var n=Kr(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=Kr(n)}}function Jr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Jr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Gr(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=Gr(e.document)}return t}function Xr(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 Zr=kn&&`documentMode`in document&&11>=document.documentMode,Qr=null,$r=null,ei=null,ti=!1;function ni(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ti||Qr==null||Qr!==Gr(r)||(r=Qr,`selectionStart`in r&&Xr(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}),ei&&Wr(ei,r)||(ei=r,r=rp($r,`onSelect`),0<r.length&&(t=new Vn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Qr)))}function ri(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ii={animationend:ri(`Animation`,`AnimationEnd`),animationiteration:ri(`Animation`,`AnimationIteration`),animationstart:ri(`Animation`,`AnimationStart`),transitionrun:ri(`Transition`,`TransitionRun`),transitionstart:ri(`Transition`,`TransitionStart`),transitioncancel:ri(`Transition`,`TransitionCancel`),transitionend:ri(`Transition`,`TransitionEnd`)},ai={},oi={};kn&&(oi=document.createElement(`div`).style,`AnimationEvent`in window||(delete ii.animationend.animation,delete ii.animationiteration.animation,delete ii.animationstart.animation),`TransitionEvent`in window||delete ii.transitionend.transition);function si(e){if(ai[e])return ai[e];if(!ii[e])return e;var t=ii[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in oi)return ai[e]=t[n];return e}var ci=si(`animationend`),li=si(`animationiteration`),ui=si(`animationstart`),di=si(`transitionrun`),fi=si(`transitionstart`),pi=si(`transitioncancel`),mi=si(`transitionend`),hi=new Map,gi=`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(` `);gi.push(`scrollEnd`);function _i(e,t){hi.set(e,t),Vt(t,[e])}var vi=0;function yi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Od.identifierPrefix;var n=vi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function bi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Id;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 xi(e,t){return e=bi(e),t=bi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var Si=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)},Ci=[],wi=0,Ti=0;function Ei(){for(var e=wi,t=Ti=wi=0;t<e;){var n=Ci[t];Ci[t++]=null;var r=Ci[t];Ci[t++]=null;var i=Ci[t];Ci[t++]=null;var a=Ci[t];if(Ci[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&&Ai(n,i,a)}}function Di(e,t,n,r){Ci[wi++]=e,Ci[wi++]=t,Ci[wi++]=n,Ci[wi++]=r,Ti|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Oi(e,t,n,r){return Di(e,t,n,r),ji(e)}function ki(e,t){return Di(e,null,null,t),ji(e)}function Ai(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-et(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ji(e){if(50<Ld)throw Ld=0,Rd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Mi={};function Ni(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 Pi(e,t,n,r){return new Ni(e,t,n,r)}function Fi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ii(e,t){var n=e.alternate;return n===null?(n=Pi(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 Li(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 Ri(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Fi(r)&&(s=1);else if(typeof r==`string`)s=rh(e,n,Se.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case oe:return e=Pi(31,n,t,a),e.elementType=oe,e.lanes=o,e;case O:return zi(n.children,a,o,t);case te:s=8,a|=24;break;case k:return e=Pi(12,n,t,a|2),e.elementType=k,e.lanes=o,e;case re:return e=Pi(13,n,t,a),e.elementType=re,e.lanes=o,e;case M:return e=Pi(19,n,t,a),e.elementType=M,e.lanes=o,e;case se:case le:return e=a|32,e=Pi(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 j:s=10;break a;case A:s=9;break a;case ne: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=Pi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function zi(e,t,n,r){return e=Pi(7,e,r,t),e.lanes=n,e}function Bi(e,t,n){return e=Pi(6,e,null,t),e.lanes=n,e}function Vi(e){var t=Pi(18,null,null,0);return t.stateNode=e,t}function Hi(e,t,n){return t=Pi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ui=new WeakMap;function Wi(e,t){if(typeof e==`object`&&e){var n=Ui.get(e);return n===void 0?(t={value:e,source:t,stack:Ie(t)},Ui.set(e,t),t):n}return{value:e,source:t,stack:Ie(t)}}var Gi=[],Ki=0,qi=null,Ji=0,Yi=[],Xi=0,Zi=null,Qi=1,$i=``;function ea(e,t){Gi[Ki++]=Ji,Gi[Ki++]=qi,qi=e,Ji=t}function ta(e,t,n){Yi[Xi++]=Qi,Yi[Xi++]=$i,Yi[Xi++]=Zi,Zi=e;var r=Qi;e=$i;var i=32-et(r)-1;r&=~(1<<i),n+=1;var a=32-et(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Qi=1<<32-et(t)+i|n<<i|r,$i=a+e}else Qi=1<<a|n<<i|r,$i=e}function na(e){e.return!==null&&(ea(e,1),ta(e,1,0))}function ra(e){for(;e===qi;)qi=Gi[--Ki],Gi[Ki]=null,Ji=Gi[--Ki],Gi[Ki]=null;for(;e===Zi;)Zi=Yi[--Xi],Yi[Xi]=null,$i=Yi[--Xi],Yi[Xi]=null,Qi=Yi[--Xi],Yi[Xi]=null}function ia(e,t){Yi[Xi++]=Qi,Yi[Xi++]=$i,Yi[Xi++]=Zi,Qi=t.id,$i=t.overflow,Zi=e}var aa=null,oa=null,I=!1,sa=null,ca=!1,la=Error(i(519));function ua(e){throw ga(Wi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),la}function da(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ct]=e,t[wt]=r,n){case`dialog`:U(`cancel`,t),U(`close`,t);break;case`iframe`:case`object`:case`embed`:U(`load`,t);break;case`video`:case`audio`:for(n=0;n<Jf.length;n++)U(Jf[n],t);break;case`source`:U(`error`,t);break;case`img`:case`image`:case`link`:U(`error`,t),U(`load`,t);break;case`details`:U(`toggle`,t);break;case`input`:U(`invalid`,t),sn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:U(`invalid`,t);break;case`textarea`:U(`invalid`,t),dn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||lp(t.textContent,n)?(r.popover!=null&&(U(`beforetoggle`,t),U(`toggle`,t)),r.onScroll!=null&&U(`scroll`,t),r.onScrollEnd!=null&&U(`scrollend`,t),r.onClick!=null&&(t.onclick=bn),t=!0):t=!1,t||ua(e,!0)}function fa(e){for(aa=e.return;aa;)switch(aa.tag){case 5:case 31:case 13:ca=!1;return;case 27:case 3:ca=!0;return;default:aa=aa.return}}function pa(e){if(e!==aa)return!1;if(!I)return fa(e),I=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Cp(e.type,e.memoizedProps)),n=!n),n&&oa&&ua(e),fa(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));oa=xm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));oa=xm(e)}else t===27?(t=oa,Mp(e.type)?(e=bm,bm=null,oa=e):oa=t):oa=aa?ym(e.stateNode.nextSibling):null;return!0}function ma(){oa=aa=null,I=!1}function ha(){var e=sa;return e!==null&&(bd===null?bd=e:bd.push.apply(bd,e),sa=null),e}function ga(e){sa===null?sa=[e]:sa.push(e)}var _a=ye(null),va=null,ya=null;function ba(e,t,n){xe(_a,t._currentValue),t._currentValue=n}function xa(e){e._currentValue=_a.current,be(_a)}function Sa(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 Ca(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),Sa(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),Sa(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),Sa(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 wa(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;Ur(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Te.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[_h]:e.push(_h))}a=a.return}return e!==null&&Ca(t,e,n,r),t.flags|=262144,e!==null}function Ta(e){for(e=e.firstContext;e!==null;){if(!Ur(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ea(e){va=e,ya=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Da(e){return ka(va,e)}function Oa(e,t){return va===null&&Ea(e),ka(e,t)}function ka(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ya===null){if(e===null)throw Error(i(308));ya=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ya=ya.next=t;return n}var Aa=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()})}},ja=t.unstable_scheduleCallback,Ma=t.unstable_NormalPriority,Na={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Pa(){return{controller:new Aa,data:new Map,refCount:0}}function Fa(e){e.refCount--,e.refCount===0&&ja(Ma,function(){e.controller.abort()})}function Ia(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 La=null;function Ra(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var za=null,Ba=0,Va=0,Ha=null;function Ua(e,t){if(za===null){var n=za=[];Ba=0,Va=Uf(),Ha={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ba++,t.then(Wa,Wa),t}function Wa(){if(--Ba===0&&(La=null,za!==null)){Ha!==null&&(Ha.status=`fulfilled`);var e=za;za=null,Va=0,Ha=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ga(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 Ka=N.S;N.S=function(e,t){if(Cd=He(),typeof t==`object`&&t&&typeof t.then==`function`&&Ua(e,t),La!==null)for(var n=kf;n!==null;)Ia(n,La),n=n.next;if(n=e.types,n!==null){for(var r=kf;r!==null;)Ia(r,n),r=r.next;if(Va!==0){r=La,r===null&&(r=La=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ka!==null&&Ka(e,t)};var qa=ye(null);function Ja(){var e=qa.current;return e===null?od.pooledCache:e}function Ya(e,t){t===null?xe(qa,qa.current):xe(qa,t.pool)}function Xa(){var e=Ja();return e===null?null:{parent:Na._currentValue,pool:e}}var Za=Error(i(460)),Qa=Error(i(474)),$a=Error(i(542)),eo={then:function(){}};function to(e){return e=e.status,e===`fulfilled`||e===`rejected`}function no(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(bn,bn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,oo(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(bn,bn);else{if(e=od,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,oo(e),e}throw io=t,Za}}function ro(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(io=e,Za):e}}var io=null;function ao(){if(io===null)throw Error(i(459));var e=io;return io=null,e}function oo(e){if(e===Za||e===$a)throw Error(i(483))}var so=null,co=0;function lo(e){var t=co;return co+=1,so===null&&(so=[]),no(so,e,t)}function uo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function fo(e,t){throw t.$$typeof===E?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function po(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=Ii(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=Bi(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===O?(e=d(e,t,n.props.children,r,n.key),uo(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ae&&ro(i)===t.type)?(t=a(t,n.props),uo(t,n),t.return=e,t):(t=Ri(n.type,n.key,n.props,null,e.mode,r),uo(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=Hi(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=zi(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=Bi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case ee:return n=Ri(t.type,t.key,t.props,null,e.mode,n),uo(n,t),n.return=e,n;case D:return t=Hi(t,e.mode,n),t.return=e,t;case ae:return t=ro(t),f(e,t,n)}if(he(t)||fe(t))return t=zi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,lo(t),n);if(t.$$typeof===j)return f(e,Oa(e,t),n);fo(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 ee:return n.key===i?l(e,t,n,r):null;case D:return n.key===i?u(e,t,n,r):null;case ae:return n=ro(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,lo(n),r);if(n.$$typeof===j)return p(e,t,Oa(e,n),r);fo(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 ee:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case D:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ae:return r=ro(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,lo(r),i);if(r.$$typeof===j)return m(e,t,n,Oa(t,r),i);fo(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),I&&ea(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 I&&ea(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)}),I&&ea(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),I&&ea(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 I&&ea(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)}),I&&ea(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===O&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case ee:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===O){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),uo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ae&&ro(l)===r.type){n(e,r.sibling),c=a(r,o.props),uo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===O?(c=zi(o.props.children,e.mode,c,o.key),uo(c,o),c.return=e,e=c):(c=Ri(o.type,o.key,o.props,null,e.mode,c),uo(c,o),c.return=e,e=c)}return s(e);case D: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=Hi(o,e.mode,c),c.return=e,e=c}return s(e);case ae:return o=ro(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,lo(o),c);if(o.$$typeof===j)return _(e,r,Oa(e,o),c);fo(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=Bi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{co=0;var i=_(e,t,n,r);return so=null,i}catch(t){if(t===Za||t===$a)throw t;var a=Pi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var mo=po(!0),ho=po(!1),go=!1;function _o(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vo(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 yo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function bo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ad&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ji(e),Ai(e,null,n),t}return Di(e,r,t,n),ji(e)}function xo(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,gt(e,n)}}function So(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 Co=!1;function wo(){if(Co){var e=Ha;if(e!==null)throw e}}function To(e,t,n,r){Co=!1;var i=e.updateQueue;go=!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?(B&f)===f:(r&f)===f){f!==0&&f===Va&&(Co=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=T({},d,f);break a;case 2:go=!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),md|=o,e.lanes=o,e.memoizedState=d}}function Eo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Do(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Eo(n[e],t)}var Oo=ye(null),ko=ye(0);function Ao(e,t){e=fd,xe(ko,e),xe(Oo,t),fd=e|t.baseLanes}function jo(){xe(ko,fd),xe(Oo,Oo.current)}function Mo(){fd=ko.current,be(Oo),be(ko)}var No=ye(null),Po=null;function Fo(e){var t=e.alternate;xe(Bo,Bo.current&1),xe(No,e),Po===null&&(t===null||Oo.current!==null||t.memoizedState!==null)&&(Po=e)}function Io(e){xe(Bo,Bo.current),xe(No,e),Po===null&&(Po=e)}function Lo(e){e.tag===22?(xe(Bo,Bo.current),xe(No,e),Po===null&&(Po=e)):Ro()}function Ro(){xe(Bo,Bo.current),xe(No,No.current)}function zo(e){be(No),Po===e&&(Po=null),be(Bo)}var Bo=ye(0);function Vo(e,t){xe(No,No.current),xe(Bo,t)}function Ho(e){be(Bo),be(No),Po===e&&(Po=null)}function Uo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||gm(n)||_m(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 Wo=0,L=null,Go=null,Ko=null,qo=!1,Jo=!1,Yo=!1,Xo=0,Zo=0,Qo=null,$o=0;function es(){throw Error(i(321))}function ts(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ur(e[n],t[n]))return!1;return!0}function ns(e,t,n,r,i,a){return Wo=a,L=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?yc:bc,Yo=!1,a=n(r,i),Yo=!1,Jo&&(a=is(t,n,r,i)),rs(e),a}function rs(e){N.H=vc;var t=Go!==null&&Go.next!==null;if(Wo=0,Ko=Go=L=null,qo=!1,Zo=0,Qo=null,t)throw Error(i(300));e===null||Lc||(e=e.dependencies,e!==null&&Ta(e)&&(Lc=!0))}function is(e,t,n,r){L=e;var a=0;do{if(Jo&&(Qo=null),Zo=0,Jo=!1,25<=a)throw Error(i(301));if(a+=1,Ko=Go=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}N.H=xc,o=t(n,r)}while(Jo);return o}function as(){var e=N.H,t=e.useState()[0];return t=typeof t.then==`function`?fs(t):t,e=e.useState()[0],(Go===null?null:Go.memoizedState)!==e&&(L.flags|=1024),t}function os(){var e=Xo!==0;return Xo=0,e}function ss(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function cs(e){if(qo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}qo=!1}Wo=0,Ko=Go=L=null,Jo=!1,Zo=Xo=0,Qo=null}function ls(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ko===null?L.memoizedState=Ko=e:Ko=Ko.next=e,Ko}function us(){if(Go===null){var e=L.alternate;e=e===null?null:e.memoizedState}else e=Go.next;var t=Ko===null?L.memoizedState:Ko.next;if(t!==null)Ko=t,Go=e;else{if(e===null)throw L.alternate===null?Error(i(467)):Error(i(310));Go=e,e={memoizedState:Go.memoizedState,baseState:Go.baseState,baseQueue:Go.baseQueue,queue:Go.queue,next:null},Ko===null?L.memoizedState=Ko=e:Ko=Ko.next=e}return Ko}function ds(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function fs(e){var t=Zo;return Zo+=1,Qo===null&&(Qo=[]),e=no(Qo,e,t),t=L,(Ko===null?t.memoizedState:Ko.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?yc:bc),e}function ps(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return fs(e);if(e.$$typeof===ue)return;if(e.$$typeof===j)return Da(e)}throw Error(i(438,String(e)))}function ms(e){var t=null,n=L.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=L.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=ds(),L.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 hs(e,t){return typeof t==`function`?t(e):t}function gs(e){return _s(us(),Go,e)}function _s(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?(Wo&f)===f:(B&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===Va&&(d=!0);else if((Wo&p)===p){u=u.next,p===Va&&(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,L.lanes|=p,md|=p;f=u.action,Yo&&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,L.lanes|=f,md|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Ur(o,e.memoizedState)&&(Lc=!0,d&&(n=Ha,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 vs(e){var t=us(),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);Ur(o,t.memoizedState)||(Lc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ys(e,t,n){var r=L,a=us(),o=I;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Ur((Go||a).memoizedState,n);if(s&&(a.memoizedState=n,Lc=!0),a=a.queue,Ws(Ss.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Ko!==null&&!!(Ko.memoizedState.tag&1),zs(e?9:8,{destroy:void 0},xs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,od===null)throw Error(i(349));o||Wo&127||bs(r,t,n)}return n}function bs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=L.updateQueue,t===null?(t=ds(),L.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function xs(e,t,n,r){t.value=n,t.getSnapshot=r,Cs(t)&&ws(e)}function Ss(e,t,n){return n(function(){Cs(t)&&ws(e)})}function Cs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ur(e,n)}catch{return!0}}function ws(e){var t=ki(e,2);t!==null&&Wd(t,e,2)}function Ts(e){var t=ls();if(typeof e==`function`){var n=e;if(e=n(),Yo){$e(!0);try{n()}finally{$e(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hs,lastRenderedState:e},t}function Es(e,t,n,r){return e.baseState=n,_s(e,Go,typeof r==`function`?r:hs)}function Ds(e,t,n,r,a){if(hc(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)}};N.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Os(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Os(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=N.T,o={};o.types=a===null?null:a.types,N.T=o;try{var s=n(i,r),c=N.S;c!==null&&c(o,s),ks(e,t,s)}catch(n){js(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),N.T=a}}else try{a=n(i,r),ks(e,t,a)}catch(n){js(e,t,n)}}function ks(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){As(e,t,n)},function(n){return js(e,t,n)}):As(e,t,n)}function As(e,t,n){t.status=`fulfilled`,t.value=n,Ms(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Os(e,n)))}function js(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Ms(t),t=t.next;while(t!==r)}e.action=null}function Ms(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ns(e,t){return t}function Ps(e,t){if(I){var n=od.formState;if(n!==null){a:{var r=L;if(I){if(oa){b:{for(var i=oa,a=ca;i.nodeType!==8;){if(!a){i=null;break b}if(i=ym(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){oa=ym(i.nextSibling),r=i.data===`F!`;break a}}ua(r)}r=!1}r&&(t=n[0])}}return n=ls(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ns,lastRenderedState:t},n.queue=r,n=fc.bind(null,L,r),r.dispatch=n,r=Ts(!1),a=mc.bind(null,L,!1,r.queue),r=ls(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Ds.bind(null,L,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Fs(e){return Is(us(),Go,e)}function Is(e,t,n){if(t=_s(e,t,Ns)[0],e=gs(hs)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=fs(t)}catch(e){throw e===Za?$a:e}else r=t;t=us();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(L.flags|=2048,zs(9,{destroy:void 0},Ls.bind(null,i,n),null)),[r,a,e]}function Ls(e,t){e.action=t}function Rs(e){var t=us(),n=Go;if(n!==null)return Is(t,n,e);us(),t=t.memoizedState,n=us();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function zs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=L.updateQueue,t===null&&(t=ds(),L.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 Bs(){return us().memoizedState}function Vs(e,t,n,r){var i=ls();L.flags|=e,i.memoizedState=zs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Hs(e,t,n,r){var i=us();r=r===void 0?null:r;var a=i.memoizedState.inst;Go!==null&&r!==null&&ts(r,Go.memoizedState.deps)?i.memoizedState=zs(t,a,n,r):(L.flags|=e,i.memoizedState=zs(1|t,a,n,r))}function Us(e,t){Vs(8390656,8,e,t)}function Ws(e,t){Hs(2048,8,e,t)}function Gs(e){L.flags|=4;var t=L.updateQueue;if(t===null)t=ds(),L.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Ks(e){var t=us().memoizedState;return Gs({ref:t,nextImpl:e}),function(){if(ad&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function qs(e,t){return Hs(4,2,e,t)}function Js(e,t){return Hs(4,4,e,t)}function Ys(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 Xs(e,t,n){n=n==null?null:n.concat([e]),Hs(4,4,Ys.bind(null,t,e),n)}function Zs(){}function Qs(e,t){var n=us();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&ts(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function $s(e,t){var n=us();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&ts(t,r[1]))return r[0];if(r=e(),Yo){$e(!0);try{e()}finally{$e(!1)}}return n.memoizedState=[r,t],r}function ec(e,t,n){return n===void 0||Wo&1073741824&&!(B&261930)?e.memoizedState=t:(e.memoizedState=n,e=Vd(),L.lanes|=e,md|=e,n)}function tc(e,t,n,r){return Ur(n,t)?n:Oo.current===null?!(Wo&106)||Wo&1073741824&&!(B&261930)?(Lc=!0,e.memoizedState=n):(e=Vd(),L.lanes|=e,md|=e,t):(e=ec(e,n,r),Ur(e,t)||(Lc=!0),e)}function nc(e,t,n,r,i){var a=P.p;P.p=a!==0&&8>a?a:8;var o=N.T,s={};s.types=o===null?null:o.types,N.T=s,mc(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?pc(e,t,Ga(c,r),zd(e)):pc(e,t,r,zd(e))}catch(n){pc(e,t,{then:function(){},status:`rejected`,reason:n},zd())}finally{P.p=a,o!==null&&s.types!==null&&(o.types=s.types),N.T=o}}function rc(){}function ic(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ac(e).queue;nc(e,a,t,ge,n===null?rc:function(){return oc(e),n(r)})}function ac(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ge,baseState:ge,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hs,lastRenderedState:ge},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function oc(e){var t=ac(e);t.next===null&&(t=e.alternate.memoizedState),pc(e,t.next.queue,{},zd())}function sc(){return Da(_h)}function cc(){return us().memoizedState}function lc(){return us().memoizedState}function uc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=zd();e=yo(n);var r=bo(t,e,n);r!==null&&(Wd(r,t,n),xo(r,t,n)),t={cache:Pa()},e.payload=t;return}t=t.return}}function dc(e,t,n){var r=zd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},hc(e)?gc(t,n):(n=Oi(e,t,n,r),n!==null&&(Wd(n,e,r),_c(n,t,r)))}function fc(e,t,n){pc(e,t,n,zd())}function pc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(hc(e))gc(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,Ur(s,o))return Di(e,t,i,0),od===null&&Ei(),!1}catch{}if(n=Oi(e,t,i,r),n!==null)return Wd(n,e,r),_c(n,t,r),!0}return!1}function mc(e,t,n,r){if(r={lane:2,revertLane:Uf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},hc(e)){if(t)throw Error(i(479))}else t=Oi(e,n,r,2),t!==null&&Wd(t,e,2)}function hc(e){var t=e.alternate;return e===L||t!==null&&t===L}function gc(e,t){Jo=qo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function _c(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,gt(e,n)}}var vc={readContext:Da,use:ps,useCallback:es,useContext:es,useEffect:es,useImperativeHandle:es,useLayoutEffect:es,useInsertionEffect:es,useMemo:es,useReducer:es,useRef:es,useState:es,useDebugValue:es,useDeferredValue:es,useTransition:es,useSyncExternalStore:es,useId:es,useHostTransitionStatus:es,useFormState:es,useActionState:es,useOptimistic:es,useMemoCache:es,useCacheRefresh:es,useEffectEvent:es},yc={readContext:Da,use:ps,useCallback:function(e,t){return ls().memoizedState=[e,t===void 0?null:t],e},useContext:Da,useEffect:Us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Vs(4194308,4,Ys.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Vs(4194308,4,e,t)},useInsertionEffect:function(e,t){Vs(4,2,e,t)},useMemo:function(e,t){var n=ls();t=t===void 0?null:t;var r=e();if(Yo){$e(!0);try{e()}finally{$e(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ls();if(n!==void 0){var i=n(t);if(Yo){$e(!0);try{n(t)}finally{$e(!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=dc.bind(null,L,e),[r.memoizedState,e]},useRef:function(e){var t=ls();return e={current:e},t.memoizedState=e},useState:function(e){e=Ts(e);var t=e.queue,n=fc.bind(null,L,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Zs,useDeferredValue:function(e,t){return ec(ls(),e,t)},useTransition:function(){var e=Ts(!1);return e=nc.bind(null,L,e.queue,!0,!1),ls().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=L,a=ls();if(I){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),od===null)throw Error(i(349));B&127||bs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Us(Ss.bind(null,r,o,e),[e]),r.flags|=2048,zs(9,{destroy:void 0},xs.bind(null,r,o,n,t),null),n},useId:function(){var e=ls(),t=od.identifierPrefix;if(I){var n=$i,r=Qi;n=(r&~(1<<32-et(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Xo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=$o++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:sc,useFormState:Ps,useActionState:Ps,useOptimistic:function(e){var t=ls();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=mc.bind(null,L,!0,n),n.dispatch=t,[e,t]},useMemoCache:ms,useCacheRefresh:function(){return ls().memoizedState=uc.bind(null,L)},useEffectEvent:function(e){var t=ls(),n={impl:e};return t.memoizedState=n,function(){if(ad&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},bc={readContext:Da,use:ps,useCallback:Qs,useContext:Da,useEffect:Ws,useImperativeHandle:Xs,useInsertionEffect:qs,useLayoutEffect:Js,useMemo:$s,useReducer:gs,useRef:Bs,useState:function(){return gs(hs)},useDebugValue:Zs,useDeferredValue:function(e,t){return tc(us(),Go.memoizedState,e,t)},useTransition:function(){var e=gs(hs)[0],t=us().memoizedState;return[typeof e==`boolean`?e:fs(e),t]},useSyncExternalStore:ys,useId:cc,useHostTransitionStatus:sc,useFormState:Fs,useActionState:Fs,useOptimistic:function(e,t){return Es(us(),Go,e,t)},useMemoCache:ms,useCacheRefresh:lc,useEffectEvent:Ks},xc={readContext:Da,use:ps,useCallback:Qs,useContext:Da,useEffect:Ws,useImperativeHandle:Xs,useInsertionEffect:qs,useLayoutEffect:Js,useMemo:$s,useReducer:vs,useRef:Bs,useState:function(){return vs(hs)},useDebugValue:Zs,useDeferredValue:function(e,t){var n=us();return Go===null?ec(n,e,t):tc(n,Go.memoizedState,e,t)},useTransition:function(){var e=vs(hs)[0],t=us().memoizedState;return[typeof e==`boolean`?e:fs(e),t]},useSyncExternalStore:ys,useId:cc,useHostTransitionStatus:sc,useFormState:Rs,useActionState:Rs,useOptimistic:function(e,t){var n=us();return Go===null?(n.baseState=e,[e,n.queue.dispatch]):Es(n,Go,e,t)},useMemoCache:ms,useCacheRefresh:lc,useEffectEvent:Ks};function Sc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Cc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=zd(),i=yo(r);i.payload=t,n!=null&&(i.callback=n),t=bo(e,i,r),t!==null&&(Wd(t,e,r),xo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=zd(),i=yo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=bo(e,i,r),t!==null&&(Wd(t,e,r),xo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=zd(),r=yo(n);r.tag=2,t!=null&&(r.callback=t),t=bo(e,r,n),t!==null&&(Wd(t,e,n),xo(t,e,n))}};function wc(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?!Wr(n,r)||!Wr(i,a):!0}function Tc(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&&Cc.enqueueReplaceState(t,t.state,null)}function Ec(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=T({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Dc(e){Si(e)}function Oc(e){console.error(e)}function kc(e){Si(e)}function Ac(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function jc(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 Mc(e,t,n){return n=yo(n),n.tag=3,n.payload={element:null},n.callback=function(){Ac(e,t)},n}function Nc(e){return e=yo(e),e.tag=3,e}function Pc(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(){jc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){jc(t,n,r),typeof i!=`function`&&(Ed===null?Ed=new Set([this]):Ed.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Fc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&wa(t,n,a,!0),n=No.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Po===null?nf():n.alternate===null&&pd===0&&(pd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===eo?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),wf(e,r,a)),!1;case 22:return n.flags|=65536,r===eo?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)),wf(e,r,a)),!1}throw Error(i(435,n.tag))}return wf(e,r,a),nf(),!1}if(I)return t=No.current,t===null?(r!==la&&(t=Error(i(423),{cause:r}),ga(Wi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Wi(r,n),a=Mc(e.stateNode,r,a),So(e,a),pd!==4&&(pd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==la&&(e=Error(i(422),{cause:r}),ga(Wi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Wi(o,n),yd===null?yd=[o]:yd.push(o),pd!==4&&(pd=2),t===null)return!0;r=Wi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Mc(n.stateNode,r,e),So(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`&&(Ed===null||!Ed.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Nc(a),Pc(a,e,n,r),So(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Ic=Error(i(461)),Lc=!1;function Rc(e,t,n,r){t.child=e===null?ho(t,null,n,r):mo(t,e.child,n,r)}function zc(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 Ea(t),r=ns(e,t,n,o,a,i),s=os(),e!==null&&!Lc?(ss(e,t,i),pl(e,t,i)):(I&&s&&na(t),t.flags|=1,Rc(e,t,r,i),t.child)}function Bc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Fi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Vc(e,t,a,r,i)):(e=Ri(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ml(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Wr:n,n(o,r)&&e.ref===t.ref)return pl(e,t,i)}return t.flags|=1,e=Ii(a,r),e.ref=t.ref,e.return=t,t.child=e}function Vc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Wr(a,r)&&e.ref===t.ref){if(Lc=!1,t.pendingProps=r=a,ml(e,i))e.flags&131072&&(Lc=!0);else return t.lanes=e.lanes,pl(e,t,i)}}return Yc(e,t,n,r,i)}function Hc(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 Wc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ya(t,a===null?null:a.cachePool),a===null?jo():Ao(t,a),Lo(t);else return r=t.lanes=536870912,Wc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ya(t,null),jo(),Ro()):(Ya(t,a.cachePool),Ao(t,a),Ro(),t.memoizedState=null);return Rc(e,t,i,n),t.child}function Uc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Wc(e,t,n,r,i){var a=Ja();return a=a===null?null:{parent:Na._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ya(t,null),jo(),Lo(t),e!==null&&wa(e,t,r,!0),t.childLanes=i,null}function Gc(e,t){return t=il({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Kc(e,t,n){return mo(t,e.child,null,n),e=Gc(t,t.pendingProps),e.flags|=2,zo(t),t.memoizedState=null,e}function qc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(I){if(r.mode===`hidden`)return e=Gc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Uc(null,e);if(Io(t),(e=oa)?(e=hm(e,ca),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zi===null?null:{id:Qi,overflow:$i},retryLane:536870912,hydrationErrors:null},n=Vi(e),n.return=t,t.child=n,aa=t,oa=null)):e=null,e===null)throw ua(t);return t.lanes=536870912,null}return Gc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Io(t),a){if(t.flags&256)t.flags&=-257,t=Kc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Lc||wa(e,t,n,!1),a=(n&e.childLanes)!==0,Lc||a){if(Oo.current===null){if(r=od,r!==null&&(s=_t(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ki(e,s),Wd(r,e,s),Ic;nf()}t=Kc(e,t,n)}else e=o.treeContext,oa=ym(s.nextSibling),aa=t,I=!0,sa=null,ca=!1,e!==null&&ia(t,e),t=Gc(t,r),t.flags|=134221824;return t}return e=Ii(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Jc(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 Yc(e,t,n,r,i){return Ea(t),n=ns(e,t,n,r,void 0,i),r=os(),e!==null&&!Lc?(ss(e,t,i),pl(e,t,i)):(I&&r&&na(t),t.flags|=1,Rc(e,t,n,i),t.child)}function Xc(e,t,n,r,i,a){return Ea(t),t.updateQueue=null,n=is(t,r,n,i),rs(e),r=os(),e!==null&&!Lc?(ss(e,t,a),pl(e,t,a)):(I&&r&&na(t),t.flags|=1,Rc(e,t,n,a),t.child)}function Zc(e,t,n,r,i){if(Ea(t),t.stateNode===null){var a=Mi,o=n.contextType;typeof o==`object`&&o&&(a=Da(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Cc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},_o(t),o=n.contextType,a.context=typeof o==`object`&&o?Da(o):Mi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Sc(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&&Cc.enqueueReplaceState(a,a.state,null),To(t,r,a,i),wo(),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=Ec(n,s);a.props=c;var l=a.context,u=n.contextType;o=Mi,typeof u==`object`&&u&&(o=Da(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)&&Tc(t,a,r,o),go=!1;var f=t.memoizedState;a.state=f,To(t,r,a,i),wo(),l=t.memoizedState,s||f!==l||go?(typeof d==`function`&&(Sc(t,n,d,r),l=t.memoizedState),(c=go||wc(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,vo(e,t),o=t.memoizedProps,u=Ec(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Mi,typeof l==`object`&&l&&(c=Da(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)&&Tc(t,a,r,c),go=!1,f=t.memoizedState,a.state=f,To(t,r,a,i),wo();var p=t.memoizedState;o!==d||f!==p||go||e!==null&&e.dependencies!==null&&Ta(e.dependencies)?(typeof s==`function`&&(Sc(t,n,s,r),p=t.memoizedState),(u=go||wc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ta(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,Jc(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=mo(t,e.child,null,i),t.child=mo(t,null,n,i)):Rc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=pl(e,t,i),e}function Qc(e,t,n,r){return ma(),t.flags|=256,Rc(e,t,n,r),t.child}var $c={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function el(e){return{baseLanes:e,cachePool:Xa()}}function tl(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=_d),e}function nl(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Bo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(I){if(i?Fo(t):Ro(),(e=oa)?(e=hm(e,ca),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zi===null?null:{id:Qi,overflow:$i},retryLane:536870912,hydrationErrors:null},n=Vi(e),n.return=t,t.child=n,aa=t,oa=null)):e=null,e===null)throw ua(t);return t.lanes=_m(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Ro(),i=t.mode,a=il({mode:`hidden`,children:a},i),r=zi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=el(n),r.childLanes=tl(e,o,n),t.memoizedState=$c,Uc(null,r)):(Fo(t),rl(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return ol(e,t,a,o,r,c,s,n)}return i?(Ro(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Ii(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=zi(i,a,n,null),i.flags|=2):i=Ii(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Uc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=el(n):(a=i.cachePool,a===null?a=Xa():(s=Na._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=tl(e,o,n),t.memoizedState=$c,Uc(e.child,r)):(Fo(t),n=e.child,e=n.sibling,n=Ii(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 rl(e,t){return t=il({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function il(e,t){return e=Pi(22,e,null,t),e.lanes=0,e}function al(e,t,n){return mo(t,e.child,null,n),e=rl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ol(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Fo(t),t.flags&=-257,al(e,t,c)):t.memoizedState===null?(Ro(),o=a.fallback,s=t.mode,a=il({mode:`visible`,children:a.children},s),o=zi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,mo(t,e.child,null,c),a=t.child,a.memoizedState=el(c),a.childLanes=tl(e,r,c),t.memoizedState=$c,Uc(null,a)):(Ro(),t.child=e.child,t.flags|=128,null);if(Fo(t),_m(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,ga({value:a,source:null,stack:null})),al(e,t,c)}if(Lc||wa(e,t,c,!1),r=(c&e.childLanes)!==0,Lc||r){if(Oo.current!==null)return al(e,t,c);if(r=od,r!==null&&(a=_t(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,ki(e,a),Wd(r,e,a),Ic;return gm(o)||nf(),al(e,t,c)}return gm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,oa=ym(o.nextSibling),aa=t,I=!0,sa=null,ca=!1,e!==null&&ia(t,e),t=rl(t,a.children),t.flags|=134221824,t)}function sl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Sa(e.return,t,n)}function cl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Uo(n)===null&&(t=e),e=e.sibling}return t}function ll(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 ul(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 dl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Bo.current;if(t.flags&128)return Vo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Vo(t,o),i===`backwards`&&e!==null?(ul(e),Rc(e,t,r,n),ul(e)):Rc(e,t,r,n),r=I?Ji:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sl(e,n,t);else if(e.tag===19)sl(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=cl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,ul(t)),ll(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&&Uo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ll(t,!0,n,null,a,r);break;case`together`:ll(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=cl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ll(t,!1,i,n,a,r)}return t.child}function fl(e,t,n){var r=t.pendingProps;return ba(t,t.type,r.value),Rc(e,t,r.children,n),t.child}function pl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),md|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(wa(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=Ii(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ii(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ml(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Ta(e)))}function hl(e,t,n){switch(t.tag){case 3:Ee(t,t.stateNode.containerInfo),ba(t,Na,e.memoizedState.cache),ma();break;case 27:case 5:Oe(t);break;case 4:Ee(t,t.stateNode.containerInfo);break;case 10:ba(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Io(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Fo(t),t.flags|=128,null;r=wa(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?nl(e,t,n):(Fo(t),e=pl(e,t,n),e===null?null:e.sibling)}Fo(t);break;case 19:if(t.flags&128)return dl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(wa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return dl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Vo(t,Bo.current),r)break;return null;case 22:return t.lanes=0,Hc(e,t,n,t.pendingProps);case 24:ba(t,Na,e.memoizedState.cache)}return pl(e,t,n)}function R(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Lc=!0;else{if(!ml(e,n)&&!(t.flags&128))return Lc=!1,hl(e,t,n);Lc=!!(e.flags&131072)}}else Lc=!1,I&&t.flags&1048576&&ta(t,Ji,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ro(t.elementType),t.type=e,typeof e==`function`)Fi(e)?(r=Ec(e,r),t.tag=1,t=Zc(null,t,e,r,n)):(t.tag=0,t=Yc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ne){t.tag=11,t=zc(null,t,e,r,n);break a}if(a===ie){t.tag=14,t=Bc(null,t,e,r,n);break a}if(a===j){t.tag=10,t.type=e,t=fl(null,t,n);break a}}throw t=me(e)||e,Error(i(306,t,``))}}return t;case 0:return Yc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ec(r,t.pendingProps),Zc(e,t,r,a,n);case 3:a:{if(Ee(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,vo(e,t),To(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ba(t,Na,r),r!==o.cache&&Ca(t,[Na],n,!0),wo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Qc(e,t,r,n);break a}if(r!==a){a=Wi(Error(i(424)),t),ga(a),t=Qc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(oa=ym(e.firstChild),aa=t,I=!0,sa=null,ca=!0,n=ho(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ma(),r===a){t=pl(e,t,n);break a}Rc(e,t,r,n)}t=t.child}return t;case 26:return Jc(e,t),e===null?(n=Um(t.type,null,t.pendingProps,null))?t.memoizedState=n:I||(t.stateNode=Sp(t.type,t.pendingProps,we.current,t)):t.memoizedState=Um(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Oe(t),e===null&&I&&(r=t.stateNode=Tm(t.type,t.pendingProps,we.current),aa=t,ca=!0,a=oa,Mp(t.type)?(bm=a,oa=ym(r.firstChild)):oa=a),Rc(e,t,t.pendingProps.children,n),Jc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&I&&((a=r=oa)&&(r=pm(r,t.type,t.pendingProps,ca),r===null?a=!1:(t.stateNode=r,aa=t,oa=ym(r.firstChild),ca=!1,a=!0)),a||ua(t)),Oe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Cp(a,o)?r=null:s!==null&&Cp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=ns(e,t,as,null,null,n),_h._currentValue=a),Jc(e,t),Rc(e,t,r,n),t.child;case 6:return e===null&&I&&((e=n=oa)&&(n=mm(n,t.pendingProps,ca),n===null?e=!1:(t.stateNode=n,aa=t,oa=null,e=!0)),e||ua(t)),null;case 13:return nl(e,t,n);case 4:return Ee(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=mo(t,null,r,n):Rc(e,t,r,n),t.child;case 11:return zc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Jc(e,t),Rc(e,t,r,n),t.child;case 8:return Rc(e,t,t.pendingProps.children,n),t.child;case 12:return Rc(e,t,t.pendingProps.children,n),t.child;case 10:return fl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Ea(t),a=Da(a),r=r(a),t.flags|=1,Rc(e,t,r,n),t.child;case 14:return Bc(e,t,t.type,t.pendingProps,n);case 15:return Vc(e,t,t.type,t.pendingProps,n);case 19:return dl(e,t,n);case 31:return qc(e,t,n);case 22:return Hc(e,t,n,t.pendingProps);case 24:return Ea(t),r=Da(Na),e===null?(a=Ja(),a===null&&(a=od,o=Pa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},_o(t),ba(t,Na,a)):((e.lanes&n)!==0&&(vo(e,t),To(t,null,null,n),wo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ba(t,Na,r),r!==a.cache&&Ca(t,[Na],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ba(t,Na,r))),Rc(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:I&&na(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Jc(e,t),Rc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function gl(e){e.flags|=4}function _l(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?ih(t,r):ih(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($d())e.flags|=8192;else throw io=eo,Qa}}else e.flags&=-16777217}function vl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!ah(t)){if($d())e.flags|=8192;else throw io=eo,Qa}}function yl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:dt(),e.lanes|=t,vd|=t)}function bl(e,t){if(!I)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 xl(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 Sl(e,t,n){var r=t.pendingProps;switch(ra(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xl(t),null;case 1:return xl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),xa(Na),De(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(pa(t)?gl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ha())),xl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(gl(t),o===null?(xl(t),_l(t,a,null,r,n)):(xl(t),vl(t,o))):o?o===e.memoizedState?(xl(t),t.flags&=-16777217):(gl(t),xl(t),vl(t,o)):(e=e.memoizedProps,e!==r&&gl(t),xl(t),_l(t,a,e,r,n)),null;case 27:if(ke(t),n=we.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&gl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return xl(t),t.subtreeFlags&=-33554433,null}e=Se.current,pa(t)?da(t,e):(e=Tm(a,r,n),t.stateNode=e,gl(t))}return xl(t),t.subtreeFlags&=-33554433,null;case 5:if(ke(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&gl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return xl(t),t.subtreeFlags&=-33554433,null}if(o=Se.current,pa(t))da(t,o);else{var s=yp(we.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[Ct]=t,o[wt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(fp(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&gl(t)}}return xl(t),t.subtreeFlags&=-33554433,_l(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&gl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=we.current,pa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=aa,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ct]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||lp(e.nodeValue,n)),e||ua(t,!0)}else e=yp(e).createTextNode(r),e[Ct]=t,t.stateNode=e}return xl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=pa(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[Ct]=t}else ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;xl(t),e=!1}else n=ha(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(zo(t),t):(zo(t),null);if(t.flags&128)throw Error(i(558))}return xl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=pa(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[Ct]=t}else ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;xl(t),a=!1}else a=ha(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(zo(t),t):(zo(t),null)}return zo(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),yl(t,t.updateQueue),xl(t),null);case 4:return De(),e===null&&$f(t.stateNode.containerInfo),t.flags|=67108864,xl(t),null;case 10:return xa(t.type),xl(t),null;case 19:if(Ho(t),r=t.memoizedState,r===null)return xl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)bl(r,!1);else{if(pd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Uo(e),o!==null){for(t.flags|=128,bl(r,!1),e=o.updateQueue,t.updateQueue=e,yl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Li(n,e),n=n.sibling;return Vo(t,Bo.current&1|2),I&&ea(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&He()>wd&&(t.flags|=128,a=!0,bl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Uo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,yl(t,e),bl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!I)return xl(t),null}else 2*He()-r.renderingStartTime>wd&&n!==536870912&&(t.flags|=128,a=!0,bl(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=He(),e.sibling=null,o=Bo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||I?Vo(t,o):(n=o,xe(No,t),xe(Bo,n),Po===null&&(Po=t)),I&&ea(t,r.treeForkCount),e}return xl(t),null;case 22:case 23:return zo(t),Mo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(xl(t),t.subtreeFlags&6&&(t.flags|=8192)):xl(t),n=t.updateQueue,n!==null&&yl(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&&be(qa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),xa(Na),xl(t),null;case 25:return null;case 30:return t.flags|=33554432,xl(t),null}throw Error(i(156,t.tag))}function Cl(e,t){switch(ra(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xa(Na),De(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ke(t),null;case 31:if(t.memoizedState!==null){if(zo(t),t.alternate===null)throw Error(i(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(zo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ho(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 De(),null;case 10:return xa(t.type),null;case 22:case 23:return zo(t),Mo(),e!==null&&be(qa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xa(Na),null;case 25:return null;default:return null}}function wl(e,t){switch(ra(t),t.tag){case 3:xa(Na),De();break;case 26:case 27:case 5:ke(t);break;case 4:De();break;case 31:t.memoizedState!==null&&zo(t);break;case 13:zo(t);break;case 19:Ho(t);break;case 10:xa(t.type);break;case 22:case 23:zo(t),Mo(),e!==null&&be(qa);break;case 24:xa(Na)}}function Tl(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){Cf(t,t.return,e)}}function El(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){Cf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Cf(t,t.return,e)}}function Dl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Do(t,n)}catch(t){Cf(e,e.return,t)}}}function Ol(e,t,n){n.props=Ec(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Cf(e,t,n)}}function kl(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=yi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Wp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Gp(e);f(e.child,!1,cm,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){Cf(e,t,n)}}function Al(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Cf(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){Cf(e,t,n)}else n.current=null}}function jl(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++)um(e.stateNode,t[n])}function Ml(e){for(var t=e.return;t!==null&&(Fl(t)&&um(e.stateNode,t.stateNode),!Pl(t));)t=t.return}function Nl(e){for(var t=e.return;t!==null&&(Fl(t)&&dm(e.stateNode,t.stateNode),!Pl(t));)t=t.return}function Pl(e){return e.tag===5||e.tag===3||e.tag===27}function Fl(e){return e&&e.tag===7&&e.stateNode!==null}function Il(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){Cf(e,e.return,t)}}function Ll(e,t,n){try{var r=e.stateNode;mp(r,e.type,n,t),r[wt]=t}catch(t){Cf(e,e.return,t)}}function Rl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Mp(e.type)||e.tag===4}function zl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Rl(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&&Mp(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 Bl(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=bn)),jl(e,r),qt=!0;else if(i!==4&&(i===27&&(jl(e,r),r=null,Mp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Bl(e,t,n,r),e=e.sibling;e!==null;)Bl(e,t,n,r),e=e.sibling}function Vl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),jl(e,r),qt=!0;else if(i!==4&&(i===27&&(jl(e,r),r=null,Mp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Vl(e,t,n,r),e=e.sibling;e!==null;)Vl(e,t,n,r),e=e.sibling}function Hl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);fp(t,r,n),t[Ct]=e,t[wt]=n}catch(t){Cf(e,e.return,t)}}var Ul=!1,Wl=null;function Gl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Ul=!0)}var Kl=null;function ql(){var e=Kl;return Kl=null,e}var Jl=0;function Yl(e,t,n,r,i){return Jl=0,Xl(e.child,t,n,r,i)}function Xl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Rp(o);r.push(s),s.view&&(a=!0)}else a||Rp(o).view&&(a=!0);Ul=!0,Fp(o,Jl===0?t:t+`_`+Jl,n),Jl++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Xl(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Zl(e,t){for(;e!==null;)e.tag===5?Ip(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Zl(e.child,t)),e=e.sibling}function Ql(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Ql(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=xi(t.default,t.share),t!==`none`&&(Yl(e,n,t,null,!1)||Zl(e.child,!1))}e=e.sibling}}function $l(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=yi(r,n),a=xi(r.default,n.paired?r.share:r.enter);a===`none`?Ql(e):Yl(e,i,a,null,!1)?(Ql(e),n.paired||t||Ud(e,r.onEnter)):Zl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)$l(e,t),e=e.sibling;else Ql(e)}function eu(e){if(Wl!==null&&Wl.size!==0){var t=Wl;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=xi(n.default,n.share);if(a!==`none`&&(Yl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Ud(e,n.onShare)):Zl(e.child,!1)),t.delete(r),t.size===0)break}}}eu(e)}e=e.sibling}}}function tu(e){if(e.tag===30){var t=e.memoizedProps,n=yi(t,e.stateNode),r=Wl===null?void 0:Wl.get(n),i=xi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Yl(e,n,i,null,!1)?r===void 0?Ud(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Wl.delete(n),Ud(e,t.onShare)):Zl(e.child,!1)),Wl!==null&&eu(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)tu(e),e=e.sibling;else Wl!==null&&eu(e)}function nu(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=yi(t,e.stateNode);t=xi(t.default,t.update),e.flags&=-5,t!==`none`&&Yl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&nu(e);e=e.sibling}}function ru(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,Zl(e.child,!1))}ru(e)}e=e.sibling}}function iu(e){if(e.tag===30)e.stateNode.paired=null,Zl(e.child,!1),ru(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)iu(e),e=e.sibling;else ru(e)}function au(e){for(e=e.child;e!==null;)e.tag===30?Zl(e.child,!1):e.subtreeFlags&33554432&&au(e),e=e.sibling}function ou(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Jl<a.length){var l=a[Jl],u=Rp(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&&Fp(c,Jl===0?n:n+`_`+Jl,i),s&&e.flags&4||(Kl===null&&(Kl=[]),Kl.push(c,Jl===0?r:r+`_`+Jl,t.memoizedProps)),Jl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:ou(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function su(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=yi(n,r),a=xi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(zp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Jl=0,i=ou(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Ud(e,n.onUpdate))}else e.subtreeFlags&33554432&&su(e,t);e=e.sibling}}var cu=!1,lu=!1,uu=!1,du=!1,fu=typeof WeakSet==`function`?WeakSet:Set,pu=null,mu=!1,hu=!1,gu=!1,_u=!1;function vu(e,t,n){if(e=e.containerInfo,_p=Eh,e=Yr(e),Xr(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(vp={focusedElem:e,selectionRange:r},Eh=!1,n=(n&335544064)===n,pu=t,t=n?9270:1024;pu!==null;){if(e=pu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&tu(r[a]);if(e.alternate===null&&e.flags&2)n&&Gl(e),yu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&tu(r),yu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Gl(e),yu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,pu=r):(n&&nu(e),yu(n))}}Wl=null}function yu(e){for(;pu!==null;){var t=pu,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=Ec(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){Cf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)fm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:fm(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=yi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=xi(a.default,a.update),a!==`none`&&Yl(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,pu=r;break}pu=t.return}}function bu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Bu(e,n),r&4&&Tl(5,n);break;case 1:if(Bu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Cf(n,n.return,e)}else{var i=Ec(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Cf(n,n.return,e)}}}r&64&&Dl(n),r&512&&kl(n,n.return);break;case 3:if(Bu(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{Do(e,t)}catch(e){Cf(n,n.return,e)}}break;case 27:t===null&&r&4&&Hl(n);case 26:case 5:Bu(e,n),t===null&&r&4&&Il(n),r&512&&kl(n,n.return);break;case 12:Bu(e,n);break;case 31:Bu(e,n),r&4&&ku(e,n);break;case 13:Bu(e,n),r&4&&Au(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=H.bind(null,n),vm(e,n))));break;case 22:if(r=n.memoizedState!==null||cu,!r){var a=t!==null&&t.memoizedState!==null||lu;t=cu,i=lu,cu=r,(lu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Hu(e,n,r)):Bu(e,n),cu=t,lu=i}break;case 30:Bu(e,n),r&512&&kl(n,n.return);break;case 7:r&512&&kl(n,n.return);default:Bu(e,n)}}function xu(e,t){for(e=e.child;e!==null;)Su(e,t),e=e.sibling}function Su(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){Cf(e,e.return,t)}Cu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,qt=!0}catch(t){Cf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Pp(s,!0):Pp(e.stateNode,!1)}catch(t){Cf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&xu(e,t);break;default:xu(e,t)}}function Cu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:Su(n,r);break a;case 22:n.memoizedState===null&&Cu(n,r);break a;default:Cu(n,r)}}e=e.sibling}}function wu(e){var t=e.alternate;t!==null&&(e.alternate=null,wu(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 Tu=null,Eu=!1;function Du(e,t,n){for(n=n.child;n!==null;)Ou(e,t,n),n=n.sibling}function Ou(e,t,n){if(Qe&&typeof Qe.onCommitFiberUnmount==`function`)try{Qe.onCommitFiberUnmount(Ze,n)}catch{}switch(n.tag){case 26:lu||Al(n,t),Du(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!lu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:lu||Al(n,t),Nl(n);var r=Tu,i=Eu;Mp(n.type)&&(Tu=n.stateNode,Eu=!1),Du(e,t,n),Em(n.stateNode,n.type,n.memoizedProps),Tu=r,Eu=i;break;case 5:lu||Al(n,t),Nl(n);case 6:if(n.tag===6&&Nl(n),r=Tu,i=Eu,Tu=null,Du(e,t,n),Tu=r,Eu=i,Tu!==null){if(Eu)try{(Tu.nodeType===9?Tu.body:Tu.nodeName===`HTML`?Tu.ownerDocument.body:Tu).removeChild(n.stateNode),qt=!0}catch(e){Cf(n,t,e)}else try{Tu.removeChild(n.stateNode),qt=!0}catch(e){Cf(n,t,e)}}break;case 18:Tu!==null&&(Eu?(e=Tu,Np(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Qh(e)):Np(Tu,n.stateNode));break;case 4:r=Tu,i=Eu,Tu=n.stateNode.containerInfo,Eu=!0,Du(e,t,n),Tu=r,Eu=i;break;case 0:case 11:case 14:case 15:El(2,n,t),lu||El(4,n,t),Du(e,t,n);break;case 1:lu||(Al(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Ol(n,t,r)),Du(e,t,n);break;case 21:Du(e,t,n);break;case 22:lu=(r=lu)||n.memoizedState!==null,Du(e,t,n),lu=r;break;case 30:Al(n,t),Du(e,t,n);break;case 7:lu||Al(n,t),Du(e,t,n);break;default:Du(e,t,n)}}function ku(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Qh(e)}catch(e){Cf(t,t.return,e)}}}function Au(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Qh(e)}catch(e){Cf(t,t.return,e)}}function ju(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new fu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new fu),t;default:throw Error(i(435,e.tag))}}function Mu(e,t){var n=ju(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Df.bind(null,e,t);t.then(r,r)}})}function Nu(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(Mp(l.type)){Tu=l.stateNode,Eu=!1;break a}break;case 5:Tu=l.stateNode,Eu=!1;break a;case 3:case 4:Tu=l.stateNode.containerInfo,Eu=!0;break a}l=l.return}if(Tu===null)throw Error(i(160));Ou(s,c,o),Tu=null,Eu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Fu(t,e,n),t=t.sibling}var Pu=null;function Fu(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}Nu(t,e,n),Iu(e),a&4&&(El(3,e,e.return),Tl(3,e),El(5,e,e.return));break;case 1:Nu(t,e,n),Iu(e),a&512&&(lu||r===null||Al(r,r.return)),a&64&&cu&&(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=Pu,Nu(t,e,n),Iu(e),a&512&&(lu||r===null||Al(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(cu)e.stateNode=Sp(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[Ct]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),fp(r,t,n),r[Ct]=e,Lt(r),t=r;break a;case`link`:if(o=th(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),fp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=th(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),fp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[Ct]=e,Lt(r),t=r}e.stateNode=t}}else cu||nh(o,e.type,e.stateNode)}else e.stateNode=Xm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Ll(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||lu||t.parentNode.removeChild(t)):a.count--,n===null?cu||nh(o,e.type,e.stateNode):Xm(o,n,e.memoizedProps))}break;case 27:Nu(t,e,n),Iu(e),a&512&&(lu||r===null||Al(r,r.return)),r!==null&&a&4&&Ll(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=uu,uu=!1,Nu(t,e,n),uu=o,Iu(e),a&512&&(lu||r===null||Al(r,r.return)),e.flags&32){t=e.stateNode;try{fn(t,``),qt=!0}catch(t){Cf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Ll(e,t,r===null?t:r.memoizedProps)),a&1024&&(du=!0);break;case 6:if(Nu(t,e,n),Iu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,qt=!0}catch(t){Cf(e,e.return,t)}}break;case 3:if(qt=!1,eh=null,o=Pu,Pu=Am(t.containerInfo),Nu(t,e,n),Pu=o,Iu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Qh(t.containerInfo)}catch(t){Cf(e,e.return,t)}du&&(du=!1,Lu(e)),qt=!1;break;case 4:a=uu,uu=cu,r=Jt(),o=Pu,Pu=Am(e.stateNode.containerInfo),Nu(t,e,n),Iu(e),Pu=o,qt&&hu&&(gu=!0),qt=r,uu=a;break;case 12:Nu(t,e,n),Iu(e);break;case 31:Nu(t,e,n),Iu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Mu(e,t)));break;case 13:Nu(t,e,n),Iu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Sd=He()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Mu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=cu,l=lu,u=uu;cu=c||o,uu=u||o,lu=l||s,Nu(t,e,n),lu=l,uu=u,cu=c,Iu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||cu||lu||(t=s||lu,n=cu,r=lu,cu=o||cu,lu=t,Vu(e,2),cu=n,lu=r),!o&&uu||xu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Mu(e,n))));break;case 19:Nu(t,e,n),Iu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Mu(e,t)));break;case 30:a&512&&(lu||r===null||Al(r,r.return)),a=Jt(),o=hu,s=(n&335544064)===n,c=e.memoizedProps,hu=s&&xi(c.default,c.update)!==`none`,Nu(t,e,n),Iu(e),s&&r!==null&&qt&&(e.flags|=4),hu=o,qt=a;break;case 21:break;case 7:a&512&&(lu||r===null||Al(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Nu(t,e,n),Iu(e)}}function Iu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Rl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Fl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Pl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Vl(e,zl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(fn(l,``),n.flags&=-33),Vl(e,zl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Bl(e,zl(e),u,s);break;default:throw Error(i(161))}}catch(t){Cf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Lu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Lu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Eh=!0,t.reset(),Eh=!1),e=e.sibling}}function Ru(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)zu(t,e),t=t.sibling;else su(t,!1)}function zu(e,t){var n=e.alternate;if(n===null)$l(e,!1);else switch(e.tag){case 3:if(_u=mu=!1,ql(),Ru(t,e),!mu&&!gu){if(e=Kl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Ip(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`})),_u=!0}Kl=null;break;case 5:Ru(t,e);break;case 4:r=mu,mu=!1,Ru(t,e),mu&&(gu=!0),mu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Ru(t,e):$l(e,!1));break;case 30:r=mu,i=ql(),mu=!1,Ru(t,e),mu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=yi(a,o),o=yi(n.memoizedProps,o);var s=xi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Jl=0,t=ou(e,n,t,o,s,a,!0),Jl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Ud(e,e.memoizedProps.onUpdate),Kl=i):i!==null&&(i.push.apply(i,Kl),Kl=i),mu=e.flags&32?!0:r;break;default:Ru(t,e)}}function Bu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)bu(e,t.alternate,t),t=t.sibling}function Vu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:El(4,n,n.return),Vu(n,r);break;case 1:Al(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Ol(n,n.return,i),Vu(n,r);break;case 27:r&2&&Em(n.stateNode,n.type,n.memoizedProps);case 5:Al(n,n.return),n.tag!==5&&n.tag!==27||Nl(n),Vu(n,r);break;case 6:Nl(n);break;case 26:Al(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||lu||i.parentNode.removeChild(i),Vu(n,r);break;case 22:n.memoizedState===null&&Vu(n,r);break;case 30:Al(n,n.return),Vu(n,r);break;case 7:Al(n,n.return);default:Vu(n,r)}e=e.sibling}}function Hu(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:Hu(i,a,n),Tl(4,a);break;case 1:if(Hu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Cf(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++)Eo(l[i],c)}catch(e){Cf(r,r.return,e)}}s&&o&64&&Dl(a),kl(a,a.return);break;case 27:n&2&&Hl(a);case 5:a.tag!==5&&a.tag!==27||Ml(a),Hu(i,a,n),s&&r===null&&o&4&&Il(a),kl(a,a.return);break;case 6:Ml(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||cu||nh(Am(c.ownerDocument),a.type,c),Hu(i,a,n),s&&r===null&&o&4&&Il(a),kl(a,a.return);break;case 12:Hu(i,a,n);break;case 31:Hu(i,a,n),s&&o&4&&ku(i,a);break;case 13:Hu(i,a,n),s&&o&4&&Au(i,a);break;case 22:a.memoizedState===null&&Hu(i,a,n),kl(a,a.return);break;case 30:Hu(i,a,n),kl(a,a.return);break;case 7:kl(a,a.return);default:Hu(i,a,n)}t=t.sibling}}function Uu(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&&Fa(n))}function Wu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Fa(e))}function Gu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Ku(e,t,n,r),t=t.sibling;else i&&au(t)}function Ku(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&iu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Gu(e,t,n,r),a&2048&&Tl(9,t);break;case 1:Gu(e,t,n,r);break;case 3:Gu(e,t,n,r),i&&_u&&(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&&Fa(a)));break;case 12:if(a&2048){Gu(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){Cf(t,t.return,e)}}else Gu(e,t,n,r);break;case 31:Gu(e,t,n,r);break;case 13:Gu(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&&iu(t),o._visibility&2?Gu(e,t,n,r):(o._visibility|=2,qu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&iu(s),o._visibility&2?Gu(e,t,n,r):Ju(e,t)),a&2048&&Uu(s,t);break;case 24:Gu(e,t,n,r),a&2048&&Wu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Zl(a.child,!0),Zl(t.child,!0))),Gu(e,t,n,r);break;default:Gu(e,t,n,r)}}function qu(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:qu(a,o,s,c,i),Tl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,qu(a,o,s,c,i)):u._visibility&2?qu(a,o,s,c,i):Ju(a,o),i&&l&2048&&Uu(o.alternate,o);break;case 24:qu(a,o,s,c,i),i&&l&2048&&Wu(o.alternate,o);break;default:qu(a,o,s,c,i)}t=t.sibling}}function Ju(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:Ju(n,r),i&2048&&Uu(r.alternate,r);break;case 24:Ju(n,r),i&2048&&Wu(r.alternate,r);break;default:Ju(n,r)}t=t.sibling}}var Yu=8192;function Xu(e,t,n){if(e.subtreeFlags&Yu)for(e=e.child;e!==null;)Zu(e,t,n),e=e.sibling}function Zu(e,t,n){switch(e.tag){case 26:Xu(e,t,n),e.flags&Yu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&sh(n,e)):ch(n,Pu,e.memoizedState,e.memoizedProps));break;case 5:Xu(e,t,n),e.flags&Yu&&(e=e.stateNode,(t&335544128)===t&&sh(n,e));break;case 3:case 4:var r=Pu;Pu=Am(e.stateNode.containerInfo),Xu(e,t,n),Pu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Yu,Yu=16777216,Xu(e,t,n),Yu=r):Xu(e,t,n));break;case 30:if((e.flags&Yu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Wl===null&&(Wl=new Map),Wl.set(r,i)}Xu(e,t,n);break;default:Xu(e,t,n)}}function Qu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function $u(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];pu=r,nd(r,e)}Qu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ed(e),e=e.sibling}function ed(e){switch(e.tag){case 0:case 11:case 15:$u(e),e.flags&2048&&El(9,e,e.return);break;case 3:$u(e);break;case 12:$u(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,td(e)):$u(e);break;default:$u(e)}}function td(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];pu=r,nd(r,e)}Qu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:El(8,t,t.return),td(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,td(t));break;default:td(t)}e=e.sibling}}function nd(e,t){for(;pu!==null;){var n=pu;switch(n.tag){case 0:case 11:case 15:El(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:Fa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,pu=r;else a:for(n=e;pu!==null;){r=pu;var i=r.sibling,a=r.return;if(wu(r),r===n){pu=null;break a}if(i!==null){i.return=a,pu=i;break a}pu=a}}}var rd={getCacheForType:function(e){var t=Da(Na),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Da(Na).controller.signal}},id=typeof WeakMap==`function`?WeakMap:Map,ad=0,od=null,z=null,B=0,sd=0,cd=null,ld=!1,ud=!1,dd=!1,fd=0,pd=0,md=0,hd=0,gd=0,_d=0,vd=0,yd=null,bd=null,xd=!1,Sd=0,Cd=0,wd=1/0,Td=null,Ed=null,Dd=0,Od=null,kd=null,Ad=0,jd=0,Md=null,Nd=null,Pd=null,Fd=null,Id=null,Ld=0,Rd=null;function zd(){return ad&2&&B!==0?B&-B:N.T===null?bt():Uf()}function Vd(){if(_d===0){if(!(B&536870912)||I){var e=F;F<<=1,!(F&3932160)&&(F=262144),_d=e}else _d=536870912}return e=No.current,e!==null&&(e.flags|=32),_d}function Ud(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Wp(yi(e.memoizedProps,n))),Fd===null&&(Fd=[]),Fd.push(t.bind(null,r))}}function Wd(e,t,n){(e===od&&(sd===2||sd===9)||e.cancelPendingCommit!==null)&&(Zd(e,0),Jd(e,B,_d,!1)),pt(e,n),(!(ad&2)||e!==od)&&(e===od&&(!(ad&2)&&(hd|=n),pd===4&&Jd(e,B,_d,!1)),Ff(e))}function Gd(e,t,n){if(ad&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ct(e,t),a=r?of(e,t):rf(e,t,!0),o=r;do{if(a===0){ud&&!r&&Jd(e,t,0,!1);break}if(n=e.current.alternate,o&&!qd(n)){a=rf(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=yd;var l=c.current.memoizedState.isDehydrated;if(l&&(Zd(c,s).flags|=256),s=rf(c,s,!1),s!==2&&s!==6){if(dd&&!l){c.errorRecoveryDisabledLanes|=o,hd|=o,a=4;break a}o=bd,bd=a,o!==null&&(bd===null?bd=o:bd.push.apply(bd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Zd(e,0),Jd(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:Jd(r,t,_d,!ld);break a;case 2:bd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Sd+300-He(),10<a)){if(Jd(r,t,_d,!ld),st(r,0,!0)!==0)break a;Ad=t,r.timeoutHandle=Ep(Kd.bind(null,r,n,bd,Td,xd,t,_d,hd,vd,ld,o,`Throttled`,-0,0),a);break a}Kd(r,n,bd,Td,xd,t,_d,hd,vd,ld,o,null,-0,0)}break}while(1);Ff(e)}function Kd(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:bn},Wl=null,Zu(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=fh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?Sd-He():(a&4194048)===a?Cd-He():0,m=uh(d,m),m!==null)){Ad=a,e.cancelPendingCommit=m(pf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Jd(e,a,o,!l);return}pf(e,t,a,n,r,i,o,s,c,l,u,d)}function qd(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(!Ur(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 Jd(e,t,n,r){t=lt(e,t),t&=~gd,t&=~hd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-et(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ht(e,n,t)}function Yd(){return ad&6?!0:(If(0,!1),!1)}function Xd(){if(z!==null){if(sd===0)var e=z.return;else e=z,ya=va=null,cs(e),so=null,co=0,e=z;for(;e!==null;)wl(e.alternate,e),e=e.return;z=null}}function Zd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Dp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Ad=0,Xd(),od=e,z=n=Ii(e.current,null),B=t,sd=0,cd=null,ld=!1,ud=ct(e,t),dd=!1,vd=_d=gd=hd=md=pd=0,bd=yd=null,xd=!1,fd=lt(e,t),Ei(),n}function Qd(e,t){L=null,N.H=vc,t===Za||t===$a?(t=ao(),sd=3):t===Qa?(t=ao(),sd=4):sd=t===Ic?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,cd=t,z===null&&(pd=1,Ac(e,Wi(t,e.current)))}function $d(){var e=No.current;return e===null?!0:(B&4194048)===B?Po===null:(B&62914560)===B||B&536870912?e===Po:!1}function ef(){var e=N.H;return N.H=vc,e===null?vc:e}function tf(){var e=N.A;return N.A=rd,e}function nf(){pd=4,ld||(B&4194048)!==B&&No.current!==null||(ud=!0),!(md&134217727)&&!(hd&134217727)||od===null||Jd(od,B,_d,!1)}function rf(e,t,n){var r=ad;ad|=2;var i=ef(),a=tf();(od!==e||B!==t)&&(Td=null,Zd(e,t)),t=!1;var o=pd;a:do try{if(sd!==0&&z!==null){var s=z,c=cd;switch(sd){case 8:Xd(),o=6;break a;case 3:case 2:case 9:case 6:No.current===null&&(t=!0);var l=sd;if(sd=0,cd=null,uf(e,s,c,l),n&&ud){o=0;break a}break;default:l=sd,sd=0,cd=null,uf(e,s,c,l)}}af(),o=pd;break}catch(t){Qd(e,t)}while(1);return t&&e.shellSuspendCounter++,ya=va=null,ad=r,N.H=i,N.A=a,z===null&&(od=null,B=0,Ei()),o}function af(){for(;z!==null;)cf(z)}function of(e,t){var n=ad;ad|=2;var r=ef(),a=tf();od!==e||B!==t?(Td=null,wd=He()+500,Zd(e,t)):ud=ct(e,t);a:do try{if(sd!==0&&z!==null){t=z;var o=cd;b:switch(sd){case 1:sd=0,cd=null,uf(e,t,o,1);break;case 2:case 9:if(to(o)){sd=0,cd=null,lf(t);break}t=function(){sd!==2&&sd!==9||od!==e||(sd=7),Ff(e)},o.then(t,t);break a;case 3:sd=7;break a;case 4:sd=5;break a;case 7:to(o)?(sd=0,cd=null,lf(t)):(sd=0,cd=null,uf(e,t,o,7));break;case 5:var s=null;switch(z.tag){case 26:s=z.memoizedState;case 5:case 27:var c=z;if(s?ah(s):c.stateNode.complete){sd=0,cd=null;var l=c.sibling;if(l!==null)z=l;else{var u=c.return;u===null?z=null:(z=u,df(u))}break b}}sd=0,cd=null,uf(e,t,o,5);break;case 6:sd=0,cd=null,uf(e,t,o,6);break;case 8:Xd(),pd=6;break a;default:throw Error(i(462))}}sf();break}catch(t){Qd(e,t)}while(1);return ya=va=null,N.H=r,N.A=a,ad=n,z===null?(od=null,B=0,Ei(),pd):0}function sf(){for(;z!==null&&!Be();)cf(z)}function cf(e){var t=R(e.alternate,e,fd);e.memoizedProps=e.pendingProps,t===null?df(e):z=t}function lf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Xc(n,t,t.pendingProps,t.type,void 0,B);break;case 11:t=Xc(n,t,t.pendingProps,t.type.render,t.ref,B);break;case 5:cs(t);var r=t;r===aa&&(I?(fa(r),r.tag===5&&r.stateNode!=null&&(oa=r.stateNode)):(fa(r),I=!0));default:wl(n,t),t=z=Li(t,fd),t=R(n,t,fd)}e.memoizedProps=e.pendingProps,t===null?df(e):z=t}function uf(e,t,n,r){ya=va=null,cs(t),so=null,co=0;var i=t.return;try{if(Fc(e,i,t,n,B)){pd=1,Ac(e,Wi(n,e.current)),z=null;return}}catch(t){if(i!==null)throw z=i,t;pd=1,Ac(e,Wi(n,e.current)),z=null;return}t.flags&32768?(I||r===1?e=!0:ud||B&536870912?e=!1:(ld=e=!0,(r===2||r===9||r===3||r===6)&&(r=No.current,r!==null&&r.tag===13&&(r.flags|=16384))),ff(t,e)):df(t)}function df(e){var t=e;do{if(t.flags&32768){ff(t,ld);return}e=t.return;var n=Sl(t.alternate,t,fd);if(n!==null){z=n;return}if(t=t.sibling,t!==null){z=t;return}z=t=e}while(t!==null);pd===0&&(pd=5)}function ff(e,t){do{var n=Cl(e.alternate,e);if(n!==null){n.flags&=32767,z=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){z=e;return}z=e=n}while(e!==null);pd=6,z=null}function pf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do bf();while(Dd!==0);if(ad&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===od&&(z=od=null,B=0),kd=t,Od=e,Ad=n,Md=a,Nd=r,V(e,t,n,s,c,l,f)}}function V(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(jd=s,s|=Ti,mt(e,n,s,r,i,a),Fd=null,(n&335544064)===n?(Id=Ra(e),r=10262):(Id=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Of(Ke,function(){return xf(),null})):(e.callbackNode=null,e.callbackPriority=0),Ul=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=N.T,N.T=null,i=P.p,P.p=2,a=ad,ad|=4;try{vu(e,t,n)}finally{ad=a,P.p=i,N.T=r}}Dd=1,Ul?Pd=Hp(o,e.containerInfo,Id,gf,_f,hf,vf,xf,mf,null,null):(gf(),_f(),vf())}function mf(e){if(Dd!==0){var t=Od.onRecoverableError;t(e,{componentStack:null})}}function hf(){Dd===3&&(Dd=0,zu(kd,Od),Dd=4)}function gf(){if(Dd===1){Dd=0;var e=Od,t=kd,n=Ad,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=N.T,N.T=null;var i=P.p;P.p=2;var a=ad;ad|=4;try{hu=gu=!1,Fu(t,e,n),n=vp;var o=Yr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Jr(s.ownerDocument.documentElement,s)){if(c!==null&&Xr(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 _=qr(s,h),v=qr(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}}Eh=!!_p,vp=_p=null}finally{ad=a,P.p=i,N.T=r}}e.current=t,Dd=2}}function _f(){if(Dd===2){Dd=0;var e=Od,t=kd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=ad;ad|=4;try{bu(e,t.alternate,t)}finally{ad=i,P.p=r,N.T=n}}Dd=3}}function vf(){if(Dd===4||Dd===3){Dd=0;var e=Pd;Pd=null,Ve();var t=Od,n=kd,r=Ad,i=Nd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Dd=5:(Dd=0,kd=Od=null,yf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Ed=null),yt(r),n=n.stateNode,Qe&&typeof Qe.onCommitFiberRoot==`function`)try{Qe.onCommitFiberRoot(Ze,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=N.T,a=P.p,P.p=2,N.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{N.T=n,P.p=a}}if(i=Fd,o=Id,Id=null,i!==null&&(Fd=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);Ad&3&&bf(),Ff(t),a=t.pendingLanes,r&261930&&a&42?t===Rd?Ld++:(Ld=0,Rd=t):(Ld=0,Rd=null),If(0,!1)}}function yf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Fa(t)))}function bf(){return Pd!==null&&(Pd.skipTransition(),Pd=null),gf(),_f(),vf(),xf()}function xf(){if(Dd!==5)return!1;var e=Od,t=jd;jd=0;var n=yt(Ad),r=N.T,a=P.p;try{P.p=32>n?32:n,N.T=null,n=Md,Md=null;var o=Od,s=Ad;if(Dd=0,kd=Od=null,Ad=0,ad&6)throw Error(i(331));var c=ad;if(ad|=4,ed(o.current),Ku(o,o.current,s,n),ad=c,If(0,!1),Qe&&typeof Qe.onPostCommitFiberRoot==`function`)try{Qe.onPostCommitFiberRoot(Ze,o)}catch{}return!0}finally{P.p=a,N.T=r,yf(e,t)}}function Sf(e,t,n){t=Wi(n,t),t=Mc(e.stateNode,t,2),e=bo(e,t,2),e!==null&&(pt(e,2),Ff(e))}function Cf(e,t,n){if(e.tag===3)Sf(e,e,n);else for(;t!==null;){if(t.tag===3){Sf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Ed===null||!Ed.has(r))){e=Wi(n,e),n=Nc(2),r=bo(t,n,2),r!==null&&(Pc(n,r,t,e),pt(r,2),Ff(r));break}}t=t.return}}function wf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new id;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)||(dd=!0,i.add(n),e=Tf.bind(null,e,t,n),t.then(e,e))}function Tf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,od===e&&(B&n)===n&&(pd===4||pd===3&&(B&62914560)===B&&300>He()-Sd?ad&2?gd|=n:Zd(e,0):gd|=n,vd===B&&(vd=0)),Ff(e)}function Ef(e,t){t===0&&(t=dt()),e=ki(e,t),e!==null&&(pt(e,t),Ff(e))}function H(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ef(e,n)}function Df(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),Ef(e,n)}function Of(e,t){return Re(e,t)}var kf=null,Af=null,jf=!1,Mf=!1,Nf=!1,Pf=0;function Ff(e){e!==Af&&e.next===null&&(Af===null?kf=Af=e:Af=Af.next=e),Mf=!0,jf||(jf=!0,Hf())}function If(e,t){if(!Nf&&Mf){Nf=!0;do for(var n=!1,r=kf;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-et(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Vf(r,a))}else a=B,a=st(r,r===od?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ct(r,a)||(n=!0,Vf(r,a))}r=r.next}while(n);Nf=!1}}function Lf(){Rf()}function Rf(){Mf=jf=!1;var e=0;Pf!==0&&Tp()&&(e=Pf);for(var t=He(),n=null,r=kf;r!==null;){var i=r.next,a=zf(r,t);a===0?(r.next=null,n===null?kf=i:n.next=i,i===null&&(Af=n)):(n=r,(e!==0||a&3)&&(Mf=!0)),r=i}Dd!==0&&Dd!==5||If(e,!1),Pf!==0&&(Pf=0)}function zf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-et(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ut(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=od,n=B,n=st(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(sd===2||sd===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ze(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ct(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ze(r),yt(n)){case 2:case 8:n=Ge;break;case 32:n=Ke;break;case 268435456:n=Je;break;default:n=Ke}return r=Bf.bind(null,e),n=Re(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ze(r),e.callbackPriority=2,e.callbackNode=null,2}function Bf(e,t){if(Dd!==0&&Dd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(bf()&&e.callbackNode!==n)return null;var r=B;return r=st(e,e===od?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Gd(e,r,t),zf(e,He()),e.callbackNode!=null&&e.callbackNode===n?Bf.bind(null,e):null)}function Vf(e,t){if(bf())return null;Gd(e,t,!0)}function Hf(){Ap(function(){ad&6?Re(We,Lf):Rf()})}function Uf(){if(Pf===0){var e=Va;e===0&&(e=it,it<<=1,!(it&261888)&&(it=256)),Pf=e}return Pf}function Wf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:yn(e)}function Gf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Wf((i[wt]||null).action),o=r.submitter;o&&(t=(t=o[wt]||null)?Wf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Vn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Pf!==0){var e=new FormData(i,o);ic(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),ic(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Kf=0;Kf<gi.length;Kf++){var qf=gi[Kf];_i(qf.toLowerCase(),`on`+(qf[0].toUpperCase()+qf.slice(1)))}_i(ci,`onAnimationEnd`),_i(li,`onAnimationIteration`),_i(ui,`onAnimationStart`),_i(`dblclick`,`onDoubleClick`),_i(`focusin`,`onFocus`),_i(`focusout`,`onBlur`),_i(di,`onTransitionRun`),_i(fi,`onTransitionStart`),_i(pi,`onTransitionCancel`),_i(mi,`onTransitionEnd`),Ht(`onMouseEnter`,[`mouseout`,`mouseover`]),Ht(`onMouseLeave`,[`mouseout`,`mouseover`]),Ht(`onPointerEnter`,[`pointerout`,`pointerover`]),Ht(`onPointerLeave`,[`pointerout`,`pointerover`]),Vt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Vt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Vt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Vt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Vt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Vt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Jf=`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(` `),Yf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Jf));function Xf(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){Si(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){Si(e)}i.currentTarget=null,a=c}}}}function U(e,t){var n=t[Et];n===void 0&&(n=t[Et]=new Set);var r=e+`__bubble`;n.has(r)||(ep(t,e,2,!1),n.add(r))}function Zf(e,t,n){var r=0;t&&(r|=4),ep(n,e,r,t)}var Qf=`_reactListening`+Math.random().toString(36).slice(2);function $f(e){if(!e[Qf]){e[Qf]=!0,zt.forEach(function(t){t!==`selectionchange`&&(Yf.has(t)||Zf(t,!1,e),Zf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Qf]||(t[Qf]=!0,Zf(`selectionchange`,!1,t))}}function ep(e,t,n,r){switch(Nh(t)){case 2:var i=Dh;break;case 8:i=Oh;break;default:i=kh}n=i.bind(null,t,n,e),i=void 0,!An||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 tp(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}Dn(function(){var r=a,i=Sn(n),s=[];a:{var c=hi.get(e);if(c!==void 0){var l=Vn,u=e;switch(e){case`keypress`:if(In(n)===0)break a;case`keydown`:case`keyup`:l=ar;break;case`focusin`:u=`focus`,l=Xn;break;case`focusout`:u=`blur`,l=Xn;break;case`beforeblur`:case`afterblur`:l=Xn;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=Jn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Yn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=cr;break;case ci:case li:case ui:l=Zn;break;case mi:l=lr;break;case`scroll`:case`scrollend`:l=Un;break;case`wheel`:l=ur;break;case`copy`:case`cut`:case`paste`:l=Qn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=or;break;case`submit`:l=sr;break;case`toggle`:case`beforetoggle`:l=dr}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=On(m,p),g!=null&&d.push(np(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!==xn&&(u=n.relatedTarget||n.fromElement)&&(Nt(u)||u[Tt]))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=Jn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=or,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?w(c,l,ip):null,c!==null&&ap(s,u,c,d,!1),l!==null&&f!==null&&ap(s,f,l,d,!0)))}a:{if(c=r?Ft(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=jr;else if(Tr(c)){if(Mr)_=Vr;else{_=zr;var v=Rr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&gn(r.elementType)&&(_=jr):_=Br;if(_&&=_(e,r)){Er(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Ft(r):window,e){case`focusin`:(Tr(v)||v.contentEditable===`true`)&&(Qr=v,$r=r,ei=null);break;case`focusout`:ei=$r=Qr=null;break;case`mousedown`:ti=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ti=!1,ni(s,n,i);break;case`selectionchange`:if(Zr)break;case`keydown`:case`keyup`:ni(s,n,i)}var y;if(pr)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 xr?yr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(gr&&n.locale!==`ko`&&(xr||b!==`onCompositionStart`?b===`onCompositionEnd`&&xr&&(y=Fn()):(Mn=i,Nn=`value`in Mn?Mn.value:Mn.textContent,xr=!0)),v=rp(r,b),0<v.length&&(b=new $n(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=br(n),y!==null&&(b.data=y)))),(y=hr?Sr(e,n):Cr(e,n))&&(b=rp(r,`onBeforeInput`),0<b.length&&(v=new $n(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Gf(s,e,r,n,i)}Xf(s,t)})}function np(e,t,n){return{instance:e,listener:t,currentTarget:n}}function rp(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=On(e,n),i!=null&&r.unshift(np(e,i,a)),i=On(e,t),i!=null&&r.push(np(e,i,a))),e.tag===3)return r;e=e.return}return[]}function ip(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ap(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=On(n,a),l!=null&&o.unshift(np(n,l,c))):i||(l=On(n,a),l!=null&&o.push(np(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var op=/\r\n?/g,sp=/\u0000|\uFFFD/g;function cp(e){return(typeof e==`string`?e:``+e).replace(op,`
17
- `).replace(sp,``)}function lp(e,t){return t=cp(t),cp(e)===t}function up(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||fn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&fn(e,``+r);else return;break;case`className`:Xt(e,`class`,r);break;case`tabIndex`:Xt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Xt(e,n,r);break;case`style`:hn(e,r,o);return;case`data`:if(t!==`object`){Xt(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=yn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&up(e,t,`name`,a.name,a,null),up(e,t,`formEncType`,a.formEncType,a,null),up(e,t,`formMethod`,a.formMethod,a,null),up(e,t,`formTarget`,a.formTarget,a,null)):(up(e,t,`encType`,a.encType,a,null),up(e,t,`method`,a.method,a,null),up(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=yn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=bn);return;case`onScroll`:r!=null&&U(`scroll`,e);return;case`onScrollEnd`:r!=null&&U(`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=yn(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`:U(`beforetoggle`,e),U(`toggle`,e),Yt(e,`popover`,r);break;case`xlinkActuate`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Yt(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=_n.get(n)||n,Yt(e,n,r);else return}qt=!0}function dp(e,t,n,r,a,o){switch(n){case`style`:hn(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`)fn(e,r);else if(typeof r==`number`||typeof r==`bigint`)fn(e,``+r);else return;break;case`onScroll`:r!=null&&U(`scroll`,e);return;case`onScrollEnd`:r!=null&&U(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=bn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Bt.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[wt]||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}qt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Yt(e,n,r)}return}qt=!0}function fp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:U(`error`,e),U(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:up(e,t,o,s,n,null)}}a&&up(e,t,`srcSet`,n.srcSet,n,null),r&&up(e,t,`src`,n.src,n,null);return;case`input`:U(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:up(e,t,r,d,n,null)}}sn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in U(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:up(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&ln(e,!!r,n,!0):ln(e,!!r,t,!1);return;case`textarea`:for(s in U(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:up(e,t,s,c,n,null)}dn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:up(e,t,l,r,n,null)}return;case`dialog`:U(`beforetoggle`,e),U(`toggle`,e),U(`cancel`,e),U(`close`,e);break;case`iframe`:case`object`:U(`load`,e);break;case`video`:case`audio`:for(r=0;r<Jf.length;r++)U(Jf[r],e);break;case`image`:U(`error`,e),U(`load`,e);break;case`details`:U(`toggle`,e);break;case`embed`:case`source`:case`link`:U(`error`,e),U(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:up(e,t,u,r,n,null)}return;default:if(gn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&dp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&up(e,t,c,r,n,null))}var pp={};function mp(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||up(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(qt=!0),o=m;break;case`name`:m!==f&&(qt=!0),a=m;break;case`checked`:m!==f&&(qt=!0),u=m;break;case`defaultChecked`:m!==f&&(qt=!0),d=m;break;case`value`:m!==f&&(qt=!0),s=m;break;case`defaultValue`:m!==f&&(qt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&up(e,t,p,m,r,f)}}on(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||up(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(qt=!0),p=o;break;case`defaultValue`:o!==l&&(qt=!0),c=o;break;case`multiple`:o!==l&&(qt=!0),s=o;default:o!==l&&up(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?ln(e,!!n,n?[]:``,!1):ln(e,!!n,t,!0)):ln(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:up(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(qt=!0),p=a;break;case`defaultValue`:a!==o&&(qt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&up(e,t,s,a,r,o)}un(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:up(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(qt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:up(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&up(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:up(e,t,u,p,r,m)}return;default:if(gn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&dp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||dp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&up(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||up(e,t,f,p,r,m)}function hp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function gp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&hp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&hp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var _p=null,vp=null;function yp(e){return e.nodeType===9?e:e.ownerDocument}function bp(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 xp(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 Sp(e,t,n,r){return n=yp(n).createElement(e),n[Ct]=r,n[wt]=t,fp(n,e,t),Lt(n),n}function Cp(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 wp=null;function Tp(){var e=window.event;return e&&e.type===`popstate`?e!==wp&&(wp=e,!0):(wp=null,!1)}var Ep=typeof setTimeout==`function`?setTimeout:void 0,Dp=typeof clearTimeout==`function`?clearTimeout:void 0,Op=typeof Promise==`function`?Promise:void 0,kp=typeof requestAnimationFrame==`function`?requestAnimationFrame:Ep,Ap=typeof queueMicrotask==`function`?queueMicrotask:Op===void 0?Ep:function(e){return Op.resolve(null).then(e).catch(jp)};function jp(e){setTimeout(function(){throw e})}function Mp(e){return e===`head`}function Np(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),Qh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Dm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Dm(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`&&Dm(e.ownerDocument.body)}n=i}while(n);Qh(t)}function Pp(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 Fp(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 Ip(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 Lp(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 Rp(e){return Lp(e.getBoundingClientRect(),getComputedStyle(e),e)}function zp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Lp(t,n,e)}function Bp(e){return e.documentElement.clientHeight}function Vp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Hp(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`&&(Bp(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+=oh(f),u>lh){s.length=o;break}f=new Promise(Vp.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 Up(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Up.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:T({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Up.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},Up.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Wp(e){return{name:e,group:new Up(`group`,e),imagePair:new Up(`image-pair`,e),old:new Up(`old`,e),new:new Up(`new`,e)}}function Gp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Gp.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(Xp(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=Jp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),f(this._fragmentFiber.child,!1,Kp,e,s,r)}this._eventListeners=a}};function Kp(e,t,n,r){return v(e).addEventListener(t,n,r),!1}Gp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Xp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Jp(i.optionsOrUseCapture),f(this._fragmentFiber.child,!1,qp,e,n,i),r.splice(t,1),a!==null&&a()}};function qp(e,t,n,r){return v(e).removeEventListener(t,n,r),!1}function Jp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Yp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Xp(e,t,n,r){if(e.length===0)return-1;r=Yp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Yp(a.optionsOrUseCapture)===r)return i}return-1}Gp.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,Jp(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,Jp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Gp.prototype.focus=function(e){f(this._fragmentFiber.child,!0,Zp,e,void 0,void 0)};function Zp(e,t){return e.tag!==6&&(e=v(e),Cm(e,t))}Gp.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&&!Zp(t[n],e);n--);};function Qp(e,t){return t.push(e),!1}Gp.prototype.blur=function(){var e=m(this._fragmentFiber);e!==null&&(e=v(e),e=yp(e).activeElement,e!==null&&f(this._fragmentFiber.child,!1,$p,e,void 0,void 0))};function $p(e,t){return e.tag!==6&&(e=v(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Gp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),f(this._fragmentFiber.child,!1,em,e,void 0,void 0)};function em(e,t){return e.tag!==6&&(e=v(e),t.observe(e),!1)}Gp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),f(this._fragmentFiber.child,!1,tm,e,void 0,void 0);for(var n=t=0;n<nm.length;n++){var r=nm[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):nm[t++]=r}nm.length=t}};function tm(e,t){return e.tag!==6&&(e=v(e),t.unobserve(e),!1)}var nm=[],rm=!1;function im(e,t,n){nm.push({fragmentInstance:e,observer:t,instance:n}),rm||(rm=!0,wm(function(){rm=!1;var e=nm;nm=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Gp.prototype.getClientRects=function(){var e=[];return f(this._fragmentFiber.child,!1,am,e,void 0,void 0),e};function am(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}Gp.prototype.getRootNode=function(e){var t=m(this._fragmentFiber);return t===null?this:v(t).getRootNode(e)},Gp.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||om(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function om(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=w(n,a,C),t===null?t=!1:(f(t,!0,x,a,n),a=y,y=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=w(r,a,C),t===null?t=!1:(f(t,!0,S,a,r),a=y,b=y=null,t=a!==null)),t):!1}function sm(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)}Gp.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),sm(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),sm(a,n)):v(a).scrollIntoView(e),r+=n?-1:1}};function cm(e,t){return e=v(e),lm(e,t),!1}function lm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function um(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,Jp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<nm.length;i++){var a=nm[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(nm[r++]=a)}nm.length=r,n.observe(e)}),lm(e,t))}function dm(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,Jp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?im(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function fm(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`:fm(n),Mt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function pm(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=ym(e.nextSibling),e===null)break}return null}function mm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=ym(e.nextSibling),e===null))return null;return e}function hm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=ym(e.nextSibling),e===null))return null;return e}function gm(e){return e.data===`$?`||e.data===`$~`}function _m(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function vm(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 ym(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 bm=null;function xm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return ym(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Sm(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 Cm(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 wm(e){kp(function(){kp(function(t){return e(t)})})}function Tm(e,t,n){switch(t=yp(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 Em(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&up(e,t,r,null,pp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===bn&&(e.onclick=null),Mt(e)}function Dm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Mt(e)}var Om=new Map,km=new Set;function Am(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 jm=P.d;P.d={f:Mm,r:Nm,D:Im,C:Lm,L:Rm,m:zm,X:Vm,S:Bm,M:Hm};function Mm(){var e=jm.f(),t=Yd();return e||t}function Nm(e){var t=Pt(e);t!==null&&t.tag===5&&t.type===`form`?oc(t):jm.r(e)}var Pm=typeof document>`u`?null:document;function Fm(e,t,n){var r=Pm;if(r&&typeof t==`string`&&t){var i=an(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),km.has(i)||(km.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),fp(t,`link`,e),Lt(t),r.head.appendChild(t)))}}function Im(e){jm.D(e),Fm(`dns-prefetch`,e,null)}function Lm(e,t){jm.C(e,t),Fm(`preconnect`,e,t)}function Rm(e,t,n){jm.L(e,t,n);var r=Pm;if(r&&e&&t){var i=`link[rel="preload"][as="`+an(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+an(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+an(n.imageSizes)+`"]`)):i+=`[href="`+an(e)+`"]`;var a=i;switch(t){case`style`:a=Wm(e);break;case`script`:a=Jm(e)}if(!(Om.has(a)||(e=T({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Om.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Gm(a))||t===`script`&&r.querySelector(Ym(a))))){var o=r.createElement(`link`);fp(o,`link`,e),t===`style`&&(o[jt]=!0,o.onload=o.onerror=function(){Rt(o)}),Lt(o),r.head.appendChild(o)}}}function zm(e,t){jm.m(e,t);var n=Pm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+an(r)+`"][href="`+an(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Jm(e)}if(!Om.has(a)&&(e=T({rel:`modulepreload`,href:e},t),Om.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ym(a)))return}r=n.createElement(`link`),fp(r,`link`,e),Lt(r),n.head.appendChild(r)}}}function Bm(e,t,n){jm.S(e,t,n);var r=Pm;if(r&&e){var i=It(r).hoistableStyles,a=Wm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Gm(a)))s.loading=5;else{e=T({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Om.get(a))&&Qm(e,n);var c=o=r.createElement(`link`);Lt(c),fp(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Zm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Vm(e,t){jm.X(e,t);var n=Pm;if(n&&e){var r=It(n).hoistableScripts,i=Jm(e),a=r.get(i);a||(a=n.querySelector(Ym(i)),a||(e=T({src:e,async:!0},t),(t=Om.get(i))&&$m(e,t),a=n.createElement(`script`),Lt(a),fp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Hm(e,t){jm.M(e,t);var n=Pm;if(n&&e){var r=It(n).hoistableScripts,i=Jm(e),a=r.get(i);a||(a=n.querySelector(Ym(i)),a||(e=T({src:e,async:!0,type:`module`},t),(t=Om.get(i))&&$m(e,t),a=n.createElement(`script`),Lt(a),fp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Um(e,t,n,r){var a=(a=we.current)?Am(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=Wm(n.href),t=It(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=Wm(n.href);var o=It(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(Gm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Om.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},Om.set(e,o)),qm(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=Jm(n),t=It(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 Wm(e){return`href="`+an(e)+`"`}function Gm(e){return`link[rel="stylesheet"][`+e+`]`}function Km(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function qm(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=Rt.bind(null,t),fp(t,`link`,n),Lt(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 Jm(e){return`[src="`+an(e)+`"]`}function Ym(e){return`script[async]`+e}function Xm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+an(n.href)+`"]`);if(r)return t.instance=r,Lt(r),r;var a=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Lt(r),fp(r,`style`,a),Zm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Wm(n.href);var o=e.querySelector(Gm(a));if(o)return t.state.loading|=4,t.instance=o,Lt(o),o;r=Km(n),(a=Om.get(a))&&Qm(r,a),o=(e.ownerDocument||e).createElement(`link`),Lt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),fp(o,`link`,r),t.state.loading|=4,Zm(o,n.precedence,e),t.instance=o;case`script`:return o=Jm(n.src),(a=e.querySelector(Ym(o)))?(t.instance=a,Lt(a),a):(r=n,(a=Om.get(o))&&(r=T({},n),$m(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Lt(a),fp(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Zm(r,n.precedence,e));return t.instance}function Zm(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 Qm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function $m(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var eh=null;function th(e,t,n){if(eh===null){var r=new Map,i=eh=new Map;i.set(n,r)}else i=eh,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[Ct]||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 nh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function rh(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 ih(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function ah(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function oh(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function sh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=oh(t),e.suspenseyImages.push(t)),e=ph.bind(e),t.decode().then(e,e))}function ch(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=Wm(r.href),a=t.querySelector(Gm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=fh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Lt(a);return}a=t.ownerDocument||t,r=Km(r),(i=Om.get(i))&&Qm(r,i),a=a.createElement(`link`),Lt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),fp(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=fh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var lh=0;function uh(e,t){return e.stylesheets&&e.count===0&&hh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&hh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&lh===0&&(lh=62500*gp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&hh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>lh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function dh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)hh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function fh(){this.count--,dh(this)}function ph(){this.imgCount--,dh(this)}var mh=null;function hh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,mh=new Map,t.forEach(gh,e),mh=null,fh.call(e))}function gh(e,t){if(!(t.state.loading&4)){var n=mh.get(e);if(n)var r=n.get(null);else{n=new Map,mh.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=fh.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 _h={$$typeof:j,Provider:null,Consumer:null,_currentValue:ge,_currentValue2:ge,_threadCount:0};function vh(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=ft(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ft(0),this.hiddenUpdates=ft(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 yh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new vh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Pi(3,null,null,t),e.current=a,a.stateNode=e,t=Pa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},_o(a),e}function bh(e){return e?(e=Mi,e):Mi}function xh(e,t,n,r,i,a){i=bh(i),r.context===null?r.context=i:r.pendingContext=i,r=yo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=bo(e,r,t),n!==null&&(Wd(n,e,t),xo(n,e,t))}function Sh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ch(e,t){Sh(e,t),(e=e.alternate)&&Sh(e,t)}function wh(e){if(e.tag===13||e.tag===31){var t=ki(e,67108864);t!==null&&Wd(t,e,67108864),Ch(e,67108864)}}function Th(e){if(e.tag===13||e.tag===31){var t=zd();t=vt(t);var n=ki(e,t);n!==null&&Wd(n,e,t),Ch(e,t)}}var Eh=!0;function Dh(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=2,kh(e,t,n,r)}finally{P.p=a,N.T=i}}function Oh(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=8,kh(e,t,n,r)}finally{P.p=a,N.T=i}}function kh(e,t,n,r){if(Eh){var i=Ah(r);if(i===null)tp(e,t,r,jh,n),Hh(e,r);else if(Wh(i,e,t,n,r))r.stopPropagation();else if(Hh(e,r),t&4&&-1<Vh.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=ot(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-et(o);s.entanglements[1]|=c,o&=~c}Ff(a),!(ad&6)&&(wd=He()+500,If(0,!1))}}break;case 31:case 13:s=ki(a,2),s!==null&&Wd(s,a,2),Yd(),Ch(a,2)}if(a=Ah(r),a===null&&tp(e,t,r,jh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else tp(e,t,r,null,n)}}function Ah(e){return e=Sn(e),Mh(e)}var jh=null;function Mh(e){if(jh=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 jh=e,null}function Nh(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(Ue()){case We:return 2;case Ge:return 8;case Ke:case qe:return 32;case Je:return 268435456;default:return 32}default:return 32}}var Ph=!1,Fh=null,Ih=null,Lh=null,Rh=new Map,zh=new Map,Bh=[],Vh=`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 Hh(e,t){switch(e){case`focusin`:case`focusout`:Fh=null;break;case`dragenter`:case`dragleave`:Ih=null;break;case`mouseover`:case`mouseout`:Lh=null;break;case`pointerover`:case`pointerout`:Rh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:zh.delete(t.pointerId)}}function Uh(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&&wh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Wh(e,t,n,r,i){switch(t){case`focusin`:return Fh=Uh(Fh,e,t,n,r,i),!0;case`dragenter`:return Ih=Uh(Ih,e,t,n,r,i),!0;case`mouseover`:return Lh=Uh(Lh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Rh.set(a,Uh(Rh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,zh.set(a,Uh(zh.get(a)||null,e,t,n,r,i)),!0}return!1}function Gh(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,xt(e.priority,function(){Th(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,xt(e.priority,function(){Th(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 Kh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ah(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);xn=r,n.target.dispatchEvent(r),xn=null}else return t=Pt(n),t!==null&&wh(t),e.blockedOn=n,!1;t.shift()}return!0}function qh(e,t,n){Kh(e)&&n.delete(t)}function Jh(){Ph=!1,Fh!==null&&Kh(Fh)&&(Fh=null),Ih!==null&&Kh(Ih)&&(Ih=null),Lh!==null&&Kh(Lh)&&(Lh=null),Rh.forEach(qh),zh.forEach(qh)}function Yh(e,n){e.blockedOn===n&&(e.blockedOn=null,Ph||(Ph=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Jh)))}var Xh=null;function Zh(e){Xh!==e&&(Xh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Xh===e&&(Xh=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(Mh(r||n)===null)continue;break}var a=Pt(n);a!==null&&(e.splice(t,3),t-=3,ic(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Qh(e){function t(t){return Yh(t,e)}Fh!==null&&Yh(Fh,e),Ih!==null&&Yh(Ih,e),Lh!==null&&Yh(Lh,e),Rh.forEach(t),zh.forEach(t);for(var n=0;n<Bh.length;n++){var r=Bh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Bh.length&&(n=Bh[0],n.blockedOn===null);)Gh(n),n.blockedOn===null&&Bh.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[wt]||null;if(typeof a==`function`)o||Zh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[wt]||null)s=o.formAction;else if(Mh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Zh(n)}}}function $h(){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 eg(e){this._internalRoot=e}tg.prototype.render=eg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;xh(n,zd(),e,t,null,null)},tg.prototype.unmount=eg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;xh(e.current,2,null,e,null,null),Yd(),t[Tt]=null}};function tg(e){this._internalRoot=e}tg.prototype.unstable_scheduleHydration=function(e){if(e){var t=bt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Bh.length&&t!==0&&t<Bh[n].priority;n++);Bh.splice(n,0,e),n===0&&Gh(e)}};var ng=n.version;if(ng!==`19.3.0`)throw Error(i(527,ng,`19.3.0`));P.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 rg={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:N,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var ig=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ig.isDisabled&&ig.supportsFiber)try{Ze=ig.inject(rg),Qe=ig}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Dc,s=Oc,c=kc;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=yh(e,1,!1,null,null,n,r,null,o,s,c,$h),e[Tt]=t.current,$f(e),new eg(t)}})),Wd=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=Ud()}))(),Gd={activity:400,thoughts:40,chat:100};function Kd(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 qd=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:Kd(t.activity,e.activity??[],Gd.activity),thoughts:Kd(t.thoughts,e.thoughts??[],Gd.thoughts),chat:Kd(t.chat,e.chat??[],Gd.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 Jd(){return new qd}var Yd=Jd(),Xd={info:3600,success:3e3,warning:5e3,error:6e3},Zd,Qd=[],$d=0,ef=new Set;function tf(){for(let e of[...ef])e()}function nf(e,t,n){let r=t.trim();if(!r||Zd?.message===r||Qd.some(e=>e.message===r))return;let i={id:++$d,kind:e,message:r,duration:n?.duration??Xd[e],...n?.action?{action:n.action}:{}};Zd?Qd=[...Qd,i].slice(-3):Zd=i,tf()}function rf(e){Zd?.id===e&&(Zd=Qd[0],Qd=Qd.slice(1),tf())}var af=Object.assign((e,t)=>nf(`info`,e,t),{success:(e,t)=>nf(`success`,e,t),error:(e,t)=>nf(`error`,e,t),warning:(e,t)=>nf(`warning`,e,t),info:(e,t)=>nf(`info`,e,t)});function of(e){return ef.add(e),()=>{ef.delete(e)}}function sf(){return{item:(0,m.useSyncExternalStore)(of,()=>Zd,()=>void 0),waiting:(0,m.useSyncExternalStore)(of,()=>Qd.length,()=>0)}}var cf=class extends Error{code;status;constructor(e,t,n){super(e),this.name=`ApiError`,this.code=t,this.status=n}},lf={"Content-Type":`application/json`};async function uf(e,t={}){let n=await fetch(`/api/${e}`,{method:`POST`,headers:lf,body:JSON.stringify(t),credentials:`same-origin`}),r=await n.json().catch(()=>void 0);if(!r)throw new cf(`the lobby answered ${n.status}`,`failed`,n.status);if(!r.ok)throw r.code===`unauthorized`&&Yd.onStatus({signedOut:!0}),new cf(r.error,r.code,n.status);return r.result}function df(){return globalThis.location}async function ff(){let e=df(),t=e?new URLSearchParams(e.hash.replace(/^#/,``)).get(`token`):null;if(!t||!(await fetch(`/api/auth.login`,{method:`POST`,headers:lf,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),Yd.onStatus({signedOut:!1}),!0}function pf(e){return e instanceof Error?e.message:`That did not work. Try again.`}async function V(e,t,n={}){try{let r=await uf(e,t),i=r.notice;return i&&af(i,n.undo?{action:{label:`Undo`,onClick:n.undo}}:void 0),r}catch(e){af.error(pf(e));return}}var mf=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function hf(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:mf(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var gf=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},_f=e=>{let t=gf(e);return t.charAt(0).toUpperCase()+t.slice(1)},vf=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),yf={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 bf(e){return e!=null}function xf(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??yf.width,a=e.size??e.height??yf.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?vf(...c):vf(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??yf[`stroke-width`])*Number(e.size??e.width??yf.width)/Number(t.size??t.width??yf.width):t.strokeWidth??yf[`stroke-width`];return[`svg`,{...Object.entries(yf).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&bf(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&bf(t.width)&&{[r(`width`)]:t.width},...`height`in t&&bf(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 Sf(e,t={}){return xf(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Cf=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},wf=(0,m.createContext)({}),Tf=()=>(0,m.useContext)(wf),Ef=(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=``}=Tf()??{},b=!!c||Cf(d),[x,S,C=[]]=Sf(u,{color:e??v,width:n??t??p,height:r??t??p,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:vf(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 H(e,t=[],n=[]){let r=typeof e==`string`?hf(e,t,n):e,i=(0,m.forwardRef)(({className:e,...t},n)=>(0,m.createElement)(Ef,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=_f(r.name)),i}var Df={name:`archive`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]};Df.node;var Of=H(Df),kf={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};kf.node;var Af=H(kf),jf={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};jf.node;var Mf=H(jf),Nf={name:`arrow-right-to-line`,size:24,node:[[`path`,{d:`M17 12H3`,key:`8awo09`}],[`path`,{d:`m11 18 6-6-6-6`,key:`8c2y43`}],[`path`,{d:`M21 5v14`,key:`nzette`}]]};Nf.node;var Pf=H(Nf),Ff={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};Ff.node;var If=H(Ff),Lf={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]};Lf.node;var Rf=H(Lf),zf={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]};zf.node;var Bf=H(zf),Vf={name:`chart-column`,size:24,node:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]],aliases:[`bar-chart-3`]};Vf.node;var Hf=H(Vf),Uf={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};Uf.node;var Wf=H(Uf),Gf={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};Gf.node;var Kf=H(Gf),qf={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};qf.node;var Jf=H(qf),Yf={name:`chevrons-up`,size:24,node:[[`path`,{d:`m17 11-5-5-5 5`,key:`e8nh98`}],[`path`,{d:`m17 18-5-5-5 5`,key:`2avn1x`}]]};Yf.node;var Xf=H(Yf),U={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};U.node;var Zf=H(U),Qf={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`]};Qf.node;var $f=H(Qf),ep={name:`circle-dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};ep.node;var tp=H(ep),np={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]};np.node;var rp=H(np),ip={name:`circle-stop`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]],aliases:[`stop-circle`]};ip.node;var ap=H(ip),op={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};op.node;var sp=H(op),cp={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};cp.node;var lp=H(cp),up={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};up.node;var dp=H(up),fp={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`}]]};fp.node;var pp=H(fp),mp={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};mp.node;var hp=H(mp),gp={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};gp.node;var _p=H(gp),vp={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};vp.node;var yp=H(vp),bp={name:`file-pen`,size:24,node:[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]],aliases:[`file-edit`]};bp.node;var xp=H(bp),Sp={name:`file-plus`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}]]};Sp.node;var Cp=H(Sp),wp={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};wp.node;var Tp=H(wp),Ep={name:`git-branch`,size:24,node:[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]};Ep.node;var Dp=H(Ep),Op={name:`git-pull-request`,size:24,node:[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]};Op.node;var kp=H(Op),Ap={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`}]]};Ap.node;var jp=H(Ap),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 Np=H(Mp),Pp={name:`keyboard`,size:24,node:[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]};Pp.node;var Fp=H(Pp),Ip={name:`layers`,size:24,node:[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]],aliases:[`layers-3`]};Ip.node;var Lp=H(Ip),Rp={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};Rp.node;var zp=H(Rp),Bp={name:`list-plus`,size:24,node:[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`M18 9v6`,key:`1twb98`}],[`path`,{d:`M21 12h-6`,key:`bt1uis`}]]};Bp.node;var Vp=H(Bp),Hp={name:`loader`,size:24,node:[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]};Hp.node;var Up=H(Hp),Wp={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};Wp.node;var Gp=H(Wp),Kp={name:`maximize`,size:24,node:[[`path`,{d:`M8 3H5a2 2 0 0 0-2 2v3`,key:`1dcmit`}],[`path`,{d:`M21 8V5a2 2 0 0 0-2-2h-3`,key:`1e4gt3`}],[`path`,{d:`M3 16v3a2 2 0 0 0 2 2h3`,key:`wsl5sc`}],[`path`,{d:`M16 21h3a2 2 0 0 0 2-2v-3`,key:`18trek`}]]};Kp.node;var qp=H(Kp),Jp={name:`message-circle-question-mark`,size:24,node:[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`message-circle-question`]};Jp.node;var Yp=H(Jp),Xp={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`}]]};Xp.node;var Zp=H(Xp),Qp={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};Qp.node;var $p=H(Qp),em={name:`minimize-2`,size:24,node:[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]};em.node;var tm=H(em),nm={name:`minimize`,size:24,node:[[`path`,{d:`M8 3v3a2 2 0 0 1-2 2H3`,key:`hohbtr`}],[`path`,{d:`M21 8h-3a2 2 0 0 1-2-2V3`,key:`5jw1f3`}],[`path`,{d:`M3 16h3a2 2 0 0 1 2 2v3`,key:`198tvr`}],[`path`,{d:`M16 21v-3a2 2 0 0 1 2-2h3`,key:`ph8mxp`}]]};nm.node;var rm=H(nm),im={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};im.node;var am=H(im),om={name:`monitor`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]};om.node;var sm=H(om),cm={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};cm.node;var lm=H(cm),um={name:`palette`,size:24,node:[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]};um.node;var dm=H(um),fm={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};fm.node;var pm=H(fm),mm={name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]};mm.node;var hm=H(mm),gm={name:`pen-tool`,size:24,node:[[`path`,{d:`M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z`,key:`nt11vn`}],[`path`,{d:`m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18`,key:`15qc1e`}],[`path`,{d:`m2.3 2.3 7.286 7.286`,key:`1wuzzi`}],[`circle`,{cx:`11`,cy:`11`,r:`2`,key:`xmgehs`}]]};gm.node;var _m=H(gm),vm={name:`pencil-line`,size:24,node:[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]};vm.node;var ym=H(vm),bm={name:`pencil-off`,size:24,node:[[`path`,{d:`m10 10-6.157 6.162a2 2 0 0 0-.5.833l-1.322 4.36a.5.5 0 0 0 .622.624l4.358-1.323a2 2 0 0 0 .83-.5L14 13.982`,key:`bjo8r8`}],[`path`,{d:`m12.829 7.172 4.359-4.346a1 1 0 1 1 3.986 3.986l-4.353 4.353`,key:`16h5ne`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};bm.node;var xm=H(bm),Sm={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};Sm.node;var Cm=H(Sm),wm={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};wm.node;var Tm=H(wm),Em={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};Em.node;var Dm=H(Em),Om={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};Om.node;var km=H(Om),Am={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`}]]};Am.node;var jm=H(Am),Mm={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`}]]};Mm.node;var Nm=H(Mm),Pm={name:`route`,size:24,node:[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]};Pm.node;var Fm=H(Pm),Im={name:`save`,size:24,node:[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]};Im.node;var Lm=H(Im),Rm={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Rm.node;var zm=H(Rm),Bm={name:`server`,size:24,node:[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]};Bm.node;var Vm=H(Bm),Hm={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};Hm.node;var Um=H(Hm),Wm={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};Wm.node;var Gm=H(Wm),Km={name:`square-arrow-out-up-right`,size:24,node:[[`path`,{d:`M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6`,key:`y09zxi`}],[`path`,{d:`m21 3-9 9`,key:`mpx6sq`}],[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}]],aliases:[`arrow-up-right-from-square`]};Km.node;var qm=H(Km),Jm={name:`square-terminal`,size:24,node:[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]],aliases:[`terminal-square`]};Jm.node;var Ym=H(Jm),Xm={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};Xm.node;var Zm=H(Xm),Qm={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]};Qm.node;var $m=H(Qm),eh={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};eh.node;var th=H(eh),nh={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`]};nh.node;var rh=H(nh),ih={name:`undo-2`,size:24,node:[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]};ih.node;var ah=H(ih),oh={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`}]]};oh.node;var sh=H(oh),ch={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};ch.node;var lh=H(ch),uh={name:`zap`,size:24,node:[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]};uh.node;var dh=H(uh);function fh(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=fh(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function ph(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=fh(e))&&(r&&(r+=` `),r+=t);return r}var mh=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,hh=ph,gh=(e,t)=>n=>{if(t?.variants==null)return hh(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=mh(t)||mh(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 hh(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)},_h=(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},vh=(e,t)=>({classGroupId:e,validator:t}),yh=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),bh=`-`,xh=[],Sh=`arbitrary..`,Ch=e=>{let t=Eh(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Th(e);let n=e.split(bh);return wh(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?_h(i,t):t:i||xh}return n[e]||xh}}},wh=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=wh(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(bh):e.slice(t).join(bh),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Th=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?Sh+r:void 0})(),Eh=e=>{let{theme:t,classGroups:n}=e;return Dh(n,t)},Dh=(e,t)=>{let n=yh();for(let r in e){let i=e[r];Oh(i,n,r,t)}return n},Oh=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];kh(i,t,n,r)}},kh=(e,t,n,r)=>{if(typeof e==`string`){Ah(e,t,n);return}if(typeof e==`function`){jh(e,t,n,r);return}Mh(e,t,n,r)},Ah=(e,t,n)=>{let r=e===``?t:Nh(t,e);r.classGroupId=n},jh=(e,t,n,r)=>{if(Ph(e)){Oh(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(vh(n,e))},Mh=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Oh(o,Nh(t,a),n,r)}},Nh=(e,t)=>{let n=e,r=t.split(bh),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=yh(),n.nextPart.set(t,i)),n=i}return n},Ph=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Fh=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)}}},Ih=`!`,Lh=`:`,Rh=[],zh=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Bh=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===Lh){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(Ih)?(c=s.slice(0,-1),l=!0):s.startsWith(Ih)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return zh(t,l,c,u)};if(t){let e=t+Lh,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):zh(Rh,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Vh=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}},Hh=e=>({cache:Fh(e.cacheSize),parseClassName:Bh(e),sortModifiers:Vh(e),postfixLookupClassGroupIds:Uh(e),...Ch(e)}),Uh=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},Wh=/\s+/,Gh=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Wh),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?_+Ih:_,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},Kh=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=qh(n))&&(i&&(i+=` `),i+=r);return i},qh=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=qh(e[r]))&&(n&&(n+=` `),n+=t);return n},Jh=(e,...t)=>{let n,r,i,a,o=o=>(n=Hh(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=Gh(e,n);return i(e,a),a};return a=o,(...e)=>a(Kh(...e))},Yh=[],Xh=e=>{let t=t=>t[e]||Yh;return t.isThemeGetter=!0,t.themeKey=e,t},Zh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$h=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,eg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tg=/\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$/,ng=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,rg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ig=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ag=e=>$h.test(e),W=e=>!!e&&!Number.isNaN(Number(e)),og=e=>!!e&&Number.isInteger(Number(e)),sg=e=>e.endsWith(`%`)&&W(e.slice(0,-1)),cg=e=>eg.test(e),lg=()=>!0,ug=e=>tg.test(e)&&!ng.test(e),dg=()=>!1,fg=e=>rg.test(e),pg=e=>ig.test(e),mg=e=>!G(e)&&!K(e),hg=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)),gg=e=>jg(e,Fg,dg),G=e=>Zh.test(e),_g=e=>jg(e,Ig,ug),vg=e=>jg(e,Lg,W),yg=e=>jg(e,zg,lg),bg=e=>jg(e,Rg,dg),xg=e=>jg(e,Ng,dg),Sg=e=>jg(e,Pg,pg),Cg=e=>jg(e,Bg,fg),K=e=>Qh.test(e),wg=e=>Mg(e,Ig),Tg=e=>Mg(e,Rg),Eg=e=>Mg(e,Ng),Dg=e=>Mg(e,Fg),Og=e=>Mg(e,Pg),kg=e=>Mg(e,Bg,!0),Ag=e=>Mg(e,zg,!0),jg=(e,t,n)=>{let r=Zh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Mg=(e,t,n=!1)=>{let r=Qh.exec(e);return r?r[1]?t(r[1]):n:!1},Ng=e=>e===`position`||e===`percentage`,Pg=e=>e===`image`||e===`url`,Fg=e=>e===`length`||e===`size`||e===`bg-size`,Ig=e=>e===`length`,Lg=e=>e===`number`,Rg=e=>e===`family-name`,zg=e=>e===`number`||e===`weight`,Bg=e=>e===`shadow`,Vg=Jh(()=>{let e=Xh(`color`),t=Xh(`font`),n=Xh(`text`),r=Xh(`font-weight`),i=Xh(`tracking`),a=Xh(`leading`),o=Xh(`breakpoint`),s=Xh(`container`),c=Xh(`spacing`),l=Xh(`radius`),u=Xh(`shadow`),d=Xh(`inset-shadow`),f=Xh(`text-shadow`),p=Xh(`drop-shadow`),m=Xh(`blur`),h=Xh(`perspective`),g=Xh(`aspect`),_=Xh(`ease`),v=Xh(`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(),K,G],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[K,G,c],T=()=>[ag,`full`,`auto`,...w()],E=()=>[og,`none`,`subgrid`,K,G],ee=()=>[`auto`,{span:[`full`,og,K,G]},og,K,G],D=()=>[og,`auto`,K,G],O=()=>[`auto`,`min`,`max`,`fr`,K,G],te=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],k=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],A=()=>[`auto`,...w()],j=()=>[ag,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ne=()=>[s,ag,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],re=()=>[ag,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],M=()=>[e,K,G],ie=()=>[...b(),Eg,xg,{position:[K,G]}],ae=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],oe=()=>[`auto`,`cover`,`contain`,Dg,gg,{size:[K,G]}],se=()=>[sg,wg,_g],ce=()=>[``,`none`,`full`,l,K,G],le=()=>[``,W,wg,_g],ue=()=>[`solid`,`dashed`,`dotted`,`double`],de=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],fe=()=>[W,sg,Eg,xg],pe=()=>[``,`none`,m,K,G],me=()=>[`none`,W,K,G],he=()=>[`none`,W,K,G],N=()=>[W,K,G],P=()=>[ag,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[cg],breakpoint:[cg],color:[lg],container:[cg],"drop-shadow":[cg],ease:[`in`,`out`,`in-out`],font:[mg],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[cg],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[cg],shadow:[cg],spacing:[`px`,W],text:[cg],"text-shadow":[cg],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ag,G,K,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,K,G]}],"container-named":[hg],columns:[{columns:[W,`auto`,G,K,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:[og,`auto`,K,G]}],basis:[{basis:[ag,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[W,ag,`auto`,`initial`,`none`,G]}],grow:[{grow:[``,W,K,G]}],shrink:[{shrink:[``,W,K,G]}],order:[{order:[og,`first`,`last`,`none`,K,G]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...te(),`normal`]}],"justify-items":[{"justify-items":[...k(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...k()]}],"align-content":[{content:[`normal`,...te()]}],"align-items":[{items:[...k(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...k(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...k(),`baseline`]}],"place-self":[{"place-self":[`auto`,...k()]}],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:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:j()}],"inline-size":[{inline:[`auto`,...ne()]}],"min-inline-size":[{"min-inline":[`auto`,...ne()]}],"max-inline-size":[{"max-inline":[`none`,...ne()]}],"block-size":[{block:[`auto`,...re()]}],"min-block-size":[{"min-block":[`auto`,...re()]}],"max-block-size":[{"max-block":[`none`,...re()]}],w:[{w:[s,`screen`,...j()]}],"min-w":[{"min-w":[s,`screen`,`none`,...j()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...j()]}],h:[{h:[`screen`,`lh`,...j()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...j()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...j()]}],"font-size":[{text:[`base`,n,wg,_g]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ag,yg]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,sg,G]}],"font-family":[{font:[Tg,bg,t]}],"font-features":[{"font-features":[G]}],"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,K,G]}],"line-clamp":[{"line-clamp":[W,`none`,K,vg]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,K,G]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,K,G]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ue(),`wavy`]}],"text-decoration-thickness":[{decoration:[W,`from-font`,`auto`,K,_g]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[W,`auto`,K,G]}],"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:[og,K,G]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,K,G]}],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`,K,G]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ie()}],"bg-repeat":[{bg:ae()}],"bg-size":[{bg:oe()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},og,K,G],radial:[``,K,G],conic:[``,og,K,G]},Og,Sg]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:le()}],"border-w-x":[{"border-x":le()}],"border-w-y":[{"border-y":le()}],"border-w-s":[{"border-s":le()}],"border-w-e":[{"border-e":le()}],"border-w-bs":[{"border-bs":le()}],"border-w-be":[{"border-be":le()}],"border-w-t":[{"border-t":le()}],"border-w-r":[{"border-r":le()}],"border-w-b":[{"border-b":le()}],"border-w-l":[{"border-l":le()}],"divide-x":[{"divide-x":le()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":le()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ue(),`hidden`,`none`]}],"divide-style":[{divide:[...ue(),`hidden`,`none`]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...ue(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[W,K,G]}],"outline-w":[{outline:[``,W,wg,_g]}],"outline-color":[{outline:M()}],shadow:[{shadow:[``,`inner`,`none`,u,kg,Cg]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":[`none`,d,kg,Cg]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:le()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[W,_g]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":le()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":[`none`,f,kg,Cg]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[W,K,G]}],"mix-blend":[{"mix-blend":[...de(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":de()}],"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":[W]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[K,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"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":[W]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ie()}],"mask-repeat":[{mask:ae()}],"mask-size":[{mask:oe()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,K,G]}],filter:[{filter:[``,`none`,K,G]}],blur:[{blur:pe()}],brightness:[{brightness:[W,K,G]}],contrast:[{contrast:[W,K,G]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,kg,Cg]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:[``,W,K,G]}],"hue-rotate":[{"hue-rotate":[W,K,G]}],invert:[{invert:[``,W,K,G]}],saturate:[{saturate:[W,K,G]}],sepia:[{sepia:[``,W,K,G]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,K,G]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[W,K,G]}],"backdrop-contrast":[{"backdrop-contrast":[W,K,G]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,W,K,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[W,K,G]}],"backdrop-invert":[{"backdrop-invert":[``,W,K,G]}],"backdrop-opacity":[{"backdrop-opacity":[W,K,G]}],"backdrop-saturate":[{"backdrop-saturate":[W,K,G]}],"backdrop-sepia":[{"backdrop-sepia":[``,W,K,G]}],"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`,K,G]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[W,`initial`,K,G]}],ease:[{ease:[`linear`,`initial`,_,K,G]}],delay:[{delay:[W,K,G]}],animate:[{animate:[`none`,v,K,G]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,K,G]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:he()}],"scale-x":[{"scale-x":he()}],"scale-y":[{"scale-y":he()}],"scale-z":[{"scale-z":he()}],"scale-3d":[`scale-3d`],skew:[{skew:N()}],"skew-x":[{"skew-x":N()}],"skew-y":[{"skew-y":N()}],transform:[{transform:[K,G,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:P()}],"translate-x":[{"translate-x":P()}],"translate-y":[{"translate-y":P()}],"translate-z":[{"translate-z":P()}],"translate-none":[`translate-none`],zoom:[{zoom:[og,K,G]}],accent:[{accent:M()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:M()}],"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`,K,G]}],"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":M()}],"scrollbar-track-color":[{"scrollbar-track":M()}],"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`,K,G]}],fill:[{fill:[`none`,...M()]}],"stroke-w":[{stroke:[W,wg,_g,vg]}],stroke:[{stroke:[`none`,...M()]}],"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 q(...e){return Vg(ph(e))}var Hg=Object.defineProperty,Ug=(e,t)=>Hg(e,`name`,{value:t,configurable:!0});function Wg(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Ug(Wg,`setRef`);function Gg(...e){return t=>{let n=!1,r=e.map(e=>{let r=Wg(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():Wg(e[t],null)}}}}Ug(Gg,`composeRefs`);function Kg(...e){return m.useCallback(Gg(...e),e)}Ug(Kg,`useComposedRefs`);var qg=Object.defineProperty,Jg=(e,t)=>qg(e,`name`,{value:t,configurable:!0});function Yg(e){let t=m.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];i_(r)&&typeof c_==`function`&&(r=c_(r._payload)),m.Children.forEach(r,e=>{if(n_(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;i_(n)&&typeof c_==`function`&&(n=c_(n._payload)),a=$g(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?t_(a):void 0,l=Kg(n,c);if(!a){if(r||r===0)throw Error(o?s_(e):o_(e));return r}let u=e_(i,a.props??{});return a.type!==m.Fragment&&(u.ref=n?l:c),m.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}Jg(Yg,`createSlot`);var Xg=Yg(`Slot`),Zg=Symbol.for(`radix.slottable`);function Qg(e){let t=Jg(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Zg,t}Jg(Qg,`createSlottable`);var $g=Jg((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 e_(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}}Jg(e_,`mergeProps`);function t_(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)}Jg(t_,`getElementRef`);function n_(e){return m.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Zg}Jg(n_,`isSlottable`);var r_=Symbol.for(`react.lazy`);function i_(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===r_&&`_payload`in e&&a_(e._payload)}Jg(i_,`isLazyComponent`);function a_(e){return typeof e==`object`&&!!e&&`then`in e}Jg(a_,`isPromiseLike`);var o_=Jg(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),s_=Jg(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),c_=m.use,l_=l(Hd(),1),u_=Object.defineProperty,d_=(e,t)=>u_(e,`name`,{value:t,configurable:!0}),f_=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Yg(`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,R.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function p_(e,t){e&&l_.flushSync(()=>e.dispatchEvent(t))}d_(p_,`dispatchDiscreteCustomEvent`);var m_=Object.defineProperty,h_=(e,t)=>m_(e,`name`,{value:t,configurable:!0}),g_=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`}),__=m.forwardRef(h_(function(e,t){return(0,R.jsx)(f_.span,{...e,ref:t,style:{...g_,...e.style}})},`VisuallyHidden`)),v_=Object.defineProperty,y_=(e,t)=>v_(e,`name`,{value:t,configurable:!0});function b_(e,t){let n=m.createContext(t);n.displayName=e+`Context`;let r=y_(e=>{let{children:t,...r}=e,i=m.useMemo(()=>r,Object.values(r));return(0,R.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 y_(i,`useContext`),[r,i]}y_(b_,`createContext`);function x_(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=y_(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=m.useMemo(()=>o,Object.values(o));return(0,R.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 y_(s,`useContext`),[o,s]}y_(r,`createContext`);let i=y_(()=>{let t=n.map(e=>m.createContext(e));return y_(function(n){let r=n?.[e]||t;return m.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,S_(i,...t)]}y_(x_,`createContextScope`);function S_(...e){let t=e[0];if(e.length===1)return t;let n=y_(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return y_(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}y_(S_,`composeContextScopes`);var C_=Object.defineProperty,w_=(e,t)=>C_(e,`name`,{value:t,configurable:!0}),T_=!!(typeof window<`u`&&window.document&&window.document.createElement);function E_(e,t,{checkForDefaultPrevented:n=!0}={}){return w_(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}w_(E_,`composeEventHandlers`);function D_(e){if(!T_)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}w_(D_,`getOwnerWindow`);function O_(e){if(!T_)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}w_(O_,`getOwnerDocument`);function k_(e,t=!1){let{activeElement:n}=O_(e);if(!n?.nodeName)return null;if(A_(n)&&n.contentDocument)return k_(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=O_(n).getElementById(e);if(t)return t}}return n}w_(k_,`getActiveElement`);function A_(e){return e.tagName===`IFRAME`}w_(A_,`isFrame`);var j_=globalThis?.document?m.useLayoutEffect:()=>{},M_=Object.defineProperty,N_=(e,t)=>M_(e,`name`,{value:t,configurable:!0}),P_=m.useEffectEvent,F_=m.useInsertionEffect;function I_(e){if(typeof P_==`function`)return P_(e);let t=m.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof F_==`function`?F_(()=>{t.current=e}):j_(()=>{t.current=e}),m.useMemo(()=>((...e)=>t.current?.(...e)),[])}N_(I_,`useEffectEvent`);var L_=Object.defineProperty,R_=(e,t)=>L_(e,`name`,{value:t,configurable:!0}),z_=m.useInsertionEffect||j_;function B_({prop:e,defaultProp:t,onChange:n=R_(()=>{},`onChange`),caller:r}){let[i,a,o]=V_({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,m.useCallback(t=>{if(s){let n=H_(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}R_(B_,`useControllableState`);function V_({defaultProp:e,onChange:t}){let[n,r]=m.useState(e),i=m.useRef(n),a=m.useRef(t);return z_(()=>{a.current=t},[t]),m.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}R_(V_,`useUncontrolledState`);function H_(e){return typeof e==`function`}R_(H_,`isFunction`);var U_=Symbol(`RADIX:SYNC_STATE`);function W_(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=I_(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=m.useReducer((t,n)=>{if(n.type===U_)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:U_,state:i})},[i,d.state,c]),[g,f]}R_(W_,`useControllableStateReducer`);var G_=Object.defineProperty,K_=(e,t)=>G_(e,`name`,{value:t,configurable:!0});function q_(e,t){return m.useReducer((e,n)=>t[e][n]??e,e)}K_(q_,`useStateMachine`);var J_=K_(e=>{let{present:t,children:n}=e,r=Y_(t),i=typeof n==`function`?n({present:r.isPresent}):m.Children.only(n),a=Z_(r.ref,$_(i));return typeof n==`function`||r.isPresent?m.cloneElement(i,{ref:a}):null},`Presence`);function Y_(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]=q_(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??Q_(r.current),o.current=void 0):a.current=`none`},[s]),j_(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=Q_(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]),j_(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=K_(a=>{let o=Q_(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=K_(e=>{e.target===t&&(a.current=Q_(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=Q_(t)}else r.current=null;n(e)},[])}}K_(Y_,`usePresence`);function X_(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}K_(X_,`setRef`);function Z_(...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=X_(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():X_(n[e],null)}}},[])}K_(Z_,`useStableComposedRefs`);function Q_(e){return e?.animationName||`none`}K_(Q_,`getAnimationName`);function $_(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)}K_($_,`getElementRef`);var ev=Object.defineProperty,tv=(e,t)=>ev(e,`name`,{value:t,configurable:!0}),nv=m.useId||(()=>void 0),rv=0;function iv(e){let[t,n]=m.useState(nv());return j_(()=>{e||n(e=>e??String(rv++))},[e]),e||(t?`radix-${t}`:``)}tv(iv,`useId`);var av=Object.defineProperty,ov=(e,t)=>av(e,`name`,{value:t,configurable:!0});function sv(e){let t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>((...e)=>t.current?.(...e)),[])}ov(sv,`useCallbackRef`);var cv=Object.defineProperty,lv=(e,t)=>cv(e,`name`,{value:t,configurable:!0}),uv=`dismissableLayer.update`,dv=`dismissableLayer.pointerDownOutside`,fv=`dismissableLayer.focusOutside`,pv,mv=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),hv=m.forwardRef(lv(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(mv),[d,f]=m.useState(null),p=d?.ownerDocument??globalThis?.document,[,h]=m.useState({}),g=Kg(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=vv(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=yv(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,ee=sv(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return m.useEffect(()=>{if(E)return p.addEventListener(`keydown`,ee,{capture:!0}),()=>p.removeEventListener(`keydown`,ee,{capture:!0})},[p,E,ee]),m.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(pv=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),bv(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=pv))}},[d,p,n,u]),m.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),bv())},[d,u]),m.useEffect(()=>{let e=lv(()=>h({}),`handleUpdate`);return document.addEventListener(uv,e),()=>document.removeEventListener(uv,e)},[]),(0,R.jsx)(f_.div,{...l,ref:g,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:E_(e.onFocusCapture,T.onFocusCapture),onBlurCapture:E_(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:E_(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function gv(){let e=m.useContext(mv),[t,n]=m.useState(null);return m.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}lv(gv,`useDismissableLayerSurface`);var _v=lv(()=>!0,`IS_TRUE`);function vv(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=_v}=t,s=sv(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()}lv(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}lv(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)}lv(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}lv(p,`handleInteractionBubble`);let m=lv(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||xv(dv,s,p,{discrete:!0})};if(lv(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:lv(()=>c.current=!0,`onPointerDownCapture`)}}lv(vv,`usePointerDownOutside`);function yv(e,t=globalThis?.document){let n=sv(e),r=m.useRef(!1);return m.useEffect(()=>{let e=lv(e=>{e.target&&!r.current&&xv(fv,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:lv(()=>r.current=!0,`onFocusCapture`),onBlurCapture:lv(()=>r.current=!1,`onBlurCapture`)}}lv(yv,`useFocusOutside`);function bv(){let e=new CustomEvent(uv);document.dispatchEvent(e)}lv(bv,`dispatchUpdate`);function xv(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?p_(i,a):i.dispatchEvent(a)}lv(xv,`handleAndDispatchCustomEvent`);var Sv=Object.defineProperty,Cv=(e,t)=>Sv(e,`name`,{value:t,configurable:!0}),wv=`focusScope.autoFocusOnMount`,Tv=`focusScope.autoFocusOnUnmount`,Ev={bubbles:!1,cancelable:!0},Dv=m.forwardRef(Cv(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=m.useState(null),l=sv(i),u=sv(a),d=m.useRef(null),f=Kg(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:Pv(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Pv(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Pv(s)};Cv(e,`handleFocusIn`),Cv(t,`handleFocusOut`),Cv(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){Fv.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(wv,Ev);s.addEventListener(wv,l),s.dispatchEvent(t),t.defaultPrevented||(Ov(Rv(Av(s)),{select:!0}),document.activeElement===e&&Pv(s))}return()=>{s.removeEventListener(wv,l),setTimeout(()=>{let t=new CustomEvent(Tv,Ev);s.addEventListener(Tv,u),s.dispatchEvent(t),t.defaultPrevented||Pv(e??document.body,{select:!0}),s.removeEventListener(Tv,u),Fv.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]=kv(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Pv(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Pv(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,R.jsx)(f_.div,{tabIndex:-1,...o,ref:f,onKeyDown:h})},`FocusScope`));function Ov(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Pv(r,{select:t}),document.activeElement!==n)return}Cv(Ov,`focusFirst`);function kv(e){let t=Av(e);return[jv(t,e),jv(t.reverse(),e)]}Cv(kv,`getTabbableEdges`);function Av(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Cv(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}Cv(Av,`getTabbableCandidates`);function jv(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Mv(r,{upTo:t})))return r}Cv(jv,`findVisible`);function Mv(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}Cv(Mv,`isHidden`);function Nv(e){return e instanceof HTMLInputElement&&`select`in e}Cv(Nv,`isSelectableInput`);function Pv(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Nv(e)&&t&&e.select()}}Cv(Pv,`focus`);var Fv=Iv();function Iv(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Lv(e,t),e.unshift(t)},remove(t){e=Lv(e,t),e[0]?.resume()}}}Cv(Iv,`createFocusScopesStack`);function Lv(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Cv(Lv,`arrayRemove`);function Rv(e){return e.filter(e=>e.tagName!==`A`)}Cv(Rv,`removeLinks`);var zv=Object.defineProperty,Bv=m.forwardRef(((e,t)=>zv(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=m.useState(!1);j_(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?l_.createPortal((0,R.jsx)(f_.div,{...r,ref:t}),o):null},`Portal`)),Vv=Object.defineProperty,Hv=(e,t)=>Vv(e,`name`,{value:t,configurable:!0}),Uv=0,Wv=null;function Gv(e){return Kv(),e.children}Hv(Gv,`FocusGuards`);function Kv(){m.useEffect(()=>{Wv||={start:qv(),end:qv()};let{start:e,end:t}=Wv;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Uv++,()=>{Uv===1&&(Wv?.start.remove(),Wv?.end.remove(),Wv=null),Uv=Math.max(0,Uv-1)}},[])}Hv(Kv,`useFocusGuards`);function qv(){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}Hv(qv,`createFocusGuard`);var Jv=function(){return Jv=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},Jv.apply(this,arguments)};function Yv(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 Xv(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 Zv=`right-scroll-bar-position`,Qv=`width-before-scroll-bar`,$v=`with-scroll-bars-hidden`,ey=`--removed-body-scroll-bar-size`;function ty(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function ny(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 ry=typeof window<`u`?m.useLayoutEffect:m.useEffect,iy=new WeakMap;function ay(e,t){var n=ny(t||null,function(t){return e.forEach(function(e){return ty(e,t)})});return ry(function(){var t=iy.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||ty(e,null)}),i.forEach(function(e){r.has(e)||ty(e,a)})}iy.set(n,e)},[e]),n}function oy(e){return e}function sy(e,t){t===void 0&&(t=oy);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 cy(e){e===void 0&&(e={});var t=sy(null);return t.options=Jv({async:!0,ssr:!1},e),t}var ly=function(e){var t=e.sideCar,n=Yv(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,Jv({},n))};ly.isSideCarExport=!0;function uy(e,t){return e.useMedium(t),ly}var dy=cy(),fy=function(){},py=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:fy,onWheelCapture:fy,onTouchMoveCapture:fy}),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=Yv(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=ay([n,t]),w=Jv(Jv({},x),i);return m.createElement(m.Fragment,null,u&&m.createElement(S,{sideCar:dy,removeScrollBar:l,shards:d,noRelative:p,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?m.cloneElement(m.Children.only(s),Jv(Jv({},w),{ref:C})):m.createElement(y,Jv({},w,{className:c,ref:C}),s))});py.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},py.classNames={fullWidth:Qv,zeroRight:Zv};var my=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function hy(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=my();return t&&e.setAttribute(`nonce`,t),e}function gy(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _y(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var vy=function(){var e=0,t=null;return{add:function(n){e==0&&(t=hy())&&(gy(t,n),_y(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},yy=function(){var e=vy();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},by=function(){var e=yy();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},xy={left:0,top:0,right:0,gap:0},Sy=function(e){return parseInt(e||``,10)||0},Cy=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[Sy(n),Sy(r),Sy(i)]},wy=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return xy;var t=Cy(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])}},Ty=by(),Ey=`data-scroll-locked`,Dy=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
18
- .${$v} {
19
- overflow: hidden ${r};
20
- padding-right: ${s}px ${r};
21
- }
22
- body[${Ey}] {
23
- overflow: hidden ${r};
24
- overscroll-behavior: contain;
25
- ${[t&&`position: relative ${r};`,n===`margin`&&`
26
- padding-left: ${i}px;
27
- padding-top: ${a}px;
28
- padding-right: ${o}px;
29
- margin-left:0;
30
- margin-top:0;
31
- margin-right: ${s}px ${r};
32
- `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
33
- }
34
-
35
- .${Zv} {
36
- right: ${s}px ${r};
37
- }
38
-
39
- .${Qv} {
40
- margin-right: ${s}px ${r};
41
- }
42
-
43
- .${Zv} .${Zv} {
44
- right: 0 ${r};
45
- }
46
-
47
- .${Qv} .${Qv} {
48
- margin-right: 0 ${r};
49
- }
50
-
51
- body[${Ey}] {
52
- ${ey}: ${s}px;
53
- }
54
- `},Oy=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},ky=function(){m.useEffect(function(){return document.body.setAttribute(Ey,(Oy()+1).toString()),function(){var e=Oy()-1;e<=0?document.body.removeAttribute(Ey):document.body.setAttribute(Ey,e.toString())}},[])},Ay=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;ky();var a=m.useMemo(function(){return wy(i)},[i]);return m.createElement(Ty,{styles:Dy(a,!t,i,n?``:`!important`)})},jy=!1;if(typeof window<`u`)try{var My=Object.defineProperty({},"passive",{get:function(){return jy=!0,!0}});window.addEventListener(`test`,My,My),window.removeEventListener(`test`,My,My)}catch{jy=!1}var Ny=jy?{passive:!1}:!1,Py=function(e){return e.tagName===`TEXTAREA`},Fy=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Py(e)&&n[t]===`visible`)},Iy=function(e){return Fy(e,`overflowY`)},Ly=function(e){return Fy(e,`overflowX`)},Ry=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Vy(e,r)){var i=Hy(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},zy=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},By=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Vy=function(e,t){return e===`v`?Iy(t):Ly(t)},Hy=function(e,t){return e===`v`?zy(t):By(t)},Uy=function(e,t){return e===`h`&&t===`rtl`?-1:1},Wy=function(e,t,n,r,i){var a=Uy(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=Hy(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Vy(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},Gy=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ky=function(e){return[e.deltaX,e.deltaY]},qy=function(e){return e&&`current`in e?e.current:e},Jy=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Yy=function(e){return`
55
- .block-interactivity-${e} {pointer-events: none;}
56
- .allow-interactivity-${e} {pointer-events: all;}
57
- `},Xy=0,Zy=[];function Qy(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),i=m.useState(Xy++)[0],a=m.useState(by)[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=Xv([e.lockRef.current],(e.shards||[]).map(qy),!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=Gy(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=Ry(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Ry(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 Wy(h,t,e,h===`h`?s:c,!0)},[]),c=m.useCallback(function(e){var n=e;if(Zy.length&&Zy[Zy.length-1]===a){var r=`deltaY`in n?Ky(n):Gy(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Jy(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(qy).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:$y(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=Gy(e),r.current=void 0},[]),d=m.useCallback(function(t){l(t.type,Ky(t),t.target,s(t,e.lockRef.current))},[]),f=m.useCallback(function(t){l(t.type,Gy(t),t.target,s(t,e.lockRef.current))},[]);m.useEffect(function(){return Zy.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Ny),document.addEventListener(`touchmove`,c,Ny),document.addEventListener(`touchstart`,u,Ny),function(){Zy=Zy.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Ny),document.removeEventListener(`touchmove`,c,Ny),document.removeEventListener(`touchstart`,u,Ny)}},[]);var p=e.removeScrollBar,h=e.inert;return m.createElement(m.Fragment,null,h?m.createElement(a,{styles:Yy(i)}):null,p?m.createElement(Ay,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function $y(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var eb=uy(dy,Qy),tb=m.forwardRef(function(e,t){return m.createElement(py,Jv({},e,{ref:t,sideCar:eb}))});tb.classNames=py.classNames;var nb=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},rb=new WeakMap,ib=new WeakMap,ab={},ob=0,sb=function(e){return e&&(e.host||sb(e.parentNode))},cb=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=sb(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})},lb=function(e,t,n,r){var i=cb(t,Array.isArray(e)?e:[e]);ab[n]||(ab[n]=new WeakMap);var a=ab[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=(rb.get(e)||0)+1,l=(a.get(e)||0)+1;rb.set(e,c),a.set(e,l),o.push(e),c===1&&i&&ib.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(),ob++,function(){o.forEach(function(e){var t=rb.get(e)-1,i=a.get(e)-1;rb.set(e,t),a.set(e,i),t||(ib.has(e)||e.removeAttribute(r),ib.delete(e)),i||e.removeAttribute(n)}),ob--,ob||(rb=new WeakMap,rb=new WeakMap,ib=new WeakMap,ab={})}},ub=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||nb(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),lb(r,i,n,`aria-hidden`)):function(){return null}},db=Object.defineProperty,fb=(e,t)=>db(e,`name`,{value:t,configurable:!0}),pb=`Dialog`,[mb,hb]=x_(pb),[gb,_b]=mb(pb),vb=fb(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]=B_({prop:r,defaultProp:i??!1,onChange:a,caller:pb}),[d,f]=m.useState(0),[p,h]=m.useState(0);return(0,R.jsx)(gb,{scope:t,triggerRef:s,contentRef:c,contentId:iv(),titleId:iv(),descriptionId:iv(),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`),yb=`DialogTrigger`,bb=m.forwardRef(fb(function(e,t){let{__scopeDialog:n,...r}=e,i=_b(yb,n),a=Kg(t,i.triggerRef);return(0,R.jsx)(f_.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Bb(i.open),...r,ref:a,onClick:E_(e.onClick,i.onOpenToggle)})},`DialogTrigger`)),xb=`DialogPortal`,[Sb,Cb]=mb(xb,{forceMount:void 0}),wb=fb(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=_b(xb,t);return(0,R.jsx)(Sb,{scope:t,forceMount:n,children:m.Children.map(r,e=>(0,R.jsx)(J_,{present:n||a.open,children:(0,R.jsx)(Bv,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),Tb=`DialogOverlay`,Eb=m.forwardRef(fb(function(e,t){let n=Cb(Tb,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=_b(Tb,e.__scopeDialog);return a.modal?(0,R.jsx)(J_,{present:r||a.open,children:(0,R.jsx)(Ob,{...i,ref:t})}):null},`DialogOverlay`)),Db=Yg(`DialogOverlay.RemoveScroll`),Ob=m.forwardRef(fb(function(e,t){let{__scopeDialog:n,...r}=e,i=_b(Tb,n),a=Kg(t,gv());return(0,R.jsx)(tb,{as:Db,allowPinchZoom:!0,shards:[i.contentRef],children:(0,R.jsx)(f_.div,{"data-state":Bb(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),kb=`DialogContent`,Ab=m.forwardRef(fb(function(e,t){let n=Cb(kb,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=_b(kb,e.__scopeDialog);return(0,R.jsx)(J_,{present:r||a.open,children:a.modal?(0,R.jsx)(jb,{...i,ref:t}):(0,R.jsx)(Mb,{...i,ref:t})})},`DialogContent`)),jb=m.forwardRef(fb(function(e,t){let n=_b(kb,e.__scopeDialog),r=m.useRef(null),i=Kg(t,n.contentRef,r);return m.useEffect(()=>{let e=r.current;if(e)return ub(e)},[]),(0,R.jsx)(Nb,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:E_(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:E_(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:E_(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),Mb=m.forwardRef(fb(function(e,t){let n=_b(kb,e.__scopeDialog),r=m.useRef(!1),i=m.useRef(!1);return(0,R.jsx)(Nb,{...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`)),Nb=m.forwardRef(fb(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=_b(kb,n);return Kv(),(0,R.jsx)(R.Fragment,{children:(0,R.jsx)(Dv,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,R.jsx)(hv,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":Bb(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),Pb=`DialogTitle`,Fb=m.forwardRef(fb(function(e,t){let{__scopeDialog:n,...r}=e,i=_b(Pb,n),{setTitleCount:a}=i;return j_(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,R.jsx)(f_.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),Ib=`DialogDescription`,Lb=m.forwardRef(fb(function(e,t){let{__scopeDialog:n,...r}=e,i=_b(Ib,n),{setDescriptionCount:a}=i;return j_(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,R.jsx)(f_.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),Rb=`DialogClose`,zb=m.forwardRef(fb(function(e,t){let{__scopeDialog:n,...r}=e,i=_b(Rb,n);return(0,R.jsx)(f_.button,{type:`button`,...r,ref:t,onClick:E_(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function Bb(e){return e?`open`:`closed`}fb(Bb,`getState`);var Vb=Object.defineProperty,Hb=(e,t)=>Vb(e,`name`,{value:t,configurable:!0}),[Ub,Wb]=x_(`AlertDialog`,[hb]),Gb=hb(),Kb=Hb(e=>{let{__scopeAlertDialog:t,...n}=e,r=Gb(t);return(0,R.jsx)(vb,{...r,...n,modal:!0})},`AlertDialog`);m.forwardRef(Hb(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Gb(n);return(0,R.jsx)(bb,{...i,...r,ref:t})},`AlertDialogTrigger`));var qb=Hb(e=>{let{__scopeAlertDialog:t,...n}=e,r=Gb(t);return(0,R.jsx)(wb,{...r,...n})},`AlertDialogPortal`),Jb=m.forwardRef(Hb(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Gb(n);return(0,R.jsx)(Eb,{...i,...r,ref:t})},`AlertDialogOverlay`)),[Yb,Xb]=Ub(`AlertDialogContent`),Zb=m.forwardRef(Hb(function(e,t){let{__scopeAlertDialog:n,children:r,...i}=e,a=Gb(n),o=Kg(t,m.useRef(null)),s=m.useRef(null);return(0,R.jsx)(Yb,{scope:n,cancelRef:s,children:(0,R.jsx)(Ab,{role:`alertdialog`,...a,...i,ref:o,onOpenAutoFocus:E_(i.onOpenAutoFocus,e=>{e.preventDefault(),s.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})},`AlertDialogContent`)),Qb=m.forwardRef(Hb(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Gb(n);return(0,R.jsx)(Fb,{...i,...r,ref:t})},`AlertDialogTitle`)),$b=m.forwardRef(Hb(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Gb(n);return(0,R.jsx)(Lb,{...i,...r,ref:t})},`AlertDialogDescription`)),ex=m.forwardRef(Hb(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Gb(n);return(0,R.jsx)(zb,{...i,...r,ref:t})},`AlertDialogAction`)),tx=`AlertDialogCancel`,nx=m.forwardRef(Hb(function(e,t){let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=Xb(tx,n),a=Gb(n),o=Kg(t,i);return(0,R.jsx)(zb,{...a,...r,ref:o})},`AlertDialogCancel`)),rx=Kb,ix=qb,ax=Jb,ox=Zb,sx=ex,cx=nx,lx=Qb,ux=$b,dx=Object.defineProperty,fx=(e,t)=>dx(e,`name`,{value:t,configurable:!0});function px(e){let[t,n]=m.useState(void 0);return j_(()=>{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}fx(px,`useSize`);var mx=Object.defineProperty,hx=(e,t)=>mx(e,`name`,{value:t,configurable:!0}),gx=`Checkbox`,[_x,vx]=x_(gx),[yx,bx]=_x(gx);function xx(e){let{__scopeCheckbox: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]=B_({prop:n,defaultProp:i??!1,onChange:c,caller:gx}),[h,g]=m.useState(null),[_,v]=m.useState(null),y=m.useRef(!1),[b,x]=m.useReducer(e=>e+1,0),S=!h||!!o||!!h.closest(`form`),C={checked:f,disabled:a,setChecked:p,control:h,setControl:g,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:y,userInteractionCount:b,onUserInteraction:x,required:l,defaultChecked:!Ax(i)&&i,isFormControl:S,bubbleInput:_,setBubbleInput:v};return(0,R.jsx)(yx,{scope:t,...C,children:kx(d)?d(C):r})}hx(xx,`CheckboxProvider`);var Sx=`CheckboxTrigger`,Cx=m.forwardRef(hx(function({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i){let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,onUserInteraction:p,isFormControl:h,bubbleInput:g}=bx(Sx,e),_=Kg(i,u),v=m.useRef(c);return m.useEffect(()=>{let e=a?.form;if(e){let t=hx(()=>d(v.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,R.jsx)(f_.button,{type:`button`,role:`checkbox`,"aria-checked":Ax(c)?`mixed`:c,"aria-required":l,"data-state":jx(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:_,onKeyDown:E_(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:E_(n,e=>{p(),d(e=>Ax(e)?!0:!e),g&&h&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})},`CheckboxTrigger`)),wx=m.forwardRef(hx(function(e,t){let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,R.jsx)(xx,{__scopeCheckbox: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,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Cx,{...d,ref:t,__scopeCheckbox:n}),e&&(0,R.jsx)(Ox,{__scopeCheckbox:n})]})})},`Checkbox`)),Tx=`CheckboxIndicator`,Ex=m.forwardRef(hx(function(e,t){let{__scopeCheckbox:n,forceMount:r,...i}=e,a=bx(Tx,n);return(0,R.jsx)(J_,{present:r||Ax(a.checked)||a.checked===!0,children:(0,R.jsx)(f_.span,{"data-state":jx(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})},`CheckboxIndicator`)),Dx=`CheckboxBubbleInput`,Ox=m.forwardRef(hx(function({__scopeCheckbox: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}=bx(Dx,e),_=Kg(r,g),v=px(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});e.indeterminate=Ax(s),n.call(e,!Ax(s)&&s),e.dispatchEvent(t),y.current=!1}},[h,s,a,o]);let S=m.useRef(!Ax(s)&&s);return(0,R.jsx)(f_.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:E_(t,e=>{y.current&&e.stopPropagation()}),style:{...n.style,...v,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`CheckboxBubbleInput`));function kx(e){return typeof e==`function`}hx(kx,`isFunction`);function Ax(e){return e===`indeterminate`}hx(Ax,`isIndeterminate`);function jx(e){return Ax(e)?`indeterminate`:e?`checked`:`unchecked`}hx(jx,`getState`);var Mx=[`top`,`right`,`bottom`,`left`],Nx=Math.min,Px=Math.max,Fx=Math.round,Ix=Math.floor,Lx=e=>({x:e,y:e}),Rx={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function zx(e,t,n){return Px(e,Nx(t,n))}function Bx(e,t){return typeof e==`function`?e(t):e}function Vx(e){return e.split(`-`)[0]}function Hx(e){return e.split(`-`)[1]}function Ux(e){return e===`x`?`y`:`x`}function Wx(e){return e===`y`?`height`:`width`}function Gx(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Kx(e){return Ux(Gx(e))}function qx(e,t,n){n===void 0&&(n=!1);let r=Hx(e),i=Kx(e),a=Wx(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=nS(o)),[o,nS(o)]}function Jx(e){let t=nS(e);return[Yx(e),t,Yx(t)]}function Yx(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Xx=[`left`,`right`],Zx=[`right`,`left`],Qx=[`top`,`bottom`],$x=[`bottom`,`top`];function eS(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Zx:Xx:t?Xx:Zx;case`left`:case`right`:return t?Qx:$x;default:return[]}}function tS(e,t,n,r){let i=Hx(e),a=eS(Vx(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Yx)))),a}function nS(e){let t=Vx(e);return Rx[t]+e.slice(t.length)}function rS(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function iS(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:rS(e)}function aS(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 oS(e,t,n){let{reference:r,floating:i}=e,a=Gx(t),o=Kx(t),s=Wx(o),c=Vx(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=Hx(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function sS(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}=Bx(t,e),p=iS(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=aS(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=aS(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 cS=50,lS=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:sS},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=oS(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<cS&&(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}=oS(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},uS=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}=Bx(e,t)||{};if(l==null)return{};let d=iS(u),f={x:n,y:r},p=Kx(i),m=Wx(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=Nx(d[_],T),ee=Nx(d[v],T),D=C-h[m]-ee,O=C/2-h[m]/2+w,te=zx(E,O,D),k=!c.arrow&&Hx(i)!=null&&O!==te&&a.reference[m]/2-(O<E?E:ee)-h[m]/2<0,A=k?O<E?O-E:O-D:0;return{[p]:f[p]+A,data:{[p]:te,centerOffset:O-te-A,...k&&{alignmentOffset:A}},reset:k}}}),dS=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}=Bx(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Vx(r),_=Gx(o),v=Vx(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[nS(o)]:Jx(o)),x=p!==`none`;!d&&x&&b.push(...tS(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=qx(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`||_===Gx(t)||T.every(e=>Gx(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=Gx(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 fS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pS(e){return Mx.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}=Bx(e,t);switch(i){case`referenceHidden`:{let e=fS(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:pS(e)}}}case`escaped`:{let e=fS(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:pS(e)}}}default:return{}}}}},hS=new Set([`left`,`top`]);async function gS(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Vx(n),s=Hx(n),c=Gx(n)===`y`,l=hS.has(o)?-1:1,u=a&&c?-1:1,d=Bx(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 _S=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 gS(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}}}}},vS=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}=Bx(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Gx(i),p=Ux(f),m=u[p],h=u[f],g=(e,t)=>zx(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}}}}}},yS=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}=Bx(e,t),u={x:n,y:r},d=Gx(i),f=Ux(d),p=u[f],m=u[d],h=Bx(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=hS.has(Vx(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}}}},bS=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}=Bx(e,t),c=await i.detectOverflow(t,s),l=Vx(n),u=Hx(n),d=Gx(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=Nx(p-c[m],g),y=Nx(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*Px(c.left,c.right):S=p-2*Px(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 xS(){return typeof window<`u`}function SS(e){return TS(e)?(e.nodeName||``).toLowerCase():`#document`}function CS(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wS(e){return((TS(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function TS(e){return xS()?e instanceof Node||e instanceof CS(e).Node:!1}function ES(e){return xS()?e instanceof Element||e instanceof CS(e).Element:!1}function DS(e){return xS()?e instanceof HTMLElement||e instanceof CS(e).HTMLElement:!1}function OS(e){return!xS()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof CS(e).ShadowRoot}function kS(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=BS(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function AS(e){return/^(table|td|th)$/.test(SS(e))}function jS(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var MS=/transform|translate|scale|rotate|perspective|filter/,NS=/paint|layout|strict|content/,PS=e=>!!e&&e!==`none`,FS;function IS(e){let t=ES(e)?BS(e):e;return PS(t.transform)||PS(t.translate)||PS(t.scale)||PS(t.rotate)||PS(t.perspective)||!RS()&&(PS(t.backdropFilter)||PS(t.filter))||MS.test(t.willChange||``)||NS.test(t.contain||``)}function LS(e){let t=HS(e);for(;DS(t)&&!zS(t);){if(IS(t))return t;if(jS(t))return null;t=HS(t)}return null}function RS(){return FS??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),FS}function zS(e){return/^(html|body|#document)$/.test(SS(e))}function BS(e){return CS(e).getComputedStyle(e)}function VS(e){return ES(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function HS(e){if(SS(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||OS(e)&&e.host||wS(e);return OS(t)?t.host:t}function US(e){let t=HS(e);return zS(t)?(e.ownerDocument||e).body:DS(t)&&kS(t)?t:US(t)}function WS(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=US(e),i=r===e.ownerDocument?.body,a=CS(r);if(i){let e=GS(a);return t.concat(a,a.visualViewport||[],kS(r)?r:[],e&&n?WS(e):[])}return t.concat(r,WS(r,[],n))}function GS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function KS(e){let t=BS(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=DS(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Fx(n)!==a||Fx(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function qS(e){return ES(e)?e:e.contextElement}function JS(e){let t=qS(e);if(!DS(t))return Lx(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=KS(t),o=(a?Fx(n.width):n.width)/r,s=(a?Fx(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var YS=Lx(0);function XS(e){let t=CS(e);return!RS()||!t.visualViewport?YS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ZS(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===CS(e)}function QS(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=qS(e),o=Lx(1);t&&(r?ES(r)&&(o=JS(r)):o=JS(e));let s=ZS(a,n,r)?XS(a):Lx(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=CS(a),t=ES(r)?CS(r):r,n=e,i=GS(n);for(;i&&t!==n;){let e=JS(i),t=i.getBoundingClientRect(),r=BS(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=CS(i),i=GS(n)}}return aS({width:u,height:d,x:c,y:l})}function $S(e,t){let n=VS(e).scrollLeft;return t?t.left+n:QS(wS(e)).left+n}function eC(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-$S(e,n),y:n.top+t.scrollTop}}function tC(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=wS(r),s=t?jS(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Lx(1),u=Lx(0),d=DS(r);if((d||!a)&&((SS(r)!==`body`||kS(o))&&(c=VS(r)),d)){let e=QS(r);l=JS(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?eC(o,c):Lx(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 nC(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function rC(e){let t=VS(e),n=e.ownerDocument.body,r=Px(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Px(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+$S(e),o=-t.scrollTop;return BS(n).direction===`rtl`&&(a+=Px(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var iC=25;function aC(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=CS(e),a=wS(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!RS()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if($S(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<=iC&&(s-=o)}return{width:s,height:c,x:l,y:u}}function oC(e,t){let n=QS(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=JS(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function sC(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=aC(e,n,t);else if(t===`document`)r=rC(wS(e));else if(ES(t))r=oC(t,n);else{let n=XS(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return aS(r)}function cC(e,t){let n=t.get(e);if(n)return n;let r=WS(e,[],!1).filter(e=>ES(e)&&SS(e)!==`body`),i=null,a=BS(e).position===`fixed`,o=a?HS(e):e;for(;ES(o)&&!zS(o);){let e=BS(o),t=IS(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=HS(o)}return t.set(e,r),r}function lC(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?jS(t)?[]:cC(t,this._c):[].concat(n),r],o=sC(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=sC(t,a[e],i);s=Px(n.top,s),c=Nx(n.right,c),l=Nx(n.bottom,l),u=Px(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function uC(e){let{width:t,height:n}=KS(e);return{width:t,height:n}}function dC(e,t,n){let r=DS(t),i=wS(t),a=n===`fixed`,o=QS(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Lx(0);if((r||!a)&&((SS(t)!==`body`||kS(i))&&(s=VS(t)),r)){let e=QS(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=$S(i));let l=i&&!r&&!a?eC(i,s):Lx(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 fC(e){return BS(e).position===`static`}function pC(e,t){if(!DS(e)||BS(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return wS(e)===n&&(n=n.ownerDocument.body),n}function mC(e,t){let n=CS(e);if(jS(e))return n;if(!DS(e)){let t=HS(e);for(;t&&!zS(t);){if(ES(t)&&!fC(t))return t;t=HS(t)}return n}let r=pC(e,t);for(;r&&AS(r)&&fC(r);)r=pC(r,t);return r&&zS(r)&&fC(r)&&!IS(r)?n:r||LS(e)||n}var hC=async function(e){let t=this.getOffsetParent||mC,n=this.getDimensions,r=await n(e.floating);return{reference:dC(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gC(e){return BS(e).direction===`rtl`}var _C={convertOffsetParentRelativeRectToViewportRelativeRect:tC,getDocumentElement:wS,getClippingRect:lC,getOffsetParent:mC,getElementRects:hC,getClientRects:nC,getDimensions:uC,getScale:JS,isElement:ES,isRTL:gC};function vC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yC(e,t,n){let r=null,i,a=wS(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=Ix(d),h=Ix(a.clientWidth-(u+f)),g=Ix(a.clientHeight-(d+p)),_=Ix(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Px(0,Nx(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!vC(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=CS(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function bC(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=qS(e),u=i||a?[...l?WS(l):[],...t?WS(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?yC(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?QS(e):null;c&&g();function g(){let t=QS(e);h&&!vC(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 xC=_S,SC=vS,CC=dS,wC=bS,TC=mS,EC=uS,DC=yS,OC=(e,t,n)=>{let r=new Map,i=n??{},a={..._C,...i.platform,_c:r};return lS(e,t,{...i,platform:a})},kC=typeof document<`u`?m.useLayoutEffect:function(){};function AC(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(!AC(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)&&!AC(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function jC(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function MC(e,t){let n=jC(e);return Math.round(t*n)/n}function NC(e){let t=m.useRef(e);return kC(()=>{t.current=e}),t}function PC(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);AC(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),E=c!=null,ee=NC(c),D=NC(i),O=NC(l),te=m.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),OC(C.current,w.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};k.current&&!AC(T.current,t)&&(T.current=t,l_.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);kC(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let k=m.useRef(!1);kC(()=>(k.current=!0,()=>{k.current=!1}),[]),kC(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(ee.current)return ee.current(x,S,te);te()}},[x,S,te,ee,E]);let A=m.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),j=m.useMemo(()=>({reference:x,floating:S}),[x,S]),ne=m.useMemo(()=>{let e={position:n,left:0,top:0};if(!j.floating)return e;let t=MC(j.floating,u.x),r=MC(j.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...jC(j.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,j.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:te,refs:A,elements:j,floatingStyles:ne}),[u,te,A,j,ne])}var FC=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?{}:EC({element:r.current,padding:i}).fn(n):r?EC({element:r,padding:i}).fn(n):{}}}},IC=(e,t)=>{let n=xC(e);return{name:n.name,fn:n.fn,options:[e,t]}},LC=(e,t)=>{let n=SC(e);return{name:n.name,fn:n.fn,options:[e,t]}},RC=(e,t)=>({fn:DC(e).fn,options:[e,t]}),zC=(e,t)=>{let n=CC(e);return{name:n.name,fn:n.fn,options:[e,t]}},BC=(e,t)=>{let n=wC(e);return{name:n.name,fn:n.fn,options:[e,t]}},VC=(e,t)=>{let n=TC(e);return{name:n.name,fn:n.fn,options:[e,t]}},HC=(e,t)=>{let n=FC(e);return{name:n.name,fn:n.fn,options:[e,t]}},UC=Object.defineProperty,WC=m.forwardRef(((e,t)=>UC(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,R.jsx)(f_.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,R.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),GC=Object.defineProperty,KC=(e,t)=>GC(e,`name`,{value:t,configurable:!0}),qC=`Popper`,[JC,YC]=x_(qC),[XC,ZC]=JC(qC),QC=KC(e=>{let{__scopePopper:t,children:n}=e,[r,i]=m.useState(null),[a,o]=m.useState(void 0);return(0,R.jsx)(XC,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),$C=`PopperAnchor`,ew=m.forwardRef(KC(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=ZC($C,n),o=m.useRef(null),s=a.onAnchorChange,c=Kg(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&&uw(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,R.jsx)(f_.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),tw=`PopperContent`,[nw,rw]=JC(tw),iw=m.forwardRef(KC(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,_=ZC(tw,n),[v,y]=m.useState(null),b=Kg(t,y),[x,S]=m.useState(null),C=px(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),ee=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,te={padding:ee,boundary:D.filter(cw),altBoundary:O},{refs:k,floatingStyles:A,placement:j,isPositioned:ne,middlewareData:re}=PC({strategy:`fixed`,placement:E,whileElementsMounted:KC((...e)=>bC(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:_.anchor},middleware:[IC({mainAxis:i+T,alignmentAxis:o}),c&&LC({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?RC():void 0,...te}),c&&zC({...te}),BC({...te,apply:KC(({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&&HC({element:x,padding:s}),lw({arrowWidth:w,arrowHeight:T}),f&&VC({strategy:`referenceHidden`,...te,boundary:O?te.boundary:void 0})]}),M=_.setPlacementState;j_(()=>(M(j),()=>{M(void 0)}),[j,M]);let[ie,ae]=uw(j),oe=sv(h);j_(()=>{ne&&oe?.()},[ne,oe]);let se=re.arrow?.x,ce=re.arrow?.y,le=re.arrow?.centerOffset!==0,[ue,de]=m.useState();return j_(()=>{v&&de(window.getComputedStyle(v).zIndex)},[v]),(0,R.jsx)(`div`,{ref:k.setFloating,"data-radix-popper-content-wrapper":``,style:{...A,transform:ne?A.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ue,"--radix-popper-transform-origin":[re.transformOrigin?.x,re.transformOrigin?.y].join(` `),...re.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,R.jsx)(nw,{scope:n,placedSide:ie,placedAlign:ae,onArrowChange:S,arrowX:se,arrowY:ce,shouldHideArrow:le,children:(0,R.jsx)(f_.div,{"data-side":ie,"data-align":ae,...g,ref:b,style:{...g.style,animation:ne?g.style?.animation:`none`}})})})},`PopperContent`)),aw=`PopperArrow`,ow={top:`bottom`,right:`left`,bottom:`top`,left:`right`},sw=m.forwardRef(KC(function(e,t){let{__scopePopper:n,...r}=e,i=rw(aw,n),a=ow[i.placedSide];return(0,R.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,R.jsx)(WC,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function cw(e){return e!==null}KC(cw,`isNotNull`);var lw=KC(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]=uw(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 uw(e){let[t,n=`center`]=e.split(`-`);return[t,n]}KC(uw,`getSideAndAlignFromPlacement`);var dw=QC,fw=ew,pw=iw,mw=sw,hw=Object.defineProperty,gw=(e,t)=>hw(e,`name`,{value:t,configurable:!0}),_w=`Popover`,[vw,yw]=x_(_w,[YC]),bw=YC(),[xw,Sw]=vw(_w),Cw=gw(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=bw(t),c=m.useRef(null),[l,u]=m.useState(!1),[d,f]=B_({prop:r,defaultProp:i??!1,onChange:a,caller:_w});return(0,R.jsx)(dw,{...s,children:(0,R.jsx)(xw,{scope:t,contentId:iv(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:m.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:m.useCallback(()=>u(!0),[]),onCustomAnchorRemove:m.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),ww=`PopoverTrigger`,Tw=m.forwardRef(gw(function(e,t){let{__scopePopover:n,...r}=e,i=Sw(ww,n),a=bw(n),o=Kg(t,i.triggerRef),s=(0,R.jsx)(f_.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Iw(i.open),...r,ref:o,onClick:E_(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,R.jsx)(fw,{asChild:!0,...a,children:s})},`PopoverTrigger`)),Ew=`PopoverPortal`,[Dw,Ow]=vw(Ew,{forceMount:void 0}),kw=gw(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=Sw(Ew,t);return(0,R.jsx)(Dw,{scope:t,forceMount:n,children:(0,R.jsx)(J_,{present:n||a.open,children:(0,R.jsx)(Bv,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),Aw=`PopoverContent`,jw=m.forwardRef(gw(function(e,t){let n=Ow(Aw,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=Sw(Aw,e.__scopePopover);return(0,R.jsx)(J_,{present:r||a.open,children:a.modal?(0,R.jsx)(Nw,{...i,ref:t}):(0,R.jsx)(Pw,{...i,ref:t})})},`PopoverContent`)),Mw=Yg(`PopoverContent.RemoveScroll`),Nw=m.forwardRef(gw(function(e,t){let n=Sw(Aw,e.__scopePopover),r=m.useRef(null),i=Kg(t,r),a=m.useRef(!1);return m.useEffect(()=>{let e=r.current;if(e)return ub(e)},[]),(0,R.jsx)(tb,{as:Mw,allowPinchZoom:!0,children:(0,R.jsx)(Fw,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:E_(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:E_(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:E_(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),Pw=m.forwardRef(gw(function(e,t){let n=Sw(Aw,e.__scopePopover),r=m.useRef(!1),i=m.useRef(!1);return(0,R.jsx)(Fw,{...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()}})},`PopoverContentNonModal`)),Fw=m.forwardRef(gw(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=Sw(Aw,n),p=bw(n);return Kv(),(0,R.jsx)(Dv,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,R.jsx)(hv,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,R.jsx)(pw,{"data-state":Iw(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})},`PopoverContentImpl`));function Iw(e){return e?`open`:`closed`}gw(Iw,`getState`);var Lw=Cw,Rw=Tw,zw=kw,Bw=jw,Vw=Object.defineProperty,Hw=(e,t)=>Vw(e,`name`,{value:t,configurable:!0}),Uw=`Switch`,[Ww,Gw]=x_(Uw),[Kw,qw]=Ww(Uw);function Jw(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]=B_({prop:n,defaultProp:i??!1,onChange:c,caller:Uw}),[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,R.jsx)(Kw,{scope:t,...S,children:nT(d)?d(S):r})}Hw(Jw,`SwitchProvider`);var Yw=`SwitchTrigger`,Xw=m.forwardRef(Hw(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}=qw(Yw,e),_=Kg(r,u),v=m.useRef(c);return m.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=Hw(()=>d(v.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,d]),(0,R.jsx)(f_.button,{type:`button`,role:`switch`,"aria-checked":c,"aria-required":l,"data-state":rT(c),"data-disabled":s?``:void 0,disabled:s,value:o,...n,ref:_,onClick:E_(t,e=>{p(),d(e=>!e),g&&h&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})},`SwitchTrigger`)),Zw=m.forwardRef(Hw(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,R.jsx)(Jw,{__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,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Xw,{...d,ref:t,__scopeSwitch:n}),e&&(0,R.jsx)(tT,{__scopeSwitch:n})]})})},`Switch`)),Qw=`SwitchThumb`,$w=m.forwardRef(Hw(function(e,t){let{__scopeSwitch:n,...r}=e,i=qw(Qw,n);return(0,R.jsx)(f_.span,{"data-state":rT(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),eT=`SwitchBubbleInput`,tT=m.forwardRef(Hw(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}=qw(eT,e),_=Kg(r,g),v=px(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,R.jsx)(f_.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:E_(t,e=>{y.current&&e.stopPropagation()}),style:{...n.style,...v,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function nT(e){return typeof e==`function`}Hw(nT,`isFunction`);function rT(e){return e?`checked`:`unchecked`}Hw(rT,`getState`);var iT=Object.defineProperty,aT=(e,t)=>iT(e,`name`,{value:t,configurable:!0}),[oT,sT]=x_(`Tooltip`,[YC]),cT=YC(),lT=`TooltipProvider`,uT=700,dT=`tooltip.open`,[fT,pT]=oT(lT),mT=aT(e=>{let{__scopeTooltip:t,delayDuration:n=uT,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,R.jsx)(fT,{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`),hT=`Tooltip`,[gT,_T]=oT(hT),vT=aT(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=pT(hT,e.__scopeTooltip),l=cT(t),[u,d]=m.useState(null),[f,p]=m.useState(void 0),h=iv(),g=m.useRef(0),_=o??c.disableHoverableContent,v=s??c.delayDuration,y=m.useRef(!1),[b,x]=B_({prop:r,defaultProp:i??!1,onChange:aT(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(dT))):c.onClose(),a?.(e)},`onChange`),caller:hT}),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,R.jsx)(dw,{...l,children:(0,R.jsx)(gT,{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`),yT=`TooltipTrigger`,bT=m.forwardRef(aT(function(e,t){let{__scopeTooltip:n,...r}=e,i=_T(yT,n),a=pT(yT,n),o=cT(n),s=Kg(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,R.jsx)(fw,{asChild:!0,...o,children:(0,R.jsx)(f_.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:E_(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:E_(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:E_(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:E_(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:E_(e.onBlur,i.onClose),onClick:E_(e.onClick,i.onClose)})})},`TooltipTrigger`)),xT=`TooltipPortal`,[ST,CT]=oT(xT,{forceMount:void 0}),wT=aT(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=_T(xT,t);return(0,R.jsx)(ST,{scope:t,forceMount:n,children:(0,R.jsx)(J_,{present:n||a.open,children:(0,R.jsx)(Bv,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),TT=`TooltipContent`,ET=m.forwardRef(aT(function(e,t){let n=CT(TT,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=_T(TT,e.__scopeTooltip);return(0,R.jsx)(J_,{present:r||o.open,children:o.disableHoverableContent?(0,R.jsx)(kT,{side:i,...a,ref:t}):(0,R.jsx)(DT,{side:i,...a,ref:t})})},`TooltipContent`)),DT=m.forwardRef(aT(function(e,t){let n=_T(TT,e.__scopeTooltip),r=pT(TT,e.__scopeTooltip),i=m.useRef(null),a=Kg(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=MT(r,jT(r,n.getBoundingClientRect())),a=NT(t.getBoundingClientRect()),o=FT([...i,...a]);s(o),d(!0)},[d]);return m.useEffect(()=>()=>f(),[f]),m.useEffect(()=>{if(c&&u){let e=aT(e=>p(e,u),`handleTriggerLeave`),t=aT(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=aT(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!PT(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,R.jsx)(kT,{...e,ref:a})},`TooltipContentHoverable`)),OT=Qg(`TooltipContent`),kT=m.forwardRef(aT(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=_T(TT,n),u=cT(n),{onClose:d}=l;m.useEffect(()=>(document.addEventListener(dT,d),()=>document.removeEventListener(dT,d)),[d]),m.useEffect(()=>{if(l.trigger){let e=aT(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 j_(()=>(f(a),()=>{f(void 0)}),[a,f]),(0,R.jsx)(hv,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,R.jsxs)(pw,{"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,R.jsx)(OT,{children:r}),i?(0,R.jsx)(__,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`)),AT=m.forwardRef(aT(function(e,t){let{__scopeTooltip:n,...r}=e,i=cT(n);return(0,R.jsx)(mw,{...i,...r,ref:t})},`TooltipArrow`));function jT(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`)}}aT(jT,`getExitSideFromRect`);function MT(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}aT(MT,`getPaddedExitPoints`);function NT(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}]}aT(NT,`getPointsFromRect`);function PT(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}aT(PT,`isPointInPolygon`);function FT(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)),IT(t)}aT(FT,`getHull`);function IT(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)}aT(IT,`getHullPresorted`);var LT=mT,RT=vT,zT=bT,BT=wT,VT=ET,HT=AT,UT=gh(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-[0.8125rem] font-medium whitespace-nowrap transition-[transform,background-color,box-shadow,color,border-color] duration-150 ease-snap outline-none select-none focus-visible:ring-3 focus-visible:ring-ring/40 active:not-aria-[haspopup]:scale-[0.97] disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:brightness-110`,soft:`bg-accent text-foreground hover:bg-primary/20`,outline:`border-border bg-card/40 text-foreground hover:bg-accent aria-expanded:bg-accent`,secondary:`bg-secondary text-secondary-foreground hover:bg-accent aria-expanded:bg-accent`,ghost:`text-foreground hover:bg-accent aria-expanded:bg-accent`,destructive:`border-destructive/40 bg-transparent text-destructive hover:bg-destructive hover:text-background focus-visible:ring-destructive/30`,link:`text-link underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-3`,xs:`h-7 gap-1 px-2.5 text-xs [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1.5 px-2.5 text-xs [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-2 px-4`,icon:`size-8`,"icon-xs":`size-7 [&_svg:not([class*='size-'])]:size-3.5`,"icon-sm":`size-7`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function J({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){let a=r?Xg:`button`;return(0,R.jsx)(a,{"data-slot":`button`,"data-variant":t,"data-size":n,className:q(UT({variant:t,size:n,className:e})),...i})}function WT({className:e,...t}){return(0,R.jsx)(`kbd`,{"data-slot":`kbd`,className:q(`pointer-events-none inline-flex h-5 min-w-5 w-fit items-center justify-center gap-1 rounded-lg border border-border border-b-2 bg-muted px-1.5 font-sans text-[0.7rem] leading-none font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:border-background/30 in-data-[slot=tooltip-content]:bg-transparent in-data-[slot=tooltip-content]:text-background [&_svg:not([class*='size-'])]:size-3`,e),...t})}function GT({className:e,...t}){return(0,R.jsx)(`kbd`,{"data-slot":`kbd-group`,className:q(`inline-flex items-center gap-1`,e),...t})}var KT=typeof navigator<`u`&&/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent),qT={alt:`⌥`,ctrl:`⌃`,shift:`⇧`,meta:`⌘`,cmd:`⌘`},JT={enter:`↵`,esc:`Esc`,escape:`Esc`,arrowleft:`←`,arrowright:`→`,arrowup:`↑`,arrowdown:`↓`,space:`Space`};function YT(e){return e.split(`+`).map(e=>{let t=e.toLowerCase();return KT&&qT[t]?qT[t]:JT[t]??(e.length===1?e.toUpperCase():e[0].toUpperCase()+e.slice(1))})}function XT({chord:e,className:t}){let n=YT(e);return(0,R.jsx)(GT,{className:t,children:n.map((e,t)=>(0,R.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[t>0?(0,R.jsx)(`span`,{className:`sr-only`,children:`plus`}):null,(0,R.jsx)(WT,{children:e})]},t))})}function ZT({chord:e,children:t,className:n}){return(0,R.jsxs)(`span`,{className:q(`inline-flex shrink-0 items-center gap-1.5 text-xs whitespace-nowrap text-muted-foreground`,n),children:[(0,R.jsx)(XT,{chord:e}),t]})}function QT({open:e,onOpenChange:t,label:n,description:r,dismissOnBackdrop:i=!0,className:a,children:o}){return(0,R.jsx)(vb,{open:e,onOpenChange:t,children:(0,R.jsx)(Cl,{children:e?(0,R.jsxs)(wb,{forceMount:!0,children:[(0,R.jsx)(Eb,{asChild:!0,forceMount:!0,children:(0,R.jsx)(Rd.div,{className:`fixed inset-0 z-50 bg-scrim backdrop-blur-sm`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.16,ease:`easeOut`}})}),(0,R.jsx)(`div`,{className:`pointer-events-none fixed inset-0 z-50 grid place-items-center p-4`,children:(0,R.jsx)(Ab,{asChild:!0,forceMount:!0,onInteractOutside:e=>{i||e.preventDefault()},onOpenAutoFocus:e=>{let t=e.currentTarget?.querySelector(`[data-nav], [data-autofocus], textarea`);t&&(e.preventDefault(),t.focus())},...r?{}:{"aria-describedby":void 0},children:(0,R.jsxs)(Rd.div,{className:q(`glass-pop pointer-events-auto flex max-h-[min(86svh,48rem)] w-full max-w-2xl flex-col overflow-hidden rounded-lg outline-none`,a),initial:{opacity:0,scale:.92,y:18},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.96,y:8,transition:{duration:.12,ease:`easeIn`}},transition:{type:`spring`,stiffness:460,damping:32,mass:.9},children:[(0,R.jsx)(Fb,{className:`sr-only`,children:n}),r?(0,R.jsx)(Lb,{className:`sr-only`,children:r}):null,o]})})})]}):null})})}var $T=[],eE=0,tE=new Set;function nE(){for(let e of[...tE])e()}function rE(e){return tE.add(e),()=>{tE.delete(e)}}function iE(){let e;for(let t of $T)(!e||t.priority>e.priority||t.priority===e.priority&&t.order<e.order)&&(e=t);return e?.id}var aE={question:30,confirm:20,help:10,sheet:5};function oE(e,t){let n=(0,m.useId)();(0,m.useEffect)(()=>{if(e)return $T=[...$T,{id:n,priority:t,order:++eE}],nE(),()=>{$T=$T.filter(e=>e.id!==n),nE()}},[e,t,n]);let r=(0,m.useSyncExternalStore)(rE,iE,()=>void 0);return e&&r===n}function sE(){return(0,m.useSyncExternalStore)(rE,()=>$T.length>0,()=>!1)}var cE=[{id:`focus`,caps:[`/`],help:`jump to the message box`},{id:`send`,label:`Enter`,help:`send the message`},{id:`newline`,label:`Shift+Enter`,help:`a new line (lists carry on)`},{id:`format`,label:`Ctrl+B`,help:`bold; Ctrl+I italic, Ctrl+E code, Ctrl+K link`},{id:`leave`,label:`Esc`,help:`leave the box for the tab bar`}],lE=[{id:`enter`,caps:[`↓`],help:`from the tab bar, into the page`},{id:`rows`,caps:[`↑`,`↓`],help:`move through a list (j and k work too)`},{id:`pane`,caps:[`←`,`→`],help:`between a list and its detail (h and l)`},{id:`ends`,caps:[`Home`,`End`],help:`first and last row`},{id:`open`,label:`Enter`,help:`open the row, press a button`},{id:`back`,label:`Esc`,help:`back up to the tab bar`}],uE=[{id:`qmove`,caps:[`↑`,`↓`],help:`move between the options`},{id:`qpick`,label:`Space`,help:`pick an option (several when allowed)`},{id:`qchoose`,label:`Enter`,help:`choose and go on; in your own answer, send it`},{id:`qacross`,caps:[`←`,`→`],help:`previous and next question`},{id:`qdigit`,caps:[`1`,`2`,`…`],help:`pick that option`},{id:`qesc`,label:`Esc`,help:`put the question away for later`}];function dE({line:e}){return(0,R.jsxs)(`div`,{className:`flex items-center gap-3 py-1`,children:[(0,R.jsx)(`span`,{className:`flex w-28 shrink-0 items-center`,children:e.caps?(0,R.jsx)(`span`,{className:`inline-flex items-center gap-1`,children:e.caps.map(e=>(0,R.jsx)(WT,{children:e},e))}):(0,R.jsx)(XT,{chord:e.label??``})}),(0,R.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:e.help})]})}function fE({title:e,lines:t}){return(0,R.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,R.jsx)(`h3`,{className:`mb-1 text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:e}),t.map(e=>(0,R.jsx)(dE,{line:e},e.id))]})}function pE(e){return e.map(e=>({id:e.action,label:e.label,help:e.help}))}function mE(e){return e.map(e=>({id:`tab.${e.id}`,label:e.key,help:`jump to the ${e.label} tab`}))}function hE({open:e,onOpenChange:t,keys:n,tabs:r}){let i=oE(e,aE.help);return(0,m.useEffect)(()=>{if(!e)return;let n=new Set([`Alt`,`Control`,`Shift`,`Meta`,`ArrowUp`,`ArrowDown`,`PageUp`,`PageDown`,`Home`,`End`,`Tab`,` `]),r=e=>{n.has(e.key)||t(!1)};return window.addEventListener(`keydown`,r,!0),()=>window.removeEventListener(`keydown`,r,!0)},[e,t]),(0,R.jsxs)(QT,{open:e&&i,onOpenChange:t,label:`Keys`,className:`max-w-4xl`,children:[(0,R.jsxs)(`header`,{className:`flex items-center justify-between gap-3 px-6 pt-5 pb-2`,children:[(0,R.jsx)(`h2`,{"aria-hidden":`true`,className:`text-base font-medium`,children:`Keyboard shortcuts`}),(0,R.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(XT,{chord:`Esc`}),(0,R.jsx)(J,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Close`,onClick:()=>t(!1),children:(0,R.jsx)(lh,{"aria-hidden":`true`})})]})]}),(0,R.jsxs)(`div`,{className:`grid min-h-0 flex-1 gap-x-10 gap-y-6 overflow-y-auto px-6 pt-2 pb-6 md:grid-cols-2`,children:[(0,R.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,R.jsx)(fE,{title:`Everywhere`,lines:pE(n)}),(0,R.jsx)(fE,{title:`Jump to a tab`,lines:mE(r)}),(0,R.jsx)(fE,{title:`Message box`,lines:cE})]}),(0,R.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,R.jsx)(fE,{title:`Lists and cards`,lines:lE}),(0,R.jsx)(fE,{title:`Questions`,lines:uE})]})]})]})}function gE({className:e,...t}){return(0,R.jsx)(`span`,{"data-slot":`spinner`,role:`status`,"aria-label":`Loading`,className:q(`inline-flex size-4 shrink-0 items-end justify-between text-primary`,e),...t,children:[0,1,2].map(e=>(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`block aspect-square h-[28%] shrink-0 rounded-full bg-current motion-safe:animate-[hop_0.9s_ease-in-out_infinite]`,style:{animationDelay:`${e*.14}s`}},e))})}function _E({delayDuration:e=0,...t}){return(0,R.jsx)(LT,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function vE({...e}){return(0,R.jsx)(RT,{"data-slot":`tooltip`,...e})}function yE({...e}){return(0,R.jsx)(zT,{"data-slot":`tooltip-trigger`,...e})}function bE({className:e,sideOffset:t=0,children:n,...r}){return(0,R.jsx)(BT,{children:(0,R.jsxs)(VT,{"data-slot":`tooltip-content`,sideOffset:t,className:q(`z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-lg 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-lg 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,R.jsx)(HT,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground`})]})})}var xE={},SE=new Set;function CE(e){xE=e;for(let e of[...SE])e()}function wE(e){xE.taskId!==e&&CE({...xE,taskId:e})}function TE(e){(xE.session?.name!==e?.name||JSON.stringify(xE.session?.address)!==JSON.stringify(e?.address))&&CE({...xE,session:e})}function EE(e){return SE.add(e),()=>{SE.delete(e)}}function DE(){return(0,m.useSyncExternalStore)(EE,()=>xE,()=>xE)}function OE(e){return[...e.querySelectorAll(`[data-nav]`)].filter(e=>!e.hasAttribute(`disabled`)&&e.getAttribute(`aria-hidden`)!==`true`)}function kE(e,t,n){let r=OE(e);if(r.length===0)return!1;let i=t?r.findIndex(e=>e===t||e.contains(t)):-1,a=r[n===`first`?0:n===`last`?r.length-1:Math.max(0,Math.min(r.length-1,(i<0?n>0?-1:r.length:i)+n))];return!a||a===t?!1:(a.focus({preventScroll:!1}),!0)}function AE(e){return e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&![`checkbox`,`radio`,`button`].includes(e.type)||e instanceof HTMLElement&&e.isContentEditable}function jE(e,t=!0){return e===`ArrowDown`||t&&e===`j`?1:e===`ArrowUp`||t&&e===`k`?-1:0}function ME(e,t=!0){return e===`ArrowRight`||t&&e===`l`?1:e===`ArrowLeft`||t&&e===`h`?-1:0}var NE=`button:not([disabled]), a[href], [role='button']:not([aria-disabled='true'])`;function PE(e){return[...e.querySelectorAll(NE)].filter(e=>e.offsetParent!==null)}function FE(e,t,n){let r=PE(e);if(r.length===0)return;let i=t?r.findIndex(e=>e===t||e.contains(t)):-1;r[n===`first`?0:n===`last`?r.length-1:Math.max(0,Math.min(r.length-1,(i<0?n>0?-1:r.length:i)+n))]?.focus()}function IE(e){return e.querySelector(`[aria-current='true']`)??PE(e)[0]}function LE(){let e=document.getElementById(`main`);if(!e)return!1;let t=e.querySelector(`[data-pane='list']`);return((t?IE(t):void 0)??PE(e)[0]??e).focus(),!0}function RE(){let e=document.querySelector(`[role='tab'][aria-selected='true']`);return e?.focus({preventScroll:!0}),!!e}var zE={active:!1};function BE(e){return e>=1048576?`${(e/1024/1024).toFixed(1)} MB`:e>=1024?`${Math.round(e/1024)} KB`:`${e} B`}async function VE(e){if(e.size===0)throw Error(`${e.name||`That file`} is empty.`);if(e.size>20971520)throw Error(`${e.name||`That file`} is larger than 20 MB.`);let t=new URLSearchParams({name:e.name||`pasted-file`,type:e.type}),n=await fetch(`/api/files.upload?${t}`,{method:`POST`,headers:{"Content-Type":`application/octet-stream`},body:e,credentials:`same-origin`}),r=await n.json().catch(()=>void 0);if(!r)throw new cf(`the lobby answered ${n.status}`,`failed`,n.status);if(!r.ok)throw new cf(r.error,r.code,n.status);return r.result}function HE(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var UE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,WE=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,GE={};function KE(e,t){return((t||GE).jsx?WE:UE).test(e)}var qE=/[ \t\n\f\r]/g;function JE(e){return typeof e==`object`?e.type===`text`&&YE(e.value):YE(e)}function YE(e){return e.replace(qE,``)===``}var XE=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};XE.prototype.normal={},XE.prototype.property={},XE.prototype.space=void 0;function ZE(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new XE(n,r,t)}function QE(e){return e.toLowerCase()}var $E=class{constructor(e,t){this.attribute=t,this.property=e}};$E.prototype.attribute=``,$E.prototype.booleanish=!1,$E.prototype.boolean=!1,$E.prototype.commaOrSpaceSeparated=!1,$E.prototype.commaSeparated=!1,$E.prototype.defined=!1,$E.prototype.mustUseProperty=!1,$E.prototype.number=!1,$E.prototype.overloadedBoolean=!1,$E.prototype.property=``,$E.prototype.spaceSeparated=!1,$E.prototype.space=void 0;var eD=s({boolean:()=>Y,booleanish:()=>nD,commaOrSpaceSeparated:()=>oD,commaSeparated:()=>aD,number:()=>X,overloadedBoolean:()=>rD,spaceSeparated:()=>iD}),tD=0,Y=sD(),nD=sD(),rD=sD(),X=sD(),iD=sD(),aD=sD(),oD=sD();function sD(){return 2**++tD}var cD=Object.keys(eD),lD=class extends $E{constructor(e,t,n,r){let i=-1;if(super(e,t),uD(this,`space`,r),typeof n==`number`)for(;++i<cD.length;){let e=cD[i];uD(this,cD[i],(n&eD[e])===eD[e])}}};lD.prototype.defined=!0;function uD(e,t,n){n&&(e[t]=n)}function dD(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new lD(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[QE(r)]=r,n[QE(a.attribute)]=r}return new XE(t,n,e.space)}var fD=dD({properties:{ariaActiveDescendant:null,ariaAtomic:nD,ariaAutoComplete:null,ariaBusy:nD,ariaChecked:nD,ariaColCount:X,ariaColIndex:X,ariaColSpan:X,ariaControls:iD,ariaCurrent:null,ariaDescribedBy:iD,ariaDetails:null,ariaDisabled:nD,ariaDropEffect:iD,ariaErrorMessage:null,ariaExpanded:nD,ariaFlowTo:iD,ariaGrabbed:nD,ariaHasPopup:null,ariaHidden:nD,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:iD,ariaLevel:X,ariaLive:null,ariaModal:nD,ariaMultiLine:nD,ariaMultiSelectable:nD,ariaOrientation:null,ariaOwns:iD,ariaPlaceholder:null,ariaPosInSet:X,ariaPressed:nD,ariaReadOnly:nD,ariaRelevant:null,ariaRequired:nD,ariaRoleDescription:iD,ariaRowCount:X,ariaRowIndex:X,ariaRowSpan:X,ariaSelected:nD,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 pD(e,t){return t in e?e[t]:t}function mD(e,t){return pD(e,t.toLowerCase())}var hD=dD({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:aD,acceptCharset:iD,accessKey:iD,action:null,allow:null,allowFullScreen:Y,allowPaymentRequest:Y,allowUserMedia:Y,alpha:Y,alt:null,as:null,async:Y,autoCapitalize:null,autoComplete:iD,autoFocus:Y,autoPlay:Y,blocking:iD,capture:null,charSet:null,checked:Y,cite:null,className:iD,closedBy:null,colorSpace:null,cols:X,colSpan:X,command:null,commandFor:null,content:null,contentEditable:nD,controls:Y,controlsList:iD,coords:X|aD,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Y,defer:Y,dir:null,dirName:null,disabled:Y,download:rD,draggable:nD,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Y,formTarget:null,headers:iD,height:X,hidden:rD,high:X,href:null,hrefLang:null,htmlFor:iD,httpEquiv:iD,id:null,imageSizes:null,imageSrcSet:null,inert:Y,inputMode:null,integrity:null,is:null,isMap:Y,itemId:null,itemProp:iD,itemRef:iD,itemScope:Y,itemType:iD,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:iD,placeholder:null,playsInline:Y,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Y,referrerPolicy:null,rel:iD,required:Y,reversed:Y,rows:X,rowSpan:X,sandbox:iD,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:nD,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:nD,width:X,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:iD,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:nD,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:aD,part:iD,prefix:null,property:null,results:X,security:null,unselectable:null},space:`html`,transform:mD}),gD=dD({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:oD,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:iD,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:aD,g2:aD,glyphName:aD,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:oD,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:iD,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:X,pointsAtY:X,pointsAtZ:X,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:oD,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:oD,rev:oD,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:oD,requiredFeatures:oD,requiredFonts:oD,requiredFormats:oD,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:oD,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:oD,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:oD,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:pD}),_D=dD({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()}}),vD=dD({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:mD}),yD=dD({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),bD={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`},xD=/[A-Z]/g,SD=/-[a-z]/g,CD=/^data[-\w.:]+$/i;function wD(e,t){let n=QE(t),r=t,i=$E;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&CD.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(SD,ED);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!SD.test(e)){let n=e.replace(xD,TD);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=lD}return new i(r,t)}function TD(e){return`-`+e.toLowerCase()}function ED(e){return e.charAt(1).toUpperCase()}var DD=ZE([fD,hD,_D,vD,yD],`html`),OD=ZE([fD,gD,_D,vD,yD],`svg`);function kD(e){return e.join(` `).trim()}var AD=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(`
58
- `);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})),jD=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(AD());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}})),MD=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))}})),ND=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(jD()),r=MD();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})),PD=ID(`end`),FD=ID(`start`);function ID(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 LD(e){let t=FD(e),n=PD(e);if(t&&n)return{start:t,end:n}}function RD(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?BD(e.position):`start`in e||`end`in e?BD(e):`line`in e||`column`in e?zD(e):``}function zD(e){return VD(e&&e.line)+`:`+VD(e&&e.column)}function BD(e){return zD(e&&e.start)+`-`+zD(e&&e.end)}function VD(e){return e&&typeof e==`number`?e:1}var HD=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=RD(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}};HD.prototype.file=``,HD.prototype.name=``,HD.prototype.reason=``,HD.prototype.message=``,HD.prototype.stack=``,HD.prototype.column=void 0,HD.prototype.line=void 0,HD.prototype.ancestors=void 0,HD.prototype.cause=void 0,HD.prototype.fatal=void 0,HD.prototype.place=void 0,HD.prototype.ruleId=void 0,HD.prototype.source=void 0;var UD=l(ND(),1),WD={}.hasOwnProperty,GD=new Map,KD=/[A-Z]/g,qD=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),JD=new Set([`td`,`th`]),YD=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function XD(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=sO(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=oO(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`?OD:DD,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=ZD(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ZD(e,t,n){if(t.type===`element`)return QD(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return $D(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return tO(e,t,n);if(t.type===`mdxjsEsm`)return eO(e,t);if(t.type===`root`)return nO(e,t,n);if(t.type===`text`)return rO(e,t)}function QD(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=OD,e.schema=i),e.ancestors.push(t);let a=pO(e,t.tagName,!1),o=cO(e,t),s=uO(e,t);return qD.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!JE(e)})),iO(e,o,a,t),aO(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function $D(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)}mO(e,t.position)}function eO(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);mO(e,t.position)}function tO(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=OD,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:pO(e,t.name,!0),o=lO(e,t),s=uO(e,t);return iO(e,o,a,t),aO(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function nO(e,t,n){let r={};return aO(r,uO(e,t)),e.create(t,e.Fragment,r,n)}function rO(e,t){return t.value}function iO(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function aO(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function oO(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 sO(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=FD(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 cO(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&WD.call(t.properties,i)){let a=dO(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&JD.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 lO(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 mO(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 mO(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function uO(e,t){let n=[],r=-1,i=e.passKeys?new Map:GD;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=ZD(e,a,o);s!==void 0&&n.push(s)}return n}function dO(e,t,n){let r=wD(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?HE(n):kD(n)),r.property===`style`){let t=typeof n==`object`?n:fO(e,String(n));return e.stylePropertyNameCase===`css`&&(t=hO(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?bD[r.property]||r.property:r.attribute,n]}}function fO(e,t){try{return(0,UD.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new HD("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=YD+`#cannot-parse-style-attribute`,r}}function pO(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=KE(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=KE(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return WD.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);mO(e)}function mO(e,t){let n=new HD("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=YD+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function hO(e){let t={},n;for(n in e)WD.call(e,n)&&(t[gO(n)]=e[n]);return t}function gO(e){let t=e.replace(KD,_O);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function _O(e){return`-`+e.toLowerCase()}var vO={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`]},yO={};function bO(e,t){let n=t||yO;return xO(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function xO(e,t,n){if(CO(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 SO(e.children,t,n)}return Array.isArray(e)?SO(e,t,n):``}function SO(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=xO(e[i],t,n);return r.join(``)}function CO(e){return!!(e&&typeof e==`object`)}var wO=document.createElement(`i`);function TO(e){let t=`&`+e+`;`;wO.innerHTML=t;let n=wO.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function EO(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 DO(e,t){return e.length>0?(EO(e,e.length,0,t),e):t}var OO={}.hasOwnProperty;function kO(e){let t={},n=-1;for(;++n<e.length;)AO(t,e[n]);return t}function AO(e,t){let n;for(n in t){let r=(OO.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){OO.call(r,a)||(r[a]=[]);let e=i[a];jO(r[a],Array.isArray(e)?e:e?[e]:[])}}}function jO(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);EO(e,0,0,r)}function MO(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 NO(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var PO=WO(/[A-Za-z]/),FO=WO(/[\dA-Za-z]/),IO=WO(/[#-'*+\--9=?A-Z^-~]/);function LO(e){return e!==null&&(e<32||e===127)}var RO=WO(/\d/),zO=WO(/[\dA-Fa-f]/),BO=WO(/[!-/:-@[-`{-~]/);function Z(e){return e!==null&&e<-2}function VO(e){return e!==null&&(e<0||e===32)}function Q(e){return e===-2||e===-1||e===32}var HO=WO(/\p{P}|\p{S}/u),UO=WO(/\s/);function WO(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function GO(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&FO(e.charCodeAt(n+1))&&FO(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 KO(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 qO(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 JO={tokenize:YO};function YO(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`),KO(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 XO=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){ZO(this,e,t,n,!1)}addBefore(e,t,n){ZO(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 ZO(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 QO={tokenize:ek},$O={tokenize:tk};function ek(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 XO;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($O,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($O,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 XO;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 tk(e,t,n){return KO(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function nk(e){if(e===null||VO(e)||UO(e))return 1;if(HO(e))return 2}function rk(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 ik={name:`attention`,resolveAll:ak,tokenize:ok};function ak(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};sk(o,-a),sk(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=DO(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=DO(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=DO(r,rk(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=DO(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=DO(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),EO(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 ok(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=nk(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=nk(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 sk(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var ck={name:`autolink`,tokenize:lk};function lk(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 PO(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||FO(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||FO(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||LO(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):IO(t)?(e.consume(t),l):n(t)}function u(e){return FO(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||FO(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var uk={partial:!0,tokenize:dk};function dk(e,t,n){return r;function r(t){return Q(t)?KO(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Z(e)?t(e):n(e)}}var fk={continuation:{tokenize:mk},exit:hk,name:`blockQuote`,tokenize:pk};function pk(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 mk(e,t,n){let r=this;return i;function i(t){return Q(t)?KO(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(fk,t,n)(r)}}function hk(e){e.exit(`blockQuote`)}var gk={name:`characterEscape`,tokenize:_k};function _k(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 BO(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var vk={name:`characterReference`,tokenize:yk};function yk(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=FO,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=zO,u):(e.enter(`characterReferenceValue`),a=7,o=RO,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===FO&&!TO(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 bk={partial:!0,tokenize:xk};function xk(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 Sk={concrete:!0,name:`codeFenced`,tokenize:Ck};function Ck(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)?KO(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Z(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(bk,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`),KO(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)?KO(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Z(t)?e.check(bk,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)?KO(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)?KO(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Z(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var wk={name:`codeIndented`,tokenize:Ek},Tk={partial:!0,tokenize:Dk};function Ek(e,t,n){return r;function r(t){return e.enter(`codeIndented`),qO(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):Z(t)?e.attempt(Tk,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 Dk(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):qO(e,t,a,`linePrefix`,4,4)(o)}function a(e){return Z(e)?i(e):n(e)}}var Ok={name:`codeText`,previous:Ak,resolve:kk,tokenize:jk};function kk(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 Ak(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function jk(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 Mk=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&&Nk(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),Nk(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Nk(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);Nk(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Nk(this.left,t.reverse())}}}};function Nk(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 Pk(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Mk(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,Fk(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 EO(e,0,1/0,u.slice(0)),!l}function Fk(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 Ik={resolve:Rk,tokenize:zk},Lk={partial:!0,tokenize:Bk};function Rk(e){return Pk(e),e}function zk(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(Lk,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 Bk(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),KO(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 Vk(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||LO(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||VO(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||LO(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 Hk(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 Uk(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`),KO(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 Wk(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)?KO(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Gk={name:`definition`,tokenize:qk},Kk={partial:!0,tokenize:Jk};function qk(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Hk.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=NO(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 VO(t)?Wk(e,l)(t):l(t)}function l(t){return Vk(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Kk,d,d)(t)}function d(t){return Q(t)?KO(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 Jk(e,t,n){return r;function r(t){return VO(t)?Wk(e,i)(t):n(t)}function i(t){return Uk(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Q(t)?KO(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Z(e)?t(e):n(e)}}var Yk={name:`hardBreakEscape`,tokenize:Xk};function Xk(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 Zk={name:`headingAtx`,resolve:Qk,tokenize:$k};function Qk(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`};EO(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function $k(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||VO(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)?KO(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||VO(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var eA=`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(`.`),tA=[`pre`,`script`,`style`,`textarea`],nA={concrete:!0,name:`htmlFlow`,resolveTo:iA,tokenize:aA},rA={partial:!0,tokenize:oA};function iA(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 aA(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:M):PO(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):PO(a)?(e.consume(a),i=4,r.interrupt?t:M):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:M):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:D:m):n(i)}function h(t){return PO(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||VO(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&tA.includes(l)?(i=1,r.interrupt?t(s):D(s)):eA.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):D(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||FO(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:D):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||PO(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||FO(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||VO(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),ee):n(t)}function ee(t){return t===null||Z(t)?D(t):Q(t)?(e.consume(t),ee):n(t)}function D(t){return t===45&&i===2?(e.consume(t),A):t===60&&i===1?(e.consume(t),j):t===62&&i===4?(e.consume(t),ie):t===63&&i===3?(e.consume(t),M):t===93&&i===5?(e.consume(t),re):Z(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(rA,ae,O)(t)):t===null||Z(t)?(e.exit(`htmlFlowData`),O(t)):(e.consume(t),D)}function O(t){return e.check(bk,te,ae)(t)}function te(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),k}function k(t){return t===null||Z(t)?O(t):(e.enter(`htmlFlowData`),D(t))}function A(t){return t===45?(e.consume(t),M):D(t)}function j(t){return t===47?(e.consume(t),o=``,ne):D(t)}function ne(t){if(t===62){let n=o.toLowerCase();return tA.includes(n)?(e.consume(t),ie):D(t)}return PO(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ne):D(t)}function re(t){return t===93?(e.consume(t),M):D(t)}function M(t){return t===62?(e.consume(t),ie):t===45&&i===2?(e.consume(t),M):D(t)}function ie(t){return t===null||Z(t)?(e.exit(`htmlFlowData`),ae(t)):(e.consume(t),ie)}function ae(n){return e.exit(`htmlFlow`),t(n)}}function oA(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(uk,t,n)}}var sA={name:`htmlText`,tokenize:cA};function cA(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):PO(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):PO(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,j(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?A(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,j(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?A(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?A(t):Z(t)?(o=v,j(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Z(t)?(o=y,j(t)):(e.consume(t),y)}function b(e){return e===62?A(e):y(e)}function x(t){return PO(t)?(e.consume(t),S):n(t)}function S(t){return t===45||FO(t)?(e.consume(t),S):C(t)}function C(t){return Z(t)?(o=C,j(t)):Q(t)?(e.consume(t),C):A(t)}function w(t){return t===45||FO(t)?(e.consume(t),w):t===47||t===62||VO(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),A):t===58||t===95||PO(t)?(e.consume(t),E):Z(t)?(o=T,j(t)):Q(t)?(e.consume(t),T):A(t)}function E(t){return t===45||t===46||t===58||t===95||FO(t)?(e.consume(t),E):ee(t)}function ee(t){return t===61?(e.consume(t),D):Z(t)?(o=ee,j(t)):Q(t)?(e.consume(t),ee):T(t)}function D(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,O):Z(t)?(o=D,j(t)):Q(t)?(e.consume(t),D):(e.consume(t),te)}function O(t){return t===i?(e.consume(t),i=void 0,k):t===null?n(t):Z(t)?(o=O,j(t)):(e.consume(t),O)}function te(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||VO(t)?T(t):(e.consume(t),te)}function k(e){return e===47||e===62||VO(e)?T(e):n(e)}function A(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function j(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return Q(t)?KO(e,re,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):re(t)}function re(t){return e.enter(`htmlTextData`),o(t)}}var lA={name:`labelEnd`,resolveAll:pA,resolveTo:mA,tokenize:hA},uA={tokenize:gA},dA={tokenize:_A},fA={tokenize:vA};function pA(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&&EO(e,0,e.length,n),e}function mA(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=DO(o,e.slice(i+1,i+r+3)),o=DO(o,[[`enter`,l,t]]),o=DO(o,rk(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=DO(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=DO(o,e.slice(a+1)),o=DO(o,[[`exit`,s,t]]),EO(e,i,e.length,o),e}function hA(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(NO(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(uA,u,o?u:d)(t):t===91?e.attempt(dA,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(fA,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function gA(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 VO(t)?Wk(e,a)(t):a(t)}function a(t){return t===41?u(t):Vk(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return VO(t)?Wk(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Uk(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return VO(t)?Wk(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 _A(e,t,n){let r=this;return i;function i(t){return Hk.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(NO(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function vA(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 yA={name:`labelStartImage`,resolveAll:lA.resolveAll,tokenize:bA};function bA(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 xA={name:`labelStartLink`,resolveAll:lA.resolveAll,tokenize:SA};function SA(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 CA={name:`lineEnding`,tokenize:wA};function wA(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),KO(e,t,`linePrefix`)}}var TA={name:`thematicBreak`,tokenize:EA};function EA(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)?KO(e,s,`whitespace`)(t):s(t))}}var DA={continuation:{tokenize:jA},exit:NA,name:`list`,tokenize:AA},OA={partial:!0,tokenize:PA},kA={partial:!0,tokenize:MA};function AA(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:RO(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(TA,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 RO(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(uk,r.interrupt?n:u,e.attempt(OA,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 jA(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(uk,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,KO(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(kA,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,KO(e,e.attempt(DA,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function MA(e,t,n){let r=this;return KO(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 NA(e){e.exit(this.containerState.type)}function PA(e,t,n){let r=this;return KO(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 FA={name:`setextUnderline`,resolveTo:IA,tokenize:LA};function IA(e,t){let n=new XO,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 LA(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)?KO(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Z(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var RA={tokenize:zA};function zA(e){let t=this,n=e.attempt(uk,r,e.attempt(this.parser.constructs.flowInitial,i,KO(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ik,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 BA={resolveAll:WA()},VA=UA(`string`),HA=UA(`text`);function UA(e){return{resolveAll:WA(e===`text`?GA: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 WA(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 GA(e,t){let n=new XO,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 KA=s({attentionMarkers:()=>ej,contentInitial:()=>JA,disable:()=>tj,document:()=>qA,flow:()=>XA,flowInitial:()=>YA,insideSpan:()=>$A,string:()=>ZA,text:()=>QA}),qA={42:DA,43:DA,45:DA,48:DA,49:DA,50:DA,51:DA,52:DA,53:DA,54:DA,55:DA,56:DA,57:DA,62:fk},JA={91:Gk},YA={[-2]:wk,[-1]:wk,32:wk},XA={35:Zk,42:TA,45:[FA,TA],60:nA,61:FA,95:TA,96:Sk,126:Sk},ZA={38:vk,92:gk},QA={[-5]:CA,[-4]:CA,[-3]:CA,33:yA,38:vk,42:ik,60:[ck,sA],91:xA,92:[Yk,gk],93:lA,95:ik,96:Ok},$A={null:[ik,BA]},ej={null:[42,95]},tj={null:[]};function nj(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=DO(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=rk(a,l.events,l),l.events):[]}function f(e,t){return ij(p(e),t)}function p(e){return rj(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&&EO(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 rj(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 ij(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=`
59
- `;break;case-3:o=`\r
60
- `;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 aj(e){let t={constructs:kO([KA,...(e||{}).extensions||[]]),content:n(JO),defined:[],document:n(QO),flow:n(RA),lazy:{},string:n(VA),text:n(HA)};return t;function n(e){return n;function n(n){return nj(t,e,n)}}}function oj(e){for(;!Pk(e););return e}var sj=/[\0\t\n\r]/g;function cj(){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;){sj.lastIndex=c;let n=sj.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 lj=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function uj(e){return e.replace(lj,dj)}function dj(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return MO(n.slice(t?2:1),t?16:10)}return TO(n)||e}var fj={}.hasOwnProperty;function pj(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),mj(n)(oj(aj(n).document().write(cj()(e,t,!0))))}function mj(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(be),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ge),blockQuote:a(pe),characterEscape:T,characterReference:T,codeFenced:a(me),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(me,o),codeText:a(he,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(N),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(P),hardBreakEscape:a(_e),hardBreakTrailing:a(_e),htmlFlow:a(ve,o),htmlFlowData:T,htmlText:a(ve,o),htmlTextData:T,image:a(ye),label:o,link:a(be),listItem:a(Se),listItemValue:f,listOrdered:a(xe,d),listUnordered:a(xe),paragraph:a(Ce),reference:oe,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ge),strong:a(we),thematicBreak:a(Ee)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:fe,autolinkProtocol:de,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:le,characterReference:ue,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(k),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(D),hardBreakTrailing:c(D),htmlFlow:c(O),htmlFlowData:E,htmlText:c(te),htmlTextData:E,image:c(j),label:re,labelText:ne,lineEnding:ee,link:c(A),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:se,resourceDestinationString:M,resourceTitleString:ie,resource:ae,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};gj(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]];fj.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]||vj).call(a,void 0,e[0])}for(r.position={start:hj(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:hj(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:hj(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]||vj).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+RD({start:e.start,end:e.end})+`): it’s not open`);n.position.end=hj(e.end)}function u(){return bO(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=NO(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=Te(),n.position={start:hj(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=hj(e.end)}function ee(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=hj(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 D(){this.data.atHardBreak=!0}function O(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){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 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 ne(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=uj(t),n.identifier=NO(t).toLowerCase()}function re(){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 M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ie(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ae(){this.data.inReference=void 0}function oe(){this.data.referenceType=`collapsed`}function se(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=NO(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ce(e){this.data.characterReferenceType=e.type}function le(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=MO(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=TO(t);let i=this.stack[this.stack.length-1];i.value+=r}function ue(e){let t=this.stack.pop();t.position.end=hj(e.end)}function de(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function fe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function pe(){return{type:`blockquote`,children:[]}}function me(){return{type:`code`,lang:null,meta:null,value:``}}function he(){return{type:`inlineCode`,value:``}}function N(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function P(){return{type:`emphasis`,children:[]}}function ge(){return{type:`heading`,depth:0,children:[]}}function _e(){return{type:`break`}}function ve(){return{type:`html`,value:``}}function ye(){return{type:`image`,title:null,url:``,alt:null}}function be(){return{type:`link`,title:null,url:``,children:[]}}function xe(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Se(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Ce(){return{type:`paragraph`,children:[]}}function we(){return{type:`strong`,children:[]}}function Te(){return{type:`text`,value:``}}function Ee(){return{type:`thematicBreak`}}}function hj(e){return{line:e.line,column:e.column,offset:e.offset}}function gj(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?gj(e,r):_j(e,r)}}function _j(e,t){let n;for(n in t)if(fj.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 vj(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+RD({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+RD({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+RD({start:t.start,end:t.end})+`) is still open`)}function yj(e){let t=this;t.parser=n;function n(n){return pj(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function bj(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 xj(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
61
- `}]}function Sj(e,t){let n=t.value?t.value+`
62
- `:``,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 Cj(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wj(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Tj(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=GO(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 Ej(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 Dj(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Oj(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 kj(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Oj(e,t);let i={src:GO(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 Aj(e,t){let n={src:GO(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 jj(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 Mj(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Oj(e,t);let i={href:GO(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 Nj(e,t){let n={href:GO(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 Pj(e,t,n){let r=e.all(t),i=n?Fj(n):Ij(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:`
63
- `}),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:`
64
- `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Fj(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Ij(n[r])}return t}function Ij(e){return e.spread??e.children.length>1}function Lj(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 Rj(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zj(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Bj(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Vj(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=FD(t.children[1]),o=PD(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 Hj(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 Uj(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Wj=9,Gj=32;function Kj(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(qj(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(qj(t.slice(i),i>0,!1)),a.join(``)}function qj(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Wj||t===Gj;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Wj||t===Gj;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Jj(e,t){let n={type:`text`,value:Kj(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Yj(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Xj={blockquote:bj,break:xj,code:Sj,delete:Cj,emphasis:wj,footnoteReference:Tj,heading:Ej,html:Dj,imageReference:kj,image:Aj,inlineCode:jj,linkReference:Mj,link:Nj,listItem:Pj,list:Lj,paragraph:Rj,root:zj,strong:Bj,table:Vj,tableCell:Uj,tableRow:Hj,text:Jj,thematicBreak:Yj,toml:Zj,yaml:Zj,definition:Zj,footnoteDefinition:Zj};function Zj(){}var{defineProperty:Qj}=Object,$j=typeof self==`object`?self:globalThis,eM=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new $j[e](t)},tM=(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__`?Qj(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 $j[e]==`function`?eM(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(eM(a,o),i)};return r},nM=e=>tM(new Map,e)(0),rM=``,{toString:iM}={},{keys:aM,is:oM}=Object,sM=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=iM.call(e).slice(8,-1);switch(n){case`Array`:return[1,rM];case`Object`:return[2,rM];case`Date`:return[3,rM];case`RegExp`:return[4,rM];case`Map`:return[5,rM];case`Set`:return[6,rM];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},cM=([e,t])=>e===0&&(t===`function`||t===`symbol`),lM=(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]=sM(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&oM(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 aM(o))(e||!cM(sM(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?rM: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||!(cM(sM(n))||cM(sM(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!cM(sM(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},uM=(e,{json:t,lossy:n}={})=>{let r=[];return lM(!(t||n),!!t,new Map,r)(e),r},dM=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?nM(uM(e,t)):structuredClone(e):(e,t)=>nM(uM(e,t));function fM(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 pM(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function mM(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||fM,r=e.options.footnoteBackLabel||pM,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=GO(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:{...dM(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
65
- `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
66
- `}]}}var hM=(function(e){if(e==null)return bM;if(typeof e==`function`)return yM(e);if(typeof e==`object`)return Array.isArray(e)?gM(e):_M(e);if(typeof e==`string`)return vM(e);throw Error(`Expected function, string, or object as test`)});function gM(e){let t=[],n=-1;for(;++n<e.length;)t[n]=hM(e[n]);return yM(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function _M(e){let t=e;return yM(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function vM(e){return yM(t);function t(t){return t&&t.type===e}}function yM(e){return t;function t(t,n,r){return!!(xM(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function bM(){return!0}function xM(e){return typeof e==`object`&&!!e&&`type`in e}function SM(e){return e}var CM=[];function wM(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=hM(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 (`+SM(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=CM,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=TM(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 TM(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?CM:[e]}function EM(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),wM(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 DM={}.hasOwnProperty,OM={};function kM(e,t){let n=t||OM,r=new Map,i=new Map,a={all:s,applyData:jM,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Xj,...n.handlers},one:o,options:n,patch:AM,wrap:NM};return EM(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(DM.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=dM(n);return r.children=a.all(e),r}return dM(e)}return(a.options.unknownHandler||MM)(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=PM(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=PM(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function AM(e,t){e.position&&(t.position=LD(e))}function jM(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,dM(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function MM(e,t){let n=t.data||{},r=`value`in t&&!(DM.call(n,`hProperties`)||DM.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 NM(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
67
- `});++r<e.length;)r&&n.push({type:`text`,value:`
68
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
69
- `}),n}function PM(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function FM(e,t){let n=kM(e,t),r=n.one(e,void 0),i=mM(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
70
- `},i)),a}function IM(e,t){return e&&`run`in e?async function(n,r){let i=FM(n,{file:r,...t});await e.run(i,r)}:function(n,r){return FM(n,{file:r,...e||t})}}function LM(e){if(e)throw e}var RM=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 zM(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 BM(){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?VM(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 VM(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 HM={basename:UM,dirname:WM,extname:GM,join:KM,sep:`/`};function UM(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);YM(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 WM(e){if(YM(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 GM(e){YM(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 KM(...e){let t=-1,n;for(;++t<e.length;)YM(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:qM(n)}function qM(e){YM(e);let t=e.codePointAt(0)===47,n=JM(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function JM(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 YM(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var XM={cwd:ZM};function ZM(){return`/`}function QM(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function $M(e){if(typeof e==`string`)e=new URL(e);else if(!QM(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 eN(e)}function eN(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 tN=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],nN=class{constructor(e){let t;t=e?QM(e)?{path:e}:typeof e==`string`||oN(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:XM.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<tN.length;){let e=tN[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)tN.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?HM.basename(this.path):void 0}set basename(e){iN(e,`basename`),rN(e,`basename`),this.path=HM.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?HM.dirname(this.path):void 0}set dirname(e){aN(this.basename,`dirname`),this.path=HM.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?HM.extname(this.path):void 0}set extname(e){if(rN(e,`extname`),aN(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=HM.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){QM(e)&&(e=$M(e)),iN(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?HM.basename(this.path,this.extname):void 0}set stem(e){iN(e,`stem`),rN(e,`stem`),this.path=HM.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 HD(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 rN(e,t){if(e&&e.includes(HM.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+HM.sep+"`")}function iN(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function aN(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function oN(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var sN=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),cN=l(RM(),1),lN={}.hasOwnProperty,uN=new class e extends sN{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=BM()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,cN.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(pN(`data`,this.frozen),this.namespace[e]=t,this):lN.call(this.namespace,e)&&this.namespace[e]||void 0:e?(pN(`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=gN(e),n=this.parser||this.Parser;return dN(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),dN(`process`,this.parser||this.Parser),fN(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=gN(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);vN(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(),dN(`processSync`,this.parser||this.Parser),fN(`processSync`,this.compiler||this.Compiler),this.process(e,r),hN(`processSync`,`process`,t),n;function r(e,r){t=!0,LM(e),n=r}}run(e,t,n){mN(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=gN(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),hN(`runSync`,`run`,n),r;function i(e,t){LM(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=gN(t),r=this.compiler||this.Compiler;return fN(`stringify`,r),mN(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(pN(`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,cN.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];zM(o)&&zM(r)&&(r=(0,cN.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function dN(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function fN(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function pN(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 mN(e){if(!zM(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function hN(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function gN(e){return _N(e)?e:new nN(e)}function _N(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function vN(e){return typeof e==`string`||yN(e)}function yN(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var bN=[],xN={allowDangerousHtml:!0},SN=/^(https?|ircs?|mailto|xmpp)$/i,CN=[{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 wN(e){let t=TN(e),n=EN(e);return DN(t.runSync(t.parse(n),n),e)}function TN(e){let t=e.rehypePlugins||bN,n=e.remarkPlugins||bN,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...xN}:xN;return uN().use(yj).use(n).use(IM,r).use(t)}function EN(e){let t=e.children||``,n=new nN;return typeof t==`string`?n.value=t:``+t,n}function DN(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||ON;for(let e of CN)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return EM(e,l),XD(e,{Fragment:R.Fragment,components:i,ignoreInvalidStyle:!0,jsx:R.jsx,jsxs:R.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 vO)if(Object.hasOwn(vO,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=vO[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 ON(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||SN.test(e.slice(0,t))?e:``}function kN(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 AN(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function jN(e,t,n){let r=hM((n||{}).ignore||[]),i=MN(t),a=-1;for(;++a<i.length;)wM(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 MN(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([NN(e[0]),PN(e[1])])}return t}function NN(e){return typeof e==`string`?new RegExp(AN(e),`g`):e}function PN(e){return typeof e==`function`?e:function(){return e}}var FN=`phrasing`,IN=[`autolink`,`link`,`image`,`label`];function LN(){return{transforms:[GN],enter:{literalAutolink:zN,literalAutolinkEmail:BN,literalAutolinkHttp:BN,literalAutolinkWww:BN},exit:{literalAutolink:WN,literalAutolinkEmail:UN,literalAutolinkHttp:VN,literalAutolinkWww:HN}}}function RN(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:FN,notInConstruct:IN},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:FN,notInConstruct:IN},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:FN,notInConstruct:IN}]}}function zN(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function BN(e){this.config.enter.autolinkProtocol.call(this,e)}function VN(e){this.config.exit.autolinkProtocol.call(this,e)}function HN(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 UN(e){this.config.exit.autolinkEmail.call(this,e)}function WN(e){this.exit(e)}function GN(e){jN(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,KN],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,qN]],{ignore:[`link`,`linkReference`]})}function KN(e,t,n,r,i){let a=``;if(!XN(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!JN(n)))return!1;let o=YN(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 qN(e,t,n,r){return!XN(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function JN(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 YN(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=kN(e,`(`),a=kN(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 XN(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||UO(n)||HO(n))&&(!t||n!==47)}oP.peek=aP;function ZN(){this.buffer()}function QN(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function $N(){this.buffer()}function eP(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function tP(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=NO(this.sliceSerialize(e)).toLowerCase(),n.label=t}function nP(e){this.exit(e)}function rP(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=NO(this.sliceSerialize(e)).toLowerCase(),n.label=t}function iP(e){this.exit(e)}function aP(){return`[`}function oP(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 sP(){return{enter:{gfmFootnoteCallString:ZN,gfmFootnoteCall:QN,gfmFootnoteDefinitionLabelString:$N,gfmFootnoteDefinition:eP},exit:{gfmFootnoteCallString:tP,gfmFootnoteCall:nP,gfmFootnoteDefinitionLabelString:rP,gfmFootnoteDefinition:iP}}}function cP(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:oP},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?`
71
- `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?uP:lP))),s(),o}}function lP(e,t,n){return t===0?e:uP(e,t,n)}function uP(e,t,n){return(n?``:` `)+e}var dP=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];gP.attention=_P,gP.peek=vP;function fP(){return{canContainEols:[`delete`],enter:{strikethrough:mP},exit:{strikethrough:hP}}}function pP(){return{handlers:{delete:gP},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:dP}]}}function mP(e){this.enter({type:`delete`,children:[],position:void 0},e)}function hP(e){this.exit(e)}function gP(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 _P(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function vP(){return`~`}function yP(e){return e.length}function bP(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||yP,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=xP(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]=SP(r[d]);else{let e=SP(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(`
72
- `)}function xP(e){return e==null?``:String(e)}function SP(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 CP=hM([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function wP(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()),TP);return i(),o}function TP(e,t,n){return`>`+(n?``:` `)+e}function EP(e,t){return DP(e,t.inConstruct,!0)&&!DP(e,t.notInConstruct,!1)}function DP(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 OP(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
73
- `&&!e.before&&!e.after&&EP(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
74
- `}function kP(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 AP(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 jP(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function MP(e,t,n,r){let i=jP(n),a=e.value||``;if(AP(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,NP);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(kP(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:`
75
- `,encode:["`"],...o.current()})),t()}return u+=o.move(`
76
- `),a&&(u+=o.move(a+`
77
- `)),u+=o.move(s),c(),u}function NP(e,t,n){return(n?``:` `)+e}function PP(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function FP(e,t,n,r){let i=PP(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?` `:`
78
- `,...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 IP(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}LP.attention=RP,LP.peek=zP;function LP(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function RP(e,t){return{construct:`emphasis`,markers:IP(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function zP(e,t,n){return n.options.emphasis||`*`}function BP(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function VP(e,t){let n=!1;return EM(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)&&bO(e)&&(t.options.setext||n))}function HP(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(VP(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
79
- `,after:`
80
- `});return r(),t(),o+`
81
- `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
82
- `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
83
- `,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=BP(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}UP.peek=WP;function UP(e){return e.value||``}function WP(){return`<`}GP.peek=KP;function GP(e,t,n,r){let i=PP(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 KP(){return`!`}qP.peek=JP;function qP(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 JP(){return`!`}YP.peek=XP;function YP(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 XP(){return"`"}function ZP(e,t){let n=bO(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))}QP.peek=$P;function QP(e,t,n,r){let i=PP(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(ZP(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 $P(e,t,n){return ZP(e,n)?`<`:`[`}eF.peek=tF;function eF(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 tF(){return`[`}function nF(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 rF(e){let t=nF(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 iF(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function aF(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 oF(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?iF(n):nF(n),s=e.ordered?o===`.`?`)`:`.`:rF(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),aF(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 sF(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 cF(e,t,n,r){let i=sF(n),a=n.bulletCurrent||nF(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 lF(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function uF(e,t,n,r){if(!e.children.some(function(e){return CP(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function dF(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}fF.attention=pF,fF.peek=mF;function fF(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function pF(e,t){return{construct:`strong`,markers:dF(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function mF(e,t,n){return n.options.strong||`*`}function hF(e,t,n,r){return n.safe(e.value,r)}function gF(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 _F(e,t,n){let r=(aF(n)+(n.options.ruleSpaces?` `:``)).repeat(gF(n));return n.options.ruleSpaces?r.slice(0,-1):r}var vF={blockquote:wP,break:OP,code:MP,definition:FP,emphasis:LP,hardBreak:OP,heading:HP,html:UP,image:GP,imageReference:qP,inlineCode:YP,link:QP,linkReference:eF,list:oF,listItem:cF,paragraph:lF,root:uF,strong:fF,text:hF,thematicBreak:_F};function yF(){return{enter:{table:bF,tableData:wF,tableHeader:wF,tableRow:SF},exit:{codeText:TF,table:xF,tableData:CF,tableHeader:CF,tableRow:CF}}}function bF(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 xF(e){this.exit(e),this.data.inTable=void 0}function SF(e){this.enter({type:`tableRow`,children:[]},e)}function CF(e){this.exit(e)}function wF(e){this.enter({type:`tableCell`,children:[]},e)}function TF(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,EF));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function EF(e,t){return t===`|`?t:e}function DF(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
84
- `,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(`
85
- `))}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 bP(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=vF.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function OF(){return{exit:{taskListCheckValueChecked:AF,taskListCheckValueUnchecked:AF,paragraph:jF}}}function kF(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:MF}}}function AF(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function jF(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 MF(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=vF.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 NF(){return[LN(),sP(),fP(),yF(),OF()]}function PF(e){return{extensions:[RN(),cP(e),pP(),DF(e),kF()]}}var FF={tokenize:YF,partial:!0},IF={tokenize:XF,partial:!0},LF={tokenize:ZF,partial:!0},RF={tokenize:QF,partial:!0},zF={tokenize:$F,partial:!0},BF={name:`wwwAutolink`,tokenize:qF,previous:eI},VF={name:`protocolAutolink`,tokenize:JF,previous:tI},HF={name:`emailAutolink`,tokenize:KF,previous:nI},UF={};function WF(){return{text:UF}}for(var GF=48;GF<123;)UF[GF]=HF,GF++,GF===58?GF=65:GF===91&&(GF=97);UF[43]=HF,UF[45]=HF,UF[46]=HF,UF[95]=HF,UF[72]=[HF,VF],UF[104]=[HF,VF],UF[87]=[HF,BF],UF[119]=[HF,BF];function KF(e,t,n){let r=this,i,a;return o;function o(t){return!rI(t)||!nI.call(r,r.previous)||iI(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return rI(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(zF,u,l)(t):t===45||t===95||FO(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&&PO(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function qF(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!eI.call(r,r.previous)||iI(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(FF,e.attempt(IF,e.attempt(LF,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function JF(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&tI.call(r,r.previous)&&!iI(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(PO(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||LO(t)||VO(t)||UO(t)||HO(t)?n(t):e.attempt(IF,e.attempt(LF,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function YF(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 XF(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(RF,c,s)(t):t===null||VO(t)||UO(t)||t!==45&&HO(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 ZF(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(RF,t,a)(o):o===null||VO(o)||UO(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function QF(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||VO(o)||UO(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||VO(e)||UO(e)?t(e):r(e)}function a(e){return PO(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):PO(t)?(e.consume(t),o):n(t)}}function $F(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return FO(e)?n(e):t(e)}}function eI(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||VO(e)}function tI(e){return!PO(e)}function nI(e){return!(e===47||rI(e))}function rI(e){return e===43||e===45||e===46||e===95||FO(e)}function iI(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 aI={tokenize:pI,partial:!0};function oI(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:uI,continuation:{tokenize:dI},exit:fI}},text:{91:{name:`gfmFootnoteCall`,tokenize:lI},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:sI,resolveTo:cI}}}}function sI(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=NO(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 cI(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 lI(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||VO(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(NO(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return VO(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 uI(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||VO(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=NO(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return VO(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),KO(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function dI(e,t,n){return e.check(uk,t,e.attempt(aI,t,n))}function fI(e){e.exit(`gfmFootnoteDefinition`)}function pI(e,t,n){let r=this;return KO(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 mI(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&&EO(o,o.length,0,rk(s,e.slice(r+1,n),t)),EO(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),EO(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=nk(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=nk(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var hI=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){gI(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 gI(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 _I(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 vI(){return{flow:{null:{name:`table`,tokenize:yI,resolveAll:bI}}}}function yI(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)?KO(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||VO(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)?KO(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)?KO(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)?KO(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)?KO(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||VO(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 bI(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 hI;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(SI(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=xI(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=xI(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=xI(f,t,o,i,n,d)):(o[0]=o[1],d=xI(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&SI(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=_I(t.events,n))}return e}function xI(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},CI(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=CI(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=CI(t.events,n[2]),a=CI(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({},CI(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function SI(e,t,n,r,i){let a=[],o=CI(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 CI(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var wI={name:`tasklistCheck`,tokenize:EI};function TI(){return{text:{91:wI}}}function EI(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 VO(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:DI},t,n)(r):n(r)}}function DI(e,t,n){return KO(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function OI(e){return kO([WF(),oI(),mI(e),vI(),TI()])}var kI={};function AI(e){let t=this,n=e||kI,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(OI(n)),a.push(NF()),o.push(PF(n))}var jI={neutral:`text-muted-foreground hover:text-foreground`,primary:``,danger:`text-destructive hover:bg-destructive/10 hover:text-destructive`};function $({label:e,icon:t,tone:n=`neutral`,shortcut:r,href:i,pressed:a,className:o,...s}){let c=q(jI[n],o),l=(0,R.jsx)(t,{"aria-hidden":`true`});return(0,R.jsxs)(vE,{children:[(0,R.jsx)(yE,{asChild:!0,children:i?(0,R.jsx)(J,{asChild:!0,variant:n===`primary`?`default`:`ghost`,size:`icon`,className:c,children:(0,R.jsx)(`a`,{href:i,target:`_blank`,rel:`noreferrer noopener`,"aria-label":e,children:l})}):(0,R.jsx)(J,{type:`button`,variant:n===`primary`?`default`:`ghost`,size:`icon`,"aria-label":e,"aria-pressed":a,className:c,...s,children:l})}),(0,R.jsxs)(bE,{children:[e,r?(0,R.jsx)(XT,{chord:r}):null]})]})}function MI({children:e,className:t}){function n(e){let t=e.key===`ArrowRight`?1:e.key===`ArrowLeft`?-1:0;if(!t)return;let n=[...e.currentTarget.querySelectorAll(`button:not([disabled]), a[href]`)],r=n.indexOf(e.target);r<0||(e.preventDefault(),e.stopPropagation(),n[Math.max(0,Math.min(n.length-1,r+t))]?.focus())}return(0,R.jsx)(`div`,{role:`toolbar`,"aria-label":`Actions`,onKeyDown:n,className:q(`sticky -top-4 z-10 -mx-4 -mt-4 flex min-h-10 flex-wrap items-center gap-0.5 border-b border-border bg-card/90 px-3 py-1 backdrop-blur-sm`,t),children:e})}var NI=new Set([`http:`,`https:`,`mailto:`,`tel:`]);function PI(e){let t=(e??``).trim();if(t===``)return``;if(/^[#/.]/.test(t))return t;try{let e=new URL(t,`https://example.invalid`);return NI.has(e.protocol)?t:``}catch{return``}}var FI=[`lobby`,`tasks`,`plan`,`quickfix`,`issues`,`excalidraw`,`git`,`knowledge`,`metrics`],II=`already answered in another window`,LI=`Attached files:`,RI=/^-\s+(.+?)\s+\(([^()\s]+\/[^()\s]+)\)\s*$/;function zI(e){let t=e.lastIndexOf(`${LI}\n`);if(t<0||t>0&&e[t-1]!==`
86
- `)return{body:e,files:[]};let n=e.slice(t+LI.length+1).split(`
87
- `).filter(Boolean),r=[];for(let t of n){let n=RI.exec(t);if(!n)return{body:e,files:[]};let i=n[1].split(/[\\/]/).pop()??``;if(!/^[\w.-]+$/.test(i))return{body:e,files:[]};r.push({id:i,name:i.replace(/^[a-z0-9]+-/,``),mime:n[2]})}return r.length>0?{body:e.slice(0,t).trimEnd(),files:r}:{body:e,files:[]}}var BI=new Set([`image/png`,`image/jpeg`,`image/gif`,`image/webp`]);function VI({files:e}){return e.length===0?null:(0,R.jsx)(`ul`,{className:`mt-2 flex flex-wrap gap-2`,"aria-label":`Attached files`,children:e.map(e=>(0,R.jsx)(`li`,{children:BI.has(e.mime)?(0,R.jsx)(`a`,{href:`/files/preview/attachments/${e.id}`,target:`_blank`,rel:`noopener noreferrer`,className:`block overflow-hidden rounded-lg border border-border bg-muted/40 transition-transform duration-150 ease-snap hover:scale-[1.02]`,children:(0,R.jsx)(`img`,{src:`/files/preview/attachments/${e.id}`,alt:e.name,loading:`lazy`,className:`max-h-40 max-w-56 object-cover`})}):(0,R.jsxs)(`span`,{className:`inline-flex max-w-64 items-center gap-2 rounded-lg border border-border bg-muted/40 px-3 py-2 text-xs text-muted-foreground`,children:[e.mime===`application/pdf`?(0,R.jsx)(Tp,{"aria-hidden":`true`,className:`size-4 shrink-0`}):(0,R.jsx)(pm,{"aria-hidden":`true`,className:`size-4 shrink-0`}),(0,R.jsx)(`span`,{className:`truncate`,children:e.name})]})},e.id))})}function HI(e){return e?e.type===`text`?e.value??``:(e.children??[]).map(e=>HI(e)).join(``):``}function UI(e){let t=e?.children?.find(e=>e.tagName===`code`)?.properties?.className,n=(Array.isArray(t)?t:[]).map(String).find(e=>e.startsWith(`language-`))?.slice(9)??``;return/^[\w+#.-]{1,20}$/.test(n)?n:``}function WI({node:e,children:t}){let[n,r]=(0,m.useState)(!1),i=HI(e),a=UI(e),o=(0,m.useCallback)(()=>{navigator.clipboard?.writeText(i).then(()=>{r(!0),window.setTimeout(()=>r(!1),1500)}).catch(()=>void 0)},[i]);return(0,R.jsxs)(`div`,{className:`relative my-3 rounded-lg bg-muted`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between pl-3`,children:[(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:a||`code`}),(0,R.jsx)($,{label:n?`Copied`:`Copy the code`,icon:n?Wf:pp,className:`size-7`,onClick:o,disabled:!i})]}),(0,R.jsx)(`pre`,{className:`!my-0 overflow-x-auto !rounded-t-none !bg-transparent px-3 pb-3 text-sm leading-relaxed [&>code]:block`,children:t})]})}function GI({href:e,children:t}){return(0,R.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer nofollow`,children:t})}var KI={pre:WI,a:GI,table:({children:e})=>(0,R.jsx)(`div`,{className:`my-3 w-full overflow-x-auto`,children:(0,R.jsx)(`table`,{className:`w-full border-collapse text-sm`,children:e})})},qI=(0,m.memo)(function({text:e,className:t}){let{body:n,files:r}=zI(e);return(0,R.jsxs)(`div`,{className:q(`md-body`,t),children:[n?(0,R.jsx)(wN,{remarkPlugins:[AI],urlTransform:PI,components:KI,children:n}):null,(0,R.jsx)(VI,{files:r})]})});function JI(e,t,n,r){let i=e.slice(0,t),a=e.slice(t,n),o=e.slice(n);if(a.length>=r.length*2&&a.startsWith(r)&&a.endsWith(r)){let e=a.slice(r.length,a.length-r.length);return{value:i+e+o,start:t,end:t+e.length}}return i.endsWith(r)&&o.startsWith(r)?{value:i.slice(0,i.length-r.length)+a+o.slice(r.length),start:t-r.length,end:n-r.length}:{value:i+r+a+r+o,start:t+r.length,end:n+r.length}}function YI(e,t,n){let r=e.slice(t,n)||`text`,i=`[${r}](url)`,a=t+r.length+3;return{value:e.slice(0,t)+i+e.slice(n),start:a,end:a+3}}var XI=/^(\s*)(?:([-*+])|(\d+)([.)]))\s+(\[[ xX]\]\s+)?/;function ZI(e,t){let n=e.lastIndexOf(`
88
- `,t-1)+1,r=e.indexOf(`
89
- `,t),i=e.slice(n,r<0?e.length:r),a=XI.exec(i);if(!a||t-n<a[0].length)return;let[o,s=``,c,l,u=`.`,d]=a;if(i.slice(o.length).trim()===``)return{value:e.slice(0,n)+e.slice(r<0?e.length:r),start:n,end:n};let f=`\n${s}${c??`${Number(l)+1}${u}`} ${d?`[ ] `:``}`;return{value:e.slice(0,t)+f+e.slice(t),start:t+f.length,end:t+f.length}}function QI(){let[e,t]=(0,m.useReducer)(e=>e+1,0);return(0,m.useEffect)(()=>Yd.subscribe(t),[]),e}function $I(){return QI(),Yd.status()}function eL(e){return QI(),Yd.get(e)}function tL(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 nL=new Set(FI);function rL(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(nL.has(n))return{kind:`tab`,tab:n,rest:t.slice(1)}}function iL(e,...t){return`#/${e}${t.filter(Boolean).map(e=>`/${encodeURIComponent(e)}`).join(``)}`}function aL(e){window.location.hash!==e&&(window.location.hash=e)}function oL(){let[e,t]=(0,m.useState)(()=>rL(window.location.hash)??{kind:`tab`,tab:`lobby`,rest:[]});return(0,m.useEffect)(()=>{let e=()=>{let e=rL(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}var sL={id:`oracle`,pill:`Oracle`,label:`Message the oracle`,placeholder:`Message the oracle…`};function cL(e){if(e)try{return decodeURIComponent(e)}catch{return e}}function lL(e,t,n){if(e.kind===`sessions`){let e={id:`newsession`,pill:`New session`,label:`Start a task in a new session`,placeholder:`Describe a task for a new session…`};return n?[{id:`session`,pill:`Message`,label:`Message ${n.name}`,placeholder:`Message ${n.name}…`,session:n},e,sL]:[e,sL]}if(e.kind!==`tab`)return[sL];if(e.tab===`plan`)return[{id:`panel`,pill:`Panel`,label:`Message the panel`,placeholder:`Describe a task, or answer the panel…`},sL];if(e.tab===`quickfix`)return[{id:`quickfix`,pill:`Quick fix`,label:`Describe a quick fix`,placeholder:`Describe a small change…`},sL];let r=e.tab===`tasks`?cL(e.rest[0])??t:void 0;return r?[{id:`comment`,pill:`Comment`,label:`Comment on ${r}`,placeholder:`Comment on ${r}'s plan…`,taskId:r},{id:`task`,pill:`Task's oracle`,label:`Message ${r}'s oracle`,placeholder:`Leave a message for ${r}'s oracle…`,taskId:r},sL]:[sL]}var uL=0,dL=`inline-flex size-8 items-center justify-center rounded-lg text-muted-foreground transition-[background-color,color,transform] duration-150 ease-snap outline-none hover:bg-accent hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/40 active:scale-95`;function fL(e){return e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing}function pL({file:e,onRemove:t}){let n=(0,R.jsx)(`button`,{type:`button`,"aria-label":`Remove ${e.name}`,onClick:t,className:q(`flex shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors outline-none hover:bg-accent hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/40`,e.image?`absolute top-1 right-1 size-5 bg-background/80 text-foreground backdrop-blur-sm`:`size-7`),children:(0,R.jsx)(lh,{"aria-hidden":`true`,className:`size-3.5`})});return e.image?(0,R.jsxs)(Rd.li,{layout:!0,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{type:`spring`,stiffness:520,damping:32},title:`${e.name} · ${BE(e.size)}`,className:`relative size-16 shrink-0 overflow-hidden rounded-lg border border-border bg-muted`,children:[(0,R.jsx)(`img`,{src:e.image,alt:e.name,className:`size-full object-cover`}),e.state===`uploading`?(0,R.jsx)(`span`,{className:`absolute inset-0 flex items-center justify-center bg-background/60`,children:(0,R.jsx)(gE,{className:`size-4`,"aria-hidden":`true`,role:`presentation`})}):null,n]}):(0,R.jsxs)(Rd.li,{layout:!0,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{type:`spring`,stiffness:520,damping:32},className:`flex h-9 min-w-0 items-center gap-2 rounded-lg bg-muted pr-1 pl-2.5`,children:[(0,R.jsxs)(`span`,{className:`relative flex shrink-0 items-center justify-center text-muted-foreground`,children:[(0,R.jsx)(Tp,{"aria-hidden":`true`,className:`size-4`}),e.state===`uploading`?(0,R.jsx)(gE,{className:`absolute -right-1 -bottom-1 size-2.5`,"aria-hidden":`true`,role:`presentation`}):null]}),(0,R.jsxs)(`span`,{className:`min-w-0 max-w-40`,children:[(0,R.jsx)(`span`,{className:`block truncate text-xs font-medium`,children:e.name}),(0,R.jsx)(`span`,{className:`block text-[0.65rem] leading-tight text-muted-foreground`,children:e.state===`uploading`?`uploading…`:BE(e.size)})]}),n]})}function mL({route:e,keys:t,onHelp:n}){let[r,i]=(0,m.useState)(``),[a,o]=(0,m.useState)([]),[s,c]=(0,m.useState)(!1),[l,u]=(0,m.useState)(!1),[d,f]=(0,m.useState)(!1),[p,h]=(0,m.useState)(!1),[g,_]=(0,m.useState)(),v=eL(`status`),y=eL(`lobby`),b=sE(),x=(v.data?.busy??!1)||!!y.data?.reply?.trim(),{taskId:S,session:C}=DE(),w=(0,m.useMemo)(()=>lL(e,S,C),[e,S,C]),T=w.map(e=>`${e.id}:${e.taskId??e.session?.name??``}`).join(`|`),E=w.find(e=>e.id===g)??w[0];(0,m.useEffect)(()=>_(void 0),[T]);let ee=(0,m.useRef)(null),D=(0,m.useRef)(null),O=(0,m.useRef)(null),te=(0,m.useRef)(null),k=(0,m.useRef)(a);k.current=a;let A=(0,m.useRef)(void 0);(0,m.useLayoutEffect)(()=>{let e=A.current,t=O.current;e&&t&&(A.current=void 0,t.setSelectionRange(e.start,e.end))},[r]);let j=(0,m.useCallback)(e=>{A.current={start:e.start,end:e.end},i(e.value)},[]);(0,m.useEffect)(()=>{let e=ee.current;if(!e)return;let t=document.documentElement,n=()=>t.style.setProperty(`--composer-h`,`${Math.ceil(e.getBoundingClientRect().height)}px`);n();let r=new ResizeObserver(n);return r.observe(e),()=>{r.disconnect(),t.style.removeProperty(`--composer-h`)}},[]);let ne=(0,m.useRef)(0);(0,m.useLayoutEffect)(()=>{let e=D.current;if(!e)return;let t=e.offsetHeight,n=ne.current;if(ne.current=t,!n||n===t||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;e.style.height=`${n}px`,e.style.overflow=`hidden`;let r=Ld(e,{height:`${t}px`},{type:`spring`,stiffness:380,damping:34});return r.finished.then(()=>{e.style.height=``,e.style.overflow=``,ne.current=e.offsetHeight}),()=>r.stop()},[s]);let re=(0,m.useCallback)(e=>{let t=[...e],n=8-k.current.length;t.length>n&&af.warning(`At most 8 files go with one message.`);for(let e of t.slice(0,Math.max(0,n))){let t=`f${++uL}`,n=e.type.startsWith(`image/`)?URL.createObjectURL(e):void 0;o(r=>[...r,{key:t,name:e.name||(n?`image.png`:`file`),size:e.size,...n?{image:n}:{},state:`uploading`}]),VE(e).then(e=>o(n=>n.map(n=>n.key===t?{...n,state:`ready`,info:e}:n))).catch(e=>{af.error(e instanceof Error?e.message:`That file did not upload.`),o(e=>e.filter(e=>e.key!==t))})}},[]),M=(0,m.useCallback)(e=>{o(t=>{let n=t.find(t=>t.key===e);return n?.image&&URL.revokeObjectURL(n.image),t.filter(t=>t.key!==e)})},[]),ie=a.some(e=>e.state===`uploading`),ae=a.flatMap(e=>e.info?[e.info.id]:[]),oe=(r.trim().length>0||ae.length>0)&&!ie&&!d,se=(0,m.useCallback)(async()=>{if(!oe)return;f(!0);let e=ae.length>0?ae:void 0,t={text:r,...e?{attachments:e}:{}};try{let n=!0;if(E.id===`oracle`){let e=await uf(`lobby.send`,t);e.notice&&af(e.notice)}else if(E.id===`panel`)n=await V(`planner.send`,t)!==void 0;else if(E.id===`quickfix`)n=await V(`quickfix.submit`,t)!==void 0;else if(E.id===`task`)n=await V(`tasks.message`,{taskId:E.taskId,...t})!==void 0;else if(E.id===`session`)n=await V(`sessions.message`,{...E.session.address,...t})!==void 0;else if(E.id===`newsession`){let t=await V(`sessions.start`,{request:r,...e?{attachments:e}:{}});n=t!==void 0,t?.key&&aL(`#/sessions/${encodeURIComponent(t.key)}`)}else n=await V(`tasks.comment`,{taskId:E.taskId,...t})!==void 0;if(n){i(``);for(let e of k.current)e.image&&URL.revokeObjectURL(e.image);o([])}}catch(e){af.error(e instanceof Error?e.message:`Could not send`)}finally{f(!1)}},[oe,ae,E,r]),ce=(0,m.useCallback)(async()=>{try{await uf(`lobby.abort`,{})}catch(e){af.error(e instanceof Error?e.message:`Could not stop`)}},[]);return(0,R.jsx)(`div`,{ref:ee,className:q(`shrink-0 px-4 pt-0.5 pb-[max(0.75rem,env(safe-area-inset-bottom))] transition-opacity duration-200 ease-snap`,b&&`opacity-0`),inert:b,children:(0,R.jsxs)(`div`,{className:q(`mx-auto w-full transition-[max-width] duration-300 ease-snap`,s?`max-w-4xl`:`max-w-3xl`),children:[(0,R.jsxs)(`div`,{className:q(`group/composer rounded-lg border border-input bg-card transition-[border-color,box-shadow] duration-200 ease-snap focus-within:border-ring/60`,p&&`border-primary ring-3 ring-ring/30`),onDragOver:e=>{e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),h(!0))},onDragLeave:()=>h(!1),onDrop:e=>{e.preventDefault(),h(!1),e.dataTransfer.files.length>0&&re(e.dataTransfer.files)},children:[(0,R.jsx)(Cl,{initial:!1,children:a.length>0?(0,R.jsx)(Rd.ul,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:{type:`spring`,stiffness:420,damping:36},"aria-label":`Attachments`,className:`flex flex-wrap items-end gap-2 overflow-hidden px-3 pt-3`,children:a.map(e=>(0,R.jsx)(pL,{file:e,onRemove:()=>M(e.key)},e.key))},`files`):null}),l?(0,R.jsx)(`div`,{"aria-label":`Markdown preview`,role:`region`,className:`max-h-48 overflow-y-auto border-b border-border px-3 py-2`,children:r.trim()?(0,R.jsx)(qI,{text:r}):(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Nothing to preview yet.`})}):null,(0,R.jsxs)(`div`,{ref:D,className:`flex items-start gap-2 px-3 py-2`,children:[(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`pt-px font-mono text-base leading-relaxed text-primary select-none md:text-sm md:leading-relaxed`,children:`>`}),(0,R.jsx)(`textarea`,{ref:O,id:`composer-text`,"aria-label":E.label,value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{if(e.key===`Escape`&&!e.nativeEvent.isComposing){e.preventDefault(),RE();return}let t=e.currentTarget,n=e.key.toLowerCase();if((e.ctrlKey||e.metaKey)&&!e.altKey&&!e.shiftKey&&[`b`,`i`,`e`,`k`].includes(n)){e.preventDefault();let{selectionStart:r,selectionEnd:i,value:a}=t;j(n===`k`?YI(a,r,i):JI(a,r,i,n===`b`?`**`:n===`i`?`_`:"`"));return}if(e.altKey&&!e.ctrlKey&&!e.metaKey&&n===`p`){e.preventDefault(),u(e=>!e);return}if(e.key===`Enter`&&e.shiftKey&&!e.nativeEvent.isComposing&&t.selectionStart===t.selectionEnd){let n=ZI(t.value,t.selectionStart);n&&(e.preventDefault(),j(n));return}if(e.key===`Backspace`&&t.value===``&&k.current.length>0){e.preventDefault(),M(k.current.at(-1).key);return}(fL(e)||e.key===`Enter`&&(e.metaKey||e.ctrlKey))&&(e.preventDefault(),se())},onPaste:e=>{let t=[...e.clipboardData.files];t.length!==0&&(e.preventDefault(),re(t))},placeholder:x&&E.id===`oracle`?`The oracle is working — Enter steers it…`:E.placeholder,rows:1,className:q(`w-full min-w-0 flex-1 resize-none bg-transparent font-mono text-base leading-relaxed caret-primary outline-none placeholder:text-muted-foreground md:text-sm md:leading-relaxed`,`field-sizing-content`,s?`max-h-[60svh] min-h-[min(46svh,24rem)]`:`max-h-[34svh] min-h-6`)})]})]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-1 pt-1.5`,children:[(0,R.jsx)(`input`,{ref:te,type:`file`,multiple:!0,hidden:!0,tabIndex:-1,"aria-label":`Attach files`,onChange:e=>{re(e.target.files??[]),e.target.value=``}}),(0,R.jsxs)(vE,{children:[(0,R.jsx)(yE,{asChild:!0,children:(0,R.jsx)(`button`,{type:`button`,"aria-label":`Attach images, PDFs or files`,onClick:()=>te.current?.click(),className:dL,children:(0,R.jsx)(pm,{"aria-hidden":`true`,className:`size-[1.1rem]`})})}),(0,R.jsx)(bE,{children:`Attach images, PDFs or files`})]}),(0,R.jsxs)(vE,{children:[(0,R.jsx)(yE,{asChild:!0,children:(0,R.jsx)(`button`,{type:`button`,"aria-label":s?`Make the box smaller`:`Open the box wider and taller`,"aria-pressed":s,onClick:()=>c(e=>!e),className:dL,children:s?(0,R.jsx)(tm,{"aria-hidden":`true`,className:`size-4`}):(0,R.jsx)(Gp,{"aria-hidden":`true`,className:`size-4`})})}),(0,R.jsx)(bE,{children:s?`Smaller`:`Bigger`})]}),(0,R.jsxs)(vE,{children:[(0,R.jsx)(yE,{asChild:!0,children:(0,R.jsx)(`button`,{type:`button`,"aria-label":`Preview the Markdown`,"aria-pressed":l,"aria-keyshortcuts":`Alt+P`,onClick:()=>u(e=>!e),className:q(dL,l&&`bg-tab text-foreground`),children:(0,R.jsx)(yp,{"aria-hidden":`true`,className:`size-4`})})}),(0,R.jsxs)(bE,{children:[`Preview `,(0,R.jsx)(XT,{chord:`Alt+P`})]})]}),w.length>1?(0,R.jsx)(`div`,{role:`radiogroup`,"aria-label":`Send to`,className:`ml-1 flex items-center gap-0.5`,children:w.map(e=>(0,R.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":e.id===E.id,onClick:()=>_(e.id),className:q(`h-8 rounded-lg px-3 text-xs font-medium transition-[background-color,color] duration-150 outline-none focus-visible:ring-3 focus-visible:ring-ring/40`,e.id===E.id?`bg-tab text-foreground`:`text-muted-foreground hover:text-foreground`),children:e.pill},e.id))}):(0,R.jsxs)(`span`,{className:`ml-1 px-2 text-xs text-muted-foreground`,children:[`To the `,E.pill.toLowerCase()]}),(0,R.jsx)(`div`,{className:`@container ml-auto flex min-w-0 flex-1 items-center justify-end overflow-hidden px-2`,children:(0,R.jsxs)(`div`,{className:`flex items-center justify-end gap-3.5`,children:[e.kind===`tab`&&e.tab===`plan`?(0,R.jsx)(ZT,{chord:t.savePlan??`Ctrl+S`,className:`hidden @[30rem]:inline-flex`,children:`save plan`}):null,(0,R.jsx)(ZT,{chord:`Shift+Enter`,className:`hidden @[22rem]:inline-flex`,children:`new line`}),(0,R.jsx)(ZT,{chord:`Enter`,className:`hidden @[11rem]:inline-flex`,children:`send`}),(0,R.jsxs)(`button`,{type:`button`,"aria-label":`Keyboard shortcuts`,"aria-haspopup":`dialog`,onClick:n,className:`inline-flex h-8 shrink-0 items-center gap-1.5 rounded-lg px-1.5 text-xs text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/40`,children:[(0,R.jsx)(XT,{chord:t.help??`Alt+H`}),(0,R.jsx)(`span`,{className:`hidden @[8rem]:inline`,children:`shortcuts`})]})]})}),x&&E.id===`oracle`?(0,R.jsxs)(vE,{children:[(0,R.jsx)(yE,{asChild:!0,children:(0,R.jsx)(`button`,{type:`button`,"aria-label":`Stop`,onClick:()=>void ce(),className:`inline-flex size-8 items-center justify-center rounded-lg bg-secondary text-foreground transition-[background-color,transform] duration-150 ease-snap outline-none hover:bg-accent focus-visible:ring-3 focus-visible:ring-ring/40 active:scale-95`,children:(0,R.jsx)(Zm,{"aria-hidden":`true`,className:`size-3.5 fill-current`})})}),(0,R.jsx)(bE,{children:`Stop the oracle`})]}):null,(0,R.jsxs)(vE,{children:[(0,R.jsx)(yE,{asChild:!0,children:(0,R.jsx)(`button`,{type:`button`,"aria-label":`Send`,"aria-keyshortcuts":`Enter`,onClick:()=>void se(),disabled:!oe,className:`inline-flex size-8 items-center justify-center rounded-lg bg-primary text-primary-foreground transition-[opacity,transform,filter] duration-150 ease-snap outline-none hover:brightness-110 focus-visible:ring-3 focus-visible:ring-ring/40 active:scale-95 disabled:opacity-40 disabled:hover:brightness-100`,children:d?(0,R.jsx)(gE,{"aria-hidden":`true`,role:`presentation`,className:`size-4 text-primary-foreground`}):(0,R.jsx)(If,{"aria-hidden":`true`,className:`size-[1.15rem]`})})}),(0,R.jsxs)(bE,{children:[`Send `,(0,R.jsx)(XT,{chord:`Enter`})]})]})]})]})})}var hL=`(prefers-color-scheme: dark)`,gL=[`dark`,`light`,`system`],_L=m.createContext(void 0);function vL(e){return e!==null&&gL.includes(e)}function yL(){return window.matchMedia(hL).matches?`dark`:`light`}function bL(){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 xL(e){return e instanceof HTMLElement&&!!(e.isContentEditable||e.closest(`input, textarea, select, [contenteditable='true']`))}function SL({children:e,defaultTheme:t=`system`,storageKey:n=`theme`,disableTransitionOnChange:r=!0,...i}){let[a,o]=m.useState(()=>{let e=localStorage.getItem(n);return vL(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`?yL():e,i=r?bL():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(hL),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||xL(e.target)||e.key.toLowerCase()===`d`&&o(e=>{let t=e===`dark`?`light`:e===`light`?`dark`:yL()===`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(vL(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,R.jsx)(_L.Provider,{...i,value:l,children:e})}var CL=()=>{let e=m.useContext(_L);if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e};function wL({state:e}){return e===`live`?(0,R.jsx)(`span`,{title:`Connected`,"aria-label":`Connected`,className:`size-2 rounded-full bg-success`}):e===`connecting`?(0,R.jsxs)(`span`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,R.jsx)(gE,{"aria-hidden":`true`,role:`presentation`,className:`size-3`}),`reconnecting…`]}):(0,R.jsx)(`span`,{className:`text-xs font-medium text-destructive`,children:`Connection lost`})}var TL=`inline-flex size-8 items-center justify-center rounded-lg border border-transparent text-muted-foreground transition-[background-color,color,transform] duration-150 ease-snap outline-none hover:bg-accent hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/40 active:scale-95`;function EL({label:e,hint:t,href:n,active:r,children:i}){return(0,R.jsxs)(vE,{children:[(0,R.jsx)(yE,{asChild:!0,children:(0,R.jsx)(`a`,{href:n,"aria-label":e,"aria-current":r?`page`:void 0,"aria-keyshortcuts":t,className:q(TL,r&&`bg-accent text-foreground`),children:i})}),(0,R.jsxs)(bE,{children:[e,` `,(0,R.jsx)(XT,{chord:t})]})]})}function DL({hint:e,onHelp:t}){return(0,R.jsxs)(vE,{children:[(0,R.jsx)(yE,{asChild:!0,children:(0,R.jsx)(`button`,{type:`button`,"aria-label":`Keyboard shortcuts`,"aria-haspopup":`dialog`,"aria-keyshortcuts":e,onClick:t,className:TL,children:(0,R.jsx)(Fp,{"aria-hidden":`true`,className:`size-[1.1rem]`})})}),(0,R.jsxs)(bE,{children:[`Keyboard shortcuts `,(0,R.jsx)(XT,{chord:e})]})]})}function OL(){let{theme:e,setTheme:t}=CL(),n=e===`dark`||e===`system`&&typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches;return(0,R.jsxs)(vE,{children:[(0,R.jsx)(yE,{asChild:!0,children:(0,R.jsx)(`button`,{type:`button`,"aria-label":n?`Switch to light mode`:`Switch to dark mode`,onClick:()=>t(n?`light`:`dark`),className:TL,children:n?(0,R.jsx)($m,{"aria-hidden":`true`,className:`size-[1.1rem]`}):(0,R.jsx)(lm,{"aria-hidden":`true`,className:`size-[1.1rem]`})})}),(0,R.jsx)(bE,{children:n?`Light mode`:`Dark mode`})]})}function kL({status:e,task:t,connection:n,route:r,tabs:i,extra:a,keys:o,onHelp:s}){let c=e?.workspace.name??`bot-lobby`,l=e?.branch??e?.workspace.branch,u=e?.busy??!1;return(0,R.jsxs)(`header`,{className:`grid shrink-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 gap-y-2 px-4 pt-3 pb-2 [grid-template-areas:'title_status'_'tabs_tabs'] min-[1560px]:grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] min-[1560px]:[grid-template-areas:'title_tabs_status']`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2.5 [grid-area:title]`,children:[(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`size-2.5 shrink-0 rounded-full bg-primary`}),(0,R.jsx)(`span`,{className:`truncate text-sm font-medium`,children:c}),l?(0,R.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1 truncate rounded-lg bg-muted px-2.5 py-1 text-xs text-muted-foreground`,children:[(0,R.jsx)(Dp,{"aria-hidden":`true`,className:`size-3 shrink-0`}),(0,R.jsx)(`span`,{className:`truncate`,children:l})]}):null]}),(0,R.jsx)(`div`,{className:`min-w-0 [grid-area:tabs]`,children:i}),(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center justify-end gap-1 [grid-area:status]`,children:[a,(0,R.jsxs)(`div`,{className:`mr-2 flex min-w-0 items-center gap-2 text-sm`,children:[u?(0,R.jsx)(gE,{"aria-hidden":`true`,role:`presentation`,className:`size-3.5`}):null,t?(0,R.jsxs)(`span`,{className:`hidden max-w-[16rem] truncate sm:inline`,children:[(0,R.jsx)(`span`,{className:`font-medium`,children:t.id}),` `,(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:t.state.replace(/_/g,` `)})]}):(0,R.jsx)(`span`,{className:`hidden max-w-[12rem] truncate text-muted-foreground md:inline`,children:e?.sessionName??`no task in this session`}),(0,R.jsx)(wL,{state:n})]}),(0,R.jsx)(EL,{label:`Sessions`,hint:o.sessions??`Alt+O`,href:`#/sessions`,active:r.kind===`sessions`,children:(0,R.jsx)(Lp,{"aria-hidden":`true`,className:`size-[1.1rem]`})}),(0,R.jsx)(EL,{label:`Settings`,hint:o.settings??`Alt+S`,href:`#/settings`,active:r.kind===`settings`,children:(0,R.jsx)(Um,{"aria-hidden":`true`,className:`size-[1.1rem]`})}),(0,R.jsx)(DL,{hint:o.help??`Alt+H`,onHelp:s}),(0,R.jsx)(OL,{})]})]})}function AL(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 jL(){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 ff()?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(AL(e))}return(0,R.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,R.jsxs)(`form`,{onSubmit:s,className:`glass flex w-full max-w-md flex-col gap-4 rounded-lg p-7`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(Np,{className:`size-5`,"aria-hidden":`true`}),(0,R.jsx)(`h1`,{className:`text-base font-medium`,children:`Sign in to bot-lobby`})]}),(0,R.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Pi printed a link when it started (or run `,(0,R.jsx)(`code`,{className:`rounded-lg bg-muted px-1.5 py-0.5 font-mono text-xs`,children:`/bot-lobby web`}),`to see it again). Paste it here.`]}),(0,R.jsxs)(`label`,{className:`flex flex-col gap-1.5 text-sm`,children:[(0,R.jsx)(`span`,{className:`font-medium`,children:`Lobby link or token`}),(0,R.jsx)(`input`,{value:e,onChange:e=>t(e.target.value),autoComplete:`off`,spellCheck:!1,placeholder:`http://127.0.0.1:7347/#token=…`,className:`h-8 rounded-lg border border-input bg-card/40 px-3.5 text-sm outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30`})]}),n?(0,R.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:n}):null,(0,R.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,R.jsx)(J,{type:`button`,variant:`ghost`,disabled:i,onClick:()=>void o(void 0),children:`Retry`}),(0,R.jsx)(J,{type:`submit`,disabled:i||!e.trim(),children:`Sign in`})]})]})})}function ML({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`empty`,className:q(`flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-lg border-dashed p-6 text-center text-balance`,e),...t})}function NL({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`empty-header`,className:q(`flex max-w-sm flex-col items-center gap-2`,e),...t})}function PL({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`empty-title`,className:q(`text-sm font-medium tracking-tight`,e),...t})}function FL({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`empty-description`,className:q(`text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function IL({label:e=`Connecting…`}){return(0,R.jsxs)(`div`,{className:`flex min-h-svh items-center justify-center gap-2 text-sm text-muted-foreground`,children:[(0,R.jsx)(gE,{}),(0,R.jsx)(`span`,{children:e})]})}function LL({message:e,onRetry:t}){return(0,R.jsxs)(ML,{className:`glass m-4 flex-1 border-destructive/40`,children:[(0,R.jsxs)(NL,{children:[(0,R.jsxs)(PL,{className:`flex items-center gap-2`,children:[(0,R.jsx)(rh,{className:`size-4 text-destructive`,"aria-hidden":`true`}),`Could not load this view`]}),(0,R.jsx)(FL,{children:e??`The request failed. Try again.`})]}),t?(0,R.jsxs)(J,{variant:`outline`,onClick:t,children:[(0,R.jsx)(Nm,{"aria-hidden":`true`}),`Try again`]}):null]})}function RL({onRetry:e}){return(0,R.jsxs)(`div`,{role:`status`,className:`mx-4 mt-1 flex items-center gap-2 rounded-lg bg-destructive/10 px-4 py-2 text-sm text-destructive`,children:[(0,R.jsx)(sh,{className:`size-4`,"aria-hidden":`true`}),(0,R.jsx)(`span`,{children:`Connection lost — retrying every 2 s.`}),e?(0,R.jsx)(J,{variant:`link`,className:`h-8 px-1 text-destructive`,onClick:e,children:`Retry now`}):null]})}var zL={lobby:$p,tasks:zp,plan:Fm,quickfix:dh,issues:tp,metrics:Hf,git:kp,knowledge:Rf,excalidraw:_m};function BL(e){return/(\d)$/.exec(e)?.[1]}var VL=(0,m.forwardRef)(function({tab:e,active:t},n){let r=BL(e.key),i=zL[e.id];return(0,R.jsxs)(vE,{children:[(0,R.jsx)(yE,{asChild:!0,children:(0,R.jsxs)(`a`,{ref:n,role:`tab`,id:`tab-${e.id}`,href:`#/${e.id}`,"aria-selected":t,"aria-keyshortcuts":e.key,tabIndex:t?0:-1,className:q(`relative z-10 inline-flex h-8 shrink-0 items-center gap-1.5 rounded-lg px-3 text-[0.8125rem] font-medium whitespace-nowrap outline-none`,`transition-colors duration-200 ease-snap focus-visible:ring-3 focus-visible:ring-ring/40`,t?`text-foreground`:`text-muted-foreground hover:text-foreground`),children:[i?(0,R.jsx)(i,{"aria-hidden":`true`,className:q(`size-4 shrink-0 transition-colors duration-200`,t&&`text-primary`)}):null,(0,R.jsxs)(`span`,{children:[r?(0,R.jsxs)(`span`,{"aria-hidden":`true`,children:[r,`-`]}):null,e.label]})]})}),(0,R.jsxs)(bE,{children:[e.label,` `,(0,R.jsx)(XT,{chord:e.key})]})]})});function HL(e,t){let n=(0,m.useRef)(null),r=(0,m.useRef)(null),i=(0,m.useRef)({}),a=(0,m.useRef)(void 0),o=(0,m.useRef)(1),s=(0,m.useRef)([]),c=(0,m.useCallback)(e=>{let t=r.current;if(!t)return;let n=Math.max(e.right-e.left,o.current*.8),i=Math.max(0,n/o.current-1),a=1-Math.min(i*.1,.16);t.style.width=`${n}px`,t.style.transform=`translateX(${e.left}px) scaleY(${a})`},[]),l=(0,m.useCallback)(()=>{for(let e of s.current)e.stop();s.current=[]},[]),u=(0,m.useCallback)((e,t)=>{let n=r.current;if(!n)return;if(l(),!e){n.style.opacity=`0`,a.current=void 0;return}o.current=e.right-e.left;let i=a.current,u=typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;if(n.style.opacity=`1`,!i||!t||u){a.current=e,c(e);return}let d=e.left>=i.left,f={stiffness:520,damping:34,mass:.9},p={stiffness:230,damping:27,mass:1},m={...i},h=()=>{a.current={...m},c(m)};s.current=[Ld(i.right,e.right,{type:`spring`,...d?f:p,onUpdate:e=>{m.right=e,h()}}),Ld(i.left,e.left,{type:`spring`,...d?p:f,onUpdate:e=>{m.left=e,h()}})]},[c,l]),d=(0,m.useCallback)(()=>{let t=e?i.current[e]:void 0;return t?{left:t.offsetLeft,right:t.offsetLeft+t.offsetWidth}:void 0},[e]);(0,m.useLayoutEffect)(()=>{u(d(),!0)},[d,u,t]);let f=(0,m.useRef)({measure:d,place:u});return f.current={measure:d,place:u},(0,m.useEffect)(()=>{let e=n.current;if(!e)return;let t=!0,r=new ResizeObserver(()=>{if(t){t=!1;return}f.current.place(f.current.measure(),!1)});return r.observe(e),()=>{r.disconnect(),l()}},[l]),{track:n,drop:r,cells:i}}function UL({tabs:e,activeId:t,onSelect:n}){let{track:r,drop:i,cells:a}=HL(t,e.length),o=(0,m.useRef)(null);(0,m.useEffect)(()=>{let e=o.current,n=t?a.current[t]:void 0;e&&n&&(n.offsetLeft<e.scrollLeft?e.scrollLeft=n.offsetLeft-8:n.offsetLeft+n.offsetWidth>e.scrollLeft+e.clientWidth&&(e.scrollLeft=n.offsetLeft+n.offsetWidth-e.clientWidth+8))},[t,a]);function s(r){if(r.key===`ArrowDown`&&!r.altKey){LE()&&r.preventDefault();return}let i=r.key===`ArrowRight`?1:r.key===`ArrowLeft`?-1:0;if(!i||e.length===0)return;r.preventDefault();let o=e[(Math.max(0,e.findIndex(e=>e.id===t))+i+e.length)%e.length];zE.active=!0,window.setTimeout(()=>{zE.active=!1},400),n(o.id),a.current[o.id]?.focus({preventScroll:!0})}return(0,R.jsx)(`div`,{ref:o,className:`min-w-0 max-w-full overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,children:(0,R.jsxs)(`div`,{ref:r,role:`tablist`,"aria-label":`Lobby tabs`,onKeyDown:s,className:`relative mx-auto flex w-max items-center py-1`,children:[(0,R.jsx)(`span`,{ref:i,"aria-hidden":`true`,className:`pointer-events-none absolute top-1 left-0 z-0 h-8 origin-center rounded-lg bg-tab opacity-0 will-change-transform`}),e.map((e,n)=>(0,R.jsxs)(m.Fragment,{children:[n>0?(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`mx-1 w-3 shrink-0 border-t-2 border-dotted border-border sm:w-5`}):null,(0,R.jsx)(VL,{ref:t=>{a.current[e.id]=t},tab:e,active:e.id===t})]},e.id))]})})}function WL({className:e,...t}){return(0,R.jsx)(`textarea`,{"data-slot":`textarea`,className:q(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-card/40 px-3.5 py-2.5 text-base transition-[border-color,box-shadow] duration-150 outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 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:disabled:bg-input/80`,e),...t})}var GL=/\s*\(recommended\)\s*$/i,KL=`Type something.`;function qL(e){return{text:e.replace(GL,``),recommended:GL.test(e)}}function JL({label:e}){let{text:t,recommended:n}=qL(e);return(0,R.jsxs)(`span`,{className:`leading-snug`,children:[t,n?(0,R.jsx)(`span`,{className:`ms-1 font-medium text-primary`,children:`(Recommended)`}):null]})}function YL({multi:e,on:t}){return(0,R.jsxs)(`span`,{"aria-hidden":`true`,className:q(`relative mt-0.5 flex size-4 shrink-0 items-center justify-center border`,e?`rounded-lg`:`rounded-full`,t?`border-primary bg-primary text-primary-foreground`:`border-input`),children:[t?(0,R.jsx)(Wf,{className:q(e?`size-3`:`hidden`)}):null,t&&!e?(0,R.jsx)(`span`,{className:`size-2 rounded-full bg-primary-foreground`}):null]})}function XL({option:e,index:t,multi:n,name:r,selected:i,onToggle:a,onFocusOption:o}){return(0,R.jsxs)(`label`,{className:q(`flex min-h-9 cursor-pointer items-start gap-2.5 rounded-lg border px-3 py-2 text-start text-sm transition-[background-color,border-color,transform] duration-150 ease-snap active:scale-[0.99]`,i?`border-primary/50 bg-accent`:`border-input bg-card/40 hover:bg-accent/60`,`has-[:focus-visible]:border-ring has-[:focus-visible]:ring-3 has-[:focus-visible]:ring-ring/30`),children:[(0,R.jsx)(`input`,{type:n?`checkbox`:`radio`,name:r,"data-nav":``,"data-option":t,className:`sr-only`,checked:i,onChange:a,onFocus:o}),(0,R.jsx)(YL,{multi:n,on:i}),(0,R.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,R.jsxs)(`span`,{className:`flex gap-1.5`,children:[(0,R.jsxs)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground tabular-nums`,children:[t+1,`.`]}),(0,R.jsx)(JL,{label:e.label})]}),e.description?(0,R.jsx)(qI,{text:e.description,className:`text-muted-foreground`}):null]})]})}function ZL({option:e}){return!e||!e.preview&&!e.image?null:(0,R.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-lg border bg-muted/30 p-3`,children:[(0,R.jsxs)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:[`Preview · `,qL(e.label).text]}),e.image?(0,R.jsx)(`img`,{src:e.image,alt:``,loading:`lazy`,className:`max-h-64 w-full rounded-lg border object-contain`}):null,e.preview?(0,R.jsx)(qI,{text:e.preview,className:`text-xs`}):(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No preview for this one.`})]})}function QL({primary:e,primaryLabel:t,disabled:n,submitting:r,onCancel:i}){return(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,R.jsx)(J,{type:`button`,variant:`ghost`,onClick:i,children:`Cancel`}),(0,R.jsx)(J,{type:e,disabled:n||r,children:r?`Sending…`:t})]})}function $L(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 eR({questions:e,picks:t,own:n,index:r,onGo:i}){return e.length===1?(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e[0]?.header}):(0,R.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,R.jsxs)(`button`,{type:`button`,onClick:()=>i(a),"aria-current":a===r,className:q(`inline-flex min-h-8 items-center gap-1 rounded-lg border px-3 text-xs font-medium transition-colors`,a===r?`border-primary bg-primary/10 text-primary`:`border-border text-muted-foreground hover:bg-muted`),children:[a+1,` `,e.header,o?(0,R.jsx)(Wf,{className:`size-3`,"aria-hidden":`true`}):null]},a)})})}function tR({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=(0,m.useRef)(null),p=e[i],h=o[i]??[],g=c[i]??``,_=p?.options[u[i]??h[0]??0],v=$L(e,o,c,i),y=p?.multiSelect===!0;if((0,m.useEffect)(()=>{let e=f.current;e&&(e.querySelector(`[data-option="${o[i]?.[0]??0}"]`)??e.querySelector(`[data-nav]`))?.focus()},[i]),!p)return null;function b(e){let t=y?h.includes(e)?h.filter(t=>t!==e):[...h,e]:[e];s({...o,[i]:t}),y||l({...c,[i]:``}),d({...u,[i]:e})}function x(t,r){if($L(e,t,r,i)){if(i<e.length-1){a(i+1);return}n({answers:e.map((n,i)=>$L(e,t,r,i)).filter(e=>!!e),cancelled:!1})}}function S(e){e.preventDefault(),t||x(o,c)}function C(t){t>=0&&t<e.length&&a(t)}function w(e){let n=e.target,r=f.current;if(!r||e.altKey)return;if(e.key===`Enter`&&(e.ctrlKey||e.metaKey)){e.preventDefault(),t||x(o,c);return}if(n instanceof HTMLTextAreaElement){e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing?(e.preventDefault(),t||x(o,c)):e.key===`ArrowUp`&&n.selectionStart===0&&n.selectionEnd===0&&(e.preventDefault(),kE(r,n,-1));return}let a=jE(e.key);if(a){e.preventDefault(),kE(r,n,a);return}if(e.key===`Home`||e.key===`End`){e.preventDefault(),kE(r,n,e.key===`Home`?`first`:`last`);return}let u=ME(e.key);if(u&&!(n instanceof HTMLButtonElement)){e.preventDefault(),C(i+u);return}let d=n instanceof HTMLInputElement&&n.dataset.option!==void 0?Number(n.dataset.option):-1;if(e.key===`Enter`&&d>=0){if(e.preventDefault(),y)h.length>0&&h.includes(d)?x(o,c):b(d);else{let e={...o,[i]:[d]},t={...c,[i]:``};s(e),l(t),x(e,t)}return}if(e.key===` `&&d>=0){e.preventDefault(),b(d);return}let m=Number(e.key);Number.isInteger(m)&&m>=1&&m<=p.options.length&&(e.preventDefault(),b(m-1),r.querySelector(`[data-option="${m-1}"]`)?.focus())}return(0,R.jsxs)(`form`,{ref:f,className:`flex flex-col gap-3`,onSubmit:S,onKeyDown:w,children:[(0,R.jsx)(eR,{questions:e,picks:o,own:c,index:i,onGo:a}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.length>1?`Question ${i+1} of ${e.length}`:`Question`}),(0,R.jsx)(qI,{text:p.question,className:`mt-1 text-base`})]}),(0,R.jsxs)(`div`,{className:q(`grid min-w-0 gap-4`,_?.preview||_?.image?`lg:grid-cols-[minmax(0,1.1fr)_minmax(0,1fr)]`:``),children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[p.options.map((e,t)=>(0,R.jsx)(XL,{option:e,index:t,multi:y,name:`question-${i}`,selected:h.includes(t),onToggle:()=>b(t),onFocusOption:()=>d({...u,[i]:t})},t)),(0,R.jsxs)(`label`,{className:`flex min-h-9 flex-col gap-1 rounded-lg border border-input px-3 py-1.5 text-sm focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/30`,children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:KL}),(0,R.jsx)(WL,{"data-nav":``,value:g,onChange:e=>{l({...c,[i]:e.target.value}),e.target.value&&s({...o,[i]:[]})},placeholder:KL,"aria-label":`Your own answer`,rows:2,className:`min-h-9 resize-none border-0 bg-transparent p-0 text-sm shadow-none focus-visible:ring-0 md:text-sm`})]})]}),(0,R.jsx)(ZL,{option:_})]}),(0,R.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-muted-foreground`,children:[(0,R.jsx)(`span`,{children:y?`Pick several`:`Pick one`}),(0,R.jsx)(ZT,{chord:`↑↓`,children:`move`}),(0,R.jsx)(ZT,{chord:y?`Space`:`Enter`,children:y?`pick`:`choose`}),y?(0,R.jsx)(ZT,{chord:`Enter`,children:`next`}):null,e.length>1?(0,R.jsx)(ZT,{chord:`←→`,children:`question`}):null,(0,R.jsx)(ZT,{chord:`Esc`,children:`later`})]}),(0,R.jsx)(QL,{primary:`submit`,primaryLabel:i<e.length-1?`Next`:`Answer`,disabled:!v,submitting:t,onCancel:r})]})}function nR(e,t,n){let r=e.currentTarget,i=e.target;if(e.altKey||AE(i))return;let a=jE(e.key);if(a){e.preventDefault(),kE(r,i,a);return}let o=i instanceof HTMLInputElement&&i.dataset.option!==void 0?Number(i.dataset.option):-1;if((e.key===`Enter`||e.key===` `)&&o>=0){e.preventDefault(),n(o,e.key===`Enter`);return}let s=Number(e.key);Number.isInteger(s)&&s>=1&&s<=t&&(e.preventDefault(),n(s-1,!1),r.querySelector(`[data-option="${s-1}"]`)?.focus())}function rR({view:e,submitting:t,onAnswer:n,onCancel:r}){let[i,a]=(0,m.useState)(``),o=(0,m.useRef)(null);return(0,m.useEffect)(()=>{o.current?.querySelector(`[data-nav]`)?.focus()},[]),(0,R.jsxs)(`form`,{ref:o,className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),i&&n(i)},onKeyDown:r=>nR(r,e.options.length,(r,i)=>{let o=e.options[r];o!==void 0&&(a(o),i&&!t&&n(o))}),children:[(0,R.jsx)(qI,{text:e.title,className:`text-base`}),(0,R.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.options.map((e,t)=>(0,R.jsx)(XL,{option:{label:e},index:t,multi:!1,name:`choice`,selected:i===e,onToggle:()=>a(e)},e))}),(0,R.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-muted-foreground`,children:[(0,R.jsx)(ZT,{chord:`↑↓`,children:`move`}),(0,R.jsx)(ZT,{chord:`Enter`,children:`choose`}),(0,R.jsx)(ZT,{chord:`Esc`,children:`later`})]}),(0,R.jsx)(QL,{primary:`submit`,primaryLabel:`Choose`,disabled:!i,submitting:t,onCancel:r})]})}function iR({view:e,submitting:t,onAnswer:n}){let r=(0,m.useRef)(null);(0,m.useEffect)(()=>r.current?.focus(),[]);function i(e){if(e.altKey||e.ctrlKey||e.metaKey||t)return;let r=e.key.toLowerCase();r===`y`?n(!0):r===`n`&&n(!1)}return(0,R.jsxs)(`div`,{ref:r,tabIndex:-1,"data-autofocus":``,onKeyDown:i,className:`flex flex-col gap-3 outline-none`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(qI,{text:e.question,className:`text-base`}),e.detail?(0,R.jsx)(qI,{text:e.detail,className:`mt-1 text-muted-foreground`}):null]}),(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,R.jsxs)(`p`,{className:`flex items-center gap-x-4 text-xs text-muted-foreground`,children:[(0,R.jsx)(ZT,{chord:`Y`,children:`yes`}),(0,R.jsx)(ZT,{chord:`N`,children:`no`}),(0,R.jsx)(ZT,{chord:`Esc`,children:`later`})]}),(0,R.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(J,{type:`button`,variant:`outline`,disabled:t,onClick:()=>n(!1),children:`No`}),(0,R.jsx)(J,{type:`button`,disabled:t,onClick:()=>n(!0),children:t?`Sending…`:`Yes`})]})]})]})}function aR({view:e,submitting:t,onAnswer:n,onCancel:r}){let[i,a]=(0,m.useState)(``);return(0,R.jsxs)(`form`,{className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),i.trim()&&n(i.trim())},children:[(0,R.jsx)(qI,{text:e.question,className:`text-base`}),(0,R.jsx)(WL,{autoFocus:!0,onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),e.currentTarget.form?.requestSubmit())},value:i,onChange:e=>a(e.target.value),placeholder:e.placeholder??KL,"aria-label":e.question,rows:3,className:`min-h-9 resize-none text-sm md:text-sm`}),(0,R.jsxs)(`p`,{className:`flex items-center gap-x-4 text-xs text-muted-foreground`,children:[(0,R.jsx)(ZT,{chord:`Enter`,children:`answer`}),(0,R.jsx)(ZT,{chord:`Shift+Enter`,children:`new line`}),(0,R.jsx)(ZT,{chord:`Esc`,children:`later`})]}),(0,R.jsx)(QL,{primary:`submit`,primaryLabel:`Answer`,disabled:!i.trim(),submitting:t,onCancel:r})]})}function oR({dialog:e,submitting:t,onAnswer:n}){let[r,i]=(0,m.useState)(e.method===`editor`?e.prefill??``:``),[a,o]=(0,m.useState)(``),s=e.options??[],c=e.method===`select`?a!==``:r.trim()!==``,l=(0,m.useRef)(null);(0,m.useEffect)(()=>{l.current?.querySelector(`[data-nav], textarea`)?.focus()},[]);function u(t){t.preventDefault(),e.method===`select`?n({value:a}):e.method===`confirm`?n({confirmed:!0}):(e.method===`input`||e.method===`editor`)&&n({value:r.trim()})}return(0,R.jsxs)(`form`,{ref:l,className:`flex flex-col gap-3`,onSubmit:u,onKeyDown:r=>{e.method===`select`&&nR(r,s.length,(e,r)=>{let i=s[e];i!==void 0&&(o(i),r&&!t&&n({value:i}))})},children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.title}),e.message?(0,R.jsx)(qI,{text:e.message,className:`mt-1 text-base`}):null]}),e.method===`select`?(0,R.jsx)(`div`,{className:`flex flex-col gap-2`,children:s.map((e,t)=>(0,R.jsx)(XL,{option:{label:e},index:t,multi:!1,name:`dialog`,selected:a===e,onToggle:()=>o(e)},e))}):null,e.method===`input`||e.method===`editor`?(0,R.jsx)(WL,{value:r,onChange:e=>i(e.target.value),placeholder:e.placeholder??KL,"aria-label":e.title,rows:e.method===`editor`?4:2,className:`min-h-9 resize-none text-sm md:text-sm`}):null,(0,R.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,R.jsx)(J,{type:`button`,variant:`outline`,disabled:t,onClick:()=>n({cancelled:!0}),children:`Cancel`}),e.method===`confirm`?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(J,{type:`button`,variant:`outline`,disabled:t,onClick:()=>n({confirmed:!1}),children:`No`}),(0,R.jsx)(J,{type:`button`,disabled:t,onClick:()=>n({confirmed:!0}),children:t?`Sending…`:`Yes`})]}):(0,R.jsx)(J,{type:`submit`,disabled:!c||t,children:t?`Sending…`:`Answer`})]})]})}function sR(e){let{view:t}=e;return t.kind===`questionnaire`?(0,R.jsx)(tR,{questions:t.questions,submitting:e.submitting,onAnswer:e.onAnswer,onCancel:e.onCancel}):t.kind===`choose`?(0,R.jsx)(rR,{...e,view:t}):t.kind===`confirm`?(0,R.jsx)(iR,{...e,view:t}):t.kind===`text`?(0,R.jsx)(aR,{...e,view:t}):(0,R.jsx)(oR,{...e,dialog:t.dialog})}function cR(e){return typeof e==`object`&&e?e:{}}function lR(e){return typeof e==`string`?e.trim():``}function uR(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function dR(e){let t=cR(e),n=lR(t.label);if(!n)return;let r=lR(t.description),i=lR(t.preview),a=lR(t.image);return{label:n,...r?{description:r}:{},...i?{preview:i}:{},...a?{image:a}:{}}}function fR(e){let t=cR(e),n=lR(t.question);if(!n)return;let r=(Array.isArray(t.options)?t.options:[]).map(dR).filter(e=>!!e);return{question:n,header:lR(t.header)||`Question`,options:r,...t.multiSelect===!0?{multiSelect:!0}:{}}}function pR(e){let t=cR(e),n=lR(t.method);if(n!==`select`&&n!==`confirm`&&n!==`input`&&n!==`editor`)return;let r=lR(t.message),i=uR(t.options),a=lR(t.placeholder),o=lR(t.prefill);return{id:lR(t.id),method:n,title:lR(t.title)||`Answer`,...r?{message:r}:{},...i.length>0?{options:i}:{},...a?{placeholder:a}:{},...o?{prefill:o}:{}}}function mR(e){let t=(Array.isArray(e.questions)?e.questions:[]).map(fR).filter(e=>!!e);return t.length>0?{kind:`questionnaire`,questions:t}:void 0}function hR(e){return{kind:`choose`,title:lR(e.title)||`Choose an option`,options:uR(e.options)}}function gR(e){let t=lR(e.question)||lR(e.title)||`Continue?`,n=lR(e.detail)||lR(e.message);return{kind:`confirm`,question:t,...n?{detail:n}:{}}}function _R(e){let t=lR(e.question)||lR(e.title)||`Type an answer`,n=lR(e.placeholder);return{kind:`text`,question:t,...n?{placeholder:n}:{}}}function vR(e){let t=cR(e.payload);if(e.kind===`questionnaire`)return mR(t);if(e.kind===`choose`)return hR(t);if(e.kind===`confirm`)return gR(t);if(e.kind===`text`)return _R(t);let n=pR(t.dialog);return n?{kind:`sessionDialog`,dialog:n}:void 0}function yR({submitting:e,onKeep:t,onLeave:n}){return(0,R.jsxs)(`div`,{className:`flex flex-col gap-4`,role:`alert`,children:[(0,R.jsx)(`p`,{className:`text-sm`,children:`Leave without answering? The oracle will not guess for you.`}),(0,R.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,R.jsx)(J,{type:`button`,variant:`outline`,onClick:t,children:`Keep answering`}),(0,R.jsx)(J,{type:`button`,disabled:e,onClick:n,children:e?`Leaving…`:`Leave`})]})]})}function bR({count:e,onOpen:t}){return(0,R.jsxs)(J,{type:`button`,variant:`soft`,onClick:t,"aria-label":`${e} question${e===1?``:`s`} waiting — open`,className:`gap-1.5 text-warning`,children:[(0,R.jsx)(rp,{"aria-hidden":`true`}),(0,R.jsx)(`span`,{className:`tabular-nums`,children:e}),(0,R.jsx)(`span`,{className:`hidden sm:inline`,children:`waiting`})]})}function xR({prompts:e,answer:t,dismiss:n,minimized:r,onMinimize:i}){let[a,o]=(0,m.useState)(!1),[s,c]=(0,m.useState)(!1),l=e.length,u=e[0],d=u?vR(u):void 0,f=l>0&&!r,p=oE(f,aE.question);(0,m.useEffect)(()=>{l===0&&(o(!1),i(!1))},[l,i]);async function h(e,t){c(!0);try{await e,o(!1)}catch(e){e instanceof cf&&e.code===`question_withdrawn`?af(II):af.error(e instanceof Error?e.message:t)}finally{c(!1)}}let g=u?.from?`${u.from} asks`:`A question`;return(0,R.jsx)(QT,{open:f&&p&&!!u,label:`Question from the lobby`,dismissOnBackdrop:!1,onOpenChange:e=>{e||(a?o(!1):i(!0))},className:`max-w-3xl`,children:u?(0,R.jsxs)(`section`,{"aria-label":`Question from the lobby`,className:`flex min-h-0 flex-1 flex-col`,children:[(0,R.jsxs)(`header`,{className:`flex items-center gap-3 px-6 pt-5 pb-3`,children:[(0,R.jsxs)(`p`,{className:`min-w-0 flex-1 truncate text-sm font-medium text-muted-foreground`,children:[g,l>1?` · 1 of ${l}`:``]}),(0,R.jsx)(J,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Later: put the question away`,title:`Later · Esc`,onClick:()=>i(!0),children:(0,R.jsx)(lh,{"aria-hidden":`true`})})]}),(0,R.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-6 pb-6`,children:d?a?(0,R.jsx)(yR,{submitting:s,onKeep:()=>o(!1),onLeave:()=>void h(n(u.id),`Could not leave the question`)}):(0,R.jsx)(sR,{view:d,submitting:s,onAnswer:e=>void h(t(u.id,e),`Could not send the answer`),onCancel:()=>o(!0)},u.id):(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This question cannot be shown here.`}),(0,R.jsx)(J,{type:`button`,disabled:s,onClick:()=>void h(n(u.id),`Could not dismiss the question`),children:`Dismiss`})]})})]}):null})}var SR=2;function CR(e){let t=globalThis.EventSource;if(!t)throw Error(`EventSource is not available in this environment`);return new t(e)}function wR(e){try{return JSON.parse(e)}catch{return}}function TR(e,t){switch(e.type){case`hello`:t.onHello?.(e.versions);return;case`changed`:t.onChanged?.(e.topic,e.version);return;case`feed`:t.onFeed?.({activity:e.activity,thoughts:e.thoughts,chat:e.chat});return;case`reply`:t.onReply?.(e.text);return;case`notice`:t.onNotice?.(e.text,e.level)}}function ER(e,t=CR){let n=t(`/api/events`);return e.onConnection?.(`connecting`),n.onopen=()=>e.onConnection?.(`live`),n.onerror=()=>e.onConnection?.(n.readyState===SR?`offline`:`connecting`),n.onmessage=t=>{let n=wR(t.data);n&&TR(n,e)},()=>n.close()}function DR(){let e=(0,m.useRef)(void 0),t=(0,m.useCallback)(()=>{e.current?.(),e.current=ER({onHello:e=>Yd.onHello(e),onChanged:(e,t)=>Yd.onChanged(e,t),onFeed:e=>Yd.onFeedDelta(e),onReply:e=>Yd.onReplyDelta(e),onNotice:(e,t)=>af[t](e),onConnection:e=>Yd.onStatus({connection:e})})},[]);return(0,m.useEffect)(()=>(t(),()=>e.current?.()),[t]),t}var OR={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 kR(e){return e.length===1&&/[a-z]/i.test(e)?`Key${e.toUpperCase()}`:e.length===1&&/[0-9]/.test(e)?`Digit${e}`:OR[e]}function AR(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=kR(n);if(!e)return;t.code=e}return t.code?t:void 0}function jR(e,t){return e.code===t.code&&e.altKey===t.alt&&e.ctrlKey===t.ctrl&&e.shiftKey===t.shift&&e.metaKey===t.meta}function MR(e,t){let n=AR(t);return n?jR(e,n):!1}function NR(e,t){for(let n of t)if(MR(e,n.key))return n.action}function PR(e,t){for(let n of t)if(MR(e,n.key))return n.id}function FR({enabled:e,keys:t,tabs:n,insideApp:r,onAction:i,onTab:a}){(0,m.useEffect)(()=>{if(!e)return;let o=e=>{let o=PR(e,n);if(o){e.preventDefault(),a(o);return}let s=NR(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 IR=`bot-lobby.notifications`,LR=`/icon-192.png`,RR=new Set;function zR(){for(let e of[...RR])e()}function BR(){try{return localStorage.getItem(IR)===`on`}catch{return!1}}function VR(e){return RR.add(e),()=>{RR.delete(e)}}function HR(e){try{localStorage.setItem(IR,e?`on`:`off`)}catch{}zR()}function UR(){return(0,m.useSyncExternalStore)(VR,BR,()=>!1)}async function WR(){return typeof Notification>`u`?`unsupported`:(Notification.permission==="default"&&await Notification.requestPermission().catch(()=>void 0),Notification.permission===`granted`?(HR(!0),`granted`):`denied`)}function GR(){HR(!1)}function KR(e){if(e===`completed`)return`finished`;if(e===`abandoned`)return`dropped`}function qR(){return typeof Notification<`u`&&Notification.permission===`granted`&&document.hidden}function JR(e){try{new Notification(`bot-lobby`,{body:e,icon:LR,tag:`bot-lobby`})}catch{}}function YR(){let e=UR();QI();let t=Yd.get(`prompts`).data,n=Yd.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||!qR())return;if(n.count===0&&r>0){let e=t?.prompts?.some(e=>e.kind===`sessionDialog`);JR(e?`A background session is asking something.`:`A question is waiting in the lobby.`);return}let s=KR(i);s&&i!==n.state&&JR(`${a?`${a} `:`The task `}${s}.`)},[e,r,i,a,t])}function XR(){let e=eL(`prompts`),t=(0,m.useCallback)(async(e,t)=>{await uf(`prompts.answer`,{id:e,answer:t})},[]),n=(0,m.useCallback)(async e=>{await uf(`prompts.dismiss`,{id:e})},[]);return{prompts:e.data?.prompts??[],loading:e.loading,error:e.error,answer:t,dismiss:n}}function ZR(e,t,n,r=!0){QI();let[i,a]=(0,m.useState)({loading:!0}),[o,s]=(0,m.useState)(0),c=[Yd.status().connection,...n.map(e=>Yd.get(e).version)].join(`,`),l=JSON.stringify(t);(0,m.useEffect)(()=>{if(!r)return;let t=!0;return a(e=>({...e,loading:!0})),uf(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 QR({...e}){return(0,R.jsx)(vb,{"data-slot":`sheet`,...e})}function $R({...e}){return(0,R.jsx)(zb,{"data-slot":`sheet-close`,...e})}function ez({...e}){return(0,R.jsx)(wb,{"data-slot":`sheet-portal`,...e})}function tz({className:e,...t}){return(0,R.jsx)(Eb,{"data-slot":`sheet-overlay`,className:q(`fixed inset-0 z-50 bg-scrim backdrop-blur-sm duration-150 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function nz({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,R.jsxs)(ez,{children:[(0,R.jsx)(tz,{}),(0,R.jsxs)(Ab,{"data-slot":`sheet-content`,"data-side":n,className:q(`glass-pop fixed z-50 flex flex-col gap-4 bg-clip-padding text-sm transition duration-200 ease-in-out data-[side=right]:rounded-l-lg data-[side=left]:rounded-r-lg 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,R.jsx)(zb,{"data-slot":`sheet-close`,asChild:!0,children:(0,R.jsxs)(J,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`,children:[(0,R.jsx)(lh,{}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Close`})]})})]})]})}function rz({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`sheet-header`,className:q(`flex flex-col gap-0.5 p-4`,e),...t})}function iz({className:e,...t}){return(0,R.jsx)(Fb,{"data-slot":`sheet-title`,className:q(`text-base font-medium text-foreground`,e),...t})}function az({className:e,...t}){return(0,R.jsx)(Lb,{"data-slot":`sheet-description`,className:q(`text-sm text-muted-foreground`,e),...t})}function oz(){return tL(`(min-width: 1024px)`)}function sz({className:e,...t}){return(0,R.jsx)(`section`,{className:q(`glass min-h-0 min-w-0 rounded-lg transition-[border-color] duration-200 focus-within:border-ring/50`,e),...t})}function cz({open:e,onClose:t,describe:n,children:r}){let i=oE(e,aE.sheet);return(0,R.jsx)(QR,{open:e&&i,onOpenChange:e=>!e&&t(),children:(0,R.jsxs)(nz,{showCloseButton:!1,className:`gap-0 data-[side=right]:w-[90%] data-[side=right]:sm:max-w-3xl`,children:[(0,R.jsxs)(rz,{className:`flex-row items-center justify-between border-b py-2`,children:[(0,R.jsx)(iz,{children:`Detail`}),(0,R.jsx)(az,{className:`sr-only`,children:n}),(0,R.jsx)($R,{asChild:!0,children:(0,R.jsx)(J,{variant:`ghost`,size:`icon`,"aria-label":`Close detail`,title:`Close · Esc`,children:(0,R.jsx)(lh,{"aria-hidden":`true`})})})]}),(0,R.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-4`,children:r})]})})}function lz({wide:e,list:t,detail:n,open:r,onClose:i,hint:a,describe:o}){let s=(0,m.useRef)(null),c=(0,m.useRef)(null);function l(t){let n=s.current;if(!n||t.altKey||t.ctrlKey||t.metaKey||AE(t.target))return;let r=jE(t.key);r?(t.preventDefault(),FE(n,t.target,r)):t.key===`Home`||t.key===`End`?(t.preventDefault(),FE(n,t.target,t.key===`Home`?`first`:`last`)):e&&ME(t.key)===1&&c.current&&(t.preventDefault(),c.current.focus())}function u(e){e.altKey||e.ctrlKey||e.metaKey||AE(e.target)||ME(e.key)===-1&&s.current&&(e.preventDefault(),IE(s.current)?.focus())}return e?(0,R.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-cols-[minmax(0,30fr)_minmax(0,70fr)] gap-4 px-4 pb-2`,children:[(0,R.jsx)(sz,{"data-pane":`list`,ref:s,onKeyDown:l,className:`overflow-y-auto`,children:t}),(0,R.jsx)(sz,{"data-pane":`detail`,ref:c,tabIndex:0,"aria-label":`Detail`,onKeyDown:u,className:`overflow-y-auto p-4 outline-none`,children:n??(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:a})})]}):(0,R.jsxs)(`div`,{className:`flex flex-col p-3`,children:[(0,R.jsx)(sz,{"data-pane":`list`,ref:s,onKeyDown:l,children:t}),(0,R.jsx)(cz,{open:r&&n!==null,onClose:i,describe:o,children:n})]})}function uz({title:e,count:t,children:n}){return(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2 px-4 py-3`,children:[(0,R.jsx)(`h2`,{className:`text-sm font-medium`,children:e}),(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`min-w-4 flex-1`}),t?(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:t}):null,n?(0,R.jsx)(`div`,{className:`flex items-center gap-2`,children:n}):null]})}function dz(){return(0,R.jsx)(`div`,{className:`flex flex-col gap-2 p-3`,role:`status`,"aria-label":`Loading`,children:[0,1,2,3].map(e=>(0,R.jsx)(`div`,{className:`h-9 rounded-lg bg-muted motion-safe:animate-pulse`},e))})}function fz(e){return e<10?`0${e}`:String(e)}function pz(e){if(!Number.isFinite(e))return`0`;let t=new Date(e);return`${fz(t.getHours())}:${fz(t.getMinutes())}`}function mz(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 ${fz(n%60)}m`}function hz(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 gz(e){let t=hz(e);return t===`now`?`just now`:`${t} ago`}function _z({...e}){return(0,R.jsx)(rx,{"data-slot":`alert-dialog`,...e})}function vz({...e}){return(0,R.jsx)(ix,{"data-slot":`alert-dialog-portal`,...e})}function yz({className:e,...t}){return(0,R.jsx)(ax,{"data-slot":`alert-dialog-overlay`,className:q(`fixed inset-0 z-50 bg-scrim backdrop-blur-sm duration-150 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function bz({className:e,...t}){return(0,R.jsxs)(vz,{children:[(0,R.jsx)(yz,{}),(0,R.jsx)(ox,{"data-slot":`alert-dialog-content`,className:q(`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 glass-pop rounded-lg p-6 text-sm duration-150 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-90 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...t})]})}function xz({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:q(`flex flex-col gap-1.5`,e),...t})}function Sz({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:q(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function Cz({className:e,...t}){return(0,R.jsx)(lx,{"data-slot":`alert-dialog-title`,className:q(`text-base font-medium text-foreground`,e),...t})}function wz({className:e,...t}){return(0,R.jsx)(ux,{"data-slot":`alert-dialog-description`,className:q(`text-sm text-muted-foreground`,e),...t})}function Tz({className:e,variant:t=`default`,...n}){return(0,R.jsx)(J,{variant:t,className:q(`h-8`,e),asChild:!0,children:(0,R.jsx)(sx,{"data-slot":`alert-dialog-action`,...n})})}function Ez({className:e,...t}){return(0,R.jsx)(J,{variant:`outline`,className:q(`h-8`,e),asChild:!0,children:(0,R.jsx)(cx,{"data-slot":`alert-dialog-cancel`,...t})})}function Dz({label:e,title:t,description:n,confirmLabel:r,onConfirm:i,icon:a,disabled:o,variant:s=`outline`}){let[c,l]=(0,m.useState)(!1),u=oE(c,aE.confirm);return(0,R.jsxs)(_z,{open:c&&u,onOpenChange:l,children:[(0,R.jsx)($,{label:e,icon:a,tone:s===`destructive`?`danger`:`neutral`,disabled:o,onClick:()=>l(!0)}),(0,R.jsxs)(bz,{children:[(0,R.jsxs)(xz,{children:[(0,R.jsx)(Cz,{children:t}),(0,R.jsx)(wz,{children:n})]}),(0,R.jsxs)(Sz,{children:[(0,R.jsx)(Ez,{children:`Keep it`}),(0,R.jsx)(Tz,{variant:s===`destructive`?`destructive`:`default`,onClick:i,children:r})]})]})]})}function Oz({title:e,note:t,className:n,children:r,collapsed:i,onToggle:a,...o}){let s=typeof e==`string`?e:`pane`;return(0,R.jsxs)(`section`,{className:q(`glass group/frame relative flex min-h-0 min-w-0 flex-col rounded-lg transition-[border-color] duration-200 focus-within:border-ring/50`,i&&`flex-none`,n),...o,children:[e||t||a?(0,R.jsxs)(`div`,{className:q(`flex shrink-0 items-center justify-between gap-3 px-4`,a?`py-1`:`pt-3 pb-1`),children:[e?(0,R.jsx)(`h2`,{className:`min-w-0 truncate text-sm font-medium`,children:e}):(0,R.jsx)(`span`,{}),(0,R.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1`,children:[t?(0,R.jsx)(`span`,{className:`flex items-center gap-2 truncate text-xs text-muted-foreground`,children:t}):null,a?(0,R.jsx)(`button`,{type:`button`,"aria-expanded":!i,"aria-label":i?`Expand ${s}`:`Minimize ${s}`,title:i?`Expand`:`Minimize`,onClick:a,className:`-mr-2 inline-flex size-8 items-center justify-center rounded-lg text-muted-foreground transition-[background-color,color,transform] duration-150 ease-snap outline-none hover:bg-accent hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/40 active:scale-95`,children:(0,R.jsx)(Kf,{"aria-hidden":`true`,className:q(`size-4 transition-transform duration-200 ease-snap`,i&&`-rotate-90`)})}):null]})]}):null,i?null:r]})}function kz({title:e,right:t,className:n}){return(0,R.jsxs)(`span`,{className:q(`flex min-w-0 items-center gap-3`,n),children:[(0,R.jsx)(`span`,{className:`truncate font-medium`,children:e}),(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`min-w-4 flex-1`}),t?(0,R.jsx)(`span`,{className:`shrink-0 text-xs font-normal text-muted-foreground`,children:t}):null]})}function Az({title:e,right:t,children:n}){return(0,R.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,R.jsx)(`h3`,{className:`text-xs text-muted-foreground`,children:(0,R.jsx)(kz,{title:e,right:t})}),n]})}var jz=`Pull requests`,Mz=`An agent reviews it, optionally with a focus you type; Jev's quick read sizes it up first.`,Nz=`nothing is posted to GitHub`,Pz=`Refresh to load open pull requests with the GitHub CLI (gh).`,Fz=`No open pull requests.`,Iz=`loading pull requests from GitHub…`,Lz=`reading the diff…`,Rz=`the pull request has new commits since this review — review it again`,zz=`(no description)`,Bz=`Review with a focus (optional)`,Vz=`Leave it empty for a full review.`;function Hz(e){return e===`passing`?`✓`:e===`failing`?`✗`:e===`pending`?`…`:``}function Uz(e){return e===`passing`?`text-success`:e===`failing`?`text-destructive`:`text-muted-foreground`}function Wz(e,t){return`+${e} −${t}`}function Gz(e){return e===`APPROVED`?`approved`:e===`CHANGES_REQUESTED`?`changes requested`:e===`REVIEW_REQUIRED`?`review required`:``}function Kz(e){return e?e.status===`running`?`reviewing`:e.status!==`done`||!e.verdict?``:e.verdict===`approve`?`approved`:e.verdict===`changes`?`changes found`:`commented`:``}function qz(e){return e===`approve`?`approve`:e===`changes`?`request changes`:e===`comment`?`comment`:``}function Jz(e,t){if(e.status===`running`)return Yz(e,t);if(e.status===`cancelled`)return`stopped`;let n=e.status===`done`?Yz(e,t):e.status;return[qz(e.verdict),n].filter(Boolean).join(` · `)}function Yz(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 Xz(e,t){return[e.state?e.draft?`draft`:e.state.toLowerCase():e.draft?`draft`:``,e.author?`by ${e.author}`:``,e.updatedAt?`updated ${gz(t-Date.parse(e.updatedAt))}`:``].filter(Boolean).join(` · `)}function Zz(e){let t=`${e.changedFiles} file${e.changedFiles===1?``:`s`}`;return`${e.headRef||`?`} → ${e.baseRef||`?`} · ${Wz(e.additions,e.deletions)} · ${t}`}function Qz(e){let t=e.mergeable===`CONFLICTING`?`conflicts`:e.mergeable===`MERGEABLE`?`mergeable`:``;return[e.checks?`checks ${e.checks} (${e.checkCount})`:``,Gz(e.decision),t,e.labels.join(`, `)].filter(Boolean).join(` · `)}function $z(e){return[`${e.changedFiles} file${e.changedFiles===1?``:`s`}`,e.labels.join(`, `),e.review?.stale?`stale`:``].filter(Boolean).join(` · `)}function eB(e){return e.read?`${e.read.model} · ${e.read.ms} ms`:``}function tB(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 nB({pull:e,now:t}){return(0,R.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,R.jsxs)(`h2`,{className:`text-sm font-semibold break-words`,children:[`#`,e.number,` `,e.title]}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Xz(e,t)}),(0,R.jsx)(`p`,{className:`text-sm tabular-nums`,children:Zz(e)}),Qz(e)?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Qz(e)}):null,e.url?(0,R.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 rB({read:e}){return(0,R.jsxs)(Az,{title:`Jev's read`,right:eB(e),children:[e.status===`running`?(0,R.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,R.jsx)(gE,{className:`size-3.5`}),Lz]}):null,e.status===`failed`?(0,R.jsx)(`p`,{className:`text-sm text-foreground`,children:e.error??`Jev could not read it`}):null,e.status===`done`&&e.line?(0,R.jsx)(qI,{text:e.line}):null]})}function iB({review:e,now:t}){return(0,R.jsxs)(R.Fragment,{children:[e.model?(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:[e.model,e.thinking].filter(Boolean).join(` · `)}):null,e.focus?(0,R.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`focus: `,e.focus]}):null,e.saved?(0,R.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`kept from `,gz(t-e.startedAt)]}):null,e.stale?(0,R.jsx)(`p`,{className:`text-sm text-foreground`,children:Rz}):null,e.status===`running`?(0,R.jsx)(aB,{steps:e.steps}):null,e.status===`cancelled`?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`stopped`}):null,e.status===`failed`||e.status===`timeout`?(0,R.jsxs)(`p`,{className:`text-sm text-destructive`,children:[`✗ `,e.error??e.status]}):null,e.text?(0,R.jsx)(qI,{text:e.text}):null]})}function aB({steps:e}){return(0,R.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm text-muted-foreground`,children:e.slice(-6).map((e,t)=>(0,R.jsxs)(`li`,{className:`break-words`,children:[`· `,e]},t))})}function oB({number:e,focus:t,onChange:n}){return(0,R.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,R.jsx)(`label`,{htmlFor:`focus-${e}`,className:`text-[0.8125rem] font-medium text-foreground`,children:Bz}),(0,R.jsx)(WL,{id:`focus-${e}`,value:t,rows:2,maxLength:2e3,onChange:e=>n(e.target.value)}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Vz})]})}function sB({number:e,review:t,now:n,focus:r,onFocus:i}){return(0,R.jsxs)(Az,{title:`Review`,right:t?Jz(t,n):void 0,children:[t?(0,R.jsx)(iB,{review:t,now:n}):null,(0,R.jsx)(oB,{number:e,focus:r,onChange:i}),(0,R.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`A read-only agent reviews it — `,Nz,`.`]})]})}function cB({files:e}){return(0,R.jsx)(Az,{title:`Files`,right:String(e.length),children:(0,R.jsx)(`div`,{className:`overflow-x-auto rounded-lg border`,children:(0,R.jsx)(`table`,{className:`w-full border-collapse text-sm tabular-nums`,children:(0,R.jsx)(`tbody`,{children:e.map(e=>(0,R.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,R.jsx)(`td`,{className:`max-w-0 px-3 py-1.5 break-all`,children:e.path}),(0,R.jsx)(`td`,{className:`px-3 py-1.5 text-right text-xs whitespace-nowrap text-muted-foreground`,children:Wz(e.additions,e.deletions)})]},e.path))})})})})}function lB({note:e,now:t}){let n=[e.state&&e.state!==`COMMENTED`?e.state.toLowerCase().replace(/_/g,` `):``,e.at?gz(t-Date.parse(e.at)):``].filter(Boolean).join(` · `);return(0,R.jsxs)(`article`,{className:`flex flex-col gap-1 border-b pb-2 last:border-0 last:pb-0`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[(0,R.jsx)(`span`,{className:`font-medium text-foreground`,children:e.author??`comment`}),n?(0,R.jsx)(`span`,{children:n}):null]}),e.body.trim()?(0,R.jsx)(qI,{text:e.body.trim()}):null]})}function uB({notes:e,now:t}){return e.length===0?null:(0,R.jsx)(Az,{title:`Discussion`,right:String(e.length),children:(0,R.jsx)(`div`,{className:`flex flex-col gap-3`,children:e.map((e,n)=>(0,R.jsx)(lB,{note:e,now:t},n))})})}function dB({number:e,error:t}){return t?(0,R.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not load #`,e,`. `,t]}):(0,R.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,R.jsx)(gE,{className:`size-3.5`}),`loading #`,e,`…`]})}function fB({number:e,onChanged:t}){let n=ZR(`git.pull`,{number:e},[`git`]),[r,i]=(0,m.useState)(``),a=n.data?.review?.status===`running`,o=tB(a);if(!n.data)return(0,R.jsx)(dB,{number:e,error:n.error});let{pull:s,review:c,read:l}=n.data,u=()=>{n.reload(),t?.()},d=async()=>{let t=r.trim();i(``),await V(`git.review`,{number:e,...t?{focus:t}:{}}),u()},f=async()=>{await V(`git.jev`,{number:e}),u()},p=async()=>{await V(`git.cancelReview`,{number:e}),u()};return(0,R.jsxs)(`article`,{className:`flex flex-col gap-4`,"aria-label":`Pull request #${e}`,children:[(0,R.jsxs)(MI,{children:[(0,R.jsx)($,{label:`Review`,icon:Tm,tone:`primary`,disabled:a,onClick:()=>void d()}),(0,R.jsx)($,{label:`Jev's read`,icon:Rf,disabled:a,onClick:()=>void f()}),a?(0,R.jsx)(Dz,{icon:ap,label:`Stop the review`,title:`Stop this review?`,description:`The agent stops reading the pull request. Nothing is posted to GitHub.`,confirmLabel:`Stop review`,variant:`destructive`,onConfirm:()=>void p()}):null]}),(0,R.jsx)(nB,{pull:s,now:o}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Mz}),l?(0,R.jsx)(rB,{read:l}):null,(0,R.jsx)(sB,{number:e,review:c,now:o,focus:r,onFocus:i}),s.files.length>0?(0,R.jsx)(cB,{files:s.files}):null,(0,R.jsx)(Az,{title:`Description`,children:s.body.trim()?(0,R.jsx)(qI,{text:s.body.trim()}):(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:zz})}),(0,R.jsx)(uB,{notes:s.notes,now:o})]})}var pB=gh(`group/badge inline-flex h-6 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-lg border border-transparent px-2.5 text-xs font-medium whitespace-nowrap transition-colors focus-visible:ring-[3px] focus-visible:ring-ring/40 aria-invalid:border-destructive aria-invalid:ring-destructive/20 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-accent text-foreground [a]:hover:bg-primary/20`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-accent`,destructive:`bg-destructive/12 text-destructive [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-accent`,ghost:`hover:bg-accent hover:text-foreground`,link:`text-link underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function mB({className:e,variant:t=`default`,asChild:n=!1,...r}){let i=n?Xg:`span`;return(0,R.jsx)(i,{"data-slot":`badge`,"data-variant":t,className:q(pB({variant:t}),e),...r})}function hB({checks:e}){let t=Hz(e);return t?(0,R.jsx)(`span`,{className:q(`w-4 shrink-0 text-center`,Uz(e)),"aria-hidden":`true`,children:t}):(0,R.jsx)(`span`,{className:`w-4 shrink-0`,"aria-hidden":`true`})}function gB({pull:e,selected:t,onSelect:n}){let r=Kz(e.review);return(0,R.jsx)(`li`,{children:(0,R.jsxs)(`button`,{type:`button`,"aria-current":t?`true`:void 0,onClick:()=>n(e.number),className:`flex min-h-9 w-full flex-col gap-0.5 rounded-lg px-3 py-2.5 text-left outline-none transition-colors duration-150 hover:bg-accent/60 focus-visible:ring-3 focus-visible:ring-ring/40 aria-[current=true]:bg-accent`,children:[(0,R.jsxs)(`span`,{className:`flex items-start gap-2 text-sm`,children:[(0,R.jsxs)(`span`,{className:`shrink-0 text-muted-foreground tabular-nums`,children:[`#`,e.number]}),(0,R.jsx)(hB,{checks:e.checks}),e.draft?(0,R.jsx)(mB,{variant:`secondary`,children:`draft`}):null,(0,R.jsx)(`span`,{className:q(`min-w-0 flex-1 break-words text-foreground`,t&&`font-medium`),children:e.title})]}),(0,R.jsxs)(`span`,{className:`flex flex-wrap items-baseline justify-between gap-x-3 text-xs text-muted-foreground`,children:[(0,R.jsx)(`span`,{children:$z(e)}),(0,R.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[r?(0,R.jsx)(`span`,{children:r}):null,(0,R.jsx)(`span`,{className:`tabular-nums`,children:Wz(e.additions,e.deletions)})]})]})]})})}function _B({pulls:e,selectedId:t,onSelect:n}){return(0,R.jsx)(`ul`,{className:`flex flex-col gap-0.5 px-2 pb-2`,children:e.map(e=>(0,R.jsx)(gB,{pull:e,selected:e.number===t,onSelect:n},e.number))})}var vB=()=>aL(iL(`git`)),yB=e=>aL(iL(`git`,String(e)));function bB(e){let t=Number(e[0]);return Number.isInteger(t)&&t>0?t:void 0}function xB({loading:e,loaded:t,error:n,onRetry:r}){let i=n?`✗ ${n}`:t?Fz:e?Iz:Pz;return(0,R.jsxs)(ML,{className:`glass m-4 flex-1 border`,children:[(0,R.jsx)(NL,{children:(0,R.jsx)(FL,{className:n?`text-destructive`:void 0,children:i})}),n?(0,R.jsx)(J,{variant:`outline`,onClick:r,children:`Retry`}):null]})}function SB({rest:e}){let t=oz(),n=ZR(`git.pulls`,{},[`git`]),r=bB(e),i=n.data?.pulls??[],a=(0,m.useCallback)(()=>{V(`git.pulls`,{refresh:!0}).then(()=>n.reload())},[n]);if(!n.data&&n.error)return(0,R.jsx)(LL,{message:`Could not load pull requests. ${n.error}`,onRetry:n.reload});if(n.data&&i.length===0)return(0,R.jsx)(xB,{loading:n.data.loading,loaded:n.data.loaded,error:n.data.error,onRetry:n.reload});let o=n.loading||!!n.data?.loading,s=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(uz,{title:jz,count:n.data?`${i.length} open`:void 0,children:(0,R.jsx)($,{label:`Refresh`,icon:km,disabled:o,className:o?`[&_svg]:animate-spin`:void 0,onClick:a})}),n.data?.error?(0,R.jsxs)(`p`,{className:`px-3 pt-2 text-sm text-destructive`,children:[`✗ `,n.data.error]}):null,n.data?(0,R.jsx)(_B,{pulls:i,selectedId:r,onSelect:yB}):(0,R.jsx)(dz,{})]}),c=r===void 0?null:(0,R.jsx)(fB,{number:r,onChanged:n.reload},r);return(0,R.jsx)(lz,{wide:t,list:s,detail:c,open:r!==void 0,onClose:vB,hint:`Select a pull request to see its detail.`,describe:`Pull request detail`})}function CB(e){return e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing}function wB({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,R.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,R.jsx)(`label`,{htmlFor:i,className:`text-sm font-medium text-foreground`,children:e}),(0,R.jsx)(WL,{id:i,value:a,rows:2,"aria-describedby":t?`${i}-hint`:void 0,onChange:e=>o(e.target.value),onKeyDown:e=>{CB(e)&&(e.preventDefault(),l())}}),t?(0,R.jsx)(`p`,{id:`${i}-hint`,className:`text-xs text-muted-foreground`,children:t}):null,(0,R.jsx)(`div`,{className:`flex self-end`,children:(0,R.jsx)($,{label:n,icon:s?Up:If,tone:`primary`,shortcut:`Enter`,className:s?`[&_svg]:animate-spin`:void 0,onClick:()=>void l(),disabled:!a.trim()||s})})]})}var TB=`Issues`,EB=`Issue`,DB=`p plans it with the planning panel, then save it as a task`,OB=`Refresh to load open issues with the GitHub CLI (gh).`,kB=`No open issues. File one with New issue.`,AB=`loading issues from GitHub…`,jB=`issues are off (lobby.issues)`,MB=`(no description)`;function NB(e,t){return[e.state?e.state.toLowerCase():``,e.author?`by ${e.author}`:``,e.updatedAt?`updated ${gz(t-Date.parse(e.updatedAt))}`:``,e.labels.join(`, `)].filter(Boolean).join(` · `)}function PB(e,t){return[e.author?`by ${e.author}`:``,e.updatedAt?gz(t-Date.parse(e.updatedAt)):``].filter(Boolean).join(` · `)}function FB(e){return e.length>0?`[${e.slice(0,2).join(`, `)}]`:``}function IB({issue:e,now:t}){return(0,R.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,R.jsxs)(`h2`,{className:`text-sm font-semibold break-words`,children:[`#`,e.number,` `,e.title]}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:NB(e,t)}),e.url?(0,R.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 LB({comment:e,now:t}){return(0,R.jsxs)(`article`,{className:`flex flex-col gap-1 border-b pb-2 last:border-0 last:pb-0`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[(0,R.jsx)(`span`,{className:`font-medium text-foreground`,children:e.author??`comment`}),e.createdAt?(0,R.jsx)(`span`,{children:gz(t-Date.parse(e.createdAt))}):null]}),(0,R.jsx)(qI,{text:e.body.trim()})]})}function RB({comments:e,now:t}){return e.length===0?null:(0,R.jsx)(Az,{title:`Comments`,right:String(e.length),children:(0,R.jsx)(`div`,{className:`flex flex-col gap-3`,children:e.map((e,n)=>(0,R.jsx)(LB,{comment:e,now:t},n))})})}function zB({number:e}){let t=ZR(`issues.get`,{number:e},[`issues`]),n=Date.now();if(!t.data)return t.error?(0,R.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not load #`,e,`. `,t.error]}):(0,R.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,R.jsx)(gE,{className:`size-3.5`}),`loading #`,e,`…`]});let r=t.data.issue;return(0,R.jsxs)(`article`,{className:`flex flex-col gap-4`,"aria-label":`${EB} #${e}`,children:[(0,R.jsx)(IB,{issue:r,now:n}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:DB}),(0,R.jsx)(Az,{title:`Description`,children:r.body.trim()?(0,R.jsx)(qI,{text:r.body.trim()}):(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:MB})}),(0,R.jsx)(RB,{comments:r.comments,now:n})]})}function BB({issue:e,selected:t,now:n,onSelect:r}){let i=FB(e.labels);return(0,R.jsx)(`li`,{children:(0,R.jsxs)(`button`,{type:`button`,"aria-current":t?`true`:void 0,onClick:()=>r(e.number),className:`flex min-h-9 w-full flex-col gap-0.5 rounded-lg px-3 py-2.5 text-left outline-none transition-colors duration-150 hover:bg-accent/60 focus-visible:ring-3 focus-visible:ring-ring/40 aria-[current=true]:bg-accent`,children:[(0,R.jsxs)(`span`,{className:`flex items-start gap-2 text-sm`,children:[(0,R.jsxs)(`span`,{className:`shrink-0 text-muted-foreground tabular-nums`,children:[`#`,e.number]}),(0,R.jsx)(`span`,{className:q(`min-w-0 flex-1 break-words text-foreground`,t&&`font-medium`),children:e.title}),i?(0,R.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:i}):null]}),(0,R.jsx)(`span`,{className:`pl-9 text-xs text-muted-foreground`,children:PB(e,n)})]})})}function VB({issues:e,selectedId:t,now:n,onSelect:r}){return(0,R.jsx)(`ul`,{className:`flex flex-col gap-0.5 px-2 pb-2`,children:e.map(e=>(0,R.jsx)(BB,{issue:e,selected:e.number===t,now:n,onSelect:r},e.number))})}var HB=()=>aL(iL(`issues`)),UB=e=>aL(iL(`issues`,String(e)));function WB(e){let t=Number(e[0]);return Number.isInteger(t)&&t>0?t:void 0}function GB(){return(0,R.jsx)(ML,{className:`glass m-4 flex-1 border`,children:(0,R.jsxs)(NL,{children:[(0,R.jsx)(PL,{children:`Issues are off`}),(0,R.jsx)(FL,{className:`font-mono`,children:jB})]})})}function KB({loading:e,loaded:t,error:n,onRetry:r}){let i=n?`✗ ${n}`:t?kB:e?AB:OB;return(0,R.jsxs)(ML,{className:`glass m-4 flex-1 border`,children:[(0,R.jsx)(NL,{children:(0,R.jsx)(FL,{className:n?`text-destructive`:void 0,children:i})}),n?(0,R.jsx)(J,{variant:`outline`,onClick:r,children:`Retry`}):null]})}function qB({onCreate:e}){return(0,R.jsx)(sz,{className:`mx-4 mb-4 shrink-0 p-3`,children:(0,R.jsx)(wB,{label:`New issue`,hint:`The first line becomes the title; the rest is the body. Enter files it.`,buttonLabel:`File issue`,onSend:e})})}function JB({rest:e}){let t=oz(),n=eL(`status`).data?.issuesEnabled??!0,r=ZR(`issues.list`,{},[`issues`],n),i=WB(e),a=r.data?.issues??[],o=Date.now(),s=(0,m.useCallback)(()=>{V(`issues.list`,{refresh:!0}).then(()=>r.reload())},[r]),c=async e=>await V(`issues.create`,{text:e})?(r.reload(),!0):!1;if(!n)return(0,R.jsx)(GB,{});if(!r.data&&r.error)return r.error.includes(`issues are off`)?(0,R.jsx)(GB,{}):(0,R.jsx)(LL,{message:`Could not load issues. ${r.error}`,onRetry:r.reload});let l=r.loading||!!r.data?.loading,u=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(uz,{title:TB,count:r.data?`${a.length} open`:void 0,children:(0,R.jsx)($,{label:`Refresh`,icon:km,disabled:l,className:l?`[&_svg]:animate-spin`:void 0,onClick:s})}),r.data?.error?(0,R.jsxs)(`p`,{className:`px-3 pt-2 text-sm text-destructive`,children:[`✗ `,r.data.error]}):null,r.data?(0,R.jsx)(VB,{issues:a,selectedId:i,now:o,onSelect:UB}):(0,R.jsx)(dz,{})]}),d=i===void 0?null:(0,R.jsx)(zB,{number:i},i),f=r.data&&a.length===0?(0,R.jsx)(KB,{loading:r.data.loading,loaded:r.data.loaded,error:r.data.error,onRetry:r.reload}):(0,R.jsx)(lz,{wide:t,list:u,detail:d,open:i!==void 0,onClose:HB,hint:`Select an issue to read it.`,describe:`Issue detail`});return(0,R.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[f,(0,R.jsx)(qB,{onCreate:c})]})}var YB=[`master`,`designer`,`backend`,`qa`],XB={master:`Master (oracle)`,designer:`Designer`,backend:`Backend`,qa:`QA`},ZB={master:`Master`,designer:`Designer`,backend:`Backend`,qa:`QA`},QB=`Every write archives the version before it.`;function $B(e){if(e<1e3)return String(e);let t=e/1e3;return`${t>=10?Math.round(t):t.toFixed(1)}k`}function eV(e){return`over the compaction threshold — ask the oracle to compact ${e}`}function tV(e){return{text:e.text,occurrence:e.occurrence}}function nV(e){return YB.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 rV(e){return e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing}function iV({initial:e,busy:t,onSave:n,onCancel:r}){let[i,a]=(0,m.useState)(e),o=()=>{!t&&i.trim()&&n(i)};return(0,R.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-lg border border-input p-3`,children:[(0,R.jsx)(`label`,{htmlFor:`knowledge-entry`,className:`text-sm font-medium text-foreground`,children:`Edit entry`}),(0,R.jsx)(WL,{id:`knowledge-entry`,value:i,rows:4,autoFocus:!0,onChange:e=>a(e.target.value),onKeyDown:e=>{rV(e)&&(e.preventDefault(),o())}}),(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:QB}),(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(J,{variant:`outline`,onClick:r,disabled:t,children:`Cancel`}),(0,R.jsxs)(J,{onClick:o,disabled:t||!i.trim(),children:[t?(0,R.jsx)(gE,{}):null,`Save`]})]})]})]})}function aV({open:e,file:t,initial:n,busy:r,onClose:i,onSave:a}){let[o,s]=(0,m.useState)(n),c=oE(e,aE.confirm);return(0,R.jsx)(QT,{open:e&&c,onOpenChange:e=>!e&&i(),label:`Edit ${t}`,description:QB,dismissOnBackdrop:!1,className:`max-w-3xl`,children:(0,R.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 p-6`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsxs)(`h2`,{className:`text-base font-medium`,children:[`Edit `,t]}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:QB})]}),(0,R.jsx)(WL,{value:o,rows:14,className:`min-h-0 flex-1 font-mono text-sm`,onChange:e=>s(e.target.value)}),(0,R.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,R.jsx)(J,{variant:`outline`,onClick:i,disabled:r,children:`Cancel`}),(0,R.jsxs)(J,{onClick:()=>a(o),disabled:r,children:[r?(0,R.jsx)(gE,{}):null,`Save file`]})]})]})})}function oV({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,R.jsxs)(`li`,{className:`flex items-start gap-2 text-sm text-muted-foreground`,children:[(0,R.jsx)(ym,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-primary`}),(0,R.jsx)(`span`,{className:`min-w-0 flex-1 break-words`,children:i}),(0,R.jsx)($,{label:`Take the note back`,icon:ah,className:`-my-1 size-7`,disabled:r,onClick:()=>n(e.id)})]})}function sV({entry:e,index:t,selected:n,notes:r,onPick:i,onTakeBack:a,busy:o}){let s=()=>i(t);return(0,R.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-9 cursor-pointer flex-col gap-1 rounded-lg bg-accent p-2.5 outline-none focus-visible:ring-3 focus-visible:ring-ring/30`:`flex min-h-9 cursor-pointer flex-col gap-1 rounded-lg p-2.5 outline-none transition-colors hover:bg-accent/50 focus-visible:ring-3 focus-visible:ring-ring/30`,children:[(0,R.jsx)(`div`,{className:`flex gap-2`,children:(0,R.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,R.jsx)(qI,{text:e.text})})}),r.length>0?(0,R.jsx)(`ul`,{className:`flex flex-col gap-1 pl-1`,children:r.map(e=>(0,R.jsx)(oV,{note:e,onTakeBack:a,busy:o},e.id))}):null]})}function cV({notes:e,onTakeBack:t,busy:n}){return e.length===0?null:(0,R.jsx)(Az,{title:`Notes on entries that changed`,right:String(e.length),children:(0,R.jsx)(`ul`,{className:`flex flex-col gap-1`,children:e.map(e=>(0,R.jsx)(oV,{note:e,about:e.entry,onTakeBack:t,busy:n},e.id))})})}function lV({view:e}){let t=e.entries.length;return(0,R.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,R.jsxs)(`h2`,{className:`text-sm font-semibold`,children:[ZB[e.agent],` · `,e.file]}),(0,R.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[t,` `,t===1?`entry`:`entries`,` · `,$B(e.chars),` chars`]}),e.over?(0,R.jsx)(`p`,{className:`text-sm text-foreground`,children:eV(e.file)}):null]})}function uV({draft:e,picked:t,setDraft:n,onEditFile:r,onDelete:i}){let a=!!e;return(0,R.jsxs)(MI,{children:[(0,R.jsx)($,{label:`Edit the entry`,icon:Cm,disabled:a||!t,onClick:()=>n({kind:`edit`,entry:t})}),(0,R.jsx)($,{label:t?`Add an entry after it`:`Add an entry`,icon:Dm,disabled:a,onClick:()=>n({kind:`add`,entry:t})}),(0,R.jsx)($,{label:`Comment on the entry`,icon:Zp,disabled:a||!t,onClick:()=>n({kind:`comment`,entry:t})}),(0,R.jsx)(Dz,{icon:th,label:`Delete the entry`,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,R.jsx)($,{label:`Edit the whole file`,icon:xp,disabled:a,onClick:r})]})}function dV({agent:e,file:t,onChanged:n}){let r=ZR(`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(()=>V(`knowledge.unnote`,{id:e})),v=()=>{h&&g(()=>V(`knowledge.remove`,{agent:e,file:t,ref:tV(h)}))},y=n=>{let r=o?.entry;if(o?.kind===`edit`&&r)return void g(()=>V(`knowledge.edit`,{agent:e,file:t,ref:tV(r),text:n}));if(o?.kind===`comment`&&r)return void g(()=>V(`knowledge.comment`,{agent:e,file:t,ref:tV(r),text:n}));g(()=>V(`knowledge.add`,{agent:e,file:t,...h?{ref:tV(h)}:{},text:n}))};return f?(0,R.jsxs)(`article`,{className:`flex flex-col gap-4`,"aria-label":`${ZB[e]} ${t}`,children:[(0,R.jsx)(uV,{draft:o,picked:h,setDraft:s,onEditFile:()=>l(!0),onDelete:v}),(0,R.jsx)(lV,{view:f}),p.length===0?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Nothing here yet. Add the first entry below.`}):null,(0,R.jsx)(`ul`,{className:`flex flex-col gap-1`,children:p.map((e,t)=>(0,R.jsx)(sV,{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,R.jsx)(iV,{initial:o.entry.text,busy:u,onSave:y,onCancel:()=>s(void 0)}):null,o?.kind===`comment`?(0,R.jsx)(wB,{label:`Comment on this entry`,hint:QB,buttonLabel:`Add note`,onSend:async e=>(y(e),!0)}):null,o?.kind===`add`?(0,R.jsx)(wB,{label:`Add an entry`,hint:QB,buttonLabel:`Add entry`,onSend:async e=>(y(e),!0)}):null,u&&!o?(0,R.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,R.jsx)(gE,{}),` saving…`]}):null,(0,R.jsx)(cV,{notes:f.detached,onTakeBack:_,busy:u}),(0,R.jsx)(aV,{open:c,file:t,initial:f.content,busy:u,onClose:()=>l(!1),onSave:n=>{l(!1),g(()=>V(`knowledge.replaceFile`,{agent:e,file:t,text:n}))}})]}):r.error?(0,R.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not read the file. `,r.error]}):(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`reading…`})}function fV(e){return`${e.agent}/${e.file}`}function pV({info:e}){return(0,R.jsxs)(`span`,{className:`flex shrink-0 items-center gap-2 text-xs text-muted-foreground tabular-nums`,children:[(0,R.jsx)(`span`,{children:$B(e.chars)}),e.over?(0,R.jsx)(`span`,{className:`text-foreground`,children:`· over`}):null,e.notes>0?(0,R.jsxs)(`span`,{className:`text-primary`,children:[e.notes,` note`,e.notes===1?``:`s`]}):null]})}function mV({info:e,selected:t,onSelect:n}){return(0,R.jsx)(`li`,{children:(0,R.jsxs)(`button`,{type:`button`,"aria-current":t?`true`:void 0,onClick:()=>n(fV(e)),className:q(`flex min-h-8 w-full items-center justify-between gap-3 rounded-lg px-3 py-1.5 text-left outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/30`,t&&`bg-accent`),children:[(0,R.jsx)(`span`,{className:q(`min-w-0 truncate text-sm text-foreground`,t&&`font-medium`),children:e.label}),(0,R.jsx)(pV,{info:e})]})})}var hV={master:Bf,designer:dm,backend:Vm,qa:Gm},gV=`bot-lobby.knowledge.folded`;function _V(){try{let e=JSON.parse(window.localStorage.getItem(gV)??`[]`);return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}catch{return[]}}function vV({files:e,selectedKey:t,onSelect:n}){let[r,i]=(0,m.useState)(_V);function a(e,t){i(n=>{let r=t?n.filter(t=>t!==e):[...new Set([...n,e])];try{window.localStorage.setItem(gV,JSON.stringify(r))}catch{}return r})}return(0,R.jsx)(`div`,{className:`flex flex-col gap-0.5 px-1 pb-2`,children:nV(e).map(e=>{let i=!r.includes(e.agent),o=hV[e.agent],s=`knowledge-${e.agent}`;return(0,R.jsxs)(`section`,{children:[(0,R.jsx)(`h3`,{children:(0,R.jsxs)(`button`,{type:`button`,"aria-expanded":i,"aria-controls":s,onClick:()=>a(e.agent,!i),onKeyDown:t=>{t.key===`ArrowLeft`||t.key===`h`?(t.preventDefault(),t.stopPropagation(),a(e.agent,!1)):(t.key===`ArrowRight`||t.key===`l`)&&(t.preventDefault(),t.stopPropagation(),i||a(e.agent,!0))},className:`flex h-8 w-full items-center gap-2 rounded-lg px-3 text-left text-xs font-medium text-muted-foreground transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/30`,children:[(0,R.jsx)(Jf,{"aria-hidden":`true`,className:q(`size-3.5 shrink-0 transition-transform duration-200 ease-snap`,i&&`rotate-90`)}),(0,R.jsx)(o,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,R.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:XB[e.agent]}),e.notes>0?(0,R.jsxs)(`span`,{className:`shrink-0 font-normal text-primary tabular-nums`,children:[e.notes,` note`,e.notes===1?``:`s`]}):null]})}),(0,R.jsx)(Cl,{initial:!1,children:i?(0,R.jsx)(Rd.ul,{id:s,initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:{type:`spring`,stiffness:520,damping:42},className:`flex flex-col gap-0.5 overflow-hidden pl-3`,children:e.files.map(e=>(0,R.jsx)(mV,{info:e,selected:fV(e)===t,onSelect:n},fV(e)))},`files`):null})]},e.agent)})})}var yV=()=>aL(iL(`knowledge`)),bV=e=>{let[t,n]=e.split(`/`);aL(iL(`knowledge`,t??``,n??``))};function xV(){return(0,R.jsx)(ML,{className:`glass m-4 flex-1 border`,children:(0,R.jsx)(NL,{children:(0,R.jsx)(FL,{children:`No knowledge files yet.`})})})}function SV(e,t,n,r){let i=e.find(e=>e.agent===t&&e.file===n);return i?(0,R.jsx)(dV,{agent:i.agent,file:i.file,onChanged:r},fV(i)):t&&n?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`That file is not on the list any more.`}):null}function CV({agent:e,file:t}){let n=oz(),r=ZR(`knowledge.files`,{},[`knowledge`]),i=r.data?.files??[];if(!r.data&&r.error)return(0,R.jsx)(LL,{message:`Could not load the knowledge files. ${r.error}`,onRetry:r.reload});if(r.data&&i.length===0)return(0,R.jsx)(xV,{});let a=i.reduce((e,t)=>e+t.notes,0),o=i.find(n=>n.agent===e&&n.file===t),s=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(uz,{title:`Knowledge`,count:a>0?`${a} note${a===1?``:`s`}`:void 0}),r.data?(0,R.jsx)(vV,{files:i,selectedKey:o?fV(o):void 0,onSelect:bV}):(0,R.jsx)(dz,{})]});return(0,R.jsx)(lz,{wide:n,list:s,detail:SV(i,e,t,r.reload),open:!!(e&&t),onClose:yV,hint:`Select a file to read its entries.`,describe:`Knowledge file`})}function wV({className:e,...t}){return(0,R.jsx)(wx,{"data-slot":`checkbox`,className:q(`peer relative flex size-[1.125rem] shrink-0 items-center justify-center rounded-[5px] border border-input bg-card/40 text-primary-foreground transition-colors duration-150 outline-none before:absolute before:-inset-1.5 before:content-[''] focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/40 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary`,e),...t,children:(0,R.jsx)(Ex,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center`,children:(0,R.jsx)(Wf,{"aria-hidden":`true`,className:`size-3`,strokeWidth:3})})})}var TV=`Sessions`,EV=`No sessions yet. A session is a live Excalidraw room that you and your agents draw in together.`,DV=`a add one: in Excalidraw, Share → Live collaboration → Start session, then paste the link`,OV=`n or make a new room here and open its link in Excalidraw`,kV=`Up to 5 sessions; each can be assigned to one agent or several.`,AV=`agents may draw here (w: look only)`,jV=`agents may only look (w: let them draw)`,MV=`checking the room…`,NV=`t checks that the room can be reached`,PV=`Assigned to`,FV=`Assigned agents read the board and draw on it with excalidraw_read and excalidraw_draw, and appear in the room under their own name.`,IV=`Add or rename`,LV=`Add by link`,RV=`In Excalidraw, Share → Live collaboration → Start session, then paste the link. Enter adds it.`,zV=`New room`,BV=`Makes a fresh room link to open in Excalidraw; the name is optional.`,VV=`Rename`,HV=`draw`,UV=`look only`,WV=`Copied to the clipboard`,GV=`Could not reveal the link.`,KV=[`master`,`designer`,`backend`,`qa`,`scout`,`researcher`,`quickfix`,`planner`],qV={master:`Master (oracle)`,designer:`Designer`,backend:`Backend`,qa:`QA`,scout:`Scouts`,researcher:`Researcher`,quickfix:`Quick fix`,planner:`Planner`};function JV(e){return e===0?`no agents`:`${e} agent${e===1?``:`s`}`}function YV(e){return e?e.ok?`✓`:`!`:``}function XV({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,R.jsxs)(`form`,{className:`flex flex-col gap-2`,onSubmit:e=>{e.preventDefault(),l()},children:[(0,R.jsx)(`label`,{htmlFor:e,className:`text-sm font-medium text-foreground`,children:t}),(0,R.jsx)(`input`,{id:e,value:s,maxLength:80,onChange:e=>c(e.target.value),className:`h-8 w-full rounded-lg border border-input bg-card/40 px-3 text-sm outline-none focus-visible:ring-3 focus-visible:ring-ring/30`}),n?(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n}):null,(0,R.jsx)(J,{type:`submit`,className:`h-8 self-end`,disabled:a&&!s.trim(),children:r})]})}function ZV({onChanged:e}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(wB,{label:LV,hint:RV,buttonLabel:`Add`,onSend:async t=>await V(`excalidraw.add`,{link:t})?(e(),!0):!1}),(0,R.jsx)(XV,{id:`new-room`,label:zV,hint:BV,buttonLabel:zV,onSubmit:async t=>{let n=t.trim();return await V(`excalidraw.create`,n?{name:n}:{})?(e(),!0):!1}})]})}function QV({session:e,revealed:t}){return(0,R.jsx)(`p`,{className:`font-mono text-sm break-all text-foreground`,children:t??e.masked})}function $V({session:e}){return(0,R.jsx)(`p`,{className:e.contribute?`text-sm text-primary`:`text-sm text-muted-foreground`,children:e.contribute?AV:jV})}function eH({check:e,checking:t}){return t?(0,R.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,R.jsx)(gE,{className:`size-3.5`,"aria-hidden":`true`}),MV]}):e?(0,R.jsxs)(`p`,{className:e.ok?`text-sm text-primary`:`text-sm text-foreground`,children:[e.ok?`✓`:`!`,` `,e.text]}):(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:NV})}function tH({agent:e,on:t,onToggle:n}){return(0,R.jsx)(`li`,{children:(0,R.jsxs)(`label`,{className:`flex min-h-8 w-full cursor-pointer items-center gap-2.5 rounded-lg px-2 text-sm transition-colors hover:bg-muted`,children:[(0,R.jsx)(wV,{checked:t,onCheckedChange:()=>n(e)}),(0,R.jsx)(`span`,{className:t?`text-foreground`:`text-muted-foreground`,children:qV[e]})]})})}function nH({session:e,onChanged:t}){let n=async n=>{await V(`excalidraw.toggleAgent`,{id:e.id,agent:n})&&t()},r=async()=>{await V(`excalidraw.toggleAll`,{id:e.id})&&t()},i=e.agents.length===KV.length;return(0,R.jsxs)(Az,{title:PV,right:JV(e.agents.length),children:[(0,R.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:KV.map(t=>(0,R.jsx)(tH,{agent:t,on:e.agents.includes(t),onToggle:n},t))}),(0,R.jsx)(`div`,{className:`flex`,children:(0,R.jsx)($,{label:i?`Take every agent off`:`Assign every agent`,icon:zp,onClick:()=>void r()})}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:FV})]})}function rH({session:e,onChanged:t}){return(0,R.jsx)(XV,{id:`rename-room`,label:VV,initial:e.name,required:!0,buttonLabel:VV,onSubmit:async n=>await V(`excalidraw.rename`,{id:e.id,name:n.trim()})?(t(),!0):!1},e.name)}function iH({session:e,check:t,checking:n,onCheck:r,onChanged:i,onRemove:a}){let[o,s]=(0,m.useState)(),c=async()=>{try{s((await uf(`excalidraw.reveal`,{id:e.id})).link)}catch(e){af.error(e instanceof Error?e.message:GV)}},l=()=>void navigator.clipboard?.writeText(o??``).then(()=>af(WV)).catch(()=>void 0),u=async()=>{await V(`excalidraw.toggleContribute`,{id:e.id})&&i()};return(0,R.jsxs)(`article`,{"aria-label":`Session detail`,className:`flex flex-col gap-4`,children:[(0,R.jsxs)(MI,{children:[o?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)($,{label:`Copy the link`,icon:pp,onClick:l}),(0,R.jsx)($,{label:`Open board`,icon:_p,tone:`primary`,href:o})]}):(0,R.jsx)($,{label:`Reveal the link`,icon:yp,onClick:()=>void c()}),(0,R.jsx)($,{label:e.contribute?`Look only: agents stop drawing`:`Let agents draw`,icon:e.contribute?xm:Cm,pressed:e.contribute,onClick:()=>void u()}),(0,R.jsx)($,{label:`Check the room`,icon:n?Up:Gm,disabled:n,onClick:r}),(0,R.jsx)(Dz,{icon:th,label:`Remove the session`,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})]}),(0,R.jsx)(`h2`,{className:`text-sm font-medium break-words`,children:e.name}),(0,R.jsx)(QV,{session:e,revealed:o}),(0,R.jsx)($V,{session:e}),(0,R.jsx)(eH,{check:t,checking:n}),(0,R.jsx)(nH,{session:e,onChanged:i}),(0,R.jsxs)(Az,{title:IV,children:[(0,R.jsx)(ZV,{onChanged:i}),(0,R.jsx)(rH,{session:e,onChanged:i})]})]})}function aH({check:e,checking:t}){if(t)return(0,R.jsx)(gE,{className:`size-3.5 shrink-0 text-muted-foreground`});let n=YV(e);return n?(0,R.jsx)(`span`,{className:q(`w-3.5 shrink-0 text-center`,e?.ok?`text-primary`:`text-foreground`),"aria-hidden":`true`,children:n}):(0,R.jsx)(`span`,{className:`w-3.5 shrink-0`,"aria-hidden":`true`})}function oH({session:e,check:t,checking:n,selected:r,onSelect:i}){return(0,R.jsx)(`li`,{children:(0,R.jsxs)(`button`,{type:`button`,"aria-current":r?`true`:void 0,onClick:()=>i(e.id),className:`flex min-h-9 w-full flex-col gap-0.5 rounded-lg px-3 py-2.5 text-left outline-none transition-colors duration-150 hover:bg-accent/60 focus-visible:ring-3 focus-visible:ring-ring/40 aria-[current=true]:bg-accent`,children:[(0,R.jsxs)(`span`,{className:`flex items-center gap-2 text-sm`,children:[(0,R.jsx)(aH,{check:t,checking:n}),(0,R.jsx)(`span`,{className:q(`min-w-0 flex-1 break-words text-foreground`,r&&`font-medium`),children:e.name}),(0,R.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:JV(e.agents.length)})]}),(0,R.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2 pl-[1.375rem] text-xs text-muted-foreground`,children:[(0,R.jsx)(`span`,{className:`font-mono break-all`,children:e.masked}),(0,R.jsx)(mB,{variant:`secondary`,children:e.contribute?HV:UV})]})]})})}function sH({sessions:e,checks:t,checking:n,selectedId:r,onSelect:i}){return(0,R.jsx)(`ul`,{className:`flex flex-col gap-0.5 px-2 pb-2`,children:e.map(e=>(0,R.jsx)(oH,{session:e,check:t[e.id],checking:n.includes(e.id),selected:e.id===r,onSelect:i},e.id))})}var cH=()=>aL(iL(`excalidraw`)),lH=e=>aL(iL(`excalidraw`,e));function uH({onChanged:e}){return(0,R.jsxs)(ML,{className:`glass m-4 flex-1 border`,children:[(0,R.jsxs)(NL,{children:[(0,R.jsx)(PL,{children:EV}),(0,R.jsx)(FL,{className:`font-mono`,children:DV}),(0,R.jsx)(FL,{className:`font-mono`,children:OV}),(0,R.jsx)(FL,{children:kV})]}),(0,R.jsx)(`div`,{className:`flex w-full max-w-md flex-col gap-4 text-left`,children:(0,R.jsx)(ZV,{onChanged:e})})]})}function dH({id:e}){let t=oz(),n=ZR(`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 V(`excalidraw.check`,{id:e});o(t=>t.filter(t=>t!==e)),t&&i(n=>({...n,[e]:t}))},u=async()=>{c&&await V(`excalidraw.remove`,{id:c.id})&&(n.reload(),cH())};if(!n.data&&n.error)return(0,R.jsx)(LL,{message:`Could not load sessions. ${n.error}`,onRetry:n.reload});if(n.data&&s.length===0)return(0,R.jsx)(uH,{onChanged:n.reload});let d=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(uz,{title:TV,count:n.data?`${s.length}/5`:void 0}),n.data?(0,R.jsx)(sH,{sessions:s,checks:r,checking:a,selectedId:e,onSelect:lH}):(0,R.jsx)(dz,{})]}),f=c?(0,R.jsx)(iH,{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,R.jsx)(lz,{wide:t,list:d,detail:f,open:c!==void 0,onClose:cH,hint:`Select a session to see its link and agents.`,describe:`Session detail`})}var fH=`bot-lobby.collapsed.`,pH=new Set,mH=new Map;function hH(e){if(mH.has(e))return mH.get(e);try{return localStorage.getItem(fH+e)===`1`}catch{return!1}}function gH(e,t){mH.set(e,t);try{localStorage.setItem(fH+e,t?`1`:`0`)}catch{}for(let e of[...pH])e()}function _H(e){return pH.add(e),()=>{pH.delete(e)}}function vH(e){return[(0,m.useSyncExternalStore)(_H,()=>hH(e),()=>!1),(0,m.useCallback)(()=>gH(e,!hH(e)),[e])]}var yH={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 bH(e){return e.length<=2?e:e.charAt(0)+e.slice(1).toLowerCase()}function xH(e){return yH[e]??`text-muted-foreground`}function SH(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 CH(e){return e?.runs??[]}function wH(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 TH({entry:e}){return e.pending?(0,R.jsx)(gE,{"aria-hidden":`true`,role:`presentation`,className:`size-3`}):e.kind===`error`?(0,R.jsx)(lh,{"aria-hidden":`true`,className:`size-3.5 text-destructive`}):e.kind===`warning`?(0,R.jsx)(rh,{"aria-hidden":`true`,className:`size-3.5 text-warning`}):e.kind===`success`?(0,R.jsx)(Wf,{"aria-hidden":`true`,className:`size-3.5 text-success`}):(0,R.jsx)(`span`,{className:`size-1.5 rounded-full bg-muted-foreground/40`})}function EH({entry:e}){return(0,R.jsxs)(`li`,{className:`grid grid-cols-[2.75rem_5.5rem_1rem_minmax(0,1fr)] items-baseline gap-x-2 rounded-lg px-2 py-1 text-sm transition-colors hover:bg-accent/50`,children:[(0,R.jsx)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:pz(e.at)}),(0,R.jsx)(`span`,{className:q(`overflow-hidden text-xs font-medium whitespace-nowrap`,xH(e.source)),children:bH(e.source)}),(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`flex items-center justify-center self-center`,children:(0,R.jsx)(TH,{entry:e})}),(0,R.jsx)(`span`,{className:`sr-only`,children:e.pending?`pending`:e.kind}),(0,R.jsx)(`span`,{className:q(`min-w-0 break-words`,e.kind===`error`?`text-destructive`:e.pending?``:`text-muted-foreground`),children:e.pending?`${e.text}…`:e.text})]})}function DH({entries:e,collapsed:t,onToggle:n}){let r=e.slice(-400),i=r.filter(e=>e.pending).length,a=(0,m.useRef)(null),o=r.at(-1)?.id;return(0,m.useEffect)(()=>{let e=a.current;e&&e.scrollHeight-e.scrollTop-e.clientHeight<96&&(e.scrollTop=e.scrollHeight)},[o]),(0,R.jsx)(Oz,{"aria-label":`Activity`,title:`Activity`,collapsed:t,onToggle:n,note:i?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(gE,{"aria-hidden":`true`,role:`presentation`,className:`size-3`}),` `,i,` running`]}):void 0,children:(0,R.jsx)(`div`,{ref:a,className:`min-h-0 flex-1 overflow-y-auto px-2 pb-3`,role:`log`,"aria-label":`Activity`,tabIndex:0,children:r.length===0?(0,R.jsx)(`p`,{className:`px-2 text-sm text-muted-foreground`,children:`No activity yet.`}):(0,R.jsx)(`ul`,{children:r.map(e=>(0,R.jsx)(EH,{entry:e},e.id))})})})}var OH=3e5,kH=`earlier messages load as you scroll up`,AH=`No task is running in this session.`,jH=`Type a request below and press enter to start one: the oracle scouts, proposes, plans and delegates.`,MH=`Or plan it first with the whole planning panel in 3 Plan, or make a direct change in 4 Quick fix.`,NH=`Nothing said yet. Type below to talk to the oracle about this task.`;function PH({entry:e}){let t=e.text.startsWith(`✗`);return(0,R.jsx)(`div`,{className:t?`flex justify-center text-sm text-destructive`:`flex justify-center text-sm text-muted-foreground`,children:(0,R.jsxs)(`span`,{className:`max-w-[80%] text-center`,children:[e.text,e.at?` · ${pz(e.at)}`:``]})})}function FH({name:e,children:t}){return(0,R.jsxs)(`span`,{className:`flex items-center gap-2 text-sm`,children:[(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 rounded-full bg-primary`}),(0,R.jsx)(`span`,{className:`font-medium`,children:e}),(0,R.jsx)(`span`,{className:`ml-auto flex items-center gap-2 text-xs text-muted-foreground`,children:t})]})}function IH({entry:e,head:t}){return e.role===`you`?(0,R.jsxs)(`div`,{className:`flex flex-col items-end gap-1`,children:[t?(0,R.jsxs)(`span`,{className:`flex items-baseline gap-2 text-sm`,children:[(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:pz(e.at)}),(0,R.jsx)(`span`,{className:`font-medium`,children:`You`})]}):null,(0,R.jsx)(`div`,{className:`max-w-[78%] rounded-lg rounded-tr-lg border border-primary/15 bg-you px-4 py-2`,children:(0,R.jsx)(qI,{text:e.text})})]}):(0,R.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[t?(0,R.jsx)(FH,{name:e.role===`panel`?`Panel`:`Oracle`,children:(0,R.jsx)(`time`,{children:pz(e.at)})}):null,(0,R.jsx)(`div`,{className:`max-w-[88%] pl-4`,children:(0,R.jsx)(qI,{text:e.text})})]})}var LH=(0,m.memo)(function({entry:e,head:t,fresh:n}){return(0,R.jsx)(Rd.div,{initial:n?{opacity:0,y:10}:!1,animate:{opacity:1,y:0},transition:{type:`spring`,stiffness:420,damping:32},children:e.role===`note`?(0,R.jsx)(PH,{entry:e}):(0,R.jsx)(IH,{entry:e,head:t})})},(e,t)=>e.head===t.head&&e.entry.id===t.entry.id&&e.entry.text===t.entry.text&&e.entry.at===t.entry.at);function RH({text:e,busy:t}){let n=!!e?.trim();return!n&&!t?null:(0,R.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,R.jsx)(FH,{name:`Oracle`,children:t?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(gE,{"aria-hidden":`true`,role:`presentation`,className:`size-3`}),n?`writing`:`working…`]}):null}),n?(0,R.jsx)(`div`,{className:`max-w-[88%] pl-4`,children:(0,R.jsx)(qI,{text:e??``})}):null]})}function zH({hasTask:e}){return(0,R.jsx)(ML,{className:`h-full border-0`,children:(0,R.jsxs)(NL,{children:[e?null:(0,R.jsx)(PL,{children:AH}),(0,R.jsxs)(FL,{children:[e?NH:jH,e?null:(0,R.jsxs)(R.Fragment,{children:[` `,MH]})]})]})})}async function BH(e){let t=await uf(`lobby.history`,{before:e});return{entries:t.entries,hasOlder:t.hasOlder}}function VH(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 BH(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 HH(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 UH({chat:e,reply:t,busy:n,hasOlder:r,hasTask:i}){let{ref:a,atBottom:o,stick:s,onScroll:c}=HH(e.length+(t?.length??0)),{merged:l,more:u,loading:d,load:f}=VH(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,[g,_]=(0,m.useState)(!1);return(0,m.useEffect)(()=>_(!0),[]),(0,R.jsxs)(Oz,{"aria-label":`Conversation`,title:`Conversation`,note:u?kH:void 0,children:[(0,R.jsx)(`div`,{ref:a,onScroll:p,className:`min-h-0 flex-1 overflow-y-auto px-4 pb-3`,role:`log`,"aria-label":`Conversation`,tabIndex:0,children:h?(0,R.jsx)(zH,{hasTask:i}):(0,R.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[l.map((e,t)=>{let n=l[t-1],r=!n||n.role!==e.role||e.at-n.at>OH;return(0,R.jsx)(LH,{entry:e,head:r,fresh:g},e.id)}),(0,R.jsx)(RH,{text:t,busy:n})]})}),o?null:(0,R.jsx)(`div`,{className:`absolute right-4 bottom-3`,children:(0,R.jsx)($,{label:`Jump to latest`,icon:Af,tone:`primary`,className:`shadow-sm`,onClick:s})})]})}function WH(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 GH(e){return e===`running`?(0,R.jsx)(gE,{"aria-hidden":`true`,role:`presentation`,className:`size-3.5`}):e===`success`?(0,R.jsx)(Wf,{"aria-hidden":`true`,className:`size-3.5 text-success`}):e===`failed`||e===`timeout`||e===`error`?(0,R.jsx)(lh,{"aria-hidden":`true`,className:`size-3.5 text-destructive`}):(0,R.jsx)(`span`,{className:`size-1.5 rounded-full bg-muted-foreground/50`})}function KH(e,t){let n=e.startedAt?Date.parse(e.startedAt):NaN;return mz((e.finishedAt?Date.parse(e.finishedAt):t)-n)}function qH({runs:e}){let t=WH(e.some(e=>e.status===`running`));return e.length===0?null:(0,R.jsx)(`ul`,{className:`flex shrink-0 flex-wrap items-center gap-2`,"aria-label":`Runs`,children:e.map((e,n)=>(0,R.jsxs)(`li`,{className:`flex items-center gap-2 rounded-lg bg-muted py-1.5 pr-3 pl-2.5 text-xs`,children:[(0,R.jsx)(`span`,{className:`flex size-4 items-center justify-center`,children:GH(e.status)}),(0,R.jsx)(`span`,{className:`sr-only`,children:e.status??`unknown`}),(0,R.jsx)(`span`,{className:q(`font-medium`,xH(SH(e))),children:bH(SH(e))}),e.activity??e.step?(0,R.jsx)(`span`,{className:`max-w-[18rem] truncate text-muted-foreground`,children:e.activity??e.step}):null,(0,R.jsx)(`span`,{className:`tabular-nums text-muted-foreground`,children:KH(e,t)})]},e.runId??n))})}var JH=8;function YH(e){return e?e.path===`fast`?`fast track (${e.size})`:`full workflow (${e.size})`:``}function XH(e,t){let n=Math.min(t,JH);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 ZH({done:e,total:t}){return(0,R.jsx)(`span`,{className:`inline-flex items-center gap-0.5`,"aria-hidden":`true`,children:XH(e,t).map((e,t)=>(0,R.jsx)(`span`,{className:q(`h-1.5 w-3 rounded-full`,e?`bg-primary`:`bg-muted-foreground/25`)},t))})}function QH({check:e,className:t}){return(0,R.jsx)(e===`done`?$f:e===`dropped`?sp:lp,{"aria-hidden":`true`,className:q(`size-4 shrink-0`,e===`done`?`text-success`:`text-muted-foreground`,t)})}function $H({children:e}){return(0,R.jsx)(`span`,{className:`hidden shrink-0 items-center gap-1 text-xs text-muted-foreground md:inline-flex`,children:e})}function eU({done:e,total:t,current:n}){let r=t>0?Math.min(100,Math.round(e/t*100)):0;return(0,R.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 text-xs text-muted-foreground`,children:[(0,R.jsxs)(`span`,{className:`tabular-nums`,children:[e,` of `,t,` steps`]}),(0,R.jsx)(`div`,{className:`h-1.5 w-16 overflow-hidden rounded-full bg-muted`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":e,"aria-label":`Plan progress`,children:(0,R.jsx)(Rd.div,{className:`h-full rounded-full bg-primary`,initial:!1,animate:{width:`${r}%`},transition:{type:`spring`,stiffness:260,damping:30}})}),n?(0,R.jsxs)(`span`,{className:`hidden max-w-[16rem] truncate xl:inline`,children:[`now: `,(0,R.jsx)(`span`,{className:`text-foreground`,children:n})]}):null]})}function tU({task:e,status:t}){let n=t?.branch??t?.workspace.branch,r=e?.git?.branch??n;return(0,R.jsxs)(`section`,{className:`glass flex h-10 shrink-0 items-center gap-3 rounded-lg px-3`,"aria-label":`Task`,role:`group`,children:[(0,R.jsxs)(`h2`,{className:`min-w-0 flex-1 truncate text-[0.8125rem] font-medium`,title:e?.title,children:[e?.title??`No task is running in this session.`,e?null:(0,R.jsx)(`span`,{className:`ml-2 font-normal text-muted-foreground`,children:t?.sessionName??`Type a request below to start one.`})]}),e?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`shrink-0 rounded-lg bg-accent px-2 py-0.5 text-xs font-medium`,children:e.state.replace(/_/g,` `)}),(0,R.jsx)($H,{children:e.id}),e.track?(0,R.jsx)($H,{children:YH(e.track)}):null,(e.domains??[]).length>0?(0,R.jsx)($H,{children:e.domains.join(`, `)}):null,r?(0,R.jsxs)(`span`,{className:`hidden max-w-48 shrink-0 items-center gap-1 text-xs text-muted-foreground lg:inline-flex`,children:[(0,R.jsx)(Dp,{"aria-hidden":`true`,className:`size-3 shrink-0`}),(0,R.jsxs)(`span`,{className:`truncate`,children:[r,e.git?.from?` · from ${e.git.from}`:``]})]}):null,e.progress?(0,R.jsx)(eU,{done:e.progress.done,total:e.progress.total,current:e.currentStep}):null]}):null]})}function nU({thought:e}){return(0,R.jsxs)(`li`,{className:`flex items-start gap-3 text-sm`,children:[(0,R.jsx)(`span`,{className:q(`w-24 shrink-0 overflow-hidden pt-0.5 text-xs font-medium whitespace-nowrap`,xH(e.source)),children:bH(e.source)}),(0,R.jsx)(`span`,{className:`min-w-0 flex-1 text-muted-foreground italic`,children:(0,R.jsx)(qI,{text:e.text})}),e.live?(0,R.jsxs)(`span`,{className:`flex shrink-0 items-center gap-2 pt-0.5 text-xs text-primary`,children:[(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`size-1.5 rounded-full bg-primary motion-safe:animate-pulse`}),`thinking`]}):null]})}function rU({thoughts:e,collapsed:t,onToggle:n}){let r=wH(e);return(0,R.jsx)(Oz,{className:`max-h-44 shrink-0`,"aria-label":`Thinking`,title:`Thinking`,collapsed:t,onToggle:n,children:(0,R.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 pb-3`,role:`log`,"aria-label":`Thinking`,tabIndex:0,children:r.length===0?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Thoughts from the oracle and every agent appear here, and only here.`}):(0,R.jsx)(`ul`,{className:`space-y-1.5`,children:r.map(e=>(0,R.jsx)(nU,{thought:e},e.id))})})})}function iU(){return(0,R.jsxs)(`div`,{className:`flex flex-1 items-center justify-center gap-2 text-sm text-muted-foreground`,children:[(0,R.jsx)(gE,{}),(0,R.jsx)(`span`,{children:`Connecting…`})]})}var aU={type:`spring`,stiffness:420,damping:38};function oU(){let e=eL(`lobby`),t=eL(`status`),[n,r]=vH(`lobby.activity`),[i,a]=vH(`lobby.thinking`),o=e.data,s=t.data?.panels??{conversation:!0,activity:!0,thinking:!0},c=s.activity&&!n,l=s.conversation||c,u=s.conversation&&c;return!o&&e.loading?(0,R.jsx)(iU,{}):!o&&e.error?(0,R.jsx)(LL,{message:e.error,onRetry:()=>Yd.onHello({})}):(0,R.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 px-4 pb-2`,children:[(0,R.jsx)(tU,{task:o?.task,status:t.data}),(0,R.jsx)(qH,{runs:CH(o)}),l?(0,R.jsxs)(Rd.div,{layout:`position`,transition:aU,className:`grid min-h-0 flex-1 gap-4 ${u?`grid-rows-2 lg:grid-cols-[minmax(0,1.4fr)_minmax(0,1fr)] lg:grid-rows-1`:`grid-rows-1`}`,children:[s.conversation?(0,R.jsx)(UH,{chat:o?.chat??[],reply:o?.reply,busy:t.data?.busy??!1,hasOlder:o?.hasOlderChat??!1,hasTask:!!o?.task}):null,c?(0,R.jsx)(DH,{entries:o?.activity??[],collapsed:!1,onToggle:r}):null]}):null,s.activity&&n?(0,R.jsx)(Rd.div,{layout:`position`,transition:aU,className:`shrink-0`,children:(0,R.jsx)(DH,{entries:o?.activity??[],collapsed:!0,onToggle:r})}):null,s.thinking?(0,R.jsx)(Rd.div,{layout:`position`,transition:aU,className:`shrink-0`,children:(0,R.jsx)(rU,{thoughts:o?.thoughts??[],collapsed:i,onToggle:a})}):null]})}var sU={master:`master`,scout:`scout`,worker:`worker`,reviewer:`QA gate`,researcher:`research`,quickfix:`quick fix`,planner:`oracle (plan)`,panel:`panel`};function cU(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 lU(e){return e>0?cU(e):`—`}function uU(e,t){return t>0?`${Math.round(e/t*100)}%`:`—`}function dU(e){return e<=0?`—`:e<.01?`<$0.01`:`$${e.toFixed(2)}`}function fU(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 pU(e){return e<1e3?`${Math.round(e)} ms`:`${(e/1e3).toFixed(1)}s`}function mU(e){return e>=.9?{icon:`✓`,word:`healthy`,tone:`healthy`}:e>=.7?{icon:`!`,word:`shaky`,tone:`shaky`}:{icon:`✗`,word:`failing`,tone:`failing`}}function hU(e){return e===`model`?`by model · thinking`:`by model · thinking · agent`}function gU(e,t){let n=t===`model-kind`?sU[e.kinds[0]??``]??e.kinds[0]??``:``;return[e.model,e.thinking,n].filter(Boolean).join(` · `)}var _U=[`bg-chart-1`,`bg-chart-2`,`bg-chart-3`,`bg-chart-4`,`bg-chart-5`],vU={MASTER:`bg-primary`,ORACLE:`bg-primary`,DEV:`bg-source-dev`,DESIGN:`bg-source-design`,QA:`bg-source-qa`,RESEARCH:`bg-source-research`,"QUICK FIX":`bg-source-quickfix`};function yU(e){let t=vU[e.toUpperCase()];if(t)return t;let n=0;for(let t of e)n=(n*31+t.charCodeAt(0))%_U.length;return _U[n]??_U[0]}function bU(e){return sU[e]??e}var xU=6;function SU({title:e,right:t,children:n}){return(0,R.jsxs)(`section`,{className:`glass flex min-w-0 flex-col gap-3 rounded-lg px-4 py-3`,"aria-label":e,children:[(0,R.jsxs)(`h2`,{className:`flex items-baseline justify-between gap-3 text-sm font-medium`,children:[(0,R.jsx)(`span`,{children:e}),t?(0,R.jsx)(`span`,{className:`truncate text-xs font-normal text-muted-foreground`,children:t}):null]}),n]})}function CU({rows:e,render:t}){let[n,r]=(0,m.useState)(!1),i=n?e:e.slice(0,xU);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`ul`,{className:`flex flex-col gap-2.5`,children:i.map(t)}),e.length>xU?(0,R.jsx)(`button`,{type:`button`,"aria-expanded":n,onClick:()=>r(e=>!e),className:`h-6 self-start rounded-lg text-xs text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/30`,children:n?`Show fewer`:`Show all ${e.length}`}):null]})}function wU(e,t){return t>0?Math.max(1.5,e/t*100):0}function TU({label:e,value:t,marker:n,max:r,valueText:i,sub:a}){return(0,R.jsxs)(`li`,{className:`flex flex-col gap-1`,children:[(0,R.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3 text-[0.8125rem]`,children:[(0,R.jsx)(`span`,{className:`min-w-0 truncate`,title:e,children:e}),(0,R.jsxs)(`span`,{className:`shrink-0 tabular-nums`,children:[i,a?(0,R.jsx)(`span`,{className:`ml-2 text-xs text-muted-foreground`,children:a}):null]})]}),(0,R.jsxs)(`div`,{className:`relative h-1.5 rounded-full bg-muted`,role:`img`,"aria-label":`${e}: ${i}`,children:[(0,R.jsx)(`div`,{className:`h-full rounded-full bg-primary/70`,style:{width:`${wU(t,r)}%`}}),n?(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`absolute top-1/2 h-3 w-0.5 -translate-y-1/2 rounded-full bg-foreground/40`,style:{left:`${Math.min(99.5,wU(n,r))}%`}}):null]})]})}function EU({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=>Math.max(e.avgMs,e.p90Ms)),1);return(0,R.jsx)(SU,{title:`Average run time`,right:`per model · thinking · tick is p90`,children:n.length===0?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No timed runs yet.`}):(0,R.jsx)(CU,{rows:n,render:e=>(0,R.jsx)(TU,{label:t(e),value:e.avgMs,marker:e.p90Ms,max:r,valueText:lU(e.avgMs),sub:`p90 ${lU(e.p90Ms)}`},t(e))})})}var DU={healthy:`bg-success`,shaky:`bg-warning`,failing:`bg-destructive`},OU={healthy:`text-success`,shaky:`text-warning`,failing:`text-destructive`};function kU({label:e,rate:t,runs:n}){let r=mU(t),i=`${Math.round(t*100)}%`;return(0,R.jsxs)(`li`,{className:`flex flex-col gap-1`,children:[(0,R.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3 text-[0.8125rem]`,children:[(0,R.jsx)(`span`,{className:`min-w-0 truncate`,title:e,children:e}),(0,R.jsxs)(`span`,{className:`flex shrink-0 items-center gap-2 tabular-nums`,children:[(0,R.jsxs)(`span`,{className:`flex items-center gap-1.5 ${OU[r.tone]}`,children:[(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`size-1.5 rounded-full ${DU[r.tone]}`}),(0,R.jsx)(`span`,{className:`sr-only`,children:r.word}),i]}),(0,R.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[n,` run`,n===1?``:`s`]})]})]}),(0,R.jsxs)(`div`,{className:`flex h-1.5 overflow-hidden rounded-full bg-muted`,role:`img`,"aria-label":`${e}: ${r.word}, ${i} of ${n} runs`,children:[(0,R.jsx)(`div`,{className:`h-full bg-success/70`,style:{width:`${t*100}%`}}),(0,R.jsx)(`div`,{className:`h-full bg-destructive/45`,style:{width:`${(1-t)*100}%`}})]})]})}function AU({groups:e,label:t}){let n=e.filter(e=>e.runs>0).sort((e,t)=>e.successes/e.runs-t.successes/t.runs);return(0,R.jsx)(SU,{title:`Success rate`,right:`green worked · red failed`,children:n.length===0?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No runs yet.`}):(0,R.jsx)(CU,{rows:n,render:e=>(0,R.jsx)(kU,{label:t(e),rate:e.successes/e.runs,runs:e.runs},t(e))})})}function jU({share:e}){return(0,R.jsx)(`ul`,{className:`flex flex-wrap gap-x-6 gap-y-1.5 text-xs`,children:e.map(e=>(0,R.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(`span`,{className:`size-2 shrink-0 rounded-full ${yU(e.agent)}`,"aria-hidden":`true`}),(0,R.jsx)(`span`,{className:`text-[0.8125rem]`,children:bH(e.agent)}),(0,R.jsxs)(`span`,{className:`tabular-nums`,children:[Math.round(e.share*100),`%`]}),(0,R.jsxs)(`span`,{className:`text-muted-foreground tabular-nums`,children:[`avg `,cU(e.ms/Math.max(1,e.runs)),` ×`,e.runs]})]},e.agent))})}function MU({share:e}){return(0,R.jsx)(`div`,{className:`flex h-2.5 gap-0.5 overflow-hidden rounded-full`,role:`img`,"aria-label":`Share of run time by agent`,children:e.map(e=>(0,R.jsx)(`span`,{className:`${yU(e.agent)} opacity-75 first:rounded-l-full last:rounded-r-full`,style:{width:`${e.share*100}%`},title:`${e.agent} ${Math.round(e.share*100)}%`},e.agent))})}function NU({times:e}){if(e.length===0)return null;let t=Math.max(...e.map(e=>e.avgMs),1);return(0,R.jsxs)(`div`,{className:`flex flex-col gap-2.5 pt-1`,children:[(0,R.jsx)(`h3`,{className:`text-xs text-muted-foreground`,children:`Request to done, by the oracle's model`}),(0,R.jsx)(CU,{rows:e,render:e=>(0,R.jsx)(TU,{label:[e.model,e.thinking].filter(Boolean).join(` · `),value:e.avgMs,max:t,valueText:cU(e.avgMs),sub:`×${e.tasks}`},`${e.model}-${e.thinking}`)})]})}function PU({timeShare:e}){let t=e.byAgent;return(0,R.jsx)(SU,{title:`Where the time goes`,right:`share of run time by agent`,children:t.length===0?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No timed runs yet.`}):(0,R.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,R.jsx)(MU,{share:t}),(0,R.jsx)(jU,{share:t}),(0,R.jsx)(NU,{times:e.taskTimes})]})})}function FU({label:e,value:t,sub:n}){return(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e}),(0,R.jsx)(`span`,{className:`text-sm font-medium tabular-nums`,children:t}),n?(0,R.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:n}):null]})}var IU=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`;function LU({summary:e}){let t=Object.entries(e.byPurpose).sort((e,t)=>t[1]-e[1]);return(0,R.jsxs)(`section`,{className:`glass flex flex-col gap-3 rounded-lg px-4 py-3`,"aria-label":`Classifier (Jev)`,children:[(0,R.jsx)(`h2`,{className:`text-sm font-medium`,children:`Classifier (Jev)`}),e.calls===0?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`no calls recorded`}):(0,R.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-6 gap-y-3 sm:grid-cols-4`,children:[(0,R.jsx)(FU,{label:`Calls`,value:IU(e.calls,`call`),sub:`${uU(e.ok,e.calls)} ok`}),(0,R.jsx)(FU,{label:`Speed`,value:`p50 ${pU(e.p50Ms)}`,sub:`p90 ${pU(e.p90Ms)}`}),(0,R.jsx)(FU,{label:`Read`,value:e.input>0?`${fU(e.input)} tokens`:`—`}),(0,R.jsx)(FU,{label:`Routed down`,value:e.routed>0?IU(e.routed,`run`):`none`,sub:e.routed>0?`${uU(e.routedOk,e.routed)} ok`:`no runs routed`})]}),(0,R.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[(0,R.jsx)(`span`,{className:`text-primary`,children:`spared`}),` `,IU(e.seatRunsSkipped,`seat run`),` skipped · `,IU(e.questionsAnswered,`question`),` answered · `,IU(e.quickFixesHeld,`quick fix`,`quick fixes`),` held`,t.length>0?(0,R.jsx)(`span`,{className:`ml-3 border-l border-border pl-3`,children:t.map(([e,t])=>`${e} ${t}`).join(` · `)}):null]})]})}var RU=[`Runs`,`OK`,`Avg`,`p50`,`p90`,`Turns`,`Tools`,`Tokens`,`tok/s`,`$/run`,`$ total`,`Stalls`];function zU(e,t=0){return e>0?e.toFixed(t):`—`}function BU(e){return[String(e.runs),uU(e.successes,e.runs),lU(e.avgMs),lU(e.p50Ms),lU(e.p90Ms),zU(e.avgTurns,1),zU(e.avgTools,1),e.avgTokens>0?fU(e.avgTokens):`—`,e.tokensPerSecond>0?e.tokensPerSecond.toFixed(0):`—`,dU(e.avgCost),dU(e.totalCost),e.timeouts>0?String(e.timeouts):`—`]}function VU(e,t){return t===`model-kind`?bU(e.kinds[0]??``):e.kinds.map(bU).join(`, `)}function HU({groups:e,groupBy:t}){return(0,R.jsxs)(`section`,{className:`glass flex min-h-0 flex-col gap-2 rounded-lg pt-3`,"aria-label":`All models`,children:[(0,R.jsxs)(`h2`,{className:`flex items-baseline justify-between gap-3 px-4 text-sm font-medium`,children:[(0,R.jsx)(`span`,{children:`All models`}),(0,R.jsxs)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:[t===`model`?`by model · thinking`:`by model · thinking · agent`,` · sorted by runs`]})]}),(0,R.jsx)(`div`,{className:`max-h-80 overflow-auto`,children:(0,R.jsxs)(`table`,{className:`w-full border-collapse text-xs`,children:[(0,R.jsx)(`thead`,{className:`sticky top-0 bg-card text-muted-foreground`,children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{scope:`col`,className:`px-3 py-1.5 text-left font-medium`,children:`Model`}),(0,R.jsx)(`th`,{scope:`col`,className:`px-3 py-1.5 text-left font-medium`,children:`Think`}),(0,R.jsx)(`th`,{scope:`col`,className:`px-3 py-1.5 text-left font-medium`,children:t===`model-kind`?`Agent`:`Agents`}),RU.map(e=>(0,R.jsx)(`th`,{scope:`col`,className:`px-3 py-1.5 text-right font-medium whitespace-nowrap`,children:e},e))]})}),(0,R.jsx)(`tbody`,{children:e.map(e=>(0,R.jsxs)(`tr`,{className:`border-t border-border/70 transition-colors hover:bg-muted`,children:[(0,R.jsx)(`th`,{scope:`row`,className:`px-3 py-1.5 text-left font-normal text-foreground`,children:e.model}),(0,R.jsx)(`td`,{className:`px-3 py-1.5 whitespace-nowrap text-muted-foreground`,children:e.thinking||`—`}),(0,R.jsx)(`td`,{className:`px-3 py-1.5 whitespace-nowrap text-muted-foreground`,children:VU(e,t)||`—`}),BU(e).map((e,t)=>(0,R.jsx)(`td`,{className:`px-3 py-1.5 text-right tabular-nums whitespace-nowrap text-foreground`,children:e},RU[t]))]},gU(e,t)))})]})})]})}var UU={healthy:`bg-success`,shaky:`bg-warning`,failing:`bg-destructive`};function WU({label:e,value:t,sub:n,dot:r}){return(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5 px-4 py-3`,children:[(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e}),(0,R.jsxs)(`span`,{className:`flex items-center gap-2 text-xl leading-tight font-medium tabular-nums`,children:[r?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 shrink-0 rounded-full ${UU[r.tone]}`}),(0,R.jsx)(`span`,{className:`sr-only`,children:r.word})]}):null,t]}),(0,R.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:n||`\xA0`})]})}function GU({tiles:e}){let t=mU(e.runs>0?e.successes/e.runs:0),n=e.runs-e.successes;return(0,R.jsxs)(`div`,{className:`glass grid grid-cols-2 rounded-lg sm:grid-cols-3 lg:grid-cols-5 lg:divide-x lg:divide-border`,children:[(0,R.jsx)(WU,{label:`Runs`,value:String(e.runs),sub:e.runs===0?`no runs yet`:``}),(0,R.jsx)(WU,{label:`Success`,value:uU(e.successes,e.runs),sub:`${n} failed${e.stalls>0?` · ${e.stalls} stalled`:``}`,dot:{tone:t.tone,word:t.word}}),(0,R.jsx)(WU,{label:`Avg run`,value:lU(e.avgMs),sub:`p90 ${lU(e.p90Ms)}`}),(0,R.jsx)(WU,{label:`Cost`,value:dU(e.cost),sub:e.runs>0?`${dU(e.cost/e.runs)} per run`:`—`}),(0,R.jsx)(WU,{label:`Tasks`,value:`${e.completed} done`,sub:e.avgCompleteMs>0?`avg ${cU(e.avgCompleteMs)} · ${e.active} active`:`${e.active} active`})]})}var KU=`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 qU({groupBy:e,onGroup:t}){return(0,R.jsx)(`div`,{role:`radiogroup`,"aria-label":`Group by`,className:`flex gap-0.5 rounded-lg bg-muted p-0.5`,onKeyDown:n=>{let r=n.key===`ArrowRight`||n.key===`ArrowDown`?1:n.key===`ArrowLeft`||n.key===`ArrowUp`?-1:0;if(!r)return;n.preventDefault();let i=[`model`,`model-kind`],a=i[(i.indexOf(e)+r+i.length)%i.length];t(a),requestAnimationFrame(()=>n.currentTarget.querySelector(`[aria-checked='true']`)?.focus())},children:[`model`,`model-kind`].map(n=>(0,R.jsx)(J,{variant:`ghost`,size:`sm`,role:`radio`,tabIndex:e===n?0:-1,className:e===n?`bg-tab text-foreground hover:bg-tab`:`text-muted-foreground`,"aria-checked":e===n,onClick:()=>t(n),children:hU(n)},n))})}function JU({query:e,onQuery:t}){return(0,R.jsxs)(`label`,{className:`relative flex items-center`,children:[(0,R.jsx)(`span`,{className:`sr-only`,children:`Search runs`}),(0,R.jsx)(zm,{"aria-hidden":`true`,className:`pointer-events-none absolute left-2.5 size-3.5 text-muted-foreground`}),(0,R.jsx)(`input`,{id:`metrics-search`,type:`search`,value:e,maxLength:500,placeholder:`Search runs: model, agent, tool…`,onChange:e=>t(e.target.value),className:`h-7 w-64 max-w-full rounded-lg border border-input bg-card/40 pr-3 pl-8 text-xs outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30`})]})}function YU({data:e,groupBy:t,query:n}){let r=e=>gU(e,t);return e.tiles.runs===0?(0,R.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,R.jsx)(GU,{tiles:e.tiles}),(0,R.jsx)(`p`,{className:`glass rounded-lg p-4 text-sm text-muted-foreground`,children:n?`No run matches "${n}".`:KU})]}):(0,R.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,R.jsx)(GU,{tiles:e.tiles}),e.classifier?(0,R.jsx)(LU,{summary:e.classifier}):null,(0,R.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:[(0,R.jsx)(EU,{groups:e.groups,label:r}),(0,R.jsx)(AU,{groups:e.groups,label:r})]}),(0,R.jsx)(PU,{timeShare:e.timeShare}),(0,R.jsx)(HU,{groups:e.groups,groupBy:t})]})}function XU(){return(0,R.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,R.jsx)(`div`,{className:`h-20 rounded-lg bg-muted motion-safe:animate-pulse`},e))})}function ZU(){let[e,t]=(0,m.useState)(`model`),[n,r]=(0,m.useState)(``),i=ZR(`metrics.get`,{groupBy:e,query:n},[`metrics`]);return!i.data&&i.error?(0,R.jsx)(LL,{message:`Could not load metrics. ${i.error}`,onRetry:i.reload}):(0,R.jsxs)(`div`,{className:`flex flex-col gap-3 px-4 py-2`,children:[(0,R.jsxs)(`header`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2`,children:[(0,R.jsx)(`h1`,{className:`text-base font-medium`,children:`Metrics`}),i.loading&&i.data?(0,R.jsxs)(`span`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,R.jsx)(gE,{className:`size-3`,"aria-hidden":`true`,role:`presentation`}),` refreshing`]}):null,(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`min-w-4 flex-1`}),(0,R.jsx)(qU,{groupBy:e,onGroup:t}),(0,R.jsx)(JU,{query:n,onQuery:r})]}),i.data?(0,R.jsx)(YU,{data:i.data,groupBy:e,query:n}):(0,R.jsx)(XU,{})]})}function QU({className:e,type:t,...n}){return(0,R.jsx)(`input`,{type:t,"data-slot":`input`,className:q(`flex h-8 w-full rounded-lg border border-input bg-card/40 px-3 py-1 text-base transition-[border-color,box-shadow] duration-150 outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 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:disabled:bg-input/80`,e),...n})}function $U(e,t){let n=`${e.label} ${e.hint??``} ${e.value}`.toLowerCase();return t.toLowerCase().split(/\s+/).filter(Boolean).every(e=>n.includes(e))}function eW({value:e,options:t,onChange:n,label:r,className:i,disabled:a}){let[o,s]=(0,m.useState)(!1),[c,l]=(0,m.useState)(``),[u,d]=(0,m.useState)(0),f=(0,m.useRef)(null),p=(0,m.useId)(),h=(0,m.useMemo)(()=>t.filter(e=>$U(e,c)),[t,c]),g=t.find(t=>t.value===e);(0,m.useEffect)(()=>{o&&(l(``),d(Math.max(0,t.findIndex(t=>t.value===e))))},[o]),(0,m.useEffect)(()=>{c&&d(0)},[c]),(0,m.useEffect)(()=>{f.current?.querySelector(`[data-index="${u}"]`)?.scrollIntoView({block:`nearest`})},[u,o,h.length]);function _(t){t&&(s(!1),t.value!==e&&n(t.value))}function v(e){e.key===`ArrowDown`?(e.preventDefault(),d(e=>Math.min(h.length-1,e+1))):e.key===`ArrowUp`?(e.preventDefault(),d(e=>Math.max(0,e-1))):e.key===`Home`&&!c?(e.preventDefault(),d(0)):e.key===`End`&&!c?(e.preventDefault(),d(Math.max(0,h.length-1))):e.key===`Enter`&&!e.nativeEvent.isComposing&&(e.preventDefault(),_(h[u]))}return(0,R.jsxs)(Lw,{open:o,onOpenChange:s,children:[(0,R.jsxs)(Rw,{type:`button`,role:`combobox`,"aria-label":r,"aria-expanded":o,"aria-haspopup":`listbox`,"aria-controls":o?p:void 0,disabled:a,"data-slot":`select-trigger`,className:q(`flex h-8 w-full min-w-0 items-center justify-between gap-2 overflow-hidden rounded-lg border border-input bg-card/40 px-2.5 text-[0.8125rem] whitespace-nowrap outline-none transition-[border-color,box-shadow] duration-150 hover:bg-accent/40 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:opacity-50`,i),children:[(0,R.jsx)(`span`,{className:`min-w-0 truncate`,children:g?.label??e}),(0,R.jsx)(Kf,{"aria-hidden":`true`,className:`size-4 shrink-0 text-muted-foreground`})]}),(0,R.jsx)(zw,{children:(0,R.jsxs)(Bw,{align:`start`,sideOffset:4,collisionPadding:8,onOpenAutoFocus:e=>{e.preventDefault(),e.currentTarget.querySelector(`input`)?.focus()},className:`glass-pop z-50 flex max-h-[min(20rem,var(--radix-popover-content-available-height))] w-(--radix-popover-trigger-width) min-w-56 flex-col overflow-hidden rounded-lg outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border px-2.5`,children:[(0,R.jsx)(zm,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,R.jsx)(`input`,{value:c,onChange:e=>l(e.target.value),onKeyDown:v,role:`searchbox`,"aria-label":`Search ${r}`,"aria-controls":p,"aria-activedescendant":h[u]?`${p}-${u}`:void 0,placeholder:`Search…`,autoComplete:`off`,spellCheck:!1,className:`h-8 min-w-0 flex-1 bg-transparent text-[0.8125rem] outline-none placeholder:text-muted-foreground`})]}),(0,R.jsxs)(`div`,{ref:f,id:p,role:`listbox`,"aria-label":r,className:`min-h-0 flex-1 overflow-y-auto p-1`,children:[h.length===0?(0,R.jsxs)(`p`,{className:`px-2.5 py-2 text-xs text-muted-foreground`,children:[`Nothing matches “`,c,`”.`]}):null,h.map((t,n)=>(0,R.jsxs)(`div`,{id:`${p}-${n}`,role:`option`,"aria-selected":t.value===e,"data-index":n,onPointerMove:()=>d(n),onClick:()=>_(t),className:q(`flex cursor-default items-center gap-2 rounded-lg px-2.5 py-1.5 text-[0.8125rem] select-none`,n===u&&`bg-accent`),children:[(0,R.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,R.jsx)(`span`,{className:`truncate`,children:t.label}),t.hint?(0,R.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:t.hint}):null]}),t.value===e?(0,R.jsx)(Wf,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-primary`}):null]},t.value))]})]})})]})}function tW({className:e,thumbClassName:t,...n}){return(0,R.jsx)(Zw,{"data-slot":`switch`,className:q(`peer relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-transparent transition-colors duration-150 outline-none before:absolute before:-inset-x-2 before:-inset-y-2.5 before:content-[''] focus-visible:ring-3 focus-visible:ring-ring/40 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input`,e),...n,children:(0,R.jsx)($w,{"data-slot":`switch-thumb`,className:q(`pointer-events-none block size-4 rounded-full bg-white shadow-sm ring-0 transition-transform duration-200 ease-snap data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0`,t)})})}var nW={minimal:`min`,medium:`med`},rW={off:`No extra reasoning: the quickest, cheapest answer.`,minimal:`A moment of reasoning, barely.`,low:`Light reasoning for simple work.`,medium:`Balanced reasoning for most work.`,high:`Careful reasoning: slower, better on hard problems.`,xhigh:`Very deep reasoning: slow and costly.`,max:`As deep as the model goes.`};function iW(e,t,n){let r=-1;for(let i=0;i<e.length;i+=1)t.includes(e[i])&&(r<0||Math.abs(i-n)<Math.abs(r-n))&&(r=i);return r}function aW(e,t,n,r){for(let i=n+r;i>=0&&i<e.length;i+=r)if(t.includes(e[i]))return i;return n}function oW({value:e,levels:t,supported:n,model:r,label:i,disabled:a,onChange:o}){let s=(0,m.useRef)(null),[c,l]=(0,m.useState)(),u=Math.max(t.length-1,1),d=iW(t,n,Math.max(0,t.indexOf(e))),f=c??d,p=f<0?0:f/u*100,h=t[f]??e,g=f>=0&&h!==e,_=(0,m.useCallback)(e=>{let r=s.current?.getBoundingClientRect();if(!r||r.width===0)return d;let i=Math.min(1,Math.max(0,(e-r.left)/r.width));return iW(t,n,Math.round(i*u))},[u,t,d,n]);function v(e){a||n.length===0||(e.currentTarget.setPointerCapture(e.pointerId),l(_(e.clientX)))}function y(e){if(c===void 0)return;let t=_(e.clientX);t!==c&&l(t)}function b(){if(c===void 0)return;let n=t[c];l(void 0),n&&n!==e&&o(n)}function x(r){if(a||f<0)return;let i={ArrowRight:aW(t,n,f,1),ArrowUp:aW(t,n,f,1),ArrowLeft:aW(t,n,f,-1),ArrowDown:aW(t,n,f,-1),Home:iW(t,n,0),End:iW(t,n,u)}[r.key];if(i===void 0)return;r.preventDefault();let s=t[i];s&&s!==e&&o(s)}return(0,R.jsxs)(`div`,{className:q(`flex flex-col gap-1`,a&&`opacity-60`),children:[(0,R.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,R.jsx)(`span`,{className:`text-[0.8125rem] font-medium capitalize`,"aria-hidden":`true`,children:h}),(0,R.jsx)(`span`,{className:`min-w-0 truncate text-xs text-muted-foreground`,children:rW[h]??``})]}),(0,R.jsxs)(`div`,{ref:s,role:`slider`,tabIndex:a?-1:0,"aria-label":i,"aria-valuemin":0,"aria-valuemax":t.length-1,"aria-valuenow":Math.max(f,0),"aria-valuetext":h,"aria-disabled":a||void 0,onPointerDown:v,onPointerMove:y,onPointerUp:b,onPointerCancel:()=>l(void 0),onKeyDown:x,className:`relative mx-2.5 h-6 touch-none cursor-pointer rounded-full outline-none select-none focus-visible:ring-3 focus-visible:ring-ring/40`,children:[(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`absolute inset-x-0 top-1/2 h-1.5 -translate-y-1/2 rounded-full bg-muted`}),(0,R.jsx)(Rd.span,{"aria-hidden":`true`,className:`absolute top-1/2 left-0 h-1.5 -translate-y-1/2 rounded-full bg-primary`,animate:{width:`${p}%`},transition:{type:`spring`,stiffness:520,damping:34}}),t.map((e,t)=>{let i=n.includes(e);return(0,R.jsx)(`span`,{"aria-hidden":`true`,title:i?e:`${r??`This model`} does not support ${e}`,className:q(`absolute top-1/2 size-1 -translate-x-1/2 -translate-y-1/2 rounded-full`,i?t<=f?`bg-primary-foreground/80`:`bg-muted-foreground/40`:`bg-transparent ring-1 ring-muted-foreground/30`),style:{left:`${t/u*100}%`}},e)}),(0,R.jsx)(Rd.span,{"aria-hidden":`true`,className:q(`absolute top-1/2 size-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-primary bg-white shadow-sm`,c!==void 0&&`scale-110`),animate:{left:`${p}%`},transition:{type:`spring`,stiffness:520,damping:28}})]}),(0,R.jsx)(`div`,{className:`relative mx-2.5 h-3.5 text-[0.68rem] text-muted-foreground`,"aria-hidden":`true`,children:t.map((e,t)=>{let i=n.includes(e);return(0,R.jsx)(`span`,{title:i?void 0:`${r??`This model`} does not support ${e}`,className:q(`absolute -translate-x-1/2 whitespace-nowrap`,t===f&&`font-medium text-foreground`,!i&&`opacity-40`),style:{left:`${t/u*100}%`},children:nW[e]??e},e)})}),g?(0,R.jsxs)(`p`,{className:`text-xs text-warning`,children:[e,` is not supported by `,r??`this model`,`, so it runs at `,h,`.`]}):null]})}var sW=[`master`,`designer`,`backend`,`qa`,`scout`,`researcher`,`quickfix`,`planner`],cW={master:`Master`,designer:`Designer`,backend:`Backend`,qa:`QA`,scout:`Scout`,researcher:`Researcher`,quickfix:`Quick fix`,planner:`Planner`},lW={model:`Model`,thinking:`Effort`,fallback:`Fallback model`,fallbackThinking:`Fallback effort`,timeout:`Time limit`,instructions:`Instructions`},uW=`inherit`,dW=`inherit`,fW=`Use the session's current model`,pW=`__custom__`,mW=`custom…`,hW=`Type a provider/model id`,gW=`none`,_W=`No fallback: when its model runs out of usage the run fails`,vW=[`off`,`minimal`,`low`,`medium`,`high`,`xhigh`,`max`],yW={agents:`Agents`,workflow:`Workflow`,lobby:`Lobby`,classifier:`Classifier (Jev)`,appearance:`Appearance`,notifications:`Notifications`,install:`Install as app`},bW=[{id:`issues`,label:`Issues tab`,help:`the GitHub Issues tab`}],xW=[{id:`conversation`,label:`Conversation pane`},{id:`activity`,label:`Activity log pane`},{id:`thinking`,label:`Thinking pane`}],SW=`shown on the Lobby tab`,CW=`Planning rounds`,wW=`how many rounds the panel gets before the oracle settles the rest alone`,TW=[2,3,5,8,0],EW=`Split long plans`,DW=`saving a plan with more steps offers to split it into up to 5 tasks`,OW=[6,8,10,12,0],kW=`Port`,AW=`the base port (then the next free up to +20); 0 means any free port; applies the next time pi starts`,jW=`Open browser`,MW=`open this page in the browser when pi starts`,NW=[{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`}],PW=`Git isolation`,FW=[{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`}],IW=[{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`}],LW={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`},RW={title:`Settings`,intro:`Each agent's model and effort, the lobby and the classifier. Changes save as you make them.`,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:`Opens in its own fullscreen window, with the shell cached so it starts when Pi is not running.`,installButton:`Install as fullscreen app`,installUnavailable:`Your browser has not offered to install it. Use its menu: “Install app” (Chrome, Edge) or Share, then “Add to Home Screen” (Safari).`,installDone:`bot-lobby is installed.`,installedNow:`Running as an installed app.`,fullscreenLabel:`Fullscreen`,fullscreenHelp:`Hide the browser's own bars for this tab (F11 does the same).`,fullscreenOn:`Exit fullscreen`,fullscreenOff:`Go fullscreen`},zW={master:[`master`],designer:[`agents`,`designer`],backend:[`agents`,`backend`],qa:[`agents`,`qa`],scout:[`scout`],researcher:[`researcher`],quickfix:[`quickFix`],planner:[`planner`]},BW=[...bW,...xW.map(e=>({id:`panel:${e.id}`,label:e.label,help:SW}))];function VW(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 HW(e,t){return zW[e].reduceRight((e,t)=>({[t]:e}),t)}function UW(e,t){return e.find(e=>e.id===t)?.thinkingLevels??vW}function WW(e,t){return vW[iW(vW,e,Math.max(0,vW.indexOf(t)))]??t}var GW=e=>e>0?`${e} round${e===1?``:`s`}`:`unlimited`,KW=e=>e>0?`over ${e} steps`:`never`;function qW({label:e,help:t,children:n,stacked:r}){return(0,R.jsxs)(`div`,{className:r?`grid gap-1.5`:`grid gap-1.5 sm:grid-cols-[minmax(0,1fr)_minmax(0,16rem)] sm:items-center sm:gap-4`,children:[(0,R.jsxs)(`div`,{className:`min-w-0`,children:[(0,R.jsx)(`div`,{className:`text-[0.8125rem] font-medium`,children:e}),t?(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t}):null]}),(0,R.jsx)(`div`,{className:`min-w-0`,children:n})]})}function JW({label:e,children:t}){return(0,R.jsxs)(`div`,{className:`grid min-w-0 gap-1`,children:[(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e}),t]})}function YW({children:e}){return(0,R.jsx)(`div`,{className:`glass flex flex-col divide-y divide-border rounded-lg px-4 [&>*]:py-2.5`,children:e})}function XW({value:e,items:t,label:n,onChange:r}){return(0,R.jsx)(eW,{value:e,options:t.map(e=>({value:e.value,label:e.label,...e.help?{hint:e.help}:{}})),label:n,onChange:r})}function ZW(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:uW,label:dW,help:fW}]:[],...e.none?[{value:uW,label:gW,help:_W}]:[],...!e.inherit&&!e.none&&e.value===`inherit`?[{value:uW,label:dW,help:fW}]:[],...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:hW}]:[],{value:pW,label:mW,help:hW}],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,R.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,R.jsx)(XW,{value:e.value,items:o,label:e.label,onChange:s}),t?(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(QU,{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,R.jsx)($,{label:`Use this model`,icon:Wf,tone:`primary`,onClick:c})]}):null]})}function QW({label:e,help:t,checked:n,onChange:r}){return(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,R.jsxs)(`div`,{className:`min-w-0`,children:[(0,R.jsx)(`div`,{className:`text-[0.8125rem] font-medium`,children:e}),t?(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t}):null]}),(0,R.jsx)(tW,{checked:n,onCheckedChange:r,"aria-label":e})]})}function $W({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,R.jsx)(QU,{value:i,placeholder:n,"aria-label":r,onChange:e=>a(e.target.value),onBlur:o,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),o())}})}function eG({value:e,label:t,onSave:n}){let r=Math.round(e/6e4);return(0,R.jsx)(nG,{label:t,value:String(r),min:1,suffix:`min`,onSave:e=>{let t=Number(e);return!Number.isFinite(t)||t<=0?(af.error(`"${e}" is not a positive number of minutes.`),!1):(n(Math.round(t*6e4)),!0)}})}function tG({value:e,onSave:t}){return(0,R.jsx)(nG,{label:kW,value:String(e),min:0,max:65535,onSave:e=>!/^\d+$/.test(e)||Number(e)>65535?(af.error(`"${e}" is not a port (0, or 1-65535).`),!1):(t(Number(e)),!0)})}function nG({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,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(QU,{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,R.jsx)(`span`,{className:`shrink-0 text-sm text-muted-foreground`,children:i}):null]})}function rG({value:e,label:t,onSave:n}){let[r,i]=(0,m.useState)(e);return(0,m.useEffect)(()=>i(e),[e]),(0,R.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,R.jsx)(WL,{rows:2,value:r,"aria-label":t,onChange:e=>i(e.target.value),onBlur:()=>{r.trim()!==e&&n(r.trim())}}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Saved when you leave the field.`})]})}function iG({kind:e,config:t,models:n,save:r}){let i=VW(t,e),a=t=>void r(HW(e,t)),o=cW[e],s=UW(n,i.model),c=i.fallbackModel?UW(n,i.fallbackModel):s,l=t=>{let r={model:t};e!==`scout`&&!UW(n,t).includes(i.thinking)&&(r.thinking=WW(UW(n,t),i.thinking)),a(r)},u=t=>{let r={fallbackModel:t},o=i.fallbackThinking??i.thinking;e!==`scout`&&t!==`inherit`&&!UW(n,t).includes(o)&&(r.fallbackThinking=WW(UW(n,t),o)),a(r)},d=e!==`scout`&&e!==`researcher`,[f,p]=(0,m.useState)(!!i.instructions);return(0,R.jsxs)(`section`,{className:`glass flex flex-col gap-3 rounded-lg p-4`,children:[(0,R.jsxs)(`header`,{className:`flex items-baseline justify-between gap-3`,children:[(0,R.jsx)(`h3`,{className:`text-sm font-medium`,children:o}),(0,R.jsxs)(`span`,{className:`truncate text-xs text-muted-foreground`,children:[i.model===`inherit`?`session model`:i.model,` · `,e===`scout`?`low`:i.thinking]})]}),(0,R.jsxs)(`div`,{className:q(`grid gap-3 sm:grid-cols-2`,e!==`master`&&`sm:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_7rem]`),children:[(0,R.jsx)(JW,{label:lW.model,children:(0,R.jsx)(ZW,{value:i.model,models:n,label:`${o} model`,inherit:e===`master`,onChange:l})}),(0,R.jsx)(JW,{label:lW.fallback,children:(0,R.jsx)(ZW,{value:i.fallbackModel??`inherit`,models:n,label:`${o} fallback model`,none:!0,onChange:u})}),e===`master`?null:(0,R.jsx)(JW,{label:`Time limit`,children:(0,R.jsx)(eG,{value:i.timeoutMs??t.workflow.agentTimeoutMs,label:`${o} time limit`,onSave:e=>a({timeoutMs:e})})})]}),(0,R.jsx)(JW,{label:lW.thinking,children:e===`scout`?(0,R.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`low`,` (fixed for scouts)`]}):(0,R.jsx)(oW,{value:i.thinking,levels:vW,supported:s,model:i.model===`inherit`?`the session model`:i.model,label:`${o} effort`,onChange:e=>a({thinking:e})})}),e!==`scout`&&i.fallbackModel?(0,R.jsx)(JW,{label:lW.fallbackThinking,children:(0,R.jsx)(oW,{value:i.fallbackThinking??i.thinking,levels:vW,supported:c,model:i.fallbackModel,label:`${o} fallback effort`,onChange:e=>a({fallbackThinking:e})})}):null,d?(0,R.jsxs)(`button`,{type:`button`,"aria-expanded":f,onClick:()=>p(e=>!e),className:`flex h-5 items-center gap-1 self-start text-xs text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/30`,children:[(0,R.jsx)(Jf,{"aria-hidden":`true`,className:q(`size-3.5 transition-transform duration-200 ease-snap`,f&&`rotate-90`)}),lW.instructions,!f&&i.instructions?(0,R.jsx)(`span`,{className:`text-primary`,children:`· set`}):null]}):null,d&&f?(0,R.jsx)(rG,{value:i.instructions??``,label:`${o} instructions`,onSave:e=>a({instructions:e})}):null]})}function aG(e,t){return t.startsWith(`panel:`)?e.lobby.panels[t.slice(6)]:e.lobby[t]}function oG({config:e,item:t,save:n}){let r=t.id.startsWith(`panel:`);return(0,R.jsx)(QW,{label:t.label,help:t.help,checked:aG(e,t.id),onChange:e=>{n(r?{lobby:{panels:{[t.id.slice(6)]:e}}}:{lobby:{[t.id]:e}})}})}function sG({config:e,save:t}){let n=e.workflow.gitIsolation;return(0,R.jsx)(Az,{title:yW.workflow,children:(0,R.jsx)(YW,{children:(0,R.jsx)(qW,{label:PW,help:NW.find(e=>e.id===n)?.help??`enter cycles off, branch, worktree`,children:(0,R.jsx)(XW,{value:n,items:NW.map(e=>({value:e.id,label:e.label})),label:PW,onChange:e=>void t({workflow:{gitIsolation:e}})})})})})}function cG({config:e,save:t}){let n=e.lobby.web;return(0,R.jsx)(Az,{title:yW.lobby,children:(0,R.jsxs)(YW,{children:[BW.map(n=>(0,R.jsx)(oG,{config:e,item:n,save:t},n.id)),(0,R.jsx)(qW,{label:CW,help:wW,children:(0,R.jsx)(XW,{value:String(e.lobby.maxPlanningRounds),items:TW.map(e=>({value:String(e),label:GW(e)})),label:CW,onChange:e=>void t({lobby:{maxPlanningRounds:Number(e)}})})}),(0,R.jsx)(qW,{label:EW,help:DW,children:(0,R.jsx)(XW,{value:String(e.lobby.splitPlanAbove),items:OW.map(e=>({value:String(e),label:KW(e)})),label:EW,onChange:e=>void t({lobby:{splitPlanAbove:Number(e)}})})}),(0,R.jsx)(qW,{label:kW,help:AW,children:(0,R.jsx)(tG,{value:n.port,onSave:e=>void t({lobby:{web:{port:e}}})})}),(0,R.jsx)(QW,{label:jW,help:MW,checked:n.openBrowser,onChange:e=>void t({lobby:{web:{openBrowser:e}}})})]})})}function lG({config:e,models:t,save:n}){let r=e.classifier,i=FW.find(e=>e.id===r.provider)?.label;return(0,R.jsx)(Az,{title:yW.classifier,children:(0,R.jsxs)(YW,{children:[(0,R.jsx)(QW,{label:LW.enabled,help:LW.enabledHelp,checked:r.enabled,onChange:e=>void n({classifier:{enabled:e}})}),(0,R.jsx)(qW,{label:LW.host,children:(0,R.jsx)(XW,{value:r.provider,items:FW.map(e=>({value:e.id,label:e.label})),label:LW.host,onChange:e=>void n({classifier:{provider:e}})})}),(0,R.jsx)(qW,{label:LW.model,help:LW.modelHelp,children:(0,R.jsx)($W,{value:r.model,label:LW.model,placeholder:`the host's default`,onSave:e=>void n({classifier:{model:e}})})}),(0,R.jsx)(qW,{label:LW.key,help:LW.keyNote,children:(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:i??r.provider})}),IW.map(e=>(0,R.jsx)(QW,{label:e.label,help:e.help,checked:r.features[e.id],onChange:t=>void n({classifier:{features:{[e.id]:t}}})},e.id)),(0,R.jsx)(qW,{label:LW.cheap,help:LW.cheapHelp,children:(0,R.jsx)(ZW,{value:r.effort.cheapModel,models:t,label:LW.cheap,none:!0,onChange:e=>void n({classifier:{effort:{cheapModel:e}}})})})]})})}function uG(){let{theme:e,setTheme:t}=CL();return(0,R.jsx)(Az,{title:yW.appearance,children:(0,R.jsx)(YW,{children:(0,R.jsx)(qW,{label:RW.themeLabel,help:RW.appearanceHelp,children:(0,R.jsx)(XW,{value:e,items:RW.themeItems.map(e=>({value:e.id,label:e.label})),label:RW.themeLabel,onChange:e=>t(e)})})})})}function dG(){let e=UR(),t=async e=>{if(!e)return GR();let t=await WR();t===`granted`?af.success(RW.notificationsOn):af.error(t===`unsupported`?RW.notificationsUnsupported:RW.notificationsBlocked)};return(0,R.jsx)(Az,{title:yW.notifications,children:(0,R.jsx)(YW,{children:(0,R.jsx)(QW,{label:RW.notificationsLabel,help:RW.notificationsHelp,checked:e,onChange:e=>void t(e)})})})}function fG(){let{available:e,install:t}=y(),n=b(),r=x();return(0,R.jsx)(Az,{title:yW.install,children:(0,R.jsxs)(YW,{children:[(0,R.jsx)(qW,{label:RW.installLabel,help:n?RW.installedNow:RW.installHelp,children:n?null:(0,R.jsx)($,{label:RW.installButton,icon:hp,tone:`primary`,onClick:()=>e?void t().then(()=>af.success(RW.installDone)):af.warning(RW.installUnavailable)})}),r.supported?(0,R.jsx)(qW,{label:RW.fullscreenLabel,help:RW.fullscreenHelp,children:(0,R.jsx)($,{label:r.on?RW.fullscreenOn:RW.fullscreenOff,icon:r.on?rm:qp,pressed:r.on,onClick:()=>void r.toggle()})}):null]})})}function pG({config:e,models:t,onConfig:n}){let r=async e=>{try{return n((await uf(`settings.set`,{patch:e})).config),af.success(RW.saved),!0}catch(e){return af.error(e instanceof Error?e.message:`That did not work. Try again.`),!1}};return(0,R.jsxs)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-6 px-4 py-3`,children:[(0,R.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,R.jsx)(`h1`,{className:`text-base font-medium`,children:RW.title}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:RW.intro})]}),(0,R.jsx)(Az,{title:yW.agents,children:(0,R.jsx)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:sW.map(n=>(0,R.jsx)(iG,{kind:n,config:e,models:t,save:r},n))})}),(0,R.jsx)(sG,{config:e,save:r}),(0,R.jsx)(cG,{config:e,save:r}),(0,R.jsx)(lG,{config:e,models:t,save:r}),(0,R.jsx)(uG,{}),(0,R.jsx)(dG,{}),(0,R.jsx)(fG,{})]})}function mG(){return(0,R.jsx)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-4 p-4`,role:`status`,"aria-label":RW.loading,children:[0,1,2,3].map(e=>(0,R.jsx)(`div`,{className:`h-48 rounded-lg bg-muted motion-safe:animate-pulse`},e))})}function hG(){let e=ZR(`settings.get`,{},[`status`]),[t,n]=(0,m.useState)();return(0,m.useEffect)(()=>{e.data&&n(e.data.config)},[e.data]),!t&&e.error?(0,R.jsx)(LL,{message:`${RW.loadFailed} ${e.error}`,onRetry:e.reload}):t?(0,R.jsx)(pG,{config:t,models:e.data?.models??[],onConfig:n}):(0,R.jsx)(mG,{})}function gG({questions:e}){return(0,R.jsx)(`ol`,{className:`flex flex-col gap-3`,children:e.map((e,t)=>(0,R.jsxs)(`li`,{className:`flex flex-col gap-1 text-sm`,children:[(0,R.jsxs)(`p`,{children:[(0,R.jsxs)(`span`,{className:`tabular-nums text-muted-foreground`,children:[String(t+1).padStart(2,`0`),`. `]}),(0,R.jsx)(`span`,{className:q(`font-medium`,xH(e.from)),children:bH(e.from)}),` `,e.text]}),(0,R.jsx)(`ul`,{className:`flex flex-col gap-0.5 pl-6 text-muted-foreground`,children:e.options.map(e=>(0,R.jsxs)(`li`,{className:`flex gap-2`,children:[(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`mt-2 size-1.5 shrink-0 rounded-full border border-muted-foreground/60`}),(0,R.jsxs)(`span`,{children:[e.label,e.description?` — ${e.description}`:``]})]},e.label))})]},t))})}function _G({message:e}){return(0,R.jsx)(R.Fragment,{children:(e.decided??[]).map((e,t)=>(0,R.jsxs)(`p`,{className:`text-sm`,children:[(0,R.jsx)(Wf,{"aria-hidden":`true`,className:`mr-1 inline size-3.5 text-success`}),(0,R.jsx)(`span`,{className:q(`font-medium`,xH(e.from)),children:bH(e.from)}),` `,e.question,` → `,(0,R.jsx)(`strong`,{children:e.answer}),` `,(0,R.jsxs)(`span`,{className:`text-muted-foreground`,children:[`· decided by the classifier (`,e.probability.toFixed(2),`); comment on the plan to overrule`]})]},t))})}function vG({message:e}){let t=e.at>0?pz(e.at):``;if(e.role===`you`)return(0,R.jsxs)(`div`,{className:`flex flex-col items-end gap-1`,children:[(0,R.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[t,` You`]}),(0,R.jsx)(`div`,{className:`max-w-[85%] rounded-lg rounded-tr-lg border border-primary/15 bg-you px-4 py-2`,children:(0,R.jsx)(qI,{text:e.text})})]});let n=e.questions??[];return(0,R.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,R.jsxs)(`span`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 rounded-full bg-primary`}),(0,R.jsx)(`span`,{className:`font-medium text-foreground`,children:`Panel`}),` `,t]}),n.length>0?(0,R.jsx)(gG,{questions:n}):(0,R.jsx)(qI,{text:e.text}),(0,R.jsx)(_G,{message:e})]})}function yG({messages:e,seed:t}){return(0,R.jsxs)(`div`,{className:`flex flex-col gap-4`,role:`log`,"aria-label":`Panel conversation`,children:[t?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t}):null,e.map((e,t)=>(0,R.jsx)(vG,{message:e},`${e.at}-${t}`))]})}var bG=`ORACLE`,xG=`No draft yet.`,SG=`The draft appears after the panel's first round.`,CG=`What each seat needs`,wG=[`backend`,`designer`,`qa`,`researcher`],TG={backend:`DEV`,designer:`DESIGN`,qa:`QA`,researcher:`RESEARCH`};function EG(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 DG(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 OG(e,t){return`${e} ${t}${e===1?``:`s`}`}function kG(e){return e.round===0&&e.messages.length===0&&!e.busy}function AG(e){let t=e.members.find(e=>e.status===`failed`);if(t)return(t.error??`${TG[t.member]} failed`).split(`
90
- `)[0]}function jG(e){let t=[],n=AG(e);return e.busy?t.push(DG(e.round,e.limit)):n?t.push(`${n} — Retry runs the round again`):e.questions.length>0&&t.push(`${OG(e.questions.length,`question`)} waiting`),!e.busy&&e.round>0&&t.push(DG(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 MG(e,t){let n=TG[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`:OG(o,`question`)}}function NG(e){let t=e.questions.filter(e=>e.from===bG).length;return[{label:bG,seated:!0,working:e.busy,text:e.busy?`chairing`:t?OG(t,`question`):`·`},...wG.map(t=>MG(t,e))]}function PG(e){let t=!1;return e.split(`
91
- `).map(e=>{let n=e.trimStart().startsWith("```");return n&&(t=!t),{text:e,fenced:t||n}})}function FG({notes:e}){return(0,R.jsx)(R.Fragment,{children:e.map((e,t)=>(0,R.jsx)(`p`,{className:`ml-6 rounded-lg bg-accent px-3 py-1.5 text-sm text-foreground italic`,children:e},t))})}function IG({row:e,notes:t,onComment:n}){let r=e.text.trim(),i=()=>n(r);return(0,R.jsxs)(`li`,{children:[(0,R.jsxs)(`div`,{className:`flex items-start gap-1`,children:[(0,R.jsx)(`span`,{className:`flex w-4 shrink-0 justify-center pt-3.5`,"aria-hidden":`true`,children:t.length>0?(0,R.jsx)(`span`,{className:`size-2 rounded-full bg-primary`}):null}),(0,R.jsx)(`div`,{className:q(`min-w-0 flex-1 cursor-pointer rounded-lg px-2 py-1.5 transition-colors hover:bg-accent/50`,e.fenced&&`font-mono text-sm whitespace-pre-wrap break-words`),onClick:e=>!e.target.closest(`a`)&&i(),children:e.fenced?e.text:(0,R.jsx)(qI,{text:e.text})}),(0,R.jsx)(J,{type:`button`,variant:`ghost`,size:`icon`,className:`shrink-0`,"aria-label":`Comment on this line: ${r}`,onClick:i,children:(0,R.jsx)(Zp,{"aria-hidden":`true`})})]}),(0,R.jsx)(FG,{notes:t})]})}function LG({draft:e,comments:t,onComment:n}){return(0,R.jsx)(`ul`,{className:`flex flex-col`,"aria-label":`Draft plan lines`,children:PG(e).map((e,r)=>e.text.trim()?(0,R.jsx)(IG,{row:e,notes:t.get(e.text.trim())??[],onComment:n},r):(0,R.jsx)(`li`,{"aria-hidden":`true`,className:`h-2`},r))})}function RG({notes:e}){return e.length===0?null:(0,R.jsx)(Az,{title:CG,children:(0,R.jsx)(`dl`,{className:`flex flex-col gap-2 text-sm`,children:e.map((e,t)=>(0,R.jsxs)(`div`,{className:`flex gap-3`,children:[(0,R.jsx)(`dt`,{className:q(`w-20 shrink-0 font-medium`,xH(e.from)),children:bH(e.from)}),(0,R.jsx)(`dd`,{className:`min-w-0 flex-1`,children:(0,R.jsx)(qI,{text:e.text})})]},t))})})}function zG({cell:e,intro:t}){let n=t?e.member?e.seated?`seated`:`not seated`:`chairs`:e.text;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:q(`font-medium`,e.seated?xH(e.label):`text-muted-foreground`),children:bH(e.label)}),e.working&&!t?(0,R.jsx)(gE,{className:`size-3.5`,"aria-hidden":`true`}):null,(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:n})]})}function BG({cell:e,intro:t,onToggled:n}){let{member:r}=e,i=`inline-flex min-h-8 items-center gap-2 rounded-lg px-3 text-[0.8125rem]`;if(!r)return(0,R.jsx)(`li`,{className:q(i,`bg-muted`),children:(0,R.jsx)(zG,{cell:e,intro:t})});let a=async()=>{await V(`planner.toggleSeat`,{member:r})&&n()};return(0,R.jsx)(`li`,{children:(0,R.jsxs)(`label`,{className:q(i,`cursor-pointer transition-colors`,e.seated?`bg-muted hover:bg-accent`:`text-muted-foreground opacity-70 hover:bg-muted hover:opacity-100`),children:[(0,R.jsx)(wV,{checked:e.seated,onCheckedChange:()=>void a(),"aria-label":`${bH(e.label)} sits on the panel`}),(0,R.jsx)(zG,{cell:e,intro:t})]})})}function VG({cells:e,intro:t,onToggled:n}){return(0,R.jsx)(`ul`,{"aria-label":`Panel`,className:`flex flex-wrap gap-2`,children:e.map(e=>(0,R.jsx)(BG,{cell:e,intro:t,onToggled:n},e.label))})}function HG({snap:e}){let t=jG(e),n=!e.busy&&AG(e)!==void 0;return(0,R.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,R.jsx)(gE,{className:`size-3.5`,"aria-hidden":`true`}):null,t.join(` · `)]})}function UG({snap:e,onDone:t}){let n=e=>async()=>{await V(e,{})&&t()};return(0,R.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[e.questions.length>0&&!e.busy?(0,R.jsx)($,{label:`Answer questions`,icon:Yp,tone:`primary`,onClick:()=>void n(`planner.answer`)()}):null,e.retryable?(0,R.jsx)($,{label:`Retry`,icon:Nm,onClick:()=>void n(`planner.retry`)()}):null,(0,R.jsx)($,{label:`Save the plan`,icon:Lm,shortcut:`Ctrl+S`,disabled:!e.draft||e.busy,onClick:()=>void n(`planner.save`)()}),(0,R.jsx)(Dz,{icon:Cp,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 V(`planner.new`,{}).then(t)})]})}function WG({snap:e,onDone:t}){return(0,R.jsxs)(`header`,{className:`flex flex-col gap-3`,children:[(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-4 gap-y-2`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,R.jsx)(`h2`,{className:`text-lg font-medium`,children:`Planning`}),(0,R.jsx)(HG,{snap:e})]}),(0,R.jsx)(UG,{snap:e,onDone:t})]}),(0,R.jsx)(VG,{cells:NG(e),intro:!1,onToggled:t})]})}function GG({line:e,onClose:t,onSent:n}){let r=oE(e!==void 0,aE.confirm);return(0,R.jsx)(QT,{open:e!==void 0&&r,onOpenChange:e=>!e&&t(),label:`Comment on this line`,className:`max-w-xl`,children:(0,R.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 p-6`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h2`,{className:`text-base font-medium`,children:`Comment on this line`}),(0,R.jsx)(`p`,{className:`mt-1 line-clamp-3 text-sm break-words text-muted-foreground`,children:e})]}),(0,R.jsx)(wB,{label:`Your comment`,hint:`Enter adds the comment · Esc cancels`,buttonLabel:`Add comment`,onSend:async r=>e===void 0||!await V(`planner.commentLine`,{line:e,text:r.trim()})?!1:(n(e,r.trim()),t(),!0)})]})})}function KG(e){let t=(0,m.useRef)(null);return(0,m.useEffect)(()=>{let e=t.current;e&&(e.scrollTop=e.scrollHeight)},[e]),t}function qG({snap:e,onDone:t}){return(0,R.jsxs)(sz,{className:`flex flex-col gap-4 p-5`,children:[(0,R.jsx)(`h2`,{className:`text-base font-medium`,children:`Plan`}),(0,R.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:EG(e.limit)}),(0,R.jsx)(VG,{cells:NG(e),intro:!0,onToggled:t})]})}function JG({snap:e,wide:t}){let n=KG(e.messages.length);return(0,R.jsxs)(sz,{className:`flex flex-col`,children:[(0,R.jsx)(`h2`,{className:`px-5 pt-4 text-sm`,children:(0,R.jsx)(kz,{title:`Conversation`})}),(0,R.jsx)(`div`,{ref:n,className:q(`min-h-0 overflow-y-auto p-4`,t?`flex-1`:`max-h-[45svh]`),children:(0,R.jsx)(yG,{messages:e.messages})})]})}function YG({snap:e,comments:t,onComment:n}){return(0,R.jsxs)(sz,{className:`flex flex-col`,children:[(0,R.jsx)(`h2`,{className:`px-5 pt-4 text-sm`,children:(0,R.jsx)(kz,{title:`Draft plan`})}),(0,R.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4`,children:[e.draft?(0,R.jsx)(LG,{draft:e.draft,comments:t,onComment:n}):(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.busy?SG:xG}),(0,R.jsx)(RG,{notes:e.notes})]})]})}function XG({snap:e,reload:t}){let n=oz(),[r,i]=(0,m.useState)(),[a,o]=(0,m.useState)(new Map);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(WG,{snap:e,onDone:t}),(0,R.jsxs)(`div`,{className:n?`grid min-h-0 flex-1 grid-cols-[minmax(0,46fr)_minmax(0,54fr)] grid-rows-[minmax(0,1fr)] gap-4`:`flex flex-col gap-4`,children:[(0,R.jsx)(JG,{snap:e,wide:n}),(0,R.jsx)(YG,{snap:e,comments:a,onComment:i})]}),(0,R.jsx)(GG,{line:r,onClose:()=>i(void 0),onSent:(e,t)=>o(n=>new Map(n).set(e,[...n.get(e)??[],t]))})]})}function ZG(){let e=ZR(`planner.get`,{},[`planner`]),t=e.data;if(!t&&e.error)return(0,R.jsx)(LL,{message:`Could not load the plan. ${e.error}`,onRetry:e.reload});if(!t)return(0,R.jsx)(`p`,{role:`status`,className:`p-4 text-sm text-muted-foreground`,children:`Loading the plan…`});let n=kG(t);return(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 px-4 pb-2`,children:n?(0,R.jsx)(qG,{snap:t,onDone:e.reload}):(0,R.jsx)(XG,{snap:t,reload:e.reload})})}var QG=`Describe a small change in the box below and one agent makes it now, beside any running task.`;function $G(e){return e.prompt.split(`
92
- `).find(e=>e.trim())?.trim()??`(empty)`}function eK(e){return[...e].reverse()}function tK(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 nK(e,t){return e.startedAt?tK((e.finishedAt??t)-e.startedAt):``}function rK(e,t){let n=e.model?`${e.model}${e.thinking?` · ${e.thinking}`:``}`:e.thinking??``;return[e.status,nK(e,t),n,e.tools?`${e.tools} tool${e.tools===1?``:`s`}`:``,e.usage?.cost?`$${e.usage.cost.toFixed(2)}`:``].filter(Boolean).join(` · `)}function iK(e){return e===`queued`?`Waiting for the quick fix ahead of it.`:e===`running`?`starting…`:e===`held`?`Not started.`:`No tool calls.`}function aK({job:e}){let t=e.status===`held`;return(0,R.jsxs)(R.Fragment,{children:[e.route?(0,R.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Routed `,e.route]}):null,e.note&&t?(0,R.jsxs)(`p`,{className:`rounded-lg bg-warning/10 px-3 py-2 text-sm text-foreground`,children:[`Held: `,e.note,`.`]}):null,e.note&&!t?(0,R.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,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Routed here by the oracle.`}):null]})}function oK({job:e}){let t=e.status===`running`;return e.steps.length===0?(0,R.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[t?(0,R.jsx)(gE,{className:`size-3.5`}):null,iK(e.status)]}):(0,R.jsx)(`ol`,{className:`flex flex-col gap-1 text-sm`,children:e.steps.map((e,n)=>(0,R.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,R.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:pz(e.at)}),(0,R.jsx)(`span`,{className:`flex h-5 w-3.5 shrink-0 items-center justify-center`,"aria-hidden":`true`,children:e.pending&&t?(0,R.jsx)(gE,{className:`size-3.5`}):(0,R.jsx)(`span`,{className:`size-1.5 rounded-full bg-muted-foreground/40`})}),(0,R.jsx)(`span`,{className:`min-w-0 break-words text-muted-foreground`,children:e.pending&&t?`${e.text}…`:e.text})]},n))})}function sK({job:e}){return e.status===`held`?(0,R.jsxs)(MI,{children:[(0,R.jsx)($,{label:`Run anyway`,icon:Tm,tone:`primary`,onClick:()=>void V(`quickfix.runAnyway`,{id:e.id})}),(0,R.jsx)($,{label:`Turn it into a task`,icon:Vp,onClick:()=>void V(`quickfix.movedToTask`,{id:e.id})})]}):e.status!==`queued`&&e.status!==`running`?null:(0,R.jsx)(MI,{children:(0,R.jsx)(Dz,{icon:ap,label:`Cancel the quick fix`,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 V(`quickfix.cancel`,{id:e.id})})})}function cK({job:e,now:t}){return(0,R.jsxs)(`article`,{className:`flex flex-col gap-4`,"aria-label":`Quick fix detail`,children:[(0,R.jsx)(sK,{job:e}),(0,R.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground break-all`,children:e.id}),(0,R.jsx)(`p`,{className:`text-sm text-foreground`,children:rK(e,t)})]}),(0,R.jsx)(qI,{text:e.prompt}),(0,R.jsx)(aK,{job:e}),(0,R.jsx)(Az,{title:`Steps`,children:(0,R.jsx)(oK,{job:e})}),e.files?.length?(0,R.jsx)(Az,{title:`Edited`,children:(0,R.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm text-muted-foreground`,children:e.files.map(e=>(0,R.jsxs)(`li`,{className:`break-all`,children:[`· `,e]},e))})}):null,e.error?(0,R.jsx)(`p`,{className:`rounded-lg bg-destructive/10 px-3 py-2 text-sm text-destructive`,children:e.error}):null,e.report?(0,R.jsx)(Az,{title:`Report`,children:(0,R.jsx)(qI,{text:e.report})}):null]})}function lK({status:e}){if(e===`running`)return(0,R.jsx)(gE,{className:`size-3.5`,"aria-label":`running`});let t={queued:dp,success:Wf,failed:lh,timeout:lh,cancelled:am,held:hm,running:dp}[e];return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(t,{"aria-hidden":`true`,className:`size-4 ${e===`success`?`text-success`:e===`failed`||e===`timeout`?`text-destructive`:e===`held`?`text-warning`:`text-muted-foreground`}`}),(0,R.jsx)(`span`,{className:`sr-only`,children:e})]})}function uK({job:e,selected:t,now:n,onSelect:r}){let i=nK(e,n);return(0,R.jsx)(`li`,{children:(0,R.jsxs)(`button`,{type:`button`,"aria-current":t?`true`:void 0,onClick:()=>r(e.id),className:`flex min-h-9 w-full items-start gap-2.5 rounded-lg px-3 py-2.5 text-left text-sm outline-none transition-colors duration-150 hover:bg-accent/60 focus-visible:ring-3 focus-visible:ring-ring/40 aria-[current=true]:bg-accent`,children:[(0,R.jsx)(`span`,{className:`flex h-5 w-4 shrink-0 items-center justify-center`,children:(0,R.jsx)(lK,{status:e.status})}),(0,R.jsx)(`span`,{className:q(`min-w-0 flex-1 break-words`,t?`font-medium text-foreground`:`text-foreground`),children:$G(e)}),i?(0,R.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:i}):null]})})}function dK({jobs:e,selectedId:t,now:n,onSelect:r}){return(0,R.jsx)(`ul`,{className:`flex flex-col gap-0.5 px-2 pb-2`,children:e.map(e=>(0,R.jsx)(uK,{job:e,selected:e.id===t,now:n,onSelect:r},e.id))})}var fK=()=>aL(iL(`quickfix`)),pK=e=>aL(iL(`quickfix`,e));function mK(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 hK(){return(0,R.jsx)(ML,{className:`glass m-4 flex-1 border`,children:(0,R.jsx)(NL,{children:(0,R.jsx)(FL,{className:`font-medium text-foreground`,children:QG})})})}function gK({id:e}){let t=oz(),n=ZR(`quickfix.list`,{},[`quickfix`]),r=eK(n.data?.jobs??[]),i=mK(r.some(e=>e.status===`running`));if(!n.data&&n.error)return(0,R.jsx)(LL,{message:`Could not load quick fixes. ${n.error}`,onRetry:n.reload});let a=n.data&&r.length===0?(0,R.jsx)(hK,{}):(0,R.jsx)(_K,{id:e,wide:t,loaded:!!n.data,jobs:r,now:i});return(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:a})}function _K({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,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(uz,{title:`Quick fixes`,count:String(r.length)}),n?(0,R.jsx)(dK,{jobs:r,selectedId:a,now:i,onSelect:pK}):(0,R.jsx)(dz,{})]});return(0,R.jsx)(lz,{wide:t,list:s,detail:o?(0,R.jsx)(cK,{job:o,now:i}):e?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`That quick fix is not on the list any more.`}):null,open:!!e,onClose:fK,hint:`Select a quick fix to see its steps.`,describe:`Quick fix detail`})}function vK({entry:e}){let t=e.at?pz(e.at):``;if(e.role===`note`)return(0,R.jsxs)(`li`,{className:`text-center text-xs text-muted-foreground`,children:[e.text,t?` · ${t}`:``]});let n=e.role===`you`;return(0,R.jsxs)(`li`,{className:`flex flex-col gap-1`,children:[(0,R.jsxs)(`span`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[n?null:(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 rounded-full bg-primary`}),(0,R.jsx)(`span`,{className:`font-medium text-foreground`,children:n?`You`:`Oracle`}),` `,t]}),(0,R.jsx)(qI,{text:e.text})]})}function yK({entries:e,more:t,loading:n,onMore:r,empty:i}){return(0,R.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[t?(0,R.jsx)(`div`,{className:`flex self-center`,children:(0,R.jsx)($,{label:`Load earlier messages`,icon:Xf,disabled:n,onClick:r??(()=>void 0)})}):null,e.length===0?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:i}):(0,R.jsx)(`ol`,{"aria-label":`Conversation`,className:`flex flex-col gap-3`,children:e.map(e=>(0,R.jsx)(vK,{entry:e},e.id))})]})}function bK({address:e,empty:t}){let n=ZR(`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 V(`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,R.jsx)(yK,{entries:l,more:d,loading:a,onMore:()=>void u(),empty:n.loading&&!n.data?`Loading the conversation…`:t})}var xK={"this window":`This window`,background:`Background`,"other terminal":`Other terminals`},SK=[`this window`,`background`,`other terminal`],CK=`Nothing said yet.`,wK=`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.`,TK=`No other sessions. Start one below.`;function EK(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 DK(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 OK(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 kK(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[EK(e,t,n),...r.map(DK),...o.map(OK)]}function AK(e){return`${e} question${e===1?``:`s`} waiting for you`}function jK(e){return e.status===`starting`?`starting ${e.name}…`:e.alive?`${e.name} has not said anything yet.`:`${e.name} has ended.`}function MK(e){return[e.where,e.status.replace(/_/g,` `),e.pid?`pid ${e.pid}`:``].filter(Boolean).join(` · `)}function NK(e){return e.key?{key:e.key}:e.sessionId?{sessionId:e.sessionId}:void 0}function PK({options:e,send:t}){return(0,R.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:e.map(e=>(0,R.jsx)(J,{variant:`outline`,onClick:()=>void t({value:e}),children:e},e))})}function FK({dialog:e,send:t}){let n=(0,m.useId)(),[r,i]=(0,m.useState)(e.prefill??``);return(0,R.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,R.jsx)(`label`,{htmlFor:n,className:`sr-only`,children:e.title}),(0,R.jsx)(WL,{id:n,rows:e.method===`editor`?4:2,value:r,placeholder:e.placeholder,onChange:e=>i(e.target.value)}),(0,R.jsx)(`div`,{className:`flex self-end`,children:(0,R.jsx)($,{label:`Send the answer`,icon:If,tone:`primary`,disabled:!r.trim(),onClick:()=>void t({value:r.trim()})})})]})}function IK({dialog:e,send:t}){return e.method===`select`?(0,R.jsx)(PK,{options:e.options??[],send:t}):e.method===`confirm`?(0,R.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,R.jsx)(J,{onClick:()=>void t({confirmed:!0}),children:`Yes`}),(0,R.jsx)(J,{variant:`outline`,onClick:()=>void t({confirmed:!1}),children:`No`})]}):(0,R.jsx)(FK,{dialog:e,send:t})}function LK({sessionKey:e,dialog:t,onAnswered:n}){let r=async r=>{await V(`sessions.answer`,{key:e,dialogId:t.id,answer:r})&&n()};return(0,R.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-lg border border-border p-3`,children:[(0,R.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,R.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:t.title}),t.message?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t.message}):null]}),(0,R.jsx)(IK,{dialog:t,send:r}),(0,R.jsx)(`div`,{className:`flex self-start`,children:(0,R.jsx)($,{label:`Put it away`,icon:lh,onClick:()=>void r({cancelled:!0})})})]})}function RK({sessionKey:e,dialogs:t,onAnswered:n}){return t.length===0?null:(0,R.jsxs)(`section`,{"aria-label":`Questions waiting`,className:`flex flex-col gap-2`,children:[(0,R.jsx)(`p`,{role:`status`,className:`text-sm font-medium text-foreground`,children:AK(t.length)}),t.map(t=>(0,R.jsx)(LK,{sessionKey:e,dialog:t,onAnswered:n},t.id))]})}var zK={"this window":sm,background:Lp,"other terminal":Ym};function BK({where:e,className:t}){let n=zK[e];return(0,R.jsx)(n,{"aria-hidden":`true`,className:q(`size-4 shrink-0 text-muted-foreground`,t)})}function VK({task:e}){let t=e.progress;return(0,R.jsxs)(`p`,{className:`flex flex-wrap items-center gap-2 text-sm text-muted-foreground`,children:[(0,R.jsx)(`span`,{className:`break-all`,children:e.id}),t&&t.total>0?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(ZH,{done:t.done,total:t.total}),(0,R.jsxs)(`span`,{className:`tabular-nums`,children:[t.done,`/`,t.total]})]}):null]})}function HK({entry:e}){let{key:t}=e;return e.where===`this window`?(0,R.jsx)(MI,{children:(0,R.jsx)($,{label:`Back to this window`,icon:Mf,tone:`primary`,onClick:()=>aL(`#/lobby`)})}):t?(0,R.jsxs)(MI,{children:[(0,R.jsx)($,{label:`Move here`,icon:Pf,tone:`primary`,onClick:()=>void V(`sessions.switch`,{key:t})}),(0,R.jsx)(Dz,{icon:ap,label:`Stop the session`,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 V(`sessions.stop`,{key:t})})]}):null}function UK({entry:e,lobby:t}){let n=NK(e);return e.where===`this window`?(0,R.jsx)(yK,{entries:t?.chat??[],more:!1,empty:CK}):n?(0,R.jsx)(bK,{address:n,empty:e.where===`other terminal`?`Nothing said in this session yet.`:jK(e)},e.id):(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:CK})}function WK({entry:e,lobby:t,onChanged:n}){return(0,R.jsxs)(`article`,{"aria-label":`Session detail`,className:`flex flex-col gap-4`,children:[(0,R.jsx)(HK,{entry:e}),(0,R.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,R.jsxs)(`h3`,{className:`flex items-center gap-2 text-sm font-medium text-foreground`,children:[(0,R.jsx)(BK,{where:e.where}),e.name]}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:MK(e)}),e.task?(0,R.jsx)(VK,{task:e.task}):null,e.where!==`background`&&e.waiting>0?(0,R.jsx)(`p`,{className:`text-sm text-foreground`,children:AK(e.waiting)}):null]}),e.where===`other terminal`?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:wK}):null,e.key?(0,R.jsx)(RK,{sessionKey:e.key,dialogs:e.dialogs,onAnswered:n}):null,(0,R.jsx)(Az,{title:`Conversation`,children:(0,R.jsx)(UK,{entry:e,lobby:t})})]})}function GK({entry:e,selected:t,onSelect:n}){return(0,R.jsx)(`li`,{children:(0,R.jsxs)(`button`,{type:`button`,"aria-current":t?`true`:void 0,onClick:()=>n(e.id),className:`flex min-h-9 w-full items-start gap-2.5 rounded-lg px-3 py-2.5 text-left text-sm outline-none transition-colors duration-150 hover:bg-accent/60 focus-visible:ring-3 focus-visible:ring-ring/40 aria-[current=true]:bg-accent`,children:[(0,R.jsx)(BK,{where:e.where,className:`mt-0.5`}),(0,R.jsx)(`span`,{className:q(`min-w-0 flex-1 break-words text-foreground`,t&&`font-medium`),children:e.name}),(0,R.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground`,children:[e.status===`working`||e.status===`starting`?(0,R.jsx)(gE,{className:`size-3`,"aria-hidden":`true`}):null,e.status.replace(/_/g,` `),e.waiting>0?(0,R.jsx)(`span`,{className:`rounded-lg bg-warning/15 px-2 py-0.5 font-medium text-warning tabular-nums`,children:e.waiting}):null]})]})})}function KK({where:e,entries:t,selectedId:n,onSelect:r}){return(0,R.jsxs)(`section`,{"aria-label":xK[e],className:`flex flex-col gap-1`,children:[(0,R.jsx)(`h3`,{className:`px-4 pt-2 text-xs`,children:(0,R.jsx)(kz,{title:xK[e],right:String(t.length),className:`[&>span:first-child]:font-medium [&>span:first-child]:text-muted-foreground`})}),(0,R.jsx)(`ul`,{className:`flex flex-col gap-0.5 px-2`,children:t.map(e=>(0,R.jsx)(GK,{entry:e,selected:e.id===n,onSelect:r},e.id))})]})}function qK({entries:e,selectedId:t,onSelect:n}){return(0,R.jsx)(`div`,{className:`flex flex-col gap-2 pb-2`,children:SK.map(r=>{let i=e.filter(e=>e.where===r);return i.length>0?(0,R.jsx)(KK,{where:r,entries:i,selectedId:t,onSelect:n},r):null})})}var JK=()=>aL(`#/sessions`),YK=e=>aL(`#/sessions/${encodeURIComponent(e)}`);function XK({windows:e}){return e.length===0?null:(0,R.jsx)(`div`,{className:`px-3 pb-3`,children:(0,R.jsx)(Az,{title:`Other windows`,children:(0,R.jsx)(`ul`,{className:`flex flex-col`,children:e.map(e=>(0,R.jsx)(`li`,{children:(0,R.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`flex min-h-8 items-center rounded-lg px-2 text-sm text-foreground underline underline-offset-4 hover:bg-muted`,children:e.name})},e.url))})})})}function ZK(){return(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`That session is not on the list any more.`})}function QK({id:e}){let t=oz(),n=eL(`status`).data,r=eL(`lobby`).data,i=eL(`prompts`).data?.prompts.length??0,a=ZR(`sessions.list`,{},[`sessions`]);if(!a.data&&a.error)return(0,R.jsx)(LL,{message:`Could not load sessions. ${a.error}`,onRetry:a.reload});let o=kK(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=c&&c.where!==`this window`&&c.alive?NK(c):void 0,u=l?JSON.stringify(l):``,d=c?.name;(0,m.useEffect)(()=>(TE(l&&d?{name:d,address:l}:void 0),()=>TE(void 0)),[u,d]);let f=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(uz,{title:`Sessions`,count:String(o.length)}),a.data?(0,R.jsx)(qK,{entries:o,selectedId:s,onSelect:YK}):(0,R.jsx)(dz,{}),a.data&&o.length===1?(0,R.jsx)(`p`,{className:`px-4 pb-3 text-sm text-muted-foreground`,children:TK}):null,(0,R.jsx)(XK,{windows:n?.windows??[]})]}),p=c?(0,R.jsx)(WK,{entry:c,lobby:r,onChanged:a.reload},c.id):e?(0,R.jsx)(ZK,{}):null;return(0,R.jsx)(lz,{wide:t,list:f,detail:p,open:!!e,onClose:JK,hint:`Select a session to see its conversation.`,describe:`Session detail`})}var $K={open:lp,delivered:tp,addressed:$f},eq={open:`waiting for the owning session`,delivered:`sent to the oracle`,addressed:`plan amended`};function tq({comment:e}){let t=gz(Date.now()-Date.parse(e.createdAt)),n=$K[e.status];return(0,R.jsxs)(`li`,{className:`rounded-lg border border-border bg-card/50 px-4 py-3`,children:[(0,R.jsx)(qI,{text:e.text}),(0,R.jsxs)(`p`,{className:`mt-1.5 flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,R.jsx)(n,{"aria-hidden":`true`,className:e.status===`addressed`?`size-3.5 text-success`:`size-3.5`}),eq[e.status],`, `,t]})]})}function nq({taskId:e,finished:t,canComment:n}){let r=ZR(`tasks.comments`,{taskId:e},[`tasks`]).data?.comments??[],i=r.filter(e=>e.status!==`addressed`).length;return(0,R.jsxs)(`section`,{"aria-labelledby":`comments-${e}`,className:`flex flex-col gap-3`,children:[(0,R.jsx)(`h3`,{id:`comments-${e}`,className:`text-sm`,children:(0,R.jsx)(kz,{title:`Comments`,right:i>0?`${i} open`:void 0})}),r.length===0?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t?`No comments.`:n?`No comments yet. Comment on the plan in the box below (Markdown and images work); the oracle amends it.`:`No comments yet.`}):(0,R.jsx)(`ul`,{className:`flex flex-col gap-2.5`,children:r.map(e=>(0,R.jsx)(tq,{comment:e},e.id))})]})}function rq({step:e,index:t}){let n=e.status===`done`?$f:lp,r=e.status===`done`?`text-success`:e.status===`current`?`text-primary`:`text-muted-foreground`;return(0,R.jsxs)(`li`,{className:`flex items-start gap-2.5 text-sm`,children:[(0,R.jsx)(n,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 ${r}`}),(0,R.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:[t+1,`.`]}),(0,R.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,R.jsxs)(`span`,{className:`shrink-0 rounded-lg bg-accent px-2 py-0.5 text-xs font-medium`,children:[`now`,(0,R.jsx)(`span`,{className:`sr-only`,children:` (current step)`})]}):null]})}function iq({steps:e}){let t=e.filter(e=>e.status===`done`).length;return(0,R.jsx)(Az,{title:`Progress`,right:`${t}/${e.length} steps`,children:(0,R.jsx)(`ol`,{className:`flex flex-col gap-1.5`,children:e.map((e,t)=>(0,R.jsx)(rq,{step:e,index:t},`${t}-${e.text}`))})})}function aq({detail:e,finished:t}){return e.plan?(0,R.jsx)(Az,{title:`Approved plan`,children:(0,R.jsx)(qI,{text:e.plan})}):e.proposal?(0,R.jsx)(Az,{title:t?`Proposal`:`Proposal (no plan yet)`,children:(0,R.jsx)(qI,{text:e.proposal})}):(0,R.jsx)(Az,{title:`Plan`,children:(0,R.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 oq({amendments:e}){return e.length===0?null:(0,R.jsx)(Az,{title:`Amendments`,children:(0,R.jsx)(`ul`,{className:`flex list-disc flex-col gap-1 pl-5 text-sm text-muted-foreground`,children:e.map(e=>(0,R.jsx)(`li`,{className:`break-words`,children:e},e))})})}function sq({detail:e}){return e.waiting.length===0&&e.blockers.length===0?null:(0,R.jsx)(Az,{title:`Waiting on`,children:(0,R.jsxs)(`ul`,{className:`flex flex-col gap-1 text-sm`,children:[e.waiting.map((e,t)=>(0,R.jsxs)(`li`,{className:`flex gap-2`,children:[(0,R.jsx)(Zf,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-warning`}),(0,R.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,R.jsxs)(`li`,{className:`flex gap-2`,children:[(0,R.jsx)(sp,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-destructive`}),(0,R.jsxs)(`span`,{className:`min-w-0 break-words text-muted-foreground`,children:[e.reason,` (needs: `,e.need,`)`]})]},`${t}-${e.reason}`))]})})}function cq({runs:e}){return e.length===0?null:(0,R.jsx)(Az,{title:`Recent runs`,children:(0,R.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm text-muted-foreground`,children:e.map((e,t)=>(0,R.jsx)(`li`,{className:`break-words`,children:e},`${t}-${e}`))})})}function lq({detail:e,finished:t}){return(0,R.jsxs)(R.Fragment,{children:[e.request?(0,R.jsx)(Az,{title:`Request`,children:(0,R.jsx)(qI,{text:e.request})}):null,e.steps.length>0?(0,R.jsx)(iq,{steps:e.steps}):null,(0,R.jsx)(aq,{detail:e,finished:t})]})}function uq({detail:e}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(oq,{amendments:e.amendments}),(0,R.jsx)(sq,{detail:e}),(0,R.jsx)(cq,{runs:e.runs})]})}var dq={mine:`This session`,others:`Other sessions`,pending:`Pending`,recent:`Finished`,archived:`Archived`},fq={open:`open`,done:`done`,dropped:`abandoned`},pq=`No tasks yet. Start one from the Lobby tab, or plan one in the Plan tab.`;function mq(e,t){return`${e.replace(/_/g,` `)}${t?` · paused`:``}`}function hq(e){return e===`now`?`just now`:`${e} ago`}function gq(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[mq(e.status,e.paused),e.auto?`auto`:``,t].filter(Boolean).join(` · `)}function _q(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 vq(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 yq({split:e}){let t=e.after.length>0?`, after ${e.after.map(e=>`part ${e}`).join(` and `)}`:``;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[(0,R.jsxs)(`span`,{className:`font-medium text-primary`,children:[`part `,e.part,` of `,e.of]}),` of one plan that was split into tasks`,t?(0,R.jsx)(`span`,{className:`text-foreground`,children:t}):null]}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.titles.map((t,n)=>(0,R.jsxs)(`span`,{children:[n>0?(0,R.jsx)(`span`,{className:`text-muted-foreground/60`,children:` · `}):null,(0,R.jsxs)(`span`,{className:n+1===e.part?`font-medium text-foreground`:void 0,children:[n+1,`. `,t]})]},`${n}-${t}`))})]})}function bq({planId:e}){let t=ZR(`plans.get`,{planId:e},[`plans`]),n=t.data;return n?(0,R.jsxs)(R.Fragment,{children:[n.issue?(0,R.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`from issue #`,n.issue.number,` — `,n.issue.title,n.issue.url?(0,R.jsxs)(`span`,{className:`break-all`,children:[` `,n.issue.url]}):null]}):null,n.split?(0,R.jsx)(yq,{split:n.split}):null,(0,R.jsx)(Az,{title:`Agreed plan`,children:(0,R.jsx)(qI,{text:n.brief})})]}):t.error?(0,R.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not load the agreed plan. `,t.error]}):null}function xq({row:e,onGone:t}){let n=async n=>{await V(`plans.start`,{planId:e.id,where:n})&&t()},r=async()=>{await V(`plans.discard`,{planId:e.id})&&t()};return(0,R.jsxs)(`article`,{className:`flex flex-col gap-4`,"aria-label":e.title,children:[(0,R.jsxs)(MI,{children:[(0,R.jsx)($,{label:`Start here`,icon:Tm,tone:`primary`,onClick:()=>void n(`here`)}),(0,R.jsx)($,{label:`Start in a new session`,icon:qm,onClick:()=>void n(`session`)}),(0,R.jsx)(Dz,{icon:th,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()})]}),(0,R.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,R.jsxs)(`h2`,{className:`flex items-start gap-2.5 text-lg font-medium`,children:[(0,R.jsx)(QH,{check:`open`,className:`mt-1.5`}),(0,R.jsx)(`span`,{className:`min-w-0 break-words`,children:e.title})]}),(0,R.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`pending`,e.age?` · saved ${hq(e.age)}`:``]}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground break-all`,children:e.id})]}),(0,R.jsx)(bq,{planId:e.id})]})}function Sq(e){if(e.kind===`archived`)return`archived ${hq(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`} ${hq(e.age)}`:``;return[mq(e.status,e.paused),t?``:n,r].filter(Boolean).join(` · `)}function Cq(e){return e?[YH(e.track),e.domains.join(`, `)].filter(Boolean).join(` · `):``}function wq({row:e,task:t}){return e.progress?(0,R.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground`,children:[(0,R.jsx)(ZH,{done:e.progress.done,total:e.progress.total}),(0,R.jsxs)(`span`,{children:[e.progress.done,` of `,e.progress.total,` steps`]}),t?.currentStep?(0,R.jsxs)(`span`,{className:`text-foreground`,children:[t.currentStep,` `,(0,R.jsx)(`span`,{className:`rounded-lg bg-accent px-2 py-0.5 text-xs font-medium`,children:`now`}),(0,R.jsx)(`span`,{className:`sr-only`,children:`(current step)`})]}):null]}):null}function Tq({row:e,task:t}){let n=t?.git?`branch ${t.git.branch}${t.git.from?` · from ${t.git.from}`:``}`:``;return(0,R.jsxs)(`header`,{className:`flex flex-col gap-1.5`,children:[(0,R.jsxs)(`h2`,{className:`flex items-start gap-2.5 text-lg font-medium`,children:[(0,R.jsx)(QH,{check:e.check,className:`mt-1.5`}),(0,R.jsxs)(`span`,{className:`sr-only`,children:[fq[e.check],`:`]}),(0,R.jsx)(`span`,{className:e.check===`dropped`?`min-w-0 break-words line-through`:`min-w-0 break-words`,children:e.title})]}),(0,R.jsx)(`p`,{className:`text-sm text-foreground`,children:Sq(e)}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground break-all`,children:[e.id,Cq(t)].filter(Boolean).join(` · `)}),n?(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n}):null,(0,R.jsx)(wq,{row:e,task:t})]})}function Eq({row:e,onGone:t,onChanged:n}){let r=e.id;return{restore:async()=>{await V(`tasks.restore`,{taskId:r},{undo:()=>void V(`tasks.archive`,{taskId:r})})&&t()},archive:async()=>{await V(`tasks.archive`,{taskId:r},{undo:()=>void V(`tasks.restore`,{taskId:r})})&&t()},remove:async()=>{await V(`tasks.delete`,{taskId:r,where:e.kind===`archived`?`archive`:`list`})&&t()},toggleAuto:()=>void V(`tasks.auto`,{taskId:r,on:!e.auto}).then(n)}}function Dq({row:e,archive:t}){return e.check===`open`?(0,R.jsx)(Dz,{label:`Archive`,icon:Of,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,R.jsx)($,{label:`Archive`,icon:Of,onClick:()=>void t()})}function Oq(e){let{row:t}=e,{restore:n,archive:r,remove:i,toggleAuto:a}=Eq(e),o=t.kind===`archived`;return(0,R.jsxs)(MI,{children:[o?(0,R.jsx)($,{label:`Restore`,icon:jm,onClick:()=>void n()}):null,t.check===`open`&&!o?(0,R.jsxs)(vE,{children:[(0,R.jsx)(yE,{asChild:!0,children:(0,R.jsxs)(`label`,{className:`flex h-8 cursor-pointer items-center gap-1.5 rounded-lg px-2 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:[(0,R.jsx)(km,{"aria-hidden":`true`,className:`size-4`}),(0,R.jsx)(tW,{checked:!!t.auto,onCheckedChange:a,"aria-label":`Auto mode`})]})}),(0,R.jsx)(bE,{children:`Auto mode: the oracle decides without asking`})]}):null,o?null:(0,R.jsx)(Dq,{row:t,archive:r}),(0,R.jsx)(Dz,{icon:th,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 kq(e){let{row:t}=e,n=t.kind===`plan`,r=ZR(`tasks.get`,{taskId:t.id},[`tasks`],!n),i=eL(`lobby`).data?.task,a=i?.id===t.id?i:void 0;if(n)return(0,R.jsx)(xq,{row:t,onGone:e.onGone});let o=t.check===`open`&&t.kind===`task`;return(0,R.jsxs)(`article`,{className:`flex flex-col gap-5`,"aria-label":t.title,children:[(0,R.jsx)(Oq,{...e}),(0,R.jsx)(Tq,{row:t,task:a}),r.data?(0,R.jsx)(lq,{detail:r.data,finished:!o}):null,(0,R.jsx)(nq,{taskId:t.id,finished:!o,canComment:o}),r.data?(0,R.jsx)(uq,{detail:r.data}):null,r.error&&!r.data?(0,R.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not load the plan detail. `,r.error]}):null]})}function Aq({row:e}){return e.check===`open`&&e.progress?(0,R.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground tabular-nums`,children:[(0,R.jsx)(ZH,{done:e.progress.done,total:e.progress.total}),(0,R.jsxs)(`span`,{children:[e.progress.done,`/`,e.progress.total]})]}):e.age&&e.check!==`open`?(0,R.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:e.age}):null}function jq(e){return e.check===`dropped`?`text-muted-foreground line-through`:e.kind===`archived`||e.check===`done`?`text-muted-foreground`:`text-foreground`}function Mq({row:e,selected:t,onSelect:n}){return(0,R.jsx)(`li`,{children:(0,R.jsxs)(`button`,{type:`button`,"aria-current":t?`true`:void 0,onClick:()=>n(e.id),className:`flex min-h-9 w-full flex-col gap-0.5 rounded-lg px-3 py-2.5 text-left outline-none transition-colors duration-150 hover:bg-accent/60 focus-visible:ring-3 focus-visible:ring-ring/40 aria-[current=true]:bg-accent`,children:[(0,R.jsxs)(`span`,{className:`flex items-start gap-2 text-sm`,children:[(0,R.jsx)(QH,{check:e.check,className:`mt-0.5`}),(0,R.jsxs)(`span`,{className:`sr-only`,children:[fq[e.check],`:`]}),(0,R.jsx)(`span`,{className:q(`min-w-0 flex-1 break-words`,jq(e),t&&`font-medium text-foreground`),children:e.title}),(0,R.jsx)(Aq,{row:e})]}),e.check===`open`?(0,R.jsx)(`span`,{className:`pl-6 text-xs text-muted-foreground`,children:gq(e)}):null]})})}function Nq({rows:e,selectedId:t,onSelect:n}){return(0,R.jsx)(`div`,{className:`flex flex-col pb-2`,children:_q(e).map(({section:e,rows:r})=>(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h3`,{className:`px-4 pt-3 pb-1 text-xs`,children:(0,R.jsx)(kz,{title:dq[e],right:String(r.length),className:`[&>span:first-child]:font-medium [&>span:first-child]:text-muted-foreground`})}),(0,R.jsx)(`ul`,{className:`flex flex-col gap-0.5 px-2 pt-1`,children:r.map(e=>(0,R.jsx)(Mq,{row:e,selected:e.id===t,onSelect:n},`${e.kind}-${e.id}`))})]},e))})}var Pq=()=>aL(iL(`tasks`)),Fq=e=>aL(iL(`tasks`,e));function Iq(){return(0,R.jsxs)(ML,{className:`glass m-4 flex-1 border`,children:[(0,R.jsx)(NL,{children:(0,R.jsx)(FL,{children:pq})}),(0,R.jsx)(J,{onClick:()=>aL(iL(`plan`)),children:`Plan a task`})]})}function Lq({shown:e,count:t,onToggle:n}){return(0,R.jsxs)(`label`,{className:`flex h-8 cursor-pointer items-center gap-2 rounded-lg border border-border px-2.5 text-[0.8125rem] font-medium transition-colors hover:bg-accent`,children:[(0,R.jsx)(wV,{checked:e,onCheckedChange:n,"aria-label":`Show archived tasks`}),`Archived`,(0,R.jsx)(mB,{variant:`secondary`,children:t})]})}function Rq({id:e}){let t=oz(),[n,r]=(0,m.useState)(!1),i=ZR(`tasks.list`,{},[`tasks`,`plans`]),a=ZR(`tasks.archived`,{},[`tasks`]),o=i.data?.rows??[],s=a.data?.rows??[],c=n?[...o,...s]:o,l=e??(t?c[0]?.id:void 0),u=[...c,...s].find(e=>e.id===l&&e.kind===`task`)?.id;if((0,m.useEffect)(()=>(wE(u),()=>wE(void 0)),[u]),!i.data&&i.error)return(0,R.jsx)(LL,{message:`Could not load tasks. ${i.error}`,onRetry:i.reload});if(i.data&&o.length===0&&s.length===0)return(0,R.jsx)(Iq,{});let d=[...c,...s].find(e=>e.id===l),f=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(uz,{title:`Tasks`,count:vq(c),children:(0,R.jsx)(Lq,{shown:n,count:s.length,onToggle:()=>r(e=>!e)})}),i.data?c.length===0?(0,R.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:pq}):(0,R.jsx)(Nq,{rows:c,selectedId:l,onSelect:Fq}):(0,R.jsx)(dz,{})]}),p=d?(0,R.jsx)(kq,{row:d,onGone:Pq,onChanged:i.reload},d.id):e?(0,R.jsx)(zq,{}):null;return(0,R.jsx)(lz,{wide:t,list:f,detail:p,open:!!e,onClose:Pq,hint:`Select a task to see its detail.`,describe:`Task detail`})}function zq(){return(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`That task is not on the list any more.`})}function Bq(e){let t=e[0];if(t)try{return decodeURIComponent(t)}catch{return t}}function Vq(e){if(e.kind===`settings`)return(0,R.jsx)(hG,{});if(e.kind===`sessions`)return(0,R.jsx)(QK,{id:Bq(e.key?[e.key]:[])});switch(e.tab){case`lobby`:return(0,R.jsx)(oU,{});case`tasks`:return(0,R.jsx)(Rq,{id:Bq(e.rest)});case`plan`:return(0,R.jsx)(ZG,{});case`quickfix`:return(0,R.jsx)(gK,{id:Bq(e.rest)});case`issues`:return(0,R.jsx)(JB,{rest:e.rest});case`metrics`:return(0,R.jsx)(ZU,{});case`git`:return(0,R.jsx)(SB,{rest:e.rest});case`knowledge`:return(0,R.jsx)(CV,{agent:e.rest[0],file:e.rest[1]});case`excalidraw`:return(0,R.jsx)(dH,{id:Bq(e.rest)})}}function Hq(e,t,n,r){e===`help`?n():e===`settings`?aL(`#/settings`):e===`sessions`?aL(`#/sessions`):e===`nextTab`?r(1):e===`prevTab`?r(-1):e===`savePlan`&&t.kind===`tab`&&t.tab===`plan`&&V(`planner.save`,{})}function Uq({connection:e,onRetry:t}){return e===`offline`?(0,R.jsx)(RL,{onRetry:t}):null}function Wq(e){return e.kind===`tab`?e.tab:e.kind}function Gq(){let e=oL(),t=eL(`status`),n=eL(`lobby`),{prompts:r,answer:i,dismiss:a}=XR(),{connection:o,signedOut:s}=$I(),[c,l]=(0,m.useState)(!1),[u,d]=(0,m.useState)(!1),f=(0,m.useRef)(null),p=DR();YR();let h=t.data,g=h?.tabs??[],_=h?.keys??[],v=e.kind===`tab`?e.tab:void 0,y=(0,m.useCallback)(e=>aL(iL(e)),[]),b=(0,m.useCallback)(e=>{if(g.length===0)return;let t=Math.max(0,g.findIndex(e=>e.id===v)),n=g[(t+e+g.length)%g.length];n&&aL(iL(n.id))},[g,v]),x=(0,m.useCallback)(()=>l(e=>!e),[]),S=(0,m.useCallback)(t=>Hq(t,e,x,b),[e,x,b]),C=(0,m.useCallback)(()=>{let e=document.activeElement;return!e||e===document.body||f.current?.contains(e)===!0},[]);FR({enabled:!!h,keys:_,tabs:g,insideApp:C,onAction:S,onTab:y});let w=(0,m.useCallback)(()=>Yd.onHello({}),[]),T=e.kind===`tab`?e.tab:e.kind,E=!!h;if((0,m.useEffect)(()=>{if(!E)return;if(zE.active){zE.active=!1;return}let e=requestAnimationFrame(()=>{let e=document.getElementById(`composer-text`);e&&!e.closest(`[inert]`)&&!document.querySelector(`[role='dialog']`)&&e.focus({preventScroll:!0})});return()=>cancelAnimationFrame(e)},[T,E]),(0,m.useEffect)(()=>{let e=e=>{if(e.key!==`/`||e.altKey||e.ctrlKey||e.metaKey||AE(e.target))return;let t=document.getElementById(`composer-text`);t&&!t.closest(`[inert]`)&&(e.preventDefault(),t.focus())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),s)return(0,R.jsx)(jL,{});if(!h&&t.loading)return(0,R.jsx)(IL,{});if(!h&&t.error)return(0,R.jsx)(LL,{message:t.error,onRetry:w});if(!h)return(0,R.jsx)(IL,{});let ee=Object.fromEntries(_.map(e=>[e.action,e.label]));return(0,R.jsxs)(`div`,{ref:f,className:`fixed inset-0 flex flex-col gap-0.5`,children:[(0,R.jsx)(kL,{status:h,task:n.data?.task,connection:o,route:e,keys:ee,onHelp:x,tabs:(0,R.jsx)(UL,{tabs:g,activeId:v,onSelect:y}),extra:u&&r.length>0?(0,R.jsx)(bR,{count:r.length,onOpen:()=>d(!1)}):null}),(0,R.jsx)(Uq,{connection:o,onRetry:p}),(0,R.jsx)(`main`,{id:`main`,tabIndex:-1,onKeyDown:e=>{e.key!==`Escape`||e.defaultPrevented||AE(e.target)||e.target.closest(`[role='dialog'], [role='menu'], [role='listbox']`)||RE()&&e.preventDefault()},role:v?`tabpanel`:void 0,"aria-labelledby":v?`tab-${v}`:void 0,className:`flex min-h-0 flex-1 flex-col overflow-y-auto py-2 outline-none`,children:(0,R.jsx)(Rd.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.2,ease:[.2,.8,.2,1]},className:`flex min-h-0 flex-1 flex-col`,children:Vq(e)},Wq(e))}),(0,R.jsx)(mL,{route:e,keys:ee,onHelp:x}),(0,R.jsx)(xR,{prompts:r,answer:i,dismiss:a,minimized:u,onMinimize:d}),(0,R.jsx)(hE,{open:c,onOpenChange:l,keys:_,tabs:g})]})}async function Kq(e){switch(e){case`status`:return uf(`status.get`,{});case`lobby`:return uf(`lobby.snapshot`,{});case`prompts`:return uf(`prompts.list`,{});default:return}}var qq=[`status`,`lobby`,`prompts`];function Jq(){let[e,t]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{let e=!0;return(async()=>{await ff(),e&&(Yd.markUsed(qq,Kq),t(!0))})(),()=>{e=!1}},[]),e}function Yq(){let e=Jq(),{signedOut:t}=$I();return e?t?(0,R.jsx)(jL,{}):(0,R.jsx)(Gq,{}):(0,R.jsx)(IL,{})}var Xq={info:jp,success:$f,warning:rh,error:sp},Zq={info:`text-primary`,success:`text-success`,warning:`text-warning`,error:`text-destructive`};function Qq(){let{item:e,waiting:t}=sf(),n=sE(),r=e&&!n;return(0,m.useEffect)(()=>{if(!e||n)return;let r=window.setTimeout(()=>rf(e.id),t>0?Math.min(e.duration,1600):e.duration);return()=>window.clearTimeout(r)},[e,n,t]),(0,R.jsx)(`div`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`pointer-events-none fixed inset-x-0 z-40 flex justify-center px-4`,style:{bottom:`calc(var(--composer-h, 0px) + 0.5rem)`},children:(0,R.jsx)(Cl,{mode:`wait`,children:r?(0,R.jsxs)(Rd.div,{initial:{opacity:0,scale:.55,y:18},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.92,y:6,transition:{duration:.14,ease:`easeIn`}},transition:{type:`spring`,stiffness:560,damping:15,mass:.8},className:`pointer-events-auto flex max-w-[min(32rem,100%)] items-center gap-3 rounded-lg border border-glass-border bg-popover/75 px-4 py-3 text-sm text-popover-foreground shadow-glass backdrop-blur-xs`,children:[(0,R.jsx)($q,{kind:e.kind}),(0,R.jsx)(`span`,{className:`min-w-0 break-words`,children:e.message}),e.action?(0,R.jsx)(`button`,{type:`button`,className:`-my-2 -mr-2 h-8 shrink-0 rounded-lg px-3 font-medium text-primary transition-colors hover:bg-accent focus-visible:ring-3 focus-visible:ring-ring/40 focus-visible:outline-none`,onClick:()=>{e.action?.onClick(),rf(e.id)},children:e.action.label}):null]},e.id):null})})}function $q({kind:e}){let t=Xq[e];return(0,R.jsx)(t,{"aria-hidden":`true`,className:q(`size-5 shrink-0`,Zq[e])})}(0,Wd.createRoot)(document.getElementById(`root`)).render((0,R.jsx)(m.StrictMode,{children:(0,R.jsx)(SL,{children:(0,R.jsx)(Al,{reducedMotion:`user`,children:(0,R.jsxs)(_E,{children:[(0,R.jsx)(Yq,{}),(0,R.jsx)(Qq,{})]})})})})),`serviceWorker`in navigator&&window.addEventListener(`load`,()=>{navigator.serviceWorker.register(`/sw.js`,{updateViaCache:`none`}).catch(()=>void 0)});