@openagt/dashboard 0.53.0 → 0.54.0

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.
Files changed (49) hide show
  1. package/dist/appearance.d.ts +50 -0
  2. package/dist/appearance.d.ts.map +1 -0
  3. package/dist/appearance.js +51 -0
  4. package/dist/appearance.js.map +1 -0
  5. package/dist/cli/skills.d.ts.map +1 -1
  6. package/dist/cli/skills.js +1 -1
  7. package/dist/cli/skills.js.map +1 -1
  8. package/dist/client.d.ts +1 -0
  9. package/dist/client.d.ts.map +1 -1
  10. package/dist/client.js +1 -0
  11. package/dist/client.js.map +1 -1
  12. package/dist/dashboard-bundle/assets/host/module-BjrL8fFt.js +1 -0
  13. package/dist/dashboard-bundle/assets/main-C50vMcm3.js +152 -0
  14. package/dist/dashboard-bundle/assets/main-DkmEveyx.css +2 -0
  15. package/dist/dashboard-bundle/assets/module-C1zreYB3.js +19 -0
  16. package/dist/dashboard-bundle/index.html +8 -8
  17. package/dist/dashboard-rpc/reads.d.ts +4 -4
  18. package/dist/dashboard-rpc/reads.d.ts.map +1 -1
  19. package/dist/dashboard-rpc/reads.js +5 -5
  20. package/dist/dashboard-rpc/reads.js.map +1 -1
  21. package/dist/dashboard-rpc/relay-dispatch.js +2 -2
  22. package/dist/dashboard-rpc/relay-dispatch.js.map +1 -1
  23. package/dist/events.d.ts +2 -0
  24. package/dist/events.d.ts.map +1 -1
  25. package/dist/events.js.map +1 -1
  26. package/dist/module-types/dashboard/components/Markdown.d.ts +8 -1
  27. package/dist/module-types/dashboard/components/ui/dropdown-menu.d.ts +3 -2
  28. package/dist/module-types/dashboard/lib/highlight.d.ts +13 -8
  29. package/dist/module-types/dashboard/module/index.d.ts +15 -1
  30. package/dist/module-types/src/appearance.d.ts +49 -0
  31. package/dist/module-types/src/client.d.ts +1 -0
  32. package/dist/module-types/src/dashboard-rpc/reads.d.ts +4 -4
  33. package/dist/module-types/src/events.d.ts +2 -0
  34. package/dist/module-types/src/registry.d.ts +11 -0
  35. package/dist/module.css +6 -4
  36. package/dist/registry.d.ts +11 -0
  37. package/dist/registry.d.ts.map +1 -1
  38. package/dist/registry.js +13 -0
  39. package/dist/registry.js.map +1 -1
  40. package/dist/store/run-record.d.ts.map +1 -1
  41. package/dist/store/run-record.js +2 -1
  42. package/dist/store/run-record.js.map +1 -1
  43. package/package.json +24 -24
  44. package/dist/dashboard-bundle/assets/everforest-dark-sB-x3p7T.js +0 -1
  45. package/dist/dashboard-bundle/assets/everforest-light-Df2xbC6M.js +0 -1
  46. package/dist/dashboard-bundle/assets/host/module-CTQrrHFl.js +0 -1
  47. package/dist/dashboard-bundle/assets/main-BKp0ZMXD.css +0 -2
  48. package/dist/dashboard-bundle/assets/main-Du4cDqEn.js +0 -148
  49. package/dist/dashboard-bundle/assets/module-Cwganbc7.js +0 -16
@@ -1,16 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/typescript-Utq2Cl8c.js","assets/typescript-j_1H8WHN.js","assets/tsx-5f3ulCja.js","assets/tsx-BOvsFOI6.js","assets/javascript-Yelw-5ZN.js","assets/javascript-BzbQS41l.js","assets/jsx-hEbJ82HF.js","assets/jsx-D3KKoC5L.js","assets/json-CaljABEy.js","assets/json-B88Oqtu5.js","assets/html-WQKKblVZ.js","assets/html-DSw1lh5G.js","assets/css-BGIxQoYs.js","assets/vue-BqdMUtqy.js","assets/svelte-CdeT-Ich.js","assets/postcss-D_Wz94rJ.js","assets/astro-BZ97kZFP.js","assets/xml-CoDIzWF0.js","assets/xml-WY0zc4PG.js","assets/java-BtIQNnN0.js","assets/css-DUjzNfgv.js","assets/scss-8bKmll0B.js","assets/yaml-CxbubiML.js","assets/yaml-DijMHRDA.js","assets/shellscript-BiGZg9Om.js","assets/shellscript-CqHdAlCp.js","assets/ruby-DjBfgIB7.js","assets/c-SSSlmE39.js","assets/cpp-Cts1PyIS.js","assets/graphql-DEIChqxY.js","assets/lua-DjuecEsk.js","assets/sql-CNu3Or2W.js","assets/java-DxlWrXwe.js","assets/c-DWGmR78Y.js","assets/cpp-CJIxL8VH.js","assets/php-D7kNSOJl.js","assets/lua-BJObVtAx.js","assets/sql-BOsskAmu.js","assets/graphql-DAzSVzvB.js","assets/core-Db3h5Pv3.js","assets/rolldown-runtime-QTnfLwEv.js"])))=>i.map(i=>d[i]);
2
- import{r as e,t}from"./rolldown-runtime-QTnfLwEv.js";import{t as n}from"./react-CZI7_Jkm.js";import{t as r}from"./react-dom-cJyBB_A4.js";import{t as i}from"./jsx-runtime-By8HlURe.js";var a=[`claude-code`,`codex`];function o(e){return e!==void 0&&a.includes(e)}var s={"claude-code":`Claude Code`,codex:`Codex`};function c(e){return e===`claude-web`||e===`github-actions`?`claude-code`:o(e)?e:void 0}var l=[`nothing`,`commit`,`branch`,`pr`,`merge`],u={nothing:`Off`,commit:`Commit`,branch:`Publish branch`,pr:`Open PR`,merge:`Merge on green`};function d(e){return l.includes(e)}function f(e,t=!0){return t?e?l:[`nothing`,`commit`,`branch`]:[`nothing`,`commit`]}function p(e){return e?`branch`:`commit`}function m(e,t,n=!0){return e===void 0?`commit`:f(t,n).includes(e)?e:p(n)}var h={humanIntervention:`notifyHumanIntervention`,newActivity:`notifyNewActivity`},g={browser:!0,categories:{humanIntervention:!0,newActivity:!1}};function _(e){return e.notifyBrowser??g.browser}function v(e,t){return e[h[t]]??g.categories[t]}var y=50,b=/^127(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}$/;function x(e){return e===`localhost`||e===`::1`||e===`[::1]`||b.test(e)}function S(e){try{let t=new URL(e);return t.protocol===`http:`&&x(t.hostname)}catch{return!1}}var C=`/_devices/via/`;function w(e){let t=e.indexOf(C);if(t!==-1)try{return new URL(e.slice(0,t)).host}catch{return}}function T(e){let t=w(e.url);return t===void 0?e.label:e.label.replace(` (through ${t})`,``)}function E(e){let t=w(e.url);if(e.owner!==void 0)return{kind:`shared`,place:`@${e.owner}'s server${t===void 0?``:`, through ${t}`}`};if(S(e.url))return e.server?{kind:`home`,place:`Server at home`}:{kind:`computer`,place:`Your computer`};if(t!==void 0)return{kind:`home`,place:`Server at home, through ${t}`};let n=e.url;try{n=new URL(e.url).host}catch{}let r=e.url.startsWith(`https://`),i=r?`Server`:`Computer`;return{kind:r?`server`:`computer`,place:n===e.label?i:`${i}, ${n}`}}var D=`/_rpc`;function O(e){return async(...t)=>{let n=t.length;for(;n>0&&t[n-1]===void 0;)n--;let r=await fetch(`${D}/${e}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t.slice(0,n))}),i=await r.text(),a;try{a=i?JSON.parse(i):{}}catch{throw Error(`${e} got a non-JSON reply (${r.status})`)}if(!r.ok)throw Error(a.error??`${e} failed (${r.status})`);return a.ret}}async function k(e,t){let n=new URLSearchParams({projectId:e,...t?{agentId:t}:{}}),r=new AbortController,i=await fetch(`${D}/events?${n.toString()}`,{signal:r.signal});if(!i.ok||!i.body)throw Error(`could not subscribe to events (${i.status})`);let a,o=[],s,c=!1,l=e=>{c||(c=!0,s?.(e))};return(async()=>{let e=i.body.getReader(),t=new TextDecoder,n=``;try{for(;;){let{done:r,value:i}=await e.read();if(r)break;n+=t.decode(i,{stream:!0});let s=n.indexOf(`
3
-
4
- `);for(;s>=0;s=n.indexOf(`
5
-
6
- `)){let e=n.slice(0,s);n=n.slice(s+2);let t=e.split(`
7
- `).filter(e=>e.startsWith(`data:`)).map(e=>e.slice(5).trim()).join(``);if(t)try{let e=JSON.parse(t);a?a(e):o.push(e)}catch{}}}l()}catch(e){l(r.signal.aborted?void 0:e instanceof Error?e:Error(String(e)))}})(),{listen:e=>{a=e;for(let t of o.splice(0))e(t)},onClose:e=>{s=e,c&&e()},close:()=>{c||r.abort(),l()}}}function A(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=A(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function j(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=A(e))&&(r&&(r+=` `),r+=t);return r}var M=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,N=j,P=(e,t)=>n=>{if(t?.variants==null)return N(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=M(t)||M(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 N(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)},F=`-`,I=e=>{let t=B(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{let n=e.split(F);return n[0]===``&&n.length!==1&&n.shift(),L(n,t)||z(e)},getConflictingClassGroupIds:(e,t)=>{let i=n[e]||[];return t&&r[e]?[...i,...r[e]]:i}}},L=(e,t)=>{if(e.length===0)return t.classGroupId;let n=e[0],r=t.nextPart.get(n),i=r?L(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;let a=e.join(F);return t.validators.find(({validator:e})=>e(a))?.classGroupId},R=/^\[(.+)\]$/,z=e=>{if(R.test(e)){let t=R.exec(e)[1],n=t?.substring(0,t.indexOf(`:`));if(n)return`arbitrary..`+n}},B=e=>{let{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return te(Object.entries(e.classGroups),n).forEach(([e,n])=>{V(n,r,e,t)}),r},V=(e,t,n,r)=>{e.forEach(e=>{if(typeof e==`string`){let r=e===``?t:H(t,e);r.classGroupId=n;return}if(typeof e==`function`){if(ee(e)){V(e(r),t,n,r);return}t.validators.push({validator:e,classGroupId:n});return}Object.entries(e).forEach(([e,i])=>{V(i,H(t,e),n,r)})})},H=(e,t)=>{let n=e;return t.split(F).forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},ee=e=>e.isThemeGetter,te=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>typeof e==`string`?t+e:typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,U=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=new Map,r=new Map,i=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);if(t!==void 0)return t;if((t=r.get(e))!==void 0)return i(e,t),t},set(e,t){n.has(e)?n.set(e,t):i(e,t)}}},W=`!`,ne=e=>{let{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=e=>{let n=[],o=0,s=0,c;for(let l=0;l<e.length;l++){let u=e[l];if(o===0){if(u===i&&(r||e.slice(l,l+a)===t)){n.push(e.slice(s,l)),s=l+a;continue}if(u===`/`){c=l;continue}}u===`[`?o++:u===`]`&&o--}let l=n.length===0?e:e.substring(s),u=l.startsWith(W);return{modifiers:n,hasImportantModifier:u,baseClassName:u?l.substring(1):l,maybePostfixModifierPosition:c&&c>s?c-s:void 0}};return n?e=>n({className:e,parseClassName:o}):o},G=e=>{if(e.length<=1)return e;let t=[],n=[];return e.forEach(e=>{e[0]===`[`?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},re=e=>({cache:U(e.cacheSize),parseClassName:ne(e),...I(e)}),ie=/\s+/,ae=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(ie),s=``;for(let e=o.length-1;e>=0;--e){let t=o[e],{modifiers:c,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:d}=n(t),f=!!d,p=r(f?u.substring(0,d):u);if(!p){if(!f){s=t+(s.length>0?` `+s:s);continue}if(p=r(u),!p){s=t+(s.length>0?` `+s:s);continue}f=!1}let m=G(c).join(`:`),h=l?m+W:m,g=h+p;if(a.includes(g))continue;a.push(g);let _=i(p,f);for(let e=0;e<_.length;++e){let t=_[e];a.push(h+t)}s=t+(s.length>0?` `+s:s)}return s};function oe(){let e=0,t,n,r=``;for(;e<arguments.length;)(t=arguments[e++])&&(n=se(t))&&(r&&(r+=` `),r+=n);return r}var se=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=se(e[r]))&&(n&&(n+=` `),n+=t);return n};function ce(e,...t){let n,r,i,a=o;function o(o){return n=re(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)}function s(e){let t=r(e);if(t)return t;let a=ae(e,n);return i(e,a),a}return function(){return a(oe.apply(null,arguments))}}var le=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},ue=/^\[(?:([a-z-]+):)?(.+)\]$/i,de=/^\d+\/\d+$/,fe=new Set([`px`,`full`,`screen`]),pe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,me=/\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$/,he=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ge=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_e=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ve=e=>be(e)||fe.has(e)||de.test(e),ye=e=>Me(e,`length`,Ne),be=e=>!!e&&!Number.isNaN(Number(e)),xe=e=>Me(e,`number`,be),Se=e=>!!e&&Number.isInteger(Number(e)),Ce=e=>e.endsWith(`%`)&&be(e.slice(0,-1)),K=e=>ue.test(e),we=e=>pe.test(e),Te=new Set([`length`,`size`,`percentage`]),Ee=e=>Me(e,Te,Pe),De=e=>Me(e,`position`,Pe),Oe=new Set([`image`,`url`]),ke=e=>Me(e,Oe,Ie),Ae=e=>Me(e,``,Fe),je=()=>!0,Me=(e,t,n)=>{let r=ue.exec(e);return r?r[1]?typeof t==`string`?r[1]===t:t.has(r[1]):n(r[2]):!1},Ne=e=>me.test(e)&&!he.test(e),Pe=()=>!1,Fe=e=>ge.test(e),Ie=e=>_e.test(e),Le=ce(()=>{let e=le(`colors`),t=le(`spacing`),n=le(`blur`),r=le(`brightness`),i=le(`borderColor`),a=le(`borderRadius`),o=le(`borderSpacing`),s=le(`borderWidth`),c=le(`contrast`),l=le(`grayscale`),u=le(`hueRotate`),d=le(`invert`),f=le(`gap`),p=le(`gradientColorStops`),m=le(`gradientColorStopPositions`),h=le(`inset`),g=le(`margin`),_=le(`opacity`),v=le(`padding`),y=le(`saturate`),b=le(`scale`),x=le(`sepia`),S=le(`skew`),C=le(`space`),w=le(`translate`),T=()=>[`auto`,`contain`,`none`],E=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],D=()=>[`auto`,K,t],O=()=>[K,t],k=()=>[``,ve,ye],A=()=>[`auto`,be,K],j=()=>[`bottom`,`center`,`left`,`left-bottom`,`left-top`,`right`,`right-bottom`,`right-top`,`top`],M=()=>[`solid`,`dashed`,`dotted`,`double`,`none`],N=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],P=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`],F=()=>[``,`0`,K],I=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],L=()=>[be,K];return{cacheSize:500,separator:`:`,theme:{colors:[je],spacing:[ve,ye],blur:[`none`,``,we,K],brightness:L(),borderColor:[e],borderRadius:[`none`,``,`full`,we,K],borderSpacing:O(),borderWidth:k(),contrast:L(),grayscale:F(),hueRotate:L(),invert:F(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[Ce,ye],inset:D(),margin:D(),opacity:L(),padding:O(),saturate:L(),scale:L(),sepia:F(),skew:L(),space:O(),translate:O()},classGroups:{aspect:[{aspect:[`auto`,`square`,`video`,K]}],container:[`container`],columns:[{columns:[we]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"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`],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:[...j(),K]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[`auto`,Se,K]}],basis:[{basis:D()}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`wrap`,`wrap-reverse`,`nowrap`]}],flex:[{flex:[`1`,`auto`,`initial`,`none`,K]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:[`first`,`last`,`none`,Se,K]}],"grid-cols":[{"grid-cols":[je]}],"col-start-end":[{col:[`auto`,{span:[`full`,Se,K]},K]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[je]}],"row-start-end":[{row:[`auto`,{span:[Se,K]},K]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":[`auto`,`min`,`max`,`fr`,K]}],"auto-rows":[{"auto-rows":[`auto`,`min`,`max`,`fr`,K]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:[`normal`,...P()]}],"justify-items":[{"justify-items":[`start`,`end`,`center`,`stretch`]}],"justify-self":[{"justify-self":[`auto`,`start`,`end`,`center`,`stretch`]}],"align-content":[{content:[`normal`,...P(),`baseline`]}],"align-items":[{items:[`start`,`end`,`center`,`baseline`,`stretch`]}],"align-self":[{self:[`auto`,`start`,`end`,`center`,`stretch`,`baseline`]}],"place-content":[{"place-content":[...P(),`baseline`]}],"place-items":[{"place-items":[`start`,`end`,`center`,`baseline`,`stretch`]}],"place-self":[{"place-self":[`auto`,`start`,`end`,`center`,`stretch`]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[C]}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":[C]}],"space-y-reverse":[`space-y-reverse`],w:[{w:[`auto`,`min`,`max`,`fit`,`svw`,`lvw`,`dvw`,K,t]}],"min-w":[{"min-w":[K,t,`min`,`max`,`fit`]}],"max-w":[{"max-w":[K,t,`none`,`full`,`min`,`max`,`fit`,`prose`,{screen:[we]},we]}],h:[{h:[K,t,`auto`,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"min-h":[{"min-h":[K,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"max-h":[{"max-h":[K,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],size:[{size:[K,t,`auto`,`min`,`max`,`fit`]}],"font-size":[{text:[`base`,we,ye]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`,xe]}],"font-family":[{font:[je]}],"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:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`,K]}],"line-clamp":[{"line-clamp":[`none`,be,xe]}],leading:[{leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`,ve,K]}],"list-image":[{"list-image":[`none`,K]}],"list-style-type":[{list:[`none`,`disc`,`decimal`,K]}],"list-style-position":[{list:[`inside`,`outside`]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...M(),`wavy`]}],"text-decoration-thickness":[{decoration:[`auto`,`from-font`,ve,ye]}],"underline-offset":[{"underline-offset":[`auto`,ve,K]}],"text-decoration-color":[{decoration:[e]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:O()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,K]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,K]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:[...j(),De]}],"bg-repeat":[{bg:[`no-repeat`,{repeat:[``,`x`,`y`,`round`,`space`]}]}],"bg-size":[{bg:[`auto`,`cover`,`contain`,Ee]}],"bg-image":[{bg:[`none`,{"gradient-to":[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},ke]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...M(),`hidden`]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":[`divide-y-reverse`],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:M()}],"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-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:[``,...M()]}],"outline-offset":[{"outline-offset":[ve,K]}],"outline-w":[{outline:[ve,ye]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[ve,ye]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:[``,`inner`,`none`,we,Ae]}],"shadow-color":[{shadow:[je]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...N(),`plus-lighter`,`plus-darker`]}],"bg-blend":[{"bg-blend":N()}],filter:[{filter:[``,`none`]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":[``,`none`,we,K]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":[``,`none`]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[`none`,`all`,``,`colors`,`opacity`,`shadow`,`transform`,K]}],duration:[{duration:L()}],ease:[{ease:[`linear`,`in`,`out`,`in-out`,K]}],delay:[{delay:L()}],animate:[{animate:[`none`,`spin`,`ping`,`pulse`,`bounce`,K]}],transform:[{transform:[``,`gpu`,`none`]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Se,K]}],"translate-x":[{"translate-x":[w]}],"translate-y":[{"translate-y":[w]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:[`center`,`top`,`top-right`,`right`,`bottom-right`,`bottom`,`bottom-left`,`left`,`top-left`,K]}],accent:[{accent:[`auto`,e]}],appearance:[{appearance:[`none`,`auto`]}],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]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":[`none`,`auto`]}],resize:[{resize:[`none`,`y`,`x`,``]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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]}],fill:[{fill:[e,`none`]}],"stroke-w":[{stroke:[ve,ye,xe]}],stroke:[{stroke:[e,`none`]}],sr:[`sr-only`,`not-sr-only`],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`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`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`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-s`,`border-w-e`,`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-s`,`border-color-e`,`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`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`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-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`]}}});function q(...e){return Le(j(e))}var J=e(i(),1),Re=P(`inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)] disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:`bg-[var(--color-primary)] text-[var(--color-primary-foreground)] hover:opacity-90`,outline:`border border-[var(--color-border)] bg-transparent hover:bg-[var(--color-accent)] hover:text-[var(--color-accent-foreground)]`,ghost:`hover:bg-[var(--color-accent)] hover:text-[var(--color-accent-foreground)]`,destructive:`bg-[var(--color-danger)] text-[var(--color-background)] hover:opacity-90`},size:{default:`h-9 px-4 py-2`,sm:`h-8 px-3`,xs:`h-7 gap-1 px-2 text-xs`,icon:`h-9 w-9`,"icon-sm":`h-7 w-7`}},defaultVariants:{variant:`default`,size:`default`}});function ze({className:e,variant:t,size:n,...r}){return(0,J.jsx)(`button`,{className:q(Re({variant:t,size:n}),e),...r})}var Y=e(n(),1),Be={};function Ve(e,t){let n=Y.useRef(Be);return n.current===Be&&(n.current=e(t)),n}var He=e(r(),1),Ue=[],We=void 0;function Ge(){return We}function Ke(e){Ue.push(e)}function qe(e){let t=(t,n)=>{let r=Ve(Ye).current,i;try{We=r;for(let e of Ue)e.before(r);i=e(t,n);for(let e of Ue)e.after(r);r.didInitialize=!0}finally{We=void 0}return i};return t.displayName=e.displayName||e.name,t}function Je(e){return Y.forwardRef(qe(e))}function Ye(){return{didInitialize:!1}}function Xe(){}var Ze=Object.freeze([]),Qe=Object.freeze({}),X=typeof document<`u`?Y.useLayoutEffect:()=>{};function $e(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 et=$e(`https://base-ui.com/production-error`,`Base UI`),tt=Y.createContext(void 0);function nt(e){let t=Y.useContext(tt);if(t===void 0&&!e)throw Error(et(72));return t}function rt(e){Y.useEffect(e,Ze)}var it=0,at=class e{static create(){return new e}currentId=it;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=it,t()},e)}isStarted(){return this.currentId!==it}clear=()=>{this.currentId!==it&&(clearTimeout(this.currentId),this.currentId=it)};disposeEffect=()=>this.clear};function ot(){let e=Ve(at.create).current;return rt(e.disposeEffect),e}function st(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:ct,platform:lt,maxTouchPoints:ut}=st(),dt=ct.toLowerCase(),ft=lt.toLowerCase(),pt=/^i(os$|p)/.test(ft)||ft===`macintel`&&ut>1,mt=`android`,ht=ft===mt||dt.includes(mt),gt=!pt&&ft.startsWith(`mac`);ft.startsWith(`win`),!ht&&/^(linux|chrome os)/.test(ft);var _t=gt||pt,vt=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`),yt=!vt&&dt.includes(`firefox`);!vt&&dt.includes(`chrom`);var bt=_t,xt=/jsdom|happydom/.test(dt);function St(e){e.preventDefault(),e.stopPropagation()}function Ct(e){return`nativeEvent`in e}function wt(e){return e.pointerType===``&&e.isTrusted?!0:ht&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Tt(e){return xt?!1:!ht&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(ht||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Et(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Dt(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function Ot(){return typeof window<`u`}function kt(e){return Mt(e)?(e.nodeName||``).toLowerCase():`#document`}function At(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function jt(e){return((Mt(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Mt(e){return Ot()?e instanceof Node||e instanceof At(e).Node:!1}function Nt(e){return Ot()?e instanceof Element||e instanceof At(e).Element:!1}function Pt(e){return Ot()?e instanceof HTMLElement||e instanceof At(e).HTMLElement:!1}function Ft(e){return!Ot()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof At(e).ShadowRoot}function It(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=qt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Lt(e){return/^(table|td|th)$/.test(kt(e))}function Rt(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var zt=/transform|translate|scale|rotate|perspective|filter/,Bt=/paint|layout|strict|content/,Vt=e=>!!e&&e!==`none`,Ht;function Ut(e){let t=Nt(e)?qt(e):e;return Vt(t.transform)||Vt(t.translate)||Vt(t.scale)||Vt(t.rotate)||Vt(t.perspective)||!Gt()&&(Vt(t.backdropFilter)||Vt(t.filter))||zt.test(t.willChange||``)||Bt.test(t.contain||``)}function Wt(e){let t=Yt(e);for(;Pt(t)&&!Kt(t);){if(Ut(t))return t;if(Rt(t))return null;t=Yt(t)}return null}function Gt(){return Ht??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Ht}function Kt(e){return/^(html|body|#document)$/.test(kt(e))}function qt(e){return At(e).getComputedStyle(e)}function Jt(e){return Nt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yt(e){if(kt(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Ft(e)&&e.host||jt(e);return Ft(t)?t.host:t}function Xt(e){let t=Yt(e);return Kt(t)?(e.ownerDocument||e).body:Pt(t)&&It(t)?t:Xt(t)}function Zt(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Xt(e),i=r===e.ownerDocument?.body,a=At(r);if(i){let e=Qt(a);return t.concat(a,a.visualViewport||[],It(r)?r:[],e&&n?Zt(e):[])}else return t.concat(r,Zt(r,[],n))}function Qt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $t(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Z(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Ft(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function en(e,t){let n=e;for(;n;){if(Nt(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(Ft(n)?n.host:null)}return null}function tn(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var nn=`data-base-ui-focusable`,rn=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,an=`ArrowLeft`,on=`ArrowRight`,sn=`ArrowUp`,cn=`ArrowDown`,ln=`data-starting-style`,un=`data-ending-style`,dn={[ln]:``},fn={[un]:``},pn={transitionStatus(e){return e===`starting`?dn:e===`ending`?fn:null}},mn=`data-open`,hn=`data-closed`,gn=`data-anchor-hidden`,_n=`data-popup-open`,vn=`data-pressed`,yn={[_n]:``},bn={[_n]:``,[vn]:``},xn={[mn]:``},Sn={[hn]:``},Cn={[gn]:``},wn={open(e){return e?yn:null}},Tn={open(e){return e?bn:null}},En={open(e){return e?xn:Sn},anchorHidden(e){return e?Cn:null}},Dn={...En,...pn},On=`data-trigger-disabled`;function kn(e,t){if(!Nt(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(On);for(let[,e]of t.entries())if(Z(e,n))return!e.hasAttribute(On);return!1}function An(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 jn(e){return e.matches(`html,body`)}function Mn(e){return Pt(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Nn(e){return en(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${rn}`)!=null}function Pn(e){return e?e.getAttribute(`role`)===`combobox`&&Mn(e):!1}function Fn(e){if(!e||xt)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function In(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Ln(e,t){return t!=null&&!Et(t)?0:typeof e==`function`?e():e}function Rn(e,t,n){let r=Ln(e,n);return typeof r==`number`?r:r?.[t]}function zn(e){return typeof e==`function`?e():e}function Bn(e,t){return t||e===`click`||e===`mousedown`}function Vn(e){return e?.includes(`mouse`)&&e!==`mousedown`}function Q(e,t,n,r){let i=!1,a=!1,o=r??Qe;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 Hn(e,t,n){let r=n??Qe;return{reason:e,event:t??new Event(`base-ui`),...r}}var Un=`none`,Wn=`trigger-press`,Gn=`trigger-hover`,Kn=`trigger-focus`,qn=`outside-press`,Jn=`item-press`,Yn=`close-press`,Xn=`track-press`,Zn=`input-change`,Qn=`input-clear`,$n=`input-press`,er=`focus-out`,tr=`escape-key`,nr=`list-navigation`,rr=`keyboard`,ir=`pointer`,ar=`drag`,or=`cancel-open`,sr=`sibling-open`,cr=`disabled`,lr=`imperative-action`,ur=`window-resize`,dr=Y.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new at,currentIdRef:{current:null},currentContextRef:{current:null}});function fr(e,t){e.current=t.current}function pr(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=Y.useRef(n),a=Y.useRef(n),o=Y.useRef(null),s=Y.useRef(null),c=ot();return X(()=>{if(a.current=n,!o.current){i.current=n;return}i.current={open:Rn(i.current,`open`),close:Rn(n,`close`)}},[n,o,i,a]),(0,J.jsx)(dr.Provider,{value:Y.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function mr(e,t={open:!1}){let{open:n}=t,r=e.useState(`floatingId`),{currentIdRef:i,delayRef:a,timeoutMs:o,initialDelayRef:s,currentContextRef:c,hasProvider:l,timeout:u}=Y.useContext(dr),[d,f]=Y.useState(!1),p=Y.useRef(n);return X(()=>{p.current=n},[n]),X(()=>{function t(){c.current?.setIsInstantPhase(!1),i.current=null,c.current=null,a.current=s.current,u.clear()}if(i.current&&!n&&i.current===r){if(f(!1),o){let n=r;return u.start(o,()=>{e.select(`open`)||i.current&&i.current!==n||t()}),()=>{(p.current||i.current!==n)&&u.clear()}}t()}},[n,r,i,a,o,s,c,u,e]),X(()=>{if(!n)return;let t=c.current,o=i.current;u.clear(),c.current={onOpenChange:e.setOpen,setIsInstantPhase:f},i.current=r,a.current={open:0,close:Rn(s.current,`close`)},o!==null&&o!==r?(f(!0),t?.setIsInstantPhase(!0),t?.onOpenChange(!1,Q(Un))):(f(!1),t?.setIsInstantPhase(!1))},[n,r,e,i,a,s,c,u]),X(()=>()=>{if(i.current===r){if(c.current=null,!p.current)return;i.current=null,fr(a,s),u.clear()}},[c,i,a,r,s,u]),Y.useMemo(()=>({activeIdRef:i,hasProvider:l,delayRef:a,isInstantPhase:d}),[i,l,a,d])}function hr(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function gr(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function _r(e,t,n,r){let i=Ve(yr).current;return br(i,e,t,n,r)&&Sr(i,[e,t,n,r]),i.callback}function vr(e){let t=Ve(yr).current;return xr(t,e)&&Sr(t,e),t.callback}function yr(){return{callback:null,cleanup:null,refs:[]}}function br(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function xr(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function Sr(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:}}}}}}function Cr(e){let t=Ve(wr,e).current;return t.next=e,X(t.effect),t}function wr(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Tr={...Y},Er=Tr.useInsertionEffect,Dr=Er&&Er!==Tr.useLayoutEffect?Er:e=>e();function $(e){let t=Ve(Or).current;return t.next=e,Dr(t.effect),t.trampoline}function Or(){let e={next:void 0,callback:kr,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function kr(){}var Ar=null;globalThis.requestAnimationFrame;var jr=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.callbacks[t]=null,--this.callbacksCount)}},Mr=class e{static create(){return new e}static request(e){return jr.request(e)}static cancel(e){return jr.cancel(e)}currentId=Ar;request(e){this.cancel(),this.currentId=jr.request(()=>{this.currentId=Ar,e()})}cancel=()=>{this.currentId!==Ar&&(jr.cancel(this.currentId),this.currentId=Ar)};disposeEffect=()=>this.cancel};function Nr(){let e=Ve(Mr.create).current;return rt(e.disposeEffect),e}function Pr(e){return e?.ownerDocument||document}var Fr={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Ir={...Fr,position:`fixed`,margin:0,top:0,left:0},Lr={...Fr,position:`absolute`},Rr=Y.forwardRef(function(e,t){let[n,r]=Y.useState();X(()=>{bt&&vt&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,J.jsx)(`span`,{...e,ref:t,style:Ir,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})}),zr=Math.min,Br=Math.max,Vr=Math.round,Hr=Math.floor,Ur=e=>({x:e,y:e}),Wr={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Gr(e,t,n){return Br(e,zr(t,n))}function Kr(e,t){return typeof e==`function`?e(t):e}function qr(e){return e.split(`-`)[0]}function Jr(e){return e.split(`-`)[1]}function Yr(e){return e===`x`?`y`:`x`}function Xr(e){return e===`y`?`height`:`width`}function Zr(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Qr(e){return Yr(Zr(e))}function $r(e,t,n){n===void 0&&(n=!1);let r=Jr(e),i=Qr(e),a=Xr(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ci(o)),[o,ci(o)]}function ei(e){let t=ci(e);return[ti(e),t,ti(t)]}function ti(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ni=[`left`,`right`],ri=[`right`,`left`],ii=[`top`,`bottom`],ai=[`bottom`,`top`];function oi(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ri:ni:t?ni:ri;case`left`:case`right`:return t?ii:ai;default:return[]}}function si(e,t,n,r){let i=Jr(e),a=oi(qr(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ti)))),a}function ci(e){let t=qr(e);return Wr[t]+e.slice(t.length)}function li(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function ui(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:li(e)}function di(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 fi(e,t,n){return Math.floor(e/t)!==n}function pi(e,t){return t<0||t>=e.length}function mi(e,t){return _i(e.current,{disabledIndices:t})}function hi(e,t){return _i(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function gi(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>_i(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:pi(e,u)?-1:u,wrapped:d}}function _i(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.length-1&&yi(e,a,r));return a}function vi(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u,p;if(t.key===`ArrowUp`?p=`up`:t.key===`ArrowDown`&&(p=`down`),p){let n=[],a=[],m=!1,h=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;h+=1;let o=en(e,`[role="row"]`);o&&(m=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let g=!1,_=0;if(m)for(let e of n){let t=e.length;t>_&&(_=t),t!==o&&(g=!0)}let v=g&&h<e.length,y=_||o,b=o=>{if(!g||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f<n.length;f+=1,o+=d){if(o<0||o>=n.length){if(!r||v)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1),r=i(t,u,n[o][e]??n[o][0]);o=a[r]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!yi(e,n,s))return n}}},x=t=>{if(!v||u===-1)return;let n=u%y,i=t===`up`?-y:y,a=l-l%y,o=Hr(l/y)+1;for(let t=u-n+i,c=0;c<o;c+=1,t+=i){if(t<0||t>l){if(!r)return;t=t<0?a:0}let i=Math.min(t+y-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!yi(e,r,s))return r}};d&&St(t);let S=b(p)??x(p);if(S!==void 0)f=S;else if(u===-1)f=p===`up`?l:c;else if(f=_i(e,{startingIndex:u,amount:y,decrement:p===`up`,disabledIndices:s}),r){if(p===`up`&&(u-y<c||f<0)){let e=u%y,n=l%y,r=l-(n-e);f=n===e?l:n>e?r:r-y,i&&(f=i(t,u,f))}p===`down`&&u+y>l&&(f=_i(e,{startingIndex:u%y-y,amount:y,disabledIndices:s}),i&&(f=i(t,u,f)))}pi(e,f)&&(f=u)}if(n===`both`){let n=Hr(u/o);t.key===(a?`ArrowLeft`:`ArrowRight`)&&(d&&St(t),u%o===o-1?r&&(f=_i(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):(f=_i(e,{startingIndex:u,disabledIndices:s}),r&&fi(f,o,n)&&(f=_i(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f)))),fi(f,o,n)&&(f=u)),t.key===(a?`ArrowRight`:`ArrowLeft`)&&(d&&St(t),u%o===0?r&&(f=_i(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f))):(f=_i(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&fi(f,o,n)&&(f=_i(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f)))),fi(f,o,n)&&(f=u));let c=Hr(l/o)===n;pi(e,f)&&(r&&c?(f=t.key===(a?`ArrowRight`:`ArrowLeft`)?l:_i(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):f=u)}return f}function yi(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!xi(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function bi(e){return e.visibility===`hidden`||e.visibility===`collapse`}function xi(e,t=e?qt(e):null){return!e||!e.isConnected||!t||bi(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var Si=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Ci(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return Ft(n)?n.host:null}function wi(e){for(let t of Array.from(e.children))if(kt(t)===`summary`)return t;return null}function Ti(e,t){let n=wi(t);return!!n&&(e===n||Z(n,e))}function Ei(e){let t=e?kt(e):``;return e!=null&&e.matches(Si)&&(t!==`summary`||e.parentElement!=null&&kt(e.parentElement)===`details`&&wi(e.parentElement)===e)&&(t!==`details`||wi(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Di(e){if(!Ei(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Ci(t)){let n=t!==e,r=kt(t)===`slot`;if(t.hasAttribute(`inert`)||n&&kt(t)===`details`&&!t.open&&!Ti(e,t)||t.hasAttribute(`hidden`)||!r&&!Oi(t,n))return!1}return!0}function Oi(e,t){let n=qt(e);return t?n.display!==`none`:xi(e,n)}function ki(e){let t=e.tabIndex;if(t<0){let t=kt(e);if(t===`details`||t===`audio`||t===`video`||Pt(e)&&e.isContentEditable)return 0}return t}function Ai(e){if(kt(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function ji(e,t){let n=Ai(e);if(!n)return!0;let r=t.find(e=>{let t=Ai(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=Ai(e);return t?.name===n.name&&t.form===n.form})===n}function Mi(e){if(Pt(e)&&kt(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Pt(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Ni(e,t){Mi(e).forEach(e=>{Ei(e)&&t.push(e),Ni(e,t)})}function Pi(e,t,n){Mi(e).forEach(e=>{Pt(e)&&e.matches(t)&&n.push(e),Pi(e,t,n)})}function Fi(e){return Di(e)&&ki(e)>=0}function Ii(e){let t=[];return Ni(e,t),t.filter(Di)}function Li(e){let t=Ii(e);return t.filter(e=>ki(e)>=0&&ji(e,t))}function Ri(e,t){let n=Li(e),r=n.length;if(r===0)return;let i=$t(Pr(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function zi(e){return Ri(Pr(e).body,1)||e}function Bi(e){return Ri(Pr(e).body,-1)||e}function Vi(e,t,n){if(!e)return null;let r=[];Ni(Pr(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(Di);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!Z(n,o)&&Fi(o)&&ji(o,a))return o}return r[i]}function Hi(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Z(n,r)}function Ui(e){Li(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Wi(e){let t=[];Pi(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function Gi(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Gi(e,t.id,n)])}function Ki(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function qi(e){return`data-base-ui-${e}`}var Ji=0;function Yi(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Ji);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),Xe;let o=requestAnimationFrame(a);return Ji=o,()=>{Ji===o&&(cancelAnimationFrame(o),Ji=0)}}var Xi=`data-base-ui-inert`,Zi=new WeakMap,Qi=new WeakSet,$i=new WeakMap,ea=0;function ta(e){return e?Ft(e)?e.host:ta(e.parentNode):null}var na=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=ta(t);return e.contains(n)?n:null}).filter(e=>e!=null),ra=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},ia=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{kt(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function aa(e,t,n,{mark:r=!0}){let i=na(t,e),a=r?ia(t,ra(i),new Set(i)):[],o=[],s=[];if(n){let e=na(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);ia(t,ra(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(Zi.get(e)||0)+1;Zi.set(e,r),o.push(e),r===1&&n&&Qi.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=($i.get(e)||0)+1;$i.set(e,t),s.push(e),t===1&&e.setAttribute(Xi,``)}),ea+=1,()=>{o.forEach(e=>{let t=(Zi.get(e)||0)-1;Zi.set(e,t),t||(Qi.has(e)||e.removeAttribute(`aria-hidden`),Qi.delete(e))}),r&&s.forEach(e=>{let t=($i.get(e)||0)-1;$i.set(e,t),t||e.removeAttribute(Xi)}),--ea,ea||(Zi=new WeakMap,Qi=new WeakSet,$i=new WeakMap)}}function oa(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=Pr(e[0]).body;return aa(e,i,n,{mark:r})}function sa(){let[,e]=Y.useState({});return Y.useCallback(()=>{e({})},[])}var ca=0;function la(e,t=`mui`){let n=Y.useRef(void 0),r=sa(),i=e??n.current;return Y.useEffect(()=>{n.current??(ca+=1,n.current=`${t}-${ca}`,e??r())},[e,t,r]),i}var ua=Tr.useId;function da(e,t){if(ua!==void 0){let n=ua();return e??(t?`${t}-${n}`:n)}return la(e,t)}var fa=19;function pa(e){return fa>=e}function ma(e){if(!Y.isValidElement(e))return null;let t=e,n=t.props;return(pa(19)?n?.ref:t.ref)??null}function ha(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function ga(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 _a(e,t){return typeof e==`function`?e(t):e}function va(e,t){return typeof e==`function`?e(t):e}var ya={};function ba(e,t,n,r,i){if(!n&&!r&&!i&&!e)return Sa(t);let a=Sa(e);return t&&(a=Ca(a,t)),n&&(a=Ca(a,n)),r&&(a=Ca(a,r)),i&&(a=Ca(a,i)),a}function xa(e){if(e.length===0)return ya;if(e.length===1)return Sa(e[0]);let t=Sa(e[0]);for(let n=1;n<e.length;n+=1)t=Ca(t,e[n]);return t}function Sa(e){return Da(e)?{...e(ya)}:wa(e)}function Ca(e,t){return Da(t)?t(e):Ta(e,t)}function wa(e){let t={...e};for(let e in t){let n=t[e];Ea(e,n)&&(t[e]=ka(n))}return t}function Ta(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=ha(e.style,r);break;case`className`:e[n]=ja(e.className,r);break;default:Ea(n,r)?e[n]=Oa(e[n],r):e[n]=r}}return e}function Ea(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 Da(e){return typeof e==`function`}function Oa(e,t){return t?e?(...n)=>{let r=n[0];if(Ma(r)){let i=r;Aa(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:ka(t):e}function ka(e){return e&&((...t)=>{let n=t[0];return Ma(n)&&Aa(n),e(...t)})}function Aa(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function ja(e,t){return t?e?t+` `+e:t:e}function Ma(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function Na(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=La(r));let i=Pa(t,n,r);if(n.enabled===!1)return null;let a=n.state??Qe;return Ra(e,r,i,a)}function Pa(e,t,n){let{className:r,style:i}=e,{state:a=Qe,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?_a(r,a):void 0,d=l?va(i,a):void 0,f=l?ga(a,c):Qe,p=l&&s?Fa(s):void 0,m=l?ha(f,p)??{}:Qe;return typeof document<`u`&&(l?Array.isArray(o)?m.ref=vr([m.ref,ma(n),...o]):m.ref=_r(m.ref,ma(n),o):_r(null,null)),l?(u!==void 0&&(m.className=ja(m.className,u)),d!==void 0&&(m.style=ha(m.style,d)),m):Qe}function Fa(e){return Array.isArray(e)?xa(e):ba(void 0,e)}var Ia=Symbol.for(`react.lazy`);function La(e){if(e?.$$typeof!==Ia)return e;let t=Y.Children.toArray(e)[0];return Y.isValidElement(t)?t:e}function Ra(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=ba(n,t.props);return e.ref=n.ref,Y.cloneElement(t,e)}return za(e,n)}function za(e,t){return e===`button`?(0,Y.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,Y.createElement)(`img`,{alt:``,...t,key:t.key}):Y.createElement(e,t)}var Ba={style:{transition:`none`}},Va=`data-base-ui-click-trigger`,Ha={fallbackAxisSide:`none`},Ua={fallbackAxisSide:`end`},Wa={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Ga=Y.createContext(null),Ka=()=>Y.useContext(Ga),qa=qi(`portal`);function Ja(e={}){let{ref:t,container:n,componentProps:r=Qe,elementProps:i}=e,a=da(),o=Ka()?.portalNode,[s,c]=Y.useState(null),[l,u]=Y.useState(null),d=$(e=>{e!==null&&u(e)}),f=Y.useRef(null);X(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(Mt(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=Na(`div`,r,{ref:[t,d],props:[{id:a,[qa]:``},i]}),m=s&&p?He.createPortal(p,s):null;return{node:l,nodeId:Y.isValidElement(p)?p.props.id:void 0,subtree:m}}var Ya=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=Ja({container:o,ref:t,componentProps:e,elementProps:c}),f=Y.useRef(null),p=Y.useRef(null),m=Y.useRef(null),h=Y.useRef(null),[g,_]=Y.useState(null),v=Y.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;Y.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&Hi(e)&&(e.type===`focusin`?v.current&&=(Wi(l),!1):(Ui(l),v.current=!0))}return gr(hr(l,`focusin`,e,!0),hr(l,`focusout`,e,!0))},[l,y]),X(()=>{!l||b!==!0||!v.current||(Wi(l),v.current=!1)},[b,l]);let S=Y.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,J.jsxs)(Y.Fragment,{children:[d,(0,J.jsxs)(Ga.Provider,{value:S,children:[x&&l&&(0,J.jsx)(Rr,{"data-type":`outside`,ref:f,onFocus:e=>{Hi(e,l)?m.current?.focus():Bi(g?g.domReference:null)?.focus()}}),x&&l&&(0,J.jsx)(`span`,{role:s,"aria-owns":u,style:Wa}),l&&He.createPortal(a,l),x&&l&&(0,J.jsx)(Rr,{"data-type":`outside`,ref:p,onFocus:e=>{Hi(e,l)?h.current?.focus():(zi(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,Q(`focus-out`,e.nativeEvent)))}})]})]})});function Xa(){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 Za=class{nodesRef={current:[]};events=Xa();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},Qa=Y.createContext(null),$a=Y.createContext(null),eo=()=>Y.useContext(Qa)?.id||null,to=e=>{let t=Y.useContext($a);return e??t};function no(e){let t=da(),n=to(e),r=eo();return X(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function ro(e){let{children:t,id:n}=e,r=eo();return(0,J.jsx)(Qa.Provider,{value:Y.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function io(e){let{children:t,externalTree:n}=e,r=Ve(()=>n??new Za).current;return(0,J.jsx)($a.Provider,{value:r,children:t})}function ao(e){return e==null?e:`current`in e?e.current:e}function oo(e,t){let n=At(tn(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(wt(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var so=20,co=[];function lo(){co=co.filter(e=>e.deref()?.isConnected)}function uo(e){lo(),e&&kt(e)!==`body`&&(co.push(new WeakRef(e)),co.length>so&&(co=co.slice(-20)))}function fo(){return lo(),co[co.length-1]?.deref()}function po(e){return e?Fi(e)?e:Li(e)[0]||e:null}function mo(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=Ii(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Fi(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function ho(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:h}=e,g=t.useState(`open`),_=t.useState(`domReferenceElement`),v=t.useState(`floatingElement`),{events:y,dataRef:b}=t.context,x=$(()=>b.current.floatingContext?.nodeId),S=i===!1,C=Pn(_)&&S,w=Cr(i),T=Cr(a),E=Cr(o),D=Cr(u),O=Cr(g),k=to(m),A=Ka(),j=Y.useRef(!1),M=Y.useRef(!1),N=Y.useRef(!1),P=Y.useRef(null),F=Y.useRef(``),I=Y.useRef(``),L=Y.useRef(null),R=Y.useRef(null),z=_r(L,p,A?.beforeInsideRef),B=_r(R,A?.afterInsideRef),V=ot(),H=ot(),ee=Nr(),te=A!=null,U=In(v),W=$((e=U)=>e?Li(e):[]),ne=$(()=>h?.().filter(e=>e!=null)??[]);Y.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&Z(U,$t(Pr(U)))&&W().length===0&&!C&&St(e)}return hr(Pr(U),`keydown`,e)},[r,U,c,C,W]),Y.useEffect(()=>{if(r||!g)return;let e=Pr(U);function t(){N.current=!1}function n(e){let t=tn(e),n=ne(),r=Z(v,t)||Z(_,t)||Z(A?.portalNode,t)||n.some(e=>e===t||Z(e,t));N.current=!r,I.current=e.pointerType||`keyboard`,en(t,`[data-base-ui-click-trigger]`)&&(M.current=!0,H.start(0,()=>{M.current=!1}))}function i(){I.current=`keyboard`}return gr(hr(e,`pointerdown`,n,!0),hr(e,`pointerup`,t,!0),hr(e,`pointercancel`,t,!0),hr(e,`keydown`,i,!0),t)},[r,v,_,U,g,A,H,ne]),Y.useEffect(()=>{if(r||!l)return;let e=Pr(U);function n(){M.current=!0,H.start(0,()=>{M.current=!1})}function i(e){let t=tn(e);Fi(t)&&(P.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=tn(n);c&&r==null&&a!=null&&Z(v,a)&&uo(a),queueMicrotask(()=>{let o=x(),l=t.context.triggerElements,u=ne(),p=r?.hasAttribute(qi(`focus-guard`))&&[L.current,R.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,ao(f),ao(d)].includes(r),m=!(Z(_,r)||Z(v,r)||Z(r,v)||Z(A?.portalNode,r)||u.some(e=>e===r||Z(e,r))||l.hasMatchingElement(e=>Z(e,r))||p||k&&(Gi(k.nodesRef.current,o).find(e=>Z(e.context?.elements.floating,r)||Z(e.context?.elements.domReference,r))||Ki(k.nodesRef.current,o).find(e=>[e.context?.elements.floating,In(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===_&&U&&mo(U),s&&i!==_&&!xi(a)&&$t(e)===e.body){if(Pt(U)&&(U.focus(),s===`popup`)){ee.request(()=>{U.focus()});return}let e=W(),t=P.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||U;Pt(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!c)&&r&&m&&!M.current&&(C||r!==fo())&&(j.current=!0,t.setOpen(!1,Q(er,n)))})}function o(){N.current||(b.current.insideReactTree=!0,V.start(0,()=>{b.current.insideReactTree=!1}))}let u=Pt(_)?_:null;if(!(!v&&!u))return gr(u&&hr(u,`focusout`,a),u&&hr(u,`pointerdown`,n),v&&hr(v,`focusin`,i),v&&hr(v,`focusout`,a),v&&A&&hr(v,`focusout`,o,!0))},[r,_,v,U,c,k,A,t,l,s,W,C,x,b,V,H,ee,d,f,ne]),Y.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${qi(`portal`)}]`)||[]),t=(k?Ki(k.nodesRef.current,x()):[]).find(e=>Pn(e.context?.elements.domReference||null))?.context?.elements.domReference,n=oa([v,...e,L.current,R.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...ne(),t,ao(f),ao(d),C?_:null].filter(e=>e!=null),{ariaHidden:c||C,mark:!1}),i=oa([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,c,A,C,k,x,d,f,ne]),X(()=>{if(!g||r||!Pt(U))return;F.current=``,I.current=``;let e=Pr(U),t=$t(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||Z(U,t))return;let i=null,a=()=>(i??=W(U),i[0]||U),o;o=r===!0||r===null?a():ao(r),o||=a();let s=Z(U,$t(e)),c=b.current.openEvent,l=c?.type===`mousedown`&&wt(c);Yi(o,{sync:l,preventScroll:o===U,shouldFocus(){if(!O.current)return!1;if(s)return!0;let t=$t(e);return!(t!==o&&Z(U,t))}})})},[r,g,U,W,w,D,O,b]);let G=Y.useRef(null);X(()=>{if(r||!U){G.current=null;return}G.current&&=(G.current.cancelled=!0,null);let e=Pr(U),t=$t(e),n=D.current==null;uo(t);function i(e){if(e.open||(F.current=oo(e.nativeEvent,I.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(qi(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(j.current=!0),e.reason===`outside-press`)if(e.nested)j.current=!1;else if(wt(e.nativeEvent)||Tt(e.nativeEvent))j.current=!1;else{let e=!1;Pr(U).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?j.current=!1:j.current=!0}}y.on(`openchange`,i);function a(e){let r=T.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&kt(t)!==`body`?t:null,s=n?o||a:a||o;return s||=fo()||null,typeof i==`boolean`?s:ao(i)||s||null}return()=>{y.off(`openchange`,i);let t=$t(e),n=ne(),r=Z(v,t)||n.some(e=>e===t||Z(e,t))||k&&Gi(k.nodesRef.current,x(),!1).some(e=>Z(e.context?.elements.floating,t)),o=T.current,s=F.current,c=a(s),l={cancelled:!1};G.current=l,queueMicrotask(()=>{G.current===l&&(G.current=null);let n=po(c),i=E.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!j.current&&Pt(n)&&(!(!i&&n!==t&&t!==e.body)||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}j.current=!1})}},[r,v,U,T,E,D,y,k,_,x,ne]),X(()=>{if(!vt||g||!v)return;let e=$t(Pr(v));!Pt(e)||!Mn(e)||Z(v,e)&&e.blur()},[g,v]),X(()=>{if(!(r||!A))return A.setFocusManagerState({modal:c,closeOnFocusOut:l,open:g,onOpenChange:t.setOpen,domReference:_}),()=>{A.setFocusManagerState(null)}},[r,A,c,g,t,l,_]),X(()=>{if(!(r||!U))return mo(U),()=>{queueMicrotask(lo)}},[r,U]);let re=!r&&(!c||!C)&&(te||c);return(0,J.jsxs)(Y.Fragment,{children:[re&&(0,J.jsx)(Rr,{"data-type":`inside`,ref:z,onFocus:e=>{if(c){let e=W();Yi(e[e.length-1])}else A?.portalNode&&(j.current=!1,Hi(e,A.portalNode)?zi(_)?.focus():ao(f??A.beforeOutsideRef)?.focus())}}),n,re&&(0,J.jsx)(Rr,{"data-type":`inside`,ref:B,onFocus:e=>{c?Yi(W()[0]):A?.portalNode&&(l&&(j.current=!0),Hi(e,A.portalNode)?Bi(_)?.focus():ao(d??A.afterOutsideRef)?.focus())}})]})}function go(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=Wn}=t,l=e.context.dataRef,u=Y.useRef(void 0),d=Nr(),f=ot(),p=Y.useMemo(()=>{function t(t,n,r,i){let a=Q(c,n,r);t&&i===`touch`&&s>0?f.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=Et(e.pointerType,!0)&&Tt(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||Et(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=tn(s),p=Mn(f);if(p||o===`virtual`){t(l,s,p?f:i.currentTarget,o);return}let m=i.currentTarget;d.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;if(r===`mousedown`&&o){u.current=void 0;return}Et(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,d,f,s]);return Y.useMemo(()=>n?{reference:p}:Qe,[n,p])}function _o(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=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,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,(!i||c)&&(d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function vo(e){return e!=null&&e.clientX!=null}function yo(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=e.useState(`open`),a=e.useState(`floatingElement`),o=e.useState(`domReferenceElement`),s=e.context.dataRef,c=Y.useRef(!1),l=Y.useRef(null),[u,d]=Y.useState(),[f,p]=Y.useState([]),m=$(t=>{e.set(`positionReference`,t)}),h=$((t,n,i)=>{c.current||s.current.openEvent&&!vo(s.current.openEvent)||e.set(`positionReference`,_o(i??o,{x:t,y:n,axis:r,dataRef:s,pointerType:u}))}),g=$(e=>{i?l.current||(h(e.clientX,e.clientY,e.currentTarget),p([])):h(e.clientX,e.clientY,e.currentTarget)}),_=Et(u)?a:i;Y.useEffect(()=>{if(!n){m(o);return}if(!_)return;function e(){l.current?.(),l.current=null}let t=At(a);function r(t){let n=tn(t);Z(a,n)?e():h(t.clientX,t.clientY)}return!s.current.openEvent||vo(s.current.openEvent)?l.current=hr(t,`mousemove`,r):m(o),e},[_,n,a,s,o,e,h,m,f]),Y.useEffect(()=>()=>{e.set(`positionReference`,null)},[e]),Y.useEffect(()=>{n&&!a&&(c.current=!1)},[n,a]),Y.useEffect(()=>{!n&&i&&(c.current=!0)},[n,i]);let v=Y.useMemo(()=>{function e(e){d(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return Y.useMemo(()=>n?{reference:v,trigger:v}:{},[n,v])}function bo(){return!1}function xo(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function So(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=bo,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=to(c),m=$(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=$(()=>a),{escapeKey:v,outsidePress:y}=xo(s),b=Y.useRef(!1),x=Y.useRef(!1),S=Y.useRef(!1),C=Y.useRef(!1),w=Y.useRef(!1),T=Y.useRef(``),E=Y.useRef(null),D=ot(),O=ot(),k=ot(),A=$(()=>{O.clear(),d.current.insideReactTree=!1}),j=$(e=>{let t=d.current.floatingContext?.nodeId;return(p?Gi(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),M=$(t=>An(t,e.select(`floatingElement`))||An(t,e.select(`domReferenceElement`))),N=$(t=>{o()&&e.setOpen(!1,Q(Wn,t.nativeEvent))}),P=$(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=Ct(t)?t.nativeEvent:t;if(w.current||i.isComposing||!v&&j(`__escapeKeyBubbles`))return;let a=Q(tr,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!v&&!a.isPropagationAllowed&&t.stopPropagation()}),F=$(()=>{d.current.insideReactTree=!0,O.start(0,A)}),I=$(t=>{if(!l||!n||t.button!==0)return;let r=tn(t.nativeEvent);Z(e.select(`floatingElement`),r)&&(b.current||(b.current=!0,x.current=!1))}),L=$(e=>{!l||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)});Y.useEffect(()=>{function e(e){e.open||(C.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),Y.useEffect(()=>A,[A]),Y.useEffect(()=>{if(!l||!n)return l||(C.current=!1,w.current=!1,T.current=``,E.current=null),A;d.current.__escapeKeyBubbles=v,d.current.__outsidePressBubbles=y;let t=new at,i=Pr(u);function a(){k.clear(),w.current=!0}function o(){w.current=!0,k.start(vt?5:0,()=>{w.current=!1})}function s(){S.current=!0,t.start(0,()=>{S.current=!1})}function c(){b.current=!1,x.current=!1}function f(){let e=T.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function O(e){let t=d.current.floatingContext?.nodeId,n=p&&Gi(p.nodesRef.current,t).some(t=>An(e,t.context?.elements.floating));return M(e)||n}function N(n){if(m(n)){n.type!==`click`&&!M(n)&&(t.clear(),S.current=!1),A();return}if(d.current.insideReactTree){A();return}let r=tn(n),i=`[${qi(`inert`)}]`,a=Nt(r)?r.getRootNode():null,o=Array.from((Ft(a)?a:Pr(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>Z(e,r))))return;let c=Nt(r)?r:null;for(;c&&!Kt(c);){let e=Yt(c);if(Kt(e)||!Nt(e))break;c=e}if(!(o.length&&Nt(r)&&!jn(r)&&!Z(r,e.select(`floatingElement`))&&o.every(e=>!Z(c,e)))){if(Pt(r)&&!(`touches`in n)){let e=Kt(r),t=qt(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!O(n)){if(f()===`intentional`){if(n.detail!==0&&!wt(n)&&!C.current)return;if(S.current){t.clear(),S.current=!1;return}}typeof h==`function`&&!h(n)||j(`__outsidePressBubbles`)||(e.setOpen(!1,Q(qn,n)),A())}}}function F(t){f()!==`sloppy`||t.pointerType===`touch`||!e.select(`open`)||!n||M(t)||N(t)}function I(t){if(f()!==`sloppy`||!e.select(`open`)||!n||M(t))return;let r=t.touches[0];r&&(E.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function L(e,t){let n=tn(e);if(!n)return;let r=hr(n,e.type,()=>{t(e),r()})}function R(e){T.current=`touch`,L(e,I)}function z(e){D.clear(),e.type===`pointerdown`&&(e.button===0&&(C.current=!0),T.current=e.pointerType),!(e.type===`mousedown`&&E.current&&!E.current.dismissOnMouseDown)&&L(e,e=>{e.type===`pointerdown`?F(e):N(e)})}function B(e){if(e.type===`pointercancel`&&(C.current=!1),!b.current)return;let n=x.current;if(c(),f()===`intentional`){if(e.type===`pointercancel`){n&&s();return}if(!O(e)){if(n){s();return}typeof h==`function`&&!h(e)||(t.clear(),S.current=!0,A())}}}function V(e){if(f()!==`sloppy`||!E.current||M(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(E.current.dismissOnTouchEnd=!0),i>10&&(N(e),D.clear(),E.current=null)}function H(e){L(e,V)}function ee(e){f()!==`sloppy`||!E.current||M(e)||(E.current.dismissOnTouchEnd&&N(e),D.clear(),E.current=null)}function te(e){L(e,ee)}let U=gr(r&&gr(hr(i,`keydown`,P),hr(i,`compositionstart`,a),hr(i,`compositionend`,o)),g&&gr(hr(i,`click`,z,!0),hr(i,`pointerdown`,z,!0),hr(i,`pointerup`,B,!0),hr(i,`pointercancel`,B,!0),hr(i,`mousedown`,z,!0),hr(i,`mouseup`,B,!0),hr(i,`touchstart`,R,{capture:!0,passive:!0}),hr(i,`touchmove`,H,{capture:!0,passive:!0}),hr(i,`touchend`,te,{capture:!0,passive:!0})));return()=>{U(),t.clear(),c(),S.current=!1}},[d,u,r,g,h,l,n,v,y,P,A,_,j,M,p,e,D,k]);let R=Y.useMemo(()=>({onKeyDown:P,onPointerDown:N,onClick:N}),[P,N]),z=Y.useMemo(()=>({onKeyDown:P,onPointerDown:L,onMouseDown:L,onClickCapture:F,onMouseDownCapture(e){F(),I(e)},onPointerDownCapture(e){F(),I(e)},onMouseUpCapture:F,onTouchEndCapture:F,onTouchMoveCapture:F}),[P,F,I,L]);return Y.useMemo(()=>n?{reference:R,floating:z,trigger:R}:{},[n,R,z])}function Co(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),X(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};Nt(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function wo(e,t=!1,n=!1,r=!1){let[i,a]=Y.useState(e&&t?`idle`:void 0),[o,s]=Y.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),X(()=>{if(!e&&o&&i!==`ending`&&n){let e=Mr.request(()=>{a(`ending`)});return()=>{Mr.cancel(e)}}},[e,o,i,n]),X(()=>{if(!e||t||i===void 0)return;let n=Mr.request(()=>{a(void 0)});return()=>{Mr.cancel(n)}},[t,e,i]),X(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=Mr.request(()=>{a(`idle`)});return()=>{Mr.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function To(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var Eo=null;function Do(e){if(!Eo){let e=[];Eo=e,queueMicrotask(()=>{Eo=null,He.flushSync(()=>{for(let t of e)t()})})}Eo.push(e)}function Oo(e,t=!1,n=!1){let r=Nr();return $((i,a=null)=>{r.cancel();let o=ao(e);if(o==null)return;let s=o,c=()=>{if(!n){He.flushSync(i);return}Do(()=>{a?.aborted||i()})};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(To(s).map(e=>e.finished.then(Xe))).then(()=>{a?.aborted||c()},()=>{if(!a?.aborted){if(To(s).some(e=>e.pending||e.playState!==`finished`)){l();return}c()}})}if(t){let e=ln;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function ko(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=$(a),s=Oo(r,n,i);Y.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}function Ao(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=$(i),{mounted:c,setMounted:l,transitionStatus:u}=wo(t,!1,!1,o),d=!t&&r;X(()=>{t&&s(!1)},[t,s]);let f=Y.useRef(c),p=Y.useRef(!1),m=sa(),h=()=>{f.current=!1,l(!1),a()};X(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=$(()=>{if(f.current){if(t){p.current=!0,m();return}h()}});return ko({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var jo={tabIndex:-1,[nn]:``};function Mo(e){return t=>t!==`touch`||e.current}function No(e,t=!1){let n=da(),r=eo()!=null,i=Ve(()=>e(n,r)).current;return Co({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function Po({handle:e,store:t}){return X(()=>e.attachStore(t),[e,t]),null}function Fo(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function Io(e,t){let n=Y.useRef(null);return $(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),Fo(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),Fo(t))})}function Lo(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function Ro(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function zo(e,t,n,r={}){let i=n.reason,a=i===Gn,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=Ro(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=Lo(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?He.flushSync(l):l()}function Bo(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=Io(e,n),o=$(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e);return}if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=$(e=>{a(e),e&&o(e)});return X(()=>(s(t.current),()=>s(null)),[s,t,n,e]),X(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function Vo(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=Y.useRef(null),i=e.useState(`open`);X(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=Q(Un);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function Ho(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=Ao({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return Ve(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function Uo(e,t){e.useSyncedValues(t),X(()=>()=>{e.update({activeTriggerProps:Qe,inactiveTriggerProps:Qe,popupProps:Qe})},[e])}function Wo(e,t){X(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),X(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var Go=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},Ko=t((e=>{var t=n();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,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})),qo=t(((e,t)=>{t.exports=Ko()})),Jo=t((e=>{var t=n(),r=qo();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=r.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}})),Yo=t(((e,t)=>{t.exports=Jo()})),Xo=qo(),Zo=Yo(),Qo=pa(19)?ts:ns;function $o(e,t,n,r,i){return Qo(e,t,n,r,i)}function es(e,t,n,r,i){let a=Y.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Xo.useSyncExternalStore)(e.subscribe,a,a)}Ke({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);Object.is(r.value,i)||(t=!0,r.value=i)}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,Xo.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function ts(e,t,n,r,i){let a=Ge();if(!a)return es(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.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function ns(e,t,n,r,i){return(0,Zo.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var rs=class{static create(e){return new this(e)}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 $o(this,e,t,n,r)}},is=class extends rs{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){Y.useDebugValue(e);let n=this;X(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;X(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;X(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){Y.useDebugValue(e);let n=this,r=t!==void 0;X(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return Y.useDebugValue(e),$o(this,this.selectors[e],t,n,r)}useContextCallback(e,t){Y.useDebugValue(e);let n=$(t??Xe);this.context[e]=n}useStateSetter(e){let t=Y.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)}})}},as={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},os=class extends is{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Xa(),nested:n,triggerElements:i},as),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Dt(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function ss(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new os({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Qe,inactiveTriggerProps:Qe,popupProps:Qe}}var cs=e=>e.triggerIdProp??e.activeTriggerId,ls=e=>e.openProp??e.open,us=e=>(e.popupElement?.id??e.floatingId)||void 0;function ds(e,t){return t!==void 0&&ls(e)&&cs(e)===t}function fs(e,t){return ds(e,t)?!0:t!==void 0&&ls(e)&&cs(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var ps={open:ls,mounted:e=>e.mounted,transitionStatus:e=>ls(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:cs,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:us,isTriggerActive:(e,t)=>t!==void 0&&cs(e)===t,isOpenedByTrigger:(e,t)=>ds(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&cs(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>fs(e,t)?us(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function ms(e){return(0,Xo.useSyncExternalStore)(Y.useCallback(t=>e===void 0?Xe:e.subscribeStore(t),[e]),Y.useCallback(()=>e===void 0?void 0:e.store,[e]),()=>e?.serverStore)}function hs(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=da(),a=eo()!=null,o=Ve(()=>new os({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Go,floatingId:i,syncOnly:!1,nested:a})).current;return X(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=Nt(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}var gs=gt&&vt;function _s(e,t={}){let{enabled:n=!0,delay:r}=t,{events:i,dataRef:a}=e.context,o=Y.useRef(!1),s=Y.useRef(null),c=Y.useRef(!0),l=ot();Y.useEffect(()=>{let t=e.select(`domReferenceElement`);if(!n)return;let r=At(t);function i(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&Pt(t)&&t===$t(Pr(t))&&(o.current=!0,s.current=t)}function a(){c.current=!0}function l(){c.current=!1}return gr(hr(r,`blur`,i),gs&&hr(r,`keydown`,a,!0),gs&&hr(r,`pointerdown`,l,!0))},[e,n]),Y.useEffect(()=>{if(!n)return;function t(t){if(t.reason===`trigger-press`||t.reason===`escape-key`){let t=e.select(`domReferenceElement`);Nt(t)&&(s.current=t,o.current=!0)}}return i.on(`openchange`,t),()=>{i.off(`openchange`,t)}},[i,n,e]);let u=Y.useMemo(()=>{function t(){o.current=!1,s.current=null}return{onMouseLeave(){t()},onFocus(n){let i=n.currentTarget;if(o.current){if(s.current===i)return;t()}let a=tn(n.nativeEvent);if(Nt(a)){if(gs&&!n.relatedTarget){if(!c.current&&!Mn(a))return}else if(!Fn(a))return}let u=kn(n.relatedTarget,e.context.triggerElements),{nativeEvent:d,currentTarget:f}=n;if(e.select(`open`)&&u||!r){e.setOpen(!0,Q(Kn,d,f));return}l.start(r,()=>{o.current||e.setOpen(!0,Q(Kn,d,f))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,o=Nt(r)&&r.hasAttribute(qi(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let t=e.select(`domReferenceElement`),n=$t(Pr(t));!r&&n===t||Z(a.current.floatingContext?.refs.floating.current,n)||Z(t,n)||o||kn(r??n,e.context.triggerElements)||e.setOpen(!1,Q(Kn,i))})}}},[a,r,e,l]);return Y.useMemo(()=>n?{reference:u,trigger:u}:{},[n,u])}var vs=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new at;restTimeout=new at;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},ys=new WeakMap;function bs(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&ys.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),ys.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function xs(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=ys.get(n);a&&a!==e&&bs(a),bs(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,ys.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Ss(e){let t=e.context.dataRef.current,n=Ve(()=>t.hoverInteractionState??vs.create()).current;return t.hoverInteractionState||=n,rt(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Cs(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=to(),u=eo(),d=Ss(e),f=ot(),p=$(()=>Bn(c.current.openEvent?.type,d.interactedInside)),m=$(()=>Vn(c.current.openEvent?.type)),h=$(()=>{bs(d)});X(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),Y.useEffect(()=>h,[h]),X(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&Nt(s)&&o){let e=s,t=o,n=Pr(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=d.pointerEventsScopeElement===t?null:d.pointerEventsScopeElement,a=r===t?null:r,c=d.handleCloseOptions?.getScope?.()??i??a??en(e,`[data-rootownerid]`)??n.body;return xs(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),Y.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&Gi(l.nodesRef.current,u).length>0)}function a(t){let n=Rn(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,Q(Gn,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=tn(e);if(!Nn(t)){d.interactedInside=!1;return}d.interactedInside=en(t,`[aria-haspopup]`)!=null}function g(){d.openChangeTimeout.clear(),f.clear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(kn(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(l&&r&&Nt(o)&&Gi(l.nodesRef.current,r,!1).some(e=>Z(e.context?.elements.floating,o)))){if(d.handler){d.handler(n);return}h(),m()&&!p()&&a(n)}}function v(n){!l||!u||t()||f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,Q(Gn,n)),l.events.emit(`floating.closed`,n)})}let y=o;return gr(y&&hr(y,`mouseenter`,g),y&&hr(y,`mouseleave`,_),y&&hr(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var ws={current:null};function Ts(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=ws,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=to(l),v=Ss(e),y=Y.useRef(!1),b=Cr(i),x=Cr(r),S=Cr(o),C=Cr(n),w=Cr(p),T=Cr(f),E=$(()=>Bn(h.current.openEvent?.type,v.interactedInside)),D=$(()=>w.current?.()!==!1),O=$((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!Z(t,n);if(!Nt(r))return!1;let a=r;return i.hasMatchingElement(e=>Z(e,a))&&(!t||!Z(t,a))}),k=$(()=>{v.handler&&=(Pr(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=$(()=>{bs(v)});return u&&(v.handleCloseOptions=i?.__options),Y.useEffect(()=>k,[k]),Y.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===Gn,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),Y.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=Rn(x.current,`close`,v.pointerType);r?v.openChangeTimeout.start(r,()=>{e.setOpen(!1,Q(Gn,t)),_?.events.emit(`floating.closed`,t)}):n&&(v.openChangeTimeout.clear(),e.setOpen(!1,Q(Gn,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!Nt(r))return;function i(t){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!Et(v.pointerType))return;let n=zn(S.current),r=Rn(x.current,`open`,v.pointerType),i=tn(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(Nt(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(Z(t,i)){c=t;break}}Nt(o)&&Nt(s)&&!e.context.triggerElements.hasElement(o)&&Z(o,s)&&(c=s);let l=c!=null&&O(s,c,i),u=e.select(`open`),d=T.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&y.current,p=!l&&Nt(c)&&Nt(s)&&Z(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;if(h){D()&&e.setOpen(!0,Q(Gn,t,c));return}m||(r?v.openChangeTimeout.start(r,()=>{g&&D()&&e.setOpen(!0,Q(Gn,t,c))}):g&&D()&&e.setOpen(!0,Q(Gn,t,c)))}function o(n){if(E()){A();return}k();let r=Pr(e.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!kn(n.relatedTarget,e.context.triggerElements)){if(b.current&&i){e.select(`open`)||v.openChangeTimeout.clear();let a=c.current;v.handler=b.current({...i,tree:_,x:n.clientX,y:n.clientY,onClose(){A(),k(),C.current&&!E()&&a===e.select(`domReferenceElement`)&&t(n,!0)}}),r.addEventListener(`mousemove`,v.handler),v.handler(n);return}(v.pointerType!==`touch`||!Z(e.select(`floatingElement`),n.relatedTarget))&&t(n)}}function l(e){Z(r,e.relatedTarget)||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.restTimeoutPending=!1)}let f=m?hr(r,`mouseout`,l):void 0;return s?gr(hr(r,`mousemove`,i,{once:!0}),hr(r,`mouseenter`,i),hr(r,`mouseleave`,o),f):gr(hr(r,`mouseenter`,i),hr(r,`mouseleave`,o),f)},[k,A,h,x,e,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D,m]),Y.useMemo(()=>{if(!n)return;function t(e){v.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=O(i,r,t.target);if(a&&!Et(v.pointerType))return;if(o&&s&&v.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=v.handleCloseOptions?.getScope?.()??r.ownerDocument.body;xs(v,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=zn(S.current);if(o&&!s||c===0||!s&&v.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;v.restTimeout.clear();function l(){if(v.restTimeoutPending=!1,E())return;let t=e.select(`open`);!v.blockMouseMove&&(!t||s)&&D()&&e.setOpen(!0,Q(Gn,n,r))}v.pointerType===`touch`?He.flushSync(()=>{l()}):s&&o?l():(v.restTimeoutPending=!0,v.restTimeout.start(c,l))}}},[n,v,E,O,a,e,S,D])}function Es(e){return vt&&e.movementX===0&&e.movementY===0}function Ds(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Os(e,t){return Ds(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function ks(e,t,n){return Ds(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function As(e,t,n){return Ds(t,n?e===an:e===on,e===cn)}function js(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:Ds(t,n?e===on:e===an,e===sn)}function Ms(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,triggerOrientation:_=g,parentOrientation:v,id:y,resetOnPointerLeave:b=!0,externalTree:x,nestedReturnFocusRef:S,grid:C}=t,w=C!=null,T=e.useState(`open`),E=e.useState(`floatingElement`),D=e.useState(`domReferenceElement`),O=e.context.dataRef,k=In(E),A=Pn(D),j=Cr(k),M=eo(),N=to(x),P=Y.useRef(f),F=Y.useRef(o??-1),I=Y.useRef(null),L=Y.useRef(!0),R=$(e=>{i(F.current===-1?null:F.current,e)}),z=Y.useRef(!!E),B=Y.useRef(T),V=Y.useRef(!1),H=Y.useRef(!1),ee=Y.useRef(null),te=Cr(h),U=Cr(T),W=Cr(o),ne=Cr(b),G=Nr(),re=Nr(),ie=$(()=>{G.cancel();function e(e){d||(ee.current=Yi(e,{sync:V.current,preventScroll:!0}))}let t=n.current[F.current],r=H.current;t&&e(t),(V.current?e=>e():e=>G.request(e))(()=>{let i=n.current[F.current]||t;i&&(t||e(i),ue&&(r||!L.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});X(()=>{O.current.orientation=g},[O,g]),X(()=>{T||(I.current=null),(!T||f!==`auto`)&&(P.current=f)},[T,f]),X(()=>{a&&(T&&E?(F.current=o??-1,P.current&&o!=null&&(H.current=!0,R())):z.current&&(F.current=-1,R()))},[a,T,E,o,R]),X(()=>{if(a){if(!T){V.current=!1;return}if(E)if(r==null){if(V.current=!1,W.current!=null)return;if(z.current&&(F.current=-1,ie()),(!B.current||!z.current)&&P.current&&(I.current!=null||P.current===!0&&I.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>re.request(e):queueMicrotask)(t),e+=1):(F.current=I.current==null||ks(I.current,_,u)||l?mi(n):hi(n),I.current=null,R())};t()}}else pi(n.current,r)||(F.current=r,ie(),H.current=!1)}},[a,T,E,r,W,l,n,_,u,R,ie,re]),X(()=>{if(!a||E||!N||d||!z.current)return;let e=N.nodesRef.current,t=e.find(e=>e.id===M)?.context?.elements.floating,n=$t(Pr(D??t??null)),r=e.some(e=>e.context&&Z(e.context.elements.floating,n));t&&!r&&L.current&&t.focus({preventScroll:!0})},[a,E,D,N,M,d]),X(()=>{B.current=T,z.current=!!E});let ae=r!=null,oe=$(e=>{if(!U.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(F.current!==t||r!==t)&&(F.current=t,R(e))}),se=$(()=>v??N?.nodesRef.current.find(e=>e.id===M)?.context?.dataRef?.current.orientation),ce=$(()=>mi(n,te.current)),le=$(t=>{if(L.current=!1,V.current=!0,t.which===229||!U.current&&t.currentTarget===j.current)return;if(l&&js(t.key,g,u,w)){Os(t.key,se())||St(t),e.setOpen(!1,Q(nr,t.nativeEvent));let n=S?.current??D;Pt(n)&&n.focus();return}r!=null&&r!==F.current&&!pi(n.current,r)&&(F.current=r);let i=F.current,a=mi(n,h),o=hi(n,h);if(A||(t.key===`Home`&&(St(t),F.current=a,R(t)),t.key===`End`&&(St(t),F.current=o,R(t))),C!=null){let e=C(t,F.current,n,g,c,u,h,a,o);if(e!=null&&e!==F.current&&(F.current=e,R(t)),g===`both`)return}if(Os(t.key,g)){St(t);let e=$t(t.currentTarget.ownerDocument);if(T&&!d&&Z(t.currentTarget,e)&&!n.current.some(t=>t!=null&&Z(t,e))){F.current=ks(t.key,g,u)?a:o,R(t),r===F.current&&ie();return}let{index:l,wrapped:f}=gi(n.current,i,{decrement:!ks(t.key,g,u),loopFocus:c,allowEscape:s,disabledIndices:h,minIndex:a,maxIndex:o});f&&(V.current=!1),F.current=l,R(t)}}),ue=Y.useMemo(()=>({onFocus(e){V.current=!0,oe(e)},onClick({currentTarget:e}){d||e.focus({preventScroll:!0})},onMouseMove(e){Es(e)||(V.current=!0,H.current=!1,p&&oe(e))},onPointerLeave(e){if(!U.current||!L.current||e.pointerType===`touch`)return;V.current=!0;let t=e.relatedTarget;if(!(!p||n.current.includes(t))&&ne.current&&(ee.current?.(),ee.current=null,F.current=-1,R(e),!d)){let e=j.current,t=$t(Pr(e));e&&Z(e,t)&&e.focus({preventScroll:!0})}}}),[oe,U,j,p,n,R,ne,d]),de=Y.useMemo(()=>d&&T&&ae&&{"aria-activedescendant":`${y}-${r}`},[d,T,ae,y,r]),fe=Y.useMemo(()=>({...A?{}:de,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&T&&!d){let n=tn(t.nativeEvent);if(n&&!Z(j.current,n))return;St(t);let r=Q(er,t.nativeEvent);e.setOpen(!1,r);let i=S?.current??D;!r.isCanceled&&Pt(i)&&i.focus();return}le(t)},onPointerMove(e){Es(e)||(L.current=!0)}}),[de,le,j,A,e,T,d,D,S]),pe=Y.useMemo(()=>{function t(t){e.setOpen(!0,Q(nr,t.nativeEvent,t.currentTarget))}function n(e){f===`auto`&&wt(e.nativeEvent)&&(P.current=!d)}function r(e){P.current=f,f===`auto`&&Tt(e.nativeEvent)&&(P.current=!0)}return{onKeyDown(n){let r=e.select(`open`);L.current=!1;let i=n.key.startsWith(`Arrow`),a=As(n.key,se(),u),o=Os(n.key,r?g:_),s=(l?a:o)||n.key===`Enter`||n.key.trim()===``;if(d&&r&&(!l||Mn(n.currentTarget)))return le(n);if(!(!r&&!m&&i)){if(s){let e=Os(n.key,se());I.current=l&&e?null:n.key}if(l){a&&(St(n),r?(F.current=ce(),R(n),d&&j.current?.focus()):t(n));return}o&&(W.current!=null&&(F.current=W.current),St(n),!r&&m?t(n):le(n),r&&R(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!d&&(F.current=-1,R(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[le,f,ce,l,R,e,m,g,_,se,u,W,d,j]),me=Y.useMemo(()=>({...de,...pe}),[de,pe]);return Y.useMemo(()=>a?{reference:me,floating:fe,item:ue,trigger:pe}:{},[a,me,fe,pe,ue])}function Ns(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=$(s),f=e.useState(`open`),p=ot(),m=Y.useRef(``),h=Y.useRef(u??i??-1),g=Y.useRef(null),_=$(e=>{function t(e){return r?.current[e]}function s(e){let n=t(e);return n&&!xi(n)||n?.matches(`:disabled`)?!1:o==null||!yi(Ze,e,o)}function c(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(!(!e[n]?.toLowerCase().startsWith(i)||!s(n)))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(St(e),d?.(!0)),m.current.length>0&&m.current[0]!==` `&&c(_,m.current)===-1&&e.key!==` `&&d?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(St(e),d?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&s(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,d?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=c(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,d?.(!1)):(a?.(b,e),g.current=b)}),v=$(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);Z(r,n)||Z(i,n)||(p.clear(),m.current=``,h.current=g.current,d?.(!1))});X(()=>{!f&&u!==null||(p.clear(),g.current=null,m.current!==``&&(m.current=``,d?.(!1)))},[f,u,p,d]);let y=Y.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return Y.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}var Ps=.1,Fs=Ps*Ps,Is=.5;function Ls(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Rs(e,t,n,r,i,a,o,s,c,l){let u=!1;return Ls(e,t,n,r,i,a)&&(u=!u),Ls(e,t,i,a,o,s)&&(u=!u),Ls(e,t,o,s,c,l)&&(u=!u),Ls(e,t,c,l,n,r)&&(u=!u),u}function zs(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Bs(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 Vs(e={}){let{blockPointerEvents:t=!1}=e,n=new at,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*Fs;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=tn(r),g=r.type===`mouseleave`,_=Z(u,h),v=Z(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&Nt(r.relatedTarget)&&Z(u,r.relatedTarget))return;function y(){return!!(s&&Gi(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=Bs(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=Bs(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=Bs(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=Bs(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!zs(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?Is/2:Is*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+Is+1,o=C||T?S.bottom-Is:S.top,s=C?T?S.bottom-Is:S.top:S.bottom-Is;M=Rs(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?Is/2:Is*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-Is,o=C||T?S.top+Is:S.bottom,s=C?T?S.top+Is:S.bottom:S.top+Is;M=Rs(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?Is/2:Is*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+Is+1,o=w||E?S.right-Is:S.left,s=w?E?S.right-Is:S.left:S.right-Is;M=Rs(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?Is/2:Is*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-Is,o=w||E?S.left+Is:S.right,s=w?E?S.left+Is:S.right:S.left+Is;M=Rs(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function Hs(e,t,n){let{reference:r,floating:i}=e,a=Zr(t),o=Qr(t),s=Xr(o),c=qr(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Jr(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Us(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}=Kr(t,e),p=ui(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=di(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=di(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 Ws=50,Gs=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Us},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Hs(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<Ws&&(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}=Hs(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Ks=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Kr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=qr(r),_=Zr(o),v=qr(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ci(o)]:ei(o)),x=p!==`none`;!d&&x&&b.push(...si(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=$r(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`&&_!==Zr(t))||T.every(e=>Zr(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Zr(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{}}}},qs=new Set([`left`,`top`]);async function Js(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=qr(n),s=Jr(n),c=Zr(n)===`y`,l=qs.has(o)?-1:1,u=a&&c?-1:1,d=Kr(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 Ys=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 Js(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}}}}},Xs=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}=Kr(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Zr(i),p=Yr(f),m=u[p],h=u[f],g=(e,t)=>Gr(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Zs=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}=Kr(e,t),u={x:n,y:r},d=Zr(i),f=Yr(d),p=u[f],m=u[d],h=Kr(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=qs.has(qr(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}}}},Qs=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Kr(e,t),c=await i.detectOverflow(t,s),l=qr(n),u=Jr(n),d=Zr(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=zr(p-c[m],g),y=zr(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Br(c.left,c.right):S=p-2*Br(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function $s(e){let t=qt(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Pt(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Vr(n)!==a||Vr(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ec(e){return Nt(e)?e:e.contextElement}function tc(e){let t=ec(e);if(!Pt(t))return Ur(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=$s(t),o=(a?Vr(n.width):n.width)/r,s=(a?Vr(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var nc=Ur(0);function rc(e){let t=At(e);return!Gt()||!t.visualViewport?nc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ic(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===At(e)}function ac(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ec(e),o=Ur(1);t&&(r?Nt(r)&&(o=tc(r)):o=tc(e));let s=ic(a,n,r)?rc(a):Ur(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=At(a),t=Nt(r)?At(r):r,n=e,i=Qt(n);for(;i&&t!==n;){let e=tc(i),t=i.getBoundingClientRect(),r=qt(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=At(i),i=Qt(n)}}return di({width:u,height:d,x:c,y:l})}function oc(e,t){let n=Jt(e).scrollLeft;return t?t.left+n:ac(jt(e)).left+n}function sc(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-oc(e,n),y:n.top+t.scrollTop}}function cc(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=jt(r),s=t?Rt(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Ur(1),u=Ur(0),d=Pt(r);if((d||!a)&&((kt(r)!==`body`||It(o))&&(c=Jt(r)),d)){let e=ac(r);l=tc(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?sc(o,c):Ur(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 lc(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function uc(e){let t=Jt(e),n=e.ownerDocument.body,r=Br(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Br(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+oc(e),o=-t.scrollTop;return qt(n).direction===`rtl`&&(a+=Br(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var dc=25;function fc(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=At(e),a=jt(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Gt()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(oc(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=dc&&(s-=o)}return{width:s,height:c,x:l,y:u}}function pc(e,t){let n=ac(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=tc(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function mc(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=fc(e,n,t);else if(t===`document`)r=uc(jt(e));else if(Nt(t))r=pc(t,n);else{let n=rc(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return di(r)}function hc(e,t){let n=t.get(e);if(n)return n;let r=Zt(e,[],!1).filter(e=>Nt(e)&&kt(e)!==`body`),i=null,a=qt(e).position===`fixed`,o=a?Yt(e):e;for(;Nt(o)&&!Kt(o);){let e=qt(o),t=Ut(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Yt(o)}return t.set(e,r),r}function gc(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Rt(t)?[]:hc(t,this._c):[].concat(n),r],o=mc(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=mc(t,a[e],i);s=Br(n.top,s),c=zr(n.right,c),l=zr(n.bottom,l),u=Br(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function _c(e){let{width:t,height:n}=$s(e);return{width:t,height:n}}function vc(e,t,n){let r=Pt(t),i=jt(t),a=n===`fixed`,o=ac(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Ur(0);if((r||!a)&&((kt(t)!==`body`||It(i))&&(s=Jt(t)),r)){let e=ac(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=oc(i));let l=i&&!r&&!a?sc(i,s):Ur(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function yc(e){return qt(e).position===`static`}function bc(e,t){if(!Pt(e)||qt(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return jt(e)===n&&(n=n.ownerDocument.body),n}function xc(e,t){let n=At(e);if(Rt(e))return n;if(!Pt(e)){let t=Yt(e);for(;t&&!Kt(t);){if(Nt(t)&&!yc(t))return t;t=Yt(t)}return n}let r=bc(e,t);for(;r&&Lt(r)&&yc(r);)r=bc(r,t);return r&&Kt(r)&&yc(r)&&!Ut(r)?n:r||Wt(e)||n}var Sc=async function(e){let t=this.getOffsetParent||xc,n=this.getDimensions,r=await n(e.floating);return{reference:vc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Cc(e){return qt(e).direction===`rtl`}var wc={convertOffsetParentRelativeRectToViewportRelativeRect:cc,getDocumentElement:jt,getClippingRect:gc,getOffsetParent:xc,getElementRects:Sc,getClientRects:lc,getDimensions:_c,getScale:tc,isElement:Nt,isRTL:Cc};function Tc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ec(e,t,n){let r=null,i,a=jt(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Hr(d),h=Hr(a.clientWidth-(u+f)),g=Hr(a.clientHeight-(d+p)),_=Hr(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Br(0,zr(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Tc(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=At(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Dc(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=ec(e),u=i||a?[...l?Zt(l):[],...t?Zt(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ec(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?ac(e):null;c&&g();function g(){let t=ac(e);h&&!Tc(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 Oc=Ys,kc=Xs,Ac=Ks,jc=Qs,Mc=Zs,Nc=(e,t,n)=>{let r=new Map,i=n??{},a={...wc,...i.platform,_c:r};return Gs(e,t,{...i,platform:a})},Pc=typeof document<`u`?Y.useLayoutEffect:function(){};function Fc(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(!Fc(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)&&!Fc(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Ic(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Lc(e,t){let n=Ic(e);return Math.round(t*n)/n}function Rc(e){let t=Y.useRef(e);return Pc(()=>{t.current=e}),t}function zc(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=Y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=Y.useState(r);Fc(f,r)||p(r);let[m,h]=Y.useState(null),[g,_]=Y.useState(null),v=Y.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=Y.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=Y.useRef(null),C=Y.useRef(null),w=Y.useRef(u),T=c!=null,E=Rc(c),D=Rc(i),O=Rc(l),k=Y.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Nc(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Fc(w.current,t)&&(w.current=t,He.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Pc(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=Y.useRef(!1);Pc(()=>(A.current=!0,()=>{A.current=!1}),[]),Pc(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=Y.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=Y.useMemo(()=>({reference:b,floating:x}),[b,x]),N=Y.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Lc(M.floating,u.x),r=Lc(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Ic(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return Y.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var Bc=(e,t)=>{let n=Oc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vc=(e,t)=>{let n=kc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hc=(e,t)=>({fn:Mc(e).fn,options:[e,t]}),Uc=(e,t)=>{let n=Ac(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wc=(e,t)=>{let n=jc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gc={...ps,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},Kc=class extends is{constructor(e,t,n){let r=new Go;super(qc(e,r,t,n),Jc(r),Gc)}setOpen=(e,t)=>{zo(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Q(Wn,e))}};function qc(e,t,n,r=!1){return{...ss(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function Jc(e){return{popupRef:Y.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var Yc=qe(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:d=null,children:f}=e,p=No((e,t)=>new Kc({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u},e,t));p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),v=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i,disabled:t}),Vo(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:b}=Ho(h,p),x=p.useState(`isInstantPhase`),S=p.useState(`instantType`),C=p.useState(`lastOpenChangeReason`),w=Y.useRef(null);X(()=>{m&&t&&p.setOpen(!1,Q(cr))},[m,t,p]),X(()=>{b===`ending`&&C===`none`||b!==`ending`&&x?(S!==`delay`&&(w.current=S),p.set(`instantType`,`delay`)):w.current!==null&&(p.set(`instantType`,w.current),w.current=null)},[b,x,C,S,p]),X(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]),Y.useImperativeHandle(o,()=>({unmount:y,close:()=>p.setOpen(!1,Q(lr))}),[y,p]);let T=h||_||!t&&a!==`none`;return(0,J.jsxs)(tt.Provider,{value:p,children:[l&&(0,J.jsx)(Po,{handle:l,store:p}),T&&(0,J.jsx)(Xc,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function Xc({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=So(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=yo(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=Y.useMemo(()=>ba(a.reference,i.reference),[a.reference,i.reference]);return Uo(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??Qe}),null}function Zc(e){return da(e,`base-ui`)}var Qc=Y.createContext(void 0);function $c(){return Y.useContext(Qc)}var el=`data-base-ui-tooltip-trigger`;function tl(e){let t=tn(e);return Nt(t)?t:null}var nl=Je(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=nt(!0),m=ms(a)??p;if(!m)throw Error(et(82));let h=Zc(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=Y.useRef(null),b=u??0,{registerTrigger:x,isMountedByThisTrigger:S}=Bo(h,y,m,{payload:o,closeOnClick:l,closeDelay:b}),C=$c(),{activeIdRef:w,delayRef:T,isInstantPhase:E,hasProvider:D}=mr(v,{open:_}),O=Ss(v);m.useSyncedValue(`isInstantPhase`,E);let k=m.useState(`disabled`),A=s??k,j=Cr(A),M=m.useState(`trackCursorAxis`),N=m.useState(`disableHoverablePopup`),P=Y.useRef(!1),F=ot(),I=Y.useRef(void 0);function L(){return D&&w.current!=null?0:c??C??600}function R(e){let t=y.current;if(!t||!e)return!1;let n=en(e,`[${el}]`);return n!==null&&n!==t&&Z(t,n)}function z(e){let t=R(e);return P.current=t,t&&(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1,F.clear()),t}let B=Ts(v,{enabled:!A,mouseOnly:!0,move:!1,handleClose:!N&&M!==`both`?Vs():null,restMs:L,delay(){return u==null&&D?{close:Rn(T.current,`close`)}:{close:b}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!P.current}}),V=_s(v,{enabled:!A}).reference,H=e=>{let t=P.current,n=tl(e),r=z(n),i=y.current,a=i&&n&&Z(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`){m.setOpen(!1,Q(Gn,e));return}if(t&&!r&&a&&!j.current&&!m.select(`open`)&&i&&Et(I.current)){let t=()=>{!P.current&&!j.current&&!m.select(`open`)&&m.setOpen(!0,Q(Gn,e,i))},n=L();n===0?(F.clear(),t()):F.start(n,t)}},ee=m.useState(`appliedTriggerProps`,S||M!==`none`);return Na(`button`,e,{state:{open:_},ref:[t,x,y],props:[B,V,ee,{onMouseOver(e){H(e.nativeEvent)},onFocus(e){R(tl(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){P.current=!1,F.clear(),I.current=void 0},onPointerEnter(e){I.current=e.pointerType},onPointerDown(e){I.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[On]:A?``:void 0,[el]:A?void 0:``},f],stateAttributesMapping:wn})}),rl=Y.createContext(void 0);function il(){let e=Y.useContext(rl);if(e===void 0)throw Error(et(70));return e}var al=Y.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=Ja({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,J.jsxs)(Y.Fragment,{children:[l,c&&He.createPortal(n,c)]})}),ol=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return nt().useState(`mounted`)||n?(0,J.jsx)(rl.Provider,{value:n,children:(0,J.jsx)(al,{ref:t,...r})}):null}),sl=Y.createContext(void 0);function cl(){let e=Y.useContext(sl);if(e===void 0)throw Error(et(71));return e}function ll(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),c=r.useState(`floatingId`),[l,u]=Y.useState(null),d=Y.useRef(null),f=to(n),p=Y.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=zc({...e,elements:{...p,...l&&{reference:l}}}),h=Y.useCallback(e=>{let t=Nt(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=Y.useMemo(()=>({...m.refs,setPositionReference:h,domReference:d}),[m.refs,h]),_=Y.useMemo(()=>({...m.elements,domReference:o}),[m.elements,o]),v=Y.useMemo(()=>({...m,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:g,elements:_,nodeId:t,rootStore:r}),[m,g,_,t,r,s,c]);return X(()=>{o&&(d.current=o)},[o]),X(()=>{r.context.dataRef.current.floatingContext=v;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),Y.useMemo(()=>({...m,context:v,refs:g,elements:_,rootStore:r}),[m,g,_,v,r])}var ul=Y.createContext(void 0);function dl(){return Y.useContext(ul)?.direction??`ltr`}var fl=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}=Kr(e,t)||{};if(l==null)return{};let d=ui(u),f={x:n,y:r},p=Qr(i),m=Xr(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=s.floating[y]||a.floating[m],C=b/2-x/2,w=S/2-h[m]/2-1,T=Math.min(d[_],w),E=Math.min(d[v],w),D=T,O=S-h[m]-E,k=S/2-h[m]/2+C,A=Gr(D,k,O),j=!c.arrow&&Jr(i)!=null&&k!==A&&a.reference[m]/2-(k<D?T:E)-h[m]/2<0,M=j?k<D?k-D:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),pl=(e,t)=>{let{name:n,fn:r}=fl(e);return{name:n,fn:r,options:[e,t]}},ml={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,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},hl={sideX:`left`,sideY:`top`},gl=`--available-width`,_l=`--available-height`,vl=`--anchor-width`,yl=`--anchor-height`,bl=`--transform-origin`,xl=gl,Sl=_l;function Cl(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 wl(e,t,n){let{rects:r,placement:i}=e;return{side:Cl(t,qr(i),n),align:Jr(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Tl(e){return El(e,ll)}function El(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shift:v,nodeId:y,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:S}=e,C=_.side||`flip`,w=_.align||`flip`,T=_.fallbackAxisSide||`end`,E=v?.crossAxis??!1,D=v?.rootBoundary,O=typeof n==`function`?n:void 0,k=$(O),A=O?k:n,j=Cr(n),M=Cr(g),N=dl()===`rtl`,[P,F]=Y.useState(null);!g&&P!==null&&F(null);let I=x===`placement`,L=P?qr(P):null,R=P&&I?Jr(P)||`center`:null,z=L||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":N?`left`:`right`,"inline-start":N?`right`:`left`}[i],B=R||o,V=B===`center`?z:`${z}-${B}`,H=l;typeof H==`number`?H={top:H,right:H,bottom:H,left:H}:H&&={top:H.top||0,right:H.right||0,bottom:H.bottom||0,left:H.left||0};let ee=+(i===`bottom`),te=+(i===`top`),U=+(i===`right`),W=+(i===`left`),ne={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:H},G=Y.useRef(null),re=Cr(a),ie=Cr(s),ae=typeof a==`function`?0:a,oe=typeof s==`function`?0:s,se=[];p&&se.push(p),se.push(Bc(e=>{let t=wl(e,i,N),n=typeof re.current==`function`?re.current(t):re.current,r=typeof ie.current==`function`?ie.current(t):ie.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[ae,oe,N,i]));let ce=w===`none`&&C!==`shift`,le=!ce&&(u||E||C===`shift`),ue=C===`none`?null:Uc({...ne,padding:{top:H.top+1+ee,right:H.right+1+W,bottom:H.bottom+1+te,left:H.left+1+U},mainAxis:!E&&C===`flip`,crossAxis:w===`flip`&&`alignment`,fallbackAxisSideDirection:T}),de=ce?null:Vc({...ne,rootBoundary:D,mainAxis:w!==`none`,crossAxis:le,limiter:u||E?void 0:Hc(e=>{if(!G.current)return{};let{width:t,height:n}=G.current.getBoundingClientRect(),r=Zr(qr(e.placement)),i=r===`y`?t:n,a=r===`y`?H.left+H.right:H.top+H.bottom;return{offset:i/2+a/2}})},[ne,u,E,D,H,w]);C===`shift`||w===`shift`||B===`center`?se.push(de,ue):se.push(ue,de),se.push(Wc({...ne,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!M.current)return;let i=e.style;i.setProperty(xl,`${t}px`),i.setProperty(Sl,`${n}px`);let a=At(e).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(vl,`${u}px`),i.setProperty(yl,`${d}px`)}}),pl(e=>({element:G.current||Pr(e.elements.floating).createElement(`div`),padding:G.current?d:0}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=qr(r),u=Jr(r),d=Zr(l)===`y`,f=G.current,p=typeof a==`function`?a(wl(e,i,N)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return le&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(bl,d?`${m} ${h}`:`${h} ${m}`),{}}},ml,b),X(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let fe=Y.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:pe,elements:me,x:he,y:ge,middlewareData:_e,update:ve,placement:ye,context:be,isPositioned:xe,floatingStyles:Se}=t({rootContext:h,open:m?g:void 0,placement:V,middleware:se,strategy:r,whileElementsMounted:m?void 0:(...e)=>Dc(...e,fe),nodeId:y,externalTree:S}),{sideX:Ce,sideY:K}=_e.adaptiveOrigin||hl,we=xe?r:`fixed`,Te=Y.useMemo(()=>{let e;return e=xe?b?{position:we,[Ce]:he,[K]:ge}:{...Se,position:we}:{position:we,top:0,left:0},e[xl]=`100vw`,e[Sl]=`100vh`,xe||(e.opacity=0),e},[b,we,Ce,he,K,ge,Se,xe]),Ee=Y.useRef(null);X(()=>{if(!g)return;let e=j.current,t=typeof e==`function`?e():e,n=(Dl(t)?t.current:t)||null;n!==Ee.current&&(pe.setPositionReference(n),Ee.current=n)},[g,pe,A,j]),Y.useEffect(()=>{if(!g)return;let e=j.current;typeof e!=`function`&&Dl(e)&&e.current!==Ee.current&&(pe.setPositionReference(e.current),Ee.current=e.current)},[g,pe,A,j]),Y.useEffect(()=>{if(m&&g&&me.reference&&me.floating)return Dc(me.reference,me.floating,ve,fe)},[m,g,me,ve,fe]);let De=qr(ye),Oe=Cl(i,De,N),ke=Jr(ye)||`center`,Ae=!!_e.hide?.referenceHidden;X(()=>{x&&g&&xe&&(De!==z||I&&ke!==B)&&F(ye)},[x,I,g,xe,ye,De,ke,z,B]);let je=Y.useMemo(()=>({position:`absolute`,top:_e.arrow?.y,left:_e.arrow?.x}),[_e.arrow]),Me=_e.arrow?.centerOffset!==0;return Y.useMemo(()=>({positionerStyles:Te,arrowStyles:je,arrowRef:G,arrowUncentered:Me,side:Oe,align:ke,physicalSide:De,anchorHidden:Ae,refs:pe,context:be,isPositioned:xe,update:ve}),[Te,je,G,Me,Oe,ke,De,Ae,pe,be,xe,ve])}function Dl(e){return e!=null&&`current`in e}function Ol(e){return e===`starting`?Ba:Qe}function kl(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),Na(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},Ol(r),i],stateAttributesMapping:En})}var Al=Y.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:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Ua,style:g,..._}=e,v=nt(),y=il(),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=Tl({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`adaptiveOrigin`)}),O=kl(e,Y.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]),{styles:D.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,J.jsx)(sl.Provider,{value:D,children:O})}),jl=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=nt(),{side:s,align:c}=cl(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);ko({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),Cs(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return Na(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[jo,f,Ol(d),a],stateAttributesMapping:Dn})}),Ml=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=Y.useMemo(()=>({open:t,close:n}),[t,n]);return(0,J.jsx)(Qc.Provider,{value:t,children:(0,J.jsx)(pr,{delay:i,timeoutMs:r,children:e.children})})};function Nl(e){return pa(19)?e:e?`true`:void 0}function Pl(e){let[t,n]=Y.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}var Fl=Ml,Il=Yc;function Ll(e){return(0,J.jsx)(nl,{delay:300,...e})}function Rl({className:e,sideOffset:t=6,side:n,align:r,children:i,...a}){return(0,J.jsx)(ol,{children:(0,J.jsx)(Al,{className:`z-50`,sideOffset:t,...n?{side:n}:{},...r?{align:r}:{},children:(0,J.jsx)(jl,{role:`tooltip`,className:q(`rounded-md border border-border bg-card px-2 py-1 text-xs text-card-foreground shadow-md`,e),...a,children:i})})})}var zl=O(`onMachines`),Bl=O(`sendAddMachine`),Vl=O(`sendRemoveMachine`),Hl=O(`onMachinesReachable`),Ul=O(`onMachineVersions`),Wl=O(`sendProjectToMachine`),Gl=O(`onProjectOnMachine`),Kl=O(`sendProjectHere`),ql=O(`onProjectHere`),Jl=O(`onMachineStartCheck`),Yl=O(`onMachineModels`),Xl=O(`onComputersThrough`),Zl=O(`sendAddComputerThrough`),Ql=O(`onMachinePerson`),$l=O(`sendRemoveMachineDevice`),eu=O(`sendRenameMachine`),tu=O(`sendRenameComputer`),nu=O(`sendLetMachineIn`),ru=O(`sendMachineCode`),iu=O(`sendMachineTold`),au=O(`onMachineLogins`),ou=O(`onMachineAgentAccounts`),su=O(`sendMachineAgentAccountFirst`),cu=O(`onMachineGitHosts`),lu=O(`sendMachineGitHostAccount`),uu=O(`sendMachineRemoveAgentAccount`),du=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),fu=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),pu={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`},mu=(0,Y.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,Y.createElement)(`svg`,{ref:c,...pu,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:fu(`lucide`,i),...s},[...o.map(([e,t])=>(0,Y.createElement)(e,t)),...Array.isArray(a)?a:[a]])),hu=(e,t)=>{let n=(0,Y.forwardRef)(({className:n,...r},i)=>(0,Y.createElement)(mu,{ref:i,iconNode:t,className:fu(`lucide-${du(e)}`,n),...r}));return n.displayName=`${e}`,n},gu=hu(`ArrowRight`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),_u=hu(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),vu=hu(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),yu=hu(`ChevronRight`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),bu=hu(`Copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),xu=hu(`House`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`1d0kgt`}]]),Su=hu(`Laptop`,[[`path`,{d:`M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16`,key:`tarvll`}]]),Cu=hu(`LoaderCircle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),wu=hu(`PanelLeft`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),Tu=hu(`Server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),Eu=hu(`Users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`path`,{d:`M16 3.13a4 4 0 0 1 0 7.75`,key:`1da9ce`}]]),Du=hu(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Ou={computer:Su,home:xu,shared:Eu,server:Tu};function ku({kind:e,online:t,labelled:n=!1,className:r}){let i=Ou[e];return(0,J.jsxs)(`span`,{className:q(`relative flex shrink-0`,r),children:[(0,J.jsx)(i,{className:`h-3.5 w-3.5 text-muted-foreground`,"aria-hidden":!0}),(0,J.jsx)(`span`,{...n?{"aria-label":t?`online`:`offline`,title:t?`online`:`offline`}:{"aria-hidden":!0},className:q(`absolute -right-1 -bottom-0.5 size-1.5 rounded-full`,t?`bg-success`:`bg-muted-foreground/50`)})]})}function Au({computer:e,named:t=!0}){let n=e.kind?Ou[e.kind]:Su;return t?(0,J.jsxs)(`span`,{className:`flex min-w-0 max-w-40 shrink-[4] items-center gap-1 text-xs text-muted-foreground`,children:[(0,J.jsx)(n,{className:`h-3 w-3 shrink-0`,"aria-hidden":!0}),(0,J.jsxs)(`span`,{className:`truncate`,children:[`on `,e.name]})]}):(0,J.jsx)(n,{role:`img`,"aria-label":`Runs on ${e.name}`,className:`h-3 w-3 shrink-0 text-muted-foreground`})}var ju=new Set([`git`,`me`,`mail`,`email`,`hello`,`hi`,`info`,`contact`,`dev`,`noreply`,`no-reply`]),Mu=/^\d+\+(?=[^@]+@users\.noreply\.github\.com$)/i;function Nu(e,t){let n=t?.trim();if(n)return n;let[r=``,i=``]=e.replace(Mu,``).split(`@`);return ju.has(r.toLowerCase())&&i?i.split(`.`)[0]||e:r||e}function Pu(e){let t=e.split(/[\s._-]+/).filter(Boolean);return(t.length>1?t[0][0]+t.at(-1)[0]:e.slice(0,2)).toUpperCase()}function Fu({email:e,name:t,picture:n,you:r=!1,said:i,className:a}){let[o,s]=(0,Y.useState)(),c=o?.picture===n?o:void 0;return(0,J.jsxs)(`span`,{...i?{role:`img`,"aria-label":i,title:i}:{"aria-hidden":!0},className:q(`relative flex size-7 shrink-0 items-center justify-center overflow-hidden rounded-full text-[10px] font-semibold`,r?`bg-primary/15 text-primary`:`bg-muted-foreground/15 text-muted-foreground`,r&&c?.landed&&`ring-2 ring-primary/40`,a),children:[e&&!c?.landed&&Pu(Nu(e,t)),n&&c?.landed!==!1&&(0,J.jsx)(`img`,{src:n,alt:``,referrerPolicy:`no-referrer`,onLoad:()=>s({picture:n,landed:!0}),onError:()=>s({picture:n,landed:!1}),className:`absolute inset-0 size-full object-cover`})]})}function Iu(e){if(!e)return;let t=new Date(e);return Number.isNaN(t.getTime())?void 0:t}function Lu(e,t=`—`){let n=Iu(e);return n?n.toLocaleString():t}function Ru(e,t=`—`){let n=Iu(e);return n?n.toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`}):t}function zu(e,t=`—`){let n=Iu(e);if(!n)return t;let r=Math.max(0,Math.floor((Date.now()-n.getTime())/1e3));if(r<60)return`${r}s ago`;let i=Math.floor(r/60);if(i<60)return`${i}m ago`;let a=Math.floor(i/60);if(a<24)return`${a}h ago`;let o=Math.floor(a/24);return o<7?`${o}d ago`:o<365?`${Math.floor(o/7)}w ago`:`${Math.floor(o/365)}y ago`}function Bu(e,t=`—`){let n=Iu(e);if(!n)return t;let r=Math.round((Date.now()-n.getTime())/1e3);if(r<60)return`just now`;let i=Math.round(r/60);if(i<60)return`${i}m ago`;let a=Math.round(i/60);if(a<24)return`${a}h ago`;let o=Math.round(a/24);return o<=7?`${o}d ago`:n.toLocaleDateString()}function Vu(e){let t=Math.max(0,Math.floor(e/1e3));if(t<60)return`${t}s`;let n=Math.floor(t/60);if(n<60)return`${n}m`;let r=Math.floor(n/60);return r<24?`${r}h`:`${Math.floor(r/24)}d`}function Hu(e){let t=Math.max(0,Math.floor(e/1e3));if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?`${n}m ${t%60}s`:`${Math.floor(n/60)}h ${n%60}m`}function Uu(e,t){return`${e} ${t}${e===1?``:`s`}`}function Wu(e){let t=Math.max(0,Math.floor(e/1e3));if(t<60)return Uu(t,`second`);let n=Math.floor(t/60);if(n<60)return Uu(n,`minute`);let r=Math.floor(n/60);return r<24?Uu(r,`hour`):Uu(Math.floor(r/24),`day`)}function Gu(e){return e.toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`}).toLowerCase().replace(/\s+/g,``)}function Ku(e){let t=new Date(e);return`${t.toLocaleDateString(void 0,{weekday:`long`})} ${Gu(t)}`}function qu(e){let t=new Date(e),n=t.toLocaleDateString(void 0,{month:`short`,day:`numeric`}),r=Intl.DateTimeFormat().resolvedOptions().timeZone;return`Quota resets on ${n}, ${Gu(t)} (${r})`}function Ju({driver:e,className:t,title:n}){return(0,J.jsx)(e===`codex`?Xu:Yu,{className:t,...n?{title:n}:{}})}function Yu({className:e,title:t}){return(0,J.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,className:e,...Zu(t),children:[t&&(0,J.jsx)(`title`,{children:t}),(0,J.jsx)(`path`,{d:`m4.714 15.956l4.718-2.648l.079-.23l-.08-.128h-.23l-.79-.048l-2.695-.073l-2.337-.097l-2.265-.122l-.57-.121l-.535-.704l.055-.353l.48-.321l.685.06l1.518.104l2.277.157l1.651.098l2.447.255h.389l.054-.158l-.133-.097l-.103-.098l-2.356-1.596l-2.55-1.688l-1.336-.972l-.722-.491L2 6.223l-.158-1.008l.656-.722l.88.06l.224.061l.893.686l1.906 1.476l2.49 1.833l.364.304l.146-.104l.018-.072l-.164-.274l-1.354-2.446l-1.445-2.49l-.644-1.032l-.17-.619a3 3 0 0 1-.103-.729L6.287.133L6.7 0l.995.134l.42.364l.619 1.415L9.735 4.14l1.555 3.03l.455.898l.243.832l.09.255h.159V9.01l.127-1.706l.237-2.095l.23-2.695l.08-.76l.376-.91l.747-.492l.583.28l.48.685l-.067.444l-.286 1.851l-.558 2.903l-.365 1.942h.213l.243-.242l.983-1.306l1.652-2.064l.728-.82l.85-.904l.547-.431h1.032l.759 1.129l-.34 1.166l-1.063 1.347l-.88 1.142l-1.263 1.7l-.79 1.36l.074.11l.188-.02l2.853-.606l1.542-.28l1.84-.315l.832.388l.09.395l-.327.807l-1.967.486l-2.307.462l-3.436.813l-.043.03l.049.061l1.548.146l.662.036h1.62l3.018.225l.79.522l.473.638l-.08.485l-1.213.62l-1.64-.389l-3.825-.91l-1.31-.329h-.183v.11l1.093 1.068l2.003 1.81l2.508 2.33l.127.578l-.321.455l-.34-.049l-2.204-1.657l-.85-.747l-1.925-1.62h-.127v.17l.443.649l2.343 3.521l.122 1.08l-.17.353l-.607.213l-.668-.122l-1.372-1.924l-1.415-2.168l-1.141-1.943l-.14.08l-.674 7.254l-.316.37l-.728.28l-.607-.461l-.322-.747l.322-1.476l.388-1.924l.316-1.53l.285-1.9l.17-.632l-.012-.042l-.14.018l-1.432 1.967l-2.18 2.945l-1.724 1.845l-.413.164l-.716-.37l.066-.662l.401-.589l2.386-3.036l1.439-1.882l.929-1.086l-.006-.158h-.055L4.138 18.56l-1.13.146l-.485-.456l.06-.746l.231-.243l1.907-1.312Z`})]})}function Xu({className:e,title:t}){return(0,J.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,className:e,...Zu(t),children:[t&&(0,J.jsx)(`title`,{children:t}),(0,J.jsx)(`path`,{d:`M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.0201 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z`})]})}function Zu(e){return e?{role:`img`}:{"aria-hidden":`true`}}var Qu=new Map,$u=500;function ed(e,t){Qu.delete(e),Qu.set(e,t),Qu.size>$u&&Qu.delete(Qu.keys().next().value)}var td=`openagent:read:`,nd=1e5,rd=new Map;function id(){try{return typeof window>`u`?void 0:window.localStorage}catch{return}}function ad(e){try{let t=id()?.getItem(td+e);return t?{value:JSON.parse(t)}:void 0}catch{return}}function od(e,t){try{let n=JSON.stringify(t);if(n===void 0||rd.get(e)===n)return;rd.set(e,n),n.length>nd?id()?.removeItem(td+e):id()?.setItem(td+e,n)}catch{}}function sd(e){if(e===void 0){Qu.clear(),ud.clear(),rd.clear(),dd.clear();return}Qu.delete(e),rd.delete(e);try{id()?.removeItem(td+e)}catch{}}var cd=new Set;function ld(e,t){Qu.has(e)||cd.has(e)||(cd.add(e),t().then(t=>{Qu.has(e)||ed(e,t)}).catch(()=>{}).finally(()=>cd.delete(e)))}var ud=new Map,dd=new Set;function fd(e){let t=()=>({asked:0,given:0,waiting:new Set});if(e===void 0)return t();let n=ud.get(e);return n||ud.set(e,n=t()),n}function pd(e,t,n,r){if(e.out&&!r)return e.out.settled;let i=++e.asked,a=t=>{for(let n of[...e.waiting])n(t)},o={n:i,settled:t().then(t=>{if(i<=e.given)return a();e.given=i,n!==void 0&&(ed(n,t),dd.add(n)),a({value:t})},()=>a()).finally(()=>{e.out===o&&delete e.out})};return e.out=o,o.settled}var md=new Set;typeof document<`u`&&document.addEventListener(`visibilitychange`,()=>{if(document.visibilityState===`visible`)for(let e of[...md])e()});var hd=()=>typeof document<`u`&&document.visibilityState===`hidden`,gd=(0,Y.createContext)(null);function _d(e,t,n,r,i,a){let o=()=>e&&typeof i==`object`?i.remember:void 0,s=e=>{if(e===void 0)return;if(Qu.has(e))return{value:Qu.get(e),stale:!1};if(typeof i!=`object`||!i.stored||dd.has(e))return;let t=ad(e);return t?{value:t.value,stale:!0}:void 0},[c]=(0,Y.useState)(()=>s(o())),[l,u]=(0,Y.useState)(()=>c?c.value:t),[d,f]=(0,Y.useState)(c!==void 0),[p,m]=(0,Y.useState)(c?.stale??!1),h=(0,Y.useRef)(t),g=(0,Y.useRef)({line:fd(void 0),live:!1}),_=(0,Y.useRef)(r),v=(0,Y.useRef)(!1),y=(0,Y.useRef)(n);y.current=n;let b=(0,Y.useRef)(()=>{});(0,Y.useEffect)(()=>{let t=o(),c=typeof i==`object`&&i.stored===!0,l=fd(t),d={line:l,...t===void 0?{}:{key:t},live:!0};g.current=d;let p=s(t);if(p?(u(p.value),f(!0)):(i!==`previous`&&u(h.current),f(!1)),m(p?.stale??!1),_.current=r,!e)return()=>void(d.live=!1);let x=v.current;v.current=!0;let S,C=()=>void pd(l,e,t,!1),w=()=>{clearTimeout(S);let e=y.current;e!==null&&!hd()&&(S=setTimeout(()=>void(hd()||C()),e))};b.current=w;let T=e=>{d.live&&(e&&(c&&t!==void 0&&od(t,e.value),u(e.value),f(!0),m(!1)),w())};l.waiting.add(T),n!==null&&md.add(C);let E=a?.(n=>{l.changed===n||hd()||(l.changed=n,pd(l,e,t,!0))});return pd(l,e,t,x),()=>{d.live=!1,b.current=()=>{},clearTimeout(S),l.waiting.delete(T),md.delete(C),E?.()}},r);let x=(0,Y.useRef)(n);(0,Y.useEffect)(()=>{x.current!==n&&(x.current=n,b.current())},[n]);let S=(0,Y.useCallback)(()=>{let{line:t,key:n,live:r}=g.current;return!e||!r?Promise.resolve():pd(t,e,n,!0)},r),C=(0,Y.useContext)(gd),w=(0,Y.useRef)({}),T=p&&vd(_.current,r);if((0,Y.useEffect)(()=>{if(!C)return;let e=w.current;return C(e,T),()=>C(e,!1)},[C,T]),!vd(_.current,r)){let e=s(o());return e?{value:e.value,reload:S,loaded:!0,stale:e.stale}:{value:i===`previous`?l:h.current,reload:S,loaded:!1,stale:!1}}return{value:l,reload:S,loaded:d,stale:p}}function vd(e,t){return e.length===t.length&&e.every((e,n)=>Object.is(e,t[n]))}function yd(e,t,n,r){return _d(e,t,null,n,r).value}function bd(e,t,n,r,i,a){return _d(e,t,n,r,i,a)}var xd=O(`onModels`),Sd=O(`onAgentUpdates`),Cd=O(`sendAgentUpdate`);function wd(){return yd(xd,void 0,[],{remember:`models`})}var Td=e=>`machine-models:${e}`;function Ed(e){ld(Td(e),()=>Yl(e))}function Dd(e){let t=wd(),n=yd(e===void 0?null:()=>Yl(e),void 0,[e],e===void 0?void 0:{remember:Td(e)});return e===void 0||n===null?{models:t,theirs:!1}:{models:n,theirs:!0}}function Od(e,t){return a.map(n=>{let r=e?.[n],i=`${s[n]} is not installed${t===void 0?``:` on ${t}`}.`,a=r?`error`in r?r.missing?i:r.error:`No models listed`:`Asking ${s[n]}…`;return{value:n,label:s[n],models:(r?.models??[]).map(e=>({value:e.id,label:e.name})),modelsNote:a}})}function kd(e,t){return(e?.models.find(e=>e.id===t)??e?.models.find(e=>e.resolvedId===t))?.name??t}function Ad(e,t){for(let n of Object.values(e??{})){let e=kd(n,t);if(e!==t)return e}return t}function jd(e,t,n){if(!t||!n)return[];let r=e?.[t]?.models??[];return(r.find(e=>e.id===n)??r.find(e=>e.resolvedId===n))?.efforts??[]}function Md(e,t,n){if(!t||!n)return;let r=e?.[t]?.models??[];return(r.find(e=>e.id===n)??r.find(e=>e.resolvedId===n))?.contextWindow}function Nd(){return Od(wd())}function Pd(){let[e,t]=(0,Y.useState)(!1),[n,r]=(0,Y.useState)(null);return{busy:e,error:n,reset:(0,Y.useCallback)(()=>r(null),[]),run:(0,Y.useCallback)(async(e,n=`Something went wrong.`)=>{t(!0),r(null);try{let t=await e();return Fd(t)?(r(t.error??n),{ok:!1}):{ok:!0,value:t}}catch(e){return r(e instanceof Error?e.message:n),{ok:!1}}finally{t(!1)}},[])}}function Fd(e){return typeof e==`object`&&!!e&&`ok`in e&&e.ok===!1}function Id({className:e,type:t,...n}){return(0,J.jsx)(`input`,{type:t,"data-slot":`input`,className:q(`flex h-9 w-full min-w-0 rounded-md border border-border bg-transparent px-3 py-1 text-sm shadow-sm outline-none transition-colors`,`placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-[var(--color-primary)]`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...n})}function Ld({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=Y.useRef(e!==void 0),[a,o]=Y.useState(()=>t);return[i&&e!==void 0?e:a,Y.useCallback(e=>{i||o(e)},[])]}var Rd=`ArrowUp`,zd=`ArrowDown`,Bd=`ArrowLeft`,Vd=`ArrowRight`,Hd=`Home`,Ud=`PageUp`,Wd=`PageDown`,Gd=new Set([Rd,zd,Bd,Vd,Hd,`End`]),Kd=`Shift`,qd=[Kd,`Control`,`Alt`,`Meta`];function Jd(e){return Pt(e)&&e.tagName===`INPUT`}function Yd(e){return!!(Jd(e)&&e.selectionStart!=null||Pt(e)&&e.tagName===`TEXTAREA`)}function Xd(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=Zd(e,t,`left`),a=Qd(e),o=Qd(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.scrollMarginLeft<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=Zd(e,t,`top`),r=Qd(e),i=Qd(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 Zd(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 Qd(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}}var $d=Y.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function ef(){return Y.useContext($d)}function tf(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=$(i),[,o]=Y.useState(0),s=Ve(rf).current,c=Ve(nf).current,l=Y.useRef(0),u=Y.useRef(!0),d=Y.useRef(null),f=Y.useRef(null),p=$(()=>{u.current||(u.current=!0,o(e=>e+1))}),m=$((e,t)=>{c.set(e,t),p()}),h=$(e=>{c.delete(e),p()}),g=$(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function _(e){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!sf(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&cf(r,n)>0){t.disconnect(),p();return}r=n}});f.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=of(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let v=$(()=>{let[e,t]=af(c),n=g(e),r=d.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});_(t),d.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});X(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),X(()=>{u.current&&v()}),X(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let y=$(e=>(s.add(e),()=>{s.delete(e)})),b=Y.useMemo(()=>({register:m,unregister:h,subscribeMapChange:y,nextIndexRef:l}),[m,h,y,l]);return(0,J.jsx)($d.Provider,{value:b,children:t})}function nf(){return new Map}function rf(){return new Set}function af(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>cf(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function of(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function sf(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function cf(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function lf(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var uf=`data-composite-item-active`;function df(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:s,rootRef:c,enableHomeAndEndKeys:l=!1,stopEventPropagation:u,disabledIndices:d,modifierKeys:f=Ze}=e,[p,m]=Y.useState(0),h=r!=null,g=Y.useRef(null),_=_r(g,c),v=Y.useRef([]),y=Y.useRef(!1),b=Y.useRef(null),x=o??p,S=$((e,t=!1)=>{if(b.current=v.current[e]??null,(s??m)(e),t){let t=v.current[e];Xd(g.current,t,a,n)}}),C=$(e=>{if(e.size===0)return;if(y.current){let e=v.current,t=e.indexOf(b.current);if(t===-1){let t=e[x];!t||yi(e,x,d)?S(ff(e,d)):b.current=t}else t!==x&&S(t);return}y.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?e.get(r)?.index??-1:-1;if(i!==-1)S(i);else if(yi(t,x,d)){let e=_i(t,{disabledIndices:d});pi(t,e)||S(e)}Xd(g.current,r,a,n)});X(()=>{if(d==null||o!=null||!y.current)return;let e=v.current;if(yi(e,x,d)){let t=_i(e,{disabledIndices:d});pi(e,t)||S(t)}},[d,o,x,v,S]);let w=$((e,t,n)=>i?i(e,t,n,v):n),T=$(e=>{let o=e.key===`Home`||e.key===`End`;if(!Gd.has(e.key)||!l&&o||pf(e,f)||!g.current)return;let s=a===`rtl`,c=s?Bd:Vd,p=s?Vd:Bd,m=n===`vertical`?zd:c,_=n===`vertical`?Rd:p,y=tn(e.nativeEvent);if(y!=null&&Yd(y)&&!lf(y)){let t=y.selectionStart,n=y.selectionEnd,r=y.value;if(t==null||e.shiftKey||t!==n||e.key!==_&&t<r.length||e.key!==m&&t>0)return}let b=x,C=mi(v,d),T=hi(v,d);r!=null&&(b=r({disabledIndices:d,elementsRef:v,event:e,highlightedIndex:x,loopFocus:t,maxIndex:T,minIndex:C,onLoop:w,orientation:n,rtl:s}));let E=n!==`vertical`&&e.key===c||n!==`horizontal`&&e.key===`ArrowDown`,D=n!==`vertical`&&e.key===p||n!==`horizontal`&&e.key===`ArrowUp`;l&&(e.key===`Home`?b=C:e.key===`End`&&(b=T)),b===x&&(E||D)&&(t&&b===T&&E?(b=C,i&&(b=i(e,x,b,v))):t&&b===C&&D?(b=T,i&&(b=i(e,x,b,v))):b=_i(v.current,{startingIndex:b,decrement:D,disabledIndices:d})),b!==x&&!pi(v.current,b)&&(u&&e.stopPropagation(),(h||o||E||D)&&e.preventDefault(),S(b,!0),queueMicrotask(()=>{v.current[b]?.focus()}))});return{props:{ref:_,onFocus(e){let t=g.current,n=tn(e.nativeEvent);!t||n==null||!Yd(n)||n.setSelectionRange(0,n.value.length)},onKeyDown:T},highlightedIndex:x,onHighlightedIndexChange:S,elementsRef:v,onMapChange:C,relayKeyboardEvent:T}}function ff(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(!(!i||yi(e,r,t))){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function pf(e,t){for(let n of qd)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}var mf=Y.createContext(void 0);function hf(e=!1){let t=Y.useContext(mf);if(t===void 0&&!e)throw Error(et(16));return t}function gf(e){let{render:t,className:n,style:r,refs:i=Ze,props:a=Ze,state:o=Qe,stateAttributesMapping:s,highlightedIndex:c,onHighlightedIndexChange:l,orientation:u,grid:d,loopFocus:f,onLoop:p,enableHomeAndEndKeys:m,onMapChange:h,stopEventPropagation:g=!0,rootRef:_,disabledIndices:v,modifierKeys:y,highlightItemOnHover:b=!1,tag:x=`div`,...S}=e,{props:C,highlightedIndex:w,onHighlightedIndexChange:T,elementsRef:E,onMapChange:D,relayKeyboardEvent:O}=df({grid:d,loopFocus:f,onLoop:p,orientation:u,highlightedIndex:c,onHighlightedIndexChange:l,rootRef:_,stopEventPropagation:g,enableHomeAndEndKeys:m,direction:dl(),disabledIndices:v,modifierKeys:y}),k=Na(x,e,{state:o,ref:i,props:[C,...a,S],stateAttributesMapping:s}),A=Y.useMemo(()=>({highlightedIndex:w,onHighlightedIndexChange:T,highlightItemOnHover:b,relayKeyboardEvent:O}),[w,T,b,O]);return(0,J.jsx)(mf.Provider,{value:A,children:(0,J.jsx)(tf,{elementsRef:E,onMapChange:e=>{h?.(e),D(e)},children:k})})}var _f=`data-valid`,vf=`data-invalid`,yf={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},bf={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},xf={disabled:!1,...bf},Sf={valid(e){return e===null?null:e?{[_f]:``}:{[vf]:``}}},Cf={invalid:void 0,name:void 0,validityData:{state:yf,errors:[],error:``,value:``,initialValue:null},setValidityData:Xe,disabled:void 0,setTouched:Xe,setDirty:Xe,setFilled:Xe,setFocused:Xe,focusOwnerRef:{current:void 0},validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:xf,registerFieldControl:Xe,validation:{getValidationProps:(e,t=Qe)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:Xe,getInputControl:()=>null,commit:async()=>{},change:Xe}},wf=Y.createContext(Cf);function Tf(e=!0){let t=Y.useContext(wf);if(t.setValidityData===Xe&&!e)throw Error(et(28));return t}function Ef(e,t,n,r,i=!0,a){let{registerFieldControl:o}=Tf(),s=Ve(()=>Symbol());X(()=>{let c=s.current;if(!i){o(c,void 0);return}o(c,{controlRef:e,getValue:r,id:t,name:a,value:n})},[e,i,r,t,a,o,s,n]),X(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}var Df=Y.createContext({controlId:void 0,registerControlId:Xe,resetControlId:Xe,labelId:void 0,setLabelId:Xe,messageIds:[],setMessageIds:Xe,getDescriptionProps:e=>e});function Of(){return Y.useContext(Df)}var kf=Y.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:Xe,validationMode:`onSubmit`,submitCountRef:{current:0}});function Af(){return Y.useContext(kf)}Object.keys(yf);function jf(e,t){return e.matches(`:disabled`)?!1:!t||e.form===t||e.form===null&&!e.hasAttribute(`form`)}var Mf=Y.createContext(void 0);function Nf(e=!1){let t=Y.useContext(Mf);if(!t&&!e)throw Error(et(86));return t}function Pf(e,t){let n=Y.useRef(e),r=$(t);X(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}var Ff=Y.createContext(void 0);function If(){return Y.useContext(Ff)}var Lf=[Kd],Rf=Y.forwardRef(function(e,t){let{render:n,className:r,disabled:i,readOnly:a,required:o,onValueChange:s,value:c,defaultValue:l,form:u,name:d,inputRef:f,id:p,style:m,...h}=e,{setTouched:g,setFocused:_,validationMode:v,name:y,disabled:b,state:x,validation:S,setDirty:C,setFilled:w,validityData:T}=Tf(),{labelId:E}=Of(),{clearErrors:D,elementRef:O}=Af(),k=Nf(!0),A=b||i,j=y??d,M=Zc(p),[N,P]=Ld({controlled:c,default:l,name:`RadioGroup`,state:`value`}),[F,I]=Y.useState(!1),L=$((e,t)=>{s?.(e,t),!t.isCanceled&&P(e)}),R=S.getInputControl,z=Y.useMemo(()=>({get current(){return R()}}),[R]),B=Y.useRef(null),V=Y.useRef(null),H=_r(B,f),ee=Y.useRef(H),te=$(e=>{B.current===e&&ee.current===H||(ee.current=H,H?.(e))});X(()=>{te(B.current)},[H,te]);let U=$(e=>{if(e){if(!e.disabled){V.current||=e;let t=B.current;(e.checked||t==null||t.disabled)&&te(e)}return()=>{V.current===e&&(V.current=null),B.current===e&&te(null)}}}),W=$(()=>{let e=O.current;if(!e)return N??null;for(let t of S.registeredInputs.keys())if(t.checked&&jf(t,e))return N??null;return null});Ef(z,M,N??null,W,!A,d),Pf(N,()=>{D(j),C(N!==T.initialValue),w(N!=null),S.change(N);let e=V.current;N==null&&e&&!e.disabled&&te(e)});let ne=E??k?.legendId,G={...x,disabled:A??!1,required:o??!1,readOnly:a??!1},re=Y.useMemo(()=>({checkedValue:N,disabled:A,form:u,validation:S,name:j,readOnly:a,registerInputRef:U,required:o,setCheckedValue:L,setTouched:I,touched:F}),[N,A,u,S,j,a,U,o,L,I,F]),ie={id:p,role:`radiogroup`,"aria-required":o||void 0,"aria-disabled":A||void 0,"aria-readonly":a||void 0,"aria-labelledby":ne,onBlur(e){Z(e.currentTarget,e.relatedTarget)||(I(!1),g(!0),_(!1),v===`onBlur`&&S.commit(N))},onKeyDownCapture(e){e.key.startsWith(`Arrow`)&&I(!0)}};return(0,J.jsx)(Ff.Provider,{value:re,children:(0,J.jsx)(gf,{render:n,className:r,style:m,state:G,props:[ie,h,e=>S.getValidationProps(A??!1,e)],refs:[t],stateAttributesMapping:Sf,enableHomeAndEndKeys:!1,modifierKeys:Lf})})}),zf=`data-checked`,Bf=`data-unchecked`,Vf={checked(e){return e?{[zf]:``}:{[Bf]:``}},...pn,...Sf};function Hf(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(At(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function Uf(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:Y.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 Wf(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=Y.useRef(null),s=hf(!0),c=a??s!==void 0,{props:l}=Uf({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=Y.useCallback(()=>{let e=o.current;Gf(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return X(u,[u]),{getButtonProps:Y.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return ba({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(Aa(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=Gf(r),s=!i&&Kf(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),Hf(r,e));return}if(!l||i||!d&&!u){n&&s&&d&&e.preventDefault();return}e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),Hf(r,e)))},onKeyUp(e){if(!t){if(Aa(e),a?.(e),e.target===e.currentTarget&&i&&c&&Gf(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),Hf(e.currentTarget,e))}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:$(e=>{o.current=e,u()})}}function Gf(e){return Pt(e)&&e.tagName===`BUTTON`}function Kf(e){return Pt(e)&&e.tagName===`A`&&!!e.href}function qf(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=ef(),u=Y.useRef(-1),[d,f]=Y.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),p=a??d,m=Y.useRef(null),h=Y.useCallback(e=>{let t=m.current;t&&s(t),m.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return X(()=>{if(a==null)return c(e=>{let t=m.current?e.get(m.current)?.index:null;t!=null&&f(t)})},[a,c]),{ref:h,index:p}}function Jf(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=hf(),{ref:i,index:a}=qf(e),o=n===a,s=Y.useRef(null),c=_r(i,s);return{compositeProps:{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()}},compositeRef:c,index:a}}function Yf(e){let{render:t,className:n,style:r,state:i=Qe,props:a=Ze,refs:o=Ze,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=Jf({metadata:s});return Na(l,e,{state:i,ref:[f,...o],props:[d,...a,u],stateAttributesMapping:c})}function Xf(e,t,n){let{setFocused:r,focusOwnerRef:i}=Tf(),a=$(t=>{(t?!e:i.current===a)&&(i.current=t&&a,n?.(t),r(t))});return X(()=>{let e=t.current;return e?.getRootNode()?.activeElement===e&&a(!0),()=>a(!1)},[e,t,a]),a}var Zf=Y.createContext({disabled:!1});function Qf(){return Y.useContext(Zf)}function $f(e,t,n,r=!0,i,a){let[o,s]=Y.useState(),c=Zc(i?`${i}-label`:void 0),l=!!a?.trim(),u=e??(l?void 0:t)??o;return X(()=>{let i=e||t||l||!r?void 0:ep(n.current,c);o!==i&&s(i)}),u}function ep(e,t){let n=tp(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function tp(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}function np(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=Of(),o=Zc(),s=Ve(()=>Symbol()),c=Y.useRef(!1),l=Y.useRef(!1),u=$(()=>{!c.current||i===Xe||(c.current=!1,i(s.current,void 0))});return X(()=>{if(!n||i===Xe){u();return}let e;if(t!==void 0)l.current=!0,e=t;else if(l.current)e=o;else{a();return}if(e===void 0){u();return}c.current=!0,i(s.current,e)},[t,n,i,a,o,s,u]),X(()=>u,[u]),(n?r:void 0)??t??o}function rp(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var ip=Y.createContext(void 0);function ap(){let e=Y.useContext(ip);if(e===void 0)throw Error(et(52));return e}var op=Y.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,readOnly:a=!1,required:o=!1,"aria-labelledby":s,value:c,inputRef:l,nativeButton:u=!1,id:d,style:f,...p}=e,m=If(),{disabled:h,readOnly:g,required:_,form:v,checkedValue:y,touched:b=!1,validation:x,name:S,setCheckedValue:C=Xe,setTouched:w=Xe,registerInputRef:T=Xe}=m??{},{setTouched:E,setFilled:D,state:O,disabled:k}=Tf(),A=Qf(),{labelId:j,getDescriptionProps:M}=Of(),N=k||A.disabled||h||i,P=g||a,F=_||o,I=v,L=m?y===c:c===``,R=Y.useRef(null),z=Xf(N,R),B=Y.useRef(null),V=x?.registerInput,H=_r(l,B,T,Y.useCallback(e=>V?.(e,{controlRef:R,value:void 0}),[V]));X(()=>{B.current?.checked&&D(!0)},[D]),X(()=>{if(B.current){if(N&&L){T(null);return}T(B.current)}},[L,N,T]);let ee=Zc(),te=np({id:d}),U=u?void 0:te,W={role:`radio`,"aria-checked":L,"aria-labelledby":$f(s,j,B,!u,U,p[`aria-label`]),[uf]:L?``:void 0,id:u?te:ee,onKeyDown(e){e.key===`Enter`&&e.preventDefault()},onClick(e){if(e.defaultPrevented||N||P)return;e.preventDefault();let t=B.current;t&&Hf(t,e)},onFocus(e){z(!0),!(e.defaultPrevented||N||P||!b)&&(B.current?.click(),w(!1))},onBlur(){m||z(!1)}},{getButtonProps:ne,buttonRef:G}=Wf({disabled:N,native:u,composite:!1}),re={type:`radio`,ref:H,form:I,id:U,name:S,tabIndex:-1,style:S?Lr:Ir,"aria-hidden":!0,...c===void 0?Qe:{value:rp(c)},disabled:N,checked:L,required:F,readOnly:P,onChange(e){if(e.nativeEvent.defaultPrevented||N||P||c===void 0)return;let t=Q(Un,e.nativeEvent);C(c,t),!t.isCanceled&&E(!0)},onClick(e){e.stopPropagation()},onFocus(){R.current?.focus()}},ie=Y.useMemo(()=>({...O,required:F,disabled:N,readOnly:P,checked:L}),[O,N,P,L,F]),ae=ie,oe=m!==void 0,se=[t,R,G],ce=[W,p,ne,M,x?e=>x.getValidationProps(N,e):Qe],le=Na(`span`,e,{enabled:!oe,state:ie,ref:se,props:ce,stateAttributesMapping:Vf});return(0,J.jsxs)(ip.Provider,{value:ae,children:[oe?(0,J.jsx)(Yf,{tag:`span`,render:n,className:r,style:f,state:ie,refs:se,props:ce,stateAttributesMapping:Vf}):le,(0,J.jsx)(`input`,{...re,suppressHydrationWarning:!0})]})}),sp=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=ap(),c=s.checked,{mounted:l,transitionStatus:u,setMounted:d}=wo(c),f={...s,transitionStatus:u},p=Y.useRef(null),m=a||l,h=Na(`span`,e,{ref:[t,p],state:f,props:o,stateAttributesMapping:Vf});return ko({batch:!0,enabled:!c,open:c,ref:p,onComplete(){c||d(!1)}}),m?h:null});function cp({className:e,disabled:t=!1,onKeyDown:n,...r}){return(0,J.jsx)(Rf,{"data-slot":`radio-group`,disabled:t,className:q(`grid gap-2`,e),onKeyDown:e=>{e.target.closest(`[role="radio"]`)||e.preventBaseUIHandler(),n?.(e)},...r})}function lp({className:e,disabled:t,...n}){return(0,J.jsx)(op,{"data-slot":`radio-group-item`,...t===void 0?{}:{disabled:t},className:q(`inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full border border-border bg-transparent`,`transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)]`,`data-[checked]:border-primary`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:(0,J.jsx)(sp,{className:`h-2 w-2 rounded-full bg-primary`})})}function up({value:e,disabled:t,className:n,children:r}){let i=(0,Y.useId)();return(0,J.jsxs)(`label`,{id:i,"data-slot":`radio-group-option`,className:q(`flex flex-wrap items-center gap-x-2 gap-y-0.5 text-sm leading-snug has-[[data-disabled]]:opacity-50`,n),children:[(0,J.jsx)(lp,{value:e,disabled:t,"aria-labelledby":i}),r]})}var dp=Y.createContext(void 0);function fp(e){let t=Y.useContext(dp);if(t===void 0&&!e)throw Error(et(33));return t}var pp=Y.createContext(void 0);function mp(e){let t=Y.useContext(pp);if(t===void 0&&!e)throw Error(et(36));return t}var hp=Y.createContext(void 0);function gp(e=!0){let t=Y.useContext(hp);if(t===void 0&&!e)throw Error(et(25));return t}var _p=Y.createContext(null);function vp(e=`root`){let t=Y.useContext(_p),n=Y.useContext(pp);return t===null||n===void 0?null:(e===`submenu-trigger`?n.virtualFocus||n.parentVirtualFocus:n.virtualFocus)?t:null}var yp={visible:!0,ref:null};function bp(){return yp}function xp(e,t,n=`root`){let r=vp(n),i=((n===`submenu-trigger`?r?.useSubmenuTrigger:r?.useItem)??bp)({label:e.label,children:e.children,render:e.render}),a=_r(t,i.ref);return{visible:i.visible,ref:a,props:i.props}}var Sp=Y.createContext(void 0);function Cp(){let e=Y.useContext(Sp);if(e===void 0)throw Error(et(30));return e}function wp(e){e.preventDefault()}function Tp(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,l=mp(),u=gp(!0),d=c.type===`submenu-trigger`,f=d?l.parentVirtualFocus:l.virtualFocus,p=(d&&l.parent.type===`menu`?l.parent.store:l.store).useState(`webkitAriaSelected`,n),{events:m}=a.useState(`floatingTreeRoot`),h=a.useState(`open`),g=u!==void 0,_=!f&&h&&n?0:-1;return Y.useMemo(()=>({id:r,role:`menuitem`,tabIndex:_,"aria-selected":p,onMouseDown:f?wp:void 0,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&m.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&m.emit(`close`,{domEvent:e.nativeEvent,reason:Jn})},onMouseUp(e){if(u){let t=u.initialCursorPointRef.current;if(u.initialCursorPointRef.current=null,g&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||g&&!gt&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!g||e.button===2)&&c.type===`regular-item`&&Hf(s.current,e,{detail:1,pointerType:`mouse`})}}),[t,_,r,m,i,a.context.allowMouseUpTriggerRef,o,s,u,g,c.type,p,f])}var Ep={type:`regular-item`};function Dp(e){let{closeOnClick:t,disabled:n,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:c,nodeId:l}=e,u=Y.useRef(null),{getButtonProps:d,buttonRef:f}=Wf({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),p=Tp({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:u,itemMetadata:c}),m=Y.useCallback(e=>ba(p,{onMouseEnter(e){c.type===`submenu-trigger`&&c.setActive(e.nativeEvent)}},e,d),[p,d,c]),h=_r(u,f);return Y.useMemo(()=>({getItemProps:m,itemRef:h}),[m,h])}var Op=`data-checked`,kp=`data-unchecked`,Ap={checked(e){return e?{[Op]:``}:{[kp]:``}},...pn},jp=Y.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!1,checked:l=!1,onCheckedChange:u,style:d,...f}=e,{store:p}=mp(),m=qf({guess:!0,label:a}),h=Zc(i),g=p.useState(`disabled`),_=p.useState(`isActive`,m.index),v=p.useState(`floatingNodeId`),y=p.useState(`itemProps`),b=s||g,{getItemProps:x,itemRef:S}=Dp({closeOnClick:c,disabled:b,highlighted:_,id:h,store:p,nativeButton:o,nodeId:v,itemMetadata:Ep}),C=Y.useMemo(()=>({disabled:b,highlighted:_,checked:l}),[b,_,l]);function w(e){let t=Q(Jn,e.nativeEvent,void 0,{preventUnmountOnClose:Xe});u?.(!l,t)}let T=Na(`div`,e,{state:C,stateAttributesMapping:Ap,props:[y,{role:`menuitemcheckbox`,"aria-checked":l,onClick:w},f,x],ref:[S,t,m.ref]});return(0,J.jsx)(Sp.Provider,{value:C,children:T})}),Mp=Y.forwardRef(function(e,t){let{checked:n,defaultChecked:r,onCheckedChange:i,...a}=e,[o,s]=Ld({controlled:n,default:r??!1,name:`MenuCheckboxItem`,state:`checked`}),c=xp(e,t);function l(e,t){i?.(e,t),t.isCanceled||s(e)}return c.visible?(0,J.jsx)(jp,{...a,checked:o,onCheckedChange:l,ref:c.ref}):null}),Np=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=Cp(),c=Y.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=wo(s.checked);return ko({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}}),Na(`span`,e,{state:{checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l},ref:[t,c],stateAttributesMapping:Ap,props:{"aria-hidden":!0,...o},enabled:a||u})}),Pp=Y.createContext(void 0);function Fp(){let e=Y.useContext(Pp);if(e===void 0)throw Error(et(31));return e}var Ip=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=Y.useState(void 0),c=Na(`div`,e,{ref:t,props:{role:`group`,"aria-labelledby":o,...a}});return(0,J.jsx)(Pp.Provider,{value:s,children:c})}),Lp=Y.forwardRef(function(e,t){return(0,J.jsx)(vp()?.Group??Ip,{...e,ref:t})}),Rp=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Zc(a),c=Fp();return X(()=>(c(s),()=>{c(e=>e===s?void 0:e)}),[c,s]),Na(`div`,e,{ref:t,props:{id:s,"aria-hidden":!0,...o}})}),zp=Y.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,{store:d}=mp(),f=qf({guess:!0,label:a}),p=Zc(i),m=d.useState(`disabled`),h=d.useState(`isActive`,f.index),g=d.useState(`floatingNodeId`),_=d.useState(`itemProps`),v=s||m,{getItemProps:y,itemRef:b}=Dp({closeOnClick:c,disabled:v,highlighted:h,id:p,store:d,nativeButton:o,nodeId:g,itemMetadata:Ep});return Na(`div`,e,{state:{disabled:v,highlighted:h},props:[_,u,y],ref:[b,t,f.ref]})}),Bp=Y.forwardRef(function(e,t){let n=xp(e,t);return n.visible?(0,J.jsx)(zp,{...e,ref:n.ref}):null}),Vp=Y.createContext(void 0);function Hp(e){let t=Y.useContext(Vp);if(t===void 0&&!e)throw Error(et(69));return t}var Up=Y.createContext(void 0);function Wp(){return Y.useContext(Up)}function Gp(e,t){let n=La(e.render);if(Y.isValidElement(n)){let e=n.props;if(Object.hasOwn(e,`id`))return e.id??``}return e.id??t}function Kp(e,t,n){let r=Gp(e,t),i=r===t?void 0:r;return[r,Y.useCallback(e=>n?.(e?i:void 0),[i,n])]}function qp(e,t,n){let r=La(e.render),i=Y.isValidElement(r)?r.props:void 0,a=e[`aria-label`]??i?.[`aria-label`],o=e[`aria-labelledby`]??i?.[`aria-labelledby`];return o==null&&!a&&(o=t?t.id||void 0:n||void 0),o}var Jp=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,id:o,initialFocus:s,...c}=e,{store:l,defaultFloatingId:u,setRenderedFloatingId:d,virtualFocus:f,orientation:p}=mp(),m=Wp(),{side:h,align:g}=fp(),_=Hp(!0)!=null,v=l.useState(`open`),y=l.useState(`transitionStatus`),b=l.useState(`popupProps`),x=l.useState(`mounted`),S=l.useState(`instantType`),C=l.useState(`activeTriggerElement`),w=l.useState(`parent`),T=l.useState(`lastOpenChangeReason`),E=l.useState(`rootId`),D=l.useState(`floatingRootContext`),O=l.useState(`floatingTreeRoot`),k=l.useState(`closeDelay`),A=l.useState(`hoverEnabled`),j=l.useState(`disabled`),M=l.useState(`openMethod`),N=l.useState(`activeTriggerId`),P=l.useState(`listElement`),[F,I]=Kp(e,u,d),L=qp(e,C,N),R=w.type===`menu`?m:void 0,z=w.type===`context-menu`,B=s??w.type!==`menu`;s===void 0&&P&&w.type!==`menu`&&(B=()=>l.state.activeIndex===null&&P),ko({open:v,ref:l.context.popupRef,onComplete(){v&&l.context.onOpenChangeComplete?.(!0)}}),Y.useEffect(()=>{function e(e){l.setOpen(!1,Q(e.reason,e.domEvent))}return O.events.on(`close`,e),()=>{O.events.off(`close`,e)}},[O.events,l]),Cs(D,{enabled:A&&!j&&!z&&w.type!==`menubar`,closeDelay:k});let V=l.useStateSetter(`popupElement`),{parentVirtualFocusRef:H,handleFocus:ee}=(Y.useContext(_p)?.useParentHandoff??Xp)(l,w,v,f),te=Na(`div`,e,{state:{transitionStatus:y,side:h,align:g,open:v,nested:w.type===`menu`,instant:S},ref:[t,l.context.popupRef,V,I],stateAttributesMapping:Dn,props:[b,{id:F,...P?{role:`presentation`}:{role:`menu`,"aria-orientation":p===`horizontal`?`horizontal`:void 0,"aria-labelledby":L},onKeyDown(e){R?.onPopupKeyDown?.(e),_&&Gd.has(e.key)&&e.stopPropagation()},onFocus:ee},Ol(y),c,{"data-rootownerid":E}]}),U=w.type===void 0||z;(C||w.type===`menubar`&&T!==`outside-press`)&&(U=!0);let W=R?.getReturnElement??H;return(0,J.jsx)(ho,{context:D,openInteractionType:M,modal:z,disabled:!x,returnFocus:a??W??U,explicitReturnFocus:a===void 0&&W?!1:void 0,initialFocus:B,restoreFocus:!0,getInsideElements:w.type===void 0?()=>[l.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:w.type===`menubar`?void 0:O,previousFocusableElement:C,nextFocusableElement:w.type===void 0?l.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:te})}),Yp={parentVirtualFocusRef:void 0,handleFocus:void 0};function Xp(){return Yp}var Zp=Y.forwardRef(function(e,t){return(0,J.jsx)(vp()?.Popup??Jp,{...e,ref:t})}),Qp=Y.createContext(void 0);function $p(){let e=Y.useContext(Qp);if(e===void 0)throw Error(et(32));return e}var em=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i,parent:a}=mp();if(!(i.useState(`mounted`)||n))return null;let o=a.type===`menu`||a.type===`menubar`?`group`:void 0;return(0,J.jsx)(Qp.Provider,{value:n,children:(0,J.jsx)(Ya,{ref:t,...r,portalOwnerRole:o})})}),tm=Y.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,J.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function nm(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=Y.useRef(null),o=Y.useRef(null),s=Oo(r);X(()=>{i||(o.current?.abort(),o.current=null,t.state.instantType===`trigger-change`&&t.set(`instantType`,void 0))},[i,t]),X(()=>{let e=n,r=a.current;if(e&&(a.current=e),!r||!e||e===r||!t.select(`open`))return;t.set(`instantType`,void 0);let i=new AbortController;return o.current=i,s(()=>{t.select(`open`)&&t.set(`instantType`,`trigger-change`)},i.signal),()=>{i.abort()}},[n,s,t])}var rm={},im={},am=``;function om(e,t){return It(e)?e:t}function sm(e,t,n){return/hidden|clip/.test(e.getComputedStyle(om(t,n)).overflowY)}function cm(e){if(typeof document>`u`)return!1;let t=Pr(e);return At(t).innerWidth-t.documentElement.clientWidth>0}function lm(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=Pr(e),n=t.documentElement,r=t.body,i=om(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function um(e){let t=Pr(e),n=t.documentElement,r=t.body,i=om(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function dm(e){let t=Pr(e),n=t.documentElement,r=t.body,i=At(n),a=0,o=0,s=!1,c=Mr.create();if(vt&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,rm={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},am=n.style.scrollBehavior,im={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=om(n,r);if(s=lm(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,rm),Object.assign(r.style,im),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=am)}function d(){u(),c.request(l)}l();let f=hr(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var fm=new class{lockCount=0;restore=null;timeoutLock=at.create();timeoutUnlock=at.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Pr(e),n=t.documentElement,r=t.body,i=At(n);if(sm(i,n,r)){let t=new i.MutationObserver(()=>{sm(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=pt||!cm(e);this.restore=a?um(e):dm(e)}};function pm(e=!0,t=null){X(()=>{if(e)return fm.acquire(t)},[e,t])}var mm=20;function hm(e,t,n,r){let[i,a]=Y.useState(!1);X(()=>{if(!e||!t||n==null){a(!1);return}let r=Pr(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-mm)},[e,t,n]),pm(e&&(!t||i),r)}var gm=Y.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:s,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Ha,style:g,..._}=e,{store:v,virtualFocus:y,syncHighlightedItem:b}=mp(),x=$p(),S=gp(!0),C=v.useState(`parent`),w=v.useState(`floatingRootContext`),T=v.useState(`floatingTreeRoot`),E=v.useState(`mounted`),D=v.useState(`open`),O=v.useState(`modal`),k=v.useState(`openMethod`),A=v.useState(`activeTriggerElement`),j=v.useState(`transitionStatus`),M=v.useState(`positionerElement`),N=v.useState(`instantType`),P=v.useState(`adaptiveOrigin`),F=v.useState(`lastOpenChangeReason`),I=v.useState(`floatingNodeId`),L=v.useState(`floatingParentNodeId`),R=w.useState(`domReferenceElement`),z=n,B=c,V=l,H=s,ee=h;C.type===`context-menu`&&(z=n??C.context?.anchor,H??=`start`,!o&&H!==`center`&&(V=e.alignOffset??2,B=e.sideOffset??-5));let te=o,U=H;C.type===`menu`?(te??=`inline-end`,U??=`start`,ee=e.collisionAvoidance??Ua):C.type===`menubar`&&(te??=C.context.orientation===`vertical`?`inline-end`:`bottom`,U??=`start`);let W=C.type===`context-menu`,ne=Tl({anchor:z,floatingRootContext:w,positionMethod:S?`fixed`:r,mounted:E,side:te,sideOffset:B,align:U,alignOffset:V,arrowPadding:W?0:f,collisionBoundary:u,collisionPadding:d,sticky:p,nodeId:I,keepMounted:x,disableAnchorTracking:m,collisionAvoidance:ee,shift:W?{crossAxis:!(`side`in ee&&ee.side===`flip`),rootBoundary:`layoutViewport`}:void 0,externalTree:T,adaptiveOrigin:P,lazyFlip:y?`placement`:!1});Y.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===I&&v.set(`hoverEnabled`,!1),e.nodeId!==I&&e.parentNodeId===v.select(`floatingParentNodeId`)&&v.setOpen(!1,Q(sr)))}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[v,T.events,I]),Y.useEffect(()=>{if(v.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==v.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;v.setOpen(!1,Q(t))}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[T.events,v]);let G=ot();Y.useEffect(()=>{D||G.clear()},[D,G]),Y.useEffect(()=>{function e(e){if(!(!D||e.nodeId!==v.select(`floatingParentNodeId`)))if(e.target&&A&&A!==e.target){let e=v.select(`closeDelay`);e>0?G.isStarted()||G.start(e,()=>{v.setOpen(!1,Q(sr))}):v.setOpen(!1,Q(sr))}else G.clear()}return T.events.on(`itemhover`,e),()=>{T.events.off(`itemhover`,e)}},[T.events,D,A,v,G]),Y.useEffect(()=>{let e={open:D,nodeId:I,parentNodeId:L,reason:v.select(`lastOpenChangeReason`)};T.events.emit(`menuopenchange`,e)},[T.events,D,v,I,L]),nm({store:v,domReference:R,positionerElement:M,open:D});let re={open:D,side:ne.side,align:ne.align,anchorHidden:ne.anchorHidden,nested:C.type===`menu`,instant:N},ie=C.type===`menubar`&&C.context.modal;hm(D&&(ie||O&&F!==`trigger-hover`),k===`touch`,M,A);let ae=kl(e,re,{styles:ne.positionerStyles,transitionStatus:j,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!E,inert:!D}),oe=E&&C.type!==`menu`&&(C.type!==`menubar`&&O&&F!==`trigger-hover`||C.type===`menubar`&&C.context.modal),se=null;return C.type===`menubar`?se=C.context.contentElement:C.type===void 0&&(se=A),(0,J.jsxs)(dp.Provider,{value:ne,children:[oe&&(0,J.jsx)(tm,{ref:C.type===`context-menu`||C.type===`nested-context-menu`?C.context.internalBackdropRef:null,inert:Nl(!D),cutout:se}),(0,J.jsx)(ro,{id:I,children:(0,J.jsx)(tf,{elementsRef:v.context.itemDomElements,labelsRef:v.context.itemLabels,onMapChange:b,children:ae})})]})}),_m=Y.createContext(null);function vm(e){let t=Y.useContext(_m);if(t===null&&!e)throw Error(et(5));return t}function ym(e){let t=Y.useRef(``),n=Y.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:Y.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 bm(e,t){let{onClick:n,onPointerDown:r}=ym($((n,r)=>{(typeof e==`function`?e():e)||t(r||(pt?`touch`:``))}));return Y.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function xm(e){let[t,n]=Y.useState(null),r=bm(e,n);return Pf(e,t=>{t&&!e&&n(null)}),Y.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}function Sm(e){return e==null?Un:e.type.startsWith(`key`)?rr:e.type.startsWith(`mouse`)||e.type.startsWith(`pointer`)?ir:Un}var Cm={...ps,disabled:e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0),openMethod:e=>e.openMethod,keyboardOpen:e=>e.keyboardOpen,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId,activeIndex:e=>e.activeIndex,listElement:e=>e.listElement,triggerControlsId:(e,t)=>{let n=ps.triggerPopupId(e,t);return n?e.listElement?.id||n:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,t)=>vt&&e.inputFocused&&t?!0:void 0,highlightedItemId:e=>e.highlightedItem?.id||void 0,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType===`trigger-change`&&!ps.open(e)?void 0:e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)}},wm=class extends is{constructor(e,t,n=!1){let r=new Go,i=Em(r,t,n,e);super(i,Tm(r),Cm),this.observe(`parent`,e=>{e.type===`menu`?this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef:e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){let e=this.state.parent;if(e.type!==`menu`)return;let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);return e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);t===i&&n===a&&r===o||(t=i,n=a,r=o,this.notifyAll())})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}setActiveIndex(e,t,n){if(this.state.activeIndex!==e){let r=(e===null?void 0:this.context.itemDomElements.current[e])===this.context.reportedItem;this.context.highlightReason=r?`none`:t,this.context.highlightEvent=r?void 0:n}this.set(`activeIndex`,e)}highlightItem(e,t,n){let r=this.context.itemDomElements.current.indexOf(e);r>-1&&this.setActiveIndex(r,t,n)}};function Tm(e){return{positionerRef:Y.createRef(),popupRef:Y.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:`none`,highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:Y.createRef(),beforeTriggerFocusGuardRef:Y.createRef(),beforeContentFocusGuardRef:Y.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function Em(e,t,n=!1,r){return{...ss(e,t,n),disabled:!1,modal:!0,openMethod:null,keyboardOpen:!1,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,listElement:null,filterTriggerProps:Qe,inputProps:Qe,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Za,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Qe,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}var Dm=Y.createContext(null);function Om(e,t){return(e===`trigger-press`||e===`item-press`)&&t?.detail===0}function km(e,t){return e===`list-navigation`||Om(e,t)}var Am=qe(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,onItemHighlighted:a,defaultOpen:o=!1,disabled:s=!1,modal:c,loopFocus:l=!0,orientation:u=`vertical`,actionsRef:d,closeParentOnEsc:f=!1,handle:p,triggerId:m,defaultTriggerId:h=null,highlightItemOnHover:g=!0,isSubmenu:_=!1,virtualFocus:v=!1,virtualFocusRef:y,allowEscape:b=!0,resetOnPointerLeave:x=!0}=e,S=gp(!0),C=mp(!0),w=vm(!0),T=C?.store,E=C?.virtualFocus??!1,D=Y.useMemo(()=>_&&T?{type:`menu`,store:T}:w?{type:`menubar`,context:w}:S&&!T?{type:`context-menu`,context:S}:{type:void 0},[S,T,w,_]),O=Zc(),k=Zc(),[A,j]=Y.useState(void 0),M=(A??k)||void 0,N=eo(),P=D.type===`menu`?D.store:void 0,F=(n??o)&&P?.state.transitionStatus===`starting`,I=Ve(()=>F?P?.state.instantType:void 0).current,L=Ve(()=>{let e=new wm({open:o,openProp:n,activeTriggerId:h,triggerIdProp:m,parent:D,disabled:s,highlightItemOnHover:g,modal:D.type===void 0?c:void 0,rootId:O,instantType:I},M,N!=null);return e.context.virtualFocusRef=y,e}).current;L.useControlledProp(`openProp`,n),L.useControlledProp(`triggerIdProp`,m),L.useContextCallback(`onOpenChangeComplete`,i);let R=L.useState(`floatingTreeRoot`),z=no(R),B=L.useState(`open`),V=L.useState(`activeTriggerElement`),H=L.useState(`positionerElement`),ee=L.useState(`hoverEnabled`),te=L.useState(`disabled`),U=L.useState(`lastOpenChangeReason`),W=L.useState(`parent`),ne=L.useState(`activeIndex`),G=L.useState(`keyboardOpen`),re=L.useState(`payload`),ie=L.useState(`floatingParentNodeId`),ae=Y.useRef(null),oe=Y.useRef(W.type!==`context-menu`),se=ot(),ce=Y.useRef(!0),le=ot(),ue=ie!=null,{openMethod:de,triggerProps:fe}=xm(B);L.useSyncedValues({disabled:s,highlightItemOnHover:g,modal:W.type===void 0?c:void 0,openMethod:de,rootId:O}),Vo(L);let{forceUnmount:pe,transitionStatus:me}=Ho(B,L,()=>{L.set(`allowMouseEnter`,!1)},F),he=Oo(L.context.popupRef);Y.useEffect(()=>{if(I===void 0)return;let e=()=>{L.state.instantType===I&&L.set(`instantType`,void 0)};if(!B){e();return}if(me!==void 0)return;if(L.context.popupRef.current==null){e();return}let t=new AbortController;return he(e,t.signal),()=>{t.abort()}},[I,B,me,he,L]),X(()=>{S&&!C?L.update({parent:{type:`context-menu`,context:S},floatingNodeId:z,floatingParentNodeId:N}):(C||!L.select(`activeTriggerElement`))&&L.update({floatingNodeId:z,floatingParentNodeId:N})},[S,C,z,N,V,L]),Y.useEffect(()=>{if(B||(ae.current=null),W.type===`context-menu`){if(!B){se.clear(),oe.current=!1;return}se.start(500,()=>{oe.current=!0})}},[se,B,W.type]),X(()=>{!B&&!ee&&L.set(`hoverEnabled`,!0)},[B,ee,L]);let ge=$((e,t)=>{let n=t.reason;if(!e&&!L.select(`open`)||B===e&&t.trigger===V&&U===n)return;let i=Ro(t);if(!e&&t.trigger==null&&(t.trigger=V??void 0),r?.(e,t),t.isCanceled)return;L.state.floatingRootContext.dispatchOpenChange(e,t);let a=t.event;if(e===!1&&n!==`item-press`&&a?.type===`click`&&a.pointerType===`touch`&&!ce.current)return;e&&n===`trigger-focus`?(ce.current=!1,le.start(300,()=>{ce.current=!0})):(ce.current=!0,le.clear());let o=!e&&(n===`escape-key`||n==null);ae.current=t.event;let s=Lo(L.state,e,t.trigger,i());s.openChangeReason=n,s.keyboardOpen=e&&km(n,a),W.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?s.instantType=`group`:Om(n,a)?s.instantType=`click`:o?s.instantType=`dismiss`:s.instantType=void 0,L.update(s)}),_e=Co({popupStore:L,floatingRootContext:L.state.floatingRootContext,floatingId:M,nested:N!=null,onOpenChange:ge}),ve=_e.context.events;X(()=>{let e=({open:e,eventDetails:t})=>ge(e,t);return ve.on(`setOpen`,e),()=>{ve?.off(`setOpen`,e)}},[ve,ge]),X(()=>L.subscribeToParentMenu(),[L]);let ye=Y.useCallback(()=>{L.setOpen(!1,Q(lr))},[L]);Y.useImperativeHandle(d,()=>({unmount:pe,close:ye}),[pe,ye]);let be;W.type===`context-menu`&&(be=W.context),Y.useImperativeHandle(be?.positionerRef,()=>H,[H]),Y.useImperativeHandle(be?.actionsRef,()=>({setOpen:ge}),[ge]);let xe=So(_e,{enabled:!te,bubbles:{escapeKey:f&&W.type===`menu`},outsidePress(){return W.type!==`context-menu`||ae.current?.type===`contextmenu`||oe.current},externalTree:ue?R:void 0}),Se=dl(),Ce=Ms(_e,{enabled:!te,listRef:L.context.itemDomElements,activeIndex:ne,virtual:v,nested:W.type===`menubar`||!v&&W.type!==void 0,parentOrientation:W.type===`menubar`?W.context.orientation:void 0,loopFocus:l,focusItemOnOpen:v?G:void 0,allowEscape:v&&l&&b,orientation:u,triggerOrientation:v?`vertical`:u,rtl:Se===`rtl`,disabledIndices:Ze,onNavigate(e,t){L.setActiveIndex(e,Sm(t),t?.nativeEvent)},openOnArrowKeyDown:W.type!==`context-menu`&&!(v&&_),externalTree:!v&&ue?R:void 0,nestedReturnFocusRef:P?.context.virtualFocusRef,focusItemOnHover:g,resetOnPointerLeave:x}),K=Y.useCallback(e=>{L.context.typingRef.current=e},[L]),we=Ns(_e,{enabled:!te&&!v,listRef:L.context.itemLabels,elementsRef:L.context.itemDomElements,activeIndex:ne,resetMs:500,onMatch:(e,t)=>{B&&e!==ne&&L.setActiveIndex(e,rr,t.nativeEvent)},onTyping:K}),Te=$(a),Ee=Y.useRef(-1),De=$(()=>{let e=L.state.activeIndex,t=e===null?void 0:L.context.itemDomElements.current[e]??void 0;if(t?.isConnected===!1)return;let n=t===void 0?-1:e;if(Ee.current===n&&L.context.reportedItem===t)return;Ee.current=n,L.context.reportedItem=t,v&&L.set(`highlightedItem`,t);let{highlightReason:r,highlightEvent:i}=L.context;L.context.highlightReason=Un,L.context.highlightEvent=void 0,a&&Te(t,Hn(r,i,{label:t===void 0?void 0:L.context.itemLabels.current[n]??void 0}))});X(()=>{De()},[ne,De]);let Oe=Y.useMemo(()=>{if(!v)return Ce.reference;if(!Ce.trigger)return Qe;let{onFocus:e,...t}=Ce.trigger;return t},[v,Ce.reference,Ce.trigger]);L.useSyncedValue(`inputProps`,v?Ce.reference??Qe:Qe);let ke=Y.useMemo(()=>{let e=ba(we.reference,Oe,xe.reference,{onMouseMove(){L.set(`allowMouseEnter`,!0)}},fe);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=B,e},[L,we.reference,Oe,xe.reference,fe,B]),Ae=Y.useMemo(()=>{let e=ba(Ce.trigger,xe.trigger,fe);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[Ce.trigger,xe.trigger,fe]);Ve(()=>(L.update({inactiveTriggerProps:Ae}),null)),Uo(L,{floatingRootContext:_e,activeTriggerProps:ke,inactiveTriggerProps:Ae,popupProps:Y.useMemo(()=>ba(jo,{onMouseMove(){L.set(`allowMouseEnter`,!0),W.type===`menu`&&L.set(`hoverEnabled`,!1)},onClick(){L.select(`hoverEnabled`)&&L.set(`hoverEnabled`,!1)},onKeyDown(e){let t=L.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},we.floating,Ce.floating,xe.floating),[W.type,L,we.floating,Ce.floating,xe.floating]),itemProps:Ce.item??Qe});let je=Y.useMemo(()=>({store:L,parent:D,orientation:u,loopFocus:l,allowEscape:b,defaultFloatingId:k,setRenderedFloatingId:j,virtualFocus:v,parentVirtualFocus:E,syncHighlightedItem:De}),[L,D,u,l,b,k,v,E,De]),Me=typeof t==`function`?t({payload:re}):t,Ne=(0,J.jsxs)(pp.Provider,{value:je,children:[p&&(0,J.jsx)(Po,{handle:p,store:L}),Me]});return(W.type===void 0||W.type===`context-menu`)&&(Ne=(0,J.jsx)(io,{externalTree:R,children:Ne})),Ne});function jm(e){let t=Y.useContext(Dm);if(t===null)return(0,J.jsx)(Am,{...e});let n=t.Root;return(0,J.jsx)(Dm.Provider,{value:null,children:(0,J.jsx)(n,{...t.options,...e})})}var Mm={};function Nm(e){mp();let t=Y.useContext(Dm);if(t!==null){let n=t.SubmenuRoot;return(0,J.jsx)(Dm.Provider,{value:null,children:(0,J.jsx)(n,{...t.options,...e})})}return(0,J.jsx)(Up.Provider,{value:Mm,children:(0,J.jsx)(Am,{...e,isSubmenu:!0})})}var Pm=5;function Fm(e,t){let n=Im(t);return e.clientX>=n.left-Pm&&e.clientX<=n.right+Pm&&e.clientY>=n.top-Pm&&e.clientY<=n.bottom+Pm}function Im(e){let t=e.getBoundingClientRect(),n=At(e);if(xt)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(!(r.content!==`none`||i.content!==`none`))return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function Lm(e){if(Pt(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`);if(!Kt(e))return Lm(Yt(e))}function Rm(e,t){function n(n,r,i){let a=n.currentTarget;He.flushSync(()=>{e.setOpen(!1,Q(er,n.nativeEvent,a))}),Vi(a.isConnected?a:t.current,r,i)?.focus()}function r(t){n(t,-1,e.select(`positionerElement`))}function i(t){let r=e.select(`positionerElement`);r&&Hi(t,r)?e.context.beforeContentFocusGuardRef.current?.focus():n(t,1,r)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function zm(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=Y.useRef(!1);return Y.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,Pr(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:Qe,[t,n,r])}var Bm=Je(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,openOnHover:c,delay:l=100,closeDelay:u=0,handle:d,payload:f,...p}=e,m=mp(!0),h=ms(d)??m?.store;if(!h)throw Error(et(85));let g=Zc(s),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerControlsId`,g),x=Y.useRef(null),S=Hm(),C=hf(!0),w=to(),T=Y.useMemo(()=>w??new Za,[w]),{registerTrigger:E,isMountedByThisTrigger:D}=Bo(g,x,h,{payload:f,closeDelay:u,parent:S,floatingTreeRoot:T,floatingNodeId:no(T),floatingParentNodeId:eo(),keyboardEventRelay:C?.relayKeyboardEvent}),O=S.type===`menubar`,k=h.useState(`disabled`),A=a||k||O&&S.context.disabled,{getButtonProps:j,buttonRef:M}=Wf({disabled:A,native:o});Y.useEffect(()=>{!y&&S.type===void 0&&(h.context.allowMouseUpTriggerRef.current=!1)},[h,y,S.type]);let N=Y.useRef(null),P=ot(),F=$(e=>{if(!N.current)return;P.clear(),h.context.allowMouseUpTriggerRef.current=!1;let t=e.target;Z(N.current,t)||Z(h.select(`positionerElement`),t)||t===N.current||t!=null&&Lm(t)===h.select(`rootId`)||Fm(e,N.current)||T.events.emit(`close`,{domEvent:e,reason:or})});Y.useEffect(()=>{let e=Pr(N.current);if(y&&h.select(`lastOpenChangeReason`)===`trigger-hover`)return e.addEventListener(`mouseup`,F,{once:!0}),()=>{e.removeEventListener(`mouseup`,F)}},[y,F,h]);let I=O&&S.context.hasSubmenuOpen,L=Ts(v,{enabled:(c??I)&&!A&&(!O||I&&!D),handleClose:Vs({blockPointerEvents:!O}),mouseOnly:!0,move:!1,restMs:S.type===void 0?l:void 0,delay:{close:u},triggerElementRef:x,externalTree:T,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),R=Vm(y,h.select(`lastOpenChangeReason`)),z=go(v,{enabled:!A,event:y&&O?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:S.type===void 0&&R}),B=_s(v,{enabled:!A&&I}),V=zm({open:y,enabled:O,mouseDownAction:`open`}),H=Y.useMemo(()=>ba(B.reference,z.reference),[B.reference,z.reference]),ee=h.useState(`triggerProps`,D),te=h.useState(`filterTriggerProps`),{handlePreFocusGuardFocus:U,handleFocusTargetFocus:W}=Rm(h,x),ne={disabled:A,open:y},G=[N,t,M,E,x],re=[H,L??Qe,ee,{"aria-haspopup":`menu`,"aria-controls":b,id:g,onMouseDown:e=>{h.select(`open`)||(P.start(200,()=>{h.context.allowMouseUpTriggerRef.current=!0}),Pr(e.currentTarget).addEventListener(`mouseup`,F,{once:!0}))}},te,O?{role:`menuitem`}:{},V,p,j],ie=Na(`button`,e,{enabled:!O,stateAttributesMapping:Tn,state:ne,ref:G,props:re});return O?(0,J.jsx)(Yf,{tag:`button`,render:n,className:r,style:i,state:ne,refs:G,props:re,stateAttributesMapping:Tn}):y?(0,J.jsxs)(Y.Fragment,{children:[(0,J.jsx)(Rr,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:U},`${g}-pre-focus-guard`),(0,J.jsx)(Y.Fragment,{children:ie},g),(0,J.jsx)(Rr,{ref:h.context.triggerFocusTargetRef,onFocus:W},`${g}-post-focus-guard`)]}):(0,J.jsx)(Y.Fragment,{children:ie},g)});function Vm(e,t){let n=ot(),[r,i]=Y.useState(!1);return X(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function Hm(){let e=vm(!0);return Y.useMemo(()=>e?{type:`menubar`,context:e}:{type:void 0},[e])}var Um=Y.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return Na(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})}),Wm={"aria-expanded":void 0},Gm=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,label:a,id:o,nativeButton:s=!1,openOnHover:c=!0,delay:l=100,closeDelay:u=0,disabled:d=!1,...f}=e,p=mp(!0);if(p?.parent.type!==`menu`)throw Error(et(37));let m=fp(),h=Wp(),{store:g,parentVirtualFocus:_}=p,v=p.parent.store,y=qf({guess:!0,label:a}),b=Zc(o),x=g.useState(`open`),S=Y.useRef(!1),C=g.useState(`positionerElement`),w=g.useState(`floatingRootContext`),T=g.useState(`floatingTreeRoot`),E=g.useState(`triggerPopupId`,b),D=Io(b,g),O=$(e=>{D(e);let t=g.select(`activeTriggerElement`);e!==null&&g.select(`open`)&&(t===e||g.select(`activeTriggerId`)==null)&&g.update({activeTriggerId:b??null,activeTriggerElement:e,closeDelay:u})}),k=Y.useRef(null),A=Y.useCallback(e=>{k.current=e,g.set(`activeTriggerElement`,e)},[g]);X(()=>(O(k.current),()=>O(null)),[O,b,g]),X(()=>{if(!x||!C)return;function e(e){tn(e)===g.context.beforeContentFocusGuardRef.current&&(S.current=e.relatedTarget===k.current)}return C.addEventListener(`focusout`,e,!0),()=>{S.current=!1,C.removeEventListener(`focusout`,e,!0)}},[x,C,g]),g.useSyncedValue(`closeDelay`,u);let j=g.useState(`disabled`),M=v.useState(`disabled`),N=d||j||M,P=v.useState(`itemProps`),F=v.useState(`isActive`,y.index),I=Y.useMemo(()=>({type:`submenu-trigger`,setActive(e){v.select(`highlightItemOnHover`)&&v.setActiveIndex(y.index,ir,e)}}),[v,y.index]),{getItemProps:L,itemRef:R}=Dp({closeOnClick:!1,disabled:N,highlighted:F,id:b,store:g,typingRef:v.context.typingRef,nativeButton:s,itemMetadata:I,nodeId:m?.context.nodeId}),z=Ts(w,{enabled:g.useState(`hoverEnabled`)&&c&&!N,handleClose:Vs({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:l,delay:{open:l,close:u},shouldOpen:l>0?()=>v.select(`allowMouseEnter`):void 0,triggerElementRef:k,externalTree:T,isClosing:()=>g.select(`transitionStatus`)===`ending`,guardStaleOpen:!0}),B=go(w,{enabled:!N,event:`mousedown`,toggle:!0,ignoreMouse:c,stickIfOpen:c}).reference??Qe,V=g.useState(`triggerProps`,!0);delete V.id;let H={disabled:N,highlighted:F,open:x},ee=g.useState(`openMethod`),te=g.useState(`lastOpenChangeReason`)===`list-navigation`||ee===`keyboard`,U=x&&te&&bt;return Na(`div`,e,{state:H,stateAttributesMapping:wn,props:[B,z,V,h?.onTriggerKeyDown?{onKeyDown:h.onTriggerKeyDown}:void 0,P,U?Wm:void 0,{"aria-controls":E,tabIndex:_||!(x||F)?-1:0,onFocus(e){g.select(`open`)&&S.current&&(S.current=!1,g.setOpen(!1,Q(er,e.nativeEvent)))},onBlur(){F&&v.setActiveIndex(null,Un)}},f,L],ref:[t,y.ref,R,O,A]})}),Km=Y.forwardRef(function(e,t){let n=xp(e,t,`submenu-trigger`);if(!n.visible)return null;let r=n.props?ba(n.props,e):e;return(0,J.jsx)(Gm,{...r,ref:n.ref})});function qm(e){return Array.isArray(e)?e.map(e=>qm(e)).join(`,`):e==null?``:String(e)}function Jm(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function Ym(e){return Jm(e?.[0])}function Xm(e){return Ym(e)?e.flatMap(e=>e.items):e}function Zm(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(Ym(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 Qm(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return rp(e)}function $m(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?rp(e.value):rp(e)}function eh(e,t,n){function r(){return Qm(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){let n=Xm(t);if(typeof e!=`object`||!e){let t=n.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=n.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function th(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,J.jsx)(Y.Fragment,{children:eh(r,t,n)},i)),e),[])}var nh=Y.createContext(void 0);function rh(){let e=Y.useContext(nh);if(e===void 0)throw Error(et(53));return e}function ih(e,t,n){if(!e)return 0;let r=getComputedStyle(e),i=`${t}${n===`x`?`Inline`:`Block`}`,a=parseFloat(r[`${i}Start`]);return n===`x`&&t===`margin`?a*2:a+parseFloat(r[`${i}End`])}var ah=`base-ui-disable-scrollbar`,oh={className:ah,getElement(e){return(0,J.jsx)(`style`,{nonce:e,href:ah,precedence:`base-ui:low`,children:`.${ah}{scrollbar-width:none}.${ah}::-webkit-scrollbar{display:none}`})}},sh=`data-has-overflow-x`,ch=`data-has-overflow-y`,lh=`data-overflow-x-start`,uh=`data-overflow-x-end`,dh=`data-overflow-y-start`,fh=`data-overflow-y-end`,ph=e=>t=>t?{[e]:``}:null,mh={hasOverflowX:ph(sh),hasOverflowY:ph(ch),overflowXStart:ph(lh),overflowXEnd:ph(uh),overflowYStart:ph(dh),overflowYEnd:ph(fh),cornerHidden:()=>null},hh=Y.createContext(void 0),gh={disableStyleElements:!1};function _h(){return Y.useContext(hh)??gh}var vh=`--scroll-area-corner-height`,yh=`--scroll-area-corner-width`,bh=`data-orientation`,xh={x:0,y:0},Sh={width:0,height:0},Ch={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},wh={x:!0,y:!0,corner:!0},Th=Y.forwardRef(function(e,t){let{render:n,className:r,overflowEdgeThreshold:i,style:a,...o}=e,{xStart:s,xEnd:c,yStart:l,yEnd:u}=Eh(i),d=Zc(),f=ot(),p=ot(),{nonce:m,disableStyleElements:h}=_h(),[g,_]=Y.useState(!1),[v,y]=Y.useState(!1),[b,x]=Y.useState(!1),[S,C]=Y.useState(!1),[w,T]=Y.useState(!1),[E,D]=Y.useState(Sh),[O,k]=Y.useState(Sh),[A,j]=Y.useState(Ch),[M,N]=Y.useState(wh),P=Y.useRef(null),F=Y.useRef(null),I=Y.useRef(null),L=Y.useRef(null),R=Y.useRef(null),z=Y.useRef(null),B=Y.useRef(null),V=Y.useRef(null),H=Y.useRef(0),ee=Y.useRef(0),te=Y.useRef(0),U=Y.useRef(0),W=Y.useRef(`vertical`),ne=Y.useRef(xh),G=Y.useRef(null);function re(e){let t=e?x:y,n=e?f:p;t(!0),n.start(500,()=>{t(!1)})}let ie=$(e=>{let t=e.x-ne.current.x,n=e.y-ne.current.y;ne.current=e,n!==0&&re(!0),t!==0&&re(!1)}),ae=$(()=>{let e=F.current;e&&G.current===null&&(G.current=e.style.scrollSnapType,e.style.scrollSnapType=`none`)}),oe=$(e=>{if(e.button!==0||V.current!==null&&(W.current===`vertical`?R.current:z.current)?.hasPointerCapture(V.current))return;V.current=e.pointerId,H.current=e.clientY,ee.current=e.clientX,W.current=e.currentTarget.getAttribute(bh);let t=F.current;t&&(te.current=t.scrollTop,U.current=t.scrollLeft,ae()),(W.current===`vertical`?R.current:z.current)?.setPointerCapture(e.pointerId)}),se=$(e=>{if(e.pointerId!==V.current)return;V.current=null,(W.current===`vertical`?x:y)(!1),G.current!==null&&(F.current&&(F.current.style.scrollSnapType=G.current),G.current=null);let t=W.current===`vertical`?R.current:z.current;t?.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId)}),ce=$(e=>{if(e.pointerId!==V.current)return;if(e.buttons%2==0){se(e);return}let t=F.current;if(!t)return;let n=W.current===`vertical`,r=n?R.current:z.current,i=n?I.current:L.current;if(!r||!i)return;let a=n?`y`:`x`,o=ih(i,`padding`,a),s=ih(r,`margin`,a),c=n?r.offsetHeight:r.offsetWidth,l=(n?i.offsetHeight:i.offsetWidth)-c-o-s,u=n?e.clientY-H.current:e.clientX-ee.current,d=l<=0?0:u/l,f=n?t.scrollHeight:t.scrollWidth,p=n?t.clientHeight:t.clientWidth,m=(n?te.current:U.current)+d*(f-p);n?t.scrollTop=m:t.scrollLeft=m,e.preventDefault(),re(n)});function le(e){C(e.pointerType===`touch`)}function ue(e){if(le(e),e.pointerType!==`touch`){let t=Z(P.current,e.target);_(t)}}let de=Y.useMemo(()=>({scrolling:v||b,hasOverflowX:!M.x,hasOverflowY:!M.y,overflowXStart:A.xStart,overflowXEnd:A.xEnd,overflowYStart:A.yStart,overflowYEnd:A.yEnd,cornerHidden:M.corner}),[v,b,M.x,M.y,M.corner,A]),fe={role:`presentation`,onPointerEnter:ue,onPointerMove:ue,onPointerDown:le,onPointerLeave(){_(!1)},style:{position:`relative`,[vh]:`${E.height}px`,[yh]:`${E.width}px`}},pe=Na(`div`,e,{state:de,ref:[t,P],props:[fe,o],stateAttributesMapping:mh}),me=Y.useMemo(()=>({handlePointerDown:oe,handlePointerMove:ce,handlePointerUp:se,handleScroll:ie,disableViewportSnap:ae,cornerSize:E,setCornerSize:D,thumbSize:O,setThumbSize:k,hasMeasuredScrollbar:w,setHasMeasuredScrollbar:T,touchModality:S,cornerRef:B,scrollingX:v,scrollingY:b,hovering:g,setHovering:_,viewportRef:F,scrollbarYRef:I,scrollbarXRef:L,thumbYRef:R,thumbXRef:z,rootId:d,hiddenState:M,setHiddenState:N,overflowEdges:A,setOverflowEdges:j,viewportState:de,overflowEdgeThreshold:{xStart:s,xEnd:c,yStart:l,yEnd:u}}),[oe,ce,se,ie,ae,E,O,w,S,v,b,g,d,M,A,de,s,c,l,u]);return(0,J.jsxs)(nh.Provider,{value:me,children:[!h&&oh.getElement(m),pe]})});function Eh(e){let t=typeof e==`number`?{xStart:e,xEnd:e,yStart:e,yEnd:e}:e;return{xStart:Math.max(0,t?.xStart||0),xEnd:Math.max(0,t?.xEnd||0),yStart:Math.max(0,t?.yStart||0),yEnd:Math.max(0,t?.yEnd||0)}}function Dh(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var Oh=Y.createContext(void 0);function kh(){let e=Y.useContext(Oh);if(e===void 0)throw Error(et(55));return e}function Ah(e,t){return Math.max(0,e-t)}function jh(e,t){if(t<=0)return 0;let n=Dh(e,0,t),r=n,i=t-n,a=r<=1,o=i<=1;return a&&o?r<=i?0:t:a?0:o?t:n}var Mh=`--scroll-area-overflow-x-start`,Nh=`--scroll-area-overflow-x-end`,Ph=`--scroll-area-overflow-y-start`,Fh=`--scroll-area-overflow-y-end`,Ih=`--scroll-area-thumb-height`,Lh=`--scroll-area-thumb-width`,Rh=[Mh,Nh,Ph,Fh],zh=!1;function Bh(){zh||vt||(typeof CSS<`u`&&`registerProperty`in CSS&&Rh.forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),zh=!0)}var Vh=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{viewportRef:o,scrollbarYRef:s,scrollbarXRef:c,thumbYRef:l,thumbXRef:u,cornerRef:d,cornerSize:f,setCornerSize:p,setThumbSize:m,rootId:h,setHiddenState:g,hiddenState:_,setHasMeasuredScrollbar:v,handleScroll:y,touchModality:b,setHovering:x,setOverflowEdges:S,overflowEdgeThreshold:C,viewportState:w}=rh(),T=dl(),E=Y.useRef(!0),D=Y.useRef([NaN,NaN,NaN,NaN]),O=ot(),k=ot(),A=$(()=>{let e=o.current,t=s.current,n=c.current,r=l.current,i=u.current,a=d.current;if(!e)return;let h=e.scrollHeight,_=e.scrollWidth,y=e.clientHeight,b=e.clientWidth,x=e.scrollTop,w=e.scrollLeft,E=D.current,O=Number.isNaN(E[0]);if(E[0]=y,E[1]=h,E[2]=b,E[3]=_,O&&v(!0),h===0||_===0)return;let k=Hh(e),A=k.y,j=k.x,M=b/_,N=y/h,P=Math.max(0,_-b),F=Math.max(0,h-y),I=0,L=0;j||(I=jh(T===`rtl`?-w:w,P),L=P-I);let R=A?0:jh(x,F),z=A?0:F-R,B=j?0:b,V=A?0:y,H=0,ee=0;!j&&!A&&(H=t?.offsetWidth||0,ee=n?.offsetHeight||0);let te=f.width===0&&f.height===0,U=te?H:0,W=te?ee:0,ne=ih(n,`padding`,`x`),G=ih(t,`padding`,`y`),re=ih(i,`margin`,`x`),ie=ih(r,`margin`,`y`),ae=B-ne-re,oe=V-G-ie,se=n?Math.min(n.offsetWidth-U,ae):ae,ce=t?Math.min(t.offsetHeight-W,oe):oe,le=Math.max(16,se*M),ue=Math.max(16,ce*N);if(m(e=>Uh(e,{width:le,height:ue})),t&&r){let e=Wh(r,Ih,x,F,h,ue,t.offsetHeight-ue-G-ie);r.style.transform=`translate3d(0,${e}px,0)`}if(n&&i){let e=n.offsetWidth-le-ne-re,t=Wh(i,Lh,T===`rtl`?-w:w,P,_,le,e);i.style.transform=`translate3d(${T===`rtl`?-t:t}px,0,0)`}let de=[I,L,R,z];Rh.forEach((t,n)=>{e.style.setProperty(t,`${de[n]}px`)}),a&&p(e=>Uh(e,{width:H,height:ee})),g(e=>Uh(e,k));let fe={xStart:!j&&I>C.xStart,xEnd:!j&&L>C.xEnd,yStart:!A&&R>C.yStart,yEnd:!A&&z>C.yEnd};S(e=>Uh(e,fe))});X(()=>{Bh()},[]),X(()=>{queueMicrotask(A)},[A,_,T,C.xStart,C.xEnd,C.yStart,C.yEnd]),X(()=>{o.current?.matches(`:hover`)&&x(!0)},[o,x]),X(()=>{let e=o.current;if(typeof ResizeObserver>`u`||!e)return;let t=!1,n=new ResizeObserver(()=>{if(!t){t=!0;let n=D.current;if(n[0]===e.clientHeight&&n[1]===e.scrollHeight&&n[2]===e.clientWidth&&n[3]===e.scrollWidth)return}A()});return n.observe(e),k.start(0,()=>{let t=To(e,{subtree:!0});t.length!==0&&Promise.allSettled(t.map(e=>e.finished.then(Xe))).then(A).catch(()=>{})}),()=>{n.disconnect(),k.clear()}},[A,o,k]);function j(){E.current=!1}let M={...h&&{"data-id":`${h}-viewport`},tabIndex:_.x&&_.y?-1:0,className:oh.className,style:{overflow:`scroll`},onScroll(){o.current&&(A(),(b||!E.current)&&y({x:o.current.scrollLeft,y:o.current.scrollTop}),O.start(100,()=>{E.current=!0}))},onWheel:j,onPointerMove:j,onPointerEnter:j,onKeyDown:j},N=Na(`div`,e,{ref:[t,o],state:w,props:[M,a],stateAttributesMapping:mh}),P=Y.useMemo(()=>({computeThumbPosition:A}),[A]);return(0,J.jsx)(Oh.Provider,{value:P,children:N})});function Hh(e){let t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function Uh(e,t){for(let n in t)if(e[n]!==t[n])return t;return e}function Wh(e,t,n,r,i,a,o){let s=Dh(n,0,r),c=n-s,l=Math.max(16,a*i/(i+Math.abs(c)));return e.style.setProperty(t,c?`${l}px`:``),(r?s/r*o:0)+(c>0?a-l:0)}var Gh=Y.createContext(void 0);function Kh(){let e=Y.useContext(Gh);if(e===void 0)throw Error(et(54));return e}var qh=Y.forwardRef(function(e,t){let{render:n,className:r,orientation:i=`vertical`,keepMounted:a=!1,style:o,...s}=e,{hovering:c,scrollingX:l,scrollingY:u,hiddenState:d,scrollbarYRef:f,scrollbarXRef:p,viewportRef:m,thumbYRef:h,thumbXRef:g,handlePointerDown:_,handlePointerUp:v,handleScroll:y,disableViewportSnap:b,rootId:x,thumbSize:S,hasMeasuredScrollbar:C,viewportState:w}=rh(),T=i===`vertical`,E={...w,hovering:c,scrolling:T?u:l,orientation:i},D=dl(),O=!C&&!a,k=T?d.y:d.x,A=a||!k;Y.useEffect(()=>{if(!A)return;let e=m.current,t=T?f.current:p.current;if(!t)return;function n(t){if(!e||t.ctrlKey)return;let n=!T,r=n?`scrollLeft`:`scrollTop`,i=n?t.deltaX:t.deltaY;if(i===0)return;let a=n?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight,o=n&&D===`rtl`?-a:0,s=n&&D===`rtl`?0:a,c=e[r];c<=o&&i<0||c>=s&&i>0||(t.preventDefault(),e[r]=Math.min(s,Math.max(o,c+i)),y({x:e.scrollLeft,y:e.scrollTop}))}return hr(t,`wheel`,n,{passive:!1})},[D,y,T,p,f,A,m]);let j={...x&&{"data-id":`${x}-scrollbar`},"aria-hidden":!0,onPointerDown(e){if(e.button!==0)return;let t=tn(e.nativeEvent),n=T?h.current:g.current;if(n&&Z(n,t))return;let r=m.current;if(!r)return;let i=T?f.current:p.current;if(!n||!i)return;let a=T?`y`:`x`,o=ih(n,`margin`,a),s=ih(i,`padding`,a),c=T?n.offsetHeight:n.offsetWidth,l=i.getBoundingClientRect(),u=T?e.clientY-l.top-c/2-s+o/2:e.clientX-l.left-c/2-s+o/2,d=T?r.scrollHeight:r.scrollWidth,v=T?r.clientHeight:r.clientWidth,x=(T?i.offsetHeight:i.offsetWidth)-c-s-o;if(x<=0)return;let S=u/x,C=d-v;b(),T?r.scrollTop=S*C:D===`rtl`?r.scrollLeft=-(1-S)*C:r.scrollLeft=S*C,y({x:r.scrollLeft,y:r.scrollTop}),_(e)},onMouseDown(e){e.preventDefault()},onPointerUp:v,onPointerCancel:v,style:{position:`absolute`,touchAction:`none`,WebkitUserSelect:`none`,userSelect:`none`,visibility:O?`hidden`:void 0,...T?{top:0,bottom:`var(${vh})`,insetInlineEnd:0,[Ih]:`${S.height}px`}:{insetInlineStart:0,insetInlineEnd:`var(${yh})`,bottom:0,[Lh]:`${S.width}px`}}},M=Na(`div`,e,{ref:[t,T?f:p],state:E,props:[j,s],stateAttributesMapping:mh});return A?(0,J.jsx)(Gh.Provider,{value:i,children:M}):null}),Jh=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{computeThumbPosition:o}=kh(),{hasMeasuredScrollbar:s,viewportState:c}=rh(),l=Y.useRef(null),u=Y.useRef(s);return X(()=>{if(typeof ResizeObserver>`u`)return;let e=!1,t=new ResizeObserver(()=>{!e&&(e=!0,!u.current)||o()});return l.current&&t.observe(l.current),()=>{t.disconnect()}},[o]),Na(`div`,e,{ref:[t,l],state:c,stateAttributesMapping:mh,props:[{role:`presentation`,style:{minWidth:`fit-content`}},a]})}),Yh=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{thumbYRef:o,thumbXRef:s,handlePointerDown:c,handlePointerMove:l,handlePointerUp:u,scrollingX:d,scrollingY:f,hasMeasuredScrollbar:p}=rh(),m=Kh(),h=m===`vertical`;return Na(`div`,e,{ref:[t,h?o:s],state:{scrolling:h?f:d,orientation:m},props:[{onPointerDown:c,onPointerMove:l,onPointerUp:u,onPointerCancel:u,style:{visibility:p?void 0:`hidden`,...h?{height:`var(--scroll-area-thumb-height)`}:{width:`var(--scroll-area-thumb-width)`}}},a]})}),Xh=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{cornerRef:o,cornerSize:s,hiddenState:c}=rh(),l=Na(`div`,e,{ref:[t,o],props:[{"aria-hidden":!0,style:{position:`absolute`,bottom:0,insetInlineEnd:0,width:s.width,height:s.height}},a]});return c.corner?null:l});function Zh({className:e,children:t,viewportClassName:n,...r}){return(0,J.jsxs)(Th,{"data-slot":`scroll-area`,className:q(`relative`,e),...r,children:[(0,J.jsx)(Vh,{"data-slot":`scroll-area-viewport`,className:q(`w-full rounded-[inherit] outline-none`,n??`h-full`),children:(0,J.jsx)(Jh,{"data-slot":`scroll-area-content`,style:{minWidth:0},children:t})}),(0,J.jsx)(Qh,{}),(0,J.jsx)(Xh,{})]})}function Qh({className:e,...t}){return(0,J.jsx)(qh,{"data-slot":`scroll-area-scrollbar`,orientation:`vertical`,className:q(`flex h-full w-2.5 touch-none select-none border-l border-l-transparent p-px pointer-coarse:hidden`,e),...t,children:(0,J.jsx)(Yh,{"data-slot":`scroll-area-thumb`,className:`relative flex-1 rounded-full bg-muted-foreground/40 transition-colors hover:bg-muted-foreground/70`})})}var $h=`min-w-[13rem] rounded-md border border-[var(--color-border)] bg-[var(--color-card)] text-[var(--color-card-foreground)] shadow-md outline-none`;function eg({children:e}){return(0,J.jsx)(Zh,{viewportClassName:`max-h-[var(--available-height)]`,children:(0,J.jsx)(`div`,{className:`p-1`,children:e})})}var tg=`relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[highlighted]:bg-[var(--color-accent)] data-[highlighted]:text-[var(--color-accent-foreground)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,ng=jm,rg=Lp,ig=Nm,ag=`data-[popup-open]:bg-[var(--color-accent)] data-[popup-open]:text-[var(--color-accent-foreground)]`;function og({className:e,...t}){return(0,J.jsx)(Bm,{className:typeof e==`function`?e:q(ag,e),...t})}function sg({className:e,sideOffset:t=6,align:n=`start`,children:r,...i}){return(0,J.jsx)(em,{children:(0,J.jsx)(gm,{sideOffset:t,align:n,className:`z-50 outline-none`,children:(0,J.jsx)(Zp,{className:q($h,e),...i,children:(0,J.jsx)(eg,{children:r})})})})}function cg({className:e,...t}){return(0,J.jsx)(Bp,{className:q(tg,e),...t})}function lg({className:e,children:t,closeOnClick:n=!1,...r}){return(0,J.jsxs)(Mp,{className:q(tg,e),closeOnClick:n,...r,children:[(0,J.jsx)(`span`,{className:`mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center`,children:(0,J.jsx)(Np,{children:(0,J.jsx)(_u,{className:`h-3.5 w-3.5`})})}),t]})}function ug({className:e,children:t,...n}){return(0,J.jsxs)(Km,{className:q(tg,`data-[popup-open]:bg-[var(--color-accent)]`,e),...n,children:[t,(0,J.jsx)(yu,{className:`ml-auto h-3.5 w-3.5 shrink-0 opacity-70`})]})}function dg({className:e,children:t,...n}){return(0,J.jsx)(em,{children:(0,J.jsx)(gm,{side:`right`,align:`start`,sideOffset:2,className:`z-50 outline-none`,children:(0,J.jsx)(Zp,{className:q($h,e),...n,children:(0,J.jsx)(eg,{children:t})})})})}function fg({className:e,...t}){return(0,J.jsx)(Um,{className:q(`-mx-1 my-1 h-px bg-[var(--color-border)]`,e),...t})}function pg({className:e,...t}){return(0,J.jsx)(Rp,{className:q(`px-2 py-1.5 text-xs font-semibold text-[var(--color-muted-foreground)]`,e),...t})}function mg(e){return Na(e.defaultTagName??`div`,e,e)}function hg({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`skeleton`,className:q(`animate-pulse rounded-md bg-accent`,e),...t})}function gg({className:e,orientation:t=`horizontal`,...n}){return(0,J.jsx)(Um,{orientation:t,"data-slot":`separator`,className:q(`shrink-0 bg-border`,t===`horizontal`?`h-px w-full`:`h-full w-px`,e),...n})}var _g=Y.createContext(void 0);function vg(e){let t=Y.useContext(_g);if(!e&&t===void 0)throw Error(et(27));return t}var yg=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=vg(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return Na(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:Dn,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),bg=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=vg(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=Wf({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,Q(Yn,e.nativeEvent))}return Na(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),xg=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=vg(),c=Zc(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),Na(`p`,e,{ref:t,props:[{id:c},o]})}),Sg=Y.createContext(void 0);function Cg(){let e=Y.useContext(Sg);if(e===void 0)throw Error(et(26));return e}var wg=`--nested-dialogs`,Tg=`data-nested-dialog-open`,Eg={...En,...pn,nestedDialogOpen(e){return e?{[Tg]:``}:null}},Dg=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=vg(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`);Cg(),ko({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let C=o===void 0?Mo(c.context.popupRef):o,w=g>0,T=c.useStateSetter(`popupElement`),E=Na(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:w},props:[f,{id:S,"aria-labelledby":y,"aria-describedby":l,role:x,...jo,hidden:!m,onKeyDown(e){Gd.has(e.key)&&e.stopPropagation()},style:{[wg]:g}},s],ref:[t,c.context.popupRef,T],stateAttributesMapping:Eg});return(0,J.jsx)(ho,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:C,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:E})}),Og=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=vg(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,J.jsx)(Sg.Provider,{value:n,children:(0,J.jsxs)(Ya,{ref:t,...r,children:[a&&o===!0&&(0,J.jsx)(tm,{ref:i.context.internalBackdropRef,inert:Nl(!s)}),e.children]})}):null});function kg({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`mounted`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=Y.useState(0),[d,f]=Y.useState(0),p=l===0,m=So(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=tn(t);if(p&&!a){if(o){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||Z(n,s)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:p});return pm(r&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(t,n)=>{!e.select(`open`)&&!e.select(`mounted`)||(u(t),f(n))}),X(()=>{!r&&!i&&(u(0),f(0))},[r,i]),X(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(l+1,d+ +!!n),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,l,d,t]),Uo(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var Ag={...ps,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},jg=class extends is{constructor(e,t,n){let r=new Go,i=Mg(e,r,t,n);super(i,Ng(r),Ag)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),!t.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(Lo(this.state,e,t.trigger)))}};function Mg(e,t,n,r=!1){return{...ss(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function Ng(e){return{popupRef:Y.createRef(),backdropRef:Y.createRef(),internalBackdropRef:Y.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function Pg(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=vg(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},b=No((e,t)=>new jg({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y},e,t),!0);b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),C=b.useState(`payload`);Wo(b,x),Vo(b);let{forceUnmount:w}=Ho(x,b);Y.useImperativeHandle(l,()=>({unmount:w,close:()=>b.setOpen(!1,Q(lr))}),[w,b]);let T=x||S||u!=null;return(0,J.jsxs)(_g.Provider,{value:b,children:[u&&(0,J.jsx)(Po,{handle:u,store:b}),T&&(0,J.jsx)(kg,{store:b,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:C}):n]})}var Fg=qe(function(e){return Pg(`dialog`,e)}),Ig=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=vg(),c=Zc(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),Na(`h2`,e,{ref:t,props:[{id:c},o]})}),Lg=Je(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,payload:c,handle:l,...u}=e,d=vg(!0),f=ms(l)??d;if(!f)throw Error(et(79));let p=Zc(s),m=f.useState(`floatingRootContext`),h=f.useState(`isOpenedByTrigger`,p),g=f.useState(`triggerPopupId`,p),_=Y.useRef(null),{registerTrigger:v,isMountedByThisTrigger:y}=Bo(p,_,f,{payload:c}),{getButtonProps:b,buttonRef:x}=Wf({disabled:a,native:o}),S=go(m),C=bm(()=>f.select(`open`),e=>{f.set(`openMethod`,e)}),w={disabled:a,open:h},T=f.useState(`triggerProps`,y);return Na(`button`,e,{state:w,ref:[x,t,v,_],props:[S.reference,T,C,{[Va]:``,id:p,"aria-haspopup":`dialog`,"aria-expanded":h,"aria-controls":g},u,b],stateAttributesMapping:wn})});function Rg(e){return(0,J.jsx)(Fg,{...e})}function zg({className:e,children:t,side:n=`left`,...r}){return(0,J.jsxs)(Og,{children:[(0,J.jsx)(yg,{className:`fixed inset-0 z-50 bg-black/40 backdrop-blur-[1px]`}),(0,J.jsx)(Dg,{className:q(`fixed inset-y-0 z-50 flex h-full w-3/4 max-w-sm flex-col bg-card text-card-foreground shadow-lg outline-none`,n===`left`?`left-0 border-r border-border`:`right-0 border-l border-border`,e),...r,children:t})]})}function Bg({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`sheet-header`,className:q(`flex flex-col gap-1 p-4`,e),...t})}function Vg({className:e,...t}){return(0,J.jsx)(Ig,{className:q(`text-sm font-semibold`,e),...t})}function Hg({className:e,...t}){return(0,J.jsx)(xg,{className:q(`text-sm text-muted-foreground`,e),...t})}var Ug=`(width < 48rem)`,Wg=()=>typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(Ug):void 0,Gg=()=>Wg()?.matches??!1;function Kg(e){let t=Wg();return t?.addEventListener(`change`,e),()=>t?.removeEventListener(`change`,e)}function qg(){return(0,Y.useSyncExternalStore)(Kg,Gg,()=>!1)}var Jg=`16rem`,Yg=`18rem`,Xg=`3rem`,Zg=`b`,Qg=Y.createContext(null);function $g(){let e=Y.useContext(Qg);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function e_(){return Y.useContext(Qg)}function t_({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...o}){let s=qg(),[c,l]=Y.useState(!1),[u,d]=Y.useState(e),f=t??u,p=Y.useCallback(e=>{let t=typeof e==`function`?e(f):e;n?n(t):d(t)},[n,f]),m=Y.useCallback(()=>s?l(e=>!e):p(e=>!e),[s,p,l]);Y.useEffect(()=>{let e=e=>{e.key===Zg&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[m]);let h=f?`expanded`:`collapsed`,g=Y.useMemo(()=>({state:h,open:f,setOpen:p,isMobile:s,openMobile:c,setOpenMobile:l,toggleSidebar:m}),[h,f,p,s,c,l,m]);return(0,J.jsx)(Qg.Provider,{value:g,children:(0,J.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":Jg,"--sidebar-width-icon":Xg,...i},className:q(`group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full`,r),...o,children:a})})}function n_({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a}){let{isMobile:o,state:s,openMobile:c,setOpenMobile:l}=$g();return n===`none`?(0,J.jsx)(`div`,{"data-slot":`sidebar`,className:q(`bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col`,r),...a,children:i}):o?(0,J.jsx)(Rg,{open:c,onOpenChange:l,children:(0,J.jsxs)(zg,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden`,style:{"--sidebar-width":Yg},side:e,children:[(0,J.jsxs)(Bg,{className:`sr-only`,children:[(0,J.jsx)(Vg,{children:`Sidebar`}),(0,J.jsx)(Hg,{children:`Displays the mobile sidebar.`})]}),(0,J.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:i})]})}):(0,J.jsxs)(`div`,{className:`group peer text-sidebar-foreground hidden md:block`,"data-state":s,"data-collapsible":s===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,J.jsx)(`div`,{"data-slot":`sidebar-gap`,className:q(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,J.jsx)(`div`,{"data-slot":`sidebar-container`,className:q(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex`,e===`left`?`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...a,children:(0,J.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm`,children:i})})]})}function r_({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:q(`flex flex-col gap-2 p-2`,e),...t})}function i_({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:q(`flex flex-col gap-2 p-2`,e),...t})}function a_({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:q(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function o_({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:q(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function s_({className:e,render:t=(0,J.jsx)(`div`,{}),...n}){return mg({render:t,props:{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:q(`text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,e),...n}})}function c_({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:q(`w-full text-sm`,e),...t})}function l_({className:e,...t}){return(0,J.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:q(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function u_({className:e,...t}){return(0,J.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:q(`group/menu-item relative`,e),...t})}function d_({label:e,description:t}){return(0,J.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:`leading-tight`,children:e}),t&&(0,J.jsx)(`span`,{className:`text-xs font-normal text-[var(--color-muted-foreground)]`,children:t})]})}function f_({text:e,label:t,className:n}){let[r,i]=(0,Y.useState)(!1),a=(0,Y.useRef)(void 0);(0,Y.useEffect)(()=>()=>clearTimeout(a.current),[]);let o=()=>{navigator.clipboard?.writeText(e).then(()=>{i(!0),clearTimeout(a.current),a.current=setTimeout(()=>i(!1),1500)})},s=r?_u:bu;return(0,J.jsxs)(Il,{children:[(0,J.jsx)(Ll,{render:(0,J.jsx)(`button`,{type:`button`,onClick:o,"aria-label":t,className:q(`inline-flex shrink-0 items-center rounded p-0.5 text-muted-foreground hover:bg-accent hover:text-foreground`,r&&`text-success`,n)}),children:(0,J.jsx)(s,{className:`h-3 w-3`,"aria-hidden":!0})}),(0,J.jsx)(Rl,{children:r?`Copied`:t})]})}var p_=navigator.platform.startsWith(`Mac`)?`⌘B`:`Ctrl+B`;function m_(){let{isMobile:e,setOpen:t}=$g();return e?null:(0,J.jsx)(g_,{label:`Hide the sidebar`,onClick:()=>t(!1)})}function h_(){let e=e_();if(!e)return null;let{isMobile:t,open:n,setOpen:r}=e;return t||n?null:(0,J.jsx)(g_,{label:`Show the sidebar`,onClick:()=>r(!0)})}function g_({label:e,onClick:t}){return(0,J.jsxs)(Il,{children:[(0,J.jsx)(Ll,{render:(0,J.jsx)(ze,{variant:`ghost`,size:`icon-sm`,className:`shrink-0 text-muted-foreground`,"aria-label":e,onClick:t}),children:(0,J.jsx)(wu,{className:`h-4 w-4`,"aria-hidden":!0})}),(0,J.jsxs)(Rl,{children:[e,` `,(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:p_})]})]})}var __=10*6e4,v_={},y_=(e,t)=>`${e}\n${t.toLowerCase()}`;function b_(e,t,n){let r=new Map;for(let{projectId:t,person:n}of e)t!==null&&n&&r.set(t,(r.get(t)??new Set).add(n));let i=[...r].map(([e,t])=>[e,[...t].sort()]).sort(([e],[t])=>e.localeCompare(t)),a=JSON.stringify(i),{value:o}=bd(i.length===0?null:async()=>{let e=await Promise.all(i.map(async([e,n])=>(await t(e,n)).map(t=>[y_(e,t.email),t])));return Object.fromEntries(e.flat())},v_,__,[a],{remember:n,stored:!0});return(0,Y.useCallback)((e,t)=>e!==null&&t?o[y_(e,t)]:void 0,[o])}function x_(e,t){return t?`${e} · ${t.login}`:e}var S_=`overview`,C_=`settings`;function w_(e){return/^[a-z][a-z0-9]*$/.test(e)&&e!==`overview`&&e!==`settings`}function T_(e,t){let n=new Set([S_,C_,...t,...e]),r=new Map,i=new Map;for(let t of e){let e=E_(t),a=e&&!n.has(e)?e:t;n.add(a),r.set(t,a),i.set(a,t)}return{addressOf:e=>r.get(e)??e,projectOf:e=>i.get(e)??(r.has(e)?e:void 0)}}T_([],[]);function E_(e){let t=e.lastIndexOf(`-`);return t>0?e.slice(0,t):``}function D_({className:e,...t}){return(0,J.jsx)(`textarea`,{"data-slot":`textarea`,className:q(`flex min-h-16 w-full min-w-0 rounded-md border border-border bg-background px-3 py-2 text-sm shadow-sm outline-none transition-colors`,`placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-[var(--color-primary)]`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...t})}function O_({open:e,onOpenChange:t,title:n,children:r}){return(0,J.jsx)(Fg,{open:e,onOpenChange:t,children:(0,J.jsxs)(Og,{children:[(0,J.jsx)(yg,{className:`fixed inset-0 z-50 bg-black/40 backdrop-blur-[1px]`}),(0,J.jsxs)(Dg,{className:`fixed left-1/2 top-1/2 z-50 w-[min(34rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 rounded-lg border border-border bg-card p-4 text-card-foreground shadow-lg outline-none`,children:[(0,J.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[(0,J.jsx)(Ig,{className:`text-sm font-semibold`,children:n}),(0,J.jsx)(bg,{"aria-label":`Close`,className:`rounded p-0.5 text-muted-foreground outline-none hover:text-foreground`,children:(0,J.jsx)(Du,{className:`h-4 w-4`,"aria-hidden":!0})})]}),r]})]})})}var k_=`oa.pending-draft`;function A_(){try{return globalThis.sessionStorage}catch{return}}function j_(e){A_()?.setItem(k_,e)}function M_(){let e=A_();if(!e)return null;let t=e.getItem(k_);return t!==null&&e.removeItem(k_),t}var N_={openAgent(){},openPage(){},pageHref:e=>`/${e}`,openSettings(){},async gitHostPeople(){return[]},async startRun(){return{ok:!1,error:`no dashboard to start a run from`}},configureRun(){},async agents(){return[]},async machines(){return{version:`unknown`,machines:[]}},async addMachine(){return{ok:!1,error:`no dashboard to save a machine in`}},async removeMachine(){return{ok:!1,error:`no dashboard to remove a machine from`}},async renameMachine(){return{ok:!1,error:`no dashboard to rename a machine in`}},async renameComputer(){return{ok:!1,error:`no dashboard to rename this computer in`}},async letMachineIn(){return{ok:!1,error:`no dashboard to ask a machine from`}},async machineCode(){return{ok:!1,error:`no dashboard to ask a machine from`}},async computersThrough(){return{ok:!0,computers:[]}},async addComputerThrough(){return{ok:!1,error:`no dashboard to save a machine in`}},async machinePerson(){return{ok:!1,error:`no dashboard to ask a machine from`,unknown:!0}},async removeMachineDevice(){return{ok:!1,error:`no dashboard to ask a machine from`}},async machineAccounts(){return null},async removeMachineAccount(){return{ok:!1,error:`no dashboard to ask a machine from`}},async useLoginsOn(){return{ok:!1,error:`no dashboard to give a server logins from`}},async watchScreen(){},async sendToScreen(){return!1}},P_=(0,Y.createContext)(null);function F_(e){let t=(0,Y.useRef)(e);return t.current=e,(0,Y.useMemo)(()=>{let n={};for(let r of Object.keys(e))n[r]=(...e)=>t.current[r](...e);return n},[])}function I_(e){let t=(0,Y.useContext)(P_)??N_;return(0,Y.useMemo)(()=>({...t,package:e}),[t,e])}function L_({className:e,...t}){return(0,J.jsx)(`div`,{className:q(`rounded-lg border border-border bg-card text-card-foreground`,e),...t})}function R_({className:e,...t}){return(0,J.jsx)(`div`,{className:q(`flex flex-col gap-1 px-4 pt-4`,e),...t})}function z_({className:e,...t}){return(0,J.jsx)(`h3`,{className:q(`text-sm font-semibold`,e),...t})}function B_({className:e,...t}){return(0,J.jsx)(`div`,{className:q(`p-4`,e),...t})}function V_({icon:e,children:t,segment:n,onOpen:r,className:i}){let a=(0,Y.useContext)(P_)??N_;return(0,J.jsx)(z_,{className:q(`text-base`,i),children:(0,J.jsxs)(`a`,{href:a.pageHref(n),onClick:e=>{e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),r())},className:`group -mx-1 inline-flex items-center gap-2 rounded px-1 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)]`,children:[e,t,(0,J.jsx)(gu,{className:`h-3.5 w-3.5 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100 max-md:opacity-100`,"aria-hidden":!0})]})})}function H_(e){let t=Y.useRef(!0);t.current&&(t.current=!1,e())}function U_(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}var W_=(e,t)=>Object.is(e,t);function G_(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function K_(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!U_(e,t,(e,t)=>G_(e,t,n)):e!==t}function q_(e,t,n){return e?e.some(e=>e!==void 0&&G_(t,e,n)):!1}function J_(e,t,n){return e?e.findIndex(e=>e!==void 0&&G_(e,t,n)):-1}function Y_(e,t){if(t!==W_)return n=>q_(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(t!==0||e.some(e=>Object.is(t,e)))}function X_(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(Y_(t,n)):J_(e,t,n);return i===-1?null:i}function Z_(e,t,n,r,i,a){return q_(r,t,i)?a!=null&&e>a&&q_(r,n[a],i)?a:e:e===a?X_(n,r,i,!0):a}function Q_(e,t,n){return e.filter(e=>!G_(t,e,n))}function $_(e){return e==null?void 0:`${e}-label`}function ev(e,t){return e??t}var tv=Y.memo(Y.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a,selected:o,...s}=e,c=Y.useRef(null),{transitionStatus:l,setMounted:u}=wo(o),d=Na(`span`,e,{ref:[t,c],state:{selected:o,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:pn});return ko({batch:!0,enabled:!o,open:o,ref:c,onComplete(){o||u(!1)}}),d})),nv=300,rv=4,iv=40,av=[],ov=8;function sv(e){return av.find(t=>{let n=Math.min(iv,e.length,t.text.length);return n>0&&e.slice(0,n)===t.text.slice(0,n)})}function cv(e,t){av.push({text:e,shown:t,wordsAt:[]}),av.length>ov&&av.shift()}function lv(e,t){let n=sv(e)?.wordsAt;return n===void 0?performance.now():n[t]??=performance.now()}function uv(e){let t=[],n=0,r,i;for(let a of e.split(`
8
- `)){let o=n+a.length+1,s=n+a.length>=e.length;i?/^\s*```/.test(a)&&(t.push({start:i.start,end:Math.min(o,e.length),closed:!0}),i=void 0):/^\s*```/.test(a)?(r&&t.push({...r,closed:!0}),r=void 0,i={start:n}):a.trim().startsWith(`|`)?r={start:r?.start??n,end:Math.min(o,e.length)}:r&&=(t.push({...r,closed:!0}),void 0),s&&!i&&r&&t.push({...r,closed:!1}),n=o}return i&&t.push({start:i.start,end:e.length,closed:!1}),t}function dv(e,t){if(t<=0)return 0;if(t>=e.length)return e.length;let n=e.slice(t).search(/\s/);return n===-1?e.length:t+n}function fv(e,t,n){let r=uv(e),i=n?void 0:r.find(e=>!e.closed),a=i?i.start:e.length;if(t>=a)return{at:a,limit:a};let o=r.find(e=>t>=e.start&&t<e.end);return{at:o&&o.end<=a?o.end:t,limit:a}}var pv=0,mv=new Set;function hv(e){pv+=e;for(let e of mv)e()}function gv(){return(0,Y.useSyncExternalStore)(e=>(mv.add(e),()=>void mv.delete(e)),()=>pv>0)}function _v(){return typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}function vv(e,t,n=!0){let[r,i]=(0,Y.useState)(()=>{if(_v())return e.length;let n=sv(e);return n?Math.min(n.shown,e.length):t?(cv(e,0),0):(cv(e,e.length),e.length)}),a=(0,Y.useRef)(r);(0,Y.useEffect)(()=>{if(_v()||a.current>=e.length){a.current=e.length,i(e.length);return}sv(e)||cv(e,a.current);let t=0,r=performance.now(),o=s=>{let c=e.length-a.current,l=Math.min(e.length,a.current+Math.max(nv,c/rv)*Math.max(0,s-r)/1e3);r=Math.max(r,s);let u=fv(e,Math.floor(l),n);a.current=u.at===Math.floor(l)?l:u.at;let d=Math.min(dv(e,u.at),u.limit),f=sv(e);f&&Object.assign(f,{text:e,shown:d}),i(d),d<e.length&&(t=requestAnimationFrame(o))};return t=requestAnimationFrame(o),()=>cancelAnimationFrame(t)},[e]);let o=r>=e.length;return(0,Y.useLayoutEffect)(()=>{if(!o)return hv(1),()=>hv(-1)},[o]),{shown:e.slice(0,r),done:o}}var yv=`modulepreload`,bv=function(e){return`/`+e},xv={},Sv=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=bv(t,n),t=s(t),t in xv)return;xv[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:yv,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Cv={typescript:()=>Sv(()=>import(`./typescript-Utq2Cl8c.js`),__vite__mapDeps([0,1])),tsx:()=>Sv(()=>import(`./tsx-5f3ulCja.js`),__vite__mapDeps([2,3])),javascript:()=>Sv(()=>import(`./javascript-Yelw-5ZN.js`),__vite__mapDeps([4,5])),jsx:()=>Sv(()=>import(`./jsx-hEbJ82HF.js`),__vite__mapDeps([6,7])),json:()=>Sv(()=>import(`./json-CaljABEy.js`),__vite__mapDeps([8,9])),jsonc:()=>Sv(()=>import(`./jsonc-CYpm1nAK.js`),[]),json5:()=>Sv(()=>import(`./json5-BR5RXkoi.js`),[]),html:()=>Sv(()=>import(`./html-WQKKblVZ.js`),__vite__mapDeps([10,11,5,12])),vue:()=>Sv(()=>import(`./vue-BqdMUtqy.js`),__vite__mapDeps([13,9,5,1,12,11])),svelte:()=>Sv(()=>import(`./svelte-CdeT-Ich.js`),__vite__mapDeps([14,5,1,12,15])),astro:()=>Sv(()=>import(`./astro-BZ97kZFP.js`),__vite__mapDeps([16,9,5,1,12,15,3])),xml:()=>Sv(()=>import(`./xml-CoDIzWF0.js`),__vite__mapDeps([17,18,19])),css:()=>Sv(()=>import(`./css-DUjzNfgv.js`),__vite__mapDeps([20,12])),scss:()=>Sv(()=>import(`./scss-8bKmll0B.js`),__vite__mapDeps([21,12])),sass:()=>Sv(()=>import(`./sass-DXrisJhu.js`),[]),less:()=>Sv(()=>import(`./less-DVTAwKKz.js`),[]),markdown:()=>Sv(()=>import(`./markdown-BYOwaDjH.js`),[]),mdx:()=>Sv(()=>import(`./mdx-DQZ5AkYe.js`),[]),yaml:()=>Sv(()=>import(`./yaml-CxbubiML.js`),__vite__mapDeps([22,23])),toml:()=>Sv(()=>import(`./toml-CcmNWLt0.js`),[]),ini:()=>Sv(()=>import(`./ini-B5eOa1yu.js`),[]),dotenv:()=>Sv(()=>import(`./dotenv-CuH5my32.js`),[]),shellscript:()=>Sv(()=>import(`./shellscript-BiGZg9Om.js`),__vite__mapDeps([24,25])),fish:()=>Sv(()=>import(`./fish-BJitypiv.js`),[]),powershell:()=>Sv(()=>import(`./powershell-QtSnmXcu.js`),[]),python:()=>Sv(()=>import(`./python-gzcpVVnB.js`),[]),ruby:()=>Sv(()=>import(`./ruby-DjBfgIB7.js`),__vite__mapDeps([26,5,12,27,28,29,1,3,7,11,30,18,19,31,25,23])),go:()=>Sv(()=>import(`./go-rLFTqkRN.js`),[]),rust:()=>Sv(()=>import(`./rust-DpiIf5JO.js`),[]),java:()=>Sv(()=>import(`./java-DxlWrXwe.js`),__vite__mapDeps([32,19])),kotlin:()=>Sv(()=>import(`./kotlin-DhhofPvG.js`),[]),swift:()=>Sv(()=>import(`./swift-CyEgAFGc.js`),[]),c:()=>Sv(()=>import(`./c-DWGmR78Y.js`),__vite__mapDeps([33,27])),cpp:()=>Sv(()=>import(`./cpp-CJIxL8VH.js`),__vite__mapDeps([34,28,27])),csharp:()=>Sv(()=>import(`./csharp-dmMxLVLW.js`),[]),php:()=>Sv(()=>import(`./php-D7kNSOJl.js`),__vite__mapDeps([35,9,5,12,11,18,19,31])),lua:()=>Sv(()=>import(`./lua-BJObVtAx.js`),__vite__mapDeps([36,30,27])),sql:()=>Sv(()=>import(`./sql-BOsskAmu.js`),__vite__mapDeps([37,31])),graphql:()=>Sv(()=>import(`./graphql-DAzSVzvB.js`),__vite__mapDeps([38,29,5,1,3,7])),prisma:()=>Sv(()=>import(`./prisma-DMgNhnYS.js`),[]),proto:()=>Sv(()=>import(`./proto-DB4EqR-F.js`),[]),docker:()=>Sv(()=>import(`./docker-IyjqRm3v.js`),[]),make:()=>Sv(()=>import(`./make-Dixweg8N.js`),[]),diff:()=>Sv(()=>import(`./diff-woXpYk--.js`),[])},wv={ts:`typescript`,mts:`typescript`,cts:`typescript`,tsx:`tsx`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jsx:`jsx`,json:`json`,jsonc:`jsonc`,json5:`json5`,html:`html`,htm:`html`,vue:`vue`,svelte:`svelte`,astro:`astro`,xml:`xml`,svg:`xml`,css:`css`,scss:`scss`,sass:`sass`,less:`less`,md:`markdown`,mdx:`mdx`,markdown:`markdown`,yml:`yaml`,yaml:`yaml`,toml:`toml`,ini:`ini`,env:`dotenv`,sh:`shellscript`,bash:`shellscript`,zsh:`shellscript`,fish:`fish`,ps1:`powershell`,py:`python`,rb:`ruby`,go:`go`,rs:`rust`,java:`java`,kt:`kotlin`,swift:`swift`,c:`c`,h:`c`,cpp:`cpp`,hpp:`cpp`,cc:`cpp`,cs:`csharp`,php:`php`,lua:`lua`,sql:`sql`,graphql:`graphql`,gql:`graphql`,prisma:`prisma`,proto:`proto`,dockerfile:`docker`,makefile:`make`,diff:`diff`,patch:`diff`},Tv=2e5;function Ev(e){let t=e.trim().toLowerCase();if(!(t===``||t===`text`||t===`plain`))return t===`shell`||t===`console`||t===`terminal`?`shellscript`:wv[t]??(t in Cv?t:void 0)}function Dv(e){let t=e.slice(e.lastIndexOf(`/`)+1).toLowerCase(),n=t.lastIndexOf(`.`);return wv[n===-1?t:t.slice(n+1)]}var Ov,kv=new Map;function Av(e,t){let n=(e,n)=>t?e:n;return{name:e,type:t?`dark`:`light`,colors:{"editor.foreground":n(`#eaecf0`,`#14181f`)},tokenColors:[{scope:[`comment`,`punctuation.definition.comment`],settings:{foreground:n(`#818898`,`#6e7687`)}},{scope:[`punctuation`,`meta.brace`,`keyword.operator.type.annotation`,`keyword.operator.optional`],settings:{foreground:n(`#d3d7de`,`#2b303b`)}},{scope:[`keyword`,`storage`,`storage.type`,`storage.modifier`,`keyword.control`,`keyword.operator.new`,`keyword.operator.expression`,`variable.language.this`],settings:{foreground:n(`#cc7bf4`,`#8100c2`)}},{scope:[`keyword.operator.assignment`,`keyword.operator.arithmetic`,`keyword.operator.comparison`,`keyword.operator.relational`,`keyword.operator.logical`,`keyword.operator.pipe`,`keyword.operator.bitwise`,`keyword.operator.type`],settings:{foreground:n(`#eaecf0`,`#14181f`)}},{scope:[`string`,`string.quoted`,`string.template`,`punctuation.definition.string`,`constant.other.option`,`string.unquoted.argument`,`markup.inline.raw`],settings:{foreground:n(`#9be963`,`#008000`)}},{scope:[`constant.numeric`,`constant.language`,`constant.character`,`support.constant`],settings:{foreground:n(`#5eeded`,`#008080`)}},{scope:[`entity.name.function`,`support.function`,`meta.function-call entity.name.function`,`entity.name.command`,`support.function.builtin`,`entity.name.tag`],settings:{foreground:n(`#70b8ff`,`#0051c2`)}},{scope:[`meta.object-literal.key`,`support.type.property-name`,`entity.other.attribute-name`,`variable.other.property.yaml`,`entity.name.tag.yaml`],settings:{foreground:n(`#f47b85`,`#b80a18`)}},{scope:[`variable.parameter`],settings:{foreground:n(`#f7ab5f`,`#b84f05`)}},{scope:[`entity.name.type`,`entity.name.class`,`support.type`,`support.class`,`support.type.primitive`],settings:{foreground:n(`#fbad60`,`#b34a00`)}}]}}var jv={editor:{light:`everforest-light`,dark:`everforest-dark`},chat:{light:`chat-light`,dark:`chat-dark`}};function Mv(){return Ov??=Promise.all([Sv(()=>import(`./core-Db3h5Pv3.js`),__vite__mapDeps([39,40])),Sv(()=>import(`./engine-javascript-DbNy5Fxf.js`),[])]).then(([{createHighlighterCore:e},{createJavaScriptRegexEngine:t}])=>e({themes:[Sv(()=>import(`./everforest-light-Df2xbC6M.js`),[]),Sv(()=>import(`./everforest-dark-sB-x3p7T.js`),[]),Av(`chat-light`,!1),Av(`chat-dark`,!0)],langs:[],engine:t()})),Ov}async function Nv(e){let t=await Mv();return kv.has(e)||kv.set(e,Cv[e]().then(e=>t.loadLanguage(...e.default))),await kv.get(e),t}function Pv(e,t){return Fv(e,Dv(t))}function Fv(e,t,n=`editor`){let[r,i]=(0,Y.useState)(null);return(0,Y.useEffect)(()=>{if(!t||e.length>Tv)return;let r=!0;return Nv(t).then(a=>{if(!r)return;let o=a.codeToTokensWithThemes(e,{lang:t,themes:jv[n]});i({text:e,language:t,lines:o.map(e=>e.map(e=>({text:e.content,light:e.variants.light?.color,dark:e.variants.dark?.color})))})}).catch(()=>{}),()=>{r=!1}},[e,t,n]),r&&r.text===e&&r.language===t?r.lines:null}function Iv({pieces:e}){return e.map((e,t)=>(0,J.jsx)(`span`,{style:{"--light":e.light,"--dark":e.dark},className:`text-(color:--light) dark:text-(color:--dark)`,children:e.text},t))}function Lv({text:e,compact:t=!1,fade:n=!1}){let r=(0,Y.useRef)(performance.now()).current,i=ey(e.replace(/\r\n/g,`
9
- `).split(`
10
- `),t);return(0,J.jsx)(`div`,{className:t?`space-y-1.5 text-xs leading-relaxed`:`space-y-2.5 text-sm leading-5`,children:n?zv(i,{at:0},r,e):i})}var Rv=500;function zv(e,t,n,r){return Y.Children.map(e,e=>{if(typeof e==`string`)return e.split(/(\s+)/).map((e,i)=>{if(e.trim()===``)return e;let a=n-lv(r,t.at++);return a>=Rv?(0,J.jsx)(`span`,{children:e},i):(0,J.jsx)(`span`,{className:`word-in`,style:a>0?{animationDelay:`${-a}ms`}:void 0,children:e},i)});if(!(0,Y.isValidElement)(e)||e.type===`pre`||e.type===`code`)return e;let i=e;return i.props.children===void 0?i:(0,Y.cloneElement)(i,void 0,zv(i.props.children,t,n,r))})}function Bv(e){if(e.startsWith(`+`)&&!e.startsWith(`+++`))return`text-success`;if(e.startsWith(`-`)&&!e.startsWith(`---`))return`text-danger`;if(e.startsWith(`@@`))return`text-muted-foreground`}function Vv(e,t,n){return(0,J.jsx)(Hv,{lines:e,language:t},n)}function Hv({lines:e,language:t}){let n=e.join(`
11
- `),r=Fv(n,t===`diff`?void 0:Ev(t),`chat`);return(0,J.jsxs)(`div`,{className:`relative w-fit max-w-full min-w-40 rounded-lg border border-border bg-muted/50`,children:[(0,J.jsx)(f_,{text:n,label:`Copy the code`,className:`absolute top-2.5 right-2.5`}),(0,J.jsx)(`pre`,{className:`px-4 py-3 pr-12 text-xs leading-[18px] break-words whitespace-pre-wrap`,children:(0,J.jsx)(`code`,{children:t===`diff`?e.map((t,n)=>(0,J.jsx)(`span`,{className:Bv(t),children:n<e.length-1?`${t}\n`:t},n)):r?r.map((e,t)=>(0,J.jsxs)(Y.Fragment,{children:[(0,J.jsx)(Iv,{pieces:e}),t<r.length-1?`
12
- `:null]},t)):n})})]})}function Uv(e){let t=e.trim().split(`|`);return t[0]?.trim()===``&&t.shift(),t[t.length-1]?.trim()===``&&t.pop(),t.map(e=>e.trim())}function Wv(e){return Uv(e).length>0&&Uv(e).every(e=>/^:?-+:?$/.test(e))}function Gv(e){return e.replace(/^[ \t]*/,e=>e.replace(/\t/g,` `))}function Kv(e){return/^ */.exec(Gv(e))[0].length}function qv(e,t){let n=0;for(let r=0;n<e.length;n++){let i=e[n]===` `?1:e[n]===` `?4:0;if(i===0||r+i>t)break;r+=i}return e.slice(n)}function Jv(e){let t=/^[ \t]*[-*]\s+(.*)$/.exec(e);if(t)return{indent:Kv(e),ordered:!1,start:1,text:t[1]};let n=/^[ \t]*(\d{1,3})[.)]\s+(.*)$/.exec(e);return n?{indent:Kv(e),ordered:!0,start:Number(n[1]),text:n[2]}:null}function Yv(e){return/^\s*(?:([-*_])\1{2,}|([-*_])(?: \2){2,})\s*$/.test(e)}function Xv(e){return/^\s*```/.test(e)}var Zv=12;function Qv(e,t){let n=Jv(e[t]).indent,r=t+1,i=!1;for(let a=t+1;a<e.length;a++){let t=e[a];if(i){Xv(t)&&(i=!1),r=a+1;continue}if(!t.trim())continue;let o=Kv(t)>=n+2,s=Jv(t)!==null&&!Yv(t);if(!o&&!s)break;o&&Xv(t)&&(i=!0),r=a+1}return r}function $v(e,t,n,r){let i=[],a=Jv(e[0]),o=a.ordered,s=a.start,c=[],l=null,u=[],d=1/0,f=!1,p=[],m=()=>{f&&(f=!1,p.at(-1)[1]=u.length-1)},h=()=>{if(l===null)return;m();let e=/^\[([ xX])\]\s+(.*)$/.exec(l),r=u.map(()=>d);for(let[e,t]of p){let n=t=>t>e&&!Xv(u[t]),i=d;for(let r=e;r<=t;r++)n(r)&&u[r].trim()&&(i=Math.min(i,Kv(u[r])));for(let a=e;a<=t;a++)n(a)&&(r[a]=i)}let i=u.length>0?ey(u.map((e,t)=>qv(e,r[t])),t,n+1):null;c.push(e?(0,J.jsxs)(`li`,{className:`list-none -ml-4 flex items-start gap-2`,children:[(0,J.jsx)(`input`,{type:`checkbox`,checked:e[1].toLowerCase()===`x`,readOnly:!0,className:`mt-1`}),i?(0,J.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,J.jsx)(`span`,{children:sy(e[2])}),i]}):(0,J.jsx)(`span`,{children:sy(e[2])})]},c.length):(0,J.jsxs)(`li`,{className:i?`space-y-1`:void 0,children:[sy(l),i]},c.length)),l=null,u=[],d=1/0,p=[]},g=q(t?`ml-6 space-y-1 [&>li]:pl-1`:`ml-7 space-y-[3px] [&>li]:pl-[7px]`,!t&&n===0&&`[&:not(:last-child)]:mb-[21px]`),_=()=>{h(),c.length!==0&&(i.push(o?(0,J.jsx)(`ol`,{start:s,className:q(`list-decimal`,g),children:c},`${r}-${i.length}`):(0,J.jsx)(`ul`,{className:q(`list-disc`,g),children:c},`${r}-${i.length}`)),c=[])};for(let t of e){if(f){u.push(t),Xv(t)&&m();continue}let e=Jv(t);e&&e.indent<a.indent+2?(e.ordered!==o&&(_(),o=e.ordered,s=e.start),h(),l=e.text):t.trim()?(u.push(t),d=Math.min(d,Kv(t)),Xv(t)&&(f=!0,p.push([u.length-1,u.length-1]))):u.length>0&&u.push(t)}return _(),i}function ey(e,t=!1,n=0){let r=[],i=null,a=[],o=0,s=()=>{if(a.length===0)return;let e=a;if(a=[],e.length>=2&&Wv(e[1])){let n=Uv(e[0]),i=e.slice(2).map(Uv);r.push((0,J.jsx)(`div`,{className:`overflow-x-auto`,children:(0,J.jsxs)(`table`,{className:q(`w-full border-collapse [&_tbody_tr:last-child_td]:border-b-0`,t?`text-xs`:`text-sm`),children:[(0,J.jsx)(`thead`,{children:(0,J.jsx)(`tr`,{children:n.map((e,n)=>(0,J.jsx)(`th`,{className:q(`border-b border-border text-left font-medium`,t?`py-1 pr-3`:`py-2.5 pr-6`),children:sy(e)},n))})}),(0,J.jsx)(`tbody`,{children:i.map((e,r)=>(0,J.jsx)(`tr`,{children:n.map((n,r)=>(0,J.jsx)(`td`,{className:q(`border-b border-border/60 align-top`,t?`py-1 pr-3`:`py-2.5 pr-6`),children:sy(e[r]??``)},r))},r))})]})},o++))}else for(let t of e)r.push((0,J.jsx)(`p`,{children:sy(t)},o++))};for(let c=0;c<e.length;c++){let l=e[c],u=/^\s*```\s*([\w+-]*)/.exec(l);if(u){i===null?(s(),i={lines:[],language:u[1].toLowerCase()}):(r.push(Vv(i.lines,i.language,o++)),i=null);continue}if(i!==null){i.lines.push(l);continue}if(/^\s*\|.*\|\s*$/.test(l)){a.push(l);continue}s();let d=/^(#{1,6})\s+(.*)$/.exec(l);if(d){let e=d[1].length,n=t?[`text-sm`,`text-sm`,`text-xs`,`text-xs`,`text-xs`,`text-xs`]:[`text-lg`,`text-base`,`text-sm`,`text-sm`,`text-sm`,`text-sm`];r.push((0,J.jsx)(`p`,{className:`font-semibold ${n[e-1]}`,children:sy(d[2])},o++));continue}if(Yv(l)){r.push((0,J.jsx)(`hr`,{className:`border-border`},o++));continue}if(n<Zv&&/^\s*>/.test(l)){let i=c;for(;i<e.length&&/^\s*>/.test(e[i]);)i++;let a=e.slice(c,i).map(e=>e.replace(/^\s*>\s?/,``));r.push((0,J.jsx)(`blockquote`,{className:`space-y-1.5 border-l-2 border-border pl-3 text-muted-foreground`,children:ey(a,t,n+1)},o++)),c=i-1;continue}if(n<Zv&&Jv(l)){let i=Qv(e,c);for(let a of $v(e.slice(c,i),t,n,o++))r.push(a);c=i-1;continue}l.trim()&&r.push((0,J.jsx)(`p`,{children:sy(l)},o++))}return s(),i!==null&&r.push(Vv(i.lines,i.language,o++)),r}var ty=`text-primary underline underline-offset-2 break-all`,ny=`rounded-[5px] border-[0.5px] border-foreground/10 bg-foreground/5 px-[3px] py-px text-[0.9em] text-(--code-foreground)`,ry=`whitespace-nowrap rounded bg-primary/10 px-1.5 text-primary hover:bg-primary/15`,iy=(0,Y.createContext)(void 0);function ay({number:e}){let t=(0,Y.useContext)(iy);return t?(0,J.jsxs)(`a`,{href:`${t}/issues/${e}`,target:`_blank`,rel:`noreferrer`,className:ry,children:[`#`,e]}):`#${e}`}function oy(e,t,n){return(0,J.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,className:ty,children:t},n)}function sy(e){let t=[],n=/(`[^`]+`|\[[^\]]+\]\((?:https?:\/\/)?[^\s):]+\)|\*\*[^*]+\*\*|\*[^*]+\*|https?:\/\/[^\s<>)\]]+|(?<![\w/&#])#\d+\b)/g,r=0,i,a=0;for(;i=n.exec(e);){i.index>r&&t.push((0,J.jsx)(Y.Fragment,{children:e.slice(r,i.index)},a++));let n=i[0];if(n.startsWith("`"))t.push((0,J.jsx)(`code`,{className:ny,children:n.slice(1,-1)},a++));else if(n.startsWith(`[`)){let e=/^\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)$/.exec(n),r=/^\[([^\]]+)\]\(([^\s):]+)\)$/.exec(n);e?t.push(oy(e[2],e[1],a++)):r?t.push((0,J.jsx)(`code`,{title:r[2],className:ny,children:r[1]},a++)):t.push((0,J.jsx)(Y.Fragment,{children:n},a++))}else n.startsWith(`**`)?t.push((0,J.jsx)(`strong`,{children:sy(n.slice(2,-2))},a++)):n.startsWith(`*`)?t.push((0,J.jsx)(`em`,{children:sy(n.slice(1,-1))},a++)):n.startsWith(`#`)?t.push((0,J.jsx)(ay,{number:n.slice(1)},a++)):t.push(oy(n,n,a++));r=i.index+n.length}return r<e.length&&t.push((0,J.jsx)(Y.Fragment,{children:e.slice(r)},a++)),t}function cy(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(e===`BUTTON`||e===`INPUT`){let e=t;if(e.type===`submit`)return e}}return null}var ly=`data-checked`,uy=`data-unchecked`;function dy(e){return{checked(t){return e.indeterminate?{}:t?{[ly]:``}:{[uy]:``}},...Sf}}var fy=Y.createContext(void 0);function py(){return Y.useContext(fy)}var my=Y.createContext(void 0);function hy(){let e=Y.useContext(my);if(e===void 0)throw Error(et(14));return e}var gy=`data-parent`,_y=Y.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i=!1,"aria-labelledby":a,disabled:o=!1,form:s,id:c,indeterminate:l=!1,inputRef:u,name:d,onCheckedChange:f,parent:p=!1,readOnly:m=!1,render:h,required:g=!1,uncheckedValue:_,value:v,nativeButton:y=!1,style:b,...x}=e,{clearErrors:S}=Af(),{disabled:C,name:w,setDirty:T,setFilled:E,setTouched:D,state:O,validationMode:k,validityData:A,validation:j}=Tf(),M=Qf(),{labelId:N,registerControlId:P,getDescriptionProps:F}=Of(),I=py(),L=I?.allValues===void 0?void 0:I.parent,R=L!==void 0,z=C||M.disabled||I?.disabled||o,B=w??d,V=v??B,H=Zc(),ee=I?.registerControlId!==P,te=np({id:c||void 0,enabled:ee}),U=y?te:H,W={};R&&(p?W=L.getParentProps():V!==void 0&&(W=L.getChildProps(V)));let{checked:ne=n,indeterminate:G=l,onCheckedChange:re,...ie}=W,ae=I?.value,oe=Y.useRef(null),se=Xf(z,oe),{getButtonProps:ce,buttonRef:le}=Wf({disabled:z,native:y}),ue=I?.validation??j,[de,fe]=Ld({controlled:V!==void 0&&ae!==void 0&&!p?ae.includes(V):ne,default:i,name:`Checkbox`,state:`checked`}),pe=R?!!ne:de,me=R&&G||l;Ef(oe,H,de,void 0,!I&&!z,d);let he=L?.registerChildId,ge=Y.useRef(null),_e=ue.registerInput,ve=I?V:void 0,ye=Y.useCallback(e=>_e(e,{controlRef:oe,value:ve}),[_e,ve]),be=_r(u,ge,p?void 0:ye),xe=$f(a,N,ge,!y,te,x[`aria-label`]);X(()=>{ge.current&&(ge.current.indeterminate=me),I||E(de)},[de,me,I,E]),Pf(de,()=>{I||(S(B),T(de!==A.initialValue),ue.change(de))});let Se=ba({checked:de,disabled:z,form:s,name:p?void 0:B,id:y?void 0:te,required:g,ref:be,style:B?Lr:Ir,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(m){e.preventDefault();return}let t=e.currentTarget.checked,n=Q(Un,e.nativeEvent);if(f?.(t,n),!n.isCanceled&&(re?.(t,n),!n.isCanceled&&(fe(t),V!==void 0&&I!==void 0&&!p&&!R))){let e=t?[...I.value,V]:I.value.filter(e=>e!==V);I.setValue(e,n)}},onClick(e){e.stopPropagation()},onFocus(){oe.current?.focus()}},v===void 0?Qe:{value:(I?de&&v:v)||``},F,e=>ue.getValidationProps(z,e));Y.useEffect(()=>{if(!L||V===void 0)return;let e=L.disabledStatesRef.current;return e.set(V,z),()=>{e.delete(V)}},[L,z,V]);let Ce=Y.useMemo(()=>({...O,checked:pe,disabled:z,readOnly:m,required:g,indeterminate:me}),[O,pe,z,m,g,me]),K=dy(Ce),we=Na(`span`,e,{state:Ce,ref:[le,oe,t],props:[{id:U,role:`checkbox`,"aria-checked":me?`mixed`:pe,"aria-readonly":m||void 0,"aria-required":g||void 0,"aria-labelledby":xe,[gy]:p?``:void 0,onFocus(){se(!0)},onBlur(){let e=ge.current;e&&(D(!0),se(!1),k===`onBlur`&&ue.commit(I?ae:e.checked))},onKeyDown(e){if(e.key!==`Enter`||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=ge.current?.form??null,n=e.currentTarget,r=e.nativeEvent,i=e.preventDefault,a=r.preventDefault,o=!1;e.preventDefault=()=>{o=!0,i.call(e)},r.preventDefault=()=>{o=!0,a.call(r)},a.call(r),At(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||cy(t)?.click()})},onClick(e){if(m||z)return;e.preventDefault();let t=ge.current;t&&Hf(t,e)}},x,ie,ce,F,e=>ue.getValidationProps(z,e)],stateAttributesMapping:K}),Te=we.props.id;return X(()=>{if(!(!he||p||V===void 0||Te===void 0))return he(V,Te)},[he,p,V,Te]),(0,J.jsxs)(my.Provider,{value:Ce,children:[we,!de&&!I&&B&&!p&&_!==void 0&&(0,J.jsx)(`input`,{type:`hidden`,form:s,name:B,value:_,disabled:z}),(0,J.jsx)(`input`,{...Se,suppressHydrationWarning:!0})]})}),vy=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=hy(),c=s.checked||s.indeterminate,{mounted:l,transitionStatus:u,setMounted:d}=wo(c),f=Y.useRef(null),p={...s,transitionStatus:u};ko({batch:!0,enabled:!c,open:c,ref:f,onComplete(){c||d(!1)}});let m={...dy(s),...pn},h=a||l,g=Na(`span`,e,{ref:[t,f],state:p,stateAttributesMapping:m,props:o});return h?g:null});function yy({className:e,disabled:t=!1,...n}){return(0,J.jsx)(_y,{disabled:t,className:q(`inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-[4px] border border-border bg-transparent`,`transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)]`,`data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:text-primary-foreground`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:(0,J.jsx)(vy,{className:`flex items-center justify-center text-current`,children:(0,J.jsx)(_u,{className:`h-3 w-3`,strokeWidth:3,"aria-hidden":!0})})})}function by(e){return Pg(`alert-dialog`,e)}var xy=Lg;function Sy({trigger:e,open:t,onOpenChange:n,title:r,body:i,confirmLabel:a,confirmBusyLabel:o=`Working…`,onConfirm:s,onSuccess:c,fallbackError:l=`Something went wrong.`,destructive:u=!0}){let[d,f]=(0,Y.useState)(!1),p=t??d,m=n??f,{busy:h,error:g,run:_,reset:v}=Pd();return(0,J.jsxs)(by,{open:p,onOpenChange:e=>{h||(m(e),e&&v())},children:[e&&(0,J.jsx)(xy,{render:e}),(0,J.jsxs)(Og,{children:[(0,J.jsx)(yg,{className:`fixed inset-0 z-50 bg-black/40 backdrop-blur-[1px]`}),(0,J.jsxs)(Dg,{className:`fixed left-1/2 top-1/2 z-50 w-[min(26rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 rounded-lg border border-border bg-card p-5 text-card-foreground shadow-lg`,children:[(0,J.jsx)(Ig,{className:`text-sm font-semibold`,children:r}),(0,J.jsx)(xg,{className:`mt-2 text-xs leading-relaxed text-muted-foreground`,children:i}),g&&(0,J.jsx)(`p`,{className:`mt-2 text-xs text-danger`,children:g}),(0,J.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[(0,J.jsx)(bg,{render:(0,J.jsx)(ze,{variant:`outline`,size:`sm`,disabled:h,children:`Cancel`})}),(0,J.jsx)(ze,{variant:u?`destructive`:`default`,size:`sm`,disabled:h,onClick:()=>{_(s,l).then(e=>{e.ok&&(m(!1),queueMicrotask(()=>c?.()))})},className:q(h&&`cursor-progress`),children:h?o:a})]})]})]})]})}var Cy=O(`onModules`),wy=O(`runModuleCommand`),Ty=O(`runComputerCommand`),Ey=O(`runComputerCommandOn`),Dy=O(`readModule`);function Oy({label:e,share:t}){let n=2*Math.PI*12,r=t===void 0?{ring:``,text:`text-muted-foreground`}:t>=95?{ring:`stroke-danger`,text:`text-danger`}:t>=80?{ring:`stroke-warning`,text:`text-warning`}:{ring:`stroke-success`,text:`text-foreground`};return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`span`,{className:`relative size-8`,children:[(0,J.jsxs)(`svg`,{viewBox:`0 0 32 32`,className:`size-8`,"aria-hidden":!0,children:[(0,J.jsx)(`circle`,{cx:`16`,cy:`16`,r:12,fill:`none`,strokeWidth:`3`,className:`stroke-muted-foreground/15`}),t!==void 0&&(0,J.jsx)(`circle`,{cx:`16`,cy:`16`,r:12,fill:`none`,strokeWidth:`3`,strokeLinecap:`round`,strokeDasharray:`${n*Math.min(t,100)/100} ${n}`,transform:`rotate(-90 16 16)`,className:q(`transition-[stroke-dasharray] duration-500`,r.ring)})]}),(0,J.jsx)(`span`,{className:q(`absolute inset-0 flex items-center justify-center text-[9px] font-medium tabular-nums`,r.text),children:t??`–`})]}),(0,J.jsx)(`span`,{className:`text-[9px] leading-tight text-muted-foreground`,children:e})]})}function ky({className:e,...t}){return(0,J.jsx)(`span`,{className:q(`inline-flex items-center rounded-full border border-[var(--color-border)] px-2 py-0.5 text-xs font-medium`,e),...t})}var Ay=Y.createContext(void 0);function jy(){let e=Y.useContext(Ay);if(e===void 0)throw Error(et(63));return e}var My=`data-checked`,Ny=`data-unchecked`,Py={...Sf,checked(e){return e?{[My]:``}:{[Ny]:``}}},Fy=Y.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i,"aria-labelledby":a,form:o,id:s,inputRef:c,name:l,nativeButton:u=!1,onCheckedChange:d,readOnly:f=!1,required:p=!1,disabled:m=!1,render:h,uncheckedValue:g,value:_,style:v,...y}=e,{clearErrors:b}=Af(),{state:x,setTouched:S,setDirty:C,validityData:w,setFilled:T,validationMode:E,disabled:D,name:O,validation:k}=Tf(),{labelId:A}=Of(),j=D||m,M=O??l,N=Y.useRef(null),P=_r(N,c,k.inputRef),F=Y.useRef(null),I=Xf(j,F),L=Zc(),R=np({id:s}),z=u?void 0:R,[B,V]=Ld({controlled:n,default:!!i,name:`Switch`,state:`checked`});Ef(F,L,B,void 0,!j,l),X(()=>{T(B)},[B,T]),Pf(B,()=>{b(M),C(B!==w.initialValue),k.change(B)});let{getButtonProps:H,buttonRef:ee}=Wf({disabled:j,native:u}),te=$f(a,A,N,!u,z,y[`aria-label`]),U={id:u?R:L,role:`switch`,"aria-checked":B,"aria-readonly":f||void 0,"aria-required":p||void 0,"aria-labelledby":te,onFocus(){I(!0)},onBlur(){let e=N.current;!e||j||(S(!0),I(!1),E===`onBlur`&&k.commit(e.checked))},onClick(e){if(f||j)return;e.preventDefault();let t=N.current;t&&Hf(t,e)}},W={...k.getValidationProps(j),checked:B,disabled:j,form:o,id:z,name:M,required:p,style:M?Lr:Ir,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,ref:P,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(f){e.preventDefault();return}let t=e.currentTarget.checked,n=Q(Un,e.nativeEvent);d?.(t,n),!n.isCanceled&&V(t)},onClick(e){e.stopPropagation()},onFocus(){F.current?.focus()},..._===void 0?Qe:{value:_}},ne=Y.useMemo(()=>({...x,checked:B,disabled:j,readOnly:f,required:p}),[x,B,j,f,p]),G=Na(`span`,e,{state:ne,ref:[t,F,ee],props:[U,y,H,e=>k.getValidationProps(j,e)],stateAttributesMapping:Py});return(0,J.jsxs)(Ay.Provider,{value:ne,children:[G,!B&&M&&g!==void 0&&(0,J.jsx)(`input`,{type:`hidden`,form:o,name:M,value:g,disabled:j}),(0,J.jsx)(`input`,{...W,suppressHydrationWarning:!0})]})}),Iy=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return Na(`span`,e,{state:jy(),ref:t,stateAttributesMapping:Py,props:a})});function Ly({className:e,disabled:t=!1,...n}){return(0,J.jsx)(Fy,{disabled:t,className:q(`inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-border bg-muted p-0.5`,`transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)]`,`data-[checked]:border-primary data-[checked]:bg-primary`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:(0,J.jsx)(Iy,{className:`block h-3.5 w-3.5 rounded-full bg-foreground/70 transition-transform data-[checked]:translate-x-4 data-[checked]:bg-primary-foreground`})})}function Ry({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:(0,J.jsx)(`table`,{"data-slot":`table`,className:q(`w-full caption-bottom text-left text-sm`,e),...t})})}function zy({className:e,...t}){return(0,J.jsx)(`thead`,{"data-slot":`table-header`,className:q(`text-xs text-muted-foreground [&_tr]:border-b [&_tr]:border-border [&_tr:hover]:bg-transparent`,e),...t})}function By({className:e,...t}){return(0,J.jsx)(`tbody`,{"data-slot":`table-body`,className:q(`[&_tr:last-child]:border-0`,e),...t})}function Vy({className:e,...t}){return(0,J.jsx)(`tr`,{"data-slot":`table-row`,className:q(`border-b border-border transition-colors hover:bg-accent/60`,e),...t})}function Hy({className:e,...t}){return(0,J.jsx)(`th`,{"data-slot":`table-head`,className:q(`h-9 whitespace-nowrap px-3 text-left align-middle font-normal first:pl-0 last:pr-0`,e),...t})}function Uy({className:e,...t}){return(0,J.jsx)(`td`,{"data-slot":`table-cell`,className:q(`px-3 py-2 align-middle first:pl-0 last:pr-0`,e),...t})}function Wy({className:e,...t}){return(0,J.jsx)(`label`,{"data-slot":`label`,className:q(`flex flex-wrap items-center gap-x-2 gap-y-0.5 text-sm leading-snug has-[[data-disabled]]:opacity-50`,e),...t})}var Gy=Y.createContext(void 0),Ky=Y.createContext(void 0);function qy(){let e=Y.useContext(Gy);if(e===void 0)throw Error(et(60));return e}function Jy(){let e=Y.useContext(Ky);if(e===void 0)throw Error(et(61));return e}var Yy={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,multiple:e=>e.multiple,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,highlightItemOnHover:e=>e.highlightItemOnHover,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:$m(t,r)!==``},hasNullItemLabel:(e,t)=>t?Zm(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>G_(t,e,n)):G_(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function Xy(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,form:l,autoComplete:u,disabled:d=!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=W_,highlightItemOnHover:C=!0,children:w}=e,{clearErrors:T}=Af(),{setDirty:E,setTouched:D,setFocused:O,validityData:k,setFilled:A,name:j,disabled:M,validation:N,validationMode:P}=Tf(),F=np({id:t}),I=M||d,L=j??c,[R,z]=Ld({controlled:n,default:y?r??Ze:r,name:`Select`,state:`value`}),[B,V]=Ld({controlled:a,default:o,name:`Select`,state:`open`}),H=Y.useRef([]),ee=Y.useRef([]),te=Y.useRef(null),U=Y.useRef(null),W=Y.useRef(0),ne=Y.useRef(null),G=Y.useRef([]),re=Y.useRef(!1),ie=Y.useRef(null),ae=Y.useRef(null),oe=Y.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),se=Y.useRef(!1),ce=Y.useRef(R),{openMethod:le,triggerProps:ue}=xm(B),de=Ve(()=>new is({id:F,labelId:void 0,modal:m,multiple:y,disabled:I,readOnly:f,required:p,highlightItemOnHover:C,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,value:R,open:B,mounted:B,transitionStatus:void 0,items:v,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:Qe,triggerProps:Qe,itemRoot:{props:Qe,multiple:y,disabled:I,readOnly:f,isItemEqualToValue:S},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:Xe,setOpen:Xe,handleScrollArrowVisibility:Xe,onOpenChangeComplete:Xe,listRef:H,popupRef:te,scrollHandlerRef:U,scrollArrowsMountedCountRef:W,valueRef:ne,valuesRef:G,labelsRef:ee,typingRef:re,selectionRef:oe,firstItemTextRef:ie,selectedItemTextRef:ae,alignItemWithTriggerActiveRef:se,initialValueRef:ce},Yy)).current,[fe,pe]=Y.useState(!1),{mounted:me,transitionStatus:he,forceUnmount:ge}=Ao({open:B,ref:te,preventUnmountOnClose:fe,setPreventUnmountOnClose:pe,onUnmount(){de.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),_?.(!1)}}),_e=de.useState(`activeIndex`),ve=de.useState(`selectedIndex`),ye=de.useState(`triggerElement`),be=de.useState(`positionerElement`),xe=Pl(le),Se=le??xe,Ce=Y.useMemo(()=>y?``:$m(R,x),[y,R,x]),K=Y.useMemo(()=>y&&Array.isArray(R)?R.map(e=>$m(e,x)):$m(R,x),[y,R,x]);Ef(Cr(ye),F,R,$(()=>K),!I,c);let we=y?Array.isArray(R)&&R.length>0:R!=null&&Ce!==``;X(()=>{A(we)},[we,A]),X(function(){let e=X_(G.current,R,S,y);e===null&&(ae.current=null),!B&&de.set(`selectedIndex`,e)},[y,B,R,S,de]),Pf(R,()=>{T(L),E(K_(R,k.initialValue,S)),N.change(R)});let Te=$((e,t)=>{let n=t,r=Ro(n);s?.(e,n),!t.isCanceled&&(e||pe(r()),V(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(D(!0),O(!1),P===`onBlur`&&N.commit(R)))});Y.useImperativeHandle(h,()=>({unmount:ge,close:()=>{de.state.open&&Te(!1,Q(lr))}}),[ge,Te,de]);let Ee=$((e,t)=>{i?.(e,t),!t.isCanceled&&z(e)}),De=$(e=>{let t=Ah(e.scrollHeight,e.clientHeight),n=jh(e.scrollTop,t),r=n>0,i=n<t;de.set(`scrollUpArrowVisible`,r),de.set(`scrollDownArrowVisible`,i)}),Oe=hs({open:B,onOpenChange:Te,elements:{reference:ye,floating:be}}),ke=go(Oe,{enabled:!I,event:`mousedown`}),Ae=So(Oe),je=Ms(Oe,{enabled:!I,listRef:H,activeIndex:_e,selectedIndex:ve,disabledIndices:Ze,onNavigate(e){e===null&&!B||de.set(`activeIndex`,e)},focusItemOnHover:C}),Me=Ns(Oe,{enabled:!I&&(B||!f&&!y),listRef:ee,activeIndex:_e,selectedIndex:ve,disabledIndices:e=>lf(H.current[e]),onMatch(e){B?de.set(`activeIndex`,e):Ee(G.current[e],Q(Un))},onTyping(e){re.current=e}}),Ne=Y.useMemo(()=>ba(Me.reference,je.reference,Ae.reference,ke.reference,ue),[ke.reference,Me.reference,je.reference,Ae.reference,ue]),Pe=Y.useMemo(()=>ba(jo,Me.floating,je.floating,Ae.floating),[Me.floating,je.floating,Ae.floating]),Fe=je.item??Qe,Ie=Y.useMemo(()=>({props:Fe,multiple:y,disabled:I,readOnly:f,isItemEqualToValue:S}),[Fe,y,I,f,S]);de.useContextCallback(`setValue`,Ee),de.useContextCallback(`setOpen`,Te),de.useContextCallback(`handleScrollArrowVisibility`,De),de.useContextCallback(`onOpenChangeComplete`,_),H_(()=>{de.update({popupProps:Pe,triggerProps:Ne,itemRoot:Ie})}),de.useSyncedValues({id:F,modal:m,multiple:y,disabled:I,readOnly:f,required:p,highlightItemOnHover:C,value:R,open:B,mounted:me,transitionStatus:he,popupProps:Pe,triggerProps:Ne,itemRoot:Ie,items:v,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,openMethod:Se});let Le=_r(g,N.inputRef),q=y?void 0:L,Re=Y.useMemo(()=>!y||!Array.isArray(R)||!L?null:R.map(e=>{let t=$m(e,x);return(0,J.jsx)(`input`,{type:`hidden`,form:l,name:L,value:t,disabled:I},t)}),[y,R,l,L,x,I]);return(0,J.jsxs)(Gy.Provider,{value:de,children:[(0,J.jsx)(Ky.Provider,{value:Oe,children:w}),(0,J.jsx)(`input`,{...N.getValidationProps(I,{onFocus(){de.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||I||f)return;let t=e.currentTarget.value,n=Q(Un,e.nativeEvent);function r(){if(y)return;let e=t.toLowerCase(),r=G.current.findIndex(t=>$m(t,x).toLowerCase()===e||Qm(t,b).toLowerCase()===e);r===-1&&(r=G.current.findIndex((t,n)=>{let r=ee.current[n];return r!=null&&r.toLowerCase()===e}));let i=G.current[r];i!=null&&Ee(i,n)}de.set(`forceMount`,!0),queueMicrotask(r)}}),id:F&&q==null?`${F}-hidden-input`:void 0,form:l,name:q,autoComplete:u,value:Ce,disabled:I,required:p&&!(y&&we),readOnly:f,ref:Le,style:L?Lr:Ir,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Re]})}var Zy=`data-popup-side`,Qy=400,$y={...Tn,...Sf,popupSide:e=>e?{[Zy]:e}:null,value:()=>null},eb=Y.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{setTouched:l,validationMode:u,validation:d,state:f,disabled:p}=Tf(),{labelId:m}=Of(),h=qy(),g=h.useState(`readOnly`),_=h.useState(`required`),v=h.useState(`disabled`),y=p||v||a,b=h.useState(`open`),x=h.useState(`mounted`),S=h.useState(`value`),C=h.useState(`triggerProps`),w=h.useState(`positionerElement`),T=h.useState(`listElement`),E=h.useState(`popupSide`),D=h.useState(`id`),O=h.useState(`labelId`),k=h.useState(`hasSelectedValue`),A=x&&w?E:null,j=i??D,M=ev(m,O);np({id:i});let N=Cr(w),P=Y.useRef(null),F=Xf(y,P),{getButtonProps:I,buttonRef:L}=Wf({disabled:y,native:o}),R=h.useStateSetter(`triggerElement`),z=ot(),B=ot(),V=ot();Y.useEffect(()=>{if(b)return V.start(Qy,()=>{h.context.selectionRef.current.allowUnselectedMouseUp=!0,h.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{V.clear()};h.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},B.clear()},[b,h,B,V]);let H=ba(C,{id:j,role:`combobox`,"aria-expanded":b,"aria-haspopup":`listbox`,"aria-controls":b?T?.id??In(w)?.id:void 0,"aria-labelledby":M,"aria-readonly":g||void 0,"aria-required":_||void 0,tabIndex:y?-1:0,onFocus(e){F(!0),b&&h.context.alignItemWithTriggerActiveRef.current&&h.context.setOpen(!1,Q(Un,e.nativeEvent)),z.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){Z(w,e.relatedTarget)||(l(!0),F(!1),u===`onBlur`&&d.commit(S))},onMouseDown(e){if(b)return;let t=Pr(e.currentTarget);function n(e){if(!P.current)return;let t=e.target;Z(P.current,t)||Z(N.current,t)||Fm(e,P.current)||h.context.setOpen(!1,Q(or,e))}B.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},c,I),ee=d.getValidationProps(y,H);ee.role=`combobox`;let te={...f,open:b,disabled:y,value:S,readOnly:g,popupSide:A,placeholder:!k};return Na(`button`,e,{ref:[t,P,L,R],state:te,stateAttributesMapping:$y,props:ee})}),tb={value:()=>null},nb=Y.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,c=qy(),l=c.useState(`value`),u=c.useState(`items`),d=c.useState(`itemToStringLabel`),f=c.useState(`hasSelectedValue`),p=!f&&a!=null&&i==null,m=c.useState(`hasNullItemLabel`,p),h={value:l,placeholder:!f},g=null;return g=typeof i==`function`?i(l):i??(p&&!m?a:Array.isArray(l)?th(l,u,d):eh(l,u,d)),Na(`span`,e,{state:h,ref:[t,c.context.valueRef],props:[{children:g},s],stateAttributesMapping:tb})}),rb=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return Na(`span`,e,{state:{open:qy().useState(`open`)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:wn})}),ib=Y.forwardRef(function(e,t){let n=qy(),r=n.useState(`mounted`),i=n.useState(`forceMount`);return r||i?(0,J.jsx)(Ya,{ref:t,...e}):null}),ab=Y.createContext(void 0);function ob(){let e=Y.useContext(ab);if(!e)throw Error(et(59));return e}function sb(e,t){e&&Object.assign(e.style,t)}var cb={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},lb={position:`fixed`},ub=Y.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=Ha,style:_,...v}=e,y=qy(),b=Jy(),x=y.useState(`open`),S=y.useState(`mounted`),C=y.useState(`modal`),w=y.useState(`value`),T=y.useState(`openMethod`),E=y.useState(`positionerElement`),D=y.useState(`triggerElement`),O=y.useState(`isItemEqualToValue`),k=y.useState(`transitionStatus`),A=Y.useRef(null),j=Y.useRef(null),[M,N]=Y.useState(h),P=S&&M&&T!==`touch`;!S&&M!==h&&N(h),Y.useImperativeHandle(y.context.alignItemWithTriggerActiveRef,()=>P),hm((P||C)&&x,T===`touch`,E,D);let F=Tl({anchor:n,floatingRootContext:b,positionMethod:a,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??P,collisionAvoidance:g,keepMounted:!0}),I=P?`none`:F.side,L=P?lb:F.positionerStyles,R={open:x,side:I,align:F.align,anchorHidden:F.anchorHidden};X(()=>{y.set(`popupSide`,F.side)},[y,F.side]);let z=kl(e,R,{styles:L,transitionStatus:k,props:v,refs:[t,y.useStateSetter(`positionerElement`)],hidden:!S,inert:!x}),B=Y.useRef(0),V=$(e=>{if(y.context.valuesRef.current.length===0)return;let t=B.current;B.current=e.size;let n=Q(Un);if(t!==0&&!y.state.multiple&&w!==null&&J_(y.context.valuesRef.current,w,O)===-1){let e=y.context.initialValueRef.current,t=e!=null&&J_(y.context.valuesRef.current,e,O)!==-1?e:null;y.context.setValue(t,n),t===null&&(y.set(`selectedIndex`,null),y.context.selectedItemTextRef.current=null)}if(t!==0&&y.state.multiple&&Array.isArray(w)){let e=w.filter(e=>J_(y.context.valuesRef.current,e,O)!==-1);e.length!==w.length&&(y.context.setValue(e,n),e.length===0&&(y.set(`selectedIndex`,null),y.context.selectedItemTextRef.current=null))}if(x&&P){y.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};sb(E,e),sb(y.context.popupRef.current,e)}}),H=Y.useMemo(()=>({...F,side:I,alignItemWithTriggerActive:P,setControlledAlignItemWithTrigger:N,scrollUpArrowRef:A,scrollDownArrowRef:j}),[F,I,P,N]);return(0,J.jsx)(tf,{elementsRef:y.context.listRef,labelsRef:y.context.labelsRef,onMapChange:V,children:(0,J.jsxs)(ab.Provider,{value:H,children:[S&&C&&(0,J.jsx)(tm,{inert:Nl(!x),cutout:D}),z]})})}),db=`--transform-origin`,fb={...En,...pn},pb=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,s=qy(),c=s.useState(`multiple`),l=s.useState(`readOnly`),u=s.useState(`highlightItemOnHover`),d=Jy(),{side:f,align:p,alignItemWithTriggerActive:m,isPositioned:h,setControlledAlignItemWithTrigger:g}=ob(),_=Hp(!0)!=null,v=dl(),{nonce:y,disableStyleElements:b}=_h(),x=s.useState(`id`),S=s.useState(`open`),C=s.useState(`openMethod`),w=s.useState(`mounted`),T=s.useState(`popupProps`),E=s.useState(`transitionStatus`),D=s.useState(`triggerElement`),O=s.useState(`positionerElement`),k=s.useState(`listElement`),A=Y.useRef(!1),j=Y.useRef(!1),M=Y.useRef({}),N=Nr(),P=$(e=>{if(!O||!s.context.popupRef.current||!j.current)return;let t=O.style.top===`0px`,n=O.style.bottom===`0px`;if(A.current||!m||!t&&!n){s.context.handleScrollArrowVisibility(e);return}let r=gb(O),i=_b(O.getBoundingClientRect().height,`y`,r),a=Pr(O),o=At(O),c=o.getComputedStyle(O),l=parseFloat(c.marginTop),u=parseFloat(c.marginBottom),d=mb(o.getComputedStyle(s.context.popupRef.current)),f=Math.min(a.documentElement.clientHeight-l-u,d),p=e.scrollTop,h=hb(e),g=null,_=e=>{O.style.height=`${e}px`},v=t?h-p:p,y=Math.min(i+v,f);if(v<=1){let n=Dh(v,0,f-i);n>0&&_(i+n),e.scrollTop=t?h:0,f-(i+n)<=1&&(A.current=!0),s.context.handleScrollArrowVisibility(e);return}f-y>1?g=t?1/0:0:n&&p<h&&(g=p-(v-(i+v-f)));let b=Math.ceil(y);if(b!==0&&_(b),g!=null){let t=Dh(g,0,hb(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}b>=f-1&&(A.current=!0),s.context.handleScrollArrowVisibility(e)});Y.useImperativeHandle(s.context.scrollHandlerRef,()=>P,[P]),ko({open:S,ref:s.context.popupRef,onComplete(){S&&s.context.onOpenChangeComplete(!0)}});let F={open:S,transitionStatus:E,side:f,align:p};X(()=>{!O||!s.context.popupRef.current||Object.keys(M.current).length||(M.current={top:O.style.top||`0`,left:O.style.left||`0`,right:O.style.right,height:O.style.height,bottom:O.style.bottom,minHeight:O.style.minHeight,maxHeight:O.style.maxHeight,marginTop:O.style.marginTop,marginBottom:O.style.marginBottom})},[s,O]),X(()=>{S||m||(j.current=!1,A.current=!1,sb(O,M.current))},[S,m,O]),X(()=>{let e=s.context.popupRef.current;if(!S||!D||!O||!e||m&&!h||s.state.transitionStatus===`ending`)return;if(j.current=!0,e.style.removeProperty(db),!m){N.request(()=>s.context.handleScrollArrowVisibility(k||e));return}let t=bb(e);try{let t=s.context.selectedItemTextRef.current;t?.isConnected||(t=!s.select(`hasSelectedValue`)&&s.context.firstItemTextRef.current?.isConnected?s.context.firstItemTextRef.current:null);let n=s.context.valueRef.current,r=At(O),i=r.getComputedStyle(O),a=r.getComputedStyle(e),o=Pr(D),c=gb(D),l=vb(D.getBoundingClientRect(),c),d=vb(O.getBoundingClientRect(),c),f=l.height,p=k||e,m=p.scrollHeight,h=parseFloat(a.borderBottomWidth),_=parseFloat(i.marginTop)||10,y=parseFloat(i.marginBottom)||10,b=parseFloat(i.minHeight)||100,x=mb(a),S=o.documentElement.clientHeight-_-y,C=o.documentElement.clientWidth,w=S-l.bottom+f,T,E=v===`rtl`?l.right-d.width:l.left,j=0;if(t&&n){let e=vb(n.getBoundingClientRect(),c);T=vb(t.getBoundingClientRect(),c),E=d.left+(v===`rtl`?e.right-T.right:e.left-T.left);let r=e.top-l.top+e.height/2;j=T.top-d.top+T.height/2-r}let N=w+j+y+h,P=Math.min(S,N),F=S-_-y,I=N-P,L=C-5;O.style.left=`${Dh(E,5,L-d.width)}px`,O.style.height=`${P}px`,O.style.maxHeight=`none`,O.style.marginTop=`${_}px`,O.style.marginBottom=`${y}px`,e.style.height=`100%`;let R=hb(p),z=I>=R-1;z&&(P=Math.min(S,d.height)-(I-R));let B=l.top<20||l.bottom>S-20||Math.ceil(P)+1<Math.min(m,b),V=(r.visualViewport?.scale??1)!==1&&vt;if(B||V){sb(O,M.current),g(!1);return}let H=Math.max(b,P);if(z){let e=Math.max(0,S-N);O.style.top=d.height>=F?`0`:`${e}px`,O.style.height=`${P}px`,p.scrollTop=hb(p)}else O.style.bottom=`0`,p.scrollTop=I;if(T){let t=d.top,n=d.height,r=T.top+T.height/2,i=Dh(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(db,`50% ${i}%`)}(H===S||P>=x)&&(A.current=!0),s.context.handleScrollArrowVisibility(p),u&&s.state.selectedIndex===null&&s.state.activeIndex===null&&s.context.listRef.current[0]!=null&&s.set(`activeIndex`,0)}finally{t()}},[s,S,O,D,m,g,N,k,u,v,h]),Y.useEffect(()=>{if(!m||!O||!S)return;let e=At(O);function t(e){s.context.setOpen(!1,Q(ur,e))}return hr(e,`resize`,t)},[s,m,O,S]);let I={...k?{role:`presentation`}:{role:`listbox`,"aria-multiselectable":c||void 0,"aria-readonly":l||void 0,id:`${x}-list`},onKeyDown(e){_&&Gd.has(e.key)&&e.stopPropagation()},onScroll(e){k||P(e.currentTarget)},...m&&{style:k?{height:`100%`}:cb},className:!k&&m?oh.className:void 0},L=Na(`div`,e,{ref:[t,s.context.popupRef],state:F,stateAttributesMapping:fb,props:[T,I,Ol(E),o]});return(0,J.jsxs)(Y.Fragment,{children:[!b&&oh.getElement(y),(0,J.jsx)(ho,{context:d,modal:!1,disabled:!w,openInteractionType:C,returnFocus:a,restoreFocus:!0,children:L})]})});function mb(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function hb(e){return Ah(e.scrollHeight,e.clientHeight)}function gb(e){return wc.getScale(e)}function _b(e,t,n){return e/n[t]}function vb(e,t){return di({x:_b(e.x,`x`,t),y:_b(e.y,`y`,t),width:_b(e.width,`x`,t),height:_b(e.height,`y`,t)})}var yb=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function bb(e){let{style:t}=e,n={};for(let[e,r]of yb)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of yb){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var xb=Y.createContext(void 0);function Sb(){let e=Y.useContext(xb);if(!e)throw Error(et(57));return e}var Cb=Y.memo(Y.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...l}=e,u=Y.useRef(null),d=qf({guess:!0,label:o,textRef:u}),f=qy(),{props:p,multiple:m,disabled:h,readOnly:g,isItemEqualToValue:_}=f.useState(`itemRoot`),v=h||s,y=f.useState(`isActive`,d.index),b=f.useState(`open`),x=f.useState(`isSelected`,a),S=f.useState(`isSelectedByFocus`,d.index),C=d.index,w=Y.useRef(null);X(()=>{let e=f.context.valuesRef.current;return e[C]=a,()=>{delete e[C]}},[C,a,f]),X(()=>{let e=f.state.value,t=f.state.selectedIndex,n=t,r;m&&Array.isArray(e)?(n=Z_(C,a,f.context.valuesRef.current,e,_,t),r=n===C,C===t&&!r&&(f.context.selectedItemTextRef.current=null)):(r=e!==void 0&&G_(a,e,_),r&&(n=C)),f.set(`selectedIndex`,n),r&&u.current&&(f.context.selectedItemTextRef.current=u.current)},[C,m,_,f,a]);let T=Y.useRef(`mouse`),E=Y.useRef(!1),{getButtonProps:D,buttonRef:O}=Wf({disabled:v,focusableWhenDisabled:!0,native:c,composite:!0}),k={disabled:v,selected:x,highlighted:y};function A(e){if(h||g)return;let t=f.state.value;if(m){let n=Array.isArray(t)?t:[],r=x?Q_(n,a,_):[...n,a];f.context.setValue(r,Q(Jn,e))}else f.context.setValue(a,Q(Jn,e)),f.context.setOpen(!1,Q(Jn,e))}function j(){f.context.selectionRef.current.dragY=0}let M={role:`option`,"aria-selected":x,tabIndex:b&&y?0:-1,onKeyDown(e){f.set(`activeIndex`,C),e.key===` `&&f.context.typingRef.current&&e.preventDefault()},onClick(e){let t=T.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&wt(e.nativeEvent)&&(n!==void 0||y),i=t&&!r&&!E.current;E.current=!1,!(v||i)&&A(e.nativeEvent)},onPointerEnter(e){T.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=f.context.selectionRef.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){T.current=e.pointerType,E.current=!0,j()},onMouseUp(){if(j(),v||T.current===`touch`||E.current)return;let e=!f.context.selectionRef.current.allowSelectedMouseUp&&x,t=!f.context.selectionRef.current.allowUnselectedMouseUp&&!x;e||t||(E.current=!0,w.current?.click(),E.current=!1)}},N=Na(`div`,e,{ref:[O,t,d.ref,w],state:k,props:[p,M,l,D]}),P=Y.useMemo(()=>({selected:x,index:C,textRef:u,selectedByFocus:S}),[x,C,u,S]);return(0,J.jsx)(xb.Provider,{value:P,children:N})})),wb=Y.forwardRef(function(e,t){let{selected:n}=Sb();return e.keepMounted||n?(0,J.jsx)(tv,{...e,selected:n,ref:t}):null}),Tb=Y.memo(Y.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=Sb(),a=qy(),{render:o,className:s,style:c,...l}=e;return Na(`div`,e,{ref:[Y.useCallback(e=>{e&&(n===0&&(a.context.firstItemTextRef.current=e),i&&(a.context.selectedItemTextRef.current=e))},[a,n,i]),t,r],props:l})})),Eb=Xy;function Db(e){return(0,J.jsx)(nb,{"data-slot":`select-value`,...e})}function Ob({className:e,size:t=`default`,children:n,...r}){return(0,J.jsxs)(eb,{"data-slot":`select-trigger`,className:q(`inline-flex min-w-0 max-w-full cursor-pointer items-center justify-between gap-2 rounded-md border border-border bg-background text-left text-sm shadow-sm outline-none transition-colors`,`hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-[var(--color-primary)]`,`data-[popup-open]:bg-accent data-[popup-open]:text-accent-foreground`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,t===`sm`?`h-8 px-2`:`h-9 px-3`,typeof e==`string`?e:void 0),...r,children:[(0,J.jsx)(`span`,{className:`min-w-0 truncate`,children:n}),(0,J.jsx)(rb,{className:`shrink-0 text-muted-foreground`,children:(0,J.jsx)(vu,{className:`h-3.5 w-3.5`,"aria-hidden":!0})})]})}function kb({className:e,sideOffset:t=4,align:n=`start`,children:r,...i}){return(0,J.jsx)(ib,{children:(0,J.jsx)(ub,{sideOffset:t,align:n,alignItemWithTrigger:!1,className:`z-50 outline-none`,children:(0,J.jsx)(pb,{"data-slot":`select-content`,className:q(`max-h-[min(var(--available-height),20rem)] min-w-[var(--anchor-width)] max-w-[var(--available-width)] overflow-y-auto rounded-md border border-border bg-card p-1 text-card-foreground shadow-md outline-none`,typeof e==`string`?e:void 0),...i,children:r})})})}function Ab({className:e,children:t,...n}){return(0,J.jsxs)(Cb,{"data-slot":`select-item`,className:q(`relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none`,`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,typeof e==`string`?e:void 0),...n,children:[(0,J.jsx)(Tb,{children:t}),(0,J.jsx)(wb,{className:`absolute right-2 flex items-center`,children:(0,J.jsx)(_u,{className:`h-3.5 w-3.5`,"aria-hidden":!0})})]})}var jb=Y.createContext(void 0);function Mb(e){let t=Y.useContext(jb);if(t===void 0&&!e)throw Error(et(47));return t}var Nb={...ps,disabled:e=>e.disabled,instantType:e=>e.instantType===`trigger-change`&&!ps.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===`trigger-press`&&ps.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod===`touch`&&e.openChangeReason===`trigger-press`,hasTriggerFocusGuards:(e,t)=>ps.isOpenedByTrigger(e,t)&&!e.focusManagerModal,modal:e=>e.modal,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},Pb=class extends is{constructor(e,t,n){let r=new Go;super(Fb(e,r,t,n),Ib(r),Nb)}setOpen=(e,t)=>{let n=t.reason===Gn,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=Ro(t),o=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&o!=null&&(t.trigger=this.context.triggerElements.getById(o)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let n=Lo(this.state,e,t.trigger,a());n.openChangeReason=t.reason,this.update(n)};n?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(500,()=>{this.context.stickIfOpen=!1}),He.flushSync(s)):s();let c;r?c=`click`:i?c=`dismiss`:t.reason===`focus-out`&&(c=`focus`),this.set(`instantType`,c)}};function Fb(e,t,n,r=!1){let i={...ss(t,n,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&e?.mounted===void 0&&(i.mounted=!0),i}function Ib(e){return{popupRef:Y.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:Y.createRef(),beforeTriggerFocusGuardRef:Y.createRef(),beforeContentFocusGuardRef:Y.createRef(),stickIfOpenTimeout:new at,stickIfOpen:!0,triggerElements:e}}var Lb=qe(function({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=zb(s,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`mounted`),p=u.useState(`payload`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),Wo(u,d),Vo(u);let{forceUnmount:m}=Ho(d,u,()=>{u.context.stickIfOpen=!0,u.set(`openChangeReason`,null)});u.useSyncedValues({modal:o}),Y.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]),Y.useImperativeHandle(e.actionsRef,()=>({unmount:m,close:()=>u.setOpen(!1,Q(lr))}),[m,u]);let h=d||f||s!=null;return(0,J.jsxs)(jb.Provider,{value:u,children:[s&&(0,J.jsx)(Po,{handle:s,store:u}),h&&(0,J.jsx)(Bb,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})});function Rb(e){return Mb(!0)?(0,J.jsx)(Lb,{props:e}):(0,J.jsx)(io,{children:(0,J.jsx)(Lb,{props:e})})}function zb(e,t){let n=No((e,n)=>new Pb(t,e,n));return Y.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function Bb({store:e,modal:t}){let n=So(e.useState(`floatingRootContext`),{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),r=n.reference,i=n.floating;return Uo(e,{activeTriggerProps:r,inactiveTriggerProps:r,popupProps:i}),null}var Vb=Je(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,handle:s,payload:c,openOnHover:l=!1,delay:u=300,closeDelay:d=0,id:f,...p}=e,m=Mb(!0),h=ms(s)??m;if(!h)throw Error(et(74));let g=Zc(f),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerPopupId`,g),x=Y.useRef(null),{registerTrigger:S,isMountedByThisTrigger:C}=Bo(g,x,h,{payload:c,disabled:a,openOnHover:l,closeDelay:d}),w=h.useState(`isPressOpenedByTrigger`,g),T=h.useState(`isTouchPressOpen`,l),E=h.useState(`hasTriggerFocusGuards`,g),D=Ts(v,{enabled:!a&&l&&!T,mouseOnly:!0,move:!1,handleClose:Vs(),restMs:u,delay:{close:d},triggerElementRef:x,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),O=go(v,{stickIfOpen:$(()=>h.context.stickIfOpen)}),k=bm(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),A=h.useState(`triggerProps`,C),{getButtonProps:j,buttonRef:M}=Wf({disabled:a,native:o}),N={open(e){return w?Tn.open(e):wn.open(e)}},{handlePreFocusGuardFocus:P,handleFocusTargetFocus:F}=Rm(h,x),I=Na(`button`,e,{state:{disabled:a,open:y},ref:[M,t,S,x],props:[O.reference,D,A,k,{[Va]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":y,"aria-controls":b},p,j],stateAttributesMapping:N}),L=(0,J.jsx)(Y.Fragment,{children:I},g);return E?(0,J.jsxs)(Y.Fragment,{children:[(0,J.jsx)(Rr,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:P}),L,(0,J.jsx)(Rr,{ref:h.context.triggerFocusTargetRef,onFocus:F})]}):L}),Hb=Y.createContext(void 0);function Ub(){let e=Y.useContext(Hb);if(e===void 0)throw Error(et(45));return e}var Wb=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return Mb().useState(`mounted`)||n?(0,J.jsx)(Hb.Provider,{value:n,children:(0,J.jsx)(Ya,{ref:t,...r})}):null}),Gb=Y.createContext(void 0);function Kb(){let e=Y.useContext(Gb);if(!e)throw Error(et(46));return e}var qb=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:o,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:g=Ua,..._}=e,v=Mb(),y=Ub(),b=no(),x=v.useState(`floatingRootContext`),S=v.useState(`mounted`),C=v.useState(`open`),w=v.useState(`openChangeReason`),T=v.useState(`activeTriggerElement`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`positionerElement`),k=v.useState(`instantType`),A=v.useState(`transitionStatus`),j=Tl({anchor:a,floatingRootContext:x,positionMethod:o,mounted:S,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:y,nodeId:b,collisionAvoidance:g,adaptiveOrigin:v.useState(`adaptiveOrigin`)});nm({store:v,domReference:x.useState(`domReferenceElement`),positionerElement:O,open:C});let M=E===!0&&w!==`trigger-hover`;hm(C&&M,D===`touch`,O,T);let N=v.useStateSetter(`positionerElement`),P=kl(e,{open:C,side:j.side,align:j.align,anchorHidden:j.anchorHidden,instant:k},{styles:j.positionerStyles,transitionStatus:A,props:_,refs:[t,N],hidden:!S,inert:!C});return(0,J.jsxs)(Gb.Provider,{value:j,children:[S&&M&&(0,J.jsx)(tm,{inert:Nl(!C),cutout:T}),(0,J.jsx)(ro,{id:b,children:P})]})}),Jb=Y.createContext(void 0);function Yb(){let[e,t]=Y.useState(0),n=$(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:Y.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}var Xb=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=Mb(),l=Kb(),u=Hp(!0)!=null,{context:d,hasClosePart:f}=Yb(),p=c.useState(`open`),m=c.useState(`openMethod`),h=c.useState(`instantType`),g=c.useState(`transitionStatus`),_=c.useState(`popupProps`),v=c.useState(`titleElementId`),y=c.useState(`descriptionElementId`),b=c.useState(`modal`),x=c.useState(`mounted`),S=c.useState(`openChangeReason`),C=c.useState(`activeTriggerElement`),w=c.useState(`floatingRootContext`),T=w.useState(`floatingId`),E=c.useState(`disabled`),D=c.useState(`openOnHover`),O=c.useState(`closeDelay`);ko({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),Cs(w,{enabled:D&&!E,closeDelay:O});let k=a===void 0?Mo(c.context.popupRef):a,A=b!==!1&&f;c.useSyncedValue(`focusManagerModal`,A);let j=c.useStateSetter(`popupElement`),M=Na(`div`,e,{state:{open:p,side:l.side,align:l.align,instant:h,transitionStatus:g},ref:[t,c.context.popupRef,j],props:[_,{id:T,role:`dialog`,...jo,"aria-labelledby":v,"aria-describedby":y,onKeyDown(e){u&&Gd.has(e.key)&&e.stopPropagation()}},Ol(g),s],stateAttributesMapping:Dn});return(0,J.jsx)(ho,{context:w,openInteractionType:m,modal:A,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:o,restoreFocus:`popup`,getInsideElements:()=>[c.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:Pt(C)?C:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,J.jsx)(Jb.Provider,{value:d,children:M})})}),Zb=`data-[popup-open]:bg-[var(--color-accent)] data-[popup-open]:text-[var(--color-accent-foreground)]`,Qb=Rb;function $b({className:e,...t}){return(0,J.jsx)(Vb,{className:typeof e==`function`?e:q(Zb,e),...t})}function ex({className:e,sideOffset:t=6,align:n=`start`,children:r,...i}){return(0,J.jsx)(Wb,{children:(0,J.jsx)(qb,{sideOffset:t,align:n,className:`z-50 outline-none`,children:(0,J.jsx)(Xb,{className:q(`rounded-md border border-[var(--color-border)] bg-[var(--color-card)] text-[var(--color-card-foreground)] shadow-md outline-none`,e),...i,children:(0,J.jsx)(Zh,{viewportClassName:`max-h-[var(--available-height)]`,children:(0,J.jsx)(`div`,{className:`p-3`,children:r})})})})})}function tx(e,t){return e-t}function nx(e,t,n,r,i,a){let o=Dh(e,n,r);if(!i)return o;let s=a.slice();return s[t]=Dh(o,a[t-1]??-1/0,a[t+1]??1/0),s.sort(tx)}function rx(e,t,n){if(!Array.isArray(e))return!0;let r=t*n;for(let t=0;t<e.length-1;t+=1)if(!(Math.abs(e[t]-e[t+1])>=r))return!1;return!0}var ix=()=>null,ax={activeThumbIndex:ix,max:ix,min:ix,minStepsBetweenValues:ix,step:ix,values:ix,...Sf},ox=Y.createContext(void 0);function sx(){let e=Y.useContext(ox);if(e===void 0)throw Error(et(62));return e}function cx(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&U_(e,t)}var lx=Y.forwardRef(function(e,t){let{"aria-labelledby":n,className:r,defaultValue:i,disabled:a=!1,id:o,format:s,largeStep:c=10,locale:l,render:u,max:d=100,min:f=0,minStepsBetweenValues:p=0,form:m,name:h,onValueChange:g,onValueCommitted:_,orientation:v=`horizontal`,step:y=1,thumbCollisionBehavior:b=`push`,thumbAlignment:x=`center`,value:S,style:C,...w}=e,T=Zc(o),E=$_(T),D=$(g),O=$(_),{clearErrors:k}=Af(),{state:A,disabled:j,name:M,setTouched:N,setDirty:P,validityData:F,validation:I}=Tf(),{labelId:L}=Of(),[R,z]=Y.useState(),B=n??ev(L,R),V=j||a,H=M??h,[ee,te]=Ld({controlled:S,default:i??f,name:`Slider`}),U=Y.useRef(null),W=Y.useRef(null),ne=Y.useRef([]),G=Y.useRef(null),re=Y.useRef(-1),ie=Y.useRef(null),ae=Y.useRef(Un),[oe,se]=Y.useState(-1),[ce,le]=Y.useState(-1),[ue,de]=Y.useState(!1),[fe,pe]=Y.useState(()=>new Map),[me,he]=Y.useState([void 0,void 0]),ge=$(e=>{se(e),e!==-1&&le(e)}),_e=$(e=>{e&&(W.current=e)}),ve=Array.isArray(ee),ye=Y.useMemo(()=>ve?ee.map(e=>Dh(e,f,d)).sort(tx):[Dh(ee,f,d)],[d,f,ve,ee]),be=ve?ye:ye[0];Ef(I.inputRef,T,be,void 0,!V,h),Pf(be,()=>{k(H),I.change(be);let e=F.initialValue,t;t=Array.isArray(be)&&Array.isArray(e)?!U_(be,e):be!==e,P(t)});let xe=$((e,t)=>{if(Number.isNaN(e)||cx(e,ee))return!1;let n=t.event,r=n.constructor,i=new r(n.type,n);return Object.defineProperty(i,"target",{writable:!0,value:{value:e,name:H}}),t.event=i,D(e,t),t.isCanceled?!1:(ae.current=t.reason,te(e),!0)}),Se=$((e,t,n)=>{let r=nx(e,t,f,d,ve,ye);if(rx(r,y,p)){let e=`key`in n?rr:Zn,i=xe(r,Q(e,n.nativeEvent,void 0,{activeThumbIndex:t}));N(!0),i&&O(r,Hn(e,n.nativeEvent))}});X(()=>{if(!V)return;let e=$t(Pr(U.current));Z(U.current,e)&&e.blur(),oe!==-1&&ge(-1)},[oe,V,ge]);let Ce=Y.useMemo(()=>({...A,activeThumbIndex:oe,disabled:V,dragging:ue,orientation:v,max:d,min:f,minStepsBetweenValues:p,step:y,values:ye}),[A,oe,V,ue,d,f,p,v,y,ye]),K=Y.useMemo(()=>({active:oe,controlRef:W,disabled:V,dragging:ue,validation:I,format:s,handleInputChange:Se,indicatorPosition:me,inset:x!==`center`,isArrayValue:ve,labelId:B,rootLabelId:E,largeStep:c,lastUsedThumbIndex:ce,lastChangeReasonRef:ae,form:m,locale:l,max:d,min:f,minStepsBetweenValues:p,name:H,onValueCommitted:O,orientation:v,pressedThumbCenterOffsetRef:G,pressedThumbIndexRef:re,pressedValuesRef:ie,registerFieldControlRef:_e,renderBeforeHydration:x===`edge`,setActive:ge,setDragging:de,setIndicatorPosition:he,setLabelId:z,setValue:xe,state:Ce,step:y,thumbCollisionBehavior:b,thumbMap:fe,thumbRefs:ne,values:ye}),[oe,B,E,V,ue,I,s,Se,me,c,ce,m,l,d,f,p,H,O,v,ve,_e,ge,xe,Ce,y,b,x,fe,ye]),we=Na(`div`,e,{state:Ce,ref:[t,U],props:[{"aria-labelledby":B,id:T,role:`group`},w,e=>I.getValidationProps(V,e)],stateAttributesMapping:ax});return(0,J.jsx)(ox.Provider,{value:K,children:(0,J.jsx)(tf,{elementsRef:ne,onMapChange:pe,children:we})})}),ux=new Map;function dx(e,t){let n=JSON.stringify({locale:qm(e),options:t}),r=ux.get(n);if(r)return r;let i=new Intl.NumberFormat(e,t);return ux.set(n,i),i}function fx(e,t,n){return e==null?``:dx(t,n).format(e)}function px(e){return e===`touch`||e===`pen`}function mx(e,t){let n=e.getBoundingClientRect();return t?(n.top+n.bottom)/2:(n.left+n.right)/2}function hx(e){if(e===0)return 0;if(Math.abs(e)<1){let t=e.toExponential().split(`e-`),n=t[0].split(`.`)[1];return(n?n.length:0)+parseInt(t[1],10)}let t=e.toString().split(`.`)[1];return t?t.length:0}function gx(e,t,n){let r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(Math.max(hx(t),hx(n))))}function _x(e,t,n,r,i,a,o,s){let c=e.slice(),l=a*o,u=c.length-1,d=s??e;c[t]=Dh(n,r+t*l,i-(u-t)*l);for(let e=t+1;e<=u;e+=1){let t=c[e-1]+l,n=i-(u-e)*l,r=d[e],a=Math.max(c[e],t);r<a&&(a=Math.max(r,t)),c[e]=Dh(a,t,n)}for(let e=t-1;e>=0;--e){let t=c[e+1]-l,n=r+e*l,i=d[e],a=Math.min(c[e],t);i>a&&(a=Math.min(i,t)),c[e]=Dh(a,n,t)}for(let e=0;e<=u;e+=1)c[e]=Number(c[e].toFixed(12));return c}function vx(e,t,n,r,i,a,o,s,c,l){let u=n??t,d=r??t;if(!(u.length>1))return{value:a,thumbIndex:0,didSwap:!1};let f=c*l;if(e===`push`)return{value:_x(u,i,a,o,s,c,l),thumbIndex:i,didSwap:!1};let p=u.slice(),m=p[i-1],h=p[i+1],g=m==null?o:m+f,_=h==null?s:h-f,v=Number(Dh(a,g,_).toFixed(12));switch(p[i]=v,e){case`swap`:{let e=u[i],t=1e-7,n=a>e,r=a<e,g=n&&h!=null&&a>=h-t,_=r&&m!=null&&a<=m+t;if(!g&&!_)return{value:p,thumbIndex:i,didSwap:!1};let y=g?i+1:i-1,b=p.map((e,t)=>t===i?v:d[t]??u[t]),x=a;x=g?Math.max(a,p[y]):Math.min(a,p[y]);let S=_x(p,y,x,o,s,c,l,b),C=g?y-1:y+1,w=S[C-1],T=S[C+1],E=w==null?o:w+f;E=Math.max(E,o+C*f);let D=T==null?s:T-f;D=Math.min(D,s-(S.length-1-C)*f);let O=Dh(v,E,D);return S[C]=Number(O.toFixed(12)),{value:S,thumbIndex:y,didSwap:!0}}default:return{value:p,thumbIndex:i,didSwap:!1}}}var yx=2;function bx(e,t){if(!e)return{start:0,end:0};function n(e){let t=e==null?0:parseFloat(e);return Number.isNaN(t)?0:t}let r=t?`Top`:`InlineStart`,i=t?`Bottom`:`InlineEnd`;return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${i}Width`])+n(e[`padding${i}`])}}function xx(e,t){if(t.current!=null&&e.changedTouches){let n=e;for(let e=0;e<n.changedTouches.length;e+=1){let r=n.changedTouches[e];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return null}return{x:e.clientX,y:e.clientY}}var Sx=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{disabled:o,dragging:s,inset:c,isArrayValue:l,lastChangeReasonRef:u,max:d,min:f,minStepsBetweenValues:p,onValueCommitted:m,orientation:h,pressedThumbCenterOffsetRef:g,pressedThumbIndexRef:_,pressedValuesRef:v,registerFieldControlRef:y,renderBeforeHydration:b,setActive:x,setDragging:S,setValue:C,state:w,step:T,thumbCollisionBehavior:E,thumbRefs:D,values:O}=sx(),k=dl(),A=O.length>1,j=h===`vertical`,M=Y.useRef(null),N=Y.useRef(null),P=$(e=>{e&&N.current==null&&(N.current=At(e).getComputedStyle(e))}),F=Y.useRef(null),I=Y.useRef(0),L=Y.useRef(0),R=Y.useRef(null),z=Y.useRef(!1),B=Cr(O);function V(e){return e?.querySelector(`input[type="range"]`)}function H(e){_.current=e,D.current[e]||(g.current=null)}function ee(){_.current=-1,g.current=null}function te(e){return Nt(e)?D.current.some(t=>!Nt(t)||!Z(t,e)?!1:V(t)?.disabled===!0):!1}function U(e){let t=M.current,n=_.current;if(!t||n<0||n>=O.length)return n>=O.length&&(R.current=null),null;let{width:r,height:i,bottom:a,left:o,right:s}=t.getBoundingClientRect(),c=bx(N.current,j),u=L.current,m=(j?i:r)-c.start-c.end-u*2,h=g.current??0,y=e.x-h,b=e.y-h,x=Dh(((j?a-b-c.end:(k===`rtl`?s-y:y-o)-c.start)-u)/m,0,1),S=(d-f)*x+f;return S=gx(S,T,f),S=Dh(S,f,d),A?vx(E,O,B.current,v.current,n,S,f,d,T,p):{value:l?[S]:S,thumbIndex:n,didSwap:!1}}function W(e){v.current=A?O.slice():null,R.current=null,B.current=O;let t=_.current,n=t;if(t>-1&&t<O.length){if(O[t]===d){let e=t;for(;e>0&&O[e-1]===d;)--e;n=e}}else{let t=j?`y`:`x`,r;n=-1;for(let i=0;i<D.current.length;i+=1){let a=D.current[i];if(Nt(a)&&!V(a)?.disabled){let o=mx(a,j),s=Math.abs(e[t]-o);(r===void 0||s<=r)&&(n=i,r=s)}}}if(n>-1&&n!==t&&H(n),c){let e=D.current[n];if(Nt(e)){let t=e.getBoundingClientRect();L.current=t[j?`height`:`width`]/2}}}function ne(e){let t=V(D.current?.[e]);t&&t.focus({preventScroll:!0,focusVisible:!1})}function G(e,t,n){let r=C(e.value,Q(t,n,void 0,{activeThumbIndex:e.thumbIndex}));return r&&(R.current=e.value,B.current=Array.isArray(e.value)?e.value:[e.value],e.didSwap&&(H(e.thumbIndex),ne(e.thumbIndex))),r}let re=$(e=>{let t=xx(e,F);if(t==null)return;if(I.current+=1,e.type===`pointermove`&&e.buttons===0){ie(e);return}let n=U(t);n!=null&&rx(n.value,T,p)&&(!s&&I.current>yx&&S(!0),G(n,ar,e))}),ie=$(e=>{if(xx(e,F)==null)return;x(-1),S(!1),g.current=null;let t=R.current;if(Array.isArray(t)&&t.length!==O.length&&(R.current=null),R.current!=null){let t=u.current;m(R.current,Hn(t,e))}`pointerType`in e&&M.current?.hasPointerCapture(e.pointerId)&&M.current?.releasePointerCapture(e.pointerId),_.current=-1,se()}),ae=$(e=>{F.current??ie(e)}),oe=$(e=>{let t=z.current;if(z.current=!1,o)return;if(te(tn(e))){ee();return}let n=e.changedTouches[0];if(n==null)return;if(F.current=n.identifier,!t){let t={x:n.clientX,y:n.clientY};W(t);let r=U(t);if(r==null)return;ne(r.thumbIndex),G(r,Xn,e),I.current=0}let r=Pr(M.current);r.addEventListener(`touchmove`,re,{passive:!0}),r.addEventListener(`touchend`,ie,{passive:!0}),r.addEventListener(`touchcancel`,ie,{passive:!0})}),se=$(()=>{let e=Pr(M.current);e.removeEventListener(`pointermove`,re),e.removeEventListener(`pointerup`,ie),e.removeEventListener(`pointercancel`,ae),e.removeEventListener(`touchmove`,re),e.removeEventListener(`touchend`,ie),e.removeEventListener(`touchcancel`,ie),F.current=null,v.current=null,R.current=null,z.current=!1}),ce=Nr();return Y.useEffect(()=>{let e=M.current;if(!e)return()=>se();let t=hr(e,`touchstart`,oe,{passive:!0});return()=>{t(),ce.cancel(),se()}},[se,oe,M,ce]),Y.useEffect(()=>{o&&se()},[o,se]),Na(`div`,e,{state:w,ref:[t,y,M,P],props:[{"data-base-ui-slider-control":b?``:void 0,onPointerDown(e){z.current=!1;let t=M.current,n=tn(e.nativeEvent);if(!t||o||e.defaultPrevented||!Nt(n)||e.button!==0)return;if(te(n)){ee();return}let r={x:e.clientX,y:e.clientY};W(r);let i=U(r);if(i==null)return;Z(D.current[i.thumbIndex],$t(Pr(t)))?e.preventDefault():ce.request(()=>{ne(i.thumbIndex)}),S(!0),g.current??G(i,Xn,e.nativeEvent),e.nativeEvent.pointerId&&t.setPointerCapture(e.nativeEvent.pointerId),I.current=0,z.current=px(e.pointerType);let a=Pr(t);a.addEventListener(`pointermove`,re,{passive:!0}),a.addEventListener(`pointerup`,ie,{once:!0}),a.addEventListener(`pointercancel`,ae,{once:!0})}},a],stateAttributesMapping:ax})}),Cx=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=sx();return Na(`div`,e,{state:o,ref:t,props:[{style:{position:`relative`}},a],stateAttributesMapping:ax})}),wx=()=>()=>{},Tx=()=>!0,Ex=()=>!1;function Dx(){return(0,Xo.useSyncExternalStore)(wx,Tx,Ex)}function Ox(){let[e,t]=Y.useState(!1);return Y.useEffect(()=>{t(!0)},[]),e}var kx=pa(18)?Dx:Ox;function Ax(){return!kx()}function jx(e,t,n){return(e-t)*100/(n-t)}function Mx(e){let{script:t}=e,{nonce:n}=_h();return Ax()?(0,J.jsx)(`script`,{nonce:n,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0}):null}var Nx=`data-index`,Px,Fx=new Set([...Gd,Ud,Wd]);function Ix(e,t,n,r){if(!(t<0))return e.length===2?`${fx(e[t],r,n)} ${t===0?`start`:`end`} range`:n?fx(e[t],r,n):void 0}function Lx(e,t,n,r,i){let a=e+t*n;return Dh(Number(a.toFixed(Math.max(hx(e),hx(t),hx(r)))),r,i)}var Rx=Y.forwardRef(function(e,t){let{render:n,children:r,className:i,"aria-describedby":a,"aria-label":o,"aria-labelledby":s,"aria-valuetext":c,disabled:l=!1,getAriaLabel:u,getAriaValueText:d,id:f,index:p,inputRef:m,onBlur:h,onFocus:g,onKeyDown:_,tabIndex:v,style:y,...b}=e,x=Zc(f),{active:S,lastUsedThumbIndex:C,controlRef:w,disabled:T,validation:E,format:D,handleInputChange:O,inset:k,isArrayValue:A,labelId:j,largeStep:M,locale:N,max:P,min:F,minStepsBetweenValues:I,form:L,name:R,orientation:z,pressedThumbCenterOffsetRef:B,pressedThumbIndexRef:V,renderBeforeHydration:H,setActive:ee,setIndicatorPosition:te,state:U,step:W,thumbRefs:ne,values:G}=sx(),re=dl(),ie=l||T,ae=G.length>1,oe=z===`vertical`,se=re===`rtl`,{setTouched:ce,validationMode:le}=Tf(),ue=Y.useRef(null),de=Y.useRef(null),fe=Xf(ie,de),pe=Y.useRef(!1),me=$(e=>{pe.current||g?.(e)}),he=$(e=>{pe.current||h?.(e)}),ge=Zc(),_e=np(),ve=ae?ge:_e,{ref:ye,index:be}=qf({metadata:Y.useMemo(()=>({inputId:ve}),[ve])}),xe=ae?p??be:0,Se=xe===G.length-1,Ce=G[xe],K=jx(Ce,F,P),[we,Te]=Y.useState(),Ee=Ax(),De=C>=0&&C<G.length?C:-1,Oe=$(()=>{let e=w.current,t=ue.current;if(!e||!t)return;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=oe?`height`:`width`,a=r[i]-n[i],o=(n[i]/2+a*K/100)/r[i]*100,s=Number.isFinite(o)?o:void 0;Te(s),xe===0?te(e=>[s,e[1]]):Se&&te(e=>[e[0],s])});X(()=>{k&&queueMicrotask(Oe)},[Oe,k]),X(()=>{k&&Oe()},[Oe,k,K]),X(()=>{if(!k)return;let e=w.current,t=ue.current;if(!e||!t)return;let n=At(e).ResizeObserver;if(typeof n!=`function`)return;let r=new n(Oe);return r.observe(e),r.observe(t),()=>{r.disconnect()}},[w,Oe,k]);let ke=oe?`bottom`:`insetInlineStart`,Ae=oe?`left`:`top`,je;ae?S===xe?je=2:De===xe&&(je=1):S===xe&&(je=1);let Me;Me=!k&&!Number.isFinite(K)?Ir:{position:`absolute`,[ke]:k?`var(--position)`:`${K}%`,[Ae]:`50%`,translate:`${(oe||!se?-1:1)*50}% ${(oe?1:-1)*50}%`,zIndex:je,...k&&{"--position":`${we??0}%`,visibility:H&&Ee||we===void 0?`hidden`:void 0}};let Ne;oe&&(Ne=se?`vertical-rl`:`vertical-lr`);let Pe=typeof u==`function`?u(xe):o,Fe=ba({"aria-label":Pe,"aria-labelledby":s??(Pe==null?j:void 0),"aria-describedby":a,"aria-orientation":z,"aria-valuenow":Ce,"aria-valuetext":typeof d==`function`?d(fx(Ce,N,D),Ce,xe):c??Ix(G,xe,D,N),disabled:ie,form:L,id:ve,max:P,min:F,name:R,onChange(e){O(e.currentTarget.valueAsNumber,xe,e)},onFocus(e){let t=pe.current;pe.current=!1,ee(xe),fe(!0),t&&e.stopPropagation()},onBlur(e){if(pe.current){e.stopPropagation();return}ee(-1),!ne.current.some(t=>Z(t,e.relatedTarget))&&(ce(!0),fe(!1),le===`onBlur`&&E.commit(nx(Ce,xe,F,P,A,G)))},onKeyDown(e){if(e.defaultPrevented||!Fx.has(e.key))return;Gd.has(e.key)&&e.stopPropagation();let t=null,n=0,r=e.shiftKey?M:W,i=gx(Ce,W,F);switch(e.key){case Rd:n=1;break;case Vd:n=se?-1:1;break;case zd:n=-1;break;case Bd:n=se?1:-1;break;case Ud:r=M,n=1;break;case Wd:r=M,n=-1;break;case`End`:t=ae&&Number.isFinite(G[xe+1])?G[xe+1]-W*I:P;break;case Hd:t=ae&&Number.isFinite(G[xe-1])?G[xe-1]+W*I:F;break;default:break}if(n!==0&&(t=Lx(i,r,n,F,P)),t!==null){let n=e.currentTarget;Fn(n)||(pe.current=!0,n.blur(),n.focus({preventScroll:!0,focusVisible:!0})),O(t,xe,e),e.preventDefault()}},step:W,style:{...Ir,width:`100%`,height:`100%`,writingMode:Ne},tabIndex:v,type:`range`,value:Ce??``},e=>E.getValidationProps(ie,e),{onFocus:me,onBlur:he,onKeyDown:_}),Ie=_r(de,E.inputRef,m);return Na(`div`,e,{state:U,ref:[t,ye,ue],props:[{[Nx]:xe,children:(0,J.jsxs)(Y.Fragment,{children:[r,(0,J.jsx)(`input`,{ref:Ie,...Fe,suppressHydrationWarning:!0}),k&&Se&&H&&(Px||=(0,J.jsx)(Mx,{script:``}))]}),id:x,onPointerDown(e){if(ie)return;V.current=xe;let t=mx(e.currentTarget,oe);B.current=(oe?e.clientY:e.clientX)-t},style:Me,suppressHydrationWarning:H||void 0},b],stateAttributesMapping:ax})});function zx(e,t,n,r,i,a){let o={visibility:a||n&&(r===void 0||t&&i===void 0)?`hidden`:void 0,position:e?`absolute`:`relative`,[e?`width`:`height`]:`inherit`},s=`${r??0}%`,c=`${(i??0)-(r??0)}%`;return n&&(o[`--start-position`]=s,s=`var(--start-position)`,t&&(o[`--relative-size`]=c,c=`var(--relative-size)`)),o[e?`bottom`:`insetInlineStart`]=t?s:0,o[e?`height`:`width`]=t?c:s,o}var Bx=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{indicatorPosition:o,inset:s,max:c,min:l,orientation:u,renderBeforeHydration:d,state:f,values:p}=sx(),m=Ax(),h=zx(u===`vertical`,p.length>1,s,s?o[0]:jx(p[0],l,c),s?o[1]:jx(p[p.length-1],l,c),s&&d&&m);return Na(`div`,e,{state:f,ref:t,props:[{"data-base-ui-slider-indicator":d?``:void 0,style:h,suppressHydrationWarning:d||void 0},a],stateAttributesMapping:ax})}),Vx=`h-3.5 w-3.5 rounded-full border border-primary bg-card shadow-sm outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)] focus-visible:ring-offset-1`;function Hx({value:e,onValueChange:t,min:n=0,max:r=10,className:i,"aria-label":a}){return(0,J.jsx)(lx,{value:e,onValueChange:e=>{Array.isArray(e)&&e.length===2&&t([e[0],e[1]])},min:n,max:r,step:1,className:q(`w-full`,i),children:(0,J.jsx)(Sx,{className:`flex w-full touch-none select-none items-center py-1.5`,children:(0,J.jsxs)(Cx,{className:`relative h-1 w-full rounded-full bg-[var(--color-muted)]`,children:[(0,J.jsx)(Bx,{className:`rounded-full bg-primary`}),(0,J.jsx)(Rx,{"aria-label":a?`${a} minimum`:`Minimum`,className:Vx}),(0,J.jsx)(Rx,{"aria-label":a?`${a} maximum`:`Maximum`,className:Vx})]})})})}function Ux({added:e,removed:t,className:n,zeros:r=!1}){let i=e=>r||e>0;return(0,J.jsxs)(`span`,{className:q(`shrink-0 font-mono text-[10px] tabular-nums`,n),children:[i(e)&&(0,J.jsxs)(`span`,{className:`text-success`,children:[`+`,e]}),i(e)&&i(t)&&` `,i(t)&&(0,J.jsxs)(`span`,{className:`text-danger`,children:[`−`,t]})]})}function Wx(e){let[t,n]=Y.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=Y.useRef(null),i=Y.useRef(null),a=Y.useRef(null),o=Y.useRef(null),s=Y.useRef(!0),c=Y.useRef(null),l=da(),u=Y.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:a,backdropRef:r,internalBackdropRef:i,positionerRef:o,allowMouseUpTriggerRef:s,initialCursorPointRef:c,rootId:l}),[t,l]);return(0,J.jsx)(hp.Provider,{value:u,children:(0,J.jsx)(pp.Provider,{value:void 0,children:(0,J.jsx)(jm,{...e})})})}var Gx=500,Kx=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{setAnchor:o,actionsRef:s,internalBackdropRef:c,backdropRef:l,positionerRef:u,allowMouseUpTriggerRef:d,initialCursorPointRef:f,rootId:p}=gp(!1),{store:m}=mp(!1),h=m.useState(`open`),g=m.useState(`disabled`),_=Y.useRef(null),v=Y.useRef(null),y=ot(),b=ot(),x=Y.useRef(!1),S=Y.useRef(null);function C(e,t,n){let r=n.type.startsWith(`touch`);f.current={x:e,y:t},o({getBoundingClientRect(){return DOMRect.fromRect({width:r?10:0,height:r?10:0,x:e,y:t})}}),x.current=!1,s.current?.setOpen(!0,Q(Wn,n)),b.start(Gx,()=>{x.current=!0})}function w(e){if(g)return;d.current=!0,St(e),C(e.clientX,e.clientY,e.nativeEvent);let t=Pr(_.current);S.current?.abort();let n=new AbortController;S.current=n,t.addEventListener(`mouseup`,e=>{if(d.current=!1,!x.current)return;b.clear(),x.current=!1;let t=tn(e);Z(u.current,t)||p&&t&&Lm(t)===p||s.current?.setOpen(!1,Q(or,e))},{once:!0,signal:n.signal})}function T(){y.clear(),v.current=null}function E(e){if(g){T();return}if(d.current=!1,e.touches.length!==1){T();return}e.stopPropagation();let t=e.touches[0],n={x:t.clientX,y:t.clientY};v.current=n,y.start(Gx,()=>{C(n.x,n.y,e.nativeEvent)})}function D(e){if(e.touches.length!==1){T();return}if(y.isStarted()&&v.current){let t=e.touches[0],n=Math.abs(t.clientX-v.current.x),r=Math.abs(t.clientY-v.current.y);(n>10||r>10)&&T()}}return Y.useEffect(()=>()=>{S.current?.abort()},[]),Y.useEffect(()=>{function e(e){if(g)return;let t=tn(e);(Z(_.current,t)||Z(c.current,t)||Z(l.current,t))&&e.preventDefault()}return hr(Pr(_.current),`contextmenu`,e)},[l,g,c]),Na(`div`,e,{state:{open:h},ref:[_,t],props:[{onContextMenu:w,onTouchStart:E,onTouchMove:D,onTouchEnd:T,onTouchCancel:T,style:{WebkitTouchCallout:`none`}},a],stateAttributesMapping:Tn})}),qx=Wx,Jx=Kx,Yx=(0,Y.createContext)({title:null,actions:null});function Xx({children:e}){let{title:t}=(0,Y.useContext)(Yx);return t?(0,He.createPortal)(e,t):null}function Zx({children:e}){let{actions:t}=(0,Y.useContext)(Yx);return t?(0,He.createPortal)(e,t):null}function Qx({title:e,count:t,description:n,actions:r,bar:i,children:a}){return(0,J.jsxs)(`div`,{className:`mx-auto w-full max-w-6xl p-6 max-md:p-4`,children:[(0,J.jsxs)(`header`,{className:`mb-4 space-y-3`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-x-4 gap-y-2`,children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2`,children:[(0,J.jsx)(h_,{}),(0,J.jsxs)(`div`,{className:`min-w-0`,children:[(0,J.jsxs)(`h1`,{className:`text-lg font-semibold`,children:[(0,J.jsx)(`span`,{className:`max-md:sr-only`,children:e}),t!==void 0&&(0,J.jsx)(`span`,{className:`ml-2 text-sm font-normal tabular-nums text-muted-foreground max-md:ml-0`,children:t})]}),n!==void 0&&(0,J.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:n})]})]}),r!==void 0&&(0,J.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2 md:shrink-0 max-md:min-w-0`,children:r})]}),i]}),a]})}var $x=`needs-you`,eS=`working-now`;function tS(e){document.getElementById(e)?.scrollIntoView({behavior:`smooth`,block:`start`})}function nS({label:e,value:t,note:n,tone:r,live:i=!1,href:a,onClick:o}){let s=(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[i&&(0,J.jsxs)(`span`,{className:`relative flex size-2`,"aria-hidden":!0,children:[(0,J.jsx)(`span`,{className:`absolute inline-flex size-full animate-ping rounded-full bg-success opacity-60`}),(0,J.jsx)(`span`,{className:`relative inline-flex size-2 rounded-full bg-success`})]}),e]}),(0,J.jsx)(`span`,{className:q(`text-2xl font-semibold tabular-nums`,t===0?`text-muted-foreground`:r??`text-foreground`),children:t}),(0,J.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:n})]}),c=q(`flex min-w-0 flex-col gap-1 rounded-lg border border-border bg-card px-4 py-3 text-left`,(a!==void 0||o)&&`transition-colors hover:border-muted-foreground/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)]`);return a===void 0?o?(0,J.jsx)(`button`,{type:`button`,className:c,onClick:o,children:s}):(0,J.jsx)(`div`,{className:c,children:s}):(0,J.jsx)(`a`,{href:a,className:c,onClick:e=>{e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),o?.())},children:s})}function rS({chips:e,total:t,picked:n,onPick:r,className:i}){return e.length<2?null:(0,J.jsxs)(`div`,{role:`group`,"aria-label":`Show`,className:q(`flex flex-wrap gap-1.5`,i),children:[(0,J.jsx)(iS,{on:n===null,onClick:()=>r(null),label:`All`,count:t}),e.map(e=>(0,J.jsx)(iS,{on:n===e.value,onClick:()=>r(e.value),label:e.label,count:e.count},e.value))]})}function iS({on:e,onClick:t,label:n,count:r}){return(0,J.jsxs)(`button`,{type:`button`,"aria-pressed":e,onClick:t,className:q(`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-xs transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)]`,e?`border-transparent bg-accent text-accent-foreground`:`border-border text-muted-foreground hover:text-foreground`),children:[n,(0,J.jsx)(`span`,{className:`tabular-nums opacity-70`,children:r})]})}var aS=`file`,oS={"package.json":`nodejs`,"package-lock.json":`nodejs`,"pnpm-lock.yaml":`pnpm`,"pnpm-workspace.yaml":`pnpm`,"yarn.lock":`yarn`,"bun.lockb":`bun`,".npmrc":`npm`,".nvmrc":`nodejs`,"tsconfig.json":`tsconfig`,"jsconfig.json":`jsconfig`,"vite.config.ts":`vite`,"vite.config.js":`vite`,"vitest.config.ts":`vitest`,"eslint.config.js":`eslint`,"eslint.config.mjs":`eslint`,".prettierrc":`prettier`,"tailwind.config.js":`tailwindcss`,"tailwind.config.ts":`tailwindcss`,"readme.md":`readme`,license:`license`,"license.md":`license`,"changelog.md":`changelog`,"contributing.md":`contributing`,"agents.md":`agent`,dockerfile:`docker`,"docker-compose.yml":`docker`,"compose.yaml":`docker`,makefile:`makefile`,".gitignore":`git`,".gitattributes":`git`,".gitmodules":`git`,".editorconfig":`editorconfig`,".env.local":`tune`,".env.example":`tune`,"go.mod":`go-mod`,"go.sum":`go-mod`,"requirements.txt":`python-misc`,"pyproject.toml":`python-misc`,gemfile:`gemfile`},sS={ts:`typescript`,tsx:`react_ts`,mts:`typescript`,cts:`typescript`,"d.ts":`typescript-def`,js:`javascript`,jsx:`react`,mjs:`javascript`,cjs:`javascript`,json:`json`,jsonc:`json`,json5:`json`,md:`markdown`,mdx:`mdx`,txt:`document`,pdf:`pdf`,csv:`table`,html:`html`,htm:`html`,xml:`xml`,vue:`vue`,svelte:`svelte`,astro:`astro`,css:`css`,scss:`sass`,sass:`sass`,less:`less`,png:`image`,jpg:`image`,jpeg:`image`,gif:`image`,webp:`image`,svg:`svg`,ico:`image`,avif:`image`,bmp:`image`,mp4:`video`,mp3:`audio`,woff:`font`,woff2:`font`,ttf:`font`,yml:`yaml`,yaml:`yaml`,toml:`toml`,ini:`settings`,env:`tune`,lock:`lock`,log:`log`,zip:`zip`,sh:`console`,bash:`console`,zsh:`console`,fish:`console`,ps1:`powershell`,bat:`console`,py:`python`,rb:`ruby`,go:`go`,rs:`rust`,java:`java`,kt:`kotlin`,swift:`swift`,c:`c`,h:`h`,cpp:`cpp`,hpp:`hpp`,cs:`csharp`,php:`php`,lua:`lua`,dart:`dart`,ex:`elixir`,exs:`elixir`,zig:`zig`,sql:`database`,graphql:`graphql`,gql:`graphql`,prisma:`prisma`,proto:`proto`,wasm:`webassembly`},cS={toml:`toml_light`,pnpm:`pnpm_light`,bun:`bun_light`},lS={agent:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ff5252" d="M2.636 24H6v-8H2.636a.63.63 0 0 0-.636.625v6.75a.63.63 0 0 0 .636.625M26 16v8h3.364c.351 0 .636-.355.636-.7v-6.675a.63.63 0 0 0-.636-.625zM17.417 6H14.69a.63.63 0 0 0-.636.625V12H8.69a.63.63 0 0 0-.636.625L8 25.375c0 .345.305.625.637.625h14.727a.63.63 0 0 0 .636-.625v-12.75a.63.63 0 0 0-.636-.625h-5.31V6.625A.63.63 0 0 0 17.416 6m-5.363 8c1.781 0 2.674 2.154 1.414 3.414s-3.414.368-3.414-1.414a2 2 0 0 1 2-2M22 24H10v-2h12zm-1.946-10c1.781 0 2.674 2.154 1.414 3.414s-3.414.368-3.414-1.414a2 2 0 0 1 2-2"/></svg>`,astro:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#7c4dff" d="M12.106 25.849c-1.262-1.156-1.63-3.586-1.105-5.346a5.18 5.18 0 0 0 3.484 1.66 9.68 9.68 0 0 0 5.882-.734c.215-.106.413-.247.648-.39a3.5 3.5 0 0 1 .16 1.555 4.26 4.26 0 0 1-1.798 3.021c-.404.3-.832.569-1.25.852a2.613 2.613 0 0 0-1.15 3.372l.048.161a3.4 3.4 0 0 1-1.5-1.285 3.6 3.6 0 0 1-.578-1.962 9 9 0 0 0-.05-1.037c-.114-.831-.504-1.204-1.238-1.225a1.45 1.45 0 0 0-1.507 1.18c-.012.056-.028.112-.046.178M4.901 20a17.75 17.75 0 0 1 7.4-2l2.913-8.38a.765.765 0 0 1 1.527 0L19.7 18a14.24 14.24 0 0 1 7.399 2S20.704 2.877 20.692 2.842C20.51 2.33 20.202 2 19.787 2h-7.619c-.415 0-.71.33-.904.842z"/></svg>`,audio:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ef5350" d="M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2m6 10h-4v8a4 4 0 1 1-4-4 3.96 3.96 0 0 1 2 .555V8h6Z"/></svg>`,bun:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#fff8e1" d="M30 17.045a9.8 9.8 0 0 0-.32-2.306l-.004.034a11.2 11.2 0 0 0-5.762-6.786c-3.495-1.89-5.243-3.326-6.8-3.811h.003c-1.95-.695-3.949.82-5.825 1.927-4.52 2.481-9.573 5.45-9.28 11.417.008-.029.017-.052.026-.08a9.97 9.97 0 0 0 3.934 7.257l-.01-.006C13.747 31.473 30.05 27.292 30 17.045"/><path fill="#37474f" d="M19.855 20.236A.8.8 0 0 0 19.26 20h-6.514a.8.8 0 0 0-.596.236.51.51 0 0 0-.137.463 4.37 4.37 0 0 0 1.641 2.339 4.2 4.2 0 0 0 2.349.926 4.2 4.2 0 0 0 2.343-.926 4.37 4.37 0 0 0 1.642-2.339.5.5 0 0 0-.132-.463Z"/><ellipse cx="22.5" cy="18.5" fill="#f8bbd0" rx="2.5" ry="1.5"/><ellipse cx="9.5" cy="18.5" fill="#f8bbd0" rx="2.5" ry="1.5"/><circle cx="10" cy="16" r="2" fill="#37474f"/><circle cx="22" cy="16" r="2" fill="#37474f"/><path fill="#455a64" d="M9.996 18A2 2 0 1 0 8 15.996V16a2 2 0 0 0 1.996 2"/><circle cx="9" cy="15" r="1" fill="#fafafa"/><circle cx="21" cy="15" r="1" fill="#fafafa"/></svg>`,bun_light:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#fff8e1" d="M15.696 27.002a13.73 13.73 0 0 1-9.071-3.062 8.86 8.86 0 0 1-3.6-6.505c-.252-5.091 3.813-7.747 8.748-10.455.28-.165.537-.322.793-.48a7.8 7.8 0 0 1 3.52-1.5 2 2 0 0 1 .695.118 14.8 14.8 0 0 1 2.95 1.576c.972.6 2.182 1.348 3.707 2.173a10.14 10.14 0 0 1 5.274 6.147A8.8 8.8 0 0 1 29 17.035a8.15 8.15 0 0 1-2.525 5.959 15.6 15.6 0 0 1-10.778 4.008Z"/><path fill="#37474f" d="M16.087 6a1 1 0 0 1 .358.06l.038.013.037.012a14.5 14.5 0 0 1 2.684 1.46 72 72 0 0 0 3.767 2.205 9.17 9.17 0 0 1 4.767 5.493A8 8 0 0 1 28 17.055a7.18 7.18 0 0 1-2.234 5.233 14.6 14.6 0 0 1-10.07 3.714 12.74 12.74 0 0 1-8.415-2.816l-.027-.024-.029-.023a7.98 7.98 0 0 1-3.202-5.758c-.223-4.516 3.431-6.89 8.231-9.525l.027-.015.027-.015q.389-.231.783-.474A7.4 7.4 0 0 1 16.087 6m0-2c-1.618 0-3.248 1.19-4.795 2.103-4.52 2.481-9.56 5.41-9.267 11.376a9.9 9.9 0 0 0 3.942 7.215 14.77 14.77 0 0 0 9.73 3.308c7.122 0 14.335-4.134 14.303-10.957a9.6 9.6 0 0 0-.322-2.29 11.16 11.16 0 0 0-5.764-6.768c-3.495-1.89-5.242-3.326-6.798-3.811A3 3 0 0 0 16.086 4Z"/><path fill="#37474f" d="M19.855 20.236A.8.8 0 0 0 19.26 20h-6.514a.8.8 0 0 0-.596.236.51.51 0 0 0-.137.463 4.37 4.37 0 0 0 1.641 2.339 4.2 4.2 0 0 0 2.349.926 4.2 4.2 0 0 0 2.343-.926 4.37 4.37 0 0 0 1.642-2.339.5.5 0 0 0-.132-.463Z"/><ellipse cx="22.5" cy="18.5" fill="#f8bbd0" rx="2.5" ry="1.5"/><ellipse cx="9.5" cy="18.5" fill="#f8bbd0" rx="2.5" ry="1.5"/><circle cx="10" cy="16" r="2" fill="#37474f"/><circle cx="22" cy="16" r="2" fill="#37474f"/><path fill="#455a64" d="M9.996 18A2 2 0 1 0 8 15.996V16a2 2 0 0 0 1.996 2"/><circle cx="9" cy="15" r="1" fill="#fafafa"/><circle cx="21" cy="15" r="1" fill="#fafafa"/></svg>`,c:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M19.563 22A5.57 5.57 0 0 1 14 16.437v-2.873A5.57 5.57 0 0 1 19.563 8H24V2h-4.437A11.563 11.563 0 0 0 8 13.563v2.873A11.564 11.564 0 0 0 19.563 28H24v-6Z"/></svg>`,changelog:`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path d="M0 0h24v24H0z"/><path fill="#8bc34a" d="M13 3a9 9 0 0 0-9 9H1l4 4 4-4H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42A8.95 8.95 0 0 0 13 21a9 9 0 0 0 0-18m-1 5v5l4.25 2.52.77-1.28-3.52-2.09V8z"/></svg>`,console:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ff7043" d="M2 2a1 1 0 0 0-1 1v10c0 .554.446 1 1 1h12c.554 0 1-.446 1-1V3a1 1 0 0 0-1-1zm0 3h12v8H2zm1 2 2 2-2 2 1 1 3-3-3-3zm5 3.5V12h5v-1.5z"/></svg>`,contributing:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ffca28" d="M17 9H7V7h10m0 6H7v-2h10m-3 6H7v-2h7M12 3a1 1 0 0 1 1 1 1 1 0 0 1-1 1 1 1 0 0 1-1-1 1 1 0 0 1 1-1m7 0h-4.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2"/></svg>`,cpp:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M28 14v-4h-2v4h-6v-4h-2v4h-4v2h4v4h2v-4h6v4h2v-4h4v-2z"/><path fill="#0288d1" d="M13.563 22A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>`,csharp:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M30 14v-2h-2V8h-2v4h-2V8h-2v4h-2v2h2v2h-2v2h2v4h2v-4h2v4h2v-4h2v-2h-2v-2Zm-4 2h-2v-2h2Zm-12.437 6A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>`,css:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#7e57c2" d="M20 18h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 20 22h2v2h2v-2c0-.388-.562-.851-1.254-1.034C20.356 20.34 20 18.84 20 18m-3.254 2.966C14.356 20.34 14 18.84 14 18h-2v-2h-2v8h2v-2h4v2h2v-2c0-.388-.562-.851-1.254-1.034"/><path fill="#7e57c2" d="M24 4H4v20a4 4 0 0 0 4 4h16.16A3.84 3.84 0 0 0 28 24.16V8a4 4 0 0 0-4-4m2 14h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 26 22v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2Z"/></svg>`,dart:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#4fc3f7" d="M16.83 2a1.3 1.3 0 0 0-.916.377l-.013.01L7.323 7.34l8.556 8.55v.005l10.283 10.277 1.96-3.529-7.068-16.96-3.299-3.297A1.3 1.3 0 0 0 16.828 2Z"/><path fill="#01579b" d="m7.343 7.32-4.955 8.565-.01.013a1.297 1.297 0 0 0 .004 1.835l.005.005 4.106 4.107 16.064 6.314 3.632-2.015-.098-.098-.025.002L15.995 15.97h-.012z"/><path fill="#01579b" d="m7.321 7.324 8.753 8.755h.013L26.16 26.156l3.835-.73L30 14.089l-4.049-3.965a6.5 6.5 0 0 0-3.618-1.612l.002-.043L7.323 7.325Z"/><path fill="#64b5f6" d="m7.332 7.335 8.758 8.75v.013l10.079 10.071L25.436 30H14.09l-3.967-4.048a6.5 6.5 0 0 1-1.611-3.618l-.045.004Z"/></svg>`,database:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ffca28" d="M16 24c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-8c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-12C10.477 4 6 4.895 6 6v4c0 1.1 4.475 2 10 2s10-.9 10-2V6c0-1.105-4.477-2-10-2"/></svg>`,docker:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#0288d1" d="M21.81 10.25c-.06-.04-.56-.43-1.64-.43-.28 0-.56.03-.84.08-.21-1.4-1.38-2.11-1.43-2.14l-.29-.17-.18.27c-.24.36-.43.77-.51 1.19-.2.8-.08 1.56.33 2.21-.49.28-1.29.35-1.46.35H2.62c-.34 0-.62.28-.62.63 0 1.15.18 2.3.58 3.38.45 1.19 1.13 2.07 2 2.61.98.6 2.59.94 4.42.94.79 0 1.61-.07 2.42-.22 1.12-.2 2.2-.59 3.19-1.16A8.3 8.3 0 0 0 16.78 16c1.05-1.17 1.67-2.5 2.12-3.65h.19c1.14 0 1.85-.46 2.24-.85.26-.24.45-.53.59-.87l.08-.24zm-17.96.99h1.76c.08 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16H3.85c-.09 0-.16.07-.16.16v1.58c.01.09.07.16.16.16m2.43 0h1.76c.08 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16H6.28c-.09 0-.16.07-.16.16v1.58c.01.09.07.16.16.16m2.47 0h1.75c.1 0 .17-.07.17-.16V9.5c0-.08-.06-.16-.17-.16H8.75c-.08 0-.15.07-.15.16v1.58c0 .09.06.16.15.16m2.44 0h1.77c.08 0 .15-.07.15-.16V9.5c0-.08-.06-.16-.15-.16h-1.77c-.08 0-.15.07-.15.16v1.58c0 .09.07.16.15.16M6.28 9h1.76c.08 0 .16-.09.16-.18V7.25c0-.09-.07-.16-.16-.16H6.28c-.09 0-.16.06-.16.16v1.57c.01.09.07.18.16.18m2.47 0h1.75c.1 0 .17-.09.17-.18V7.25c0-.09-.06-.16-.17-.16H8.75c-.08 0-.15.06-.15.16v1.57c0 .09.06.18.15.18m2.44 0h1.77c.08 0 .15-.09.15-.18V7.25c0-.09-.07-.16-.15-.16h-1.77c-.08 0-.15.06-.15.16v1.57c0 .09.07.18.15.18m0-2.28h1.77c.08 0 .15-.07.15-.16V5c0-.1-.07-.17-.15-.17h-1.77c-.08 0-.15.06-.15.17v1.56c0 .08.07.16.15.16m2.46 4.52h1.76c.09 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16h-1.76c-.08 0-.15.07-.15.16v1.58c0 .09.07.16.15.16"/></svg>`,document:`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path d="M0 0h24v24H0z"/><path fill="#42a5f5" d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"/></svg>`,editorconfig:`<svg xmlns="http://www.w3.org/2000/svg" clip-rule="evenodd" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" viewBox="0 0 3473 3473"><path fill="#ede7f6" d="M989.342 1977.409c41.146-26.835 75.137-93.922 54.564-141.33-56.353 24.151-53.67 79.61-54.564 141.33m636.877 153.851c44.724-14.311 87.66-64.402 63.509-116.283-34.886 24.151-57.248 57.247-63.51 116.284z"/><g fill="#fafafa"><path d="M374.827 2871.899c0 56.352 14.312 117.178 53.67 138.645 144.907 81.4 652.977 17.89 825.614-20.573 90.343-20.573 163.692-87.66 248.668-124.334 191.421-83.187 330.067-150.274 483.025-262.085 110.916-81.399 287.131-310.388 305.915-447.245l-151.169-33.991c-3.578 153.852-38.463 188.737-175.32 224.517-92.132 25.046-271.925 30.413-365.846 14.312-124.334-20.574-180.687-85.871-237.04-160.114-109.128-144.907 24.151-245.985-148.485-255.824-181.582 222.728-501.81 62.614-642.244 40.252-59.93 86.765-200.366 650.294-198.577 779.1 86.766-29.517 141.33 2.684 219.15 33.097 275.503 106.444 34.885 200.366-75.137 172.636-75.137-17.89-98.394-67.086-142.224-98.393m360.48-1285.383c111.81 21.468 211.1 67.982 305.915 115.39 154.747 76.926 182.476 66.192 196.788 173.53 1.789 19.68-1.789 30.413 54.564 48.303 94.816 29.518-54.564-23.257 199.471-22.362 151.169.894 497.337 61.72 609.148 132.384 46.513 29.519 37.568 67.087 194.999 62.615-1.79-185.16-50.986-461.557-123.44-631.51-88.554-205.733-205.733-237.04-444.561-313.966-139.54-44.725-549.217-93.922-676.235-15.207-118.967 74.243-141.33 162.798-252.246 318.439-32.202 45.619-43.83 80.504-64.403 132.384"/><path d="M1720.14 1966.675c89.45 36.674-4.472 273.714-128.806 216.466-40.252-113.6 55.458-178.003 81.398-228.99-53.67-8.05-206.627-32.2-252.246-15.206-59.036 22.363-72.454 148.486-42.041 207.522 143.118 280.87 775.523 220.94 708.436 2.684-26.835-88.555-51.88-102.867-142.224-133.28-72.454-24.15-144.907-49.196-224.517-49.196m-1124.374-31.307c71.56 68.875 233.462 79.61 338.117 84.976 13.418-138.646 25.046-242.407 135.963-234.356 54.564 74.242 25.94 161.902-31.307 218.255 97.5-.894 153.852-74.242 139.54-180.687-82.293-59.036-331.856-177.109-457.084-194.104-34.885 37.569-120.756 243.301-125.229 305.916"/></g><path d="M427.602 2820.913c59.036-5.367 212.889 39.357 225.412 89.449-95.71 11.628-217.361 2.683-225.412-89.45zm-52.775 50.986c43.83 31.307 67.087 80.504 142.224 98.393 110.022 27.73 350.64-66.192 75.137-172.636-77.82-30.413-132.384-62.614-219.15-33.096-1.789-128.807 138.646-692.336 198.577-779.101 140.435 22.362 460.662 182.476 642.244-40.252 172.636 9.84 39.357 110.917 148.485 255.824 56.353 74.243 112.706 139.54 237.04 160.114 93.921 16.1 273.714 10.734 365.846-14.312 136.857-35.78 171.742-70.665 175.32-224.517l151.17 33.99c-18.785 136.858-195 365.847-305.916 447.246-152.958 111.81-291.604 178.898-483.025 262.085-84.976 36.674-158.325 103.761-248.668 124.334-172.637 38.463-680.707 101.972-825.614 20.574-39.358-21.468-53.67-82.294-53.67-138.646M1626.22 2131.26c6.261-59.037 28.623-92.133 63.508-116.284 24.152 51.88-18.784 101.972-63.508 116.284m93.921-164.586c79.61 0 152.063 25.045 224.517 49.197 90.344 30.412 115.39 44.724 142.224 133.279 67.087 218.255-565.318 278.186-708.436-2.684-30.413-59.036-16.995-185.16 42.041-207.522 45.619-16.995 198.577 7.156 252.246 15.207-25.94 50.986-121.65 115.389-81.398 228.99 124.334 57.247 218.255-179.793 128.806-216.467m-730.798 10.734c.894-61.72-1.79-117.179 54.564-141.33 20.573 47.408-13.418 114.495-54.564 141.33m-393.576-42.041c4.473-62.615 90.344-268.347 125.229-305.916 125.228 16.995 374.791 135.068 457.084 194.104 14.312 106.445-42.04 179.793-139.54 180.687 57.247-56.353 85.87-144.013 31.307-218.255-110.917-8.05-122.545 95.71-135.963 234.356-104.655-5.367-266.558-16.1-338.117-84.976m-89.449-71.56c-33.096-91.238-33.096-233.462 107.339-245.09l-71.56 199.471c-18.783 42.936-18.783 33.096-35.779 45.62zm228.99-277.292c20.573-51.88 32.201-86.765 64.403-132.384 110.917-155.641 133.279-244.196 252.246-318.439 127.018-78.715 536.694-29.518 676.235 15.207 238.828 76.926 356.007 108.233 444.561 313.966 72.454 169.953 121.65 446.35 123.44 631.51-157.43 4.472-148.486-33.096-195-62.615-111.81-70.664-457.978-131.49-609.147-132.384-254.035-.895-104.655 51.88-199.471 22.362-56.353-17.89-52.775-28.624-54.564-48.302-14.312-107.34-42.041-96.605-196.788-173.531-94.816-47.408-194.104-93.922-305.915-115.39m1583.247-43.83c-16.995-56.352 14.312-52.775 68.876-91.238 31.307-22.362 56.353-45.619 94.816-67.086 144.013-80.504 412.36-93.922 526.854 1.789 46.514 38.463 122.545 113.6 110.917 211.994-24.151 195.893-158.325 303.232-268.347 392.68-111.811 91.239-297.865 185.16-490.18 122.546-16.101-39.358-3.578-288.92-22.363-381.053-16.995-82.293-8.05-91.238 39.358-140.435 139.54-144.907 441.878-250.457 613.62-126.123 72.454 53.67 51.88 74.243 89.449 115.39 46.513-50.092-40.252-218.256-360.48-207.522-217.36 7.156-311.282 177.109-402.52 169.058m-1302.377-508.964c4.472-124.335 118.967-381.948 233.461-471.397 138.646-107.338 283.554-208.416 496.442-87.66 52.775 29.519 50.092 44.725 55.459 118.073 4.472 70.665-1.79 96.605-19.679 153.852-141.33 456.19-259.402 194.105-712.014 302.338 16.995-148.485 145.802-280.87 217.361-349.746 122.545-118.967 211.1-195.893 395.365-170.847 50.986 84.976 56.352 138.646-5.367 237.934-82.293 132.385-102.867 124.334-90.344 214.678 64.403-16.101 84.082-78.715 113.6-141.33 179.793-375.686-81.398-421.305-241.512-352.429-107.339 45.62-298.76 256.719-361.374 383.736-12.523 25.046-25.94 57.248-37.568 84.977zm708.436 18.784c18.784-111.811 129.7-139.54 129.7-483.92 0-148.485-182.475-281.764-421.304-182.475-204.838 84.082-236.145 148.485-345.273 313.071-102.867 155.642-99.289 326.49-187.843 470.502-25.94 41.147-49.197 55.458-77.82 96.605-20.574 30.413-35.78 68.876-56.354 104.655-42.04 68.876-84.976 118.968-118.967 201.26-107.339 2.684-197.682 4.473-208.416 115.39-14.312 152.063 57.247 189.632 57.247 246.879-.894 61.72-251.351 684.285-181.581 1055.498 19.679 101.972 86.765 102.867 194.104 115.39 258.508 31.307 593.942 20.573 825.614-72.454l420.41-201.26c106.445-59.931 285.343-173.532 364.953-256.72 56.353-58.141 85.87-107.338 134.173-176.214 66.192-96.605 67.981-94.816 82.293-226.306 87.66 16.101 251.352 54.564 305.916 101.972-6.262 61.72-36.674 32.202-36.674 87.66 34.885.895 93.027-42.935 107.339-91.238-36.675-53.67-75.138-44.724-127.913-87.66 42.042-33.096 118.073-48.302 176.215-72.453 125.229-51.88 339.012-209.311 391.787-352.43 42.04-115.389 10.734-307.704-57.248-382.841-71.559-78.715-237.934-118.967-373.897-118.967-161.902 0-329.172 116.283-459.767 166.375-50.092-43.83-53.67-93.922-90.344-142.224-42.04-57.248-315.755-200.366-446.35-228.095"/><path fill="#efebe9" d="M2318.554 1542.686c91.238 8.05 185.16-161.902 402.52-169.058 320.228-10.734 406.993 157.43 360.48 207.521-37.569-41.146-16.995-61.72-89.45-115.389-171.741-124.334-474.079-18.784-613.62 126.123-47.407 49.197-56.352 58.142-39.357 140.435 18.785 92.133 6.262 341.695 22.362 381.053 192.316 62.614 378.37-31.307 490.181-122.545 110.022-89.45 244.196-196.788 268.347-392.681 11.628-98.394-64.403-173.531-110.917-211.994-114.494-95.71-382.841-82.293-526.854-1.79-38.463 21.468-63.51 44.725-94.816 67.087-54.564 38.464-85.871 34.886-68.876 91.238m-1302.377-508.964 43.83-77.821c11.628-27.73 25.045-59.93 37.568-84.977 62.614-127.017 254.035-338.117 361.374-383.736 160.114-68.876 421.305-23.257 241.512 352.43-29.518 62.614-49.197 125.228-113.6 141.329-12.523-90.344 8.05-82.293 90.344-214.678 61.72-99.288 56.353-152.958 5.367-237.934-184.265-25.046-272.82 51.88-395.365 170.847-71.56 68.876-200.366 201.26-217.361 349.746 452.612-108.233 570.685 153.852 712.014-302.338 17.89-57.247 24.151-83.187 19.679-153.852-5.367-73.348-2.684-88.554-55.459-118.073-212.888-120.756-357.796-19.678-496.442 87.66-114.494 89.45-228.989 347.062-233.461 471.397"/><path fill="#eee" d="M506.317 1863.808c16.996-12.523 16.996-2.683 35.78-45.619l71.559-199.47c-140.435 11.627-140.435 153.851-107.339 245.09z"/><path fill="#efebe9" d="M653.014 2910.362c-12.523-50.092-166.376-94.816-225.412-89.45 8.05 92.133 129.701 101.078 225.412 89.45"/></svg>`,elixir:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#9575cd" d="M12.173 22.681c-3.86 0-6.99-3.64-6.99-8.13 0-3.678 2.773-8.172 4.916-10.91 1.014-1.296 2.93-2.322 2.93-2.322s-.982 5.239 1.683 7.319c2.366 1.847 4.106 4.25 4.106 6.363 0 4.232-2.784 7.68-6.645 7.68"/></svg>`,eslint:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#3f51b5" d="M22.713 4H9.287a.5.5 0 0 0-.432.248l-6.708 11.5a.5.5 0 0 0 0 .504l6.708 11.5a.5.5 0 0 0 .432.248h13.426a.5.5 0 0 0 .432-.248l6.708-11.5a.5.5 0 0 0 0-.504l-6.708-11.5A.5.5 0 0 0 22.713 4m-6.937 20.888-7.5-3.75A.5.5 0 0 1 8 20.691v-9.382a.5.5 0 0 1 .276-.447l7.5-3.75a.5.5 0 0 1 .448 0l7.5 3.75a.5.5 0 0 1 .276.447v9.382a.5.5 0 0 1-.276.447l-7.5 3.75a.5.5 0 0 1-.448 0"/><path fill="#7986cb" d="M22 19.441v-6.882a.5.5 0 0 0-.276-.447l-5.5-2.75a.5.5 0 0 0-.448 0l-5.5 2.75a.5.5 0 0 0-.276.447v6.882a.5.5 0 0 0 .276.447l5.5 2.75a.5.5 0 0 0 .448 0l5.5-2.75a.5.5 0 0 0 .276-.447"/></svg>`,file:`<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8.668 6h3.6641l-3.6641-3.668v3.668m-4.668-4.668h5.332l4 4v8c0 0.73828-0.59375 1.3359-1.332 1.3359h-8c-0.73828 0-1.332-0.59766-1.332-1.3359v-10.664c0-0.74219 0.59375-1.3359 1.332-1.3359m3.332 1.3359h-3.332v10.664h8v-6h-4.668z" fill="#90a4ae" /></svg>`,font:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#f44336" d="M24 28h4L18 4h-4L4 28h4l8-19.422"/><path fill="#f44336" d="M8 20h16v4H8z"/></svg>`,gemfile:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#e53935" d="M21.184 10.016V10H10.881l.016.033-.016-.017L8 14l8.032 10L24 14z"/><path fill="#e53935" d="m16 3.455 11 6.286v12.518l-11 6.286-11-6.286V9.741zM16 0 2 8v16l14 8 14-8V8z"/></svg>`,git:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#e64a19" d="M13.172 2.828 11.78 4.22l1.91 1.91 2 2A2.986 2.986 0 0 1 20 10.81a3.25 3.25 0 0 1-.31 1.31l2.06 2a2.68 2.68 0 0 1 3.37.57 2.86 2.86 0 0 1 .88 2.117 3.02 3.02 0 0 1-.856 2.109A2.9 2.9 0 0 1 23 19.81a2.93 2.93 0 0 1-2.13-.87 2.694 2.694 0 0 1-.56-3.38l-2-2.06a3 3 0 0 1-.31.12V20a3 3 0 0 1 1.44 1.09 2.92 2.92 0 0 1 .56 1.72 2.88 2.88 0 0 1-.878 2.128 2.98 2.98 0 0 1-2.048.871 2.981 2.981 0 0 1-2.514-4.719A3 3 0 0 1 16 20v-6.38a2.96 2.96 0 0 1-1.44-1.09 2.9 2.9 0 0 1-.56-1.72 2.9 2.9 0 0 1 .31-1.31l-3.9-3.9-7.579 7.572a4 4 0 0 0-.001 5.658l10.342 10.342a4 4 0 0 0 5.656 0l10.344-10.344a4 4 0 0 0 0-5.656L18.828 2.828a4 4 0 0 0-5.656 0"/></svg>`,go:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#00acc1" d="M2 12h4v2H2zm-2 4h6v2H0zm4 4h2v2H4zm16.954-5H14v3h3.239a4.42 4.42 0 0 1-3.531 2 2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 15.292 13a2.73 2.73 0 0 1 1.749.584l2.962-1.185A5.6 5.6 0 0 0 15.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 6.4 6.4 0 0 0 .003-1.5"/><path fill="#00acc1" d="M26.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 5.614 5.614 0 0 0-5.659-6.5m2.681 6.137A4.515 4.515 0 0 1 24.708 20a2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 26.292 13a2.65 2.65 0 0 1 2.053.858 2.86 2.86 0 0 1 .628 2.28Z"/></svg>`,"go-mod":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ec407a" d="M2 12h4v2H2zm-2 4h6v2H0zm4 4h2v2H4zm16.954-5H14v3h3.239a4.42 4.42 0 0 1-3.531 2 2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 15.292 13a2.73 2.73 0 0 1 1.749.584l2.962-1.185A5.6 5.6 0 0 0 15.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 6.4 6.4 0 0 0 .003-1.5"/><path fill="#ec407a" d="M26.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 5.614 5.614 0 0 0-5.659-6.5m2.681 6.137A4.515 4.515 0 0 1 24.708 20a2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 26.292 13a2.65 2.65 0 0 1 2.053.858 2.86 2.86 0 0 1 .628 2.28Z"/></svg>`,graphql:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ec407a" d="M6 20h20v2H6z"/><circle cx="7" cy="21" r="3" fill="#ec407a"/><circle cx="16" cy="27" r="3" fill="#ec407a"/><circle cx="25" cy="21" r="3" fill="#ec407a"/><path fill="#ec407a" d="M6 10h20v2H6z"/><circle cx="7" cy="11" r="3" fill="#ec407a"/><circle cx="16" cy="5" r="3" fill="#ec407a"/><circle cx="25" cy="11" r="3" fill="#ec407a"/><path fill="#ec407a" d="M6 12h2v10H6zm18-2h2v12h-2z"/><path fill="#ec407a" d="m5.014 19.41 11.674 6.866L15.674 28 4 21.134z"/><path fill="#ec407a" d="M26.688 21.724 15.014 28.59 14 26.866 25.674 20zM5.124 10.382l11.415-7.29 1.077 1.686L6.2 12.068z"/><path fill="#ec407a" d="m25.798 12.067-11.415-7.29 1.077-1.685 11.415 7.29zM6.2 19.932l11.416 7.29-1.077 1.686-11.415-7.29z"/><path fill="#ec407a" d="m26.875 21.619-11.415 7.29-1.077-1.687 11.415-7.289zM5.877 22.6 16.04 3.686l1.762.946L7.638 23.546z"/><path fill="#ec407a" d="M24.361 23.545 14.197 4.633l1.761-.947 10.165 18.913z"/></svg>`,h:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M18.5 11a5.49 5.49 0 0 0-4.5 2.344V4H8v24h6V17a2 2 0 0 1 4 0v11h6V16.5a5.5 5.5 0 0 0-5.5-5.5"/></svg>`,hpp:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M28 6V2h-2v4h-6V2h-2v4h-4v2h4v4h2V8h6v4h2V8h4V6zm-15.5 5A5.49 5.49 0 0 0 8 13.344V4H2v24h6V17a2 2 0 0 1 4 0v11h6V16.5a5.5 5.5 0 0 0-5.5-5.5"/></svg>`,html:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#e65100" d="m4 4 2 22 10 2 10-2 2-22Zm19.72 7H11.28l.29 3h11.86l-.802 9.335L15.99 25l-6.635-1.646L8.93 19h3.02l.19 2 3.86.77 3.84-.77.29-4H8.84L8 8h16Z"/></svg>`,image:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#26a69a" d="M8.5 6h4l-4-4zM3.875 1H9.5l4 4v8.6c0 .773-.616 1.4-1.375 1.4h-8.25c-.76 0-1.375-.627-1.375-1.4V2.4c0-.777.612-1.4 1.375-1.4M4 13.6h8V8l-2.625 2.8L8 9.4zm1.25-7.7c-.76 0-1.375.627-1.375 1.4s.616 1.4 1.375 1.4c.76 0 1.375-.627 1.375-1.4S6.009 5.9 5.25 5.9"/></svg>`,java:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#f44336" d="M4 26h24v2H4zM28 4H7a1 1 0 0 0-1 1v13a4 4 0 0 0 4 4h10a4 4 0 0 0 4-4v-4h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 8h-4V6h4Z"/></svg>`,javascript:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ffca28" d="M2 2v12h12V2zm6 6h1v4a1.003 1.003 0 0 1-1 1H7a1.003 1.003 0 0 1-1-1v-1h1v1h1zm3 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1"/></svg>`,jsconfig:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#757575" d="M15 2H6a2.006 2.006 0 0 0-2 2v22a2.006 2.006 0 0 0 2 2h6v-4H6v-2h6v-2H6v-2h6v-2H6v-2h6v-2h2V4l8 8h2v-1Z" data-mit-no-recolor="true"/><path fill="#ffca28" d="M12 12v18h18V12zm8 12a2.006 2.006 0 0 1-2 2h-2a2.006 2.006 0 0 1-2-2v-2h2v2h2v-8h2zm8-6h-4v2h2a2.006 2.006 0 0 1 2 2v2a2.006 2.006 0 0 1-2 2h-4v-2h4v-2h-2a2.006 2.006 0 0 1-2-2v-2a2.006 2.006 0 0 1 2-2h4z"/></svg>`,json:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="#f9a825" d="M560-160v-80h120q17 0 28.5-11.5T720-280v-80q0-38 22-69t58-44v-14q-36-13-58-44t-22-69v-80q0-17-11.5-28.5T680-720H560v-80h120q50 0 85 35t35 85v80q0 17 11.5 28.5T840-560h40v160h-40q-17 0-28.5 11.5T800-360v80q0 50-35 85t-85 35zm-280 0q-50 0-85-35t-35-85v-80q0-17-11.5-28.5T120-400H80v-160h40q17 0 28.5-11.5T160-600v-80q0-50 35-85t85-35h120v80H280q-17 0-28.5 11.5T240-680v80q0 38-22 69t-58 44v14q36 13 58 44t22 69v80q0 17 11.5 28.5T280-240h120v80z"/></svg>`,kotlin:`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><defs><linearGradient id="file-icon-kotlin-a" x1="1.725" x2="22.185" y1="22.67" y2="1.982" gradientTransform="translate(1.306 1.129)scale(.89324)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#7c4dff"/><stop offset=".5" stop-color="#d500f9"/><stop offset="1" stop-color="#ef5350"/></linearGradient></defs><path fill="url(#file-icon-kotlin-a)" d="M2.975 2.976v18.048h18.05v-.03l-4.478-4.511-4.48-4.515 4.48-4.515 4.443-4.477z"/></svg>`,less:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#0277bd" d="M8 3a2 2 0 0 0-2 2v4a2 2 0 0 1-2 2H3v2h1a2 2 0 0 1 2 2v4a2 2 0 0 0 2 2h2v-2H8v-5a2 2 0 0 0-2-2 2 2 0 0 0 2-2V5h2V3m6 0a2 2 0 0 1 2 2v4a2 2 0 0 0 2 2h1v2h-1a2 2 0 0 0-2 2v4a2 2 0 0 1-2 2h-2v-2h2v-5a2 2 0 0 1 2-2 2 2 0 0 1-2-2V5h-2V3z"/></svg>`,license:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ff5722" d="M8 1a5.5 5.5 0 0 0-4 9.26V15l4-1.5 4 1.5v-4.74A5.49 5.49 0 0 0 8 1m0 1.5a4 4 0 1 1 0 8 4 4 0 0 1 0-8m0 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4"/></svg>`,lock:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ffd54f" d="M25 12h-3V8a6 6 0 0 0-12 0v4H7a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V13a1 1 0 0 0-1-1M14 8a2 2 0 0 1 4 0v4h-4Zm2 17a4 4 0 1 1 4-4 4 4 0 0 1-4 4"/></svg>`,log:`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path d="M0 0h24v24H0z"/><path fill="#afb42b" d="M19 5v9h-5v5H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h10l6-6V5c0-1.1-.9-2-2-2m-7 11H7v-2h5zm5-4H7V8h10z"/></svg>`,lua:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="M30 6a3.86 3.86 0 0 1-1.167 2.833 4.024 4.024 0 0 1-5.666 0A3.86 3.86 0 0 1 22 6a3.86 3.86 0 0 1 1.167-2.833 4.024 4.024 0 0 1 5.666 0A3.86 3.86 0 0 1 30 6m-9.208 5.208A10.6 10.6 0 0 0 13 8a10.6 10.6 0 0 0-7.792 3.208A10.6 10.6 0 0 0 2 19a10.6 10.6 0 0 0 3.208 7.792A10.6 10.6 0 0 0 13 30a10.6 10.6 0 0 0 7.792-3.208A10.6 10.6 0 0 0 24 19a10.6 10.6 0 0 0-3.208-7.792m-1.959 7.625a4.024 4.024 0 0 1-5.666 0 4.024 4.024 0 0 1 0-5.666 4.024 4.024 0 0 1 5.666 0 4.024 4.024 0 0 1 0 5.666"/></svg>`,makefile:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ef5350" d="m29.5 24.02-1.6-.92a4.4 4.4 0 0 0 .09-.9A1.3 1.3 0 0 0 28 22a5.6 5.6 0 0 0-.1-1.1l1.6-.92a.493.493 0 0 0 .18-.68l-1.5-2.6a.45.45 0 0 0-.18-.18V6.01a2.006 2.006 0 0 0-2-2H4a2.006 2.006 0 0 0-2 2V22a2.006 2.006 0 0 0 2 2h10.53l-.03.02a.493.493 0 0 0-.18.68l1.5 2.6a.493.493 0 0 0 .68.18l1.6-.92a5.9 5.9 0 0 0 1.9 1.09v1.85a.495.495 0 0 0 .5.5h3a.495.495 0 0 0 .5-.5v-1.85a5.9 5.9 0 0 0 1.9-1.09l1.6.92a.493.493 0 0 0 .68-.18l1.5-2.6a.493.493 0 0 0-.18-.68M24 22.01a1.99 1.99 0 0 1-.88 1.65l-.18.11a2.04 2.04 0 0 1-1.88 0l-.18-.11a1.99 1.99 0 0 1-.88-1.65V22a2 2 0 0 1 .88-1.66l.18-.11a2.04 2.04 0 0 1 1.88 0l.18.11A2 2 0 0 1 24 22Zm2-4.63-.1.06a5.9 5.9 0 0 0-1.9-1.09V14.5a.495.495 0 0 0-.5-.5h-3a.495.495 0 0 0-.5.5v1.85a5.9 5.9 0 0 0-1.9 1.09l-1.6-.92a.493.493 0 0 0-.68.18l-1.5 2.6a.493.493 0 0 0 .18.68l1.6.92A5.6 5.6 0 0 0 16 22v.01L4 22V10.01h22Z"/></svg>`,markdown:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="m14 10-4 3.5L6 10H4v12h4v-6l2 2 2-2v6h4V10zm12 6v-6h-4v6h-4l6 8 6-8z"/></svg>`,mdx:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ffca28" d="m14 10-4 3.5L6 10H4v12h4v-6l2 2 2-2v6h4V10zm12 6v-6h-4v6h-4l6 8 6-8z"/></svg>`,nodejs:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#8bc34a" d="M16 20.003v2h4a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2h-2v-2h4v-2h-4a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h2v2Z"/><path fill="#8bc34a" d="m16 3.003-12 7v14l4 2h6v-13.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v11.5H8l-2-1.034V11.15l10-5.833 10 5.833v11.703l-10 5.833-1.745-1.022L13 29.253l3 1.75 12-7v-14Z"/></svg>`,npm:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#e53935" d="M4 4v24h24V4Zm20 20h-4V12h-4v12H8V8h16Z"/></svg>`,pdf:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ef5350" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m4.93 10.44c.41.9.93 1.64 1.53 2.15l.41.32c-.87.16-2.07.44-3.34.93l-.11.04.5-1.04c.45-.87.78-1.66 1.01-2.4m6.48 3.81c.18-.18.27-.41.28-.66.03-.2-.02-.39-.12-.55-.29-.47-1.04-.69-2.28-.69l-1.29.07-.87-.58c-.63-.52-1.2-1.43-1.6-2.56l.04-.14c.33-1.33.64-2.94-.02-3.6a.85.85 0 0 0-.61-.24h-.24c-.37 0-.7.39-.79.77-.37 1.33-.15 2.06.22 3.27v.01c-.25.88-.57 1.9-1.08 2.93l-.96 1.8-.89.49c-1.2.75-1.77 1.59-1.88 2.12-.04.19-.02.36.05.54l.03.05.48.31.44.11c.81 0 1.73-.95 2.97-3.07l.18-.07c1.03-.33 2.31-.56 4.03-.75 1.03.51 2.24.74 3 .74.44 0 .74-.11.91-.3m-.41-.71.09.11c-.01.1-.04.11-.09.13h-.04l-.19.02c-.46 0-1.17-.19-1.9-.51.09-.1.13-.1.23-.1 1.4 0 1.8.25 1.9.35M7.83 17c-.65 1.19-1.24 1.85-1.69 2 .05-.38.5-1.04 1.21-1.69zm3.02-6.91c-.23-.9-.24-1.63-.07-2.05l.07-.12.15.05c.17.24.19.56.09 1.1l-.03.16-.16.82z"/></svg>`,php:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#1e88e5" d="M12 18.08c-6.63 0-12-2.72-12-6.08s5.37-6.08 12-6.08S24 8.64 24 12s-5.37 6.08-12 6.08m-5.19-7.95c.54 0 .91.1 1.09.31.18.2.22.56.13 1.03-.1.53-.29.87-.58 1.09q-.42.33-1.29.33h-.87l.53-2.76zm-3.5 5.55h1.44l.34-1.75h1.23c.54 0 .98-.06 1.33-.17.35-.12.67-.31.96-.58.24-.22.43-.46.58-.73.15-.26.26-.56.31-.88.16-.78.05-1.39-.33-1.82-.39-.44-.99-.65-1.82-.65H4.59zm7.25-8.33-1.28 6.58h1.42l.74-3.77h1.14c.36 0 .6.06.71.18s.13.34.07.66l-.57 2.93h1.45l.59-3.07c.13-.62.03-1.07-.27-1.36-.3-.27-.85-.4-1.65-.4h-1.27L12 7.35zM18 10.13c.55 0 .91.1 1.09.31.18.2.22.56.13 1.03-.1.53-.29.87-.57 1.09-.29.22-.72.33-1.3.33h-.85l.5-2.76zm-3.5 5.55h1.44l.34-1.75h1.22c.55 0 1-.06 1.35-.17.35-.12.65-.31.95-.58.24-.22.44-.46.58-.73.15-.26.26-.56.32-.88.15-.78.04-1.39-.34-1.82-.36-.44-.99-.65-1.82-.65h-2.75z"/></svg>`,pnpm:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#e0e0e0" d="M2 22h8v8H2zm10 0h8v8h-8zm10 0h8v8h-8zM12 12h8v8h-8z"/><path fill="#ffb300" d="M2 2h8v8H2zm10 0h8v8h-8zm10 0h8v8h-8zm0 10h8v8h-8z"/></svg>`,pnpm_light:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#757575" d="M2 22h8v8H2zm10 0h8v8h-8zm10 0h8v8h-8zM12 12h8v8h-8z"/><path fill="#ffb300" d="M2 2h8v8H2zm10 0h8v8h-8zm10 0h8v8h-8zm0 10h8v8h-8z"/></svg>`,powershell:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#03a9f4" d="M29.07 6H7.677A1.535 1.535 0 0 0 6.24 7.113l-4.2 17.774A.852.852 0 0 0 2.93 26h21.393a1.535 1.535 0 0 0 1.436-1.113L29.96 7.112A.852.852 0 0 0 29.07 6M8.626 23.797a1.4 1.4 0 0 1-1.814-.31l-.007-.009a1.075 1.075 0 0 1 .315-1.599l9.6-6.061-6.102-5.852-.01-.01a1.068 1.068 0 0 1 .084-1.625l.037-.03a1.38 1.38 0 0 1 1.8.07l7.233 6.957a1.1 1.1 0 0 1 .236.739 1.08 1.08 0 0 1-.412.79c-.074.04-.146.119-10.951 6.935ZM24 22.94A1.135 1.135 0 0 1 22.803 24h-5.634a1.061 1.061 0 1 1 .001-2.112h5.633A1.134 1.134 0 0 1 24 22.938Z"/></svg>`,prettier:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#f44336" d="M2 8h4v1H2zm0 6h4v1H2zm9-10h3v1h-3zM2 2h3v1H2z"/><path fill="#f9a825" d="M9 2h3v1H9zm1 4h4v1h-4zm-5 6h1v1H5zm-3-2h6v1H2z"/><path fill="#26a69a" d="M2 12h3v1H2zm7-4h5v1H9zM2 4h4v1H2zm3-2h4v1H5z"/><path fill="#ba68c8" d="M2 6h3v1H2zm7-2h2v1H9zm-1 6h4v1H8z"/></svg>`,prisma:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#00bfa5" d="m27.777 22.617-.459-.946L18.43 3.26a2.25 2.25 0 0 0-1.914-1.256A2 2 0 0 0 16.379 2a2.23 2.23 0 0 0-1.891 1.042L4.348 19.056a2.2 2.2 0 0 0 .025 2.417l4.957 7.488A2.34 2.34 0 0 0 11.29 30a2.4 2.4 0 0 0 .655-.092l14.387-4.149a2.32 2.32 0 0 0 1.458-1.234 2.21 2.21 0 0 0-.013-1.908m-3.538.604-11.268 3.25 4.075-19.033 7.568 15.671-.376.098Z"/></svg>`,proto:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#00bfa5" d="M16 27 2 19v-5l14 8z"/><path fill="#ffeb3b" d="m30 14-14 8v5l14-8z"/><path fill="#ff5722" d="M16 6 2 14v5l14-8z"/><path fill="#00e676" d="m30 19-14-8V6l14 8z"/><path fill="#03a9f4" d="M16 27 2 19v-5l14 8z"/></svg>`,python:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#0288d1" d="M9.86 2A2.86 2.86 0 0 0 7 4.86v1.68h4.29c.39 0 .71.57.71.96H4.86A2.86 2.86 0 0 0 2 10.36v3.781a2.86 2.86 0 0 0 2.86 2.86h1.18v-2.68a2.85 2.85 0 0 1 2.85-2.86h5.25c1.58 0 2.86-1.271 2.86-2.851V4.86A2.86 2.86 0 0 0 14.14 2zm-.72 1.61c.4 0 .72.12.72.71s-.32.891-.72.891c-.39 0-.71-.3-.71-.89s.32-.711.71-.711"/><path fill="#fdd835" d="M17.959 7v2.68a2.85 2.85 0 0 1-2.85 2.859H9.86A2.85 2.85 0 0 0 7 15.389v3.75a2.86 2.86 0 0 0 2.86 2.86h4.28A2.86 2.86 0 0 0 17 19.14v-1.68h-4.291c-.39 0-.709-.57-.709-.96h7.14A2.86 2.86 0 0 0 22 13.64V9.86A2.86 2.86 0 0 0 19.14 7zM8.32 11.513l-.004.004.038-.004zm6.54 7.276c.39 0 .71.3.71.89a.71.71 0 0 1-.71.71c-.4 0-.72-.12-.72-.71s.32-.89.72-.89"/></svg>`,"python-misc":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#757575" d="M15 2H6a2.006 2.006 0 0 0-2 2v22a2.006 2.006 0 0 0 2 2h16a2 2 0 0 0 2-2V11Zm3 22H6v-2h12Zm0-4H6v-2h12Zm0-4H6v-2h12Zm-4-4V4l8 8Z"/><path fill="#fbc02d" d="M30.714 16H28v5h-9v7.714A1.286 1.286 0 0 0 20.286 30h6.428A1.286 1.286 0 0 0 28 28.714V26h-6v-1h8.714A1.286 1.286 0 0 0 32 23.714v-6.428A1.286 1.286 0 0 0 30.714 16M24 28h3v1h-3Z" style="isolation:isolate"/><path fill="#0288d1" d="M25.714 12h-6.428A1.286 1.286 0 0 0 18 13.286V16h6v1h-8.714A1.286 1.286 0 0 0 14 18.286v6.428A1.286 1.286 0 0 0 15.286 26H18v-6h9v-6.714A1.286 1.286 0 0 0 25.714 12M22 14h-3v-1h3Z" style="isolation:isolate"/></svg>`,react:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#00bcd4" d="M16 12c7.444 0 12 2.59 12 4s-4.556 4-12 4-12-2.59-12-4 4.556-4 12-4m0-2c-7.732 0-14 2.686-14 6s6.268 6 14 6 14-2.686 14-6-6.268-6-14-6"/><path fill="#00bcd4" d="M16 14a2 2 0 1 0 2 2 2 2 0 0 0-2-2"/><path fill="#00bcd4" d="M10.458 5.507c2.017 0 5.937 3.177 9.006 8.493 3.722 6.447 3.757 11.687 2.536 12.392a.9.9 0 0 1-.457.1c-2.017 0-5.938-3.176-9.007-8.492C8.814 11.553 8.779 6.313 10 5.608a.9.9 0 0 1 .458-.1m-.001-2A2.87 2.87 0 0 0 9 3.875C6.13 5.532 6.938 12.304 10.804 19c3.284 5.69 7.72 9.493 10.74 9.493A2.87 2.87 0 0 0 23 28.124c2.87-1.656 2.062-8.428-1.804-15.124-3.284-5.69-7.72-9.493-10.74-9.493Z"/><path fill="#00bcd4" d="M21.543 5.507a.9.9 0 0 1 .457.1c1.221.706 1.186 5.946-2.536 12.393-3.07 5.316-6.99 8.493-9.007 8.493a.9.9 0 0 1-.457-.1C8.779 25.686 8.814 20.446 12.536 14c3.07-5.316 6.99-8.493 9.007-8.493m0-2c-3.02 0-7.455 3.804-10.74 9.493C6.939 19.696 6.13 26.468 9 28.124a2.87 2.87 0 0 0 1.457.369c3.02 0 7.455-3.804 10.74-9.493C25.061 12.304 25.87 5.532 23 3.876a2.87 2.87 0 0 0-1.457-.369"/></svg>`,react_ts:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M16 12c7.444 0 12 2.59 12 4s-4.556 4-12 4-12-2.59-12-4 4.556-4 12-4m0-2c-7.732 0-14 2.686-14 6s6.268 6 14 6 14-2.686 14-6-6.268-6-14-6"/><path fill="#0288d1" d="M16 14a2 2 0 1 0 2 2 2 2 0 0 0-2-2"/><path fill="#0288d1" d="M10.458 5.507c2.017 0 5.937 3.177 9.006 8.493 3.722 6.447 3.757 11.687 2.536 12.392a.9.9 0 0 1-.457.1c-2.017 0-5.938-3.176-9.007-8.492C8.814 11.553 8.779 6.313 10 5.608a.9.9 0 0 1 .458-.1m-.001-2A2.87 2.87 0 0 0 9 3.875C6.13 5.532 6.938 12.304 10.804 19c3.284 5.69 7.72 9.493 10.74 9.493A2.87 2.87 0 0 0 23 28.124c2.87-1.656 2.062-8.428-1.804-15.124-3.284-5.69-7.72-9.493-10.74-9.493Z"/><path fill="#0288d1" d="M21.543 5.507a.9.9 0 0 1 .457.1c1.221.706 1.186 5.946-2.536 12.393-3.07 5.316-6.99 8.493-9.007 8.493a.9.9 0 0 1-.457-.1C8.779 25.686 8.814 20.446 12.536 14c3.07-5.316 6.99-8.493 9.007-8.493m0-2c-3.02 0-7.455 3.804-10.74 9.493C6.939 19.696 6.13 26.468 9 28.124a2.87 2.87 0 0 0 1.457.369c3.02 0 7.455-3.804 10.74-9.493C25.061 12.304 25.87 5.532 23 3.876a2.87 2.87 0 0 0-1.457-.369"/></svg>`,readme:`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path d="M0 0h24v24H0z"/><path fill="#42a5f5" d="M8 1C4.136 1 1 4.136 1 8s3.136 7 7 7 7-3.136 7-7-3.136-7-7-7m1 11H7V7.5h2zm0-6H7V4h2z"/></svg>`,ruby:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#f44336" d="M18.041 3.177c2.24.382 2.879 1.919 2.843 3.527V6.67l-1.013 13.266-13.132.897h.008c-1.093-.044-3.518-.151-3.634-3.545l1.217-2.222 2.462 5.74 2.097-6.77-.045.009.018-.018 6.85 2.186L13.945 9.3l6.53-.409-5.144-4.212 2.71-1.51v.009M3.113 17.252v.017zM6.916 6.874c2.63-2.622 6.033-4.168 7.34-2.844 1.297 1.306-.072 4.523-2.702 7.135-2.666 2.613-6.015 4.248-7.322 2.933-1.306-1.324.036-4.612 2.675-7.224z"/></svg>`,rust:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ff7043" d="m30 12-4-2V6h-4l-2-4-4 2-4-2-2 4H6v4l-4 2 2 4-2 4 4 2v4h4l2 4 4-2 4 2 2-4h4v-4l4-2-2-4ZM6 16a9.9 9.9 0 0 1 .842-4H10v8H6.842A9.9 9.9 0 0 1 6 16m10 10a9.98 9.98 0 0 1-7.978-4H16v-2h-2v-2h4c.819.819.297 2.308 1.179 3.37a1.89 1.89 0 0 0 1.46.63h3.34A9.98 9.98 0 0 1 16 26m-2-12v-2h4a1 1 0 0 1 0 2Zm11.158 6H24a2.006 2.006 0 0 1-2-2 2 2 0 0 0-2-2 3 3 0 0 0 3-3q0-.08-.004-.161A3.115 3.115 0 0 0 19.83 10H8.022a9.986 9.986 0 0 1 17.136 10"/></svg>`,sass:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ec407a" d="M27.837 5.673a4.33 4.33 0 0 0-2.293-2.701c-2.362-1.261-6.11-1.298-9.548-.092a26.3 26.3 0 0 0-8.76 4.966c-2.752 2.542-3.438 4.925-3.189 6.194.523 2.668 3.274 4.539 5.485 6.042.418.284.822.559 1.175.816-1.429.76-4.261 2.444-5.088 4.248a3.88 3.88 0 0 0-.118 3.332A2.37 2.37 0 0 0 6.869 29.8a5.6 5.6 0 0 0 1.49.2 6.35 6.35 0 0 0 5.19-2.856 6.74 6.74 0 0 0 .864-5.382 7.3 7.3 0 0 1 2.044-.03 3.92 3.92 0 0 1 2.816 1.311 1.82 1.82 0 0 1 .423 1.262 1.55 1.55 0 0 1-.772 1.05c-.234.14-.586.355-.504.803.036.194.198.633.894.512a2.93 2.93 0 0 0 2.145-2.651 4 4 0 0 0-1.197-2.904 5.94 5.94 0 0 0-4.396-1.626 10.6 10.6 0 0 0-2.672.304 20 20 0 0 0-2.203-1.846c-1.712-1.3-3.33-2.529-3.235-4.26.125-2.263 2.468-4.532 6.964-6.744 4.016-1.976 7.254-2.037 8.944-1.438a2 2 0 0 1 1.204.883 2.77 2.77 0 0 1-.36 2.47 9.71 9.71 0 0 1-7.425 4.304 3.86 3.86 0 0 1-3.238-.757c-.278-.302-.593-.645-1.074-.383q-.565.31-.225 1.189a3.9 3.9 0 0 0 2.407 1.92 11.7 11.7 0 0 0 7.128-.671c3.527-1.35 6.681-5.202 5.756-8.787M11.895 24.475a4 4 0 0 1-.192.468 4.5 4.5 0 0 1-.753 1.081 2.83 2.83 0 0 1-2.533 1.107c-.056-.032-.078-.146-.085-.193a3.28 3.28 0 0 1 1.076-2.284 11.3 11.3 0 0 1 2.644-1.933 3.85 3.85 0 0 1-.157 1.754"/></svg>`,settings:`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path d="M0 0h24v24H0z"/><path fill="#42a5f5" d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46a.5.5 0 0 0-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.49.49 0 0 0 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1a.6.6 0 0 0-.18-.03c-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46a.5.5 0 0 0 .61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1q.09.03.18.03c.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64zm-1.98-1.71c.04.31.05.52.05.73s-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"/></svg>`,svelte:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300"><path fill="#ff5722" d="M175.94 24.328c-13.037.252-26.009 3.872-37.471 11.174L79.912 72.818a67.13 67.13 0 0 0-30.355 44.906 70.8 70.8 0 0 0 6.959 45.445 67.2 67.2 0 0 0-10.035 25.102 71.54 71.54 0 0 0 12.236 54.156c23.351 33.41 69.468 43.311 102.81 22.07l58.559-37.158a67.36 67.36 0 0 0 30.355-44.906 70.77 70.77 0 0 0-6.982-45.422 67.65 67.65 0 0 0 10.059-25.102 71.63 71.63 0 0 0-12.236-54.156v-.18c-15.324-21.925-40.453-33.727-65.342-33.246zm5.137 28.68a46.5 46.5 0 0 1 36.09 19.969 42.98 42.98 0 0 1 7.365 32.557 45 45 0 0 1-1.393 5.455l-1.123 3.37-2.986-2.247a75.9 75.9 0 0 0-22.902-11.45l-2.244-.651.201-2.246a13.16 13.16 0 0 0-2.379-8.711 13.99 13.99 0 0 0-14.953-5.412 12.8 12.8 0 0 0-3.594 1.572l-58.578 37.25a12.24 12.24 0 0 0-5.502 8.15 13.1 13.1 0 0 0 2.246 9.834 14.03 14.03 0 0 0 14.93 5.569 13.5 13.5 0 0 0 3.594-1.573l22.453-14.234a41.8 41.8 0 0 1 11.898-5.232 46.48 46.48 0 0 1 49.914 18.502 43.02 43.02 0 0 1 7.363 32.557 40.42 40.42 0 0 1-18.254 27.078l-58.58 37.316a43 43 0 0 1-11.898 5.23A46.545 46.545 0 0 1 82.81 227.14a42.98 42.98 0 0 1-7.341-32.557 38 38 0 0 1 1.39-5.41l1.102-3.37 3.008 2.246a75.9 75.9 0 0 0 22.836 11.361l2.244.65-.201 2.247a13.25 13.25 0 0 0 2.447 8.644 14.03 14.03 0 0 0 15.043 5.569 13.1 13.1 0 0 0 3.592-1.573l58.467-37.316a12.17 12.17 0 0 0 5.502-8.173 12.96 12.96 0 0 0-2.246-9.811 14.03 14.03 0 0 0-15.043-5.568 12.8 12.8 0 0 0-3.592 1.57l-22.453 14.258a42.9 42.9 0 0 1-11.877 5.209 46.52 46.52 0 0 1-49.846-18.5 43.02 43.02 0 0 1-7.297-32.557A40.42 40.42 0 0 1 96.798 96.98l58.646-37.316a42.8 42.8 0 0 1 11.811-5.21 46.5 46.5 0 0 1 13.822-1.444z"/></svg>`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ffb300" d="M29.168 14.03a2.7 2.7 0 0 0-1.968-.83 2.51 2.51 0 0 0-1.929.8h-4.443l3.078-3.078a2.835 2.835 0 0 0 2.857-2.842 2.6 2.6 0 0 0-.831-1.969 2.82 2.82 0 0 0-2.014-.788 2.67 2.67 0 0 0-1.968.788 2.36 2.36 0 0 0-.812 1.922L18 11.17V6.726a2.51 2.51 0 0 0 .8-1.929 2.7 2.7 0 0 0-.832-1.968 2.745 2.745 0 0 0-3.936 0 2.7 2.7 0 0 0-.832 1.968 2.51 2.51 0 0 0 .8 1.93v4.443l-3.138-3.138a2.36 2.36 0 0 0-.812-1.922 2.66 2.66 0 0 0-1.968-.788 2.83 2.83 0 0 0-2.014.788 2.6 2.6 0 0 0-.831 1.969 2.74 2.74 0 0 0 .831 2.013 2.8 2.8 0 0 0 2.026.829l3.078 3.078H6.729a2.51 2.51 0 0 0-1.929-.8 2.7 2.7 0 0 0-1.968.831 2.745 2.745 0 0 0 0 3.937 2.7 2.7 0 0 0 1.968.832 2.51 2.51 0 0 0 1.929-.8h4.443l-3.078 3.077a2.835 2.835 0 0 0-2.857 2.842 2.6 2.6 0 0 0 .831 1.969 2.82 2.82 0 0 0 2.014.788 2.67 2.67 0 0 0 1.968-.788 2.36 2.36 0 0 0 .812-1.922L14 20.827v4.444a2.51 2.51 0 0 0-.8 1.929 2.784 2.784 0 0 0 4.768 1.968A2.7 2.7 0 0 0 18.8 27.2a2.51 2.51 0 0 0-.8-1.929v-4.444l3.138 3.138a2.36 2.36 0 0 0 .812 1.922 2.66 2.66 0 0 0 1.968.788 2.83 2.83 0 0 0 2.014-.788 2.6 2.6 0 0 0 .831-1.969 2.74 2.74 0 0 0-.831-2.013 2.8 2.8 0 0 0-2.026-.829L20.828 18h4.443a2.51 2.51 0 0 0 1.93.8 2.784 2.784 0 0 0 1.967-4.769Z"/></svg>`,swift:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ff6e40" d="M17.087 19.721c-2.36 1.36-5.59 1.5-8.86.1a13.8 13.8 0 0 1-6.23-5.32c.67.55 1.46 1 2.3 1.4 3.37 1.57 6.73 1.46 9.1 0-3.37-2.59-6.24-5.96-8.37-8.71-.45-.45-.78-1.01-1.12-1.51 8.28 6.05 7.92 7.59 2.41-1.01 4.89 4.94 9.43 7.74 9.43 7.74.16.09.25.16.36.22.1-.25.19-.51.26-.78.79-2.85-.11-6.12-2.08-8.81 4.55 2.75 7.25 7.91 6.12 12.24-.03.11-.06.22-.05.39 2.24 2.83 1.64 5.78 1.35 5.22-1.21-2.39-3.48-1.65-4.62-1.17"/></svg>`,table:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#8bc34a" d="M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m7 1.5V9h5.5zm4 7.5h-4v2h1l-2 1.67L10 13h1v-2H7v2h1l3 2.5L8 18H7v2h4v-2h-1l2-1.67L14 18h-1v2h4v-2h-1l-3-2.5 3-2.5h1z"/></svg>`,tailwindcss:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#4db6ac" d="M23.5 12H8c.89-2.3 4.02-4 7.75-4s6.86 1.7 7.75 4M14 12h15.5c-.89 2.3-4.02 4-7.75 4s-6.86-1.7-7.75-4m3.5 8H2c.89-2.3 4.02-4 7.75-4s6.86 1.7 7.75 4M8 20h15.5c-.89 2.3-4.02 4-7.75 4S8.89 22.3 8 20"/></svg>`,toml:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#cfd8dc" d="M4 6V4h8v2H9v7H7V6z"/><path fill="#ef5350" d="M4 1v1H2v12h2v1H1V1zm8 0v1h2v12h-2v1h3V1z"/></svg>`,toml_light:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#455a64" d="M4 6V4h8v2H9v7H7V6z"/><path fill="#ef5350" d="M4 1v1H2v12h2v1H1V1zm8 0v1h2v12h-2v1h3V1z"/></svg>`,tsconfig:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#757575" d="M15 2H6a2.006 2.006 0 0 0-2 2v22a2.006 2.006 0 0 0 2 2h6v-4H6v-2h6v-2H6v-2h6v-2H6v-2h6v-2h2V4l8 8h2v-1Z" data-mit-no-recolor="true"/><path fill="#0288d1" d="M12 12v18h18V12Zm8 6h-2v8h-2v-8h-2v-2h6Zm8 0h-4v2h2a2.006 2.006 0 0 1 2 2v2a2.006 2.006 0 0 1-2 2h-4v-2h4v-2h-2a2.006 2.006 0 0 1-2-2v-2a2.006 2.006 0 0 1 2-2h4Z"/></svg>`,tune:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#fbc02d" d="M12 10h10v2H12z"/><path fill="#fbc02d" d="M16 4h2v8h-2zm4 18h10v2H20zm4 2h2v4h-2zm0-20h2v14h-2zM2 18h10v2H2z"/><path fill="#fbc02d" d="M6 18h2v10H6zM6 4h2v10H6zm10 12h2v12h-2z"/></svg>`,typescript:`<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 16 16"><path fill="#0288d1" d="M2 2v12h12V2zm4 6h3v1H8v4H7V9H6zm5 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1"/></svg>`,"typescript-def":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g fill="#0288d1"><path d="M2 2v12h12V2zm1 1h10v10H3z"/><path d="M5 7v1h1v4h1V8h1V7zm5 0a1.003 1.003 0 0 0-1 1v1a1.003 1.003 0 0 0 1 1h1v1H9v1h2a1.003 1.003 0 0 0 1-1v-1a1.003 1.003 0 0 0-1-1h-1V8h2V7z"/></g></svg>`,video:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ff9800" d="m24 6 2 6h-4l-2-6h-3l2 6h-4l-2-6h-3l2 6H8L6 6H5a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h22a3 3 0 0 0 3-3V6Z"/></svg>`,vite:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#a0f" d="M29.313 12h-6.664a1.427 1.427 0 0 1-1.1-2.24l4.398-6.676A.703.703 0 0 0 25.397 2H8.428a.62.62 0 0 0-.55.289l-5.77 8.627A.703.703 0 0 0 2.658 12h8.175a1.427 1.427 0 0 1 1.099 2.24l-4.48 6.676A.702.702 0 0 0 8 22l6.695.002A1.34 1.34 0 0 1 16 23.375v5.934a.652.652 0 0 0 1.168.433l12.694-16.586a.725.725 0 0 0-.55-1.156"/></svg>`,vitest:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#00e676" d="M15.438 29.636a.685.685 0 0 1-1.029.213L2.274 20.755A.65.65 0 0 1 2 20.187V9.175a.715.715 0 0 1 1.166-.568l7.404 5.612a1.47 1.47 0 0 0 2.125-.497l6.102-11.367A.72.72 0 0 1 19.414 2h9.872a.76.76 0 0 1 .617 1.137l-14.465 26.57Z"/></svg>`,vue:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#41b883" d="M1.791 3.851 12 21.471 22.209 3.936V3.85H18.24l-6.18 10.616L5.906 3.851z"/><path fill="#35495e" d="m5.907 3.851 6.152 10.617L18.24 3.851h-3.723L12.084 8.03 9.66 3.85z"/></svg>`,webassembly:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#7c4dff" d="M22 18h4v4h-4z"/><path fill="#7c4dff" d="M20 2a4 4 0 0 1-8 0H2v28h28V2Zm-2 24h-2v2h-4v-2h-2v2H6v-2H4V16h2v10h4V16h2v10h4V16h2Zm10 2h-2v-4h-4v4h-2V18h2v-2h4v2h2Z"/></svg>`,xml:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#8bc34a" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m.12 13.5 3.74 3.74 1.42-1.41-2.33-2.33 2.33-2.33-1.42-1.41zm11.16 0-3.74-3.74-1.42 1.41 2.33 2.33-2.33 2.33 1.42 1.41z"/></svg>`,yaml:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ff5252" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12c0 1.1-.9 2-2 2H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2m12 16v-2H9v2zm-4-4v-2H6v2z"/></svg>`,yarn:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M27.575 23.967a9.9 9.9 0 0 0-3.751 1.726 22.6 22.6 0 0 1-5.537 2.504 1.55 1.55 0 0 1-.931.52 59 59 0 0 1-6.11.548c-1.102.008-1.777-.282-1.965-.735a1.49 1.49 0 0 1 .82-1.965 3.6 3.6 0 0 1-.486-.359c-.163-.162-.334-.487-.385-.367-.213.52-.324 1.794-.897 2.366-.786.795-2.273.53-3.153.069-.965-.513.069-1.718.069-1.718a.69.69 0 0 1-.94-.324 4.6 4.6 0 0 1-.632-2.794 5.2 5.2 0 0 1 1.674-2.76 8.84 8.84 0 0 1 .624-4.17 9.9 9.9 0 0 1 3-3.469S7.136 11.015 7.82 9.177c.444-1.196.623-1.187.769-1.239a3.44 3.44 0 0 0 1.375-.811 4.99 4.99 0 0 1 4.178-1.607s1.094-3.357 2.12-2.7a17.4 17.4 0 0 1 1.452 2.735s1.213-.71 1.35-.445a10.74 10.74 0 0 1 .495 5.81 13.3 13.3 0 0 1-2.46 5.127c-.129.214 1.47.889 2.477 3.683.932 2.554.103 4.699.248 4.938.026.043.034.06.034.06s1.068.085 3.213-1.24a8.05 8.05 0 0 1 4.05-1.52 1.026 1.026 0 0 1 .453 2Z"/></svg>`,zig:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#f9a825" d="M2 8h6v4H2zm8 0h12v4H10zm0 12h12v4H10zm14 0h2v4h-2zM8 20l-3 4H2V12h4v8zm14-8h-6l-6 8h6z"/><path fill="#f9a825" d="M16 20h-6l-6 8m12-16h6l6-8m2 4v16h-4V12h-2l3-4z"/></svg>`,zip:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#afb42b" d="M14 17h-2v-2h-2v-2h2v2h2m0-6h-2v2h2v2h-2v-2h-2V9h2V7h-2V5h2v2h2m5-4H5c-1.11 0-2 .89-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2"/></svg>`};function uS(e){let t=e.slice(e.lastIndexOf(`/`)+1).toLowerCase(),n=oS[t];if(n)return n;for(let e=t.indexOf(`.`,1);e!==-1;e=t.indexOf(`.`,e+1)){let n=sS[t.slice(e+1)];if(n)return n}return aS}var dS=({icon:e,className:t})=>(0,J.jsx)(`span`,{"aria-hidden":!0,className:q(`inline-flex size-4 shrink-0 [&>svg]:size-full`,t),dangerouslySetInnerHTML:{__html:lS[e]}});function fS({path:e,className:t}){let n=uS(e),r=cS[n];return r?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(dS,{icon:r,className:q(t,`dark:hidden`)}),(0,J.jsx)(dS,{icon:n,className:q(t,`hidden dark:inline-flex`)})]}):(0,J.jsx)(dS,{icon:n,className:t})}function pS({icon:e,label:t,busyLabel:n=`Starting…`,ariaLabel:r,menuAriaLabel:i,tooltip:a,tooltipClassName:o,prompt:s,configureDescription:c,onStart:l,onConfigure:u,busy:d=!1,starting:f=!1,disabled:p=!1,variant:m=`outline`,size:h=`xs`,className:g}){let _=()=>{j_(s),u()};return(0,J.jsxs)(`div`,{className:`inline-flex shrink-0 items-center`,children:[(0,J.jsxs)(Il,{children:[(0,J.jsxs)(Ll,{render:(0,J.jsx)(ze,{type:`button`,variant:m,size:h,disabled:p||d,onClick:l,...r?{"aria-label":r}:{},className:q(`rounded-r-none`,m===`outline`&&`border-r-0`,g)}),children:[f?(0,J.jsx)(Cu,{className:`h-3.5 w-3.5 animate-spin`,"aria-hidden":!0}):e,t!==void 0&&(f?n:t)]}),(0,J.jsx)(Rl,{...o?{className:o}:{},children:a})]}),(0,J.jsxs)(ng,{children:[(0,J.jsx)(og,{type:`button`,disabled:p,"aria-label":i,className:q(Re({variant:m,size:h}),`w-auto rounded-l-none px-1.5`,m==="default"&&`border-l border-[var(--color-primary-foreground)]/25`,g),children:(0,J.jsx)(vu,{className:`h-3 w-3`,"aria-hidden":!0})}),(0,J.jsx)(sg,{align:`end`,className:`max-w-[20rem]`,children:(0,J.jsx)(cg,{onClick:_,className:`items-start`,children:(0,J.jsx)(d_,{label:`Configure first, then run`,description:c})})})]})]})}var mS=50,hS={pages:[],cards:[],linkActions:[],panels:[],runSlots:[],settings:[],everyPage:[],loaded:!1},gS=new Map,_S=new Map;function vS(e){let t=gS.get(e);return t||(t=Sv(()=>import(e).then(t=>{let n=t.default;if(!(!n||typeof n!=`object`)){if(n.stylesheet){let t=document.createElement(`link`);t.rel=`stylesheet`,t.href=new URL(n.stylesheet,new URL(e,window.location.href)).href,document.head.appendChild(t)}return n}},t=>{console.warn(`[openagent] the module at ${e} did not load:`,t)}),[]),gS.set(e,t),t.then(t=>void _S.set(e,t))),t}var yS=[];function bS(e,t){return(e.order??mS)-(t.order??mS)||e.package.localeCompare(t.package)}function xS(e=0){let{value:t,loaded:n}=bd(Cy,yS,3e4,[e],{remember:`modules`,stored:!0}),[r,i]=(0,Y.useState)(hS);return(0,Y.useEffect)(()=>{if(!n)return;if(t.every(e=>_S.has(e.url))){i(SS(t.map(e=>({module:e,definition:_S.get(e.url)})),!0));return}let e=!0,r=new Map;for(let n of t)vS(n.url).then(a=>{if(!e)return;r.set(n,a);let o=t.filter(e=>r.has(e)).map(e=>({module:e,definition:r.get(e)}));i(SS(o,o.length===t.length))});return()=>{e=!1}},[t,n]),r}function SS(e,t){let n=[],r=[],i=[],a=[],o=[],s=[],c=[],l,u;for(let{module:t,definition:d}of e){for(let e of d?.pages??[])!w_(e.segment)||n.some(t=>t.segment===e.segment)||n.push({...e,package:t.package,projects:t.projects});for(let e of d?.cards??[])r.push({...e,package:t.package,projects:t.projects,computer:t.computer===!0});for(let e of d?.linkActions??[])i.push({...e,package:t.package,projects:t.projects});for(let e of d?.panels??[])a.push({...e,package:t.package,projects:t.projects});for(let e of d?.settings??[])s.push({...e,package:t.package,projects:t.projects,computer:t.computer===!0});d?.everyPage&&t.computer===!0&&c.push({EveryPage:d.everyPage,package:t.package}),d?.usageLimit&&(l??={...d.usageLimit,package:t.package,projects:t.projects}),d?.schedule&&(u??={...d.schedule,package:t.package,projects:t.projects});let e=d?.run;e?.summary&&o.push({...e,package:t.package,projects:t.projects})}return r.sort(bS),s.sort(bS),{pages:n,cards:r,linkActions:i,panels:a,runSlots:o,settings:s,everyPage:c,...l?{usageLimit:l}:{},...u?{schedule:u}:{},loaded:t}}var CS=(0,Y.createContext)(hS);function wS(){return(0,Y.useContext)(CS)}function TS({projects:e,targets:t,resetKey:n,label:r,tooltip:i,disabled:a=!1,size:o=`sm`,variant:s=`outline`}){let{linkActions:c}=wS(),l=(0,Y.useContext)(P_),u=c.filter(t=>e.some(e=>t.projects.includes(e))),[d,f]=(0,Y.useState)(null),[p,m]=(0,Y.useState)(new Set),[h,g]=(0,Y.useState)(null);(0,Y.useEffect)(()=>{m(new Set),g(null)},[n??e.join(`
13
- `)]);let _=e=>`${e.package}\n${e.label}`,v=async e=>{if(d!==null)return;f(_(e)),g(null);let n={ok:!0};try{let r=typeof t==`function`?await t():t,i=AC({...l??N_,package:e.package},{acts:!0});for(let{projectId:t,links:a}of r)if(!(!e.projects.includes(t)||a.length===0)&&(n=await e.run(i,t,a),!n.ok))break}catch(e){n={ok:!1,error:e instanceof Error?e.message:String(e)}}f(null),n.ok?m(t=>new Set(t).add(_(e))):g(n.error)};return u.length===0?null:(0,J.jsxs)(J.Fragment,{children:[u.map(e=>{let t=e.icon,n=p.has(_(e)),c=n?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(_u,{className:`h-3.5 w-3.5`,"aria-hidden":!0}),` `,(0,J.jsx)(`span`,{className:`max-md:min-w-0 max-md:truncate`,children:e.doneLabel??e.label})]}):(0,J.jsxs)(J.Fragment,{children:[t&&(0,J.jsx)(t,{className:`h-3.5 w-3.5`,"aria-hidden":!0}),(0,J.jsx)(`span`,{className:`max-md:min-w-0 max-md:truncate`,children:r?r(e):e.label})]}),l={variant:s,size:o,className:`gap-1.5 md:shrink-0 max-md:min-w-0`,disabled:a||d!==null||n,onClick:()=>void v(e)};return i?(0,J.jsxs)(Il,{children:[(0,J.jsx)(Ll,{render:(0,J.jsx)(ze,{...l}),children:c}),(0,J.jsx)(Rl,{children:i})]},_(e)):(0,J.jsx)(ze,{...l,children:c},_(e))}),h&&(0,J.jsx)(`p`,{role:`alert`,className:`basis-full text-xs text-danger`,children:h})]})}function ES({description:e,action:t,children:n}){return(0,J.jsxs)(`div`,{className:`space-y-4`,children:[(e!==void 0||t!==void 0)&&(0,J.jsxs)(`div`,{className:`flex items-start justify-between gap-3 max-sm:flex-col`,children:[e!==void 0&&(0,J.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e}),t!==void 0&&(0,J.jsx)(`div`,{className:`ml-auto shrink-0 max-sm:ml-0`,children:t})]}),(0,J.jsx)(`div`,{className:`divide-y divide-border`,children:n})]})}function DS({label:e,description:t,control:n,dimmed:r=!1}){return(0,J.jsxs)(`div`,{className:`flex items-start justify-between gap-4 py-3 first:pt-0 last:pb-0`,children:[(0,J.jsxs)(`div`,{className:`min-w-0`,children:[(0,J.jsx)(`p`,{className:q(`text-sm`,r&&`text-muted-foreground`),children:e}),(0,J.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t})]}),(0,J.jsx)(`div`,{className:`shrink-0`,children:n})]})}var OS=`(no value)`;function kS({label:e,description:t,value:n,options:r,onChange:i}){if(r.length===0)return null;let a=(r.some(e=>e.value===n)?r:[...r,{value:n,label:n}]).map(e=>({value:e.value===``?OS:e.value,label:e.label,disabled:e.disabled===!0}));return(0,J.jsx)(DS,{label:e,description:t,control:(0,J.jsxs)(Eb,{items:a,value:n===``?OS:n,onValueChange:(e,t)=>{t.reason!==`none`&&i(e===OS?``:e)},children:[(0,J.jsx)(Ob,{size:`sm`,"aria-label":e,className:`max-w-[min(16rem,45vw)]`,children:(0,J.jsx)(Db,{})}),(0,J.jsx)(kb,{align:`end`,children:a.map(e=>(0,J.jsx)(Ab,{value:e.value,disabled:e.disabled,children:e.label},e.value))})]})})}var AS=(0,Y.createContext)(null);function jS(e){let t=(0,Y.useContext)(AS),n=(0,Y.useRef)(e?.back);n.current=e?.back;let r=e?.title;return(0,Y.useEffect)(()=>{if(t)return t(r===void 0?void 0:{title:r,back:()=>n.current?.()}),()=>t(void 0)},[t,r]),t!==null}var MS=(e=>(e[e.Border=-1]=`Border`,e[e.Data=0]=`Data`,e[e.Function=1]=`Function`,e[e.Position=2]=`Position`,e[e.Timing=3]=`Timing`,e[e.Alignment=4]=`Alignment`,e))(MS||{}),NS=[0,1],PS=[1,0],FS=[2,3],IS=[3,2],LS={L:NS,M:PS,Q:FS,H:IS},RS=/^\d*$/,zS=/^[A-Z0-9 $%*+./:-]*$/,BS=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`,VS=1,HS=40,US=3,WS=3,GS=40,KS=10,qS=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],JS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],YS=class{constructor(e,t,n,r){if(this.version=e,this.ecc=t,e<VS||e>HS)throw RangeError(`Version value out of range`);if(r<-1||r>7)throw RangeError(`Mask value out of range`);this.size=e*4+17;let i=Array.from({length:this.size}).fill(!1);for(let e=0;e<this.size;e++)this.modules.push(i.slice()),this.types.push(i.map(()=>0));this.drawFunctionPatterns();let a=this.addEccAndInterleave(n);if(this.drawCodewords(a),r===-1){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);let n=this.getPenaltyScore();n<e&&(r=t,e=n),this.applyMask(t)}}this.mask=r,this.applyMask(r),this.drawFormatBits(r)}size;mask;modules=[];types=[];getModule(e,t){return e>=0&&e<this.size&&t>=0&&t<this.size&&this.modules[t][e]}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0,MS.Timing),this.setFunctionModule(e,6,e%2==0,MS.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)n===0&&r===0||n===0&&r===t-1||n===t-1&&r===0||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let t=this.ecc[1]<<3|e,n=t;for(let e=0;e<10;e++)n=n<<1^(n>>>9)*1335;let r=(t<<10|n)^21522;for(let e=0;e<=5;e++)this.setFunctionModule(8,e,ZS(r,e));this.setFunctionModule(8,7,ZS(r,6)),this.setFunctionModule(8,8,ZS(r,7)),this.setFunctionModule(7,8,ZS(r,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,ZS(r,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,ZS(r,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,ZS(r,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;for(let e=0;e<18;e++){let n=ZS(t,e),r=this.size-11+e%3,i=Math.floor(e/3);this.setFunctionModule(r,i,n),this.setFunctionModule(i,r,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){let i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,o=t+n;a>=0&&a<this.size&&o>=0&&o<this.size&&this.setFunctionModule(a,o,i!==2&&i!==4,MS.Position)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,Math.max(Math.abs(r),Math.abs(n))!==1,MS.Alignment)}setFunctionModule(e,t,n,r=MS.Function){this.modules[t][e]=n,this.types[t][e]=r}addEccAndInterleave(e){let t=this.version,n=this.ecc;if(e.length!==fC(t,n))throw RangeError(`Invalid argument`);let r=JS[n[0]][t],i=qS[n[0]][t],a=Math.floor(dC(t)/8),o=r-a%r,s=Math.floor(a/r),c=[],l=pC(i);for(let t=0,n=0;t<r;t++){let r=e.slice(n,n+s-i+(t<o?0:1));n+=r.length;let a=mC(r,l);t<o&&r.push(0),c.push(r.concat(a))}let u=[];for(let e=0;e<c[0].length;e++)c.forEach((t,n)=>{(e!==s-i||n>=o)&&u.push(t[e])});return u}drawCodewords(e){if(e.length!==Math.floor(dC(this.version)/8))throw RangeError(`Invalid argument`);let t=0;for(let n=this.size-1;n>=1;n-=2){n===6&&(n=5);for(let r=0;r<this.size;r++)for(let i=0;i<2;i++){let a=n-i,o=n+1&2?r:this.size-1-r;!this.types[o][a]&&t<e.length*8&&(this.modules[o][a]=ZS(e[t>>>3],7-(t&7)),t++)}}}applyMask(e){if(e<0||e>7)throw RangeError(`Mask value out of range`);for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw Error(`Unreachable`)}!this.types[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let t=0;t<this.size;t++){let n=!1,r=0,i=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[t][a]===n?(r++,r===5?e+=US:r>5&&e++):(this.finderPenaltyAddHistory(r,i),n||(e+=this.finderPenaltyCountPatterns(i)*GS),n=this.modules[t][a],r=1);e+=this.finderPenaltyTerminateAndCount(n,r,i)*GS}for(let t=0;t<this.size;t++){let n=!1,r=0,i=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[a][t]===n?(r++,r===5?e+=US:r>5&&e++):(this.finderPenaltyAddHistory(r,i),n||(e+=this.finderPenaltyCountPatterns(i)*GS),n=this.modules[a][t],r=1);e+=this.finderPenaltyTerminateAndCount(n,r,i)*GS}for(let t=0;t<this.size-1;t++)for(let n=0;n<this.size-1;n++){let r=this.modules[t][n];r===this.modules[t][n+1]&&r===this.modules[t+1][n]&&r===this.modules[t+1][n+1]&&(e+=WS)}let t=0;for(let e of this.modules)t=e.reduce((e,t)=>e+ +!!t,t);let n=this.size*this.size,r=Math.ceil(Math.abs(t*20-n*10)/n)-1;return e+=r*KS,e}getAlignmentPatternPositions(){if(this.version===1)return[];{let e=Math.floor(this.version/7)+2,t=this.version===32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}finderPenaltyCountPatterns(e){let t=e[1],n=t>0&&e[2]===t&&e[3]===t*3&&e[4]===t&&e[5]===t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){t[0]===0&&(e+=this.size),t.pop(),t.unshift(e)}};function XS(e,t,n){if(t<0||t>31||e>>>t)throw RangeError(`Value out of range`);for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function ZS(e,t){return(e>>>t&1)!=0}var QS=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw RangeError(`Invalid argument`);this.bitData=n.slice()}getData(){return this.bitData.slice()}},$S=[1,10,12,14],eC=[2,9,11,13],tC=[4,8,16,16];function nC(e,t){return e[Math.floor((t+7)/17)+1]}function rC(e){let t=[];for(let n of e)XS(n,8,t);return new QS(tC,e.length,t)}function iC(e){if(!sC(e))throw RangeError(`String contains non-numeric characters`);let t=[];for(let n=0;n<e.length;){let r=Math.min(e.length-n,3);XS(Number.parseInt(e.substring(n,n+r),10),r*3+1,t),n+=r}return new QS($S,e.length,t)}function aC(e){if(!cC(e))throw RangeError(`String contains unencodable characters in alphanumeric mode`);let t=[],n;for(n=0;n+2<=e.length;n+=2){let r=BS.indexOf(e.charAt(n))*45;r+=BS.indexOf(e.charAt(n+1)),XS(r,11,t)}return n<e.length&&XS(BS.indexOf(e.charAt(n)),6,t),new QS(eC,e.length,t)}function oC(e){return e===``?[]:sC(e)?[iC(e)]:cC(e)?[aC(e)]:[rC(uC(e))]}function sC(e){return RS.test(e)}function cC(e){return zS.test(e)}function lC(e,t){let n=0;for(let r of e){let e=nC(r.mode,t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}function uC(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)e.charAt(n)===`%`?(t.push(Number.parseInt(e.substring(n+1,n+3),16)),n+=2):t.push(e.charCodeAt(n));return t}function dC(e){if(e<VS||e>HS)throw RangeError(`Version number out of range`);let t=(16*e+128)*e+64;if(e>=2){let n=Math.floor(e/7)+2;t-=(25*n-10)*n-55,e>=7&&(t-=36)}return t}function fC(e,t){return Math.floor(dC(e)/8)-qS[t[0]][e]*JS[t[0]][e]}function pC(e){if(e<1||e>255)throw RangeError(`Degree out of range`);let t=[];for(let n=0;n<e-1;n++)t.push(0);t.push(1);let n=1;for(let r=0;r<e;r++){for(let e=0;e<t.length;e++)t[e]=hC(t[e],n),e+1<t.length&&(t[e]^=t[e+1]);n=hC(n,2)}return t}function mC(e,t){let n=t.map(e=>0);for(let r of e){let e=r^n.shift();n.push(0),t.forEach((t,r)=>n[r]^=hC(t,e))}return n}function hC(e,t){if(e>>>8||t>>>8)throw RangeError(`Byte out of range`);let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return n}function gC(e,t,n=1,r=40,i=-1,a=!0){if(!(VS<=n&&n<=r&&r<=HS)||i<-1||i>7)throw RangeError(`Invalid value`);let o,s;for(o=n;;o++){let n=fC(o,t)*8,i=lC(e,o);if(i<=n){s=i;break}if(o>=r)throw RangeError(`Data too long`)}for(let e of[PS,FS,IS])a&&s<=fC(o,e)*8&&(t=e);let c=[];for(let t of e){XS(t.mode[0],4,c),XS(t.numChars,nC(t.mode,o),c);for(let e of t.getData())c.push(e)}let l=fC(o,t)*8;XS(0,Math.min(4,l-c.length),c),XS(0,(8-c.length%8)%8,c);for(let e=236;c.length<l;e^=253)XS(e,8,c);let u=Array.from({length:Math.ceil(c.length/8)},()=>0);return c.forEach((e,t)=>u[t>>>3]|=e<<7-(t&7)),new YS(o,t,u,i)}function _C(e,t){let{ecc:n=`L`,boostEcc:r=!1,minVersion:i=1,maxVersion:a=40,maskPattern:o=-1,border:s=1}=t||{},c=typeof e==`string`?oC(e):Array.isArray(e)?[rC(e)]:void 0;if(!c)throw Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);let l=gC(c,LS[n],i,a,o,r),u=vC({version:l.version,maskPattern:l.mask,size:l.size,data:l.modules,types:l.types},s);return t?.invert&&(u.data=u.data.map(e=>e.map(e=>!e))),t?.onEncoded?.(u),u}function vC(e,t=1){if(!t)return e;let{size:n}=e,r=n+t*2;e.size=r,e.data.forEach(e=>{for(let n=0;n<t;n++)e.unshift(!1),e.push(!1)});for(let n=0;n<t;n++)e.data.unshift(Array.from({length:r},e=>!1)),e.data.push(Array.from({length:r},e=>!1));let i=MS.Border;e.types.forEach(e=>{for(let n=0;n<t;n++)e.unshift(i),e.push(i)});for(let n=0;n<t;n++)e.types.unshift(Array.from({length:r},e=>i)),e.types.push(Array.from({length:r},e=>i));return e}function yC({text:e,label:t}){let{data:n,size:r}=_C(e,{ecc:`M`,border:2}),i=``;return n.forEach((e,t)=>{e.forEach((e,n)=>{e&&(i+=`M${n} ${t}h1v1h-1z`)})}),(0,J.jsx)(`svg`,{role:`img`,"aria-label":t,viewBox:`0 0 ${r} ${r}`,shapeRendering:`crispEdges`,className:`h-56 w-56 max-w-full rounded-md bg-white`,children:(0,J.jsx)(`path`,{d:i,fill:`black`})})}function bC(e,t){let[n,r]=(0,Y.useState)(!1);return(0,Y.useLayoutEffect)(()=>{if(!e)return;let n=e.getBoundingClientRect().width;if(n>0&&r(n<t),typeof ResizeObserver>`u`)return;let i=new ResizeObserver(([e])=>e&&r(e.contentRect.width<t));return i.observe(e),()=>i.disconnect()},[e,t]),n}var xC=500;function SC({children:e,className:t}){let[n,r]=(0,Y.useState)(!1);return(0,Y.useEffect)(()=>{let e=setTimeout(()=>r(!0),xC);return()=>clearTimeout(e)},[]),(0,J.jsx)(`p`,{className:q(`text-xs text-muted-foreground`,!n&&`invisible`,t),children:e})}var CC={};function wC(e){let{schedule:t,pages:n,loaded:r}=wS(),i=(0,Y.useContext)(P_)??N_,a=e.map(e=>e.id).join(`,`),{value:o}=bd(async()=>{if(!r)return CC;let n=t?AC({...i,package:t.package}):void 0,a=await Promise.all(e.map(async e=>!t||!n||!t.projects.includes(e.id)?[e.id,[]]:t.read(n,e).then(t=>[e.id,t],()=>void 0)));return Object.fromEntries(a.filter(e=>e!==void 0))},CC,1e4,[r,t?.package,t?.projects.join(`,`),a],`previous`),s=Object.fromEntries(e.flatMap(e=>o[e.id]?[[e.id,o[e.id]]]:[]));if(!t)return{commands:s,open:()=>{}};let c=n.find(e=>e.segment===t.page)?.label??t.page;return{page:{segment:t.page,label:c,href:i.pageHref(t.page)},commands:s,open:()=>i.openPage(t.page)}}function TC(e){if(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith(`/`))return;let[t,...n]=e.split(`/`).filter(Boolean);if(!(!t||!w_(t)||n.length===0))return{segment:t,rest:n}}function EC(e){let t=e.match(/(?<![\w./:@-])[a-z][a-z0-9]*\/[^\s()[\]<>"'`]+/g)??[];return[...new Set(t.map(e=>e.replace(/[.,;:!?]+$/,``)).filter(e=>TC(e)!==void 0))]}var DC={};function OC(e){let{pages:t}=wS(),n=(0,Y.useContext)(P_)??N_,r=e.map(({projectId:e,paths:t})=>`${e}\n${[...t].sort().join(`
14
- `)}`).join(`
15
-
16
- `),i=t.filter(e=>e.names!==void 0),{value:a}=bd(async()=>{let t={};return await Promise.all(e.flatMap(({projectId:e,paths:r})=>i.filter(t=>t.projects.includes(e)).map(async i=>{let a=r.filter(e=>TC(e)?.segment===i.segment);if(a.length===0)return;let o=await i.names(AC({...n,package:i.package}),e,a).catch(()=>({}));for(let n of a){let r=o[n];r&&typeof r.title==`string`&&r.title.trim()!==``&&(t[`${e}\n${n}`]={title:r.title,href:typeof r.href==`string`?r.href:n})}}))),t},DC,6e4,[r,i.map(e=>e.package).join(`,`)],`previous`);return(e,t)=>{let r=a[`${e}\n${t}`],i=r&&TC(r.href);return r&&i?{title:r.title,open:()=>n.openPage(i.segment,i.rest,e)}:void 0}}function kC(e){return e}function AC(e,t={}){return{...e,runCommand:(n,r,i)=>wy(n,e.package,r,i,t.acts??!1),act:(t,n,r)=>wy(t,e.package,n,r,!0),runComputerCommand:(t,n,r)=>Ty(e.package,t,n,r),runComputerCommandOn:(t,n,r)=>Ey(e.package,t,n,r),read:(t,n,r={})=>Dy(t,e.package,n,r)}}var jC=(0,Y.createContext)(null);function MC(){let e=(0,Y.useContext)(jC);if(!e)throw Error(`useModuleHost is only available inside a module page`);return e}export{wy as $,o as $a,er as $i,Id as $n,zl as $r,qg as $t,Xx as A,Qe as Aa,is as Ai,Fm as An,Fu as Ar,D_ as At,Ab as B,S as Ba,Na as Bi,qf as Bn,bu as Br,d_ as Bt,$x as C,yt as Ca,Ol as Ci,Zh as Cn,Ru as Cr,V_ as Ct,Qx as D,et as Da,Ns as Di,Qm as Dn,Bu as Dr,j_ as Dt,tS as E,ot as Ea,Zc as Ei,Ym as En,Hu as Er,F_ as Et,Qb as F,q as Fa,So as Fi,cp as Fn,Du as Fr,x_ as Ft,By as G,v as Ga,Lr as Gi,Ef as Gn,hu as Gr,c_ as Gt,Db as H,x as Ha,vi as Hi,Pf as Hn,vu as Hr,a_ as Ht,ex as I,k as Ia,go as Ii,lp as In,Eu as Ir,b_ as It,zy as J,f as Ja,Cr as Ji,Tf as Jn,cu as Jr,l_ as Jt,Uy as K,u as Ka,Pr as Ki,Cf as Kn,Xl as Kr,s_ as Kt,$b as L,O as La,ho as Li,up as Ln,Tu as Lr,m_ as Lt,Jx as M,Ve as Ma,Ro as Mi,xm as Mn,Ou as Mr,C_ as Mt,Ux as N,ze as Na,Ao as Ni,hm as Nn,ku as Nr,w_ as Nt,Zx as O,X as Oa,Ms as Oi,$m as On,Ku as Or,M_ as Ot,Hx as P,Re as Pa,ko as Pi,tm as Pn,Au as Pr,T_ as Pt,Oy as Q,c as Qa,tr as Qi,Ld as Qn,Ul as Qr,Gg as Qt,Eb as R,E as Ra,Ya as Ri,np as Rn,Cu as Rr,h_ as Rt,rS as S,St as Sa,kl as Si,ag as Sn,Lu as Sr,z_ as St,eS as T,pt as Ta,dl as Ti,Zm as Tn,Wu as Tr,I_ as Tt,Wy as U,y as Ua,pi as Ui,Af as Un,_u as Ur,i_ as Ut,Ob as V,w as Va,ba as Vi,Wf as Vn,yu as Vr,n_ as Vt,Ry as W,_ as Wa,Ir as Wi,Of as Wn,gu as Wr,o_ as Wt,Ly as X,a as Xa,or as Xi,Sf as Xn,Ql as Xr,t_ as Xt,Vy as Y,m as Ya,_r as Yi,bf as Yn,au as Yr,u_ as Yt,ky as Z,s as Za,Yn as Zi,tf as Zn,Jl as Zr,$g as Zt,CS as _,Z as _a,Il as _i,dg as _n,bd as _r,q_ as _t,EC as a,nr as aa,nu as ai,bg as an,kd as ar,Iv as at,pS as b,Zt as ba,Ll as bi,tg as bn,Ju as br,B_ as bt,SC as c,Q as ca,lu as ci,hg as cn,wd as cr,gv as ct,AS as d,Tn as da,Kl as di,sg as dn,xd as dr,W_ as dt,lr as ea,Hl as ei,Ig as en,Pd as er,Sy as et,jS as f,_n as fa,Wl as fi,rg as fn,Cd as fr,J_ as ft,TS as g,en as ga,eu as gi,ig as gn,yd as gr,Z_ as gt,kS as h,$t as ha,tu as hi,fg as hn,ld as hr,Q_ as ht,MC as i,Jn as ia,Bl as ii,xg as in,jd as ir,Lv as it,qx as j,Xe as ja,jo as ji,Sm as jn,Nu as jr,S_ as jt,Yx as k,Ze as ka,hs as ki,qm as kn,qu as kr,O_ as kt,bC as l,Hn as la,uu as li,ng as ln,Dd as lr,ev as lt,ES as m,pn as ma,$l as mi,pg as mn,sd as mr,K_ as mt,kC as n,Qn as na,Gl as ni,Og as nn,Od as nr,yy as nt,OC as o,Un as oa,su as oi,yg as on,Ed as or,Pv as ot,DS as p,vn as pa,Vl as pi,cg as pn,gd as pr,X_ as pt,Hy as q,d as qa,$ as qi,wf as qn,ou as qr,r_ as qt,AC as r,$n as ra,Zl as ri,Dg as rn,Md as rr,iy as rt,wC as s,qn as sa,ru as si,gg as sn,Nd as sr,vv as st,jC as t,Zn as ta,ql as ti,Fg as tn,Ad as tr,by as tt,yC as u,En as ua,iu as ui,lg as un,Sd as ur,G_ as ut,xS as v,tn as va,Rl as vi,ug as vn,Yu as vr,H_ as vt,nS as w,ht as wa,Tl as wi,Xm as wn,Vu as wr,P_ as wt,fS as x,Pt as xa,Nl as xi,$h as xn,zu as xr,R_ as xt,wS as y,qt as ya,Fl as yi,og as yn,Xu as yr,L_ as yt,kb as z,T as za,Ha as zi,Xf as zn,Su as zr,f_ as zt};