selftune 0.2.28 → 0.2.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/local-dashboard/dist/assets/index-BcXquWFB.css +1 -0
- package/apps/local-dashboard/dist/assets/index-Coq42hE4.js +15 -0
- package/apps/local-dashboard/dist/assets/vendor-ui-B0H8s1mP.js +1 -0
- package/apps/local-dashboard/dist/index.html +3 -3
- package/cli/selftune/auto-update.ts +40 -8
- package/cli/selftune/command-surface.ts +1 -1
- package/cli/selftune/constants.ts +5 -0
- package/cli/selftune/dashboard-action-events.ts +117 -0
- package/cli/selftune/dashboard-action-instrumentation.ts +103 -0
- package/cli/selftune/dashboard-action-result.ts +90 -0
- package/cli/selftune/dashboard-action-stream.ts +252 -0
- package/cli/selftune/dashboard-contract.ts +81 -1
- package/cli/selftune/dashboard-server.ts +133 -16
- package/cli/selftune/eval/hooks-to-evals.ts +157 -0
- package/cli/selftune/eval/synthetic-evals.ts +33 -2
- package/cli/selftune/eval/unit-test-cli.ts +53 -5
- package/cli/selftune/evolution/validate-host-replay.ts +191 -14
- package/cli/selftune/index.ts +4 -0
- package/cli/selftune/ingestors/opencode-ingest.ts +117 -8
- package/cli/selftune/localdb/schema.ts +34 -0
- package/cli/selftune/routes/actions.ts +273 -42
- package/cli/selftune/testing-readiness.ts +203 -10
- package/cli/selftune/utils/llm-call.ts +90 -1
- package/package.json +1 -1
- package/packages/dashboard-core/src/screens/skill-report/SkillReportDailyBreakdownSection.tsx +1 -1
- package/packages/dashboard-core/src/screens/skill-report/SkillReportScaffold.tsx +1 -5
- package/packages/dashboard-core/src/screens/skill-report/SkillReportTrustBadge.tsx +10 -18
- package/packages/ui/src/components/EvidenceViewer.tsx +15 -142
- package/packages/ui/src/components/EvolutionTimeline.tsx +20 -44
- package/packages/ui/src/components/SkillReportPanels.tsx +1 -4
- package/skill/SKILL.md +1 -1
- package/skill/workflows/Dashboard.md +50 -23
- package/apps/local-dashboard/dist/assets/index-DgY2KGP-.css +0 -1
- package/apps/local-dashboard/dist/assets/index-MMLFlnVn.js +0 -15
- package/apps/local-dashboard/dist/assets/vendor-ui-B3BPIYy7.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,t}from"./rolldown-runtime-Dw2cE7zH.js";import{f as n,p as r,u as i}from"./vendor-react-C5oyHiV1.js";var a=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),o=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),s=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),c=e=>{let t=s(e);return t.charAt(0).toUpperCase()+t.slice(1)},l={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},u=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},d=e(r()),f=(0,d.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:o,iconNode:s,...c},f)=>(0,d.createElement)(`svg`,{ref:f,...l,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:a(`lucide`,i),...!o&&!u(c)&&{"aria-hidden":`true`},...c},[...s.map(([e,t])=>(0,d.createElement)(e,t)),...Array.isArray(o)?o:[o]])),p=(e,t)=>{let n=(0,d.forwardRef)(({className:n,...r},i)=>(0,d.createElement)(f,{ref:i,iconNode:t,className:a(`lucide-${o(c(e))}`,`lucide-${e}`,n),...r}));return n.displayName=c(e),n},m=p(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),h=p(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),g=p(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),_=p(`bolt`,[[`path`,{d:`M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z`,key:`yt0hxn`}],[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}]]),v=p(`brain-circuit`,[[`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`,key:`l5xja`}],[`path`,{d:`M9 13a4.5 4.5 0 0 0 3-4`,key:`10igwf`}],[`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`,key:`105sqy`}],[`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`,key:`ql3yin`}],[`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`,key:`2e4loj`}],[`path`,{d:`M12 13h4`,key:`1ku699`}],[`path`,{d:`M12 18h6a2 2 0 0 1 2 2v1`,key:`105ag5`}],[`path`,{d:`M12 8h8`,key:`1lhi5i`}],[`path`,{d:`M16 8V5a2 2 0 0 1 2-2`,key:`u6izg6`}],[`circle`,{cx:`16`,cy:`13`,r:`.5`,key:`ry7gng`}],[`circle`,{cx:`18`,cy:`3`,r:`.5`,key:`1aiba7`}],[`circle`,{cx:`20`,cy:`21`,r:`.5`,key:`yhc1fs`}],[`circle`,{cx:`20`,cy:`8`,r:`.5`,key:`1e43v0`}]]),y=p(`chart-column`,[[`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`}]]),b=p(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),x=p(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),S=p(`circle-alert`,[[`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`}]]),C=p(`circle-question-mark`,[[`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`}]]),w=p(`eye`,[[`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`}]]),T=p(`git-pull-request`,[[`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`}]]),E=p(`heart-pulse`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}],[`path`,{d:`M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27`,key:`auskq0`}]]),D=p(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),O=p(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),k=p(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),A=p(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),j=p(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),M=p(`play`,[[`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`}]]),N=p(`refresh-cw`,[[`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`}]]),P=p(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),F=p(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),I=p(`settings`,[[`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`}]]),ee=p(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),te=p(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]);function L(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var R={};function z(e,t,n,r,i){let a={...ae(e,R)};return t&&(a=ne(a,t)),n&&(a=ne(a,n)),r&&(a=ne(a,r)),i&&(a=ne(a,i)),a}function B(e){if(e.length===0)return R;if(e.length===1)return ae(e[0],R);let t={...ae(e[0],R)};for(let n=1;n<e.length;n+=1)t=ne(t,e[n]);return t}function ne(e,t){return ie(t)?t(e):re(e,t)}function re(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=L(e.style,r);break;case`className`:e[n]=ce(e.className,r);break;default:V(n,r)?e[n]=oe(e[n],r):e[n]=r}}return e}function V(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function ie(e){return typeof e==`function`}function ae(e,t){return ie(e)?e(t):e??R}function oe(e,t){return t?e?n=>{if(le(n)){let r=n;se(r);let i=t(r);return r.baseUIHandlerPrevented||e?.(r),i}let r=t(n);return e?.(n),r}:t:e}function se(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function ce(e,t){return t?e?t+` `+e:t:e}function le(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function ue(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var H=ue(`https://base-ui.com/production-error`,`Base UI`),de={};function fe(e,t){let n=d.useRef(de);return n.current===de&&(n.current=e(t)),n}function pe(e,t,n,r){let i=fe(he).current;return ge(i,e,t,n,r)&&ve(i,[e,t,n,r]),i.callback}function me(e){let t=fe(he).current;return _e(t,e)&&ve(t,e),t.callback}function he(){return{callback:null,cleanup:null,refs:[]}}function ge(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function _e(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function ve(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break;default:}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break;default:}}}}}}var ye=19;function U(e){return ye>=e}function be(e){if(!d.isValidElement(e))return null;let t=e,n=t.props;return(U(19)?n?.ref:t.ref)??null}function xe(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Se(e,t){return typeof e==`function`?e(t):e}function Ce(e,t){return typeof e==`function`?e(t):e}function we(){}var Te=Object.freeze([]),Ee=Object.freeze({}),De={style:{transition:`none`}},Oe={fallbackAxisSide:`end`};function ke(e,t,n={}){let r=t.render,i=Ae(t,n);return n.enabled===!1?null:Me(e,r,i,n.state??Ee)}function Ae(e,t={}){let{className:n,style:r,render:i}=e,{state:a=Ee,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Se(n,a):void 0,d=l?Ce(r,a):void 0,f=l?xe(a,c):Ee,p=l?L(f,Array.isArray(s)?B(s):s)??Ee:Ee;return typeof document<`u`&&(l?Array.isArray(o)?p.ref=me([p.ref,be(i),...o]):p.ref=pe(p.ref,be(i),o):pe(null,null)),l?(u!==void 0&&(p.className=ce(p.className,u)),d!==void 0&&(p.style=L(p.style,d)),p):Ee}var je=Symbol.for(`react.lazy`);function Me(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=z(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===je&&(i=d.Children.toArray(t)[0]),d.cloneElement(i,e)}if(e&&typeof e==`string`)return Ne(e,n);throw Error(H(8))}function Ne(e,t){return e===`button`?(0,d.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,d.createElement)(`img`,{alt:``,...t,key:t.key}):d.createElement(e,t)}function Pe(e){return ke(e.defaultTagName??`div`,e,e)}function Fe(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=Fe(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Ie(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Fe(e))&&(r&&(r+=` `),r+=t);return r}var Le=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Re=Ie,ze=(e,t)=>n=>{if(t?.variants==null)return Re(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=Le(t)||Le(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 Re(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)},Be=(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},Ve=(e,t)=>({classGroupId:e,validator:t}),He=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ue=`-`,We=[],Ge=`arbitrary..`,Ke=e=>{let t=Ye(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Je(e);let n=e.split(Ue);return qe(n,n[0]===``&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Be(i,t):t:i||We}return n[e]||We}}},qe=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=qe(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Ue):e.slice(t).join(Ue),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Je=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?Ge+r:void 0})(),Ye=e=>{let{theme:t,classGroups:n}=e;return Xe(n,t)},Xe=(e,t)=>{let n=He();for(let r in e){let i=e[r];Ze(i,n,r,t)}return n},Ze=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Qe(i,t,n,r)}},Qe=(e,t,n,r)=>{if(typeof e==`string`){$e(e,t,n);return}if(typeof e==`function`){et(e,t,n,r);return}tt(e,t,n,r)},$e=(e,t,n)=>{let r=e===``?t:nt(t,e);r.classGroupId=n},et=(e,t,n,r)=>{if(rt(e)){Ze(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Ve(n,e))},tt=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Ze(o,nt(t,a),n,r)}},nt=(e,t)=>{let n=e,r=t.split(Ue),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=He(),n.nextPart.set(t,i)),n=i}return n},rt=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,it=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)}}},at=`!`,ot=`:`,st=[],ct=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),lt=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===ot){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(at)?(c=s.slice(0,-1),l=!0):s.startsWith(at)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return ct(t,l,c,u)};if(t){let e=t+ot,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):ct(st,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},ut=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}},dt=e=>({cache:it(e.cacheSize),parseClassName:lt(e),sortModifiers:ut(e),...Ke(e)}),ft=/\s+/,pt=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(ft),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+at:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},mt=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=ht(n))&&(i&&(i+=` `),i+=r);return i},ht=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=ht(e[r]))&&(n&&(n+=` `),n+=t);return n},gt=(e,...t)=>{let n,r,i,a,o=o=>(n=dt(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=pt(e,n);return i(e,a),a};return a=o,(...e)=>a(mt(...e))},_t=[],vt=e=>{let t=t=>t[e]||_t;return t.isThemeGetter=!0,t},yt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,bt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xt=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,St=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ct=/\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$/,wt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Tt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Et=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dt=e=>xt.test(e),W=e=>!!e&&!Number.isNaN(Number(e)),Ot=e=>!!e&&Number.isInteger(Number(e)),kt=e=>e.endsWith(`%`)&&W(e.slice(0,-1)),At=e=>St.test(e),jt=()=>!0,Mt=e=>Ct.test(e)&&!wt.test(e),Nt=()=>!1,Pt=e=>Tt.test(e),Ft=e=>Et.test(e),It=e=>!G(e)&&!K(e),Lt=e=>Qt(e,nn,Nt),G=e=>yt.test(e),Rt=e=>Qt(e,rn,Mt),zt=e=>Qt(e,an,W),Bt=e=>Qt(e,sn,jt),Vt=e=>Qt(e,on,Nt),Ht=e=>Qt(e,en,Nt),Ut=e=>Qt(e,tn,Ft),Wt=e=>Qt(e,cn,Pt),K=e=>bt.test(e),Gt=e=>$t(e,rn),Kt=e=>$t(e,on),qt=e=>$t(e,en),Jt=e=>$t(e,nn),Yt=e=>$t(e,tn),Xt=e=>$t(e,cn,!0),Zt=e=>$t(e,sn,!0),Qt=(e,t,n)=>{let r=yt.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},$t=(e,t,n=!1)=>{let r=bt.exec(e);return r?r[1]?t(r[1]):n:!1},en=e=>e===`position`||e===`percentage`,tn=e=>e===`image`||e===`url`,nn=e=>e===`length`||e===`size`||e===`bg-size`,rn=e=>e===`length`,an=e=>e===`number`,on=e=>e===`family-name`,sn=e=>e===`number`||e===`weight`,cn=e=>e===`shadow`,ln=gt(()=>{let e=vt(`color`),t=vt(`font`),n=vt(`text`),r=vt(`font-weight`),i=vt(`tracking`),a=vt(`leading`),o=vt(`breakpoint`),s=vt(`container`),c=vt(`spacing`),l=vt(`radius`),u=vt(`shadow`),d=vt(`inset-shadow`),f=vt(`text-shadow`),p=vt(`drop-shadow`),m=vt(`blur`),h=vt(`perspective`),g=vt(`aspect`),_=vt(`ease`),v=vt(`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=()=>[Dt,`full`,`auto`,...w()],E=()=>[Ot,`none`,`subgrid`,K,G],D=()=>[`auto`,{span:[`full`,Ot,K,G]},Ot,K,G],O=()=>[Ot,`auto`,K,G],k=()=>[`auto`,`min`,`max`,`fr`,K,G],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[Dt,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[Dt,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[Dt,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,K,G],ee=()=>[...b(),qt,Ht,{position:[K,G]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],L=()=>[`auto`,`cover`,`contain`,Jt,Lt,{size:[K,G]}],R=()=>[kt,Gt,Rt],z=()=>[``,`none`,`full`,l,K,G],B=()=>[``,W,Gt,Rt],ne=()=>[`solid`,`dashed`,`dotted`,`double`],re=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],V=()=>[W,kt,qt,Ht],ie=()=>[``,`none`,m,K,G],ae=()=>[`none`,W,K,G],oe=()=>[`none`,W,K,G],se=()=>[W,K,G],ce=()=>[Dt,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[At],breakpoint:[At],color:[jt],container:[At],"drop-shadow":[At],ease:[`in`,`out`,`in-out`],font:[It],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[At],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[At],shadow:[At],spacing:[`px`,W],text:[At],"text-shadow":[At],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Dt,G,K,g]}],container:[`container`],columns:[{columns:[W,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:[Ot,`auto`,K,G]}],basis:[{basis:[Dt,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[W,Dt,`auto`,`initial`,`none`,G]}],grow:[{grow:[``,W,K,G]}],shrink:[{shrink:[``,W,K,G]}],order:[{order:[Ot,`first`,`last`,`none`,K,G]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,Gt,Rt]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Zt,Bt]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,kt,G]}],"font-family":[{font:[Kt,Vt,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,zt]}],leading:[{leading:[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:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ne(),`wavy`]}],"text-decoration-thickness":[{decoration:[W,`from-font`,`auto`,K,Rt]}],"text-decoration-color":[{decoration:I()}],"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()}],"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:ee()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:L()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Ot,K,G],radial:[``,K,G],conic:[Ot,K,G]},Yt,Ut]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:R()}],"gradient-via-pos":[{via:R()}],"gradient-to-pos":[{to:R()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-bs":[{"border-bs":B()}],"border-w-be":[{"border-be":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":B()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ne(),`hidden`,`none`]}],"divide-style":[{divide:[...ne(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ne(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[W,K,G]}],"outline-w":[{outline:[``,W,Gt,Rt]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,Xt,Wt]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,Xt,Wt]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:B()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[W,Rt]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,Xt,Wt]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[W,K,G]}],"mix-blend":[{"mix-blend":[...re(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":re()}],"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":V()}],"mask-image-linear-to-pos":[{"mask-linear-to":V()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":V()}],"mask-image-t-to-pos":[{"mask-t-to":V()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":V()}],"mask-image-r-to-pos":[{"mask-r-to":V()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":V()}],"mask-image-b-to-pos":[{"mask-b-to":V()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":V()}],"mask-image-l-to-pos":[{"mask-l-to":V()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":V()}],"mask-image-x-to-pos":[{"mask-x-to":V()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":V()}],"mask-image-y-to-pos":[{"mask-y-to":V()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[K,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":V()}],"mask-image-radial-to-pos":[{"mask-radial-to":V()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[W]}],"mask-image-conic-from-pos":[{"mask-conic-from":V()}],"mask-image-conic-to-pos":[{"mask-conic-to":V()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,K,G]}],filter:[{filter:[``,`none`,K,G]}],blur:[{blur:ie()}],brightness:[{brightness:[W,K,G]}],contrast:[{contrast:[W,K,G]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Xt,Wt]}],"drop-shadow-color":[{"drop-shadow":I()}],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":ie()}],"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:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":[`scale-3d`],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[K,G,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":[`translate-none`],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,K,G]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"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`,...I()]}],"stroke-w":[{stroke:[W,Gt,Rt,zt]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{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":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`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-r`,`border-w-l`],"border-w-y":[`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-r`,`border-color-l`],"border-color-y":[`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-mr`,`scroll-ml`],"scroll-my":[`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-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function un(){return typeof window<`u`}function dn(e){return mn(e)?(e.nodeName||``).toLowerCase():`#document`}function fn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pn(e){return((mn(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function mn(e){return un()?e instanceof Node||e instanceof fn(e).Node:!1}function q(e){return un()?e instanceof Element||e instanceof fn(e).Element:!1}function hn(e){return un()?e instanceof HTMLElement||e instanceof fn(e).HTMLElement:!1}function gn(e){return!un()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof fn(e).ShadowRoot}function _n(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=On(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function vn(e){return/^(table|td|th)$/.test(dn(e))}function yn(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var bn=/transform|translate|scale|rotate|perspective|filter/,xn=/paint|layout|strict|content/,Sn=e=>!!e&&e!==`none`,Cn;function wn(e){let t=q(e)?On(e):e;return Sn(t.transform)||Sn(t.translate)||Sn(t.scale)||Sn(t.rotate)||Sn(t.perspective)||!En()&&(Sn(t.backdropFilter)||Sn(t.filter))||bn.test(t.willChange||``)||xn.test(t.contain||``)}function Tn(e){let t=An(e);for(;hn(t)&&!Dn(t);){if(wn(t))return t;if(yn(t))return null;t=An(t)}return null}function En(){return Cn??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Cn}function Dn(e){return/^(html|body|#document)$/.test(dn(e))}function On(e){return fn(e).getComputedStyle(e)}function kn(e){return q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function An(e){if(dn(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||gn(e)&&e.host||pn(e);return gn(t)?t.host:t}function jn(e){let t=An(e);return Dn(t)?e.ownerDocument?e.ownerDocument.body:e.body:hn(t)&&_n(t)?t:jn(t)}function Mn(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=jn(e),i=r===e.ownerDocument?.body,a=fn(r);if(i){let e=Nn(a);return t.concat(a,a.visualViewport||[],_n(r)?r:[],e&&n?Mn(e):[])}else return t.concat(r,Mn(r,[],n))}function Nn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Pn=d[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Fn=Pn&&Pn!==d.useLayoutEffect?Pn:e=>e();function J(e){let t=fe(In).current;return t.next=e,Fn(t.effect),t.trampoline}function In(){let e={next:void 0,callback:Ln,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Ln(){}var Rn={...d},Y=typeof document<`u`?d.useLayoutEffect:()=>{},zn=d.createContext(void 0);function Bn(e=!1){let t=d.useContext(zn);if(t===void 0&&!e)throw Error(H(16));return t}function Vn(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:d.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function Hn(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=d.useRef(null),s=Bn(!0),c=a??s!==void 0,{props:l}=Vn({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=d.useCallback(()=>{let e=o.current;Un(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return Y(u,[u]),{getButtonProps:d.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return z({type:i?`button`:void 0,onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(se(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,a=e.currentTarget,s=Un(a),l=!i&&Wn(a),u=r&&(i?s:!l),d=e.key===`Enter`,f=e.key===` `,p=a.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&c&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),l||i&&s?(a.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler());return}u&&(!i&&(f||d)&&e.preventDefault(),!i&&d&&n?.(e))},onKeyUp(e){if(!t){if(se(e),a?.(e),e.target===e.currentTarget&&i&&c&&Un(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&e.key===` `&&n?.(e)}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?void 0:{role:`button`},l,u)},[t,l,c,i]),buttonRef:J(e=>{o.current=e,u()})}}function Un(e){return hn(e)&&e.tagName===`BUTTON`}function Wn(e){return!!(e?.tagName===`A`&&e?.href)}var Gn=d.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,...s}=e,{getButtonProps:c,buttonRef:l}=Hn({disabled:i,focusableWhenDisabled:a,native:o});return ke(`button`,e,{state:{disabled:i},ref:[t,l],props:[s,c]})});function Kn({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=d.useRef(e!==void 0),[a,o]=d.useState(t);return[i?e:a,d.useCallback(e=>{i||o(e)},[])]}var qn={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Jn={...qn,position:`fixed`,top:0,left:0},Yn={...qn,position:`absolute`},Xn={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Zn={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Qn={disabled:!1,...Zn},$n=0;function er(e,t=`mui`){let[n,r]=d.useState(e),i=e||n;return d.useEffect(()=>{n??($n+=1,r(`${t}-${$n}`))},[n,t]),i}var tr=Rn.useId;function nr(e,t){if(tr!==void 0){let n=tr();return e??(t?`${t}-${n}`:n)}return er(e,t)}function rr(e){return nr(e,`base-ui`)}var ir=d.createContext({invalid:void 0,name:void 0,validityData:{state:Xn,errors:[],error:``,value:``,initialValue:null},setValidityData:we,disabled:void 0,touched:Zn.touched,setTouched:we,dirty:Zn.dirty,setDirty:we,filled:Zn.filled,setFilled:we,focused:Zn.focused,setFocused:we,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:Qn,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Ee)=>e,getInputValidationProps:(e=Ee)=>e,inputRef:{current:null},commit:async()=>{}}});function ar(e=!0){let t=d.useContext(ir);if(t.setValidityData===we&&!e)throw Error(H(28));return t}function or(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}var sr=d.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:we,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function cr(){return d.useContext(sr)}var lr=e(n());function ur(e){let{enabled:t=!0,value:n,id:r,name:i,controlRef:a,commit:o}=e,{formRef:s}=cr(),{invalid:c,markedDirtyRef:l,validityData:u,setValidityData:d}=ar(),f=J(e.getValue);Y(()=>{if(!t)return;let e=n;e===void 0&&(e=f()),u.initialValue===null&&e!==null&&d(t=>({...t,initialValue:e}))},[t,d,n,u.initialValue,f]),Y(()=>{!t||!r||s.current.fields.set(r,{getValue:f,name:i,controlRef:a,validityData:or(u,c),validate(e=!0){let t=n;t===void 0&&(t=f()),l.current=!0,e?lr.flushSync(()=>o(t)):o(t)}})},[o,a,t,s,f,r,c,l,i,u,n]),Y(()=>{let e=s.current.fields;return()=>{r&&e.delete(r)}},[s,r])}var dr=d.createContext({controlId:void 0,registerControlId:we,labelId:void 0,setLabelId:we,messageIds:[],setMessageIds:we,getDescriptionProps:e=>e});function fr(){return d.useContext(dr)}var pr=`none`,mr=`trigger-press`,hr=`trigger-hover`,gr=`trigger-focus`,_r=`outside-press`,vr=`focus-out`,yr=`escape-key`,br=`list-navigation`,xr=`disabled`,Sr=`imperative-action`;function X(e,t,n,r){let i=!1,a=!1,o=r??Ee;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function Cr(e,t){let n=d.useRef(e),r=J(t);Y(()=>{n.current!==e&&r(n.current)},[e,r]),Y(()=>{n.current=e},[e])}var wr=[];function Tr(e){d.useEffect(e,wr)}var Er=null;globalThis.requestAnimationFrame;var Dr=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},Or=class e{static create(){return new e}static request(e){return Dr.request(e)}static cancel(e){return Dr.cancel(e)}currentId=Er;request(e){this.cancel(),this.currentId=Dr.request(()=>{this.currentId=Er,e()})}cancel=()=>{this.currentId!==Er&&(Dr.cancel(this.currentId),this.currentId=Er)};disposeEffect=()=>this.cancel};function kr(){let e=fe(Or.create).current;return Tr(e.disposeEffect),e}function Ar(e){return e==null?e:`current`in e?e.current:e}var jr=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),Mr={[jr.startingStyle]:``},Nr={[jr.endingStyle]:``},Pr={transitionStatus(e){return e===`starting`?Mr:e===`ending`?Nr:null}};function Fr(e,t=!1,n=!0){let r=kr();return J((i,a=null)=>{r.cancel();function o(){lr.flushSync(i)}let s=Ar(e);if(s==null)return;let c=s;if(typeof c.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{function e(){let e=jr.startingStyle;if(!c.hasAttribute(e)){r.request(i);return}let t=new MutationObserver(()=>{c.hasAttribute(e)||(t.disconnect(),i())});t.observe(c,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}function i(){Promise.all(c.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||o()}).catch(()=>{let e=c.getAnimations();if(n){if(a?.aborted)return;o()}else e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&i()})}if(t){e();return}r.request(i)}})}function Ir(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=J(i),o=Fr(r,n,!1);d.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}function Lr(e,t=!1,n=!1){let[r,i]=d.useState(e&&t?`idle`:void 0),[a,o]=d.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),Y(()=>{if(!e&&a&&r!==`ending`&&n){let e=Or.request(()=>{i(`ending`)});return()=>{Or.cancel(e)}}},[e,a,r,n]),Y(()=>{if(!e||t)return;let n=Or.request(()=>{i(void 0)});return()=>{Or.cancel(n)}},[t,e]),Y(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=Or.request(()=>{i(`idle`)});return()=>{Or.cancel(n)}},[t,e,a,i,r]),d.useMemo(()=>({mounted:a,setMounted:o,transitionStatus:r}),[a,r])}var Rr=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),zr=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Br=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Vr=e=>{let t=Br(e);return t.charAt(0).toUpperCase()+t.slice(1)},Hr={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Ur=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Wr=(0,d.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,d.createElement)(`svg`,{ref:c,...Hr,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Rr(`lucide`,i),...!a&&!Ur(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,d.createElement)(e,t)),...Array.isArray(a)?a:[a]])),Z=(e,t)=>{let n=(0,d.forwardRef)(({className:n,...r},i)=>(0,d.createElement)(Wr,{ref:i,iconNode:t,className:Rr(`lucide-${zr(Vr(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Vr(e),n},Gr=Z(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),Kr=Z(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),qr=Z(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Jr=Z(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),Yr=Z(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),Xr=Z(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),Zr=Z(`brain-circuit`,[[`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`,key:`l5xja`}],[`path`,{d:`M9 13a4.5 4.5 0 0 0 3-4`,key:`10igwf`}],[`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`,key:`105sqy`}],[`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`,key:`ql3yin`}],[`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`,key:`2e4loj`}],[`path`,{d:`M12 13h4`,key:`1ku699`}],[`path`,{d:`M12 18h6a2 2 0 0 1 2 2v1`,key:`105ag5`}],[`path`,{d:`M12 8h8`,key:`1lhi5i`}],[`path`,{d:`M16 8V5a2 2 0 0 1 2-2`,key:`u6izg6`}],[`circle`,{cx:`16`,cy:`13`,r:`.5`,key:`ry7gng`}],[`circle`,{cx:`18`,cy:`3`,r:`.5`,key:`1aiba7`}],[`circle`,{cx:`20`,cy:`21`,r:`.5`,key:`yhc1fs`}],[`circle`,{cx:`20`,cy:`8`,r:`.5`,key:`1e43v0`}]]),Qr=Z(`chart-column`,[[`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`}]]),$r=Z(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ei=Z(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ti=Z(`circle-alert`,[[`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`}]]),ni=Z(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),ri=Z(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),ii=Z(`circle-dot`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]),ai=Z(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),oi=Z(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),si=Z(`download`,[[`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`}]]),ci=Z(`eye`,[[`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`}]]),li=Z(`file-text`,[[`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`}]]),ui=Z(`flask-conical`,[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]),di=Z(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),fi=Z(`git-branch`,[[`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`}]]),pi=Z(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),mi=Z(`heart-pulse`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}],[`path`,{d:`M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27`,key:`auskq0`}]]),hi=Z(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),gi=Z(`list-checks`,[[`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`}]]),_i=Z(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),vi=Z(`octagon-x`,[[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z`,key:`2d38gg`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),yi=Z(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),bi=Z(`refresh-cw`,[[`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`}]]),xi=Z(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),Si=Z(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Ci=Z(`settings`,[[`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`}]]),wi=Z(`shield-alert`,[[`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:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),Ti=Z(`shield-check`,[[`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`}]]),Ei=Z(`square-terminal`,[[`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`}]]),Di=Z(`target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),Oi=Z(`trending-down`,[[`path`,{d:`M16 17h6v-6`,key:`t6n2it`}],[`path`,{d:`m22 17-8.5-8.5-5 5L2 7`,key:`x473p`}]]),ki=Z(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),Ai=Z(`triangle-alert`,[[`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`}]]),ji=Z(`waypoints`,[[`path`,{d:`m10.586 5.414-5.172 5.172`,key:`4mc350`}],[`path`,{d:`m18.586 13.414-5.172 5.172`,key:`8c96vv`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`circle`,{cx:`12`,cy:`20`,r:`2`,key:`144qzu`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}],[`circle`,{cx:`20`,cy:`12`,r:`2`,key:`1xzzfp`}],[`circle`,{cx:`4`,cy:`12`,r:`2`,key:`1hvhnz`}]]),Mi=Z(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function Ni(e){let{open:t,defaultOpen:n,onOpenChange:r,disabled:i}=e,a=t!==void 0,[o,s]=Kn({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:c,setMounted:l,transitionStatus:u}=Lr(o,!0,!0),[f,p]=d.useState(o),[{height:m,width:h},g]=d.useState({height:void 0,width:void 0}),_=rr(),[v,y]=d.useState(),b=v??_,[x,S]=d.useState(!1),[C,w]=d.useState(!1),T=d.useRef(null),E=d.useRef(null),D=d.useRef(null),O=d.useRef(null),k=Fr(O,!1),A=J(e=>{let t=!o,n=X(mr,e.nativeEvent);if(r(t,n),n.isCanceled)return;let i=O.current;E.current===`css-animation`&&i!=null&&i.style.removeProperty(`animation-name`),!x&&!C&&(E.current!=null&&E.current!==`css-animation`&&!c&&t&&l(!0),E.current===`css-animation`&&(!f&&t&&p(!0),!c&&t&&l(!0))),s(t),E.current===`none`&&c&&!t&&l(!1)});return Y(()=>{a&&E.current===`none`&&!C&&!o&&l(!1)},[a,C,o,t,l]),d.useMemo(()=>({abortControllerRef:T,animationTypeRef:E,disabled:i,handleTrigger:A,height:m,mounted:c,open:o,panelId:b,panelRef:O,runOnceAnimationsFinish:k,setDimensions:g,setHiddenUntilFound:S,setKeepMounted:w,setMounted:l,setOpen:s,setPanelIdState:y,setVisible:p,transitionDimensionRef:D,transitionStatus:u,visible:f,width:h}),[T,E,i,A,m,c,o,b,O,k,g,S,w,l,s,p,D,u,f,h])}var Pi=d.createContext(void 0);function Fi(){let e=d.useContext(Pi);if(e===void 0)throw Error(H(15));return e}var Ii=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=jr.startingStyle]=`startingStyle`,e[e.endingStyle=jr.endingStyle]=`endingStyle`,e}({}),Li=function(e){return e.panelOpen=`data-panel-open`,e}({}),Ri={[Ii.open]:``},zi={[Ii.closed]:``},Bi={open(e){return e?{[Li.panelOpen]:``}:null}},Vi={open(e){return e?Ri:zi},...Pr},Hi=i(),Ui=d.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,...c}=e,l=J(o),u=Ni({open:s,defaultOpen:i,onOpenChange:l,disabled:a}),f=d.useMemo(()=>({open:u.open,disabled:u.disabled,transitionStatus:u.transitionStatus}),[u.open,u.disabled,u.transitionStatus]),p=d.useMemo(()=>({...u,onOpenChange:l,state:f}),[u,l,f]),m=ke(`div`,e,{state:f,ref:t,props:c,stateAttributesMapping:Vi});return(0,Hi.jsx)(Pi.Provider,{value:p,children:m})}),Wi={...Bi,...Pr},Gi=d.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=Fi(),{className:s,disabled:c=o,id:l,render:u,nativeButton:f=!0,...p}=e,{getButtonProps:m,buttonRef:h}=Hn({disabled:c,focusableWhenDisabled:!0,native:f}),g=d.useMemo(()=>({"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i}),[n,r,i]);return ke(`button`,e,{state:a,ref:[t,h],props:[g,p,m],stateAttributesMapping:Wi})}),Ki=function(e){return e.disabled=`data-disabled`,e.orientation=`data-orientation`,e}({});function qi(e){let{abortControllerRef:t,animationTypeRef:n,externalRef:r,height:i,hiddenUntilFound:a,keepMounted:o,id:s,mounted:c,onOpenChange:l,open:u,panelRef:f,runOnceAnimationsFinish:p,setDimensions:m,setMounted:h,setOpen:g,setVisible:_,transitionDimensionRef:v,visible:y,width:b}=e,x=d.useRef(!1),S=d.useRef(null),C=d.useRef(u),w=d.useRef(u),T=kr(),E=d.useMemo(()=>n.current===`css-animation`?!y:!u&&!c,[u,c,y,n]),D=pe(r,f,J(e=>{if(!e)return;if(n.current==null||v.current==null){let t=getComputedStyle(e),r=t.animationName!==`none`&&t.animationName!==``,i=t.transitionDuration!==`0s`&&t.transitionDuration!==``;r&&i||(t.animationName===`none`&&t.transitionDuration!==`0s`?n.current=`css-transition`:t.animationName!==`none`&&t.transitionDuration===`0s`?n.current=`css-animation`:n.current=`none`),e.getAttribute(Ki.orientation)===`horizontal`||t.transitionProperty.indexOf(`width`)>-1?v.current=`width`:v.current=`height`}if(n.current!==`css-transition`)return;(i===void 0||b===void 0)&&(m({height:e.scrollHeight,width:e.scrollWidth}),w.current&&e.style.setProperty(`transition-duration`,`0s`));let t=-1,r=-1;return t=Or.request(()=>{w.current=!1,r=Or.request(()=>{setTimeout(()=>{e.style.removeProperty(`transition-duration`)})})}),()=>{Or.cancel(t),Or.cancel(r)}}));return Y(()=>{if(n.current!==`css-transition`)return;let e=f.current;if(!e)return;let r=-1;if(t.current!=null&&(t.current.abort(),t.current=null),u){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)}),!w.current&&!o&&e.setAttribute(Ii.startingStyle,``),m({height:e.scrollHeight,width:e.scrollWidth}),r=Or.request(()=>{Object.entries(t).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})})}else{if(e.scrollHeight===0&&e.scrollWidth===0)return;m({height:e.scrollHeight,width:e.scrollWidth});let n=new AbortController;t.current=n;let r=n.signal,i=null,a=Ii.endingStyle;return i=new MutationObserver(o=>{o.some(e=>e.type===`attributes`&&e.attributeName===a)&&(i?.disconnect(),i=null,p(()=>{m({height:0,width:0}),e.style.removeProperty(`content-visibility`),h(!1),t.current===n&&(t.current=null)},r))}),i.observe(e,{attributes:!0,attributeFilter:[a]}),()=>{i?.disconnect(),T.cancel(),t.current===n&&(n.abort(),t.current=null)}}return()=>{Or.cancel(r)}},[t,n,T,a,o,c,u,f,p,m,h]),Y(()=>{if(n.current!==`css-animation`)return;let e=f.current;e&&(S.current=e.style.animationName||S.current,e.style.setProperty(`animation-name`,`none`),m({height:e.scrollHeight,width:e.scrollWidth}),!C.current&&!x.current&&e.style.removeProperty(`animation-name`),u?(t.current!=null&&(t.current.abort(),t.current=null),h(!0),_(!0)):(t.current=new AbortController,p(()=>{h(!1),_(!1),t.current=null},t.current.signal)))},[t,n,u,f,p,m,h,_,y]),Tr(()=>{let e=Or.request(()=>{C.current=!1});return()=>Or.cancel(e)}),Y(()=>{if(!a)return;let e=f.current;if(!e)return;let t=-1,n=-1;return u&&x.current&&(e.style.transitionDuration=`0s`,m({height:e.scrollHeight,width:e.scrollWidth}),t=Or.request(()=>{x.current=!1,n=Or.request(()=>{setTimeout(()=>{e.style.removeProperty(`transition-duration`)})})})),()=>{Or.cancel(t),Or.cancel(n)}},[a,u,f,m]),Y(()=>{let e=f.current;e&&a&&E&&(e.setAttribute(`hidden`,`until-found`),n.current===`css-transition`&&e.setAttribute(Ii.startingStyle,``))},[a,E,n,f]),d.useEffect(function(){let e=f.current;if(!e)return;function t(e){x.current=!0,g(!0),l(!0,X(pr,e))}return e.addEventListener(`beforematch`,t),()=>{e.removeEventListener(`beforematch`,t)}},[l,f,g]),d.useMemo(()=>({props:{hidden:E,id:s,ref:D}}),[E,s,D])}var Ji=function(e){return e.collapsiblePanelHeight=`--collapsible-panel-height`,e.collapsiblePanelWidth=`--collapsible-panel-width`,e}({}),Yi=d.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,...s}=e,{abortControllerRef:c,animationTypeRef:l,height:u,mounted:f,onOpenChange:p,open:m,panelId:h,panelRef:g,runOnceAnimationsFinish:_,setDimensions:v,setHiddenUntilFound:y,setKeepMounted:b,setMounted:x,setPanelIdState:S,setOpen:C,setVisible:w,state:T,transitionDimensionRef:E,visible:D,width:O,transitionStatus:k}=Fi(),A=r??!1,j=i??!1;Y(()=>{if(o)return S(o),()=>{S(void 0)}},[o,S]),Y(()=>{y(A)},[y,A]),Y(()=>{b(j)},[b,j]);let{props:M}=qi({abortControllerRef:c,animationTypeRef:l,externalRef:t,height:u,hiddenUntilFound:A,id:h,keepMounted:j,mounted:f,onOpenChange:p,open:m,panelRef:g,runOnceAnimationsFinish:_,setDimensions:v,setMounted:x,setOpen:C,setVisible:w,transitionDimensionRef:E,visible:D,width:O});Ir({open:m&&k===`idle`,ref:g,onComplete(){m&&v({height:void 0,width:void 0})}});let N=ke(`div`,e,{state:d.useMemo(()=>({...T,transitionStatus:k}),[T,k]),ref:[t,g],props:[M,{style:{[Ji.collapsiblePanelHeight]:u===void 0?`auto`:`${u}px`,[Ji.collapsiblePanelWidth]:O===void 0?`auto`:`${O}px`}},s],stateAttributesMapping:Vi});return j||A||!j&&f?N:null}),Xi=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=jr.startingStyle]=`startingStyle`,e[e.endingStyle=jr.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),Zi=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({}),Qi={[Zi.popupOpen]:``};Zi.popupOpen,Zi.pressed;var $i={[Xi.open]:``},ea={[Xi.closed]:``},ta={[Xi.anchorHidden]:``},na={open(e){return e?Qi:null}},ra={open(e){return e?$i:ea},anchorHidden(e){return e?ta:null}},ia=typeof navigator<`u`,aa=pa(),oa=ha(),sa=ma();typeof CSS>`u`||!CSS.supports||CSS.supports(`-webkit-backdrop-filter:none`);var ca=aa.platform===`MacIntel`&&aa.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(aa.platform);ia&&/firefox/i.test(sa);var la=ia&&/apple/i.test(navigator.vendor);ia&&/Edg/i.test(sa);var ua=ia&&/android/i.test(oa)||/android/i.test(sa),da=ia&&oa.toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints,fa=sa.includes(`jsdom/`);function pa(){if(!ia)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function ma(){if(!ia)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function ha(){if(!ia)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}var ga=d.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function _a(){return d.useContext(ga)}var va=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({});function ya(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:f}=_a(),p=d.useRef(-1),[m,h]=d.useState(a??(i===va.GuessFromOrder?()=>{if(p.current===-1){let e=f.current;f.current+=1,p.current=e}return p.current}:-1)),g=d.useRef(null),_=d.useCallback(e=>{if(g.current=e,m!==-1&&e!==null&&(l.current[m]=e,u)){let n=t!==void 0;u.current[m]=n?t:r?.current?.textContent??e.textContent}},[m,l,u,t,r]);return Y(()=>{if(a!=null)return;let e=g.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),Y(()=>{if(a==null)return c(e=>{let t=g.current?e.get(g.current)?.index:null;t!=null&&h(t)})},[a,c,h]),d.useMemo(()=>({ref:_,index:m}),[m,_])}var ba=0,xa=class e{static create(){return new e}currentId=ba;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ba,t()},e)}isStarted(){return this.currentId!==ba}clear=()=>{this.currentId!==ba&&(clearTimeout(this.currentId),this.currentId=ba)};disposeEffect=()=>this.clear};function Sa(){let e=fe(xa.create).current;return Tr(e.disposeEffect),e}var Ca=`data-base-ui-focusable`,wa=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,Ta=`ArrowLeft`,Ea=`ArrowRight`,Da=`ArrowUp`,Oa=`ArrowDown`;function ka(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Aa(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&gn(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ja(e,t){if(!q(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(Aa(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function Ma(e){return`composedPath`in e?e.composedPath()[0]:e.target}function Na(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Pa(e){return e.matches(`html,body`)}function Fa(e){return hn(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Ia(e){return e?e.getAttribute(`role`)===`combobox`&&Fa(e):!1}function La(e){if(!e||fa)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Ra(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function za(e,t,n=!0){return e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...za(e,t.id,n)])}function Ba(e){e.preventDefault(),e.stopPropagation()}function Va(e){return`nativeEvent`in e}function Ha(e){return e.pointerType===``&&e.isTrusted?!0:ua&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Ua(e){return fa?!1:!ua&&e.width===0&&e.height===0||ua&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Wa(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Ga(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var Ka=[`top`,`right`,`bottom`,`left`],qa=Math.min,Ja=Math.max,Ya=Math.round,Xa=Math.floor,Za=e=>({x:e,y:e}),Qa={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function $a(e,t,n){return Ja(e,qa(t,n))}function eo(e,t){return typeof e==`function`?e(t):e}function to(e){return e.split(`-`)[0]}function no(e){return e.split(`-`)[1]}function ro(e){return e===`x`?`y`:`x`}function io(e){return e===`y`?`height`:`width`}function ao(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function oo(e){return ro(ao(e))}function so(e,t,n){n===void 0&&(n=!1);let r=no(e),i=oo(e),a=io(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=_o(o)),[o,_o(o)]}function co(e){let t=_o(e);return[lo(e),t,lo(t)]}function lo(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var uo=[`left`,`right`],fo=[`right`,`left`],po=[`top`,`bottom`],mo=[`bottom`,`top`];function ho(e,t,n){switch(e){case`top`:case`bottom`:return n?t?fo:uo:t?uo:fo;case`left`:case`right`:return t?po:mo;default:return[]}}function go(e,t,n,r){let i=no(e),a=ho(to(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(lo)))),a}function _o(e){let t=to(e);return Qa[t]+e.slice(t.length)}function vo(e){return{top:0,right:0,bottom:0,left:0,...e}}function yo(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:vo(e)}function bo(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 xo(e,t,n){return Math.floor(e/t)!==n}function So(e,t){return t<0||t>=e.current.length}function Co(e,t){return To(e,{disabledIndices:t})}function wo(e,t){return To(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function To(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.current.length-1&&Ao(e,a,r));return a}function Eo(e,{event:t,orientation:n,loopFocus:r,rtl:i,cols:a,disabledIndices:o,minIndex:s,maxIndex:c,prevIndex:l,stopEvent:u=!1}){let d=l,f;if(t.key===`ArrowUp`?f=`up`:t.key===`ArrowDown`&&(f=`down`),f){let n=[],i=[],p=!1,m=0;{let t=null,r=-1;e.current.forEach((e,a)=>{if(e==null)return;m+=1;let o=e.closest(`[role="row"]`);o&&(p=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(a),i[a]=r})}let h=!1,g=0;if(p)for(let e of n){let t=e.length;t>g&&(g=t),t!==a&&(h=!0)}let _=h&&m<e.current.length,v=g||a,y=t=>{if(!h||l===-1)return;let a=i[l];if(a==null)return;let s=n[a].indexOf(l),c=t===`up`?-1:1;for(let t=a+c,i=0;i<n.length;i+=1,t+=c){if(t<0||t>=n.length){if(!r||_)return;t=t<0?n.length-1:0}let i=n[t];for(let t=Math.min(s,i.length-1);t>=0;--t){let n=i[t];if(!Ao(e,n,o))return n}}},b=t=>{if(!_||l===-1)return;let n=l%v,i=t===`up`?-v:v,a=c-c%v,s=Xa(c/v)+1;for(let t=l-n+i,u=0;u<s;u+=1,t+=i){if(t<0||t>c){if(!r)return;t=t<0?a:0}let i=Math.min(t+v-1,c);for(let r=Math.min(t+n,i);r>=t;--r)if(!Ao(e,r,o))return r}};u&&Ba(t);let x=y(f)??b(f);if(x!==void 0)d=x;else if(l===-1)d=f===`up`?c:s;else if(d=To(e,{startingIndex:l,amount:v,decrement:f===`up`,disabledIndices:o}),r){if(f===`up`&&(l-v<s||d<0)){let e=l%v,t=c%v,n=c-(t-e);d=t===e?c:t>e?n:n-v}f===`down`&&l+v>c&&(d=To(e,{startingIndex:l%v-v,amount:v,disabledIndices:o}))}So(e,d)&&(d=l)}if(n===`both`){let n=Xa(l/a);t.key===(i?`ArrowLeft`:`ArrowRight`)&&(u&&Ba(t),l%a===a-1?r&&(d=To(e,{startingIndex:l-l%a-1,disabledIndices:o})):(d=To(e,{startingIndex:l,disabledIndices:o}),r&&xo(d,a,n)&&(d=To(e,{startingIndex:l-l%a-1,disabledIndices:o}))),xo(d,a,n)&&(d=l)),t.key===(i?`ArrowRight`:`ArrowLeft`)&&(u&&Ba(t),l%a===0?r&&(d=To(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o})):(d=To(e,{startingIndex:l,decrement:!0,disabledIndices:o}),r&&xo(d,a,n)&&(d=To(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o}))),xo(d,a,n)&&(d=l));let s=Xa(c/a)===n;So(e,d)&&(d=r&&s?t.key===(i?`ArrowRight`:`ArrowLeft`)?c:To(e,{startingIndex:l-l%a-1,disabledIndices:o}):l)}return d}function Do(e,t,n){let r=[],i=0;return e.forEach(({width:e,height:a},o)=>{let s=!1;for(n&&(i=0);!s;){let n=[];for(let r=0;r<e;r+=1)for(let e=0;e<a;e+=1)n.push(i+r+e*t);i%t+e<=t&&n.every(e=>r[e]==null)?(n.forEach(e=>{r[e]=o}),s=!0):i+=1}}),[...r]}function Oo(e,t,n,r,i){if(e===-1)return-1;let a=n.indexOf(e),o=t[e];switch(i){case`tl`:return a;case`tr`:return o?a+o.width-1:a;case`bl`:return o?a+(o.height-1)*r:a;case`br`:return n.lastIndexOf(e);default:return-1}}function ko(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function Ao(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e.current[t];return r?jo(r)?!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!0:!1}function jo(e){return On(e).display!==`none`}function Mo(e){return e?.ownerDocument||document}function No(e,t){return t!=null&&!Wa(t)?0:typeof e==`function`?e():e}function Po(e,t,n){let r=No(e,n);return typeof r==`number`?r:r?.[t]}function Fo(e){return typeof e==`function`?e():e}function Io(e,t){return t||e===`click`||e===`mousedown`}var Lo=d.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new xa,currentIdRef:{current:null},currentContextRef:{current:null}});function Ro(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=d.useRef(n),a=d.useRef(n),o=d.useRef(null),s=d.useRef(null),c=Sa();return(0,Hi.jsx)(Lo.Provider,{value:d.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function zo(e,t={open:!1}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`floatingId`),{open:i}=t,{currentIdRef:a,delayRef:o,timeoutMs:s,initialDelayRef:c,currentContextRef:l,hasProvider:u,timeout:f}=d.useContext(Lo),[p,m]=d.useState(!1);return Y(()=>{function e(){m(!1),l.current?.setIsInstantPhase(!1),a.current=null,l.current=null,o.current=c.current}if(a.current&&!i&&a.current===r){if(m(!1),s){let t=r;return f.start(s,()=>{n.select(`open`)||a.current&&a.current!==t||e()}),()=>{f.clear()}}e()}},[i,r,a,o,s,c,l,f,n]),Y(()=>{if(!i)return;let e=l.current,t=a.current;f.clear(),l.current={onOpenChange:n.setOpen,setIsInstantPhase:m},a.current=r,o.current={open:0,close:Po(c.current,`close`)},t!==null&&t!==r?(m(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,X(pr))):(m(!1),e?.setIsInstantPhase(!1))},[i,r,n,a,o,s,c,l,f]),Y(()=>()=>{l.current=null},[l]),d.useMemo(()=>({hasProvider:u,delayRef:o,isInstantPhase:p}),[u,o,p])}function Bo(e){let t=fe(Vo,e).current;return t.next=e,Y(t.effect),t}function Vo(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Ho(e){return`data-base-ui-${e}`}var Uo=0;function Wo(e,t={}){let{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(Uo);let a=()=>e?.focus({preventScroll:n});i?a():Uo=requestAnimationFrame(a)}var Go=d.createContext(null),Ko=()=>d.useContext(Go),qo=Ho(`portal`);function Jo(e={}){let{ref:t,container:n,componentProps:r=Ee,elementProps:i}=e,a=nr(),o=Ko()?.portalNode,[s,c]=d.useState(null),[l,u]=d.useState(null),f=J(e=>{e!==null&&u(e)}),p=d.useRef(null);Y(()=>{if(n===null){p.current&&(p.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(mn(n)?n:n.current))??o??document.body;if(e==null){p.current&&(p.current=null,u(null),c(null));return}p.current!==e&&(p.current=e,u(null),c(e))},[n,o,a]);let m=ke(`div`,r,{ref:[t,f],props:[{id:a,[qo]:``},i]});return{portalNode:l,portalSubtree:s&&m?lr.createPortal(m,s):null}}function Yo(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var Xo=d.createContext(null),Zo=d.createContext(null),Qo=()=>d.useContext(Xo)?.id||null,$o=e=>{let t=d.useContext(Zo);return e??t};function es(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:a=`click`,toggle:o=!0,ignoreMouse:s=!1,stickIfOpen:c=!0,touchOpenDelay:l=0,reason:u=mr}=t,f=d.useRef(void 0),p=kr(),m=Sa(),h=d.useMemo(()=>({onPointerDown(e){f.current=e.pointerType},onMouseDown(e){let t=f.current,i=e.nativeEvent,d=n.select(`open`);if(e.button!==0||a===`click`||Wa(t,!0)&&s)return;let h=r.current.openEvent,g=h?.type,_=n.select(`domReferenceElement`)!==e.currentTarget,v=d&&_||!(d&&o&&(!(h&&c)||g===`click`||g===`mousedown`));if(Fa(i.target)){let e=X(u,i,i.target);v&&t===`touch`&&l>0?m.start(l,()=>{n.setOpen(!0,e)}):n.setOpen(v,e);return}let y=e.currentTarget;p.request(()=>{let e=X(u,i,y);v&&t===`touch`&&l>0?m.start(l,()=>{n.setOpen(!0,e)}):n.setOpen(v,e)})},onClick(e){if(a===`mousedown-only`)return;let t=f.current;if(a===`mousedown`&&t){f.current=void 0;return}if(Wa(t,!0)&&s)return;let i=n.select(`open`),d=r.current.openEvent,p=n.select(`domReferenceElement`)!==e.currentTarget,h=i&&p||!(i&&o&&(!(d&&c)||Ga(d))),g=X(u,e.nativeEvent,e.currentTarget);h&&t===`touch`&&l>0?m.start(l,()=>{n.setOpen(!0,g)}):n.setOpen(h,g)},onKeyDown(){f.current=void 0}}),[r,a,s,n,c,o,p,m,l,u]);return d.useMemo(()=>i?{reference:h}:Ee,[i,h])}function ts(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function ns(e){return e!=null&&e.clientX!=null}function rs(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),o=n.context.dataRef,{enabled:s=!0,axis:c=`both`}=t,l=d.useRef(!1),u=d.useRef(null),[f,p]=d.useState(),[m,h]=d.useState([]),g=J((e,t,r)=>{l.current||o.current.openEvent&&!ns(o.current.openEvent)||n.set(`positionReference`,ts(r??a,{x:e,y:t,axis:c,dataRef:o,pointerType:f}))}),_=J(e=>{r?u.current||h([]):g(e.clientX,e.clientY,e.currentTarget)}),v=Wa(f)?i:r,y=d.useCallback(()=>{if(!v||!s)return;let e=fn(i);function t(n){Aa(i,Ma(n))?(e.removeEventListener(`mousemove`,t),u.current=null):g(n.clientX,n.clientY)}if(!o.current.openEvent||ns(o.current.openEvent)){e.addEventListener(`mousemove`,t);let n=()=>{e.removeEventListener(`mousemove`,t),u.current=null};return u.current=n,n}n.set(`positionReference`,a)},[v,s,i,o,a,n,g]);d.useEffect(()=>y(),[y,m]),d.useEffect(()=>{s&&!i&&(l.current=!1)},[s,i]),d.useEffect(()=>{!s&&r&&(l.current=!0)},[s,r]);let b=d.useMemo(()=>{function e(e){p(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:_,onMouseEnter:_}},[_]);return d.useMemo(()=>s?{reference:b,trigger:b}:{},[s,b])}var is={intentional:`onClick`,sloppy:`onPointerDown`};function as(){return!1}function os(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function ss(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),{dataRef:a}=n.context,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`sloppy`,referencePress:u=as,referencePressEvent:f=`sloppy`,bubbles:p,externalTree:m}=t,h=$o(m),g=J(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=_!==!1,y=J(()=>l),b=d.useRef(!1),x=d.useRef(!1),S=d.useRef(!1),{escapeKey:C,outsidePress:w}=os(p),T=d.useRef(null),E=Sa(),D=Sa(),O=J(()=>{D.clear(),a.current.insideReactTree=!1}),k=d.useRef(!1),A=d.useRef(``),j=J(u),M=J(e=>{if(!r||!o||!s||e.key!==`Escape`||k.current)return;let t=a.current.floatingContext?.nodeId,i=h?za(h.nodesRef.current,t):[];if(!C&&i.length>0){let e=!0;if(i.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}let c=X(yr,Va(e)?e.nativeEvent:e);n.setOpen(!1,c),!C&&!c.isPropagationAllowed&&e.stopPropagation()}),N=J(()=>{a.current.insideReactTree=!0,D.start(0,O)});d.useEffect(()=>{if(!r||!o)return;a.current.__escapeKeyBubbles=C,a.current.__outsidePressBubbles=w;let e=new xa,t=new xa;function c(){e.clear(),k.current=!0}function l(){e.start(En()?5:0,()=>{k.current=!1})}function u(){S.current=!0,t.start(0,()=>{S.current=!1})}function d(){b.current=!1,x.current=!1}function f(){let e=A.current,t=e===`pen`||!e?`mouse`:e,n=y(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function p(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function m(e){let t=a.current.floatingContext?.nodeId,r=h&&za(h.nodesRef.current,t).some(t=>Na(e,t.context?.elements.floating));return Na(e,n.select(`floatingElement`))||Na(e,n.select(`domReferenceElement`))||r}function g(e){if(p(e)){O();return}if(a.current.insideReactTree){O();return}let r=Ma(e),i=`[${Ho(`inert`)}]`,o=Array.from(Mo(n.select(`floatingElement`)).querySelectorAll(i)),s=q(r)?r.getRootNode():null;gn(s)&&(o=o.concat(Array.from(s.querySelectorAll(i))));let c=n.context.triggerElements;if(r&&(c.hasElement(r)||c.hasMatchingElement(e=>Aa(e,r))))return;let l=q(r)?r:null;for(;l&&!Dn(l);){let e=An(l);if(Dn(e)||!q(e))break;l=e}if(o.length&&q(r)&&!Pa(r)&&!Aa(r,n.select(`floatingElement`))&&o.every(e=>!Aa(l,e)))return;if(hn(r)&&!(`touches`in e)){let t=Dn(r),n=On(r),i=/auto|scroll/,a=t||i.test(n.overflowX),o=t||i.test(n.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),d=s&&e.offsetY>r.clientHeight;if(u||d)return}if(m(e))return;if(f()===`intentional`&&S.current){t.clear(),S.current=!1;return}if(typeof _==`function`&&!_(e))return;let u=a.current.floatingContext?.nodeId,d=h?za(h.nodesRef.current,u):[];if(d.length>0){let e=!0;if(d.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}n.setOpen(!1,X(_r,e)),O()}function D(e){f()!==`sloppy`||e.pointerType===`touch`||!n.select(`open`)||!o||Na(e,n.select(`floatingElement`))||Na(e,n.select(`domReferenceElement`))||g(e)}function j(e){if(f()!==`sloppy`||!n.select(`open`)||!o||Na(e,n.select(`floatingElement`))||Na(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];t&&(T.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},E.start(1e3,()=>{T.current&&(T.current.dismissOnTouchEnd=!1,T.current.dismissOnMouseDown=!1)}))}function N(e){A.current=`touch`;let t=Ma(e);function n(){j(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}function P(e){if(E.clear(),e.type===`pointerdown`&&(A.current=e.pointerType),e.type===`mousedown`&&T.current&&!T.current.dismissOnMouseDown)return;let t=Ma(e);function n(){e.type===`pointerdown`?D(e):g(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}function F(e){if(!b.current)return;let n=x.current;if(d(),f()===`intentional`){if(e.type===`pointercancel`){n&&u();return}if(!m(e)){if(n){u();return}typeof _==`function`&&!_(e)||(t.clear(),S.current=!0,O())}}}function I(e){if(f()!==`sloppy`||!T.current||Na(e,n.select(`floatingElement`))||Na(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];if(!t)return;let r=Math.abs(t.clientX-T.current.startX),i=Math.abs(t.clientY-T.current.startY),a=Math.sqrt(r*r+i*i);a>5&&(T.current.dismissOnTouchEnd=!0),a>10&&(g(e),E.clear(),T.current=null)}function ee(e){let t=Ma(e);function n(){I(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}function te(e){f()!==`sloppy`||!T.current||Na(e,n.select(`floatingElement`))||Na(e,n.select(`domReferenceElement`))||(T.current.dismissOnTouchEnd&&g(e),E.clear(),T.current=null)}function L(e){let t=Ma(e);function n(){te(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}let R=Mo(i);return s&&(R.addEventListener(`keydown`,M),R.addEventListener(`compositionstart`,c),R.addEventListener(`compositionend`,l)),v&&(R.addEventListener(`click`,P,!0),R.addEventListener(`pointerdown`,P,!0),R.addEventListener(`pointerup`,F,!0),R.addEventListener(`pointercancel`,F,!0),R.addEventListener(`mousedown`,P,!0),R.addEventListener(`mouseup`,F,!0),R.addEventListener(`touchstart`,N,!0),R.addEventListener(`touchmove`,ee,!0),R.addEventListener(`touchend`,L,!0)),()=>{s&&(R.removeEventListener(`keydown`,M),R.removeEventListener(`compositionstart`,c),R.removeEventListener(`compositionend`,l)),v&&(R.removeEventListener(`click`,P,!0),R.removeEventListener(`pointerdown`,P,!0),R.removeEventListener(`pointerup`,F,!0),R.removeEventListener(`pointercancel`,F,!0),R.removeEventListener(`mousedown`,P,!0),R.removeEventListener(`mouseup`,F,!0),R.removeEventListener(`touchstart`,N,!0),R.removeEventListener(`touchmove`,ee,!0),R.removeEventListener(`touchend`,L,!0)),e.clear(),t.clear(),d(),S.current=!1}},[a,i,s,v,_,r,o,C,w,M,O,y,h,n,E]),d.useEffect(O,[_,O]);let P=d.useMemo(()=>({onKeyDown:M,[is[f]]:e=>{j()&&n.setOpen(!1,X(mr,e.nativeEvent))},...f!==`intentional`&&{onClick(e){j()&&n.setOpen(!1,X(`trigger-press`,e.nativeEvent))}}}),[M,n,f,j]),F=J(e=>{if(!r||!o||e.button!==0)return;let t=Ma(e.nativeEvent);Aa(n.select(`floatingElement`),t)&&(b.current||(b.current=!0,x.current=!1))}),I=J(e=>{!r||!o||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)}),ee=d.useMemo(()=>({onKeyDown:M,onPointerDown:I,onMouseDown:I,onClickCapture:N,onMouseDownCapture(e){N(),F(e)},onPointerDownCapture(e){N(),F(e)},onMouseUpCapture:N,onTouchEndCapture:N,onTouchMoveCapture:N}),[M,N,F,I]);return d.useMemo(()=>o?{reference:P,floating:ee,trigger:P}:{},[o,P,ee])}function cs(e,t,n){let{reference:r,floating:i}=e,a=ao(t),o=oo(t),s=io(o),c=to(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}}switch(no(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function ls(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}=eo(t,e),p=yo(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=bo(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=bo(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 us=50,ds=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:ls},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=cs(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<us&&(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}=cs(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},fs=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}=eo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=to(r),_=ao(o),v=to(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[_o(o)]:co(o)),x=p!==`none`;!d&&x&&b.push(...go(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=so(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`&&_!==ao(t))||T.every(e=>ao(e.placement)===_?e.overflows[0]>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=ao(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;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function ps(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ms(e){return Ka.some(t=>e[t]>=0)}var hs=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=eo(e,t);switch(i){case`referenceHidden`:{let e=ps(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ms(e)}}}case`escaped`:{let e=ps(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:ms(e)}}}default:return{}}}}},gs=new Set([`left`,`top`]);async function _s(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=to(n),s=no(n),c=ao(n)===`y`,l=gs.has(o)?-1:1,u=a&&c?-1:1,d=eo(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 vs=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 _s(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}}}}},ys=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}=eo(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ao(to(i)),p=ro(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=$a(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=$a(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},bs=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}=eo(e,t),u={x:n,y:r},d=ao(i),f=ro(d),p=u[f],m=u[d],h=eo(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};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=gs.has(to(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}}}},xs=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=eo(e,t),u=await o.detectOverflow(t,l),d=to(i),f=no(i),p=ao(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=qa(h-u[g],v),x=qa(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Ja(u.left,0),t=Ja(u.right,0),n=Ja(u.top,0),r=Ja(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Ja(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Ja(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Ss(e){let t=On(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=hn(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ya(n)!==a||Ya(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Cs(e){return q(e)?e:e.contextElement}function ws(e){let t=Cs(e);if(!hn(t))return Za(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ss(t),o=(a?Ya(n.width):n.width)/r,s=(a?Ya(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ts=Za(0);function Es(e){let t=fn(e);return!En()||!t.visualViewport?Ts:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ds(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==fn(e)?!1:t}function Os(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Cs(e),o=Za(1);t&&(r?q(r)&&(o=ws(r)):o=ws(e));let s=Ds(a,n,r)?Es(a):Za(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){let e=fn(a),t=r&&q(r)?fn(r):r,n=e,i=Nn(n);for(;i&&r&&t!==n;){let e=ws(i),t=i.getBoundingClientRect(),r=On(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=fn(i),i=Nn(n)}}return bo({width:u,height:d,x:c,y:l})}function ks(e,t){let n=kn(e).scrollLeft;return t?t.left+n:Os(pn(e)).left+n}function As(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ks(e,n),y:n.top+t.scrollTop}}function js(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=pn(r),s=t?yn(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Za(1),u=Za(0),d=hn(r);if((d||!d&&!a)&&((dn(r)!==`body`||_n(o))&&(c=kn(r)),d)){let e=Os(r);l=ws(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?As(o,c):Za(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 Ms(e){return Array.from(e.getClientRects())}function Ns(e){let t=pn(e),n=kn(e),r=e.ownerDocument.body,i=Ja(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ja(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+ks(e),s=-n.scrollTop;return On(r).direction===`rtl`&&(o+=Ja(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Ps=25;function Fs(e,t){let n=fn(e),r=pn(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=En();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=ks(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Ps&&(a-=o)}else l<=Ps&&(a+=l);return{width:a,height:o,x:s,y:c}}function Is(e,t){let n=Os(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=hn(e)?ws(e):Za(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ls(e,t,n){let r;if(t===`viewport`)r=Fs(e,n);else if(t===`document`)r=Ns(pn(e));else if(q(t))r=Is(t,n);else{let n=Es(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return bo(r)}function Rs(e,t){let n=An(e);return n===t||!q(n)||Dn(n)?!1:On(n).position===`fixed`||Rs(n,t)}function zs(e,t){let n=t.get(e);if(n)return n;let r=Mn(e,[],!1).filter(e=>q(e)&&dn(e)!==`body`),i=null,a=On(e).position===`fixed`,o=a?An(e):e;for(;q(o)&&!Dn(o);){let t=On(o),n=wn(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||_n(o)&&!n&&Rs(e,o))?r=r.filter(e=>e!==o):i=t,o=An(o)}return t.set(e,r),r}function Bs(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?yn(t)?[]:zs(t,this._c):[].concat(n),r],o=Ls(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=Ls(t,a[e],i);s=Ja(n.top,s),c=qa(n.right,c),l=qa(n.bottom,l),u=Ja(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Vs(e){let{width:t,height:n}=Ss(e);return{width:t,height:n}}function Hs(e,t,n){let r=hn(t),i=pn(t),a=n===`fixed`,o=Os(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Za(0);function l(){c.x=ks(i)}if(r||!r&&!a)if((dn(t)!==`body`||_n(i))&&(s=kn(t)),r){let e=Os(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?As(i,s):Za(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Us(e){return On(e).position===`static`}function Ws(e,t){if(!hn(e)||On(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return pn(e)===n&&(n=n.ownerDocument.body),n}function Gs(e,t){let n=fn(e);if(yn(e))return n;if(!hn(e)){let t=An(e);for(;t&&!Dn(t);){if(q(t)&&!Us(t))return t;t=An(t)}return n}let r=Ws(e,t);for(;r&&vn(r)&&Us(r);)r=Ws(r,t);return r&&Dn(r)&&Us(r)&&!wn(r)?n:r||Tn(e)||n}var Ks=async function(e){let t=this.getOffsetParent||Gs,n=this.getDimensions,r=await n(e.floating);return{reference:Hs(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function qs(e){return On(e).direction===`rtl`}var Js={convertOffsetParentRelativeRectToViewportRelativeRect:js,getDocumentElement:pn,getClippingRect:Bs,getOffsetParent:Gs,getElementRects:Ks,getClientRects:Ms,getDimensions:Vs,getScale:ws,isElement:q,isRTL:qs};function Ys(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Xs(e,t){let n=null,r,i=pn(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Xa(d),h=Xa(i.clientWidth-(u+f)),g=Xa(i.clientHeight-(d+p)),_=Xa(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Ja(0,qa(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Ys(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Zs(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=Cs(e),u=i||a?[...l?Mn(l):[],...t?Mn(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Xs(l,n):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?Os(e):null;c&&g();function g(){let t=Os(e);h&&!Ys(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 Qs=vs,$s=ys,ec=fs,tc=xs,nc=hs,rc=bs,ic=(e,t,n)=>{let r=new Map,i={platform:Js,...n},a={...i.platform,_c:r};return ds(e,t,{...i,platform:a})},ac=typeof document<`u`?d.useLayoutEffect:function(){};function oc(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(!oc(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)&&!oc(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function sc(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cc(e,t){let n=sc(e);return Math.round(t*n)/n}function lc(e){let t=d.useRef(e);return ac(()=>{t.current=e}),t}function uc(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,f]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=d.useState(r);oc(p,r)||m(r);let[h,g]=d.useState(null),[_,v]=d.useState(null),y=d.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=d.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=d.useRef(null),w=d.useRef(null),T=d.useRef(u),E=c!=null,D=lc(c),O=lc(i),k=lc(l),A=d.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),ic(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!oc(T.current,t)&&(T.current=t,lr.flushSync(()=>{f(t)}))})},[p,t,n,O,k]);ac(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[l]);let j=d.useRef(!1);ac(()=>(j.current=!0,()=>{j.current=!1}),[]),ac(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=d.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=d.useMemo(()=>({reference:x,floating:S}),[x,S]),P=d.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=cc(N.floating,u.x),r=cc(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...sc(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return d.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var dc=(e,t)=>{let n=Qs(e);return{name:n.name,fn:n.fn,options:[e,t]}},fc=(e,t)=>{let n=$s(e);return{name:n.name,fn:n.fn,options:[e,t]}},pc=(e,t)=>({fn:rc(e).fn,options:[e,t]}),mc=(e,t)=>{let n=ec(e);return{name:n.name,fn:n.fn,options:[e,t]}},hc=(e,t)=>{let n=tc(e);return{name:n.name,fn:n.fn,options:[e,t]}},gc=(e,t)=>{let n=nc(e);return{name:n.name,fn:n.fn,options:[e,t]}},_c=Symbol(`NOT_FOUND`);function vc(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function yc(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!=`object`)throw TypeError(t)}function bc(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var xc=e=>Array.isArray(e)?e:[e];function Sc(e){let t=Array.isArray(e[0])?e[0]:e;return bc(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function Cc(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function wc(e){let t;return{get(n){return t&&e(t.key,n)?t.value:_c},put(e,n){t={key:e,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Tc(e,t){let n=[];function r(e){let r=n.findIndex(n=>t(e,n.key));if(r>-1){let e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return _c}function i(t,i){r(t)===_c&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())}function a(){return n}function o(){n=[]}return{get:r,put:i,getEntries:a,clear:o}}var Ec=(e,t)=>e===t;function Dc(e){return function(t,n){if(t===null||n===null||t.length!==n.length)return!1;let{length:r}=t;for(let i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}}function Oc(e,t){let{equalityCheck:n=Ec,maxSize:r=1,resultEqualityCheck:i}=typeof t==`object`?t:{equalityCheck:t},a=Dc(n),o=0,s=r<=1?wc(a):Tc(r,a);function c(){let t=s.get(arguments);if(t===_c){if(t=e.apply(null,arguments),o++,i){let e=s.getEntries().find(e=>i(e.value,t));e&&(t=e.value,o!==0&&o--)}s.put(arguments,t)}return t}return c.clearCache=()=>{s.clear(),c.resetResultsCount()},c.resultsCount=()=>o,c.resetResultsCount=()=>{o=0},c}var kc=class{constructor(e){this.value=e}deref(){return this.value}},Ac=typeof WeakRef<`u`?WeakRef:kc,jc=0,Mc=1;function Nc(){return{s:jc,v:void 0,o:null,p:null}}function Pc(e,t={}){let n=Nc(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=Nc(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=Nc(),e.set(n,t)):t=r}}let s=t,c;if(t.s===Mc)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=i?.deref?.()??i;e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new Ac(c):c}return s.s=Mc,s.v=c,c}return o.clearCache=()=>{n=Nc(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Fc(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),vc(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=Pc,argsMemoizeOptions:u=[],devModeChecks:d={}}={...n,...a},f=xc(c),p=xc(u),m=Sc(e),h=s(function(){return t++,o.apply(null,arguments)},...f),g=l(function(){r++;let e=Cc(m,arguments);return i=h.apply(null,e),i},...p);return Object.assign(g,{resultFunc:o,memoizedResultFunc:h,dependencies:m,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var Ic=Fc(Pc),Lc=Object.assign((e,t=Ic)=>{yc(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}))},{withTypes:()=>Lc});Fc({memoize:Oc,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});var Q=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(H(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},Rc=t((e=>{var t=r();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),zc=t(((e,t)=>{t.exports=Rc()})),Bc=t((e=>{var t=r(),n=zc();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=n.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),Vc=t(((e,t)=>{t.exports=Bc()})),Hc=[],Uc=void 0;function Wc(){return Uc}function Gc(e){Hc.push(e)}function Kc(e){let t=(t,n)=>{let r=fe(Jc).current,i;try{Uc=r;for(let e of Hc)e.before(r);i=e(t,n);for(let e of Hc)e.after(r);r.didInitialize=!0}finally{Uc=void 0}return i};return t.displayName=e.displayName||e.name,t}function qc(e){return d.forwardRef(Kc(e))}function Jc(){return{didInitialize:!1}}var Yc=zc(),Xc=Vc(),Zc=U(19)?el:tl;function Qc(e,t,n,r,i){return Zc(e,t,n,r,i)}function $c(e,t,n,r,i){let a=d.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Yc.useSyncExternalStore)(e.subscribe,a,a)}Gc({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,Yc.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function el(e,t,n,r,i){let a=Wc();if(!a)return $c(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function tl(e,t,n,r,i){return(0,Xc.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var nl=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Qc(this,e,t,n,r)}},rl=class extends nl{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){d.useDebugValue(e),Y(()=>{this.state[e]!==t&&this.set(e,t)},[e,t])}useSyncedValueWithCleanup(e,t){let n=this;Y(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;Y(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){d.useDebugValue(e);let n=t!==void 0;Y(()=>{n&&!Object.is(this.state[e],t)&&super.setState({...this.state,[e]:t})},[e,t,n])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return d.useDebugValue(e),Qc(this,this.selectors[e],t,n,r)}useContextCallback(e,t){d.useDebugValue(e);let n=J(t??we);this.context[e]=n}useStateSetter(e){let t=d.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},il={open:Q(e=>e.open),domReferenceElement:Q(e=>e.domReferenceElement),referenceElement:Q(e=>e.positionReference??e.referenceElement),floatingElement:Q(e=>e.floatingElement),floatingId:Q(e=>e.floatingId)},al=class extends rl{constructor(e){let{nested:t,noEmit:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Yo(),nested:t,noEmit:n,triggerElements:i},il)}setOpen=(e,t)=>{if((!e||!this.state.open||Ga(t.event))&&(this.context.dataRef.current.openEvent=e?t.event:void 0),!this.context.noEmit){let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)}this.context.onOpenChange?.(e,t)}};function ol(e,t){let n=d.useRef(null),r=d.useRef(null);return d.useCallback(i=>{if(e!==void 0){if(n.current!==null){let e=n.current,i=r.current,a=t.context.triggerElements.getById(e);i&&a===i&&t.context.triggerElements.delete(e),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function sl(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=ol(e,n),o=J(t=>{if(a(t),!t||!n.select(`open`))return;let i=n.select(`activeTriggerId`);if(i===e){n.update({activeTriggerElement:t,...r});return}i??n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return Y(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function cl(e){let t=e.useState(`open`);Y(()=>{if(t&&!e.select(`activeTriggerId`)&&e.context.triggerElements.size===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[n,r]=t.value;e.update({activeTriggerId:n,activeTriggerElement:r})}}},[t,e])}function ll(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=Lr(e);t.useSyncedValues({mounted:r,transitionStatus:a});let o=J(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return Ir({enabled:!t.useState(`preventUnmountingOnClose`),open:e,ref:t.context.popupRef,onComplete(){e||o()}}),{forceUnmount:o,transitionStatus:a}}var ul=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function dl(){return new al({open:!1,floatingElement:null,referenceElement:null,triggerElements:new ul,floatingId:``,nested:!1,noEmit:!1,onOpenChange:void 0})}function fl(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:`idle`,floatingRootContext:dl(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Ee,inactiveTriggerProps:Ee,popupProps:Ee}}var pl=Q(e=>e.triggerIdProp??e.activeTriggerId),ml={open:Q(e=>e.openProp??e.open),mounted:Q(e=>e.mounted),transitionStatus:Q(e=>e.transitionStatus),floatingRootContext:Q(e=>e.floatingRootContext),preventUnmountingOnClose:Q(e=>e.preventUnmountingOnClose),payload:Q(e=>e.payload),activeTriggerId:pl,activeTriggerElement:Q(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:Q((e,t)=>t!==void 0&&pl(e)===t),isOpenedByTrigger:Q((e,t)=>t!==void 0&&pl(e)===t&&e.open),isMountedByTrigger:Q((e,t)=>t!==void 0&&pl(e)===t&&e.mounted),triggerProps:Q((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:Q(e=>e.popupProps),popupElement:Q(e=>e.popupElement),positionerElement:Q(e=>e.positionerElement)};function hl(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=nr(),a=Qo()!=null,o=fe(()=>new al({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new ul,floatingId:i,nested:a,noEmit:!1})).current;return Y(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=q(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o.context.noEmit=!1,o}function gl(e={}){let{nodeId:t,externalTree:n}=e,r=hl(e),i=e.rootContext||r,a={reference:i.useState(`referenceElement`),floating:i.useState(`floatingElement`),domReference:i.useState(`domReferenceElement`)},[o,s]=d.useState(null),c=d.useRef(null),l=$o(n);Y(()=>{a.domReference&&(c.current=a.domReference)},[a.domReference]);let u=uc({...e,elements:{...a,...o&&{reference:o}}}),f=d.useCallback(e=>{let t=q(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),u.refs.setReference(t)},[u.refs]),[p,m]=d.useState(null),[h,g]=d.useState(null);i.useSyncedValue(`referenceElement`,p),i.useSyncedValue(`domReferenceElement`,q(p)?p:null),i.useSyncedValue(`floatingElement`,h);let _=d.useCallback(e=>{(q(e)||e===null)&&(c.current=e,m(e)),(q(u.refs.reference.current)||u.refs.reference.current===null||e!==null&&!q(e))&&u.refs.setReference(e)},[u.refs,m]),v=d.useCallback(e=>{g(e),u.refs.setFloating(e)},[u.refs]),y=d.useMemo(()=>({...u.refs,setReference:_,setFloating:v,setPositionReference:f,domReference:c}),[u.refs,_,v,f]),b=d.useMemo(()=>({...u.elements,domReference:a.domReference}),[u.elements,a.domReference]),x=i.useState(`open`),S=i.useState(`floatingId`),C=d.useMemo(()=>({...u,dataRef:i.context.dataRef,open:x,onOpenChange:i.setOpen,events:i.context.events,floatingId:S,refs:y,elements:b,nodeId:t,rootStore:i}),[u,y,b,t,i,x,S]);return Y(()=>{i.context.dataRef.current.floatingContext=C;let e=l?.nodesRef.current.find(e=>e.id===t);e&&(e.context=C)}),d.useMemo(()=>({...u,context:C,refs:y,elements:b,rootStore:i}),[u,y,b,C,i])}function _l(e){let{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,a=nr(),o=Qo()!=null,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(r?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=fe(()=>new al({open:s,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:i,floatingId:a,nested:o,noEmit:n})).current;return Y(()=>{let e={open:s,floatingId:a,referenceElement:c,floatingElement:l};q(c)&&(e.domReferenceElement=c),d.state.positionReference===d.state.referenceElement&&(e.positionReference=c),d.update(e)},[s,a,c,l,d]),d.context.onOpenChange=i,d.context.nested=o,d.context.noEmit=n,d}var vl=da&&la;function yl(e,t={}){let n=`rootStore`in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:a=!0,delay:o}=t,s=d.useRef(!1),c=d.useRef(null),l=Sa(),u=d.useRef(!0);d.useEffect(()=>{let e=n.select(`domReferenceElement`);if(!a)return;let t=fn(e);function r(){let e=n.select(`domReferenceElement`);!n.select(`open`)&&hn(e)&&e===ka(Mo(e))&&(s.current=!0)}function i(){u.current=!0}function o(){u.current=!1}return t.addEventListener(`blur`,r),vl&&(t.addEventListener(`keydown`,i,!0),t.addEventListener(`pointerdown`,o,!0)),()=>{t.removeEventListener(`blur`,r),vl&&(t.removeEventListener(`keydown`,i,!0),t.removeEventListener(`pointerdown`,o,!0))}},[n,a]),d.useEffect(()=>{if(!a)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=n.select(`domReferenceElement`);q(e)&&(c.current=e,s.current=!0)}}return r.on(`openchange`,e),()=>{r.off(`openchange`,e)}},[r,a,n]);let f=d.useMemo(()=>({onMouseLeave(){s.current=!1,c.current=null},onFocus(e){let t=e.currentTarget;if(s.current){if(c.current===t)return;s.current=!1,c.current=null}let r=Ma(e.nativeEvent);if(q(r)){if(vl&&!e.relatedTarget){if(!u.current&&!Fa(r))return}else if(!La(r))return}let i=ja(e.relatedTarget,n.context.triggerElements),{nativeEvent:a,currentTarget:d}=e,f=typeof o==`function`?o():o;if(n.select(`open`)&&i||f===0||f===void 0){n.setOpen(!0,X(gr,a,d));return}l.start(f,()=>{s.current||n.setOpen(!0,X(gr,a,d))})},onBlur(e){s.current=!1,c.current=null;let t=e.relatedTarget,r=e.nativeEvent,a=q(t)&&t.hasAttribute(Ho(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let e=n.select(`domReferenceElement`),o=ka(e?e.ownerDocument:document);!t&&o===e||Aa(i.current.floatingContext?.refs.floating.current,o)||Aa(e,o)||a||ja(t??o,n.context.triggerElements)||n.setOpen(!1,X(gr,r))})}}),[i,n,l,o]);return d.useMemo(()=>a?{reference:f,trigger:f}:{},[a,f])}var bl=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${wa}`;function xl(e){return e?!!e.closest(bl):!1}var Sl=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new xa,this.restTimeout=new xa,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose};function Cl(e){e.performedPointerEventsMutation&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null)}function wl(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t;Cl(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Tl(e){let t=fe(Sl.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||=t,Tr(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function El(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),{dataRef:o}=n.context,{enabled:s=!0,closeDelay:c=0}=t,l=Tl(n),u=$o(),f=Qo(),p=J(()=>Io(o.current.openEvent?.type,l.interactedInside)),m=J(()=>{let e=o.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`}),h=J(e=>ja(e,n.context.triggerElements)),g=d.useCallback(e=>{let t=Po(c,`close`,l.pointerType),r=()=>{n.setOpen(!1,X(hr,e)),u?.events.emit(`floating.closed`,e)};t?l.openChangeTimeout.start(t,r):(l.openChangeTimeout.clear(),r())},[c,n,l,u]),_=J(()=>{Cl(l)}),v=J(e=>{let t=Ma(e);if(!xl(t)){l.interactedInside=!1;return}l.interactedInside=t?.closest(`[aria-haspopup]`)!=null});Y(()=>{r||(l.pointerType=void 0,l.restTimeoutPending=!1,l.interactedInside=!1,_())},[r,l,_]),d.useEffect(()=>_,[_]),Y(()=>{if(s&&r&&l.handleCloseOptions?.blockPointerEvents&&m()&&q(a)&&i){let e=a,t=i,n=Mo(i),r=u?.nodesRef.current.find(e=>e.id===f)?.context?.elements.floating;return r&&(r.style.pointerEvents=``),wl(l,{scopeElement:l.handleCloseOptions?.getScope?.()??l.pointerEventsScopeElement??r??e.closest(`[data-rootownerid]`)??n.body,referenceElement:e,floatingElement:t}),()=>{_()}}},[s,r,a,i,l,m,u,f,_]);let y=Sa();d.useEffect(()=>{if(!s)return;function e(){l.openChangeTimeout.clear(),y.clear(),u?.events.off(`floating.closed`,r),_()}function t(e){if(u&&f&&za(u.nodesRef.current,f).length>0){u.events.on(`floating.closed`,r);return}if(!h(e.relatedTarget)){if(l.handler){l.handler(e);return}_(),p()||g(e)}}function r(e){!u||!f||za(u.nodesRef.current,f).length>0||y.start(0,()=>{u.events.off(`floating.closed`,r),n.setOpen(!1,X(hr,e)),u.events.emit(`floating.closed`,e)})}let a=i;return a&&(a.addEventListener(`mouseenter`,e),a.addEventListener(`mouseleave`,t),a.addEventListener(`pointerdown`,v,!0)),()=>{a&&(a.removeEventListener(`mouseenter`,e),a.removeEventListener(`mouseleave`,t),a.removeEventListener(`pointerdown`,v,!0)),u?.events.off(`floating.closed`,r)}},[s,i,n,o,p,h,g,_,v,l,u,f,y])}var Dl={current:null};function Ol(e,t={}){let n=`rootStore`in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:a=!0,delay:o=0,handleClose:s=null,mouseOnly:c=!1,restMs:l=0,move:u=!0,triggerElementRef:f=Dl,externalTree:p,isActiveTrigger:m=!0,getHandleCloseContext:h}=t,g=$o(p),_=Tl(n),v=Bo(s),y=Bo(o),b=Bo(l),x=Bo(a);m&&(_.handleCloseOptions=v.current?.__options);let S=J(()=>Io(r.current.openEvent?.type,_.interactedInside)),C=J(e=>ja(e,n.context.triggerElements)),w=J((e,t,r)=>{let i=n.context.triggerElements;if(i.hasElement(t))return!e||!Aa(e,t);if(!q(r))return!1;let a=r;return i.hasMatchingElement(e=>Aa(e,a))&&(!e||!Aa(e,a))}),T=d.useCallback((e,t=!0)=>{let r=Po(y.current,`close`,_.pointerType);r?_.openChangeTimeout.start(r,()=>{n.setOpen(!1,X(hr,e)),g?.events.emit(`floating.closed`,e)}):t&&(_.openChangeTimeout.clear(),n.setOpen(!1,X(hr,e)),g?.events.emit(`floating.closed`,e))},[y,n,_,g]),E=J(()=>{_.handler&&=(Mo(n.select(`domReferenceElement`)).removeEventListener(`mousemove`,_.handler),void 0)});d.useEffect(()=>E,[E]);let D=J(()=>{Cl(_)});return d.useEffect(()=>{if(!a)return;function e(e){e.open||(E(),_.openChangeTimeout.clear(),_.restTimeout.clear(),_.blockMouseMove=!0,_.restTimeoutPending=!1)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[a,i,_,E]),d.useEffect(()=>{if(!a)return;let e=f.current??(m?n.select(`domReferenceElement`):null);if(!q(e))return;function t(e){if(_.openChangeTimeout.clear(),_.blockMouseMove=!1,c&&!Wa(_.pointerType)||Fo(b.current)>0&&!Po(y.current,`open`))return;let t=Po(y.current,`open`,_.pointerType),r=e.currentTarget??null,i=n.select(`domReferenceElement`),a=r==null?!1:w(i,r,e.target),o=n.select(`open`),s=!o||a;a&&o?n.setOpen(!0,X(hr,e,r)):t?_.openChangeTimeout.start(t,()=>{s&&n.setOpen(!0,X(hr,e,r))}):s&&n.setOpen(!0,X(hr,e,r))}function i(e){if(S()){D();return}E();let t=Mo(n.select(`domReferenceElement`));_.restTimeout.clear(),_.restTimeoutPending=!1;let i=r.current.floatingContext??h?.();if(!C(e.relatedTarget)){if(v.current&&i){n.select(`open`)||_.openChangeTimeout.clear();let r=f.current;_.handler=v.current({...i,tree:g,x:e.clientX,y:e.clientY,onClose(){D(),E(),x.current&&!S()&&r===n.select(`domReferenceElement`)&&T(e,!0)}}),t.addEventListener(`mousemove`,_.handler),_.handler(e);return}(_.pointerType!==`touch`||!Aa(n.select(`floatingElement`),e.relatedTarget))&&T(e)}}return u&&e.addEventListener(`mousemove`,t,{once:!0}),e.addEventListener(`mouseenter`,t),e.addEventListener(`mouseleave`,i),()=>{u&&e.removeEventListener(`mousemove`,t),e.removeEventListener(`mouseenter`,t),e.removeEventListener(`mouseleave`,i)}},[E,D,r,y,T,n,a,v,_,m,w,S,C,c,u,b,f,g,x,h]),d.useMemo(()=>{if(!a)return;function e(e){_.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,r=e.currentTarget,i=n.select(`domReferenceElement`),a=n.select(`open`),o=w(i,r,e.target);if(c&&!Wa(_.pointerType))return;let s=Fo(b.current);if(a&&!o||s===0||!o&&_.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;_.restTimeout.clear();function l(){if(_.restTimeoutPending=!1,S())return;let e=n.select(`open`);!_.blockMouseMove&&(!e||o)&&n.setOpen(!0,X(hr,t,r))}_.pointerType===`touch`?lr.flushSync(()=>{l()}):o&&a?l():(_.restTimeoutPending=!0,_.restTimeout.start(s,l))}}},[a,_,S,w,c,n,b])}function kl(e=[]){let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=e.map(e=>e?.trigger),a=d.useCallback(t=>Al(t,e,`reference`),t),o=d.useCallback(t=>Al(t,e,`floating`),n),s=d.useCallback(t=>Al(t,e,`item`),r),c=d.useCallback(t=>Al(t,e,`trigger`),i);return d.useMemo(()=>({getReferenceProps:a,getFloatingProps:o,getItemProps:s,getTriggerProps:c}),[a,o,s,c])}function Al(e,t,n){let r=new Map,i=n===`item`,a={};n===`floating`&&(a.tabIndex=-1,a[Ca]=``);for(let t in e)i&&e&&(t===`active`||t===`selected`)||(a[t]=e[t]);for(let o=0;o<t.length;o+=1){let s,c=t[o]?.[n];s=typeof c==`function`?e?c(e):null:c,s&&jl(a,s,i,r)}return jl(a,e,i,r),a}function jl(e,t,n,r){for(let i in t){let a=t[i];n&&(i===`active`||i===`selected`)||(i.startsWith(`on`)?(r.has(i)||r.set(i,[]),typeof a==`function`&&(r.get(i)?.push(a),e[i]=(...e)=>r.get(i)?.map(t=>t(...e)).find(e=>e!==void 0))):e[i]=a)}}var Ml=`Escape`;function Nl(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Pl(e,t){return Nl(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function Fl(e,t,n){return Nl(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Il(e,t,n){return Nl(t,n?e===Ta:e===Ea,e===Oa)}function Ll(e,t,n,r){return t===`both`||t===`horizontal`&&r&&r>1?e===Ml:Nl(t,n?e===Ea:e===Ta,e===Da)}function Rl(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),o=n.context.dataRef,{listRef:s,activeIndex:c,onNavigate:l=()=>{},enabled:u=!0,selectedIndex:f=null,allowEscape:p=!1,loopFocus:m=!1,nested:h=!1,rtl:g=!1,virtual:_=!1,focusItemOnOpen:v=`auto`,focusItemOnHover:y=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:S=`vertical`,parentOrientation:C,cols:w=1,id:T,resetOnPointerLeave:E=!0,externalTree:D}=t,O=Bo(Ra(i)),k=Qo(),A=$o(D);Y(()=>{o.current.orientation=S},[o,S]);let j=Ia(a),M=d.useRef(v),N=d.useRef(f??-1),P=d.useRef(null),F=d.useRef(!0),I=J(e=>{l(N.current===-1?null:N.current,e)}),ee=d.useRef(I),te=d.useRef(!!i),L=d.useRef(r),R=d.useRef(!1),z=d.useRef(!1),B=Bo(x),ne=Bo(r),re=Bo(f),V=Bo(E),ie=J(()=>{function e(e){_?A?.events.emit(`virtualfocus`,e):Wo(e,{sync:R.current,preventScroll:!0})}let t=s.current[N.current],n=z.current;t&&e(t),(R.current?e=>e():requestAnimationFrame)(()=>{let r=s.current[N.current]||t;r&&(t||e(r),oe&&(n||!F.current)&&r.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});Y(()=>{u&&(r&&i?(N.current=f??-1,M.current&&f!=null&&(z.current=!0,I())):te.current&&(N.current=-1,ee.current()))},[u,r,i,f,I]),Y(()=>{if(u){if(!r){R.current=!1;return}if(i)if(c==null){if(R.current=!1,re.current!=null)return;if(te.current&&(N.current=-1,ie()),(!L.current||!te.current)&&M.current&&(P.current!=null||M.current===!0&&P.current==null)){let e=0,t=()=>{s.current[0]==null?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e+=1):(N.current=P.current==null||Fl(P.current,S,g)||h?Co(s):wo(s),P.current=null,I())};t()}}else So(s,c)||(N.current=c,ie(),z.current=!1)}},[u,r,i,c,re,h,s,S,g,I,ie,B]),Y(()=>{if(!u||i||!A||_||!te.current)return;let e=A.nodesRef.current,t=e.find(e=>e.id===k)?.context?.elements.floating,n=ka(Mo(i)),r=e.some(e=>e.context&&Aa(e.context.elements.floating,n));t&&!r&&F.current&&t.focus({preventScroll:!0})},[u,i,A,k,_]),Y(()=>{ee.current=I,L.current=r,te.current=!!i}),Y(()=>{r||(P.current=null,M.current=v)},[r,v]);let ae=c!=null,oe=d.useMemo(()=>{function e(e){if(!ne.current)return;let t=s.current.indexOf(e.currentTarget);t!==-1&&N.current!==t&&(N.current=t,I(e))}return{onFocus(t){R.current=!0,e(t)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(t){R.current=!0,z.current=!1,y&&e(t)},onPointerLeave(e){if(!ne.current||!F.current||e.pointerType===`touch`)return;R.current=!0;let t=e.relatedTarget;if(!(!y||s.current.includes(t))&&V.current&&(Wo(null,{sync:!0}),N.current=-1,I(e),!_)){let e=O.current,t=ka(Mo(e));e&&Aa(e,t)&&e.focus({preventScroll:!0})}}}},[ne,O,y,s,I,V,_]),se=d.useCallback(()=>C??A?.nodesRef.current.find(e=>e.id===k)?.context?.dataRef?.current.orientation,[k,A,C]),ce=J(e=>{if(F.current=!1,R.current=!0,e.which===229||!ne.current&&e.currentTarget===O.current)return;if(h&&Ll(e.key,S,g,w)){Pl(e.key,se())||Ba(e),n.setOpen(!1,X(br,e.nativeEvent)),hn(a)&&(_?A?.events.emit(`virtualfocus`,a):a.focus());return}let t=N.current,i=Co(s,x),o=wo(s,x);if(j||(e.key===`Home`&&(Ba(e),N.current=i,I(e)),e.key===`End`&&(Ba(e),N.current=o,I(e))),w>1){let t=Array.from({length:s.current.length},()=>({width:1,height:1})),n=Do(t,w,!1),r=n.findIndex(e=>e!=null&&!Ao(s,e,x)),a=n.reduce((e,t,n)=>t!=null&&!Ao(s,t,x)?n:e,-1),c=n[Eo({current:n.map(e=>e==null?null:s.current[e])},{event:e,orientation:S,loopFocus:m,rtl:g,cols:w,disabledIndices:ko([...(typeof x==`function`?null:x)||s.current.map((e,t)=>Ao(s,t,x)?t:void 0),void 0],n),minIndex:r,maxIndex:a,prevIndex:Oo(N.current>o?i:N.current,t,n,w,e.key===`ArrowDown`?`bl`:e.key===(g?`ArrowLeft`:`ArrowRight`)?`tr`:`tl`),stopEvent:!0})];if(c!=null&&(N.current=c,I(e)),S===`both`)return}if(Pl(e.key,S)){if(Ba(e),r&&!_&&ka(e.currentTarget.ownerDocument)===e.currentTarget){N.current=Fl(e.key,S,g)?i:o,I(e);return}Fl(e.key,S,g)?m?t>=o?p&&t!==s.current.length?N.current=-1:(R.current=!1,N.current=i):N.current=To(s,{startingIndex:t,disabledIndices:x}):N.current=Math.min(o,To(s,{startingIndex:t,disabledIndices:x})):m?t<=i?p&&t!==-1?N.current=s.current.length:(R.current=!1,N.current=o):N.current=To(s,{startingIndex:t,decrement:!0,disabledIndices:x}):N.current=Math.max(i,To(s,{startingIndex:t,decrement:!0,disabledIndices:x})),So(s,N.current)&&(N.current=-1),I(e)}}),le=d.useMemo(()=>_&&r&&ae&&{"aria-activedescendant":`${T}-${c}`},[_,r,ae,T,c]),ue=d.useMemo(()=>({"aria-orientation":S===`both`?void 0:S,...j?{}:le,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&r&&!_){let t=Ma(e.nativeEvent);if(t&&!Aa(O.current,t))return;Ba(e),n.setOpen(!1,X(vr,e.nativeEvent)),hn(a)&&a.focus();return}ce(e)},onPointerMove(){F.current=!0}}),[le,ce,O,S,j,n,r,_,a]),H=d.useMemo(()=>{function e(e){v===`auto`&&Ha(e.nativeEvent)&&(M.current=!_)}function t(e){M.current=v,v===`auto`&&Ua(e.nativeEvent)&&(M.current=!0)}return{onKeyDown(e){let t=n.select(`open`);F.current=!1;let r=e.key.startsWith(`Arrow`),i=Il(e.key,se(),g),a=Pl(e.key,S),o=(h?i:a)||e.key===`Enter`||e.key.trim()===``;if(_&&t)return ce(e);if(!(!t&&!b&&r)){if(o){let t=Pl(e.key,se());P.current=h&&t?null:e.key}if(h){i&&(Ba(e),t?(N.current=Co(s,B.current),I(e)):n.setOpen(!0,X(br,e.nativeEvent,e.currentTarget)));return}a&&(re.current!=null&&(N.current=re.current),Ba(e),!t&&b?n.setOpen(!0,X(br,e.nativeEvent,e.currentTarget)):ce(e),t&&I(e))}},onFocus(e){n.select(`open`)&&!_&&(N.current=-1,I(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[ce,B,v,s,h,I,n,b,S,se,g,re,_]),de=d.useMemo(()=>({...le,...H}),[le,H]);return d.useMemo(()=>u?{reference:de,floating:ue,item:oe,trigger:H}:{},[u,de,ue,H,oe])}function zl(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.context.dataRef,i=n.useState(`open`),{listRef:a,elementsRef:o,activeIndex:s,onMatch:c,onTypingChange:l,enabled:u=!0,resetMs:f=750,selectedIndex:p=null}=t,m=Sa(),h=d.useRef(``),g=d.useRef(p??s??-1),_=d.useRef(null);Y(()=>{!i&&p!==null||(m.clear(),_.current=null,h.current!==``&&(h.current=``))},[i,p,m]),Y(()=>{i&&h.current===``&&(g.current=p??s??-1)},[i,p,s]);let v=J(e=>{e?r.current.typing||(r.current.typing=e,l?.(e)):r.current.typing&&(r.current.typing=e,l?.(e))}),y=J(e=>{function t(e){let t=o?.current[e];return!t||jo(t)}function n(e,n,r=0){if(e.length===0)return-1;let i=(r%e.length+e.length)%e.length,a=n.toLocaleLowerCase();for(let n=0;n<e.length;n+=1){let r=(i+n)%e.length;if(!(!e[r]?.toLocaleLowerCase().startsWith(a)||!t(r)))return r}return-1}let r=a.current;if(h.current.length>0&&e.key===` `&&(Ba(e),v(!0)),h.current.length>0&&h.current[0]!==` `&&n(r,h.current)===-1&&e.key!==` `&&v(!1),r==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;i&&e.key!==` `&&(Ba(e),v(!0));let l=h.current===``;l&&(g.current=p??s??-1),r.every(e=>e?e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase():!0)&&h.current===e.key&&(h.current=``,g.current=_.current),h.current+=e.key,m.start(f,()=>{h.current=``,g.current=_.current,v(!1)});let u=((l?p??s??-1:g.current)??0)+1,d=n(r,h.current,u);d===-1?e.key!==` `&&(h.current=``,v(!1)):(c?.(d),_.current=d)}),b=J(e=>{let t=e.relatedTarget,r=n.select(`domReferenceElement`),i=n.select(`floatingElement`),a=Aa(r,t),o=Aa(i,t);a||o||(m.clear(),h.current=``,g.current=_.current,v(!1))}),x=d.useMemo(()=>({onKeyDown:y,onBlur:b}),[y,b]),S=d.useMemo(()=>({onKeyDown:y,onBlur:b}),[y,b]);return d.useMemo(()=>u?{reference:x,floating:S}:{},[u,x,S])}var Bl=.1,Vl=Bl*Bl,$=.5;function Hl(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Ul(e,t,n,r,i,a,o,s,c,l){let u=!1;return Hl(e,t,n,r,i,a)&&(u=!u),Hl(e,t,i,a,o,s)&&(u=!u),Hl(e,t,o,s,c,l)&&(u=!u),Hl(e,t,c,l,n,r)&&(u=!u),u}function Wl(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Gl(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Kl(e={}){let{blockPointerEvents:t=!1}=e,n=new xa,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Vl;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=Ma(r),g=r.type===`mouseleave`,_=Aa(u,h),v=Aa(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&q(r.relatedTarget)&&Aa(u,r.relatedTarget))return;function y(){return!!(s&&za(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=Gl(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=Gl(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=Gl(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=Gl(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!Wl(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?$/2:$*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+$+1,o=C||T?S.bottom-$:S.top,s=C?T?S.bottom-$:S.top:S.bottom-$;M=Ul(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?$/2:$*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-$,o=C||T?S.top+$:S.bottom,s=C?T?S.top+$:S.bottom:S.top+$;M=Ul(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?$/2:$*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+$+1,o=w||E?S.right-$:S.left,s=w?E?S.right-$:S.left:S.right-$;M=Ul(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?$/2:$*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-$,o=w||E?S.left+$:S.right,s=w?E?S.left+$:S.right:S.left+$;M=Ul(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}M?l||n.start(40,b):b()}};return r.__options={blockPointerEvents:t},r}var ql=`ArrowUp`,Jl=`ArrowDown`,Yl=`ArrowLeft`,Xl=`ArrowRight`,Zl=`Home`,Ql=new Set([Yl,Xl]),$l=new Set([Yl,Xl,Zl,`End`]),eu=new Set([ql,Jl]),tu=new Set([ql,Jl,Zl,`End`]),nu=new Set([...Ql,...eu]),ru=new Set([...nu,Zl,`End`]),iu=new Set([`Shift`,`Control`,`Alt`,`Meta`]);function au(e){return hn(e)&&e.tagName===`INPUT`}function ou(e){return!!(au(e)&&e.selectionStart!=null||hn(e)&&e.tagName===`TEXTAREA`)}function su(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=cu(e,t,`left`),a=lu(e),o=lu(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginRight<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=cu(e,t,`top`),r=lu(e),i=lu(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function cu(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function lu(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}function uu(e){return e===`starting`?De:Ee}function du(e){return U(19)?e:e?`true`:void 0}var fu=d.createContext(void 0);function pu(){return d.useContext(fu)?.direction??`ltr`}var mu=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,offsetParent:d=`real`}=eo(e,t)||{};if(l==null)return{};let f=yo(u),p={x:n,y:r},m=oo(i),h=io(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=$a(k,j,A),N=!c.arrow&&no(i)!=null&&j!==M&&a.reference[h]/2-(j<k?D:O)-g[h]/2<0,P=N?j<k?j-k:j-A:0;return{[m]:p[m]+P,data:{[m]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),hu=(e,t)=>({...mu(e),options:[e,t]}),gu={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await gc().fn(e)).data?.referenceHidden||a}}}},_u={sideX:`left`,sideY:`top`},vu={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=fn(i),l=c.getComputedStyle(i);if(!(l.transitionDuration!==`0s`&&l.transitionDuration!==``))return{x:t,y:n,data:_u};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=Mo(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=to(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:_u.sideX,g=f===`top`?`bottom`:_u.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}};function yu(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function bu(e,t,n){let{rects:r,placement:i}=e;return{side:yu(t,to(i),n),align:no(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function xu(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:f=!1,keepMounted:p=!1,floatingRootContext:m,mounted:h,collisionAvoidance:g,shiftCrossAxis:_=!1,nodeId:v,adaptiveOrigin:y,lazyFlip:b=!1,externalTree:x}=e,[S,C]=d.useState(null);!h&&S!==null&&C(null);let w=g.side||`flip`,T=g.align||`flip`,E=g.fallbackAxisSide||`end`,D=typeof t==`function`?t:void 0,O=J(D),k=D?O:t,A=Bo(t),j=pu()===`rtl`,M=S||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":j?`left`:`right`,"inline-start":j?`right`:`left`}[r],N=a===`center`?M:`${M}-${a}`,P=c,F=r===`bottom`?1:0,I=r===`top`?1:0,ee=r===`right`?1:0,te=r===`left`?1:0;typeof P==`number`?P={top:P+F,right:P+te,bottom:P+I,left:P+ee}:P&&={top:(P.top||0)+F,right:(P.right||0)+te,bottom:(P.bottom||0)+I,left:(P.left||0)+ee};let L={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:P},R=d.useRef(null),z=Bo(i),B=Bo(o),ne=[dc(e=>{let t=bu(e,r,j),n=typeof z.current==`function`?z.current(t):z.current,i=typeof B.current==`function`?B.current(t):B.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[typeof i==`function`?0:i,typeof o==`function`?0:o,j,r])],re=T===`none`&&w!==`shift`,V=!re&&(l||_||w===`shift`),ie=w===`none`?null:mc({...L,padding:{top:P.top+1,right:P.right+1,bottom:P.bottom+1,left:P.left+1},mainAxis:!_&&w===`flip`,crossAxis:T===`flip`?`alignment`:!1,fallbackAxisSideDirection:E}),ae=re?null:fc(e=>{let t=Mo(e.elements.floating).documentElement;return{...L,rootBoundary:_?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:T!==`none`,crossAxis:V,limiter:l||_?void 0:pc(e=>{if(!R.current)return{};let{width:t,height:n}=R.current.getBoundingClientRect(),r=ao(to(e.placement)),i=r===`y`?t:n,a=r===`y`?P.left+P.right:P.top+P.bottom;return{offset:i/2+a/2}})}},[L,l,_,P,T]);w===`shift`||T===`shift`||a===`center`?ne.push(ae,ie):ne.push(ie,ae),ne.push(hc({...L,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=window.devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),hu(()=>({element:R.current||document.createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=to(a),l=ao(c),u=R.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i(bu(e,r,j)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,V&&l===`y`&&b?S:x),{}}},gu,y),Y(()=>{!h&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[h,m]);let oe=d.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:se,elements:ce,x:le,y:ue,middlewareData:H,update:de,placement:fe,context:pe,isPositioned:me,floatingStyles:he}=gl({rootContext:m,placement:N,middleware:ne,strategy:n,whileElementsMounted:p?void 0:(...e)=>Zs(...e,oe),nodeId:v,externalTree:x}),{sideX:ge,sideY:_e}=H.adaptiveOrigin||_u,ve=me?n:`fixed`,ye=d.useMemo(()=>{let e=y?{position:ve,[ge]:le,[_e]:ue}:{position:ve,...he};return me||(e.opacity=0),e},[y,ve,ge,le,_e,ue,he,me]),U=d.useRef(null);Y(()=>{if(!h)return;let e=A.current,t=typeof e==`function`?e():e,n=(Su(t)?t.current:t)||null;n!==U.current&&(se.setPositionReference(n),U.current=n)},[h,se,k,A]),d.useEffect(()=>{if(!h)return;let e=A.current;typeof e!=`function`&&Su(e)&&e.current!==U.current&&(se.setPositionReference(e.current),U.current=e.current)},[h,se,k,A]),d.useEffect(()=>{if(p&&h&&ce.domReference&&ce.floating)return Zs(ce.domReference,ce.floating,de,oe)},[p,h,ce,de,oe]);let be=to(fe),xe=yu(r,be,j),Se=no(fe)||`center`,Ce=!!H.hide?.referenceHidden;Y(()=>{b&&h&&me&&C(be)},[b,h,me,be]);let we=d.useMemo(()=>({position:`absolute`,top:H.arrow?.y,left:H.arrow?.x}),[H.arrow]),Te=H.arrow?.centerOffset!==0;return d.useMemo(()=>({positionerStyles:ye,arrowStyles:we,arrowRef:R,arrowUncentered:Te,side:xe,align:Se,physicalSide:be,anchorHidden:Ce,refs:se,context:pe,isPositioned:me,update:de}),[ye,we,R,Te,xe,Se,be,Ce,se,pe,me,de])}function Su(e){return e!=null&&`current`in e}function Cu(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=J(i),o=d.useRef(0),s=fe(Tu).current,c=fe(wu).current,[l,u]=d.useState(0),f=d.useRef(l),p=J((e,t)=>{c.set(e,t??null),f.current+=1,u(f.current)}),m=J(e=>{c.delete(e),f.current+=1,u(f.current)}),h=d.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(Eu).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,l]);Y(()=>{if(typeof MutationObserver!=`function`||h.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(f.current+=1,u(f.current))});return h.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[h]),Y(()=>{f.current===l&&(n.current.length!==h.size&&(n.current.length=h.size),r&&r.current.length!==h.size&&(r.current.length=h.size),o.current=h.size),a(h)},[a,h,n,r,l]),Y(()=>()=>{n.current=[]},[n]),Y(()=>()=>{r&&(r.current=[])},[r]);let g=J(e=>(s.add(e),()=>{s.delete(e)}));Y(()=>{s.forEach(e=>e(h))},[s,h]);let _=d.useMemo(()=>({register:p,unregister:m,subscribeMapChange:g,elementsRef:n,labelsRef:r,nextIndexRef:o}),[p,m,g,n,r,o]);return(0,Hi.jsx)(ga.Provider,{value:_,children:t})}function wu(){return new Map}function Tu(){return new Set}function Eu(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function Du(e){let t=d.useRef(!0);t.current&&(t.current=!1,e())}function Ou(e){let t=d.useRef(``),n=d.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:d.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function ku(e){let[t,n]=d.useState(null),r=J((t,r)=>{e||n(r||(ca?`touch`:``))});Cr(e,t=>{t&&!e&&n(null)});let{onClick:i,onPointerDown:a}=Ou(r);return d.useMemo(()=>({openMethod:t,triggerProps:{onClick:i,onPointerDown:a}}),[t,i,a])}function Au(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Bn(),{ref:i,index:a}=ya(e),o=n===a,s=d.useRef(null),c=pe(i,s);return{compositeProps:d.useMemo(()=>({tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}}),[o,r,a,t]),compositeRef:c,index:a}}var ju=d.createContext(null),Mu=d.createContext(null);function Nu(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=fr(),o=rr(t),s=n?i:void 0,c=fe(()=>Symbol(`labelable-control`)),l=d.useRef(!1),u=d.useRef(t!=null),f=J(()=>{!l.current||a===we||(l.current=!1,a(c.current,void 0))});return Y(()=>{if(a===we)return;let e;if(n){let n=r?.current;e=q(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{f();return}if(e===void 0){f();return}l.current=!0,a(c.current,e)},[t,r,s,a,n,o,c,f]),d.useEffect(()=>f,[f]),i??o}var Pu=(e,t)=>Object.is(e,t);function Fu(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Iu(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:Fu(e,t,n))}function Lu(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function Ru(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function zu(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(Ru(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function Bu(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?Lu(e.value):Lu(e)}var Vu={id:Q(e=>e.id),labelId:Q(e=>e.labelId),modal:Q(e=>e.modal),multiple:Q(e=>e.multiple),items:Q(e=>e.items),itemToStringLabel:Q(e=>e.itemToStringLabel),itemToStringValue:Q(e=>e.itemToStringValue),isItemEqualToValue:Q(e=>e.isItemEqualToValue),value:Q(e=>e.value),hasSelectedValue:Q(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Bu(t,r)!==``}),hasNullItemLabel:Q((e,t)=>t?zu(e.items):!1),open:Q(e=>e.open),mounted:Q(e=>e.mounted),forceMount:Q(e=>e.forceMount),transitionStatus:Q(e=>e.transitionStatus),openMethod:Q(e=>e.openMethod),activeIndex:Q(e=>e.activeIndex),selectedIndex:Q(e=>e.selectedIndex),isActive:Q((e,t)=>e.activeIndex===t),isSelected:Q((e,t,n)=>{let r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(e=>Fu(n,e,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:Fu(n,i,r)}),isSelectedByFocus:Q((e,t)=>e.selectedIndex===t),popupProps:Q(e=>e.popupProps),triggerProps:Q(e=>e.triggerProps),triggerElement:Q(e=>e.triggerElement),positionerElement:Q(e=>e.positionerElement),listElement:Q(e=>e.listElement),scrollUpArrowVisible:Q(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:Q(e=>e.scrollDownArrowVisible),hasScrollArrows:Q(e=>e.hasScrollArrows)};function Hu(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,autoComplete:l,disabled:u=!1,readOnly:f=!1,required:p=!1,modal:m=!0,actionsRef:h,inputRef:g,onOpenChangeComplete:_,items:v,multiple:y=!1,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S=Pu,highlightItemOnHover:C=!0,children:w}=e,{clearErrors:T}=cr(),{setDirty:E,setTouched:D,setFocused:O,shouldValidateOnChange:k,validityData:A,setFilled:j,name:M,disabled:N,validation:P,validationMode:F}=ar(),I=Nu({id:t}),ee=N||u,te=M??c,[L,R]=Kn({controlled:n,default:y?r??Te:r,name:`Select`,state:`value`}),[B,ne]=Kn({controlled:a,default:o,name:`Select`,state:`open`}),re=d.useRef([]),V=d.useRef([]),ie=d.useRef(null),ae=d.useRef(null),oe=d.useRef(0),se=d.useRef(null),ce=d.useRef([]),le=d.useRef(!1),ue=d.useRef(!1),H=d.useRef(null),de=d.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),me=d.useRef(!1),{mounted:he,setMounted:ge,transitionStatus:_e}=Lr(B),{openMethod:ve,triggerProps:ye}=ku(B),U=fe(()=>new nl({id:I,labelId:void 0,modal:m,multiple:y,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,value:L,open:B,mounted:he,transitionStatus:_e,items:v,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,be=Qc(U,Vu.activeIndex),xe=Qc(U,Vu.selectedIndex),Se=Qc(U,Vu.triggerElement),Ce=Qc(U,Vu.positionerElement),we=d.useMemo(()=>y&&Array.isArray(L)&&L.length===0?``:Bu(L,x),[y,L,x]),De=d.useMemo(()=>y&&Array.isArray(L)?L.map(e=>Bu(e,x)):Bu(L,x),[y,L,x]),Oe=Bo(U.state.triggerElement);ur({id:I,commit:P.commit,value:L,controlRef:Oe,name:te,getValue:()=>De});let ke=d.useRef(L);Y(()=>{L!==ke.current&&U.set(`forceMount`,!0)},[U,L]),Y(()=>{j(y?Array.isArray(L)&&L.length>0:L!=null)},[y,L,j]),Y(function(){if(B)return;let e=ce.current;if(y){let t=Array.isArray(L)?L:[];if(t.length===0){U.set(`selectedIndex`,null);return}let n=t[t.length-1],r=Iu(e,n,S);U.set(`selectedIndex`,r===-1?null:r);return}let t=Iu(e,L,S);U.set(`selectedIndex`,t===-1?null:t)},[y,B,L,ce,S,U]),Cr(L,()=>{T(te),E(L!==A.initialValue),k()?P.commit(L):P.commit(L,!0)});let Ae=J((e,t)=>{if(s?.(e,t),!t.isCanceled&&(ne(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(D(!0),O(!1),F===`onBlur`&&P.commit(L)),!e&&U.state.activeIndex!==null)){let e=re.current[U.state.activeIndex];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}}),je=J(()=>{ge(!1),U.set(`activeIndex`,null),_?.(!1)});Ir({enabled:!h,open:B,ref:ie,onComplete(){B||je()}}),d.useImperativeHandle(h,()=>({unmount:je}),[je]);let Me=J((e,t)=>{i?.(e,t),!t.isCanceled&&R(e)}),Ne=J(()=>{let e=U.state.listElement||ie.current;if(!e)return;let t=e.scrollTop,n=e.scrollTop+e.clientHeight,r=t>1,i=n<e.scrollHeight-1;U.state.scrollUpArrowVisible!==r&&U.set(`scrollUpArrowVisible`,r),U.state.scrollDownArrowVisible!==i&&U.set(`scrollDownArrowVisible`,i)}),Pe=hl({open:B,onOpenChange:Ae,elements:{reference:Se,floating:Ce}}),{getReferenceProps:Fe,getFloatingProps:Ie,getItemProps:Le}=kl([es(Pe,{enabled:!f&&!ee,event:`mousedown`}),ss(Pe,{bubbles:!1}),Rl(Pe,{enabled:!f&&!ee,listRef:re,activeIndex:be,selectedIndex:xe,disabledIndices:Te,onNavigate(e){e===null&&!B||U.set(`activeIndex`,e)},focusItemOnHover:!1}),zl(Pe,{enabled:!f&&!ee&&(B||!y),listRef:V,activeIndex:be,selectedIndex:xe,onMatch(e){B?U.set(`activeIndex`,e):Me(ce.current[e],X(`none`))},onTypingChange(e){le.current=e}})]),Re=d.useMemo(()=>z(Fe(),ye,I?{id:I}:Ee),[Fe,ye,I]);Du(()=>{U.update({popupProps:Ie(),triggerProps:Re})}),Y(()=>{U.update({id:I,modal:m,multiple:y,value:L,open:B,mounted:he,transitionStatus:_e,popupProps:Ie(),triggerProps:Re,items:v,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,openMethod:ve})},[U,I,m,y,L,B,he,_e,Ie,Re,v,b,x,S,ve]);let ze=d.useMemo(()=>({store:U,name:te,required:p,disabled:ee,readOnly:f,multiple:y,itemToStringLabel:b,itemToStringValue:x,highlightItemOnHover:C,setValue:Me,setOpen:Ae,listRef:re,popupRef:ie,scrollHandlerRef:ae,handleScrollArrowVisibility:Ne,scrollArrowsMountedCountRef:oe,getItemProps:Le,events:Pe.context.events,valueRef:se,valuesRef:ce,labelsRef:V,typingRef:le,selectionRef:de,selectedItemTextRef:H,validation:P,onOpenChangeComplete:_,keyboardActiveRef:ue,alignItemWithTriggerActiveRef:me,initialValueRef:ke}),[U,te,p,ee,f,y,b,x,C,Me,Ae,Le,Pe.context.events,P,_,Ne]),Be=pe(g,P.inputRef),Ve=y&&Array.isArray(L)&&L.length>0,He=y?void 0:te,Ue=d.useMemo(()=>!y||!Array.isArray(L)||!te?null:L.map(e=>{let t=Bu(e,x);return(0,Hi.jsx)(`input`,{type:`hidden`,name:te,value:t},t)}),[y,L,te,x]);return(0,Hi.jsx)(ju.Provider,{value:ze,children:(0,Hi.jsxs)(Mu.Provider,{value:Pe,children:[w,(0,Hi.jsx)(`input`,{...P.getInputValidationProps({onFocus(){U.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.value,n=X(pr,e.nativeEvent);function r(){if(y)return;let e=ce.current.find(e=>Bu(e,x).toLowerCase()===t.toLowerCase());e!=null&&(E(e!==A.initialValue),Me(e,n),k()&&P.commit(e))}U.set(`forceMount`,!0),queueMicrotask(r)}}),id:I&&He==null?`${I}-hidden-input`:void 0,name:He,autoComplete:l,value:we,disabled:ee,required:p&&!Ve,readOnly:f,ref:Be,style:te?Yn:Jn,tabIndex:-1,"aria-hidden":!0}),Ue]})})}var Uu=d.createContext(void 0);function Wu(){let e=d.useContext(Uu);if(e===void 0)throw Error(H(64));return e}var Gu=function(e){return e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e}({}),Ku={tabActivationDirection:e=>({[Gu.activationDirection]:e})},qu=d.forwardRef(function(e,t){let{className:n,defaultValue:r=0,onValueChange:i,orientation:a=`horizontal`,render:o,value:s,...c}=e,l=pu(),u=Object.hasOwn(e,`defaultValue`),f=d.useRef([]),[p,m]=d.useState(()=>new Map),[h,g]=Kn({controlled:s,default:r,name:`Tabs`,state:`value`}),_=s!==void 0,[v,y]=d.useState(()=>new Map),[b,x]=d.useState(`none`),S=J((e,t)=>{i?.(e,t),!t.isCanceled&&(g(e),x(t.activationDirection))}),C=J((e,t)=>{m(n=>{if(n.get(e)===t)return n;let r=new Map(n);return r.set(e,t),r})}),w=J((e,t)=>{m(n=>{if(!n.has(e)||n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})}),T=d.useCallback(e=>p.get(e),[p]),E=d.useCallback(e=>{for(let t of v.values())if(e===t?.value)return t?.id},[v]),D=d.useCallback(e=>{if(e===void 0)return null;for(let[t,n]of v.entries())if(n!=null&&e===(n.value??n.index))return t;return null},[v]),O=d.useMemo(()=>({direction:l,getTabElementBySelectedValue:D,getTabIdByPanelValue:E,getTabPanelIdByValue:T,onValueChange:S,orientation:a,registerMountedTabPanel:C,setTabMap:y,unregisterMountedTabPanel:w,tabActivationDirection:b,value:h}),[l,D,E,T,S,a,C,y,w,b,h]),k=d.useMemo(()=>{for(let e of v.values())if(e!=null&&e.value===h)return e},[v,h]),A=d.useMemo(()=>{for(let e of v.values())if(e!=null&&!e.disabled)return e.value},[v]);Y(()=>{if(_||v.size===0)return;let e=k?.disabled;if(u&&e&&h===r||!e&&!(k==null&&h!==null))return;let t=A??null;h!==t&&(g(t),x(`none`))},[r,A,u,_,k,x,g,v,h]);let j=ke(`div`,e,{state:{orientation:a,tabActivationDirection:b},ref:t,props:c,stateAttributesMapping:Ku});return(0,Hi.jsx)(Uu.Provider,{value:O,children:(0,Hi.jsx)(Cu,{elementsRef:f,children:j})})}),Ju=`data-composite-item-active`,Yu=d.createContext(void 0);function Xu(){let e=d.useContext(Yu);if(e===void 0)throw Error(H(65));return e}var Zu=d.forwardRef(function(e,t){let{className:n,disabled:r=!1,render:i,value:a,id:o,nativeButton:s=!0,...c}=e,{value:l,getTabPanelIdByValue:u,orientation:f}=Wu(),{activateOnFocus:p,highlightedTabIndex:m,onTabActivation:h,registerTabResizeObserverElement:g,setHighlightedTabIndex:_,tabsListElement:v}=Xu(),y=rr(o),{compositeProps:b,compositeRef:x,index:S}=Au({metadata:d.useMemo(()=>({disabled:r,id:y,value:a}),[r,y,a])}),C=a===l,w=d.useRef(!1),T=d.useRef(null);d.useEffect(()=>{let e=T.current;if(e)return g(e)},[g]),Y(()=>{if(w.current){w.current=!1;return}if(!(C&&S>-1&&m!==S))return;let e=v;if(e!=null){let t=ka(Mo(e));if(t&&Aa(e,t))return}r||_(S)},[C,S,m,_,r,v]);let{getButtonProps:E,buttonRef:D}=Hn({disabled:r,native:s,focusableWhenDisabled:!0}),O=u(a),k=d.useRef(!1),A=d.useRef(!1);function j(e){C||r||h(a,X(pr,e.nativeEvent,void 0,{activationDirection:`none`}))}function M(e){C||(S>-1&&!r&&_(S),!r&&p&&(!k.current||k.current&&A.current)&&h(a,X(pr,e.nativeEvent,void 0,{activationDirection:`none`})))}function N(e){if(C||r)return;k.current=!0;function t(){k.current=!1,A.current=!1}(!e.button||e.button===0)&&(A.current=!0,Mo(e.currentTarget).addEventListener(`pointerup`,t,{once:!0}))}return ke(`button`,e,{state:{disabled:r,active:C,orientation:f},ref:[t,D,x,T],props:[b,{role:`tab`,"aria-controls":O,"aria-selected":C,id:y,onClick:j,onFocus:M,onPointerDown:N,[Ju]:C?``:void 0,onKeyDownCapture(){w.current=!0}},c,E]})}),Qu=function(e){return e.index=`data-index`,e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e.hidden=`data-hidden`,e[e.startingStyle=jr.startingStyle]=`startingStyle`,e[e.endingStyle=jr.endingStyle]=`endingStyle`,e}({}),$u={...Ku,...Pr},ed=d.forwardRef(function(e,t){let{className:n,value:r,render:i,keepMounted:a=!1,...o}=e,{value:s,getTabIdByPanelValue:c,orientation:l,tabActivationDirection:u,registerMountedTabPanel:f,unregisterMountedTabPanel:p}=Wu(),m=rr(),{ref:h,index:g}=ya({metadata:d.useMemo(()=>({id:m,value:r}),[m,r])}),_=r===s,{mounted:v,transitionStatus:y,setMounted:b}=Lr(_),x=!v,S=c(r),C={hidden:x,orientation:l,tabActivationDirection:u,transitionStatus:y},w=d.useRef(null),T=ke(`div`,e,{state:C,ref:[t,h,w],props:[{"aria-labelledby":S,hidden:x,id:m,role:`tabpanel`,tabIndex:_?0:-1,inert:du(!_),[Qu.index]:g},o],stateAttributesMapping:$u});return Ir({open:_,ref:w,onComplete(){_||b(!1)}}),Y(()=>{if(!(x&&!a)&&m!=null)return f(r,m),()=>{p(r,m)}},[x,a,r,m,f,p]),a||v?T:null});function td(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var nd=[];function rd(e){let{itemSizes:t,cols:n=1,loopFocus:r=!0,dense:i=!1,orientation:a=`both`,direction:o,highlightedIndex:s,onHighlightedIndexChange:c,rootRef:l,enableHomeAndEndKeys:u=!1,stopEventPropagation:f=!1,disabledIndices:p,modifierKeys:m=nd}=e,[h,g]=d.useState(0),_=n>1,v=d.useRef(null),y=pe(v,l),b=d.useRef([]),x=d.useRef(!1),S=s??h,C=J((e,t=!1)=>{if((c??g)(e),t){let t=b.current[e];su(v.current,t,o,a)}}),w=J(e=>{if(e.size===0||x.current)return;x.current=!0;let t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,r=n?t.indexOf(n):-1;r!==-1&&C(r),su(v.current,n,o,a)}),T=d.useMemo(()=>({"aria-orientation":a===`both`?void 0:a,ref:y,onFocus(e){!v.current||!ou(e.target)||e.target.setSelectionRange(0,e.target.value.length??0)},onKeyDown(e){let s=u?ru:nu;if(!s.has(e.key)||id(e,m)||!v.current)return;let c=o===`rtl`,l=c?Yl:Xl,d={horizontal:l,vertical:Jl,both:l}[a],h=c?Xl:Yl,g={horizontal:h,vertical:ql,both:h}[a];if(ou(e.target)&&!td(e.target)){let t=e.target.selectionStart,n=e.target.selectionEnd,r=e.target.value??``;if(t==null||e.shiftKey||t!==n||e.key!==g&&t<r.length||e.key!==d&&t>0)return}let y=S,x=Co(b,p),w=wo(b,p);if(_){let o=t||Array.from({length:b.current.length},()=>({width:1,height:1})),s=Do(o,n,i),l=s.findIndex(e=>e!=null&&!Ao(b,e,p)),u=s.reduce((e,t,n)=>t!=null&&!Ao(b,t,p)?n:e,-1);y=s[Eo({current:s.map(e=>e?b.current[e]:null)},{event:e,orientation:a,loopFocus:r,cols:n,disabledIndices:ko([...p||b.current.map((e,t)=>Ao(b,t)?t:void 0),void 0],s),minIndex:l,maxIndex:u,prevIndex:Oo(S>w?x:S,o,s,n,e.key===`ArrowDown`?`bl`:e.key===`ArrowRight`?`tr`:`tl`),rtl:c})]}let T={horizontal:[l],vertical:[Jl],both:[l,Jl]}[a],E={horizontal:[h],vertical:[ql],both:[h,ql]}[a],D=_?s:{horizontal:u?$l:Ql,vertical:u?tu:eu,both:s}[a];u&&(e.key===`Home`?y=x:e.key===`End`&&(y=w)),y===S&&(T.includes(e.key)||E.includes(e.key))&&(y=r&&y===w&&T.includes(e.key)?x:r&&y===x&&E.includes(e.key)?w:To(b,{startingIndex:y,decrement:E.includes(e.key),disabledIndices:p})),y!==S&&!So(b,y)&&(f&&e.stopPropagation(),D.has(e.key)&&e.preventDefault(),C(y,!0),queueMicrotask(()=>{b.current[y]?.focus()}))}}),[n,i,o,p,b,u,S,_,t,r,y,m,C,a,f]);return d.useMemo(()=>({props:T,highlightedIndex:S,onHighlightedIndexChange:C,elementsRef:b,disabledIndices:p,onMapChange:w,relayKeyboardEvent:T.onKeyDown}),[T,S,C,b,p,w])}function id(e,t){for(let n of iu.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function ad(e){let{render:t,className:n,refs:r=Te,props:i=Te,state:a=Ee,stateAttributesMapping:o,highlightedIndex:s,onHighlightedIndexChange:c,orientation:l,dense:u,itemSizes:f,loopFocus:p,cols:m,enableHomeAndEndKeys:h,onMapChange:g,stopEventPropagation:_=!0,rootRef:v,disabledIndices:y,modifierKeys:b,highlightItemOnHover:x=!1,tag:S=`div`,...C}=e,{props:w,highlightedIndex:T,onHighlightedIndexChange:E,elementsRef:D,onMapChange:O,relayKeyboardEvent:k}=rd({itemSizes:f,cols:m,loopFocus:p,dense:u,orientation:l,highlightedIndex:s,onHighlightedIndexChange:c,rootRef:v,stopEventPropagation:_,enableHomeAndEndKeys:h,direction:pu(),disabledIndices:y,modifierKeys:b}),A=ke(S,e,{state:a,ref:r,props:[w,...i,C],stateAttributesMapping:o}),j=d.useMemo(()=>({highlightedIndex:T,onHighlightedIndexChange:E,highlightItemOnHover:x,relayKeyboardEvent:k}),[T,E,x,k]);return(0,Hi.jsx)(zn.Provider,{value:j,children:(0,Hi.jsx)(Cu,{elementsRef:D,onMapChange:e=>{g?.(e),O(e)},children:A})})}var od=d.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,...o}=e,{getTabElementBySelectedValue:s,onValueChange:c,orientation:l,value:u,setTabMap:f,tabActivationDirection:p}=Wu(),[m,h]=d.useState(0),[g,_]=d.useState(null),v=d.useRef(new Set),y=d.useRef(new Set),b=d.useRef(null),x=J(()=>{v.current.forEach(e=>{e()})});d.useEffect(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{v.current.size&&x()});return b.current=e,g&&e.observe(g),y.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),b.current=null}},[g,x]);let S=J(e=>(v.current.add(e),()=>{v.current.delete(e)})),C=J(e=>(y.current.add(e),b.current?.observe(e),()=>{y.current.delete(e),b.current?.unobserve(e)})),w=cd(u,l,g,s),T=J((e,t)=>{e!==u&&(t.activationDirection=w(e),c(e,t))}),E={orientation:l,tabActivationDirection:p},D={"aria-orientation":l===`vertical`?`vertical`:void 0,role:`tablist`},O=d.useMemo(()=>({activateOnFocus:n,highlightedTabIndex:m,registerIndicatorUpdateListener:S,registerTabResizeObserverElement:C,onTabActivation:T,setHighlightedTabIndex:h,tabsListElement:g}),[n,m,S,C,T,h,g]);return(0,Hi.jsx)(Yu.Provider,{value:O,children:(0,Hi.jsx)(ad,{render:a,className:r,state:E,refs:[t,_],props:[D,o],stateAttributesMapping:Ku,highlightedIndex:m,enableHomeAndEndKeys:!0,loopFocus:i,orientation:l,onHighlightedIndexChange:h,onMapChange:f,disabledIndices:Te})})});function sd(e,t){let{left:n,top:r}=e.getBoundingClientRect(),{left:i,top:a}=t.getBoundingClientRect();return{left:n-i,top:r-a}}function cd(e,t,n,r){let[i,a]=d.useState(null);return Y(()=>{if(e==null||n==null){a(null);return}let i=r(e);if(i==null){a(null);return}let{left:o,top:s}=sd(i,n);a(t===`horizontal`?o:s)},[t,r,n,e]),d.useCallback(o=>{if(o===e)return`none`;if(o==null)return a(null),`none`;if(o!=null&&n!=null){let e=r(o);if(e!=null){let{left:r,top:o}=sd(e,n);if(i==null)return a(t===`horizontal`?r:o),`none`;if(t===`horizontal`){if(r<i)return a(r),`left`;if(r>i)return a(r),`right`}else if(o<i)return a(o),`up`;else if(o>i)return a(o),`down`}}return`none`},[r,t,i,n,e])}var ld=d.createContext(void 0);function ud(e){let t=d.useContext(ld);if(t===void 0&&!e)throw Error(H(72));return t}var dd={...ml,disabled:Q(e=>e.disabled),instantType:Q(e=>e.instantType),isInstantPhase:Q(e=>e.isInstantPhase),trackCursorAxis:Q(e=>e.trackCursorAxis),disableHoverablePopup:Q(e=>e.disableHoverablePopup),lastOpenChangeReason:Q(e=>e.openChangeReason),closeOnClick:Q(e=>e.closeOnClick),closeDelay:Q(e=>e.closeDelay),hasViewport:Q(e=>e.hasViewport)},fd=class e extends rl{constructor(e){super({...pd(),...e},{popupRef:d.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new ul},dd)}setOpen=(e,t)=>{let n=t.reason,r=n===hr,i=e&&n===`trigger-focus`,a=!e&&(n===`trigger-press`||n===`escape-key`);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let o=()=>{let r={open:e,openChangeReason:n};i?r.instantType=`focus`:a?r.instantType=`dismiss`:n===`trigger-hover`&&(r.instantType=void 0);let o=t.trigger?.id??null;(o||e)&&(r.activeTriggerId=o,r.activeTriggerElement=t.trigger??null),this.update(r)};r?lr.flushSync(o):o()};static useStore(t,n){let r=fe(()=>new e(n)).current,i=t??r,a=_l({popupStore:i,onOpenChange:i.setOpen});return i.state.floatingRootContext=a,i}};function pd(){return{...fl(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var md=Kc(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:f=null,children:p}=e,m=fd.useStore(l?.store,{open:n,openProp:r,activeTriggerId:f,triggerIdProp:u});Du(()=>{r===void 0&&m.state.open===!1&&n===!0&&m.update({open:!0,activeTriggerId:f})}),m.useControlledProp(`openProp`,r),m.useControlledProp(`triggerIdProp`,u),m.useContextCallback(`onOpenChange`,s),m.useContextCallback(`onOpenChangeComplete`,c);let h=m.useState(`open`),g=!t&&h,_=m.useState(`activeTriggerId`),v=m.useState(`payload`);m.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i}),Y(()=>{h&&t&&m.setOpen(!1,X(xr))},[h,t,m]),m.useSyncedValue(`disabled`,t),cl(m);let{forceUnmount:y,transitionStatus:b}=ll(g,m),x=m.useState(`isInstantPhase`),S=m.useState(`instantType`),C=m.useState(`lastOpenChangeReason`),w=d.useRef(null);Y(()=>{b===`ending`&&C===`none`||b!==`ending`&&x?(S!==`delay`&&(w.current=S),m.set(`instantType`,`delay`)):w.current!==null&&(m.set(`instantType`,w.current),w.current=null)},[b,x,C,S,m]),Y(()=>{g&&(_??m.set(`payload`,void 0))},[m,_,g]);let T=d.useCallback(()=>{m.setOpen(!1,hd(m,Sr))},[m]);d.useImperativeHandle(o,()=>({unmount:y,close:T}),[y,T]);let E=m.useState(`floatingRootContext`),{getReferenceProps:D,getFloatingProps:O,getTriggerProps:k}=kl([ss(E,{enabled:!t,referencePress:()=>m.select(`closeOnClick`)}),rs(E,{enabled:!t&&a!==`none`,axis:a===`none`?void 0:a})]),A=d.useMemo(()=>D(),[D]),j=d.useMemo(()=>k(),[k]),M=d.useMemo(()=>O(),[O]);return m.useSyncedValues({activeTriggerProps:A,inactiveTriggerProps:j,popupProps:M}),(0,Hi.jsx)(ld.Provider,{value:m,children:typeof p==`function`?p({payload:v}):p})});function hd(e,t){let n=X(t);return n.preventUnmountOnClose=()=>{e.set(`preventUnmountingOnClose`,!0)},n}var gd=d.createContext(void 0);function _d(){return d.useContext(gd)}var vd=function(e){return e[e.popupOpen=Zi.popupOpen]=`popupOpen`,e.triggerDisabled=`data-trigger-disabled`,e}({}),yd=qc(function(e,t){let{className:n,render:r,handle:i,payload:a,disabled:o,delay:s,closeOnClick:c=!0,closeDelay:l,id:u,...f}=e,p=ud(!0),m=i?.store??p;if(!m)throw Error(H(82));let h=rr(u),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=d.useRef(null),b=s??600,x=l??0,{registerTrigger:S,isMountedByThisTrigger:C}=sl(h,y,m,{payload:a,closeOnClick:c,closeDelay:x}),w=_d(),{delayRef:T,isInstantPhase:E,hasProvider:D}=zo(v,{open:_});m.useSyncedValue(`isInstantPhase`,E);let O=m.useState(`disabled`),k=o??O,A=m.useState(`trackCursorAxis`),j=m.useState(`disableHoverablePopup`),M=Ol(v,{enabled:!k,mouseOnly:!0,move:!1,handleClose:!j&&A!==`both`?Kl():null,restMs(){let e=w?.delay,t=typeof T.current==`object`?T.current.open:void 0,n=b;return D&&(n=t===0?0:s??e??b),n},delay(){let e=typeof T.current==`object`?T.current.close:void 0,t=x;return l==null&&D&&(t=e),{close:t}},triggerElementRef:y,isActiveTrigger:g}),N=yl(v,{enabled:!k}).reference,P={open:_},F=m.useState(`triggerProps`,C);return ke(`button`,e,{state:P,ref:[t,S,y],props:[M,N,F,{onPointerDown(){m.set(`closeOnClick`,c)},id:h,[vd.triggerDisabled]:k?``:void 0},f],stateAttributesMapping:na})}),bd=d.createContext(void 0);function xd(){let e=d.useContext(bd);if(e===void 0)throw Error(H(70));return e}var Sd=d.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,...o}=e,{portalNode:s,portalSubtree:c}=Jo({container:r,ref:t,componentProps:e,elementProps:o});return!c&&!s?null:(0,Hi.jsxs)(d.Fragment,{children:[c,s&&lr.createPortal(n,s)]})}),Cd=d.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return ud().useState(`mounted`)||n?(0,Hi.jsx)(bd.Provider,{value:n,children:(0,Hi.jsx)(Sd,{ref:t,...r})}):null}),wd=d.createContext(void 0);function Td(){let e=d.useContext(wd);if(e===void 0)throw Error(H(71));return e}var Ed=d.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:f=5,arrowPadding:p=5,sticky:m=!1,disableAnchorTracking:h=!1,collisionAvoidance:g=Oe,..._}=e,v=ud(),y=xd(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=xu({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:f,sticky:m,arrowPadding:p,disableAnchorTracking:h,keepMounted:y,collisionAvoidance:g,adaptiveOrigin:v.useState(`hasViewport`)?vu:void 0}),O=d.useMemo(()=>{let e={};return(!b||S===`both`||C)&&(e.pointerEvents=`none`),{role:`presentation`,hidden:!x,style:{...D.positionerStyles,...e}}},[b,S,C,x,D.positionerStyles]),k=d.useMemo(()=>({open:b,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:S===`none`?T:`tracking-cursor`}),[b,D.side,D.align,D.anchorHidden,S,T]),A=d.useMemo(()=>({...k,arrowRef:D.arrowRef,arrowStyles:D.arrowStyles,arrowUncentered:D.arrowUncentered}),[k,D.arrowRef,D.arrowStyles,D.arrowUncentered]),j=ke(`div`,e,{state:k,props:[O,uu(E),_],ref:[t,v.useStateSetter(`positionerElement`)],stateAttributesMapping:ra});return(0,Hi.jsx)(wd.Provider,{value:A,children:j})}),Dd={...ra,...Pr},Od=d.forwardRef(function(e,t){let{className:n,render:r,...i}=e,a=ud(),{side:o,align:s}=Td(),c=a.useState(`open`),l=a.useState(`instantType`),u=a.useState(`transitionStatus`),d=a.useState(`popupProps`),f=a.useState(`floatingRootContext`);Ir({open:c,ref:a.context.popupRef,onComplete(){c&&a.context.onOpenChangeComplete?.(!0)}});let p=a.useState(`disabled`),m=a.useState(`closeDelay`);return El(f,{enabled:!p,closeDelay:m}),ke(`div`,e,{state:{open:c,side:o,align:s,instant:l,transitionStatus:u},ref:[t,a.context.popupRef,a.useStateSetter(`popupElement`)],props:[d,uu(u),i],stateAttributesMapping:Dd})}),kd=d.forwardRef(function(e,t){let{className:n,render:r,...i}=e,a=ud().useState(`instantType`),{open:o,arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=Td();return ke(`div`,e,{state:{open:o,side:c,align:l,uncentered:u,instant:a},ref:[t,s],props:[{style:d,"aria-hidden":!0},i],stateAttributesMapping:ra})}),Ad=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=d.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),a=d.useMemo(()=>({open:t,close:n}),[t,n]);return(0,Hi.jsx)(gd.Provider,{value:i,children:(0,Hi.jsx)(Ro,{delay:a,timeoutMs:r,children:e.children})})};export{Yr as $,vi as A,v as At,ci as B,Ti as C,T as Ct,xi as D,x as Dt,Si as E,S as Et,pi as F,ri as G,oi as H,fi as I,ei as J,ni as K,di as L,gi as M,g as Mt,hi as N,h as Nt,bi as O,b as Ot,mi as P,m as Pt,Xr as Q,ui as R,Ei as S,E as St,Ci as T,C as Tt,ai as U,si as V,ii as W,Qr as X,$r as Y,Zr as Z,ji as _,j as _t,Cd as a,ln as at,Oi as b,O as bt,od as c,Pe as ct,qu as d,ee as dt,Jr as et,Hu as f,I as ft,Mi as g,M as gt,Ui as h,N as ht,Ed as i,Gn as it,_i as j,_ as jt,yi as k,y as kt,ed as l,z as lt,Gi as m,P as mt,kd as n,Kr as nt,yd as o,ze as ot,Yi as p,F as pt,ti as q,Od as r,Gr as rt,md as s,Ie as st,Ad as t,qr as tt,Zu as u,te as ut,Ai as v,A as vt,wi as w,w as wt,Di as x,D as xt,ki as y,k as yt,li as z};
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>selftune — Dashboard</title>
|
|
7
7
|
<link rel="icon" type="image/png" href="/favicon.png" />
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-Coq42hE4.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-Dw2cE7zH.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-C5oyHiV1.js">
|
|
11
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-ui-
|
|
11
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-ui-B0H8s1mP.js">
|
|
12
12
|
<link rel="modulepreload" crossorigin href="/assets/vendor-table-Bc_bbKd8.js">
|
|
13
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
13
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BcXquWFB.css">
|
|
14
14
|
</head>
|
|
15
15
|
<body>
|
|
16
16
|
<div id="root"></div>
|
|
@@ -28,6 +28,15 @@ interface UpdateCheckCache {
|
|
|
28
28
|
latestVersion: string;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
export interface CachedUpdateStatus {
|
|
32
|
+
checkedAt: number | null;
|
|
33
|
+
currentVersion: string;
|
|
34
|
+
latestVersion: string | null;
|
|
35
|
+
updateAvailable: boolean;
|
|
36
|
+
autoUpdateSupported: boolean;
|
|
37
|
+
updateHint: string | null;
|
|
38
|
+
}
|
|
39
|
+
|
|
31
40
|
type InstallSource = "bun-global" | "npm-global";
|
|
32
41
|
|
|
33
42
|
interface UpdateCommand {
|
|
@@ -160,6 +169,24 @@ export function getSelftuneUpdateHint(version = "latest", options?: UpdateComman
|
|
|
160
169
|
);
|
|
161
170
|
}
|
|
162
171
|
|
|
172
|
+
export function getCachedUpdateStatus(options?: UpdateCommandOptions): CachedUpdateStatus {
|
|
173
|
+
const currentVersion = getCurrentVersion();
|
|
174
|
+
const cache = readCache();
|
|
175
|
+
const latestVersion = cache?.latestVersion?.trim() ? cache.latestVersion.trim() : null;
|
|
176
|
+
const autoUpdateSupported = resolveSelftuneUpdateCommand(currentVersion, options) !== null;
|
|
177
|
+
const updateAvailable =
|
|
178
|
+
latestVersion !== null && compareSemver(currentVersion, latestVersion) < 0;
|
|
179
|
+
|
|
180
|
+
return {
|
|
181
|
+
checkedAt: cache?.lastCheck ?? null,
|
|
182
|
+
currentVersion,
|
|
183
|
+
latestVersion,
|
|
184
|
+
updateAvailable,
|
|
185
|
+
autoUpdateSupported,
|
|
186
|
+
updateHint: updateAvailable ? getSelftuneUpdateHint(latestVersion, options) : null,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
|
|
163
190
|
function readSkillVersion(skillDir: string): string | null {
|
|
164
191
|
try {
|
|
165
192
|
const skillPath = join(skillDir, "SKILL.md");
|
|
@@ -257,7 +284,11 @@ export async function autoUpdate(): Promise<void> {
|
|
|
257
284
|
signal: controller.signal,
|
|
258
285
|
});
|
|
259
286
|
if (!res.ok) {
|
|
260
|
-
writeCache({
|
|
287
|
+
writeCache({
|
|
288
|
+
lastCheck: Date.now(),
|
|
289
|
+
currentVersion,
|
|
290
|
+
latestVersion: "",
|
|
291
|
+
});
|
|
261
292
|
return;
|
|
262
293
|
}
|
|
263
294
|
const data = (await res.json()) as { version: string };
|
|
@@ -282,17 +313,14 @@ export async function autoUpdate(): Promise<void> {
|
|
|
282
313
|
}
|
|
283
314
|
|
|
284
315
|
async function performUpdate(currentVersion: string, latestVersion: string): Promise<void> {
|
|
285
|
-
console.error(`[selftune] Update available: v${currentVersion} → v${latestVersion}. Updating...`);
|
|
286
|
-
|
|
287
316
|
const updateCommand = resolveSelftuneUpdateCommand(latestVersion);
|
|
288
317
|
if (!updateCommand) {
|
|
289
|
-
|
|
290
|
-
"[selftune] Auto-update skipped. Current install path is not a supported global package install.",
|
|
291
|
-
);
|
|
292
|
-
console.error(`[selftune] Refresh manually: ${getSelftuneUpdateHint(latestVersion)}`);
|
|
318
|
+
syncInstalledSkillFiles();
|
|
293
319
|
return;
|
|
294
320
|
}
|
|
295
321
|
|
|
322
|
+
console.error(`[selftune] Update available: v${currentVersion} → v${latestVersion}. Updating...`);
|
|
323
|
+
|
|
296
324
|
const result = spawnSync(updateCommand.command, updateCommand.args, {
|
|
297
325
|
stdio: ["ignore", "pipe", "pipe"],
|
|
298
326
|
timeout: 30000,
|
|
@@ -301,7 +329,11 @@ async function performUpdate(currentVersion: string, latestVersion: string): Pro
|
|
|
301
329
|
if (result.status === 0) {
|
|
302
330
|
console.error(`[selftune] Updated to v${latestVersion}.`);
|
|
303
331
|
// Update cache to reflect new version
|
|
304
|
-
writeCache({
|
|
332
|
+
writeCache({
|
|
333
|
+
lastCheck: Date.now(),
|
|
334
|
+
currentVersion: latestVersion,
|
|
335
|
+
latestVersion,
|
|
336
|
+
});
|
|
305
337
|
|
|
306
338
|
try {
|
|
307
339
|
const claudeDir = join(homedir(), ".claude");
|
|
@@ -137,7 +137,7 @@ export const PUBLIC_COMMAND_SURFACES = {
|
|
|
137
137
|
3. selftune evolve --skill <name> --skill-path <path> --dry-run --validation-mode replay
|
|
138
138
|
4. selftune grade baseline --skill <name> --skill-path <path>
|
|
139
139
|
|
|
140
|
-
Generated evals are
|
|
140
|
+
Generated evals are stored canonically in SQLite and mirrored into ~/.selftune/eval-sets/<skill>.json for compatibility with file-based workflows.`,
|
|
141
141
|
],
|
|
142
142
|
},
|
|
143
143
|
evolve: {
|
|
@@ -176,6 +176,11 @@ export const CONTRIBUTION_PREFERENCES_PATH = join(
|
|
|
176
176
|
);
|
|
177
177
|
/** Creator overview watchlist preference. */
|
|
178
178
|
export const WATCHED_SKILLS_PATH = join(SELFTUNE_CONFIG_DIR, "watched-skills.json");
|
|
179
|
+
/** Shared live action stream consumed by the local dashboard for terminal-run commands. */
|
|
180
|
+
export const DASHBOARD_ACTION_STREAM_LOG = join(
|
|
181
|
+
SELFTUNE_CONFIG_DIR,
|
|
182
|
+
"dashboard-action-events.jsonl",
|
|
183
|
+
);
|
|
179
184
|
/** Creator-directed relay endpoint for staged contribution signals. */
|
|
180
185
|
export const CONTRIBUTION_RELAY_ENDPOINT =
|
|
181
186
|
process.env.SELFTUNE_CONTRIBUTION_RELAY_ENDPOINT ?? "https://api.selftune.dev/api/v1/signals";
|