@openagt/dashboard 0.43.0 → 0.45.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/dashboard/machine-call.d.ts +11 -0
  2. package/dist/dashboard/machine-call.d.ts.map +1 -1
  3. package/dist/dashboard/machine-call.js +29 -0
  4. package/dist/dashboard/machine-call.js.map +1 -1
  5. package/dist/dashboard/models.d.ts +9 -7
  6. package/dist/dashboard/models.d.ts.map +1 -1
  7. package/dist/dashboard/models.js +27 -14
  8. package/dist/dashboard/models.js.map +1 -1
  9. package/dist/dashboard/relay-endpoints.d.ts.map +1 -1
  10. package/dist/dashboard/relay-endpoints.js +3 -1
  11. package/dist/dashboard/relay-endpoints.js.map +1 -1
  12. package/dist/dashboard/server.d.ts.map +1 -1
  13. package/dist/dashboard/server.js +4 -0
  14. package/dist/dashboard/server.js.map +1 -1
  15. package/dist/dashboard-bundle/assets/host/module-BoZIxVX5.js +1 -0
  16. package/dist/dashboard-bundle/assets/main-B07-Dy-r.js +148 -0
  17. package/dist/dashboard-bundle/assets/{module-qB4OUxzG.js → module-Dgckd6JQ.js} +5 -5
  18. package/dist/dashboard-bundle/index.html +3 -3
  19. package/dist/dashboard-rpc/copied-logins.d.ts.map +1 -1
  20. package/dist/dashboard-rpc/copied-logins.js +10 -1
  21. package/dist/dashboard-rpc/copied-logins.js.map +1 -1
  22. package/dist/dashboard-rpc/machines.d.ts +18 -0
  23. package/dist/dashboard-rpc/machines.d.ts.map +1 -1
  24. package/dist/dashboard-rpc/machines.js +56 -1
  25. package/dist/dashboard-rpc/machines.js.map +1 -1
  26. package/dist/dashboard-rpc/relay-dispatch.d.ts.map +1 -1
  27. package/dist/dashboard-rpc/relay-dispatch.js +6 -2
  28. package/dist/dashboard-rpc/relay-dispatch.js.map +1 -1
  29. package/dist/module-types/dashboard/components/DriverModelMenu.d.ts +7 -0
  30. package/dist/module-types/dashboard/lib/models.d.ts +5 -2
  31. package/dist/module-types/dashboard/module/index.d.ts +2 -0
  32. package/dist/module-types/dashboard/rpc/machines.d.ts +4 -0
  33. package/dist/module-types/src/dashboard/machine-call.d.ts +11 -0
  34. package/dist/module-types/src/dashboard/models.d.ts +9 -7
  35. package/dist/module-types/src/dashboard-rpc/machines.d.ts +18 -0
  36. package/dist/module-types/src/registry.d.ts +6 -0
  37. package/dist/registry.d.ts +6 -0
  38. package/dist/registry.d.ts.map +1 -1
  39. package/dist/registry.js +4 -0
  40. package/dist/registry.js.map +1 -1
  41. package/dist/store/branches.js +5 -5
  42. package/dist/store/branches.js.map +1 -1
  43. package/dist/store/queue.js +3 -3
  44. package/dist/store/queue.js.map +1 -1
  45. package/dist/store/tickets.js +3 -3
  46. package/dist/store/tickets.js.map +1 -1
  47. package/package.json +19 -19
  48. package/dist/dashboard-bundle/assets/host/module-BpujONbg.js +0 -1
  49. package/dist/dashboard-bundle/assets/main-idwI6-1C.js +0 -148
@@ -4,11 +4,11 @@ import{r as e,t}from"./rolldown-runtime-QTnfLwEv.js";import{t as n}from"./react-
4
4
  `);for(;s>=0;s=n.indexOf(`
5
5
 
6
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`);!vt&&dt.includes(`firefox`),!vt&&dt.includes(`chrom`);var yt=_t,bt=/jsdom|happydom/.test(dt);function xt(e){e.preventDefault(),e.stopPropagation()}function St(e){return`nativeEvent`in e}function Ct(e){return e.pointerType===``&&e.isTrusted?!0:ht&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function wt(e){return bt?!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 Tt(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Et(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function Dt(){return typeof window<`u`}function Ot(e){return jt(e)?(e.nodeName||``).toLowerCase():`#document`}function kt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function At(e){return((jt(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function jt(e){return Dt()?e instanceof Node||e instanceof kt(e).Node:!1}function Mt(e){return Dt()?e instanceof Element||e instanceof kt(e).Element:!1}function Nt(e){return Dt()?e instanceof HTMLElement||e instanceof kt(e).HTMLElement:!1}function Pt(e){return!Dt()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof kt(e).ShadowRoot}function Ft(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Kt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function It(e){return/^(table|td|th)$/.test(Ot(e))}function Lt(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Rt=/transform|translate|scale|rotate|perspective|filter/,zt=/paint|layout|strict|content/,Bt=e=>!!e&&e!==`none`,Vt;function Ht(e){let t=Mt(e)?Kt(e):e;return Bt(t.transform)||Bt(t.translate)||Bt(t.scale)||Bt(t.rotate)||Bt(t.perspective)||!Wt()&&(Bt(t.backdropFilter)||Bt(t.filter))||Rt.test(t.willChange||``)||zt.test(t.contain||``)}function Ut(e){let t=Jt(e);for(;Nt(t)&&!Gt(t);){if(Ht(t))return t;if(Lt(t))return null;t=Jt(t)}return null}function Wt(){return Vt??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Vt}function Gt(e){return/^(html|body|#document)$/.test(Ot(e))}function Kt(e){return kt(e).getComputedStyle(e)}function qt(e){return Mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Jt(e){if(Ot(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Pt(e)&&e.host||At(e);return Pt(t)?t.host:t}function Yt(e){let t=Jt(e);return Gt(t)?(e.ownerDocument||e).body:Nt(t)&&Ft(t)?t:Yt(t)}function Xt(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Yt(e),i=r===e.ownerDocument?.body,a=kt(r);if(i){let e=Zt(a);return t.concat(a,a.visualViewport||[],Ft(r)?r:[],e&&n?Xt(e):[])}else return t.concat(r,Xt(r,[],n))}function Zt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qt(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&&Pt(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function $t(e,t){let n=e;for(;n;){if(Mt(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(Pt(n)?n.host:null)}return null}function en(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var tn=`data-base-ui-focusable`,nn=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,rn=`ArrowLeft`,an=`ArrowRight`,on=`ArrowUp`,sn=`ArrowDown`,cn=`data-starting-style`,ln=`data-ending-style`,un={[cn]:``},dn={[ln]:``},fn={transitionStatus(e){return e===`starting`?un:e===`ending`?dn:null}},pn=`data-open`,mn=`data-closed`,hn=`data-anchor-hidden`,gn=`data-popup-open`,_n=`data-pressed`,vn={[gn]:``},yn={[gn]:``,[_n]:``},bn={[pn]:``},xn={[mn]:``},Sn={[hn]:``},Cn={open(e){return e?vn:null}},wn={open(e){return e?yn:null}},Tn={open(e){return e?bn:xn},anchorHidden(e){return e?Sn:null}},En={...Tn,...fn},Dn=`data-trigger-disabled`;function On(e,t){if(!Mt(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(Dn);for(let[,e]of t.entries())if(Z(e,n))return!e.hasAttribute(Dn);return!1}function kn(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 An(e){return e.matches(`html,body`)}function jn(e){return Nt(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Mn(e){return $t(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${nn}`)!=null}function Nn(e){return e?e.getAttribute(`role`)===`combobox`&&jn(e):!1}function Pn(e){if(!e||bt)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Fn(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function In(e,t){return t!=null&&!Tt(t)?0:typeof e==`function`?e():e}function Ln(e,t,n){let r=In(e,n);return typeof r==`number`?r:r?.[t]}function Rn(e){return typeof e==`function`?e():e}function zn(e,t){return t||e===`click`||e===`mousedown`}function Bn(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 Vn(e,t,n){let r=n??Qe;return{reason:e,event:t??new Event(`base-ui`),...r}}var Hn=`none`,Un=`trigger-press`,Wn=`trigger-hover`,Gn=`trigger-focus`,Kn=`outside-press`,qn=`item-press`,Jn=`close-press`,Yn=`track-press`,Xn=`input-change`,Zn=`focus-out`,Qn=`escape-key`,$n=`list-navigation`,er=`keyboard`,tr=`pointer`,nr=`drag`,rr=`cancel-open`,ir=`sibling-open`,ar=`disabled`,or=`imperative-action`,sr=`window-resize`,cr=Y.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new at,currentIdRef:{current:null},currentContextRef:{current:null}});function lr(e,t){e.current=t.current}function ur(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:Ln(i.current,`open`),close:Ln(n,`close`)}},[n,o,i,a]),(0,J.jsx)(cr.Provider,{value:Y.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function dr(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(cr),[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:Ln(s.current,`close`)},o!==null&&o!==r?(f(!0),t?.setIsInstantPhase(!0),t?.onOpenChange(!1,Q(Hn))):(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,lr(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 fr(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function pr(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function mr(e,t,n,r){let i=Ve(gr).current;return _r(i,e,t,n,r)&&yr(i,[e,t,n,r]),i.callback}function hr(e){let t=Ve(gr).current;return vr(t,e)&&yr(t,e),t.callback}function gr(){return{callback:null,cleanup:null,refs:[]}}function _r(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function vr(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function yr(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 br(e){let t=Ve(xr,e).current;return t.next=e,X(t.effect),t}function xr(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Sr={...Y},Cr=Sr.useInsertionEffect,wr=Cr&&Cr!==Sr.useLayoutEffect?Cr:e=>e();function $(e){let t=Ve(Tr).current;return t.next=e,wr(t.effect),t.trampoline}function Tr(){let e={next:void 0,callback:Er,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Er(){}var Dr=null;globalThis.requestAnimationFrame;var Or=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)}},kr=class e{static create(){return new e}static request(e){return Or.request(e)}static cancel(e){return Or.cancel(e)}currentId=Dr;request(e){this.cancel(),this.currentId=Or.request(()=>{this.currentId=Dr,e()})}cancel=()=>{this.currentId!==Dr&&(Or.cancel(this.currentId),this.currentId=Dr)};disposeEffect=()=>this.cancel};function Ar(){let e=Ve(kr.create).current;return rt(e.disposeEffect),e}function jr(e){return e?.ownerDocument||document}var Mr={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Nr={...Mr,position:`fixed`,margin:0,top:0,left:0},Pr={...Mr,position:`absolute`},Fr=Y.forwardRef(function(e,t){let[n,r]=Y.useState();X(()=>{yt&&vt&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,J.jsx)(`span`,{...e,ref:t,style:Nr,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})}),Ir=Math.min,Lr=Math.max,Rr=Math.round,zr=Math.floor,Br=e=>({x:e,y:e}),Vr={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Hr(e,t,n){return Lr(e,Ir(t,n))}function Ur(e,t){return typeof e==`function`?e(t):e}function Wr(e){return e.split(`-`)[0]}function Gr(e){return e.split(`-`)[1]}function Kr(e){return e===`x`?`y`:`x`}function qr(e){return e===`y`?`height`:`width`}function Jr(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Yr(e){return Kr(Jr(e))}function Xr(e,t,n){n===void 0&&(n=!1);let r=Gr(e),i=Yr(e),a=qr(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ai(o)),[o,ai(o)]}function Zr(e){let t=ai(e);return[Qr(e),t,Qr(t)]}function Qr(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var $r=[`left`,`right`],ei=[`right`,`left`],ti=[`top`,`bottom`],ni=[`bottom`,`top`];function ri(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ei:$r:t?$r:ei;case`left`:case`right`:return t?ti:ni;default:return[]}}function ii(e,t,n,r){let i=Gr(e),a=ri(Wr(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Qr)))),a}function ai(e){let t=Wr(e);return Vr[t]+e.slice(t.length)}function oi(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function si(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:oi(e)}function ci(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 li(e,t){return t<0||t>=e.length}function ui(e,t){return pi(e.current,{disabledIndices:t})}function di(e,t){return pi(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function fi(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>pi(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:li(e,u)?-1:u,wrapped:d}}function pi(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&&mi(e,a,r));return a}function mi(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!gi(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function hi(e){return e.visibility===`hidden`||e.visibility===`collapse`}function gi(e,t=e?Kt(e):null){return!e||!e.isConnected||!t||hi(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var _i=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function vi(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return Pt(n)?n.host:null}function yi(e){for(let t of Array.from(e.children))if(Ot(t)===`summary`)return t;return null}function bi(e,t){let n=yi(t);return!!n&&(e===n||Z(n,e))}function xi(e){let t=e?Ot(e):``;return e!=null&&e.matches(_i)&&(t!==`summary`||e.parentElement!=null&&Ot(e.parentElement)===`details`&&yi(e.parentElement)===e)&&(t!==`details`||yi(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Si(e){if(!xi(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=vi(t)){let n=t!==e,r=Ot(t)===`slot`;if(t.hasAttribute(`inert`)||n&&Ot(t)===`details`&&!t.open&&!bi(e,t)||t.hasAttribute(`hidden`)||!r&&!Ci(t,n))return!1}return!0}function Ci(e,t){let n=Kt(e);return t?n.display!==`none`:gi(e,n)}function wi(e){let t=e.tabIndex;if(t<0){let t=Ot(e);if(t===`details`||t===`audio`||t===`video`||Nt(e)&&e.isContentEditable)return 0}return t}function Ti(e){if(Ot(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Ei(e,t){let n=Ti(e);if(!n)return!0;let r=t.find(e=>{let t=Ti(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=Ti(e);return t?.name===n.name&&t.form===n.form})===n}function Di(e){if(Nt(e)&&Ot(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Nt(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Oi(e,t){Di(e).forEach(e=>{xi(e)&&t.push(e),Oi(e,t)})}function ki(e,t,n){Di(e).forEach(e=>{Nt(e)&&e.matches(t)&&n.push(e),ki(e,t,n)})}function Ai(e){return Si(e)&&wi(e)>=0}function ji(e){let t=[];return Oi(e,t),t.filter(Si)}function Mi(e){let t=ji(e);return t.filter(e=>wi(e)>=0&&Ei(e,t))}function Ni(e,t){let n=Mi(e),r=n.length;if(r===0)return;let i=Qt(jr(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Pi(e){return Ni(jr(e).body,1)||e}function Fi(e){return Ni(jr(e).body,-1)||e}function Ii(e,t,n){if(!e)return null;let r=[];Oi(jr(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(Si);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!Z(n,o)&&Ai(o)&&Ei(o,a))return o}return r[i]}function Li(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Z(n,r)}function Ri(e){Mi(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function zi(e){let t=[];ki(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 Bi(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Bi(e,t.id,n)])}function Vi(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 Hi(e){return`data-base-ui-${e}`}var Ui=0;function Wi(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Ui);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),Xe;let o=requestAnimationFrame(a);return Ui=o,()=>{Ui===o&&(cancelAnimationFrame(o),Ui=0)}}var Gi=`data-base-ui-inert`,Ki=new WeakMap,qi=new WeakSet,Ji=new WeakMap,Yi=0;function Xi(e){return e?Pt(e)?e.host:Xi(e.parentNode):null}var Zi=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Xi(t);return e.contains(n)?n:null}).filter(e=>e!=null),Qi=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},$i=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{Ot(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function ea(e,t,n,{mark:r=!0}){let i=Zi(t,e),a=r?$i(t,Qi(i),new Set(i)):[],o=[],s=[];if(n){let e=Zi(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);$i(t,Qi(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(Ki.get(e)||0)+1;Ki.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=(Ji.get(e)||0)+1;Ji.set(e,t),s.push(e),t===1&&e.setAttribute(Gi,``)}),Yi+=1,()=>{o.forEach(e=>{let t=(Ki.get(e)||0)-1;Ki.set(e,t),t||(qi.has(e)||e.removeAttribute(`aria-hidden`),qi.delete(e))}),r&&s.forEach(e=>{let t=(Ji.get(e)||0)-1;Ji.set(e,t),t||e.removeAttribute(Gi)}),--Yi,Yi||(Ki=new WeakMap,qi=new WeakSet,Ji=new WeakMap)}}function ta(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=jr(e[0]).body;return ea(e,i,n,{mark:r})}function na(){let[,e]=Y.useState({});return Y.useCallback(()=>{e({})},[])}var ra=0;function ia(e,t=`mui`){let n=Y.useRef(void 0),r=na(),i=e??n.current;return Y.useEffect(()=>{n.current??(ra+=1,n.current=`${t}-${ra}`,e??r())},[e,t,r]),i}var aa=Sr.useId;function oa(e,t){if(aa!==void 0){let n=aa();return e??(t?`${t}-${n}`:n)}return ia(e,t)}var sa=19;function ca(e){return sa>=e}function la(e){if(!Y.isValidElement(e))return null;let t=e,n=t.props;return(ca(19)?n?.ref:t.ref)??null}function ua(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function da(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 fa(e,t){return typeof e==`function`?e(t):e}function pa(e,t){return typeof e==`function`?e(t):e}var ma={};function ha(e,t,n,r,i){if(!n&&!r&&!i&&!e)return _a(t);let a=_a(e);return t&&(a=va(a,t)),n&&(a=va(a,n)),r&&(a=va(a,r)),i&&(a=va(a,i)),a}function ga(e){if(e.length===0)return ma;if(e.length===1)return _a(e[0]);let t=_a(e[0]);for(let n=1;n<e.length;n+=1)t=va(t,e[n]);return t}function _a(e){return Sa(e)?{...e(ma)}:ya(e)}function va(e,t){return Sa(t)?t(e):ba(e,t)}function ya(e){let t={...e};for(let e in t){let n=t[e];xa(e,n)&&(t[e]=wa(n))}return t}function ba(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=ua(e.style,r);break;case`className`:e[n]=Ea(e.className,r);break;default:xa(n,r)?e[n]=Ca(e[n],r):e[n]=r}}return e}function xa(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 Sa(e){return typeof e==`function`}function Ca(e,t){return t?e?(...n)=>{let r=n[0];if(Da(r)){let i=r;Ta(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:wa(t):e}function wa(e){return e&&((...t)=>{let n=t[0];return Da(n)&&Ta(n),e(...t)})}function Ta(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Ea(e,t){return t?e?t+` `+e:t:e}function Da(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function Oa(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=Ma(r));let i=ka(t,n,r);if(n.enabled===!1)return null;let a=n.state??Qe;return Na(e,r,i,a)}function ka(e,t,n){let{className:r,style:i}=e,{state:a=Qe,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?fa(r,a):void 0,d=l?pa(i,a):void 0,f=l?da(a,c):Qe,p=l&&s?Aa(s):void 0,m=l?ua(f,p)??{}:Qe;return typeof document<`u`&&(l?Array.isArray(o)?m.ref=hr([m.ref,la(n),...o]):m.ref=mr(m.ref,la(n),o):mr(null,null)),l?(u!==void 0&&(m.className=Ea(m.className,u)),d!==void 0&&(m.style=ua(m.style,d)),m):Qe}function Aa(e){return Array.isArray(e)?ga(e):ha(void 0,e)}var ja=Symbol.for(`react.lazy`);function Ma(e){if(e?.$$typeof!==ja)return e;let t=Y.Children.toArray(e)[0];return Y.isValidElement(t)?t:e}function Na(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=ha(n,t.props);return e.ref=n.ref,Y.cloneElement(t,e)}return Pa(e,n)}function Pa(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 Fa={style:{transition:`none`}},Ia=`data-base-ui-click-trigger`,La={fallbackAxisSide:`none`},Ra={fallbackAxisSide:`end`},za={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Ba=Y.createContext(null),Va=()=>Y.useContext(Ba),Ha=Hi(`portal`);function Ua(e={}){let{ref:t,container:n,componentProps:r=Qe,elementProps:i}=e,a=oa(),o=Va()?.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&&(jt(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=Oa(`div`,r,{ref:[t,d],props:[{id:a,[Ha]:``},i]}),m=s&&p?He.createPortal(p,s):null;return{node:l,nodeId:Y.isValidElement(p)?p.props.id:void 0,subtree:m}}var Wa=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}=Ua({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&&Li(e)&&(e.type===`focusin`?v.current&&=(zi(l),!1):(Ri(l),v.current=!0))}return pr(fr(l,`focusin`,e,!0),fr(l,`focusout`,e,!0))},[l,y]),X(()=>{!l||b!==!0||!v.current||(zi(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)(Ba.Provider,{value:S,children:[x&&l&&(0,J.jsx)(Fr,{"data-type":`outside`,ref:f,onFocus:e=>{Li(e,l)?m.current?.focus():Fi(g?g.domReference:null)?.focus()}}),x&&l&&(0,J.jsx)(`span`,{role:s,"aria-owns":u,style:za}),l&&He.createPortal(a,l),x&&l&&(0,J.jsx)(Fr,{"data-type":`outside`,ref:p,onFocus:e=>{Li(e,l)?h.current?.focus():(Pi(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,Q(`focus-out`,e.nativeEvent)))}})]})]})});function Ga(){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 Ka=class{nodesRef={current:[]};events=Ga();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),Ja=Y.createContext(null),Ya=()=>Y.useContext(qa)?.id||null,Xa=e=>{let t=Y.useContext(Ja);return e??t};function Za(e){let t=oa(),n=Xa(e),r=Ya();return X(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Qa(e){let{children:t,id:n}=e,r=Ya();return(0,J.jsx)(qa.Provider,{value:Y.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function $a(e){let{children:t,externalTree:n}=e,r=Ve(()=>n??new Ka).current;return(0,J.jsx)(Ja.Provider,{value:r,children:t})}function eo(e){return e==null?e:`current`in e?e.current:e}function to(e,t){let n=kt(en(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(Ct(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var no=20,ro=[];function io(){ro=ro.filter(e=>e.deref()?.isConnected)}function ao(e){io(),e&&Ot(e)!==`body`&&(ro.push(new WeakRef(e)),ro.length>no&&(ro=ro.slice(-20)))}function oo(){return io(),ro[ro.length-1]?.deref()}function so(e){return e?Ai(e)?e:Mi(e)[0]||e:null}function co(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=ji(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Ai(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 lo(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=Nn(_)&&S,w=br(i),T=br(a),E=br(o),D=br(u),O=br(g),k=Xa(m),A=Va(),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=mr(L,p,A?.beforeInsideRef),B=mr(R,A?.afterInsideRef),V=ot(),H=ot(),ee=Ar(),te=A!=null,U=Fn(v),W=$((e=U)=>e?Mi(e):[]),ne=$(()=>h?.().filter(e=>e!=null)??[]);Y.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&Z(U,Qt(jr(U)))&&W().length===0&&!C&&xt(e)}return fr(jr(U),`keydown`,e)},[r,U,c,C,W]),Y.useEffect(()=>{if(r||!g)return;let e=jr(U);function t(){N.current=!1}function n(e){let t=en(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`,$t(t,`[data-base-ui-click-trigger]`)&&(M.current=!0,H.start(0,()=>{M.current=!1}))}function i(){I.current=`keyboard`}return pr(fr(e,`pointerdown`,n,!0),fr(e,`pointerup`,t,!0),fr(e,`pointercancel`,t,!0),fr(e,`keydown`,i,!0),t)},[r,v,_,U,g,A,H,ne]),Y.useEffect(()=>{if(r||!l)return;let e=jr(U);function n(){M.current=!0,H.start(0,()=>{M.current=!1})}function i(e){let t=en(e);Ai(t)&&(P.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=en(n);c&&r==null&&a!=null&&Z(v,a)&&ao(a),queueMicrotask(()=>{let o=x(),l=t.context.triggerElements,u=ne(),p=r?.hasAttribute(Hi(`focus-guard`))&&[L.current,R.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,eo(f),eo(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&&(Bi(k.nodesRef.current,o).find(e=>Z(e.context?.elements.floating,r)||Z(e.context?.elements.domReference,r))||Vi(k.nodesRef.current,o).find(e=>[e.context?.elements.floating,Fn(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===_&&U&&co(U),s&&i!==_&&!gi(a)&&Qt(e)===e.body){if(Nt(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;Nt(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!c)&&r&&m&&!M.current&&(C||r!==oo())&&(j.current=!0,t.setOpen(!1,Q(Zn,n)))})}function o(){N.current||(b.current.insideReactTree=!0,V.start(0,()=>{b.current.insideReactTree=!1}))}let u=Nt(_)?_:null;if(!(!v&&!u))return pr(u&&fr(u,`focusout`,a),u&&fr(u,`pointerdown`,n),v&&fr(v,`focusin`,i),v&&fr(v,`focusout`,a),v&&A&&fr(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(`[${Hi(`portal`)}]`)||[]),t=(k?Vi(k.nodesRef.current,x()):[]).find(e=>Nn(e.context?.elements.domReference||null))?.context?.elements.domReference,n=ta([v,...e,L.current,R.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...ne(),t,eo(f),eo(d),C?_:null].filter(e=>e!=null),{ariaHidden:c||C,mark:!1}),i=ta([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,c,A,C,k,x,d,f,ne]),X(()=>{if(!g||r||!Nt(U))return;F.current=``,I.current=``;let e=jr(U),t=Qt(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():eo(r),o||=a();let s=Z(U,Qt(e)),c=b.current.openEvent,l=c?.type===`mousedown`&&Ct(c);Wi(o,{sync:l,preventScroll:o===U,shouldFocus(){if(!O.current)return!1;if(s)return!0;let t=Qt(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=jr(U),t=Qt(e),n=D.current==null;ao(t);function i(e){if(e.open||(F.current=to(e.nativeEvent,I.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(Hi(`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(Ct(e.nativeEvent)||wt(e.nativeEvent))j.current=!1;else{let e=!1;jr(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&&Ot(t)!==`body`?t:null,s=n?o||a:a||o;return s||=oo()||null,typeof i==`boolean`?s:eo(i)||s||null}return()=>{y.off(`openchange`,i);let t=Qt(e),n=ne(),r=Z(v,t)||n.some(e=>e===t||Z(e,t))||k&&Bi(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=so(c),i=E.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!j.current&&Nt(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=Qt(jr(v));!Nt(e)||!jn(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 co(U),()=>{queueMicrotask(io)}},[r,U]);let re=!r&&(!c||!C)&&(te||c);return(0,J.jsxs)(Y.Fragment,{children:[re&&(0,J.jsx)(Fr,{"data-type":`inside`,ref:z,onFocus:e=>{if(c){let e=W();Wi(e[e.length-1])}else A?.portalNode&&(j.current=!1,Li(e,A.portalNode)?Pi(_)?.focus():eo(f??A.beforeOutsideRef)?.focus())}}),n,re&&(0,J.jsx)(Fr,{"data-type":`inside`,ref:B,onFocus:e=>{c?Wi(W()[0]):A?.portalNode&&(l&&(j.current=!0),Li(e,A.portalNode)?Fi(_)?.focus():eo(d??A.afterOutsideRef)?.focus())}})]})}function uo(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=Un}=t,l=e.context.dataRef,u=Y.useRef(void 0),d=Ar(),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=Tt(e.pointerType,!0)&&wt(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||Tt(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=en(s),p=jn(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}Tt(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 fo(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 po(e){return e!=null&&e.clientX!=null}function mo(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&&!po(s.current.openEvent)||e.set(`positionReference`,fo(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)}),_=Tt(u)?a:i;Y.useEffect(()=>{if(!n){m(o);return}if(!_)return;function e(){l.current?.(),l.current=null}let t=kt(a);function r(t){let n=en(t);Z(a,n)?e():h(t.clientX,t.clientY)}return!s.current.openEvent||po(s.current.openEvent)?l.current=fr(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 ho(){return!1}function go(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function _o(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=ho,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=Xa(c),m=$(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=$(()=>a),{escapeKey:v,outsidePress:y}=go(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?Bi(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),M=$(t=>kn(t,e.select(`floatingElement`))||kn(t,e.select(`domReferenceElement`))),N=$(t=>{o()&&e.setOpen(!1,Q(Un,t.nativeEvent))}),P=$(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=St(t)?t.nativeEvent:t;if(w.current||i.isComposing||!v&&j(`__escapeKeyBubbles`))return;let a=Q(Qn,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=en(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=jr(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&&Bi(p.nodesRef.current,t).some(t=>kn(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=en(n),i=`[${Hi(`inert`)}]`,a=Mt(r)?r.getRootNode():null,o=Array.from((Pt(a)?a:jr(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>Z(e,r))))return;let c=Mt(r)?r:null;for(;c&&!Gt(c);){let e=Jt(c);if(Gt(e)||!Mt(e))break;c=e}if(!(o.length&&Mt(r)&&!An(r)&&!Z(r,e.select(`floatingElement`))&&o.every(e=>!Z(c,e)))){if(Nt(r)&&!(`touches`in n)){let e=Gt(r),t=Kt(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&&!Ct(n)&&!C.current)return;if(S.current){t.clear(),S.current=!1;return}}typeof h==`function`&&!h(n)||j(`__outsidePressBubbles`)||(e.setOpen(!1,Q(Kn,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=en(e);if(!n)return;let r=fr(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=pr(r&&pr(fr(i,`keydown`,P),fr(i,`compositionstart`,a),fr(i,`compositionend`,o)),g&&pr(fr(i,`click`,z,!0),fr(i,`pointerdown`,z,!0),fr(i,`pointerup`,B,!0),fr(i,`pointercancel`,B,!0),fr(i,`mousedown`,z,!0),fr(i,`mouseup`,B,!0),fr(i,`touchstart`,R,{capture:!0,passive:!0}),fr(i,`touchmove`,H,{capture:!0,passive:!0}),fr(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 vo(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};Mt(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 yo(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=kr.request(()=>{a(`ending`)});return()=>{kr.cancel(e)}}},[e,o,i,n]),X(()=>{if(!e||t||i===void 0)return;let n=kr.request(()=>{a(void 0)});return()=>{kr.cancel(n)}},[t,e,i]),X(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=kr.request(()=>{a(`idle`)});return()=>{kr.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function bo(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var xo=null;function So(e){if(!xo){let e=[];xo=e,queueMicrotask(()=>{xo=null,He.flushSync(()=>{for(let t of e)t()})})}xo.push(e)}function Co(e,t=!1,n=!1){let r=Ar();return $((i,a=null)=>{r.cancel();let o=eo(e);if(o==null)return;let s=o,c=()=>{if(!n){He.flushSync(i);return}So(()=>{a?.aborted||i()})};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(bo(s).map(e=>e.finished.then(Xe))).then(()=>{a?.aborted||c()},()=>{if(!a?.aborted){if(bo(s).some(e=>e.pending||e.playState!==`finished`)){l();return}c()}})}if(t){let e=cn;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 wo(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=$(a),s=Co(r,n,i);Y.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}function To(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=$(i),{mounted:c,setMounted:l,transitionStatus:u}=yo(t,!1,!1,o),d=!t&&r;X(()=>{t&&s(!1)},[t,s]);let f=Y.useRef(c),p=Y.useRef(!1),m=na(),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 wo({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var Eo={tabIndex:-1,[tn]:``};function Do(e){return t=>t!==`touch`||e.current}function Oo(e,t=!1){let n=oa(),r=Ya()!=null,i=Ve(()=>e(n,r)).current;return vo({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function ko({handle:e,store:t}){return X(()=>e.attachStore(t),[e,t]),null}function Ao(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function jo(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),Ao(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),Ao(t))})}function Mo(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 No(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function Po(e,t,n,r={}){let i=n.reason,a=i===Wn,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=No(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=Mo(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 Fo(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=jo(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 Io(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(Hn);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 Lo(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=To({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 Ro(e,t){e.useSyncedValues(t),X(()=>()=>{e.update({activeTriggerProps:Qe,inactiveTriggerProps:Qe,popupProps:Qe})},[e])}function zo(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 Bo=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}},Vo=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})),Ho=t(((e,t)=>{t.exports=Vo()})),Uo=t((e=>{var t=n(),r=Ho();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}})),Wo=t(((e,t)=>{t.exports=Uo()})),Go=Ho(),Ko=Wo(),qo=ca(19)?Xo:Zo;function Jo(e,t,n,r,i){return qo(e,t,n,r,i)}function Yo(e,t,n,r,i){let a=Y.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Go.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,Go.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Xo(e,t,n,r,i){let a=Ge();if(!a)return Yo(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 Zo(e,t,n,r,i){return(0,Ko.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Qo=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 Jo(this,e,t,n,r)}},$o=class extends Qo{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),Jo(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)}})}},es={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},ts=class extends $o{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:Ga(),nested:n,triggerElements:i},es),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Et(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 ns(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new ts({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 rs=e=>e.triggerIdProp??e.activeTriggerId,is=e=>e.openProp??e.open,as=e=>(e.popupElement?.id??e.floatingId)||void 0;function os(e,t){return t!==void 0&&is(e)&&rs(e)===t}function ss(e,t){return os(e,t)?!0:t!==void 0&&is(e)&&rs(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var cs={open:is,mounted:e=>e.mounted,transitionStatus:e=>is(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:rs,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:as,isTriggerActive:(e,t)=>t!==void 0&&rs(e)===t,isOpenedByTrigger:(e,t)=>os(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&rs(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>ss(e,t)?as(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function ls(e){return(0,Go.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 us(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=oa(),a=Ya()!=null,o=Ve(()=>new ts({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Bo,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=Mt(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 ds=gt&&vt;function fs(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=kt(t);function i(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&Nt(t)&&t===Qt(jr(t))&&(o.current=!0,s.current=t)}function a(){c.current=!0}function l(){c.current=!1}return pr(fr(r,`blur`,i),ds&&fr(r,`keydown`,a,!0),ds&&fr(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`);Mt(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=en(n.nativeEvent);if(Mt(a)){if(ds&&!n.relatedTarget){if(!c.current&&!jn(a))return}else if(!Pn(a))return}let u=On(n.relatedTarget,e.context.triggerElements),{nativeEvent:d,currentTarget:f}=n;if(e.select(`open`)&&u||!r){e.setOpen(!0,Q(Gn,d,f));return}l.start(r,()=>{o.current||e.setOpen(!0,Q(Gn,d,f))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,o=Mt(r)&&r.hasAttribute(Hi(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let t=e.select(`domReferenceElement`),n=Qt(jr(t));!r&&n===t||Z(a.current.floatingContext?.refs.floating.current,n)||Z(t,n)||o||On(r??n,e.context.triggerElements)||e.setOpen(!1,Q(Gn,i))})}}},[a,r,e,l]);return Y.useMemo(()=>n?{reference:u,trigger:u}:{},[n,u])}var ps=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},ms=new WeakMap;function hs(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&ms.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),ms.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function gs(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=ms.get(n);a&&a!==e&&hs(a),hs(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,ms.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function _s(e){let t=e.context.dataRef.current,n=Ve(()=>t.hoverInteractionState??ps.create()).current;return t.hoverInteractionState||=n,rt(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function vs(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=Xa(),u=Ya(),d=_s(e),f=ot(),p=$(()=>zn(c.current.openEvent?.type,d.interactedInside)),m=$(()=>Bn(c.current.openEvent?.type)),h=$(()=>{hs(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()&&Mt(s)&&o){let e=s,t=o,n=jr(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??$t(e,`[data-rootownerid]`)??n.body;return gs(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&&Bi(l.nodesRef.current,u).length>0)}function a(t){let n=Ln(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,Q(Wn,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=en(e);if(!Mn(t)){d.interactedInside=!1;return}d.interactedInside=$t(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(On(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(l&&r&&Mt(o)&&Bi(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(Wn,n)),l.events.emit(`floating.closed`,n)})}let y=o;return pr(y&&fr(y,`mouseenter`,g),y&&fr(y,`mouseleave`,_),y&&fr(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var ys={current:null};function bs(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=ys,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=Xa(l),v=_s(e),y=Y.useRef(!1),b=br(i),x=br(r),S=br(o),C=br(n),w=br(p),T=br(f),E=$(()=>zn(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(!Mt(r))return!1;let a=r;return i.hasMatchingElement(e=>Z(e,a))&&(!t||!Z(t,a))}),k=$(()=>{v.handler&&=(jr(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=$(()=>{hs(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===Wn,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=Ln(x.current,`close`,v.pointerType);r?v.openChangeTimeout.start(r,()=>{e.setOpen(!1,Q(Wn,t)),_?.events.emit(`floating.closed`,t)}):n&&(v.openChangeTimeout.clear(),e.setOpen(!1,Q(Wn,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!Mt(r))return;function i(t){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!Tt(v.pointerType))return;let n=Rn(S.current),r=Ln(x.current,`open`,v.pointerType),i=en(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(Mt(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(Z(t,i)){c=t;break}}Mt(o)&&Mt(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&&Mt(c)&&Mt(s)&&Z(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;if(h){D()&&e.setOpen(!0,Q(Wn,t,c));return}m||(r?v.openChangeTimeout.start(r,()=>{g&&D()&&e.setOpen(!0,Q(Wn,t,c))}):g&&D()&&e.setOpen(!0,Q(Wn,t,c)))}function o(n){if(E()){A();return}k();let r=jr(e.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!On(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?fr(r,`mouseout`,l):void 0;return s?pr(fr(r,`mousemove`,i,{once:!0}),fr(r,`mouseenter`,i),fr(r,`mouseleave`,o),f):pr(fr(r,`mouseenter`,i),fr(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&&!Tt(v.pointerType))return;if(o&&s&&v.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=v.handleCloseOptions?.getScope?.()??r.ownerDocument.body;gs(v,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=Rn(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(Wn,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 xs(e){return vt&&e.movementX===0&&e.movementY===0}function Ss(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Cs(e,t){return Ss(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function ws(e,t,n){return Ss(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Ts(e,t,n){return Ss(t,n?e===rn:e===an,e===sn)}function Es(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:Ss(t,n?e===an:e===rn,e===on)}function Ds(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=Fn(E),A=Nn(D),j=br(k),M=Ya(),N=Xa(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=br(h),U=br(T),W=br(o),ne=br(b),G=Ar(),re=Ar(),ie=$(()=>{G.cancel();function e(e){d||(ee.current=Wi(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||ws(I.current,_,u)||l?ui(n):di(n),I.current=null,R())};t()}}else li(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=Qt(jr(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=$(()=>ui(n,te.current)),le=$(t=>{if(L.current=!1,V.current=!0,t.which===229||!U.current&&t.currentTarget===j.current)return;if(l&&Es(t.key,g,u,w)){Cs(t.key,se())||xt(t),e.setOpen(!1,Q($n,t.nativeEvent));let n=S?.current??D;Nt(n)&&n.focus();return}r!=null&&r!==F.current&&!li(n.current,r)&&(F.current=r);let i=F.current,a=ui(n,h),o=di(n,h);if(A||(t.key===`Home`&&(xt(t),F.current=a,R(t)),t.key===`End`&&(xt(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(Cs(t.key,g)){xt(t);let e=Qt(t.currentTarget.ownerDocument);if(T&&!d&&Z(t.currentTarget,e)&&!n.current.some(t=>t!=null&&Z(t,e))){F.current=ws(t.key,g,u)?a:o,R(t),r===F.current&&ie();return}let{index:l,wrapped:f}=fi(n.current,i,{decrement:!ws(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){xs(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=Qt(jr(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=en(t.nativeEvent);if(n&&!Z(j.current,n))return;xt(t);let r=Q(Zn,t.nativeEvent);e.setOpen(!1,r);let i=S?.current??D;!r.isCanceled&&Nt(i)&&i.focus();return}le(t)},onPointerMove(e){xs(e)||(L.current=!0)}}),[de,le,j,A,e,T,d,D,S]),pe=Y.useMemo(()=>{function t(t){e.setOpen(!0,Q($n,t.nativeEvent,t.currentTarget))}function n(e){f===`auto`&&Ct(e.nativeEvent)&&(P.current=!d)}function r(e){P.current=f,f===`auto`&&wt(e.nativeEvent)&&(P.current=!0)}return{onKeyDown(n){let r=e.select(`open`);L.current=!1;let i=n.key.startsWith(`Arrow`),a=Ts(n.key,se(),u),o=Cs(n.key,r?g:_),s=(l?a:o)||n.key===`Enter`||n.key.trim()===``;if(d&&r&&(!l||jn(n.currentTarget)))return le(n);if(!(!r&&!m&&i)){if(s){let e=Cs(n.key,se());I.current=l&&e?null:n.key}if(l){a&&(xt(n),r?(F.current=ce(),R(n),d&&j.current?.focus()):t(n));return}o&&(W.current!=null&&(F.current=W.current),xt(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 Os(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&&!gi(n)||n?.matches(`:disabled`)?!1:o==null||!mi(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===` `&&(xt(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!==` `&&(xt(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 ks=.1,As=ks*ks,js=.5;function Ms(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Ns(e,t,n,r,i,a,o,s,c,l){let u=!1;return Ms(e,t,n,r,i,a)&&(u=!u),Ms(e,t,i,a,o,s)&&(u=!u),Ms(e,t,o,s,c,l)&&(u=!u),Ms(e,t,c,l,n,r)&&(u=!u),u}function Ps(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Fs(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 Is(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*As;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=en(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&&Mt(r.relatedTarget)&&Z(u,r.relatedTarget))return;function y(){return!!(s&&Bi(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=Fs(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=Fs(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=Fs(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=Fs(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!Ps(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?js/2:js*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+js+1,o=C||T?S.bottom-js:S.top,s=C?T?S.bottom-js:S.top:S.bottom-js;M=Ns(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?js/2:js*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-js,o=C||T?S.top+js:S.bottom,s=C?T?S.top+js:S.bottom:S.top+js;M=Ns(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?js/2:js*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+js+1,o=w||E?S.right-js:S.left,s=w?E?S.right-js:S.left:S.right-js;M=Ns(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?js/2:js*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-js,o=w||E?S.left+js:S.right,s=w?E?S.left+js:S.right:S.left+js;M=Ns(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 Ls(e,t,n){let{reference:r,floating:i}=e,a=Jr(t),o=Yr(t),s=qr(o),c=Wr(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=Gr(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Rs(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}=Ur(t,e),p=si(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ci(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=ci(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 zs=50,Bs=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Rs},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ls(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<zs&&(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}=Ls(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Vs=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}=Ur(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Wr(r),_=Jr(o),v=Wr(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ai(o)]:Zr(o)),x=p!==`none`;!d&&x&&b.push(...ii(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=Xr(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`&&_!==Jr(t))||T.every(e=>Jr(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=Jr(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{}}}},Hs=new Set([`left`,`top`]);async function Us(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Wr(n),s=Gr(n),c=Jr(n)===`y`,l=Hs.has(o)?-1:1,u=a&&c?-1:1,d=Ur(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 Ws=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 Us(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}}}}},Gs=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}=Ur(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Jr(i),p=Kr(f),m=u[p],h=u[f],g=(e,t)=>Hr(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}}}}}},Ks=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}=Ur(e,t),u={x:n,y:r},d=Jr(i),f=Kr(d),p=u[f],m=u[d],h=Ur(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Hs.has(Wr(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}=Ur(e,t),c=await i.detectOverflow(t,s),l=Wr(n),u=Gr(n),d=Jr(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=Ir(p-c[m],g),y=Ir(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*Lr(c.left,c.right):S=p-2*Lr(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 Js(e){let t=Kt(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Nt(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Rr(n)!==a||Rr(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ys(e){return Mt(e)?e:e.contextElement}function Xs(e){let t=Ys(e);if(!Nt(t))return Br(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Js(t),o=(a?Rr(n.width):n.width)/r,s=(a?Rr(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Zs=Br(0);function Qs(e){let t=kt(e);return!Wt()||!t.visualViewport?Zs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $s(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===kt(e)}function ec(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ys(e),o=Br(1);t&&(r?Mt(r)&&(o=Xs(r)):o=Xs(e));let s=$s(a,n,r)?Qs(a):Br(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=kt(a),t=Mt(r)?kt(r):r,n=e,i=Zt(n);for(;i&&t!==n;){let e=Xs(i),t=i.getBoundingClientRect(),r=Kt(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=kt(i),i=Zt(n)}}return ci({width:u,height:d,x:c,y:l})}function tc(e,t){let n=qt(e).scrollLeft;return t?t.left+n:ec(At(e)).left+n}function nc(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-tc(e,n),y:n.top+t.scrollTop}}function rc(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=At(r),s=t?Lt(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Br(1),u=Br(0),d=Nt(r);if((d||!a)&&((Ot(r)!==`body`||Ft(o))&&(c=qt(r)),d)){let e=ec(r);l=Xs(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?nc(o,c):Br(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 ic(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function ac(e){let t=qt(e),n=e.ownerDocument.body,r=Lr(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Lr(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+tc(e),o=-t.scrollTop;return Kt(n).direction===`rtl`&&(a+=Lr(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var oc=25;function sc(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=kt(e),a=At(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Wt()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(tc(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<=oc&&(s-=o)}return{width:s,height:c,x:l,y:u}}function cc(e,t){let n=ec(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Xs(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function lc(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=sc(e,n,t);else if(t===`document`)r=ac(At(e));else if(Mt(t))r=cc(t,n);else{let n=Qs(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ci(r)}function uc(e,t){let n=t.get(e);if(n)return n;let r=Xt(e,[],!1).filter(e=>Mt(e)&&Ot(e)!==`body`),i=null,a=Kt(e).position===`fixed`,o=a?Jt(e):e;for(;Mt(o)&&!Gt(o);){let e=Kt(o),t=Ht(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Jt(o)}return t.set(e,r),r}function dc(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Lt(t)?[]:uc(t,this._c):[].concat(n),r],o=lc(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=lc(t,a[e],i);s=Lr(n.top,s),c=Ir(n.right,c),l=Ir(n.bottom,l),u=Lr(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function fc(e){let{width:t,height:n}=Js(e);return{width:t,height:n}}function pc(e,t,n){let r=Nt(t),i=At(t),a=n===`fixed`,o=ec(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Br(0);if((r||!a)&&((Ot(t)!==`body`||Ft(i))&&(s=qt(t)),r)){let e=ec(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=tc(i));let l=i&&!r&&!a?nc(i,s):Br(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 mc(e){return Kt(e).position===`static`}function hc(e,t){if(!Nt(e)||Kt(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return At(e)===n&&(n=n.ownerDocument.body),n}function gc(e,t){let n=kt(e);if(Lt(e))return n;if(!Nt(e)){let t=Jt(e);for(;t&&!Gt(t);){if(Mt(t)&&!mc(t))return t;t=Jt(t)}return n}let r=hc(e,t);for(;r&&It(r)&&mc(r);)r=hc(r,t);return r&&Gt(r)&&mc(r)&&!Ht(r)?n:r||Ut(e)||n}var _c=async function(e){let t=this.getOffsetParent||gc,n=this.getDimensions,r=await n(e.floating);return{reference:pc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function vc(e){return Kt(e).direction===`rtl`}var yc={convertOffsetParentRelativeRectToViewportRelativeRect:rc,getDocumentElement:At,getClippingRect:dc,getOffsetParent:gc,getElementRects:_c,getClientRects:ic,getDimensions:fc,getScale:Xs,isElement:Mt,isRTL:vc};function bc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xc(e,t,n){let r=null,i,a=At(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=zr(d),h=zr(a.clientWidth-(u+f)),g=zr(a.clientHeight-(d+p)),_=zr(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Lr(0,Ir(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!bc(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=kt(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Sc(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=Ys(e),u=i||a?[...l?Xt(l):[],...t?Xt(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?xc(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?ec(e):null;c&&g();function g(){let t=ec(e);h&&!bc(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 Cc=Ws,wc=Gs,Tc=Vs,Ec=qs,Dc=Ks,Oc=(e,t,n)=>{let r=new Map,i=n??{},a={...yc,...i.platform,_c:r};return Bs(e,t,{...i,platform:a})},kc=typeof document<`u`?Y.useLayoutEffect:function(){};function Ac(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ac(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Ac(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function jc(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Mc(e,t){let n=jc(e);return Math.round(t*n)/n}function Nc(e){let t=Y.useRef(e);return kc(()=>{t.current=e}),t}function Pc(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=Y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=Y.useState(r);Ac(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=Nc(c),D=Nc(i),O=Nc(l),k=Y.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Oc(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Ac(w.current,t)&&(w.current=t,He.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);kc(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=Y.useRef(!1);kc(()=>(A.current=!0,()=>{A.current=!1}),[]),kc(()=>{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=Mc(M.floating,u.x),r=Mc(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...jc(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 Fc=(e,t)=>{let n=Cc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ic=(e,t)=>{let n=wc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Lc=(e,t)=>({fn:Dc(e).fn,options:[e,t]}),Rc=(e,t)=>{let n=Tc(e);return{name:n.name,fn:n.fn,options:[e,t]}},zc=(e,t)=>{let n=Ec(e);return{name:n.name,fn:n.fn,options:[e,t]}},Bc={...cs,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},Vc=class extends $o{constructor(e,t,n){let r=new Bo;super(Hc(e,r,t,n),Uc(r),Bc)}setOpen=(e,t)=>{Po(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Q(Un,e))}};function Hc(e,t,n,r=!1){return{...ns(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 Uc(e){return{popupRef:Y.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var Wc=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=Oo((e,t)=>new Vc({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}),Io(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:b}=Lo(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(ar))},[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(or))}),[y,p]);let T=h||_||!t&&a!==`none`;return(0,J.jsxs)(tt.Provider,{value:p,children:[l&&(0,J.jsx)(ko,{handle:l,store:p}),T&&(0,J.jsx)(Gc,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function Gc({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=_o(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=mo(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=Y.useMemo(()=>ha(a.reference,i.reference),[a.reference,i.reference]);return Ro(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??Qe}),null}function Kc(e){return oa(e,`base-ui`)}var qc=Y.createContext(void 0);function Jc(){return Y.useContext(qc)}var Yc=`data-base-ui-tooltip-trigger`;function Xc(e){let t=en(e);return Mt(t)?t:null}var Zc=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=ls(a)??p;if(!m)throw Error(et(82));let h=Kc(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}=Fo(h,y,m,{payload:o,closeOnClick:l,closeDelay:b}),C=Jc(),{activeIdRef:w,delayRef:T,isInstantPhase:E,hasProvider:D}=dr(v,{open:_}),O=_s(v);m.useSyncedValue(`isInstantPhase`,E);let k=m.useState(`disabled`),A=s??k,j=br(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=$t(e,`[${Yc}]`);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=bs(v,{enabled:!A,mouseOnly:!0,move:!1,handleClose:!N&&M!==`both`?Is():null,restMs:L,delay(){return u==null&&D?{close:Ln(T.current,`close`)}:{close:b}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!P.current}}),V=fs(v,{enabled:!A}).reference,H=e=>{let t=P.current,n=Xc(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(Wn,e));return}if(t&&!r&&a&&!j.current&&!m.select(`open`)&&i&&Tt(I.current)){let t=()=>{!P.current&&!j.current&&!m.select(`open`)&&m.setOpen(!0,Q(Wn,e,i))},n=L();n===0?(F.clear(),t()):F.start(n,t)}},ee=m.useState(`appliedTriggerProps`,S||M!==`none`);return Oa(`button`,e,{state:{open:_},ref:[t,x,y],props:[B,V,ee,{onMouseOver(e){H(e.nativeEvent)},onFocus(e){R(Xc(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,[Dn]:A?``:void 0,[Yc]:A?void 0:``},f],stateAttributesMapping:Cn})}),Qc=Y.createContext(void 0);function $c(){let e=Y.useContext(Qc);if(e===void 0)throw Error(et(70));return e}var el=Y.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=Ua({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,J.jsxs)(Y.Fragment,{children:[l,c&&He.createPortal(n,c)]})}),tl=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return nt().useState(`mounted`)||n?(0,J.jsx)(Qc.Provider,{value:n,children:(0,J.jsx)(el,{ref:t,...r})}):null}),nl=Y.createContext(void 0);function rl(){let e=Y.useContext(nl);if(e===void 0)throw Error(et(71));return e}function il(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=Xa(n),p=Y.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=Pc({...e,elements:{...p,...l&&{reference:l}}}),h=Y.useCallback(e=>{let t=Mt(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 al=Y.createContext(void 0);function ol(){return Y.useContext(al)?.direction??`ltr`}var sl=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}=Ur(e,t)||{};if(l==null)return{};let d=si(u),f={x:n,y:r},p=Yr(i),m=qr(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=Hr(D,k,O),j=!c.arrow&&Gr(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}}}),cl=(e,t)=>{let{name:n,fn:r}=sl(e);return{name:n,fn:r,options:[e,t]}},ll={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}}}},ul={sideX:`left`,sideY:`top`},dl=`--available-width`,fl=`--available-height`,pl=`--anchor-width`,ml=`--anchor-height`,hl=`--transform-origin`,gl=dl,_l=fl;function vl(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 yl(e,t,n){let{rects:r,placement:i}=e;return{side:vl(t,Wr(i),n),align:Gr(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function bl(e){return xl(e,il)}function xl(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=br(n),M=br(g),N=ol()===`rtl`,[P,F]=Y.useState(null);!g&&P!==null&&F(null);let I=x===`placement`,L=P?Wr(P):null,R=P&&I?Gr(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=br(a),ie=br(s),ae=typeof a==`function`?0:a,oe=typeof s==`function`?0:s,se=[];p&&se.push(p),se.push(Fc(e=>{let t=yl(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:Rc({...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:Ic({...ne,rootBoundary:D,mainAxis:w!==`none`,crossAxis:le,limiter:u||E?void 0:Lc(e=>{if(!G.current)return{};let{width:t,height:n}=G.current.getBoundingClientRect(),r=Jr(Wr(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(zc({...ne,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!M.current)return;let i=e.style;i.setProperty(gl,`${t}px`),i.setProperty(_l,`${n}px`);let a=kt(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(pl,`${u}px`),i.setProperty(ml,`${d}px`)}}),cl(e=>({element:G.current||jr(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=Wr(r),u=Gr(r),d=Jr(l)===`y`,f=G.current,p=typeof a==`function`?a(yl(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(hl,d?`${m} ${h}`:`${h} ${m}`),{}}},ll,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)=>Sc(...e,fe),nodeId:y,externalTree:S}),{sideX:Ce,sideY:K}=_e.adaptiveOrigin||ul,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[gl]=`100vw`,e[_l]=`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=(Sl(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`&&Sl(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 Sc(me.reference,me.floating,ve,fe)},[m,g,me,ve,fe]);let De=Wr(ye),Oe=vl(i,De,N),ke=Gr(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 Sl(e){return e!=null&&`current`in e}function Cl(e){return e===`starting`?Fa:Qe}function wl(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),Oa(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},Cl(r),i],stateAttributesMapping:Tn})}var Tl=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=Ra,style:g,..._}=e,v=nt(),y=$c(),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=bl({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=wl(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)(nl.Provider,{value:D,children:O})}),El=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=nt(),{side:s,align:c}=rl(),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`);wo({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),vs(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return Oa(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[Eo,f,Cl(d),a],stateAttributesMapping:En})}),Dl=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)(ur,{delay:i,timeoutMs:r,children:e.children})})};function Ol(e){return ca(19)?e:e?`true`:void 0}function kl(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 Al=Dl,jl=Wc;function Ml(e){return(0,J.jsx)(Zc,{delay:300,...e})}function Nl({className:e,sideOffset:t=6,side:n,align:r,children:i,...a}){return(0,J.jsx)(tl,{children:(0,J.jsx)(Tl,{className:`z-50`,sideOffset:t,...n?{side:n}:{},...r?{align:r}:{},children:(0,J.jsx)(El,{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 Pl=O(`onMachines`),Fl=O(`sendAddMachine`),Il=O(`sendRemoveMachine`),Ll=O(`onMachinesReachable`),Rl=O(`onMachineVersions`),zl=O(`sendProjectToMachine`),Bl=O(`onProjectOnMachine`),Vl=O(`sendProjectHere`),Hl=O(`onProjectHere`),Ul=O(`onMachineStartCheck`),Wl=O(`onMachineModels`),Gl=O(`onComputersThrough`),Kl=O(`sendAddComputerThrough`),ql=O(`onMachinePerson`),Jl=O(`sendRemoveMachineDevice`),Yl=O(`sendRenameMachine`),Xl=O(`sendRenameComputer`),Zl=O(`sendLetMachineIn`),Ql=O(`sendMachineCode`),$l=O(`sendMachineTold`),eu=O(`onMachineLogins`),tu=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),nu=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),ru={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`},iu=(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,...ru,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:nu(`lucide`,i),...s},[...o.map(([e,t])=>(0,Y.createElement)(e,t)),...Array.isArray(a)?a:[a]])),au=(e,t)=>{let n=(0,Y.forwardRef)(({className:n,...r},i)=>(0,Y.createElement)(iu,{ref:i,iconNode:t,className:nu(`lucide-${tu(e)}`,n),...r}));return n.displayName=`${e}`,n},ou=au(`ArrowRight`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),su=au(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),cu=au(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),lu=au(`ChevronRight`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),uu=au(`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`}]]),du=au(`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`}]]),fu=au(`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`}]]),pu=au(`LoaderCircle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),mu=au(`PanelLeft`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),hu=au(`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`}]]),gu=au(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),_u={computer:fu,home:du,shared:hu,server:hu};function vu({kind:e,online:t,labelled:n=!1,className:r}){let i=_u[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 yu({computer:e,named:t=!0}){let n=e.kind?_u[e.kind]:fu;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`})}function bu(e){if(!e)return;let t=new Date(e);return Number.isNaN(t.getTime())?void 0:t}function xu(e,t=`—`){let n=bu(e);return n?n.toLocaleString():t}function Su(e,t=`—`){let n=bu(e);return n?n.toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`}):t}function Cu(e,t=`—`){let n=bu(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 wu(e,t=`—`){let n=bu(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 Tu(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 Eu(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 Du(e,t){return`${e} ${t}${e===1?``:`s`}`}function Ou(e){let t=Math.max(0,Math.floor(e/1e3));if(t<60)return Du(t,`second`);let n=Math.floor(t/60);if(n<60)return Du(n,`minute`);let r=Math.floor(n/60);return r<24?Du(r,`hour`):Du(Math.floor(r/24),`day`)}function ku(e){return e.toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`}).toLowerCase().replace(/\s+/g,``)}function Au(e){let t=new Date(e);return`${t.toLocaleDateString(void 0,{weekday:`long`})} ${ku(t)}`}function ju(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}, ${ku(t)} (${r})`}var Mu=new Map,Nu=500;function Pu(e,t){Mu.delete(e),Mu.set(e,t),Mu.size>Nu&&Mu.delete(Mu.keys().next().value)}var Fu=`openagent:read:`,Iu=1e5,Lu=new Map;function Ru(){try{return typeof window>`u`?void 0:window.localStorage}catch{return}}function zu(e){try{let t=Ru()?.getItem(Fu+e);return t?{value:JSON.parse(t)}:void 0}catch{return}}function Bu(e,t){try{let n=JSON.stringify(t);if(n===void 0||Lu.get(e)===n)return;Lu.set(e,n),n.length>Iu?Ru()?.removeItem(Fu+e):Ru()?.setItem(Fu+e,n)}catch{}}function Vu(e){if(e===void 0){Mu.clear(),Wu.clear(),Lu.clear(),Gu.clear();return}Mu.delete(e),Lu.delete(e);try{Ru()?.removeItem(Fu+e)}catch{}}var Hu=new Set;function Uu(e,t){Mu.has(e)||Hu.has(e)||(Hu.add(e),t().then(t=>{Mu.has(e)||Pu(e,t)}).catch(()=>{}).finally(()=>Hu.delete(e)))}var Wu=new Map,Gu=new Set;function Ku(e){let t=()=>({asked:0,given:0,waiting:new Set});if(e===void 0)return t();let n=Wu.get(e);return n||Wu.set(e,n=t()),n}function qu(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&&(Pu(n,t),Gu.add(n)),a({value:t})},()=>a()).finally(()=>{e.out===o&&delete e.out})};return e.out=o,o.settled}var Ju=new Set;typeof document<`u`&&document.addEventListener(`visibilitychange`,()=>{if(document.visibilityState===`visible`)for(let e of[...Ju])e()});var Yu=()=>typeof document<`u`&&document.visibilityState===`hidden`,Xu=(0,Y.createContext)(null);function Zu(e,t,n,r,i,a){let o=()=>e&&typeof i==`object`?i.remember:void 0,s=e=>{if(e===void 0)return;if(Mu.has(e))return{value:Mu.get(e),stale:!1};if(typeof i!=`object`||!i.stored||Gu.has(e))return;let t=zu(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:Ku(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=Ku(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 qu(l,e,t,!1),w=()=>{clearTimeout(S);let e=y.current;e!==null&&!Yu()&&(S=setTimeout(()=>void(Yu()||C()),e))};b.current=w;let T=e=>{d.live&&(e&&(c&&t!==void 0&&Bu(t,e.value),u(e.value),f(!0),m(!1)),w())};l.waiting.add(T),n!==null&&Ju.add(C);let E=a?.(n=>{l.changed===n||Yu()||(l.changed=n,qu(l,e,t,!0))});return qu(l,e,t,x),()=>{d.live=!1,b.current=()=>{},clearTimeout(S),l.waiting.delete(T),Ju.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():qu(t,e,n,!0)},r),C=(0,Y.useContext)(Xu),w=(0,Y.useRef)({}),T=p&&Qu(_.current,r);if((0,Y.useEffect)(()=>{if(!C)return;let e=w.current;return C(e,T),()=>C(e,!1)},[C,T]),!Qu(_.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 Qu(e,t){return e.length===t.length&&e.every((e,n)=>Object.is(e,t[n]))}function $u(e,t,n,r){return Zu(e,t,null,n,r).value}function ed(e,t,n,r,i,a){return Zu(e,t,n,r,i,a)}var td=O(`onModels`);function nd(){return $u(td,void 0,[],{remember:`models`})}function rd(e){let t=nd(),n=$u(e===void 0?null:()=>Wl(e),void 0,[e]);return e===void 0||n===null?{models:t,theirs:!1}:{models:n,theirs:!0}}function id(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 ad(e,t){return(e?.models.find(e=>e.id===t)??e?.models.find(e=>e.resolvedId===t))?.name??t}function od(e,t){for(let n of Object.values(e??{})){let e=ad(n,t);if(e!==t)return e}return t}function sd(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 cd(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 ld(){return id(nd())}function ud(){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 dd(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 dd(e){return typeof e==`object`&&!!e&&`ok`in e&&e.ok===!1}function fd({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 pd({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 md=`ArrowUp`,hd=`ArrowDown`,gd=`ArrowLeft`,_d=`ArrowRight`,vd=`Home`,yd=`PageUp`,bd=`PageDown`,xd=new Set([md,hd,gd,_d,vd,`End`]),Sd=`Shift`,Cd=[Sd,`Control`,`Alt`,`Meta`];function wd(e){return Nt(e)&&e.tagName===`INPUT`}function Td(e){return!!(wd(e)&&e.selectionStart!=null||Nt(e)&&e.tagName===`TEXTAREA`)}function Ed(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=Dd(e,t,`left`),a=Od(e),o=Od(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=Dd(e,t,`top`),r=Od(e),i=Od(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 Dd(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 Od(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 kd=Y.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Ad(){return Y.useContext(kd)}function jd(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=$(i),[,o]=Y.useState(0),s=Ve(Nd).current,c=Ve(Md).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(!Id(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&Ld(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=Fd(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let v=$(()=>{let[e,t]=Pd(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)(kd.Provider,{value:b,children:t})}function Md(){return new Map}function Nd(){return new Set}function Pd(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)=>Ld(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 Fd(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function Id(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 Ld(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function Rd(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var zd=`data-composite-item-active`;function Bd(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),_=mr(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];Ed(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||mi(e,x,d)?S(Vd(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(mi(t,x,d)){let e=pi(t,{disabledIndices:d});li(t,e)||S(e)}Ed(g.current,r,a,n)});X(()=>{if(d==null||o!=null||!y.current)return;let e=v.current;if(mi(e,x,d)){let t=pi(e,{disabledIndices:d});li(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(!xd.has(e.key)||!l&&o||Hd(e,f)||!g.current)return;let s=a===`rtl`,c=s?gd:_d,p=s?_d:gd,m=n===`vertical`?hd:c,_=n===`vertical`?md:p,y=en(e.nativeEvent);if(y!=null&&Td(y)&&!Rd(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=ui(v,d),T=di(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=pi(v.current,{startingIndex:b,decrement:D,disabledIndices:d})),b!==x&&!li(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=en(e.nativeEvent);!t||n==null||!Td(n)||n.setSelectionRange(0,n.value.length)},onKeyDown:T},highlightedIndex:x,onHighlightedIndexChange:S,elementsRef:v,onMapChange:C,relayKeyboardEvent:T}}function Vd(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(!(!i||mi(e,r,t))){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function Hd(e,t){for(let n of Cd)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}var Ud=Y.createContext(void 0);function Wd(e=!1){let t=Y.useContext(Ud);if(t===void 0&&!e)throw Error(et(16));return t}function Gd(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}=Bd({grid:d,loopFocus:f,onLoop:p,orientation:u,highlightedIndex:c,onHighlightedIndexChange:l,rootRef:_,stopEventPropagation:g,enableHomeAndEndKeys:m,direction:ol(),disabledIndices:v,modifierKeys:y}),k=Oa(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)(Ud.Provider,{value:A,children:(0,J.jsx)(jd,{elementsRef:E,onMapChange:e=>{h?.(e),D(e)},children:k})})}var Kd=`data-valid`,qd=`data-invalid`,Jd={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Yd={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Xd={valid(e){return e===null?null:e?{[Kd]:``}:{[qd]:``}}},Zd={invalid:void 0,name:void 0,validityData:{state:Jd,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:Yd,registerFieldControl:Xe,validation:{getValidationProps:(e,t=Qe)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:Xe,getInputControl:()=>null,commit:async()=>{},change:Xe}},Qd=Y.createContext(Zd);function $d(e=!0){let t=Y.useContext(Qd);if(t.setValidityData===Xe&&!e)throw Error(et(28));return t}function ef(e,t,n,r,i=!0,a){let{registerFieldControl:o}=$d(),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 tf=Y.createContext({controlId:void 0,registerControlId:Xe,resetControlId:Xe,labelId:void 0,setLabelId:Xe,messageIds:[],setMessageIds:Xe,getDescriptionProps:e=>e});function nf(){return Y.useContext(tf)}var rf=Y.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:Xe,validationMode:`onSubmit`,submitCountRef:{current:0}});function af(){return Y.useContext(rf)}Object.keys(Jd);function of(e,t){return e.matches(`:disabled`)?!1:!t||e.form===t||e.form===null&&!e.hasAttribute(`form`)}var sf=Y.createContext(void 0);function cf(e=!1){let t=Y.useContext(sf);if(!t&&!e)throw Error(et(86));return t}function lf(e,t){let n=Y.useRef(e),r=$(t);X(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}var uf=Y.createContext(void 0);function df(){return Y.useContext(uf)}var ff=[Sd],pf=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}=$d(),{labelId:E}=nf(),{clearErrors:D,elementRef:O}=af(),k=cf(!0),A=b||i,j=y??d,M=Kc(p),[N,P]=pd({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=mr(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&&of(t,e))return N??null;return null});ef(z,M,N??null,W,!A,d),lf(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)(uf.Provider,{value:re,children:(0,J.jsx)(Gd,{render:n,className:r,style:m,state:G,props:[ie,h,e=>S.getValidationProps(A??!1,e)],refs:[t],stateAttributesMapping:Xd,enableHomeAndEndKeys:!1,modifierKeys:ff})})}),mf=`data-checked`,hf=`data-unchecked`,gf={checked(e){return e?{[mf]:``}:{[hf]:``}},...fn,...Xd};function _f(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(kt(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 vf(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 yf(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=Y.useRef(null),s=Wd(!0),c=a??s!==void 0,{props:l}=vf({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=Y.useCallback(()=>{let e=o.current;bf(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 ha({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(Ta(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=bf(r),s=!i&&xf(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(),_f(r,e));return}if(!l||i||!d&&!u){n&&s&&d&&e.preventDefault();return}e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),_f(r,e)))},onKeyUp(e){if(!t){if(Ta(e),a?.(e),e.target===e.currentTarget&&i&&c&&bf(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),_f(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 bf(e){return Nt(e)&&e.tagName===`BUTTON`}function xf(e){return Nt(e)&&e.tagName===`A`&&!!e.href}function Sf(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=Ad(),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 Cf(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Wd(),{ref:i,index:a}=Sf(e),o=n===a,s=Y.useRef(null),c=mr(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 wf(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}=Cf({metadata:s});return Oa(l,e,{state:i,ref:[f,...o],props:[d,...a,u],stateAttributesMapping:c})}function Tf(e,t,n){let{setFocused:r,focusOwnerRef:i}=$d(),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 Ef=Y.createContext({disabled:!1});function Df(){return Y.useContext(Ef)}function Of(e,t,n,r=!0,i,a){let[o,s]=Y.useState(),c=Kc(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:kf(n.current,c);o!==i&&s(i)}),u}function kf(e,t){let n=Af(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function Af(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 jf(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=nf(),o=Kc(),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 Mf(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var Nf=Y.createContext(void 0);function Pf(){let e=Y.useContext(Nf);if(e===void 0)throw Error(et(52));return e}var Ff=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=df(),{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}=$d(),A=Df(),{labelId:j,getDescriptionProps:M}=nf(),N=k||A.disabled||h||i,P=g||a,F=_||o,I=v,L=m?y===c:c===``,R=Y.useRef(null),z=Tf(N,R),B=Y.useRef(null),V=x?.registerInput,H=mr(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=Kc(),te=jf({id:d}),U=u?void 0:te,W={role:`radio`,"aria-checked":L,"aria-labelledby":Of(s,j,B,!u,U,p[`aria-label`]),[zd]: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&&_f(t,e)},onFocus(e){z(!0),!(e.defaultPrevented||N||P||!b)&&(B.current?.click(),w(!1))},onBlur(){m||z(!1)}},{getButtonProps:ne,buttonRef:G}=yf({disabled:N,native:u,composite:!1}),re={type:`radio`,ref:H,form:I,id:U,name:S,tabIndex:-1,style:S?Pr:Nr,"aria-hidden":!0,...c===void 0?Qe:{value:Mf(c)},disabled:N,checked:L,required:F,readOnly:P,onChange(e){if(e.nativeEvent.defaultPrevented||N||P||c===void 0)return;let t=Q(Hn,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=Oa(`span`,e,{enabled:!oe,state:ie,ref:se,props:ce,stateAttributesMapping:gf});return(0,J.jsxs)(Nf.Provider,{value:ae,children:[oe?(0,J.jsx)(wf,{tag:`span`,render:n,className:r,style:f,state:ie,refs:se,props:ce,stateAttributesMapping:gf}):le,(0,J.jsx)(`input`,{...re,suppressHydrationWarning:!0})]})}),If=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=Pf(),c=s.checked,{mounted:l,transitionStatus:u,setMounted:d}=yo(c),f={...s,transitionStatus:u},p=Y.useRef(null),m=a||l,h=Oa(`span`,e,{ref:[t,p],state:f,props:o,stateAttributesMapping:gf});return wo({batch:!0,enabled:!c,open:c,ref:p,onComplete(){c||d(!1)}}),m?h:null});function Lf({className:e,disabled:t=!1,onKeyDown:n,...r}){return(0,J.jsx)(pf,{"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 Rf({className:e,disabled:t,...n}){return(0,J.jsx)(Ff,{"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)(If,{className:`h-2 w-2 rounded-full bg-primary`})})}function zf({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)(Rf,{value:e,disabled:t,"aria-labelledby":i}),r]})}var Bf=Y.createContext(void 0);function Vf(e){let t=Y.useContext(Bf);if(t===void 0&&!e)throw Error(et(33));return t}var Hf=Y.createContext(void 0);function Uf(e){let t=Y.useContext(Hf);if(t===void 0&&!e)throw Error(et(36));return t}var Wf=Y.createContext(void 0);function Gf(e=!0){let t=Y.useContext(Wf);if(t===void 0&&!e)throw Error(et(25));return t}var Kf=Y.createContext(null);function qf(e=`root`){let t=Y.useContext(Kf),n=Y.useContext(Hf);return t===null||n===void 0?null:(e===`submenu-trigger`?n.virtualFocus||n.parentVirtualFocus:n.virtualFocus)?t:null}var Jf={visible:!0,ref:null};function Yf(){return Jf}function Xf(e,t,n=`root`){let r=qf(n),i=((n===`submenu-trigger`?r?.useSubmenuTrigger:r?.useItem)??Yf)({label:e.label,children:e.children,render:e.render}),a=mr(t,i.ref);return{visible:i.visible,ref:a,props:i.props}}var Zf=Y.createContext(void 0);function Qf(){let e=Y.useContext(Zf);if(e===void 0)throw Error(et(30));return e}function $f(e){e.preventDefault()}function ep(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,l=Uf(),u=Gf(!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?$f: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:qn})},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`&&_f(s.current,e,{detail:1,pointerType:`mouse`})}}),[t,_,r,m,i,a.context.allowMouseUpTriggerRef,o,s,u,g,c.type,p,f])}var tp={type:`regular-item`};function np(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}=yf({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),p=ep({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:u,itemMetadata:c}),m=Y.useCallback(e=>ha(p,{onMouseEnter(e){c.type===`submenu-trigger`&&c.setActive(e.nativeEvent)}},e,d),[p,d,c]),h=mr(u,f);return Y.useMemo(()=>({getItemProps:m,itemRef:h}),[m,h])}var rp=`data-checked`,ip=`data-unchecked`,ap={checked(e){return e?{[rp]:``}:{[ip]:``}},...fn},op=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}=Uf(),m=Sf({guess:!0,label:a}),h=Kc(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}=np({closeOnClick:c,disabled:b,highlighted:_,id:h,store:p,nativeButton:o,nodeId:v,itemMetadata:tp}),C=Y.useMemo(()=>({disabled:b,highlighted:_,checked:l}),[b,_,l]);function w(e){let t=Q(qn,e.nativeEvent,void 0,{preventUnmountOnClose:Xe});u?.(!l,t)}let T=Oa(`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)(Zf.Provider,{value:C,children:T})}),sp=Y.forwardRef(function(e,t){let{checked:n,defaultChecked:r,onCheckedChange:i,...a}=e,[o,s]=pd({controlled:n,default:r??!1,name:`MenuCheckboxItem`,state:`checked`}),c=Xf(e,t);function l(e,t){i?.(e,t),t.isCanceled||s(e)}return c.visible?(0,J.jsx)(op,{...a,checked:o,onCheckedChange:l,ref:c.ref}):null}),cp=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=Qf(),c=Y.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=yo(s.checked);return wo({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}}),Oa(`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})}),lp=Y.createContext(void 0);function up(){let e=Y.useContext(lp);if(e===void 0)throw Error(et(31));return e}var dp=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=Y.useState(void 0),c=Oa(`div`,e,{ref:t,props:{role:`group`,"aria-labelledby":o,...a}});return(0,J.jsx)(lp.Provider,{value:s,children:c})}),fp=Y.forwardRef(function(e,t){return(0,J.jsx)(qf()?.Group??dp,{...e,ref:t})}),pp=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Kc(a),c=up();return X(()=>(c(s),()=>{c(e=>e===s?void 0:e)}),[c,s]),Oa(`div`,e,{ref:t,props:{id:s,"aria-hidden":!0,...o}})}),mp=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}=Uf(),f=Sf({guess:!0,label:a}),p=Kc(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}=np({closeOnClick:c,disabled:v,highlighted:h,id:p,store:d,nativeButton:o,nodeId:g,itemMetadata:tp});return Oa(`div`,e,{state:{disabled:v,highlighted:h},props:[_,u,y],ref:[b,t,f.ref]})}),hp=Y.forwardRef(function(e,t){let n=Xf(e,t);return n.visible?(0,J.jsx)(mp,{...e,ref:n.ref}):null}),gp=Y.createContext(void 0);function _p(e){let t=Y.useContext(gp);if(t===void 0&&!e)throw Error(et(69));return t}var vp=Y.createContext(void 0);function yp(){return Y.useContext(vp)}function bp(e,t){let n=Ma(e.render);if(Y.isValidElement(n)){let e=n.props;if(Object.hasOwn(e,`id`))return e.id??``}return e.id??t}function xp(e,t,n){let r=bp(e,t),i=r===t?void 0:r;return[r,Y.useCallback(e=>n?.(e?i:void 0),[i,n])]}function Sp(e,t,n){let r=Ma(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 Cp=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}=Uf(),m=yp(),{side:h,align:g}=Vf(),_=_p(!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]=xp(e,u,d),L=Sp(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),wo({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]),vs(D,{enabled:A&&!j&&!z&&w.type!==`menubar`,closeDelay:k});let V=l.useStateSetter(`popupElement`),{parentVirtualFocusRef:H,handleFocus:ee}=(Y.useContext(Kf)?.useParentHandoff??Tp)(l,w,v,f),te=Oa(`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:En,props:[b,{id:F,...P?{role:`presentation`}:{role:`menu`,"aria-orientation":p===`horizontal`?`horizontal`:void 0,"aria-labelledby":L},onKeyDown(e){R?.onPopupKeyDown?.(e),_&&xd.has(e.key)&&e.stopPropagation()},onFocus:ee},Cl(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)(lo,{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})}),wp={parentVirtualFocusRef:void 0,handleFocus:void 0};function Tp(){return wp}var Ep=Y.forwardRef(function(e,t){return(0,J.jsx)(qf()?.Popup??Cp,{...e,ref:t})}),Dp=Y.createContext(void 0);function Op(){let e=Y.useContext(Dp);if(e===void 0)throw Error(et(32));return e}var kp=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i,parent:a}=Uf();if(!(i.useState(`mounted`)||n))return null;let o=a.type===`menu`||a.type===`menubar`?`group`:void 0;return(0,J.jsx)(Dp.Provider,{value:n,children:(0,J.jsx)(Wa,{ref:t,...r,portalOwnerRole:o})})}),Ap=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 jp(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=Y.useRef(null),o=Y.useRef(null),s=Co(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 Mp={},Np={},Pp=``;function Fp(e,t){return Ft(e)?e:t}function Ip(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Fp(t,n)).overflowY)}function Lp(e){if(typeof document>`u`)return!1;let t=jr(e);return kt(t).innerWidth-t.documentElement.clientWidth>0}function Rp(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=jr(e),n=t.documentElement,r=t.body,i=Fp(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 zp(e){let t=jr(e),n=t.documentElement,r=t.body,i=Fp(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 Bp(e){let t=jr(e),n=t.documentElement,r=t.body,i=kt(n),a=0,o=0,s=!1,c=kr.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,Mp={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Pp=n.style.scrollBehavior,Np={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=Fp(n,r);if(s=Rp(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,Mp),Object.assign(r.style,Np),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Pp)}function d(){u(),c.request(l)}l();let f=fr(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var Vp=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=jr(e),n=t.documentElement,r=t.body,i=kt(n);if(Ip(i,n,r)){let t=new i.MutationObserver(()=>{Ip(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||!Lp(e);this.restore=a?zp(e):Bp(e)}};function Hp(e=!0,t=null){X(()=>{if(e)return Vp.acquire(t)},[e,t])}var Up=20;function Wp(e,t,n,r){let[i,a]=Y.useState(!1);X(()=>{if(!e||!t||n==null){a(!1);return}let r=jr(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-Up)},[e,t,n]),Hp(e&&(!t||i),r)}var Gp=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=La,style:g,..._}=e,{store:v,virtualFocus:y,syncHighlightedItem:b}=Uf(),x=Op(),S=Gf(!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??Ra):C.type===`menubar`&&(te??=C.context.orientation===`vertical`?`inline-end`:`bottom`,U??=`start`);let W=C.type===`context-menu`,ne=bl({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(ir)))}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(ir))}):v.setOpen(!1,Q(ir))}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]),jp({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;Wp(D&&(ie||O&&F!==`trigger-hover`),k===`touch`,M,A);let ae=wl(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)(Bf.Provider,{value:ne,children:[oe&&(0,J.jsx)(Ap,{ref:C.type===`context-menu`||C.type===`nested-context-menu`?C.context.internalBackdropRef:null,inert:Ol(!D),cutout:se}),(0,J.jsx)(Qa,{id:I,children:(0,J.jsx)(jd,{elementsRef:v.context.itemDomElements,labelsRef:v.context.itemLabels,onMapChange:b,children:ae})})]})}),Kp=Y.createContext(null);function qp(e){let t=Y.useContext(Kp);if(t===null&&!e)throw Error(et(5));return t}function Jp(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 Yp(e,t){let{onClick:n,onPointerDown:r}=Jp($((n,r)=>{(typeof e==`function`?e():e)||t(r||(pt?`touch`:``))}));return Y.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function Xp(e){let[t,n]=Y.useState(null),r=Yp(e,n);return lf(e,t=>{t&&!e&&n(null)}),Y.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}function Zp(e){return e==null?Hn:e.type.startsWith(`key`)?er:e.type.startsWith(`mouse`)||e.type.startsWith(`pointer`)?tr:Hn}var Qp={...cs,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=cs.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`&&!cs.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`)}},$p=class extends $o{constructor(e,t,n=!1){let r=new Bo,i=tm(r,t,n,e);super(i,em(r),Qp),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 em(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 tm(e,t,n=!1,r){return{...ns(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 Ka,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Qe,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}var nm=Y.createContext(null);function rm(e,t){return(e===`trigger-press`||e===`item-press`)&&t?.detail===0}function im(e,t){return e===`list-navigation`||rm(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=Gf(!0),C=Uf(!0),w=qp(!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=Kc(),k=Kc(),[A,j]=Y.useState(void 0),M=(A??k)||void 0,N=Ya(),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 $p({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=Za(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}=Xp(B);L.useSyncedValues({disabled:s,highlightItemOnHover:g,modal:W.type===void 0?c:void 0,openMethod:de,rootId:O}),Io(L);let{forceUnmount:pe,transitionStatus:me}=Lo(B,L,()=>{L.set(`allowMouseEnter`,!1)},F),he=Co(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=No(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=Mo(L.state,e,t.trigger,i());s.openChangeReason=n,s.keyboardOpen=e&&im(n,a),W.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?s.instantType=`group`:rm(n,a)?s.instantType=`click`:o?s.instantType=`dismiss`:s.instantType=void 0,L.update(s)}),_e=vo({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(or))},[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=_o(_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=ol(),Ce=Ds(_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,Zp(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=Os(_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,er,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=Hn,L.context.highlightEvent=void 0,a&&Te(t,Vn(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=ha(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=ha(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)),Ro(L,{floatingRootContext:_e,activeTriggerProps:ke,inactiveTriggerProps:Ae,popupProps:Y.useMemo(()=>ha(Eo,{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)(Hf.Provider,{value:je,children:[p&&(0,J.jsx)(ko,{handle:p,store:L}),Me]});return(W.type===void 0||W.type===`context-menu`)&&(Ne=(0,J.jsx)($a,{externalTree:R,children:Ne})),Ne});function om(e){let t=Y.useContext(nm);if(t===null)return(0,J.jsx)(am,{...e});let n=t.Root;return(0,J.jsx)(nm.Provider,{value:null,children:(0,J.jsx)(n,{...t.options,...e})})}var sm={};function cm(e){Uf();let t=Y.useContext(nm);if(t!==null){let n=t.SubmenuRoot;return(0,J.jsx)(nm.Provider,{value:null,children:(0,J.jsx)(n,{...t.options,...e})})}return(0,J.jsx)(vp.Provider,{value:sm,children:(0,J.jsx)(am,{...e,isSubmenu:!0})})}var lm=5;function um(e,t){let n=dm(t);return e.clientX>=n.left-lm&&e.clientX<=n.right+lm&&e.clientY>=n.top-lm&&e.clientY<=n.bottom+lm}function dm(e){let t=e.getBoundingClientRect(),n=kt(e);if(bt)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 fm(e){if(Nt(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`);if(!Gt(e))return fm(Jt(e))}function pm(e,t){function n(n,r,i){let a=n.currentTarget;He.flushSync(()=>{e.setOpen(!1,Q(Zn,n.nativeEvent,a))}),Ii(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&&Li(t,r)?e.context.beforeContentFocusGuardRef.current?.focus():n(t,1,r)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function mm(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,jr(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:Qe,[t,n,r])}var hm=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=Uf(!0),h=ls(d)??m?.store;if(!h)throw Error(et(85));let g=Kc(s),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerControlsId`,g),x=Y.useRef(null),S=_m(),C=Wd(!0),w=Xa(),T=Y.useMemo(()=>w??new Ka,[w]),{registerTrigger:E,isMountedByThisTrigger:D}=Fo(g,x,h,{payload:f,closeDelay:u,parent:S,floatingTreeRoot:T,floatingNodeId:Za(T),floatingParentNodeId:Ya(),keyboardEventRelay:C?.relayKeyboardEvent}),O=S.type===`menubar`,k=h.useState(`disabled`),A=a||k||O&&S.context.disabled,{getButtonProps:j,buttonRef:M}=yf({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&&fm(t)===h.select(`rootId`)||um(e,N.current)||T.events.emit(`close`,{domEvent:e,reason:rr})});Y.useEffect(()=>{let e=jr(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=bs(v,{enabled:(c??I)&&!A&&(!O||I&&!D),handleClose:Is({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=gm(y,h.select(`lastOpenChangeReason`)),z=uo(v,{enabled:!A,event:y&&O?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:S.type===void 0&&R}),B=fs(v,{enabled:!A&&I}),V=mm({open:y,enabled:O,mouseDownAction:`open`}),H=Y.useMemo(()=>ha(B.reference,z.reference),[B.reference,z.reference]),ee=h.useState(`triggerProps`,D),te=h.useState(`filterTriggerProps`),{handlePreFocusGuardFocus:U,handleFocusTargetFocus:W}=pm(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}),jr(e.currentTarget).addEventListener(`mouseup`,F,{once:!0}))}},te,O?{role:`menuitem`}:{},V,p,j],ie=Oa(`button`,e,{enabled:!O,stateAttributesMapping:wn,state:ne,ref:G,props:re});return O?(0,J.jsx)(wf,{tag:`button`,render:n,className:r,style:i,state:ne,refs:G,props:re,stateAttributesMapping:wn}):y?(0,J.jsxs)(Y.Fragment,{children:[(0,J.jsx)(Fr,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:U},`${g}-pre-focus-guard`),(0,J.jsx)(Y.Fragment,{children:ie},g),(0,J.jsx)(Fr,{ref:h.context.triggerFocusTargetRef,onFocus:W},`${g}-post-focus-guard`)]}):(0,J.jsx)(Y.Fragment,{children:ie},g)});function gm(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 _m(){let e=qp(!0);return Y.useMemo(()=>e?{type:`menubar`,context:e}:{type:void 0},[e])}var vm=Y.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return Oa(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})}),ym={"aria-expanded":void 0},bm=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=Uf(!0);if(p?.parent.type!==`menu`)throw Error(et(37));let m=Vf(),h=yp(),{store:g,parentVirtualFocus:_}=p,v=p.parent.store,y=Sf({guess:!0,label:a}),b=Kc(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=jo(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){en(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,tr,e)}}),[v,y.index]),{getItemProps:L,itemRef:R}=np({closeOnClick:!1,disabled:N,highlighted:F,id:b,store:g,typingRef:v.context.typingRef,nativeButton:s,itemMetadata:I,nodeId:m?.context.nodeId}),z=bs(w,{enabled:g.useState(`hoverEnabled`)&&c&&!N,handleClose:Is({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=uo(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&&yt;return Oa(`div`,e,{state:H,stateAttributesMapping:Cn,props:[B,z,V,h?.onTriggerKeyDown?{onKeyDown:h.onTriggerKeyDown}:void 0,P,U?ym:void 0,{"aria-controls":E,tabIndex:_||!(x||F)?-1:0,onFocus(e){g.select(`open`)&&S.current&&(S.current=!1,g.setOpen(!1,Q(Zn,e.nativeEvent)))},onBlur(){F&&v.setActiveIndex(null,Hn)}},f,L],ref:[t,y.ref,R,O,A]})}),xm=Y.forwardRef(function(e,t){let n=Xf(e,t,`submenu-trigger`);if(!n.visible)return null;let r=n.props?ha(n.props,e):e;return(0,J.jsx)(bm,{...r,ref:n.ref})});function Sm(e){return Array.isArray(e)?e.map(e=>Sm(e)).join(`,`):e==null?``:String(e)}function Cm(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function wm(e){return Cm(e?.[0])}function Tm(e){return wm(e)?e.flatMap(e=>e.items):e}function Em(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(wm(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 Dm(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 Mf(e)}function Om(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?Mf(e.value):Mf(e)}function km(e,t,n){function r(){return Dm(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=Tm(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 Am(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,J.jsx)(Y.Fragment,{children:km(r,t,n)},i)),e),[])}var jm=Y.createContext(void 0);function Mm(){let e=Y.useContext(jm);if(e===void 0)throw Error(et(53));return e}function Nm(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 Pm=`base-ui-disable-scrollbar`,Fm={className:Pm,getElement(e){return(0,J.jsx)(`style`,{nonce:e,href:Pm,precedence:`base-ui:low`,children:`.${Pm}{scrollbar-width:none}.${Pm}::-webkit-scrollbar{display:none}`})}},Im=`data-has-overflow-x`,Lm=`data-has-overflow-y`,Rm=`data-overflow-x-start`,zm=`data-overflow-x-end`,Bm=`data-overflow-y-start`,Vm=`data-overflow-y-end`,Hm=e=>t=>t?{[e]:``}:null,Um={hasOverflowX:Hm(Im),hasOverflowY:Hm(Lm),overflowXStart:Hm(Rm),overflowXEnd:Hm(zm),overflowYStart:Hm(Bm),overflowYEnd:Hm(Vm),cornerHidden:()=>null},Wm=Y.createContext(void 0),Gm={disableStyleElements:!1};function Km(){return Y.useContext(Wm)??Gm}var qm=`--scroll-area-corner-height`,Jm=`--scroll-area-corner-width`,Ym=`data-orientation`,Xm={x:0,y:0},Zm={width:0,height:0},Qm={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},$m={x:!0,y:!0,corner:!0},eh=Y.forwardRef(function(e,t){let{render:n,className:r,overflowEdgeThreshold:i,style:a,...o}=e,{xStart:s,xEnd:c,yStart:l,yEnd:u}=th(i),d=Kc(),f=ot(),p=ot(),{nonce:m,disableStyleElements:h}=Km(),[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(Zm),[O,k]=Y.useState(Zm),[A,j]=Y.useState(Qm),[M,N]=Y.useState($m),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(Xm),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(Ym);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=Nm(i,`padding`,a),s=Nm(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`,[qm]:`${E.height}px`,[Jm]:`${E.width}px`}},pe=Oa(`div`,e,{state:de,ref:[t,P],props:[fe,o],stateAttributesMapping:Um}),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)(jm.Provider,{value:me,children:[!h&&Fm.getElement(m),pe]})});function th(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 nh(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var rh=Y.createContext(void 0);function ih(){let e=Y.useContext(rh);if(e===void 0)throw Error(et(55));return e}function ah(e,t){return Math.max(0,e-t)}function oh(e,t){if(t<=0)return 0;let n=nh(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 sh=`--scroll-area-overflow-x-start`,ch=`--scroll-area-overflow-x-end`,lh=`--scroll-area-overflow-y-start`,uh=`--scroll-area-overflow-y-end`,dh=`--scroll-area-thumb-height`,fh=`--scroll-area-thumb-width`,ph=[sh,ch,lh,uh],mh=!1;function hh(){mh||vt||(typeof CSS<`u`&&`registerProperty`in CSS&&ph.forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),mh=!0)}var gh=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}=Mm(),T=ol(),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=_h(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=oh(T===`rtl`?-w:w,P),L=P-I);let R=A?0:oh(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=Nm(n,`padding`,`x`),G=Nm(t,`padding`,`y`),re=Nm(i,`margin`,`x`),ie=Nm(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=>vh(e,{width:le,height:ue})),t&&r){let e=yh(r,dh,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=yh(i,fh,T===`rtl`?-w:w,P,_,le,e);i.style.transform=`translate3d(${T===`rtl`?-t:t}px,0,0)`}let de=[I,L,R,z];ph.forEach((t,n)=>{e.style.setProperty(t,`${de[n]}px`)}),a&&p(e=>vh(e,{width:H,height:ee})),g(e=>vh(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=>vh(e,fe))});X(()=>{hh()},[]),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=bo(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:Fm.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=Oa(`div`,e,{ref:[t,o],state:w,props:[M,a],stateAttributesMapping:Um}),P=Y.useMemo(()=>({computeThumbPosition:A}),[A]);return(0,J.jsx)(rh.Provider,{value:P,children:N})});function _h(e){let t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function vh(e,t){for(let n in t)if(e[n]!==t[n])return t;return e}function yh(e,t,n,r,i,a,o){let s=nh(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 bh=Y.createContext(void 0);function xh(){let e=Y.useContext(bh);if(e===void 0)throw Error(et(54));return e}var Sh=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}=Mm(),T=i===`vertical`,E={...w,hovering:c,scrolling:T?u:l,orientation:i},D=ol(),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 fr(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=en(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=Nm(n,`margin`,a),s=Nm(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(${qm})`,insetInlineEnd:0,[dh]:`${S.height}px`}:{insetInlineStart:0,insetInlineEnd:`var(${Jm})`,bottom:0,[fh]:`${S.width}px`}}},M=Oa(`div`,e,{ref:[t,T?f:p],state:E,props:[j,s],stateAttributesMapping:Um});return A?(0,J.jsx)(bh.Provider,{value:i,children:M}):null}),Ch=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{computeThumbPosition:o}=ih(),{hasMeasuredScrollbar:s,viewportState:c}=Mm(),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]),Oa(`div`,e,{ref:[t,l],state:c,stateAttributesMapping:Um,props:[{role:`presentation`,style:{minWidth:`fit-content`}},a]})}),wh=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}=Mm(),m=xh(),h=m===`vertical`;return Oa(`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]})}),Th=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{cornerRef:o,cornerSize:s,hiddenState:c}=Mm(),l=Oa(`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 Eh({className:e,children:t,viewportClassName:n,...r}){return(0,J.jsxs)(eh,{"data-slot":`scroll-area`,className:q(`relative`,e),...r,children:[(0,J.jsx)(gh,{"data-slot":`scroll-area-viewport`,className:q(`w-full rounded-[inherit] outline-none`,n??`h-full`),children:(0,J.jsx)(Ch,{"data-slot":`scroll-area-content`,style:{minWidth:0},children:t})}),(0,J.jsx)(Dh,{}),(0,J.jsx)(Th,{})]})}function Dh({className:e,...t}){return(0,J.jsx)(Sh,{"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)(wh,{"data-slot":`scroll-area-thumb`,className:`relative flex-1 rounded-full bg-muted-foreground/40 transition-colors hover:bg-muted-foreground/70`})})}var Oh=`min-w-[13rem] rounded-md border border-[var(--color-border)] bg-[var(--color-card)] text-[var(--color-card-foreground)] shadow-md outline-none`;function kh({children:e}){return(0,J.jsx)(Eh,{viewportClassName:`max-h-[var(--available-height)]`,children:(0,J.jsx)(`div`,{className:`p-1`,children:e})})}var Ah=`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`,jh=om,Mh=fp,Nh=cm,Ph=`data-[popup-open]:bg-[var(--color-accent)] data-[popup-open]:text-[var(--color-accent-foreground)]`;function Fh({className:e,...t}){return(0,J.jsx)(hm,{className:typeof e==`function`?e:q(Ph,e),...t})}function Ih({className:e,sideOffset:t=6,align:n=`start`,children:r,...i}){return(0,J.jsx)(kp,{children:(0,J.jsx)(Gp,{sideOffset:t,align:n,className:`z-50 outline-none`,children:(0,J.jsx)(Ep,{className:q(Oh,e),...i,children:(0,J.jsx)(kh,{children:r})})})})}function Lh({className:e,...t}){return(0,J.jsx)(hp,{className:q(Ah,e),...t})}function Rh({className:e,children:t,closeOnClick:n=!1,...r}){return(0,J.jsxs)(sp,{className:q(Ah,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)(cp,{children:(0,J.jsx)(su,{className:`h-3.5 w-3.5`})})}),t]})}function zh({className:e,children:t,...n}){return(0,J.jsxs)(xm,{className:q(Ah,`data-[popup-open]:bg-[var(--color-accent)]`,e),...n,children:[t,(0,J.jsx)(lu,{className:`ml-auto h-3.5 w-3.5 shrink-0 opacity-70`})]})}function Bh({className:e,children:t,...n}){return(0,J.jsx)(kp,{children:(0,J.jsx)(Gp,{side:`right`,align:`start`,sideOffset:2,className:`z-50 outline-none`,children:(0,J.jsx)(Ep,{className:q(Oh,e),...n,children:(0,J.jsx)(kh,{children:t})})})})}function Vh({className:e,...t}){return(0,J.jsx)(vm,{className:q(`-mx-1 my-1 h-px bg-[var(--color-border)]`,e),...t})}function Hh({className:e,...t}){return(0,J.jsx)(pp,{className:q(`px-2 py-1.5 text-xs font-semibold text-[var(--color-muted-foreground)]`,e),...t})}function Uh(e){return Oa(e.defaultTagName??`div`,e,e)}function Wh({className:e,orientation:t=`horizontal`,...n}){return(0,J.jsx)(vm,{orientation:t,"data-slot":`separator`,className:q(`shrink-0 bg-border`,t===`horizontal`?`h-px w-full`:`h-full w-px`,e),...n})}function Gh({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`skeleton`,className:q(`animate-pulse rounded-md bg-accent`,e),...t})}var Kh=Y.createContext(void 0);function qh(e){let t=Y.useContext(Kh);if(!e&&t===void 0)throw Error(et(27));return t}var Jh=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=qh(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return Oa(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:En,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),Yh=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=qh(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=yf({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,Q(Jn,e.nativeEvent))}return Oa(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),Xh=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=qh(),c=Kc(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),Oa(`p`,e,{ref:t,props:[{id:c},o]})}),Zh=Y.createContext(void 0);function Qh(){let e=Y.useContext(Zh);if(e===void 0)throw Error(et(26));return e}var $h=`--nested-dialogs`,eg=`data-nested-dialog-open`,tg={...Tn,...fn,nestedDialogOpen(e){return e?{[eg]:``}:null}},ng=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=qh(),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`);Qh(),wo({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let C=o===void 0?Do(c.context.popupRef):o,w=g>0,T=c.useStateSetter(`popupElement`),E=Oa(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:w},props:[f,{id:S,"aria-labelledby":y,"aria-describedby":l,role:x,...Eo,hidden:!m,onKeyDown(e){xd.has(e.key)&&e.stopPropagation()},style:{[$h]:g}},s],ref:[t,c.context.popupRef,T],stateAttributesMapping:tg});return(0,J.jsx)(lo,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:C,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:E})}),rg=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=qh(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,J.jsx)(Zh.Provider,{value:n,children:(0,J.jsxs)(Wa,{ref:t,...r,children:[a&&o===!0&&(0,J.jsx)(Ap,{ref:i.context.internalBackdropRef,inert:Ol(!s)}),e.children]})}):null});function ig({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=_o(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=en(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 Hp(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]),Ro(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var ag={...cs,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},og=class extends $o{constructor(e,t,n){let r=new Bo,i=sg(e,r,t,n);super(i,cg(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(Mo(this.state,e,t.trigger)))}};function sg(e,t,n,r=!1){return{...ns(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 cg(e){return{popupRef:Y.createRef(),backdropRef:Y.createRef(),internalBackdropRef:Y.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function lg(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=qh(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},b=Oo((e,t)=>new og({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`);zo(b,x),Io(b);let{forceUnmount:w}=Lo(x,b);Y.useImperativeHandle(l,()=>({unmount:w,close:()=>b.setOpen(!1,Q(or))}),[w,b]);let T=x||S||u!=null;return(0,J.jsxs)(Kh.Provider,{value:b,children:[u&&(0,J.jsx)(ko,{handle:u,store:b}),T&&(0,J.jsx)(ig,{store:b,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:C}):n]})}var ug=qe(function(e){return lg(`dialog`,e)}),dg=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=qh(),c=Kc(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),Oa(`h2`,e,{ref:t,props:[{id:c},o]})}),fg=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=qh(!0),f=ls(l)??d;if(!f)throw Error(et(79));let p=Kc(s),m=f.useState(`floatingRootContext`),h=f.useState(`isOpenedByTrigger`,p),g=f.useState(`triggerPopupId`,p),_=Y.useRef(null),{registerTrigger:v,isMountedByThisTrigger:y}=Fo(p,_,f,{payload:c}),{getButtonProps:b,buttonRef:x}=yf({disabled:a,native:o}),S=uo(m),C=Yp(()=>f.select(`open`),e=>{f.set(`openMethod`,e)}),w={disabled:a,open:h},T=f.useState(`triggerProps`,y);return Oa(`button`,e,{state:w,ref:[x,t,v,_],props:[S.reference,T,C,{[Ia]:``,id:p,"aria-haspopup":`dialog`,"aria-expanded":h,"aria-controls":g},u,b],stateAttributesMapping:Cn})});function pg(e){return(0,J.jsx)(ug,{...e})}function mg({className:e,children:t,side:n=`left`,...r}){return(0,J.jsxs)(rg,{children:[(0,J.jsx)(Jh,{className:`fixed inset-0 z-50 bg-black/40 backdrop-blur-[1px]`}),(0,J.jsx)(ng,{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 hg({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`sheet-header`,className:q(`flex flex-col gap-1 p-4`,e),...t})}function gg({className:e,...t}){return(0,J.jsx)(dg,{className:q(`text-sm font-semibold`,e),...t})}function _g({className:e,...t}){return(0,J.jsx)(Xh,{className:q(`text-sm text-muted-foreground`,e),...t})}var vg=`(width < 48rem)`,yg=()=>typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(vg):void 0,bg=()=>yg()?.matches??!1;function xg(e){let t=yg();return t?.addEventListener(`change`,e),()=>t?.removeEventListener(`change`,e)}function Sg(){return(0,Y.useSyncExternalStore)(xg,bg,()=>!1)}var Cg=`16rem`,wg=`18rem`,Tg=`3rem`,Eg=`b`,Dg=Y.createContext(null);function Og(){let e=Y.useContext(Dg);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function kg(){return Y.useContext(Dg)}function Ag({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...o}){let s=Sg(),[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===Eg&&(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)(Dg.Provider,{value:g,children:(0,J.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":Cg,"--sidebar-width-icon":Tg,...i},className:q(`group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full`,r),...o,children:a})})}function jg({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a}){let{isMobile:o,state:s,openMobile:c,setOpenMobile:l}=Og();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)(pg,{open:c,onOpenChange:l,children:(0,J.jsxs)(mg,{"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":wg},side:e,children:[(0,J.jsxs)(hg,{className:`sr-only`,children:[(0,J.jsx)(gg,{children:`Sidebar`}),(0,J.jsx)(_g,{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 Mg({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 Ng({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 Pg({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 Fg({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 Ig({className:e,render:t=(0,J.jsx)(`div`,{}),...n}){return Uh({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 Lg({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 Rg({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 zg({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 Bg({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 Vg({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?su:uu;return(0,J.jsxs)(jl,{children:[(0,J.jsx)(Ml,{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)(Nl,{children:r?`Copied`:t})]})}var Hg=navigator.platform.startsWith(`Mac`)?`⌘B`:`Ctrl+B`;function Ug(){let{isMobile:e,setOpen:t}=Og();return e?null:(0,J.jsx)(Gg,{label:`Hide the sidebar`,onClick:()=>t(!1)})}function Wg(){let e=kg();if(!e)return null;let{isMobile:t,open:n,setOpen:r}=e;return t||n?null:(0,J.jsx)(Gg,{label:`Show the sidebar`,onClick:()=>r(!0)})}function Gg({label:e,onClick:t}){return(0,J.jsxs)(jl,{children:[(0,J.jsx)(Ml,{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)(mu,{className:`h-4 w-4`,"aria-hidden":!0})}),(0,J.jsxs)(Nl,{children:[e,` `,(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:Hg})]})]})}var Kg=`overview`,qg=`settings`;function Jg(e){return/^[a-z][a-z0-9]*$/.test(e)&&e!==`overview`&&e!==`settings`}function Yg(e,t){let n=new Set([Kg,qg,...t,...e]),r=new Map,i=new Map;for(let t of e){let e=Xg(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)}}Yg([],[]);function Xg(e){let t=e.lastIndexOf(`-`);return t>0?e.slice(0,t):``}function Zg({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 Qg({open:e,onOpenChange:t,title:n,children:r}){return(0,J.jsx)(ug,{open:e,onOpenChange:t,children:(0,J.jsxs)(rg,{children:[(0,J.jsx)(Jh,{className:`fixed inset-0 z-50 bg-black/40 backdrop-blur-[1px]`}),(0,J.jsxs)(ng,{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)(dg,{className:`text-sm font-semibold`,children:n}),(0,J.jsx)(Yh,{"aria-label":`Close`,className:`rounded p-0.5 text-muted-foreground outline-none hover:text-foreground`,children:(0,J.jsx)(gu,{className:`h-4 w-4`,"aria-hidden":!0})})]}),r]})]})})}var $g=`oa.pending-draft`;function e_(){try{return globalThis.sessionStorage}catch{return}}function t_(e){e_()?.setItem($g,e)}function n_(){let e=e_();if(!e)return null;let t=e.getItem($g);return t!==null&&e.removeItem($g),t}function r_({text:e,compact:t=!1}){return(0,J.jsx)(`div`,{className:t?`space-y-1.5 text-xs leading-relaxed`:`space-y-2.5 text-sm leading-5`,children:__(e.replace(/\r\n/g,`
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`);!vt&&dt.includes(`firefox`),!vt&&dt.includes(`chrom`);var yt=_t,bt=/jsdom|happydom/.test(dt);function xt(e){e.preventDefault(),e.stopPropagation()}function St(e){return`nativeEvent`in e}function Ct(e){return e.pointerType===``&&e.isTrusted?!0:ht&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function wt(e){return bt?!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 Tt(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Et(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function Dt(){return typeof window<`u`}function Ot(e){return jt(e)?(e.nodeName||``).toLowerCase():`#document`}function kt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function At(e){return((jt(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function jt(e){return Dt()?e instanceof Node||e instanceof kt(e).Node:!1}function Mt(e){return Dt()?e instanceof Element||e instanceof kt(e).Element:!1}function Nt(e){return Dt()?e instanceof HTMLElement||e instanceof kt(e).HTMLElement:!1}function Pt(e){return!Dt()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof kt(e).ShadowRoot}function Ft(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Kt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function It(e){return/^(table|td|th)$/.test(Ot(e))}function Lt(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Rt=/transform|translate|scale|rotate|perspective|filter/,zt=/paint|layout|strict|content/,Bt=e=>!!e&&e!==`none`,Vt;function Ht(e){let t=Mt(e)?Kt(e):e;return Bt(t.transform)||Bt(t.translate)||Bt(t.scale)||Bt(t.rotate)||Bt(t.perspective)||!Wt()&&(Bt(t.backdropFilter)||Bt(t.filter))||Rt.test(t.willChange||``)||zt.test(t.contain||``)}function Ut(e){let t=Jt(e);for(;Nt(t)&&!Gt(t);){if(Ht(t))return t;if(Lt(t))return null;t=Jt(t)}return null}function Wt(){return Vt??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Vt}function Gt(e){return/^(html|body|#document)$/.test(Ot(e))}function Kt(e){return kt(e).getComputedStyle(e)}function qt(e){return Mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Jt(e){if(Ot(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Pt(e)&&e.host||At(e);return Pt(t)?t.host:t}function Yt(e){let t=Jt(e);return Gt(t)?(e.ownerDocument||e).body:Nt(t)&&Ft(t)?t:Yt(t)}function Xt(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Yt(e),i=r===e.ownerDocument?.body,a=kt(r);if(i){let e=Zt(a);return t.concat(a,a.visualViewport||[],Ft(r)?r:[],e&&n?Xt(e):[])}else return t.concat(r,Xt(r,[],n))}function Zt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qt(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&&Pt(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function $t(e,t){let n=e;for(;n;){if(Mt(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(Pt(n)?n.host:null)}return null}function en(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var tn=`data-base-ui-focusable`,nn=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,rn=`ArrowLeft`,an=`ArrowRight`,on=`ArrowUp`,sn=`ArrowDown`,cn=`data-starting-style`,ln=`data-ending-style`,un={[cn]:``},dn={[ln]:``},fn={transitionStatus(e){return e===`starting`?un:e===`ending`?dn:null}},pn=`data-open`,mn=`data-closed`,hn=`data-anchor-hidden`,gn=`data-popup-open`,_n=`data-pressed`,vn={[gn]:``},yn={[gn]:``,[_n]:``},bn={[pn]:``},xn={[mn]:``},Sn={[hn]:``},Cn={open(e){return e?vn:null}},wn={open(e){return e?yn:null}},Tn={open(e){return e?bn:xn},anchorHidden(e){return e?Sn:null}},En={...Tn,...fn},Dn=`data-trigger-disabled`;function On(e,t){if(!Mt(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(Dn);for(let[,e]of t.entries())if(Z(e,n))return!e.hasAttribute(Dn);return!1}function kn(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 An(e){return e.matches(`html,body`)}function jn(e){return Nt(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Mn(e){return $t(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${nn}`)!=null}function Nn(e){return e?e.getAttribute(`role`)===`combobox`&&jn(e):!1}function Pn(e){if(!e||bt)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Fn(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function In(e,t){return t!=null&&!Tt(t)?0:typeof e==`function`?e():e}function Ln(e,t,n){let r=In(e,n);return typeof r==`number`?r:r?.[t]}function Rn(e){return typeof e==`function`?e():e}function zn(e,t){return t||e===`click`||e===`mousedown`}function Bn(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 Vn(e,t,n){let r=n??Qe;return{reason:e,event:t??new Event(`base-ui`),...r}}var Hn=`none`,Un=`trigger-press`,Wn=`trigger-hover`,Gn=`trigger-focus`,Kn=`outside-press`,qn=`item-press`,Jn=`close-press`,Yn=`track-press`,Xn=`input-change`,Zn=`focus-out`,Qn=`escape-key`,$n=`list-navigation`,er=`keyboard`,tr=`pointer`,nr=`drag`,rr=`cancel-open`,ir=`sibling-open`,ar=`disabled`,or=`imperative-action`,sr=`window-resize`,cr=Y.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new at,currentIdRef:{current:null},currentContextRef:{current:null}});function lr(e,t){e.current=t.current}function ur(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:Ln(i.current,`open`),close:Ln(n,`close`)}},[n,o,i,a]),(0,J.jsx)(cr.Provider,{value:Y.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function dr(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(cr),[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:Ln(s.current,`close`)},o!==null&&o!==r?(f(!0),t?.setIsInstantPhase(!0),t?.onOpenChange(!1,Q(Hn))):(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,lr(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 fr(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function pr(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function mr(e,t,n,r){let i=Ve(gr).current;return _r(i,e,t,n,r)&&yr(i,[e,t,n,r]),i.callback}function hr(e){let t=Ve(gr).current;return vr(t,e)&&yr(t,e),t.callback}function gr(){return{callback:null,cleanup:null,refs:[]}}function _r(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function vr(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function yr(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 br(e){let t=Ve(xr,e).current;return t.next=e,X(t.effect),t}function xr(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Sr={...Y},Cr=Sr.useInsertionEffect,wr=Cr&&Cr!==Sr.useLayoutEffect?Cr:e=>e();function $(e){let t=Ve(Tr).current;return t.next=e,wr(t.effect),t.trampoline}function Tr(){let e={next:void 0,callback:Er,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Er(){}var Dr=null;globalThis.requestAnimationFrame;var Or=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)}},kr=class e{static create(){return new e}static request(e){return Or.request(e)}static cancel(e){return Or.cancel(e)}currentId=Dr;request(e){this.cancel(),this.currentId=Or.request(()=>{this.currentId=Dr,e()})}cancel=()=>{this.currentId!==Dr&&(Or.cancel(this.currentId),this.currentId=Dr)};disposeEffect=()=>this.cancel};function Ar(){let e=Ve(kr.create).current;return rt(e.disposeEffect),e}function jr(e){return e?.ownerDocument||document}var Mr={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Nr={...Mr,position:`fixed`,margin:0,top:0,left:0},Pr={...Mr,position:`absolute`},Fr=Y.forwardRef(function(e,t){let[n,r]=Y.useState();X(()=>{yt&&vt&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,J.jsx)(`span`,{...e,ref:t,style:Nr,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})}),Ir=Math.min,Lr=Math.max,Rr=Math.round,zr=Math.floor,Br=e=>({x:e,y:e}),Vr={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Hr(e,t,n){return Lr(e,Ir(t,n))}function Ur(e,t){return typeof e==`function`?e(t):e}function Wr(e){return e.split(`-`)[0]}function Gr(e){return e.split(`-`)[1]}function Kr(e){return e===`x`?`y`:`x`}function qr(e){return e===`y`?`height`:`width`}function Jr(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Yr(e){return Kr(Jr(e))}function Xr(e,t,n){n===void 0&&(n=!1);let r=Gr(e),i=Yr(e),a=qr(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ai(o)),[o,ai(o)]}function Zr(e){let t=ai(e);return[Qr(e),t,Qr(t)]}function Qr(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var $r=[`left`,`right`],ei=[`right`,`left`],ti=[`top`,`bottom`],ni=[`bottom`,`top`];function ri(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ei:$r:t?$r:ei;case`left`:case`right`:return t?ti:ni;default:return[]}}function ii(e,t,n,r){let i=Gr(e),a=ri(Wr(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Qr)))),a}function ai(e){let t=Wr(e);return Vr[t]+e.slice(t.length)}function oi(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function si(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:oi(e)}function ci(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 li(e,t){return t<0||t>=e.length}function ui(e,t){return pi(e.current,{disabledIndices:t})}function di(e,t){return pi(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function fi(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>pi(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:li(e,u)?-1:u,wrapped:d}}function pi(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&&mi(e,a,r));return a}function mi(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!gi(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function hi(e){return e.visibility===`hidden`||e.visibility===`collapse`}function gi(e,t=e?Kt(e):null){return!e||!e.isConnected||!t||hi(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var _i=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function vi(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return Pt(n)?n.host:null}function yi(e){for(let t of Array.from(e.children))if(Ot(t)===`summary`)return t;return null}function bi(e,t){let n=yi(t);return!!n&&(e===n||Z(n,e))}function xi(e){let t=e?Ot(e):``;return e!=null&&e.matches(_i)&&(t!==`summary`||e.parentElement!=null&&Ot(e.parentElement)===`details`&&yi(e.parentElement)===e)&&(t!==`details`||yi(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Si(e){if(!xi(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=vi(t)){let n=t!==e,r=Ot(t)===`slot`;if(t.hasAttribute(`inert`)||n&&Ot(t)===`details`&&!t.open&&!bi(e,t)||t.hasAttribute(`hidden`)||!r&&!Ci(t,n))return!1}return!0}function Ci(e,t){let n=Kt(e);return t?n.display!==`none`:gi(e,n)}function wi(e){let t=e.tabIndex;if(t<0){let t=Ot(e);if(t===`details`||t===`audio`||t===`video`||Nt(e)&&e.isContentEditable)return 0}return t}function Ti(e){if(Ot(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Ei(e,t){let n=Ti(e);if(!n)return!0;let r=t.find(e=>{let t=Ti(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=Ti(e);return t?.name===n.name&&t.form===n.form})===n}function Di(e){if(Nt(e)&&Ot(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Nt(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Oi(e,t){Di(e).forEach(e=>{xi(e)&&t.push(e),Oi(e,t)})}function ki(e,t,n){Di(e).forEach(e=>{Nt(e)&&e.matches(t)&&n.push(e),ki(e,t,n)})}function Ai(e){return Si(e)&&wi(e)>=0}function ji(e){let t=[];return Oi(e,t),t.filter(Si)}function Mi(e){let t=ji(e);return t.filter(e=>wi(e)>=0&&Ei(e,t))}function Ni(e,t){let n=Mi(e),r=n.length;if(r===0)return;let i=Qt(jr(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Pi(e){return Ni(jr(e).body,1)||e}function Fi(e){return Ni(jr(e).body,-1)||e}function Ii(e,t,n){if(!e)return null;let r=[];Oi(jr(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(Si);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!Z(n,o)&&Ai(o)&&Ei(o,a))return o}return r[i]}function Li(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Z(n,r)}function Ri(e){Mi(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function zi(e){let t=[];ki(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 Bi(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Bi(e,t.id,n)])}function Vi(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 Hi(e){return`data-base-ui-${e}`}var Ui=0;function Wi(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Ui);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),Xe;let o=requestAnimationFrame(a);return Ui=o,()=>{Ui===o&&(cancelAnimationFrame(o),Ui=0)}}var Gi=`data-base-ui-inert`,Ki=new WeakMap,qi=new WeakSet,Ji=new WeakMap,Yi=0;function Xi(e){return e?Pt(e)?e.host:Xi(e.parentNode):null}var Zi=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Xi(t);return e.contains(n)?n:null}).filter(e=>e!=null),Qi=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},$i=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{Ot(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function ea(e,t,n,{mark:r=!0}){let i=Zi(t,e),a=r?$i(t,Qi(i),new Set(i)):[],o=[],s=[];if(n){let e=Zi(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);$i(t,Qi(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(Ki.get(e)||0)+1;Ki.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=(Ji.get(e)||0)+1;Ji.set(e,t),s.push(e),t===1&&e.setAttribute(Gi,``)}),Yi+=1,()=>{o.forEach(e=>{let t=(Ki.get(e)||0)-1;Ki.set(e,t),t||(qi.has(e)||e.removeAttribute(`aria-hidden`),qi.delete(e))}),r&&s.forEach(e=>{let t=(Ji.get(e)||0)-1;Ji.set(e,t),t||e.removeAttribute(Gi)}),--Yi,Yi||(Ki=new WeakMap,qi=new WeakSet,Ji=new WeakMap)}}function ta(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=jr(e[0]).body;return ea(e,i,n,{mark:r})}function na(){let[,e]=Y.useState({});return Y.useCallback(()=>{e({})},[])}var ra=0;function ia(e,t=`mui`){let n=Y.useRef(void 0),r=na(),i=e??n.current;return Y.useEffect(()=>{n.current??(ra+=1,n.current=`${t}-${ra}`,e??r())},[e,t,r]),i}var aa=Sr.useId;function oa(e,t){if(aa!==void 0){let n=aa();return e??(t?`${t}-${n}`:n)}return ia(e,t)}var sa=19;function ca(e){return sa>=e}function la(e){if(!Y.isValidElement(e))return null;let t=e,n=t.props;return(ca(19)?n?.ref:t.ref)??null}function ua(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function da(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 fa(e,t){return typeof e==`function`?e(t):e}function pa(e,t){return typeof e==`function`?e(t):e}var ma={};function ha(e,t,n,r,i){if(!n&&!r&&!i&&!e)return _a(t);let a=_a(e);return t&&(a=va(a,t)),n&&(a=va(a,n)),r&&(a=va(a,r)),i&&(a=va(a,i)),a}function ga(e){if(e.length===0)return ma;if(e.length===1)return _a(e[0]);let t=_a(e[0]);for(let n=1;n<e.length;n+=1)t=va(t,e[n]);return t}function _a(e){return Sa(e)?{...e(ma)}:ya(e)}function va(e,t){return Sa(t)?t(e):ba(e,t)}function ya(e){let t={...e};for(let e in t){let n=t[e];xa(e,n)&&(t[e]=wa(n))}return t}function ba(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=ua(e.style,r);break;case`className`:e[n]=Ea(e.className,r);break;default:xa(n,r)?e[n]=Ca(e[n],r):e[n]=r}}return e}function xa(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 Sa(e){return typeof e==`function`}function Ca(e,t){return t?e?(...n)=>{let r=n[0];if(Da(r)){let i=r;Ta(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:wa(t):e}function wa(e){return e&&((...t)=>{let n=t[0];return Da(n)&&Ta(n),e(...t)})}function Ta(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Ea(e,t){return t?e?t+` `+e:t:e}function Da(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function Oa(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=Ma(r));let i=ka(t,n,r);if(n.enabled===!1)return null;let a=n.state??Qe;return Na(e,r,i,a)}function ka(e,t,n){let{className:r,style:i}=e,{state:a=Qe,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?fa(r,a):void 0,d=l?pa(i,a):void 0,f=l?da(a,c):Qe,p=l&&s?Aa(s):void 0,m=l?ua(f,p)??{}:Qe;return typeof document<`u`&&(l?Array.isArray(o)?m.ref=hr([m.ref,la(n),...o]):m.ref=mr(m.ref,la(n),o):mr(null,null)),l?(u!==void 0&&(m.className=Ea(m.className,u)),d!==void 0&&(m.style=ua(m.style,d)),m):Qe}function Aa(e){return Array.isArray(e)?ga(e):ha(void 0,e)}var ja=Symbol.for(`react.lazy`);function Ma(e){if(e?.$$typeof!==ja)return e;let t=Y.Children.toArray(e)[0];return Y.isValidElement(t)?t:e}function Na(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=ha(n,t.props);return e.ref=n.ref,Y.cloneElement(t,e)}return Pa(e,n)}function Pa(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 Fa={style:{transition:`none`}},Ia=`data-base-ui-click-trigger`,La={fallbackAxisSide:`none`},Ra={fallbackAxisSide:`end`},za={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Ba=Y.createContext(null),Va=()=>Y.useContext(Ba),Ha=Hi(`portal`);function Ua(e={}){let{ref:t,container:n,componentProps:r=Qe,elementProps:i}=e,a=oa(),o=Va()?.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&&(jt(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=Oa(`div`,r,{ref:[t,d],props:[{id:a,[Ha]:``},i]}),m=s&&p?He.createPortal(p,s):null;return{node:l,nodeId:Y.isValidElement(p)?p.props.id:void 0,subtree:m}}var Wa=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}=Ua({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&&Li(e)&&(e.type===`focusin`?v.current&&=(zi(l),!1):(Ri(l),v.current=!0))}return pr(fr(l,`focusin`,e,!0),fr(l,`focusout`,e,!0))},[l,y]),X(()=>{!l||b!==!0||!v.current||(zi(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)(Ba.Provider,{value:S,children:[x&&l&&(0,J.jsx)(Fr,{"data-type":`outside`,ref:f,onFocus:e=>{Li(e,l)?m.current?.focus():Fi(g?g.domReference:null)?.focus()}}),x&&l&&(0,J.jsx)(`span`,{role:s,"aria-owns":u,style:za}),l&&He.createPortal(a,l),x&&l&&(0,J.jsx)(Fr,{"data-type":`outside`,ref:p,onFocus:e=>{Li(e,l)?h.current?.focus():(Pi(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,Q(`focus-out`,e.nativeEvent)))}})]})]})});function Ga(){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 Ka=class{nodesRef={current:[]};events=Ga();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),Ja=Y.createContext(null),Ya=()=>Y.useContext(qa)?.id||null,Xa=e=>{let t=Y.useContext(Ja);return e??t};function Za(e){let t=oa(),n=Xa(e),r=Ya();return X(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Qa(e){let{children:t,id:n}=e,r=Ya();return(0,J.jsx)(qa.Provider,{value:Y.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function $a(e){let{children:t,externalTree:n}=e,r=Ve(()=>n??new Ka).current;return(0,J.jsx)(Ja.Provider,{value:r,children:t})}function eo(e){return e==null?e:`current`in e?e.current:e}function to(e,t){let n=kt(en(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(Ct(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var no=20,ro=[];function io(){ro=ro.filter(e=>e.deref()?.isConnected)}function ao(e){io(),e&&Ot(e)!==`body`&&(ro.push(new WeakRef(e)),ro.length>no&&(ro=ro.slice(-20)))}function oo(){return io(),ro[ro.length-1]?.deref()}function so(e){return e?Ai(e)?e:Mi(e)[0]||e:null}function co(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=ji(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Ai(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 lo(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=Nn(_)&&S,w=br(i),T=br(a),E=br(o),D=br(u),O=br(g),k=Xa(m),A=Va(),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=mr(L,p,A?.beforeInsideRef),B=mr(R,A?.afterInsideRef),V=ot(),H=ot(),ee=Ar(),te=A!=null,U=Fn(v),W=$((e=U)=>e?Mi(e):[]),ne=$(()=>h?.().filter(e=>e!=null)??[]);Y.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&Z(U,Qt(jr(U)))&&W().length===0&&!C&&xt(e)}return fr(jr(U),`keydown`,e)},[r,U,c,C,W]),Y.useEffect(()=>{if(r||!g)return;let e=jr(U);function t(){N.current=!1}function n(e){let t=en(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`,$t(t,`[data-base-ui-click-trigger]`)&&(M.current=!0,H.start(0,()=>{M.current=!1}))}function i(){I.current=`keyboard`}return pr(fr(e,`pointerdown`,n,!0),fr(e,`pointerup`,t,!0),fr(e,`pointercancel`,t,!0),fr(e,`keydown`,i,!0),t)},[r,v,_,U,g,A,H,ne]),Y.useEffect(()=>{if(r||!l)return;let e=jr(U);function n(){M.current=!0,H.start(0,()=>{M.current=!1})}function i(e){let t=en(e);Ai(t)&&(P.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=en(n);c&&r==null&&a!=null&&Z(v,a)&&ao(a),queueMicrotask(()=>{let o=x(),l=t.context.triggerElements,u=ne(),p=r?.hasAttribute(Hi(`focus-guard`))&&[L.current,R.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,eo(f),eo(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&&(Bi(k.nodesRef.current,o).find(e=>Z(e.context?.elements.floating,r)||Z(e.context?.elements.domReference,r))||Vi(k.nodesRef.current,o).find(e=>[e.context?.elements.floating,Fn(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===_&&U&&co(U),s&&i!==_&&!gi(a)&&Qt(e)===e.body){if(Nt(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;Nt(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!c)&&r&&m&&!M.current&&(C||r!==oo())&&(j.current=!0,t.setOpen(!1,Q(Zn,n)))})}function o(){N.current||(b.current.insideReactTree=!0,V.start(0,()=>{b.current.insideReactTree=!1}))}let u=Nt(_)?_:null;if(!(!v&&!u))return pr(u&&fr(u,`focusout`,a),u&&fr(u,`pointerdown`,n),v&&fr(v,`focusin`,i),v&&fr(v,`focusout`,a),v&&A&&fr(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(`[${Hi(`portal`)}]`)||[]),t=(k?Vi(k.nodesRef.current,x()):[]).find(e=>Nn(e.context?.elements.domReference||null))?.context?.elements.domReference,n=ta([v,...e,L.current,R.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...ne(),t,eo(f),eo(d),C?_:null].filter(e=>e!=null),{ariaHidden:c||C,mark:!1}),i=ta([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,c,A,C,k,x,d,f,ne]),X(()=>{if(!g||r||!Nt(U))return;F.current=``,I.current=``;let e=jr(U),t=Qt(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():eo(r),o||=a();let s=Z(U,Qt(e)),c=b.current.openEvent,l=c?.type===`mousedown`&&Ct(c);Wi(o,{sync:l,preventScroll:o===U,shouldFocus(){if(!O.current)return!1;if(s)return!0;let t=Qt(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=jr(U),t=Qt(e),n=D.current==null;ao(t);function i(e){if(e.open||(F.current=to(e.nativeEvent,I.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(Hi(`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(Ct(e.nativeEvent)||wt(e.nativeEvent))j.current=!1;else{let e=!1;jr(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&&Ot(t)!==`body`?t:null,s=n?o||a:a||o;return s||=oo()||null,typeof i==`boolean`?s:eo(i)||s||null}return()=>{y.off(`openchange`,i);let t=Qt(e),n=ne(),r=Z(v,t)||n.some(e=>e===t||Z(e,t))||k&&Bi(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=so(c),i=E.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!j.current&&Nt(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=Qt(jr(v));!Nt(e)||!jn(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 co(U),()=>{queueMicrotask(io)}},[r,U]);let re=!r&&(!c||!C)&&(te||c);return(0,J.jsxs)(Y.Fragment,{children:[re&&(0,J.jsx)(Fr,{"data-type":`inside`,ref:z,onFocus:e=>{if(c){let e=W();Wi(e[e.length-1])}else A?.portalNode&&(j.current=!1,Li(e,A.portalNode)?Pi(_)?.focus():eo(f??A.beforeOutsideRef)?.focus())}}),n,re&&(0,J.jsx)(Fr,{"data-type":`inside`,ref:B,onFocus:e=>{c?Wi(W()[0]):A?.portalNode&&(l&&(j.current=!0),Li(e,A.portalNode)?Fi(_)?.focus():eo(d??A.afterOutsideRef)?.focus())}})]})}function uo(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=Un}=t,l=e.context.dataRef,u=Y.useRef(void 0),d=Ar(),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=Tt(e.pointerType,!0)&&wt(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||Tt(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=en(s),p=jn(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}Tt(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 fo(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 po(e){return e!=null&&e.clientX!=null}function mo(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&&!po(s.current.openEvent)||e.set(`positionReference`,fo(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)}),_=Tt(u)?a:i;Y.useEffect(()=>{if(!n){m(o);return}if(!_)return;function e(){l.current?.(),l.current=null}let t=kt(a);function r(t){let n=en(t);Z(a,n)?e():h(t.clientX,t.clientY)}return!s.current.openEvent||po(s.current.openEvent)?l.current=fr(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 ho(){return!1}function go(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function _o(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=ho,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=Xa(c),m=$(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=$(()=>a),{escapeKey:v,outsidePress:y}=go(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?Bi(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),M=$(t=>kn(t,e.select(`floatingElement`))||kn(t,e.select(`domReferenceElement`))),N=$(t=>{o()&&e.setOpen(!1,Q(Un,t.nativeEvent))}),P=$(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=St(t)?t.nativeEvent:t;if(w.current||i.isComposing||!v&&j(`__escapeKeyBubbles`))return;let a=Q(Qn,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=en(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=jr(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&&Bi(p.nodesRef.current,t).some(t=>kn(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=en(n),i=`[${Hi(`inert`)}]`,a=Mt(r)?r.getRootNode():null,o=Array.from((Pt(a)?a:jr(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>Z(e,r))))return;let c=Mt(r)?r:null;for(;c&&!Gt(c);){let e=Jt(c);if(Gt(e)||!Mt(e))break;c=e}if(!(o.length&&Mt(r)&&!An(r)&&!Z(r,e.select(`floatingElement`))&&o.every(e=>!Z(c,e)))){if(Nt(r)&&!(`touches`in n)){let e=Gt(r),t=Kt(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&&!Ct(n)&&!C.current)return;if(S.current){t.clear(),S.current=!1;return}}typeof h==`function`&&!h(n)||j(`__outsidePressBubbles`)||(e.setOpen(!1,Q(Kn,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=en(e);if(!n)return;let r=fr(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=pr(r&&pr(fr(i,`keydown`,P),fr(i,`compositionstart`,a),fr(i,`compositionend`,o)),g&&pr(fr(i,`click`,z,!0),fr(i,`pointerdown`,z,!0),fr(i,`pointerup`,B,!0),fr(i,`pointercancel`,B,!0),fr(i,`mousedown`,z,!0),fr(i,`mouseup`,B,!0),fr(i,`touchstart`,R,{capture:!0,passive:!0}),fr(i,`touchmove`,H,{capture:!0,passive:!0}),fr(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 vo(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};Mt(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 yo(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=kr.request(()=>{a(`ending`)});return()=>{kr.cancel(e)}}},[e,o,i,n]),X(()=>{if(!e||t||i===void 0)return;let n=kr.request(()=>{a(void 0)});return()=>{kr.cancel(n)}},[t,e,i]),X(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=kr.request(()=>{a(`idle`)});return()=>{kr.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function bo(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var xo=null;function So(e){if(!xo){let e=[];xo=e,queueMicrotask(()=>{xo=null,He.flushSync(()=>{for(let t of e)t()})})}xo.push(e)}function Co(e,t=!1,n=!1){let r=Ar();return $((i,a=null)=>{r.cancel();let o=eo(e);if(o==null)return;let s=o,c=()=>{if(!n){He.flushSync(i);return}So(()=>{a?.aborted||i()})};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(bo(s).map(e=>e.finished.then(Xe))).then(()=>{a?.aborted||c()},()=>{if(!a?.aborted){if(bo(s).some(e=>e.pending||e.playState!==`finished`)){l();return}c()}})}if(t){let e=cn;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 wo(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=$(a),s=Co(r,n,i);Y.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}function To(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=$(i),{mounted:c,setMounted:l,transitionStatus:u}=yo(t,!1,!1,o),d=!t&&r;X(()=>{t&&s(!1)},[t,s]);let f=Y.useRef(c),p=Y.useRef(!1),m=na(),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 wo({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var Eo={tabIndex:-1,[tn]:``};function Do(e){return t=>t!==`touch`||e.current}function Oo(e,t=!1){let n=oa(),r=Ya()!=null,i=Ve(()=>e(n,r)).current;return vo({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function ko({handle:e,store:t}){return X(()=>e.attachStore(t),[e,t]),null}function Ao(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function jo(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),Ao(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),Ao(t))})}function Mo(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 No(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function Po(e,t,n,r={}){let i=n.reason,a=i===Wn,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=No(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=Mo(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 Fo(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=jo(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 Io(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(Hn);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 Lo(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=To({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 Ro(e,t){e.useSyncedValues(t),X(()=>()=>{e.update({activeTriggerProps:Qe,inactiveTriggerProps:Qe,popupProps:Qe})},[e])}function zo(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 Bo=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}},Vo=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})),Ho=t(((e,t)=>{t.exports=Vo()})),Uo=t((e=>{var t=n(),r=Ho();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}})),Wo=t(((e,t)=>{t.exports=Uo()})),Go=Ho(),Ko=Wo(),qo=ca(19)?Xo:Zo;function Jo(e,t,n,r,i){return qo(e,t,n,r,i)}function Yo(e,t,n,r,i){let a=Y.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Go.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,Go.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Xo(e,t,n,r,i){let a=Ge();if(!a)return Yo(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 Zo(e,t,n,r,i){return(0,Ko.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Qo=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 Jo(this,e,t,n,r)}},$o=class extends Qo{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),Jo(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)}})}},es={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},ts=class extends $o{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:Ga(),nested:n,triggerElements:i},es),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Et(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 ns(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new ts({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 rs=e=>e.triggerIdProp??e.activeTriggerId,is=e=>e.openProp??e.open,as=e=>(e.popupElement?.id??e.floatingId)||void 0;function os(e,t){return t!==void 0&&is(e)&&rs(e)===t}function ss(e,t){return os(e,t)?!0:t!==void 0&&is(e)&&rs(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var cs={open:is,mounted:e=>e.mounted,transitionStatus:e=>is(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:rs,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:as,isTriggerActive:(e,t)=>t!==void 0&&rs(e)===t,isOpenedByTrigger:(e,t)=>os(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&rs(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>ss(e,t)?as(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function ls(e){return(0,Go.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 us(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=oa(),a=Ya()!=null,o=Ve(()=>new ts({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Bo,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=Mt(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 ds=gt&&vt;function fs(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=kt(t);function i(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&Nt(t)&&t===Qt(jr(t))&&(o.current=!0,s.current=t)}function a(){c.current=!0}function l(){c.current=!1}return pr(fr(r,`blur`,i),ds&&fr(r,`keydown`,a,!0),ds&&fr(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`);Mt(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=en(n.nativeEvent);if(Mt(a)){if(ds&&!n.relatedTarget){if(!c.current&&!jn(a))return}else if(!Pn(a))return}let u=On(n.relatedTarget,e.context.triggerElements),{nativeEvent:d,currentTarget:f}=n;if(e.select(`open`)&&u||!r){e.setOpen(!0,Q(Gn,d,f));return}l.start(r,()=>{o.current||e.setOpen(!0,Q(Gn,d,f))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,o=Mt(r)&&r.hasAttribute(Hi(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let t=e.select(`domReferenceElement`),n=Qt(jr(t));!r&&n===t||Z(a.current.floatingContext?.refs.floating.current,n)||Z(t,n)||o||On(r??n,e.context.triggerElements)||e.setOpen(!1,Q(Gn,i))})}}},[a,r,e,l]);return Y.useMemo(()=>n?{reference:u,trigger:u}:{},[n,u])}var ps=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},ms=new WeakMap;function hs(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&ms.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),ms.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function gs(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=ms.get(n);a&&a!==e&&hs(a),hs(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,ms.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function _s(e){let t=e.context.dataRef.current,n=Ve(()=>t.hoverInteractionState??ps.create()).current;return t.hoverInteractionState||=n,rt(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function vs(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=Xa(),u=Ya(),d=_s(e),f=ot(),p=$(()=>zn(c.current.openEvent?.type,d.interactedInside)),m=$(()=>Bn(c.current.openEvent?.type)),h=$(()=>{hs(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()&&Mt(s)&&o){let e=s,t=o,n=jr(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??$t(e,`[data-rootownerid]`)??n.body;return gs(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&&Bi(l.nodesRef.current,u).length>0)}function a(t){let n=Ln(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,Q(Wn,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=en(e);if(!Mn(t)){d.interactedInside=!1;return}d.interactedInside=$t(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(On(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(l&&r&&Mt(o)&&Bi(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(Wn,n)),l.events.emit(`floating.closed`,n)})}let y=o;return pr(y&&fr(y,`mouseenter`,g),y&&fr(y,`mouseleave`,_),y&&fr(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var ys={current:null};function bs(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=ys,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=Xa(l),v=_s(e),y=Y.useRef(!1),b=br(i),x=br(r),S=br(o),C=br(n),w=br(p),T=br(f),E=$(()=>zn(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(!Mt(r))return!1;let a=r;return i.hasMatchingElement(e=>Z(e,a))&&(!t||!Z(t,a))}),k=$(()=>{v.handler&&=(jr(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=$(()=>{hs(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===Wn,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=Ln(x.current,`close`,v.pointerType);r?v.openChangeTimeout.start(r,()=>{e.setOpen(!1,Q(Wn,t)),_?.events.emit(`floating.closed`,t)}):n&&(v.openChangeTimeout.clear(),e.setOpen(!1,Q(Wn,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!Mt(r))return;function i(t){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!Tt(v.pointerType))return;let n=Rn(S.current),r=Ln(x.current,`open`,v.pointerType),i=en(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(Mt(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(Z(t,i)){c=t;break}}Mt(o)&&Mt(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&&Mt(c)&&Mt(s)&&Z(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;if(h){D()&&e.setOpen(!0,Q(Wn,t,c));return}m||(r?v.openChangeTimeout.start(r,()=>{g&&D()&&e.setOpen(!0,Q(Wn,t,c))}):g&&D()&&e.setOpen(!0,Q(Wn,t,c)))}function o(n){if(E()){A();return}k();let r=jr(e.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!On(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?fr(r,`mouseout`,l):void 0;return s?pr(fr(r,`mousemove`,i,{once:!0}),fr(r,`mouseenter`,i),fr(r,`mouseleave`,o),f):pr(fr(r,`mouseenter`,i),fr(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&&!Tt(v.pointerType))return;if(o&&s&&v.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=v.handleCloseOptions?.getScope?.()??r.ownerDocument.body;gs(v,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=Rn(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(Wn,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 xs(e){return vt&&e.movementX===0&&e.movementY===0}function Ss(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Cs(e,t){return Ss(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function ws(e,t,n){return Ss(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Ts(e,t,n){return Ss(t,n?e===rn:e===an,e===sn)}function Es(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:Ss(t,n?e===an:e===rn,e===on)}function Ds(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=Fn(E),A=Nn(D),j=br(k),M=Ya(),N=Xa(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=br(h),U=br(T),W=br(o),ne=br(b),G=Ar(),re=Ar(),ie=$(()=>{G.cancel();function e(e){d||(ee.current=Wi(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||ws(I.current,_,u)||l?ui(n):di(n),I.current=null,R())};t()}}else li(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=Qt(jr(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=$(()=>ui(n,te.current)),le=$(t=>{if(L.current=!1,V.current=!0,t.which===229||!U.current&&t.currentTarget===j.current)return;if(l&&Es(t.key,g,u,w)){Cs(t.key,se())||xt(t),e.setOpen(!1,Q($n,t.nativeEvent));let n=S?.current??D;Nt(n)&&n.focus();return}r!=null&&r!==F.current&&!li(n.current,r)&&(F.current=r);let i=F.current,a=ui(n,h),o=di(n,h);if(A||(t.key===`Home`&&(xt(t),F.current=a,R(t)),t.key===`End`&&(xt(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(Cs(t.key,g)){xt(t);let e=Qt(t.currentTarget.ownerDocument);if(T&&!d&&Z(t.currentTarget,e)&&!n.current.some(t=>t!=null&&Z(t,e))){F.current=ws(t.key,g,u)?a:o,R(t),r===F.current&&ie();return}let{index:l,wrapped:f}=fi(n.current,i,{decrement:!ws(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){xs(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=Qt(jr(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=en(t.nativeEvent);if(n&&!Z(j.current,n))return;xt(t);let r=Q(Zn,t.nativeEvent);e.setOpen(!1,r);let i=S?.current??D;!r.isCanceled&&Nt(i)&&i.focus();return}le(t)},onPointerMove(e){xs(e)||(L.current=!0)}}),[de,le,j,A,e,T,d,D,S]),pe=Y.useMemo(()=>{function t(t){e.setOpen(!0,Q($n,t.nativeEvent,t.currentTarget))}function n(e){f===`auto`&&Ct(e.nativeEvent)&&(P.current=!d)}function r(e){P.current=f,f===`auto`&&wt(e.nativeEvent)&&(P.current=!0)}return{onKeyDown(n){let r=e.select(`open`);L.current=!1;let i=n.key.startsWith(`Arrow`),a=Ts(n.key,se(),u),o=Cs(n.key,r?g:_),s=(l?a:o)||n.key===`Enter`||n.key.trim()===``;if(d&&r&&(!l||jn(n.currentTarget)))return le(n);if(!(!r&&!m&&i)){if(s){let e=Cs(n.key,se());I.current=l&&e?null:n.key}if(l){a&&(xt(n),r?(F.current=ce(),R(n),d&&j.current?.focus()):t(n));return}o&&(W.current!=null&&(F.current=W.current),xt(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 Os(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&&!gi(n)||n?.matches(`:disabled`)?!1:o==null||!mi(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===` `&&(xt(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!==` `&&(xt(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 ks=.1,As=ks*ks,js=.5;function Ms(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Ns(e,t,n,r,i,a,o,s,c,l){let u=!1;return Ms(e,t,n,r,i,a)&&(u=!u),Ms(e,t,i,a,o,s)&&(u=!u),Ms(e,t,o,s,c,l)&&(u=!u),Ms(e,t,c,l,n,r)&&(u=!u),u}function Ps(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Fs(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 Is(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*As;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=en(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&&Mt(r.relatedTarget)&&Z(u,r.relatedTarget))return;function y(){return!!(s&&Bi(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=Fs(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=Fs(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=Fs(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=Fs(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!Ps(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?js/2:js*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+js+1,o=C||T?S.bottom-js:S.top,s=C?T?S.bottom-js:S.top:S.bottom-js;M=Ns(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?js/2:js*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-js,o=C||T?S.top+js:S.bottom,s=C?T?S.top+js:S.bottom:S.top+js;M=Ns(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?js/2:js*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+js+1,o=w||E?S.right-js:S.left,s=w?E?S.right-js:S.left:S.right-js;M=Ns(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?js/2:js*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-js,o=w||E?S.left+js:S.right,s=w?E?S.left+js:S.right:S.left+js;M=Ns(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 Ls(e,t,n){let{reference:r,floating:i}=e,a=Jr(t),o=Yr(t),s=qr(o),c=Wr(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=Gr(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Rs(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}=Ur(t,e),p=si(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ci(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=ci(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 zs=50,Bs=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Rs},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ls(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<zs&&(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}=Ls(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Vs=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}=Ur(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Wr(r),_=Jr(o),v=Wr(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ai(o)]:Zr(o)),x=p!==`none`;!d&&x&&b.push(...ii(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=Xr(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`&&_!==Jr(t))||T.every(e=>Jr(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=Jr(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{}}}},Hs=new Set([`left`,`top`]);async function Us(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Wr(n),s=Gr(n),c=Jr(n)===`y`,l=Hs.has(o)?-1:1,u=a&&c?-1:1,d=Ur(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 Ws=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 Us(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}}}}},Gs=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}=Ur(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Jr(i),p=Kr(f),m=u[p],h=u[f],g=(e,t)=>Hr(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}}}}}},Ks=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}=Ur(e,t),u={x:n,y:r},d=Jr(i),f=Kr(d),p=u[f],m=u[d],h=Ur(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Hs.has(Wr(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}=Ur(e,t),c=await i.detectOverflow(t,s),l=Wr(n),u=Gr(n),d=Jr(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=Ir(p-c[m],g),y=Ir(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*Lr(c.left,c.right):S=p-2*Lr(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 Js(e){let t=Kt(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Nt(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Rr(n)!==a||Rr(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ys(e){return Mt(e)?e:e.contextElement}function Xs(e){let t=Ys(e);if(!Nt(t))return Br(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Js(t),o=(a?Rr(n.width):n.width)/r,s=(a?Rr(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Zs=Br(0);function Qs(e){let t=kt(e);return!Wt()||!t.visualViewport?Zs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $s(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===kt(e)}function ec(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ys(e),o=Br(1);t&&(r?Mt(r)&&(o=Xs(r)):o=Xs(e));let s=$s(a,n,r)?Qs(a):Br(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=kt(a),t=Mt(r)?kt(r):r,n=e,i=Zt(n);for(;i&&t!==n;){let e=Xs(i),t=i.getBoundingClientRect(),r=Kt(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=kt(i),i=Zt(n)}}return ci({width:u,height:d,x:c,y:l})}function tc(e,t){let n=qt(e).scrollLeft;return t?t.left+n:ec(At(e)).left+n}function nc(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-tc(e,n),y:n.top+t.scrollTop}}function rc(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=At(r),s=t?Lt(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Br(1),u=Br(0),d=Nt(r);if((d||!a)&&((Ot(r)!==`body`||Ft(o))&&(c=qt(r)),d)){let e=ec(r);l=Xs(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?nc(o,c):Br(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 ic(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function ac(e){let t=qt(e),n=e.ownerDocument.body,r=Lr(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Lr(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+tc(e),o=-t.scrollTop;return Kt(n).direction===`rtl`&&(a+=Lr(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var oc=25;function sc(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=kt(e),a=At(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Wt()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(tc(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<=oc&&(s-=o)}return{width:s,height:c,x:l,y:u}}function cc(e,t){let n=ec(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Xs(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function lc(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=sc(e,n,t);else if(t===`document`)r=ac(At(e));else if(Mt(t))r=cc(t,n);else{let n=Qs(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ci(r)}function uc(e,t){let n=t.get(e);if(n)return n;let r=Xt(e,[],!1).filter(e=>Mt(e)&&Ot(e)!==`body`),i=null,a=Kt(e).position===`fixed`,o=a?Jt(e):e;for(;Mt(o)&&!Gt(o);){let e=Kt(o),t=Ht(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Jt(o)}return t.set(e,r),r}function dc(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Lt(t)?[]:uc(t,this._c):[].concat(n),r],o=lc(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=lc(t,a[e],i);s=Lr(n.top,s),c=Ir(n.right,c),l=Ir(n.bottom,l),u=Lr(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function fc(e){let{width:t,height:n}=Js(e);return{width:t,height:n}}function pc(e,t,n){let r=Nt(t),i=At(t),a=n===`fixed`,o=ec(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Br(0);if((r||!a)&&((Ot(t)!==`body`||Ft(i))&&(s=qt(t)),r)){let e=ec(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=tc(i));let l=i&&!r&&!a?nc(i,s):Br(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 mc(e){return Kt(e).position===`static`}function hc(e,t){if(!Nt(e)||Kt(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return At(e)===n&&(n=n.ownerDocument.body),n}function gc(e,t){let n=kt(e);if(Lt(e))return n;if(!Nt(e)){let t=Jt(e);for(;t&&!Gt(t);){if(Mt(t)&&!mc(t))return t;t=Jt(t)}return n}let r=hc(e,t);for(;r&&It(r)&&mc(r);)r=hc(r,t);return r&&Gt(r)&&mc(r)&&!Ht(r)?n:r||Ut(e)||n}var _c=async function(e){let t=this.getOffsetParent||gc,n=this.getDimensions,r=await n(e.floating);return{reference:pc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function vc(e){return Kt(e).direction===`rtl`}var yc={convertOffsetParentRelativeRectToViewportRelativeRect:rc,getDocumentElement:At,getClippingRect:dc,getOffsetParent:gc,getElementRects:_c,getClientRects:ic,getDimensions:fc,getScale:Xs,isElement:Mt,isRTL:vc};function bc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xc(e,t,n){let r=null,i,a=At(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=zr(d),h=zr(a.clientWidth-(u+f)),g=zr(a.clientHeight-(d+p)),_=zr(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Lr(0,Ir(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!bc(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=kt(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Sc(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=Ys(e),u=i||a?[...l?Xt(l):[],...t?Xt(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?xc(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?ec(e):null;c&&g();function g(){let t=ec(e);h&&!bc(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 Cc=Ws,wc=Gs,Tc=Vs,Ec=qs,Dc=Ks,Oc=(e,t,n)=>{let r=new Map,i=n??{},a={...yc,...i.platform,_c:r};return Bs(e,t,{...i,platform:a})},kc=typeof document<`u`?Y.useLayoutEffect:function(){};function Ac(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ac(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Ac(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function jc(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Mc(e,t){let n=jc(e);return Math.round(t*n)/n}function Nc(e){let t=Y.useRef(e);return kc(()=>{t.current=e}),t}function Pc(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=Y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=Y.useState(r);Ac(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=Nc(c),D=Nc(i),O=Nc(l),k=Y.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Oc(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Ac(w.current,t)&&(w.current=t,He.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);kc(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=Y.useRef(!1);kc(()=>(A.current=!0,()=>{A.current=!1}),[]),kc(()=>{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=Mc(M.floating,u.x),r=Mc(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...jc(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 Fc=(e,t)=>{let n=Cc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ic=(e,t)=>{let n=wc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Lc=(e,t)=>({fn:Dc(e).fn,options:[e,t]}),Rc=(e,t)=>{let n=Tc(e);return{name:n.name,fn:n.fn,options:[e,t]}},zc=(e,t)=>{let n=Ec(e);return{name:n.name,fn:n.fn,options:[e,t]}},Bc={...cs,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},Vc=class extends $o{constructor(e,t,n){let r=new Bo;super(Hc(e,r,t,n),Uc(r),Bc)}setOpen=(e,t)=>{Po(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Q(Un,e))}};function Hc(e,t,n,r=!1){return{...ns(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 Uc(e){return{popupRef:Y.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var Wc=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=Oo((e,t)=>new Vc({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}),Io(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:b}=Lo(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(ar))},[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(or))}),[y,p]);let T=h||_||!t&&a!==`none`;return(0,J.jsxs)(tt.Provider,{value:p,children:[l&&(0,J.jsx)(ko,{handle:l,store:p}),T&&(0,J.jsx)(Gc,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function Gc({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=_o(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=mo(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=Y.useMemo(()=>ha(a.reference,i.reference),[a.reference,i.reference]);return Ro(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??Qe}),null}function Kc(e){return oa(e,`base-ui`)}var qc=Y.createContext(void 0);function Jc(){return Y.useContext(qc)}var Yc=`data-base-ui-tooltip-trigger`;function Xc(e){let t=en(e);return Mt(t)?t:null}var Zc=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=ls(a)??p;if(!m)throw Error(et(82));let h=Kc(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}=Fo(h,y,m,{payload:o,closeOnClick:l,closeDelay:b}),C=Jc(),{activeIdRef:w,delayRef:T,isInstantPhase:E,hasProvider:D}=dr(v,{open:_}),O=_s(v);m.useSyncedValue(`isInstantPhase`,E);let k=m.useState(`disabled`),A=s??k,j=br(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=$t(e,`[${Yc}]`);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=bs(v,{enabled:!A,mouseOnly:!0,move:!1,handleClose:!N&&M!==`both`?Is():null,restMs:L,delay(){return u==null&&D?{close:Ln(T.current,`close`)}:{close:b}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!P.current}}),V=fs(v,{enabled:!A}).reference,H=e=>{let t=P.current,n=Xc(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(Wn,e));return}if(t&&!r&&a&&!j.current&&!m.select(`open`)&&i&&Tt(I.current)){let t=()=>{!P.current&&!j.current&&!m.select(`open`)&&m.setOpen(!0,Q(Wn,e,i))},n=L();n===0?(F.clear(),t()):F.start(n,t)}},ee=m.useState(`appliedTriggerProps`,S||M!==`none`);return Oa(`button`,e,{state:{open:_},ref:[t,x,y],props:[B,V,ee,{onMouseOver(e){H(e.nativeEvent)},onFocus(e){R(Xc(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,[Dn]:A?``:void 0,[Yc]:A?void 0:``},f],stateAttributesMapping:Cn})}),Qc=Y.createContext(void 0);function $c(){let e=Y.useContext(Qc);if(e===void 0)throw Error(et(70));return e}var el=Y.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=Ua({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,J.jsxs)(Y.Fragment,{children:[l,c&&He.createPortal(n,c)]})}),tl=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return nt().useState(`mounted`)||n?(0,J.jsx)(Qc.Provider,{value:n,children:(0,J.jsx)(el,{ref:t,...r})}):null}),nl=Y.createContext(void 0);function rl(){let e=Y.useContext(nl);if(e===void 0)throw Error(et(71));return e}function il(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=Xa(n),p=Y.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=Pc({...e,elements:{...p,...l&&{reference:l}}}),h=Y.useCallback(e=>{let t=Mt(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 al=Y.createContext(void 0);function ol(){return Y.useContext(al)?.direction??`ltr`}var sl=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}=Ur(e,t)||{};if(l==null)return{};let d=si(u),f={x:n,y:r},p=Yr(i),m=qr(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=Hr(D,k,O),j=!c.arrow&&Gr(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}}}),cl=(e,t)=>{let{name:n,fn:r}=sl(e);return{name:n,fn:r,options:[e,t]}},ll={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}}}},ul={sideX:`left`,sideY:`top`},dl=`--available-width`,fl=`--available-height`,pl=`--anchor-width`,ml=`--anchor-height`,hl=`--transform-origin`,gl=dl,_l=fl;function vl(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 yl(e,t,n){let{rects:r,placement:i}=e;return{side:vl(t,Wr(i),n),align:Gr(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function bl(e){return xl(e,il)}function xl(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=br(n),M=br(g),N=ol()===`rtl`,[P,F]=Y.useState(null);!g&&P!==null&&F(null);let I=x===`placement`,L=P?Wr(P):null,R=P&&I?Gr(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=br(a),ie=br(s),ae=typeof a==`function`?0:a,oe=typeof s==`function`?0:s,se=[];p&&se.push(p),se.push(Fc(e=>{let t=yl(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:Rc({...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:Ic({...ne,rootBoundary:D,mainAxis:w!==`none`,crossAxis:le,limiter:u||E?void 0:Lc(e=>{if(!G.current)return{};let{width:t,height:n}=G.current.getBoundingClientRect(),r=Jr(Wr(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(zc({...ne,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!M.current)return;let i=e.style;i.setProperty(gl,`${t}px`),i.setProperty(_l,`${n}px`);let a=kt(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(pl,`${u}px`),i.setProperty(ml,`${d}px`)}}),cl(e=>({element:G.current||jr(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=Wr(r),u=Gr(r),d=Jr(l)===`y`,f=G.current,p=typeof a==`function`?a(yl(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(hl,d?`${m} ${h}`:`${h} ${m}`),{}}},ll,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)=>Sc(...e,fe),nodeId:y,externalTree:S}),{sideX:Ce,sideY:K}=_e.adaptiveOrigin||ul,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[gl]=`100vw`,e[_l]=`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=(Sl(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`&&Sl(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 Sc(me.reference,me.floating,ve,fe)},[m,g,me,ve,fe]);let De=Wr(ye),Oe=vl(i,De,N),ke=Gr(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 Sl(e){return e!=null&&`current`in e}function Cl(e){return e===`starting`?Fa:Qe}function wl(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),Oa(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},Cl(r),i],stateAttributesMapping:Tn})}var Tl=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=Ra,style:g,..._}=e,v=nt(),y=$c(),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=bl({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=wl(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)(nl.Provider,{value:D,children:O})}),El=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=nt(),{side:s,align:c}=rl(),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`);wo({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),vs(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return Oa(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[Eo,f,Cl(d),a],stateAttributesMapping:En})}),Dl=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)(ur,{delay:i,timeoutMs:r,children:e.children})})};function Ol(e){return ca(19)?e:e?`true`:void 0}function kl(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 Al=Dl,jl=Wc;function Ml(e){return(0,J.jsx)(Zc,{delay:300,...e})}function Nl({className:e,sideOffset:t=6,side:n,align:r,children:i,...a}){return(0,J.jsx)(tl,{children:(0,J.jsx)(Tl,{className:`z-50`,sideOffset:t,...n?{side:n}:{},...r?{align:r}:{},children:(0,J.jsx)(El,{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 Pl=O(`onMachines`),Fl=O(`sendAddMachine`),Il=O(`sendRemoveMachine`),Ll=O(`onMachinesReachable`),Rl=O(`onMachineVersions`),zl=O(`sendProjectToMachine`),Bl=O(`onProjectOnMachine`),Vl=O(`sendProjectHere`),Hl=O(`onProjectHere`),Ul=O(`onMachineStartCheck`),Wl=O(`onMachineModels`),Gl=O(`onComputersThrough`),Kl=O(`sendAddComputerThrough`),ql=O(`onMachinePerson`),Jl=O(`sendRemoveMachineDevice`),Yl=O(`sendRenameMachine`),Xl=O(`sendRenameComputer`),Zl=O(`sendLetMachineIn`),Ql=O(`sendMachineCode`),$l=O(`sendMachineTold`),eu=O(`onMachineLogins`),tu=O(`onMachineAgentAccounts`),nu=O(`sendMachineAgentAccountFirst`),ru=O(`onMachineGitHosts`),iu=O(`sendMachineGitHostAccount`),au=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),ou=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),su={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`},cu=(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,...su,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ou(`lucide`,i),...s},[...o.map(([e,t])=>(0,Y.createElement)(e,t)),...Array.isArray(a)?a:[a]])),lu=(e,t)=>{let n=(0,Y.forwardRef)(({className:n,...r},i)=>(0,Y.createElement)(cu,{ref:i,iconNode:t,className:ou(`lucide-${au(e)}`,n),...r}));return n.displayName=`${e}`,n},uu=lu(`ArrowRight`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),du=lu(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),fu=lu(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),pu=lu(`ChevronRight`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),mu=lu(`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`}]]),hu=lu(`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`}]]),gu=lu(`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`}]]),_u=lu(`LoaderCircle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),vu=lu(`PanelLeft`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),yu=lu(`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`}]]),bu=lu(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),xu={computer:gu,home:hu,shared:yu,server:yu};function Su({kind:e,online:t,labelled:n=!1,className:r}){let i=xu[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 Cu({computer:e,named:t=!0}){let n=e.kind?xu[e.kind]:gu;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`})}function wu(e){if(!e)return;let t=new Date(e);return Number.isNaN(t.getTime())?void 0:t}function Tu(e,t=`—`){let n=wu(e);return n?n.toLocaleString():t}function Eu(e,t=`—`){let n=wu(e);return n?n.toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`}):t}function Du(e,t=`—`){let n=wu(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 Ou(e,t=`—`){let n=wu(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 ku(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 Au(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 ju(e,t){return`${e} ${t}${e===1?``:`s`}`}function Mu(e){let t=Math.max(0,Math.floor(e/1e3));if(t<60)return ju(t,`second`);let n=Math.floor(t/60);if(n<60)return ju(n,`minute`);let r=Math.floor(n/60);return r<24?ju(r,`hour`):ju(Math.floor(r/24),`day`)}function Nu(e){return e.toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`}).toLowerCase().replace(/\s+/g,``)}function Pu(e){let t=new Date(e);return`${t.toLocaleDateString(void 0,{weekday:`long`})} ${Nu(t)}`}function Fu(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}, ${Nu(t)} (${r})`}var Iu=new Map,Lu=500;function Ru(e,t){Iu.delete(e),Iu.set(e,t),Iu.size>Lu&&Iu.delete(Iu.keys().next().value)}var zu=`openagent:read:`,Bu=1e5,Vu=new Map;function Hu(){try{return typeof window>`u`?void 0:window.localStorage}catch{return}}function Uu(e){try{let t=Hu()?.getItem(zu+e);return t?{value:JSON.parse(t)}:void 0}catch{return}}function Wu(e,t){try{let n=JSON.stringify(t);if(n===void 0||Vu.get(e)===n)return;Vu.set(e,n),n.length>Bu?Hu()?.removeItem(zu+e):Hu()?.setItem(zu+e,n)}catch{}}function Gu(e){if(e===void 0){Iu.clear(),Ju.clear(),Vu.clear(),Yu.clear();return}Iu.delete(e),Vu.delete(e);try{Hu()?.removeItem(zu+e)}catch{}}var Ku=new Set;function qu(e,t){Iu.has(e)||Ku.has(e)||(Ku.add(e),t().then(t=>{Iu.has(e)||Ru(e,t)}).catch(()=>{}).finally(()=>Ku.delete(e)))}var Ju=new Map,Yu=new Set;function Xu(e){let t=()=>({asked:0,given:0,waiting:new Set});if(e===void 0)return t();let n=Ju.get(e);return n||Ju.set(e,n=t()),n}function Zu(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&&(Ru(n,t),Yu.add(n)),a({value:t})},()=>a()).finally(()=>{e.out===o&&delete e.out})};return e.out=o,o.settled}var Qu=new Set;typeof document<`u`&&document.addEventListener(`visibilitychange`,()=>{if(document.visibilityState===`visible`)for(let e of[...Qu])e()});var $u=()=>typeof document<`u`&&document.visibilityState===`hidden`,ed=(0,Y.createContext)(null);function td(e,t,n,r,i,a){let o=()=>e&&typeof i==`object`?i.remember:void 0,s=e=>{if(e===void 0)return;if(Iu.has(e))return{value:Iu.get(e),stale:!1};if(typeof i!=`object`||!i.stored||Yu.has(e))return;let t=Uu(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:Xu(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=Xu(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 Zu(l,e,t,!1),w=()=>{clearTimeout(S);let e=y.current;e!==null&&!$u()&&(S=setTimeout(()=>void($u()||C()),e))};b.current=w;let T=e=>{d.live&&(e&&(c&&t!==void 0&&Wu(t,e.value),u(e.value),f(!0),m(!1)),w())};l.waiting.add(T),n!==null&&Qu.add(C);let E=a?.(n=>{l.changed===n||$u()||(l.changed=n,Zu(l,e,t,!0))});return Zu(l,e,t,x),()=>{d.live=!1,b.current=()=>{},clearTimeout(S),l.waiting.delete(T),Qu.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():Zu(t,e,n,!0)},r),C=(0,Y.useContext)(ed),w=(0,Y.useRef)({}),T=p&&nd(_.current,r);if((0,Y.useEffect)(()=>{if(!C)return;let e=w.current;return C(e,T),()=>C(e,!1)},[C,T]),!nd(_.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 nd(e,t){return e.length===t.length&&e.every((e,n)=>Object.is(e,t[n]))}function rd(e,t,n,r){return td(e,t,null,n,r).value}function id(e,t,n,r,i,a){return td(e,t,n,r,i,a)}var ad=O(`onModels`);function od(){return rd(ad,void 0,[],{remember:`models`})}var sd=e=>`machine-models:${e}`;function cd(e){qu(sd(e),()=>Wl(e))}function ld(e){let t=od(),n=rd(e===void 0?null:()=>Wl(e),void 0,[e],e===void 0?void 0:{remember:sd(e)});return e===void 0||n===null?{models:t,theirs:!1}:{models:n,theirs:!0}}function ud(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 dd(e,t){return(e?.models.find(e=>e.id===t)??e?.models.find(e=>e.resolvedId===t))?.name??t}function fd(e,t){for(let n of Object.values(e??{})){let e=dd(n,t);if(e!==t)return e}return t}function pd(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 hd(){return ud(od())}function gd(){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 _d(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 _d(e){return typeof e==`object`&&!!e&&`ok`in e&&e.ok===!1}function vd({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 yd({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 bd=`ArrowUp`,xd=`ArrowDown`,Sd=`ArrowLeft`,Cd=`ArrowRight`,wd=`Home`,Td=`PageUp`,Ed=`PageDown`,Dd=new Set([bd,xd,Sd,Cd,wd,`End`]),Od=`Shift`,kd=[Od,`Control`,`Alt`,`Meta`];function Ad(e){return Nt(e)&&e.tagName===`INPUT`}function jd(e){return!!(Ad(e)&&e.selectionStart!=null||Nt(e)&&e.tagName===`TEXTAREA`)}function Md(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=Nd(e,t,`left`),a=Pd(e),o=Pd(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=Nd(e,t,`top`),r=Pd(e),i=Pd(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 Nd(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 Pd(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 Fd=Y.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Id(){return Y.useContext(Fd)}function Ld(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=$(i),[,o]=Y.useState(0),s=Ve(zd).current,c=Ve(Rd).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(!Hd(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&Ud(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=Vd(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let v=$(()=>{let[e,t]=Bd(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)(Fd.Provider,{value:b,children:t})}function Rd(){return new Map}function zd(){return new Set}function Bd(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)=>Ud(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 Vd(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function Hd(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 Ud(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function Wd(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var Gd=`data-composite-item-active`;function Kd(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),_=mr(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];Md(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||mi(e,x,d)?S(qd(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(mi(t,x,d)){let e=pi(t,{disabledIndices:d});li(t,e)||S(e)}Md(g.current,r,a,n)});X(()=>{if(d==null||o!=null||!y.current)return;let e=v.current;if(mi(e,x,d)){let t=pi(e,{disabledIndices:d});li(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(!Dd.has(e.key)||!l&&o||Jd(e,f)||!g.current)return;let s=a===`rtl`,c=s?Sd:Cd,p=s?Cd:Sd,m=n===`vertical`?xd:c,_=n===`vertical`?bd:p,y=en(e.nativeEvent);if(y!=null&&jd(y)&&!Wd(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=ui(v,d),T=di(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=pi(v.current,{startingIndex:b,decrement:D,disabledIndices:d})),b!==x&&!li(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=en(e.nativeEvent);!t||n==null||!jd(n)||n.setSelectionRange(0,n.value.length)},onKeyDown:T},highlightedIndex:x,onHighlightedIndexChange:S,elementsRef:v,onMapChange:C,relayKeyboardEvent:T}}function qd(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(!(!i||mi(e,r,t))){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function Jd(e,t){for(let n of kd)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}var Yd=Y.createContext(void 0);function Xd(e=!1){let t=Y.useContext(Yd);if(t===void 0&&!e)throw Error(et(16));return t}function Zd(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}=Kd({grid:d,loopFocus:f,onLoop:p,orientation:u,highlightedIndex:c,onHighlightedIndexChange:l,rootRef:_,stopEventPropagation:g,enableHomeAndEndKeys:m,direction:ol(),disabledIndices:v,modifierKeys:y}),k=Oa(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)(Yd.Provider,{value:A,children:(0,J.jsx)(Ld,{elementsRef:E,onMapChange:e=>{h?.(e),D(e)},children:k})})}var Qd=`data-valid`,$d=`data-invalid`,ef={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},tf={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},nf={valid(e){return e===null?null:e?{[Qd]:``}:{[$d]:``}}},rf={invalid:void 0,name:void 0,validityData:{state:ef,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:tf,registerFieldControl:Xe,validation:{getValidationProps:(e,t=Qe)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:Xe,getInputControl:()=>null,commit:async()=>{},change:Xe}},af=Y.createContext(rf);function of(e=!0){let t=Y.useContext(af);if(t.setValidityData===Xe&&!e)throw Error(et(28));return t}function sf(e,t,n,r,i=!0,a){let{registerFieldControl:o}=of(),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 cf=Y.createContext({controlId:void 0,registerControlId:Xe,resetControlId:Xe,labelId:void 0,setLabelId:Xe,messageIds:[],setMessageIds:Xe,getDescriptionProps:e=>e});function lf(){return Y.useContext(cf)}var uf=Y.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:Xe,validationMode:`onSubmit`,submitCountRef:{current:0}});function df(){return Y.useContext(uf)}Object.keys(ef);function ff(e,t){return e.matches(`:disabled`)?!1:!t||e.form===t||e.form===null&&!e.hasAttribute(`form`)}var pf=Y.createContext(void 0);function mf(e=!1){let t=Y.useContext(pf);if(!t&&!e)throw Error(et(86));return t}function hf(e,t){let n=Y.useRef(e),r=$(t);X(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}var gf=Y.createContext(void 0);function _f(){return Y.useContext(gf)}var vf=[Od],yf=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}=of(),{labelId:E}=lf(),{clearErrors:D,elementRef:O}=df(),k=mf(!0),A=b||i,j=y??d,M=Kc(p),[N,P]=yd({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=mr(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&&ff(t,e))return N??null;return null});sf(z,M,N??null,W,!A,d),hf(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)(gf.Provider,{value:re,children:(0,J.jsx)(Zd,{render:n,className:r,style:m,state:G,props:[ie,h,e=>S.getValidationProps(A??!1,e)],refs:[t],stateAttributesMapping:nf,enableHomeAndEndKeys:!1,modifierKeys:vf})})}),bf=`data-checked`,xf=`data-unchecked`,Sf={checked(e){return e?{[bf]:``}:{[xf]:``}},...fn,...nf};function Cf(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(kt(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 wf(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 Tf(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=Y.useRef(null),s=Xd(!0),c=a??s!==void 0,{props:l}=wf({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=Y.useCallback(()=>{let e=o.current;Ef(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 ha({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(Ta(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=Ef(r),s=!i&&Df(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(),Cf(r,e));return}if(!l||i||!d&&!u){n&&s&&d&&e.preventDefault();return}e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),Cf(r,e)))},onKeyUp(e){if(!t){if(Ta(e),a?.(e),e.target===e.currentTarget&&i&&c&&Ef(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),Cf(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 Ef(e){return Nt(e)&&e.tagName===`BUTTON`}function Df(e){return Nt(e)&&e.tagName===`A`&&!!e.href}function Of(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=Id(),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 kf(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Xd(),{ref:i,index:a}=Of(e),o=n===a,s=Y.useRef(null),c=mr(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 Af(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}=kf({metadata:s});return Oa(l,e,{state:i,ref:[f,...o],props:[d,...a,u],stateAttributesMapping:c})}function jf(e,t,n){let{setFocused:r,focusOwnerRef:i}=of(),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 Mf=Y.createContext({disabled:!1});function Nf(){return Y.useContext(Mf)}function Pf(e,t,n,r=!0,i,a){let[o,s]=Y.useState(),c=Kc(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:Ff(n.current,c);o!==i&&s(i)}),u}function Ff(e,t){let n=If(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function If(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 Lf(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=lf(),o=Kc(),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 Rf(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var zf=Y.createContext(void 0);function Bf(){let e=Y.useContext(zf);if(e===void 0)throw Error(et(52));return e}var Vf=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=_f(),{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}=of(),A=Nf(),{labelId:j,getDescriptionProps:M}=lf(),N=k||A.disabled||h||i,P=g||a,F=_||o,I=v,L=m?y===c:c===``,R=Y.useRef(null),z=jf(N,R),B=Y.useRef(null),V=x?.registerInput,H=mr(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=Kc(),te=Lf({id:d}),U=u?void 0:te,W={role:`radio`,"aria-checked":L,"aria-labelledby":Pf(s,j,B,!u,U,p[`aria-label`]),[Gd]: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&&Cf(t,e)},onFocus(e){z(!0),!(e.defaultPrevented||N||P||!b)&&(B.current?.click(),w(!1))},onBlur(){m||z(!1)}},{getButtonProps:ne,buttonRef:G}=Tf({disabled:N,native:u,composite:!1}),re={type:`radio`,ref:H,form:I,id:U,name:S,tabIndex:-1,style:S?Pr:Nr,"aria-hidden":!0,...c===void 0?Qe:{value:Rf(c)},disabled:N,checked:L,required:F,readOnly:P,onChange(e){if(e.nativeEvent.defaultPrevented||N||P||c===void 0)return;let t=Q(Hn,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=Oa(`span`,e,{enabled:!oe,state:ie,ref:se,props:ce,stateAttributesMapping:Sf});return(0,J.jsxs)(zf.Provider,{value:ae,children:[oe?(0,J.jsx)(Af,{tag:`span`,render:n,className:r,style:f,state:ie,refs:se,props:ce,stateAttributesMapping:Sf}):le,(0,J.jsx)(`input`,{...re,suppressHydrationWarning:!0})]})}),Hf=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=Bf(),c=s.checked,{mounted:l,transitionStatus:u,setMounted:d}=yo(c),f={...s,transitionStatus:u},p=Y.useRef(null),m=a||l,h=Oa(`span`,e,{ref:[t,p],state:f,props:o,stateAttributesMapping:Sf});return wo({batch:!0,enabled:!c,open:c,ref:p,onComplete(){c||d(!1)}}),m?h:null});function Uf({className:e,disabled:t=!1,onKeyDown:n,...r}){return(0,J.jsx)(yf,{"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 Wf({className:e,disabled:t,...n}){return(0,J.jsx)(Vf,{"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)(Hf,{className:`h-2 w-2 rounded-full bg-primary`})})}function Gf({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)(Wf,{value:e,disabled:t,"aria-labelledby":i}),r]})}var Kf=Y.createContext(void 0);function qf(e){let t=Y.useContext(Kf);if(t===void 0&&!e)throw Error(et(33));return t}var Jf=Y.createContext(void 0);function Yf(e){let t=Y.useContext(Jf);if(t===void 0&&!e)throw Error(et(36));return t}var Xf=Y.createContext(void 0);function Zf(e=!0){let t=Y.useContext(Xf);if(t===void 0&&!e)throw Error(et(25));return t}var Qf=Y.createContext(null);function $f(e=`root`){let t=Y.useContext(Qf),n=Y.useContext(Jf);return t===null||n===void 0?null:(e===`submenu-trigger`?n.virtualFocus||n.parentVirtualFocus:n.virtualFocus)?t:null}var ep={visible:!0,ref:null};function tp(){return ep}function np(e,t,n=`root`){let r=$f(n),i=((n===`submenu-trigger`?r?.useSubmenuTrigger:r?.useItem)??tp)({label:e.label,children:e.children,render:e.render}),a=mr(t,i.ref);return{visible:i.visible,ref:a,props:i.props}}var rp=Y.createContext(void 0);function ip(){let e=Y.useContext(rp);if(e===void 0)throw Error(et(30));return e}function ap(e){e.preventDefault()}function op(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,l=Yf(),u=Zf(!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?ap: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:qn})},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`&&Cf(s.current,e,{detail:1,pointerType:`mouse`})}}),[t,_,r,m,i,a.context.allowMouseUpTriggerRef,o,s,u,g,c.type,p,f])}var sp={type:`regular-item`};function cp(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}=Tf({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),p=op({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:u,itemMetadata:c}),m=Y.useCallback(e=>ha(p,{onMouseEnter(e){c.type===`submenu-trigger`&&c.setActive(e.nativeEvent)}},e,d),[p,d,c]),h=mr(u,f);return Y.useMemo(()=>({getItemProps:m,itemRef:h}),[m,h])}var lp=`data-checked`,up=`data-unchecked`,dp={checked(e){return e?{[lp]:``}:{[up]:``}},...fn},fp=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}=Yf(),m=Of({guess:!0,label:a}),h=Kc(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}=cp({closeOnClick:c,disabled:b,highlighted:_,id:h,store:p,nativeButton:o,nodeId:v,itemMetadata:sp}),C=Y.useMemo(()=>({disabled:b,highlighted:_,checked:l}),[b,_,l]);function w(e){let t=Q(qn,e.nativeEvent,void 0,{preventUnmountOnClose:Xe});u?.(!l,t)}let T=Oa(`div`,e,{state:C,stateAttributesMapping:dp,props:[y,{role:`menuitemcheckbox`,"aria-checked":l,onClick:w},f,x],ref:[S,t,m.ref]});return(0,J.jsx)(rp.Provider,{value:C,children:T})}),pp=Y.forwardRef(function(e,t){let{checked:n,defaultChecked:r,onCheckedChange:i,...a}=e,[o,s]=yd({controlled:n,default:r??!1,name:`MenuCheckboxItem`,state:`checked`}),c=np(e,t);function l(e,t){i?.(e,t),t.isCanceled||s(e)}return c.visible?(0,J.jsx)(fp,{...a,checked:o,onCheckedChange:l,ref:c.ref}):null}),mp=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=ip(),c=Y.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=yo(s.checked);return wo({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}}),Oa(`span`,e,{state:{checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l},ref:[t,c],stateAttributesMapping:dp,props:{"aria-hidden":!0,...o},enabled:a||u})}),hp=Y.createContext(void 0);function gp(){let e=Y.useContext(hp);if(e===void 0)throw Error(et(31));return e}var _p=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=Y.useState(void 0),c=Oa(`div`,e,{ref:t,props:{role:`group`,"aria-labelledby":o,...a}});return(0,J.jsx)(hp.Provider,{value:s,children:c})}),vp=Y.forwardRef(function(e,t){return(0,J.jsx)($f()?.Group??_p,{...e,ref:t})}),yp=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Kc(a),c=gp();return X(()=>(c(s),()=>{c(e=>e===s?void 0:e)}),[c,s]),Oa(`div`,e,{ref:t,props:{id:s,"aria-hidden":!0,...o}})}),bp=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}=Yf(),f=Of({guess:!0,label:a}),p=Kc(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}=cp({closeOnClick:c,disabled:v,highlighted:h,id:p,store:d,nativeButton:o,nodeId:g,itemMetadata:sp});return Oa(`div`,e,{state:{disabled:v,highlighted:h},props:[_,u,y],ref:[b,t,f.ref]})}),xp=Y.forwardRef(function(e,t){let n=np(e,t);return n.visible?(0,J.jsx)(bp,{...e,ref:n.ref}):null}),Sp=Y.createContext(void 0);function Cp(e){let t=Y.useContext(Sp);if(t===void 0&&!e)throw Error(et(69));return t}var wp=Y.createContext(void 0);function Tp(){return Y.useContext(wp)}function Ep(e,t){let n=Ma(e.render);if(Y.isValidElement(n)){let e=n.props;if(Object.hasOwn(e,`id`))return e.id??``}return e.id??t}function Dp(e,t,n){let r=Ep(e,t),i=r===t?void 0:r;return[r,Y.useCallback(e=>n?.(e?i:void 0),[i,n])]}function Op(e,t,n){let r=Ma(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 kp=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}=Yf(),m=Tp(),{side:h,align:g}=qf(),_=Cp(!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]=Dp(e,u,d),L=Op(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),wo({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]),vs(D,{enabled:A&&!j&&!z&&w.type!==`menubar`,closeDelay:k});let V=l.useStateSetter(`popupElement`),{parentVirtualFocusRef:H,handleFocus:ee}=(Y.useContext(Qf)?.useParentHandoff??jp)(l,w,v,f),te=Oa(`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:En,props:[b,{id:F,...P?{role:`presentation`}:{role:`menu`,"aria-orientation":p===`horizontal`?`horizontal`:void 0,"aria-labelledby":L},onKeyDown(e){R?.onPopupKeyDown?.(e),_&&Dd.has(e.key)&&e.stopPropagation()},onFocus:ee},Cl(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)(lo,{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})}),Ap={parentVirtualFocusRef:void 0,handleFocus:void 0};function jp(){return Ap}var Mp=Y.forwardRef(function(e,t){return(0,J.jsx)($f()?.Popup??kp,{...e,ref:t})}),Np=Y.createContext(void 0);function Pp(){let e=Y.useContext(Np);if(e===void 0)throw Error(et(32));return e}var Fp=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i,parent:a}=Yf();if(!(i.useState(`mounted`)||n))return null;let o=a.type===`menu`||a.type===`menubar`?`group`:void 0;return(0,J.jsx)(Np.Provider,{value:n,children:(0,J.jsx)(Wa,{ref:t,...r,portalOwnerRole:o})})}),Ip=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 Lp(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=Y.useRef(null),o=Y.useRef(null),s=Co(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 Rp={},zp={},Bp=``;function Vp(e,t){return Ft(e)?e:t}function Hp(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Vp(t,n)).overflowY)}function Up(e){if(typeof document>`u`)return!1;let t=jr(e);return kt(t).innerWidth-t.documentElement.clientWidth>0}function Wp(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=jr(e),n=t.documentElement,r=t.body,i=Vp(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 Gp(e){let t=jr(e),n=t.documentElement,r=t.body,i=Vp(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 Kp(e){let t=jr(e),n=t.documentElement,r=t.body,i=kt(n),a=0,o=0,s=!1,c=kr.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,Rp={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Bp=n.style.scrollBehavior,zp={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=Vp(n,r);if(s=Wp(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,Rp),Object.assign(r.style,zp),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Bp)}function d(){u(),c.request(l)}l();let f=fr(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var qp=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=jr(e),n=t.documentElement,r=t.body,i=kt(n);if(Hp(i,n,r)){let t=new i.MutationObserver(()=>{Hp(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||!Up(e);this.restore=a?Gp(e):Kp(e)}};function Jp(e=!0,t=null){X(()=>{if(e)return qp.acquire(t)},[e,t])}var Yp=20;function Xp(e,t,n,r){let[i,a]=Y.useState(!1);X(()=>{if(!e||!t||n==null){a(!1);return}let r=jr(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-Yp)},[e,t,n]),Jp(e&&(!t||i),r)}var Zp=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=La,style:g,..._}=e,{store:v,virtualFocus:y,syncHighlightedItem:b}=Yf(),x=Pp(),S=Zf(!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??Ra):C.type===`menubar`&&(te??=C.context.orientation===`vertical`?`inline-end`:`bottom`,U??=`start`);let W=C.type===`context-menu`,ne=bl({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(ir)))}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(ir))}):v.setOpen(!1,Q(ir))}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]),Lp({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;Xp(D&&(ie||O&&F!==`trigger-hover`),k===`touch`,M,A);let ae=wl(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)(Kf.Provider,{value:ne,children:[oe&&(0,J.jsx)(Ip,{ref:C.type===`context-menu`||C.type===`nested-context-menu`?C.context.internalBackdropRef:null,inert:Ol(!D),cutout:se}),(0,J.jsx)(Qa,{id:I,children:(0,J.jsx)(Ld,{elementsRef:v.context.itemDomElements,labelsRef:v.context.itemLabels,onMapChange:b,children:ae})})]})}),Qp=Y.createContext(null);function $p(e){let t=Y.useContext(Qp);if(t===null&&!e)throw Error(et(5));return t}function em(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 tm(e,t){let{onClick:n,onPointerDown:r}=em($((n,r)=>{(typeof e==`function`?e():e)||t(r||(pt?`touch`:``))}));return Y.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function nm(e){let[t,n]=Y.useState(null),r=tm(e,n);return hf(e,t=>{t&&!e&&n(null)}),Y.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}function rm(e){return e==null?Hn:e.type.startsWith(`key`)?er:e.type.startsWith(`mouse`)||e.type.startsWith(`pointer`)?tr:Hn}var im={...cs,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=cs.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`&&!cs.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`)}},am=class extends $o{constructor(e,t,n=!1){let r=new Bo,i=sm(r,t,n,e);super(i,om(r),im),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 om(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 sm(e,t,n=!1,r){return{...ns(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 Ka,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Qe,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}var cm=Y.createContext(null);function lm(e,t){return(e===`trigger-press`||e===`item-press`)&&t?.detail===0}function um(e,t){return e===`list-navigation`||lm(e,t)}var dm=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=Zf(!0),C=Yf(!0),w=$p(!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=Kc(),k=Kc(),[A,j]=Y.useState(void 0),M=(A??k)||void 0,N=Ya(),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 am({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=Za(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}=nm(B);L.useSyncedValues({disabled:s,highlightItemOnHover:g,modal:W.type===void 0?c:void 0,openMethod:de,rootId:O}),Io(L);let{forceUnmount:pe,transitionStatus:me}=Lo(B,L,()=>{L.set(`allowMouseEnter`,!1)},F),he=Co(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=No(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=Mo(L.state,e,t.trigger,i());s.openChangeReason=n,s.keyboardOpen=e&&um(n,a),W.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?s.instantType=`group`:lm(n,a)?s.instantType=`click`:o?s.instantType=`dismiss`:s.instantType=void 0,L.update(s)}),_e=vo({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(or))},[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=_o(_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=ol(),Ce=Ds(_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,rm(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=Os(_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,er,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=Hn,L.context.highlightEvent=void 0,a&&Te(t,Vn(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=ha(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=ha(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)),Ro(L,{floatingRootContext:_e,activeTriggerProps:ke,inactiveTriggerProps:Ae,popupProps:Y.useMemo(()=>ha(Eo,{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)(Jf.Provider,{value:je,children:[p&&(0,J.jsx)(ko,{handle:p,store:L}),Me]});return(W.type===void 0||W.type===`context-menu`)&&(Ne=(0,J.jsx)($a,{externalTree:R,children:Ne})),Ne});function fm(e){let t=Y.useContext(cm);if(t===null)return(0,J.jsx)(dm,{...e});let n=t.Root;return(0,J.jsx)(cm.Provider,{value:null,children:(0,J.jsx)(n,{...t.options,...e})})}var pm={};function mm(e){Yf();let t=Y.useContext(cm);if(t!==null){let n=t.SubmenuRoot;return(0,J.jsx)(cm.Provider,{value:null,children:(0,J.jsx)(n,{...t.options,...e})})}return(0,J.jsx)(wp.Provider,{value:pm,children:(0,J.jsx)(dm,{...e,isSubmenu:!0})})}var hm=5;function gm(e,t){let n=_m(t);return e.clientX>=n.left-hm&&e.clientX<=n.right+hm&&e.clientY>=n.top-hm&&e.clientY<=n.bottom+hm}function _m(e){let t=e.getBoundingClientRect(),n=kt(e);if(bt)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 vm(e){if(Nt(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`);if(!Gt(e))return vm(Jt(e))}function ym(e,t){function n(n,r,i){let a=n.currentTarget;He.flushSync(()=>{e.setOpen(!1,Q(Zn,n.nativeEvent,a))}),Ii(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&&Li(t,r)?e.context.beforeContentFocusGuardRef.current?.focus():n(t,1,r)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function bm(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,jr(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:Qe,[t,n,r])}var xm=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=Yf(!0),h=ls(d)??m?.store;if(!h)throw Error(et(85));let g=Kc(s),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerControlsId`,g),x=Y.useRef(null),S=Cm(),C=Xd(!0),w=Xa(),T=Y.useMemo(()=>w??new Ka,[w]),{registerTrigger:E,isMountedByThisTrigger:D}=Fo(g,x,h,{payload:f,closeDelay:u,parent:S,floatingTreeRoot:T,floatingNodeId:Za(T),floatingParentNodeId:Ya(),keyboardEventRelay:C?.relayKeyboardEvent}),O=S.type===`menubar`,k=h.useState(`disabled`),A=a||k||O&&S.context.disabled,{getButtonProps:j,buttonRef:M}=Tf({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&&vm(t)===h.select(`rootId`)||gm(e,N.current)||T.events.emit(`close`,{domEvent:e,reason:rr})});Y.useEffect(()=>{let e=jr(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=bs(v,{enabled:(c??I)&&!A&&(!O||I&&!D),handleClose:Is({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=Sm(y,h.select(`lastOpenChangeReason`)),z=uo(v,{enabled:!A,event:y&&O?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:S.type===void 0&&R}),B=fs(v,{enabled:!A&&I}),V=bm({open:y,enabled:O,mouseDownAction:`open`}),H=Y.useMemo(()=>ha(B.reference,z.reference),[B.reference,z.reference]),ee=h.useState(`triggerProps`,D),te=h.useState(`filterTriggerProps`),{handlePreFocusGuardFocus:U,handleFocusTargetFocus:W}=ym(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}),jr(e.currentTarget).addEventListener(`mouseup`,F,{once:!0}))}},te,O?{role:`menuitem`}:{},V,p,j],ie=Oa(`button`,e,{enabled:!O,stateAttributesMapping:wn,state:ne,ref:G,props:re});return O?(0,J.jsx)(Af,{tag:`button`,render:n,className:r,style:i,state:ne,refs:G,props:re,stateAttributesMapping:wn}):y?(0,J.jsxs)(Y.Fragment,{children:[(0,J.jsx)(Fr,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:U},`${g}-pre-focus-guard`),(0,J.jsx)(Y.Fragment,{children:ie},g),(0,J.jsx)(Fr,{ref:h.context.triggerFocusTargetRef,onFocus:W},`${g}-post-focus-guard`)]}):(0,J.jsx)(Y.Fragment,{children:ie},g)});function Sm(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 Cm(){let e=$p(!0);return Y.useMemo(()=>e?{type:`menubar`,context:e}:{type:void 0},[e])}var wm=Y.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return Oa(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})}),Tm={"aria-expanded":void 0},Em=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=Yf(!0);if(p?.parent.type!==`menu`)throw Error(et(37));let m=qf(),h=Tp(),{store:g,parentVirtualFocus:_}=p,v=p.parent.store,y=Of({guess:!0,label:a}),b=Kc(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=jo(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){en(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,tr,e)}}),[v,y.index]),{getItemProps:L,itemRef:R}=cp({closeOnClick:!1,disabled:N,highlighted:F,id:b,store:g,typingRef:v.context.typingRef,nativeButton:s,itemMetadata:I,nodeId:m?.context.nodeId}),z=bs(w,{enabled:g.useState(`hoverEnabled`)&&c&&!N,handleClose:Is({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=uo(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&&yt;return Oa(`div`,e,{state:H,stateAttributesMapping:Cn,props:[B,z,V,h?.onTriggerKeyDown?{onKeyDown:h.onTriggerKeyDown}:void 0,P,U?Tm:void 0,{"aria-controls":E,tabIndex:_||!(x||F)?-1:0,onFocus(e){g.select(`open`)&&S.current&&(S.current=!1,g.setOpen(!1,Q(Zn,e.nativeEvent)))},onBlur(){F&&v.setActiveIndex(null,Hn)}},f,L],ref:[t,y.ref,R,O,A]})}),Dm=Y.forwardRef(function(e,t){let n=np(e,t,`submenu-trigger`);if(!n.visible)return null;let r=n.props?ha(n.props,e):e;return(0,J.jsx)(Em,{...r,ref:n.ref})});function Om(e){return Array.isArray(e)?e.map(e=>Om(e)).join(`,`):e==null?``:String(e)}function km(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function Am(e){return km(e?.[0])}function jm(e){return Am(e)?e.flatMap(e=>e.items):e}function Mm(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(Am(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 Nm(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 Rf(e)}function Pm(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?Rf(e.value):Rf(e)}function Fm(e,t,n){function r(){return Nm(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=jm(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 Im(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,J.jsx)(Y.Fragment,{children:Fm(r,t,n)},i)),e),[])}var Lm=Y.createContext(void 0);function Rm(){let e=Y.useContext(Lm);if(e===void 0)throw Error(et(53));return e}function zm(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 Bm=`base-ui-disable-scrollbar`,Vm={className:Bm,getElement(e){return(0,J.jsx)(`style`,{nonce:e,href:Bm,precedence:`base-ui:low`,children:`.${Bm}{scrollbar-width:none}.${Bm}::-webkit-scrollbar{display:none}`})}},Hm=`data-has-overflow-x`,Um=`data-has-overflow-y`,Wm=`data-overflow-x-start`,Gm=`data-overflow-x-end`,Km=`data-overflow-y-start`,qm=`data-overflow-y-end`,Jm=e=>t=>t?{[e]:``}:null,Ym={hasOverflowX:Jm(Hm),hasOverflowY:Jm(Um),overflowXStart:Jm(Wm),overflowXEnd:Jm(Gm),overflowYStart:Jm(Km),overflowYEnd:Jm(qm),cornerHidden:()=>null},Xm=Y.createContext(void 0),Zm={disableStyleElements:!1};function Qm(){return Y.useContext(Xm)??Zm}var $m=`--scroll-area-corner-height`,eh=`--scroll-area-corner-width`,th=`data-orientation`,nh={x:0,y:0},rh={width:0,height:0},ih={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},ah={x:!0,y:!0,corner:!0},oh=Y.forwardRef(function(e,t){let{render:n,className:r,overflowEdgeThreshold:i,style:a,...o}=e,{xStart:s,xEnd:c,yStart:l,yEnd:u}=sh(i),d=Kc(),f=ot(),p=ot(),{nonce:m,disableStyleElements:h}=Qm(),[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(rh),[O,k]=Y.useState(rh),[A,j]=Y.useState(ih),[M,N]=Y.useState(ah),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(nh),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(th);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=zm(i,`padding`,a),s=zm(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`,[$m]:`${E.height}px`,[eh]:`${E.width}px`}},pe=Oa(`div`,e,{state:de,ref:[t,P],props:[fe,o],stateAttributesMapping:Ym}),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)(Lm.Provider,{value:me,children:[!h&&Vm.getElement(m),pe]})});function sh(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 ch(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var lh=Y.createContext(void 0);function uh(){let e=Y.useContext(lh);if(e===void 0)throw Error(et(55));return e}function dh(e,t){return Math.max(0,e-t)}function fh(e,t){if(t<=0)return 0;let n=ch(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 ph=`--scroll-area-overflow-x-start`,mh=`--scroll-area-overflow-x-end`,hh=`--scroll-area-overflow-y-start`,gh=`--scroll-area-overflow-y-end`,_h=`--scroll-area-thumb-height`,vh=`--scroll-area-thumb-width`,yh=[ph,mh,hh,gh],bh=!1;function xh(){bh||vt||(typeof CSS<`u`&&`registerProperty`in CSS&&yh.forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),bh=!0)}var Sh=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}=Rm(),T=ol(),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=Ch(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=fh(T===`rtl`?-w:w,P),L=P-I);let R=A?0:fh(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=zm(n,`padding`,`x`),G=zm(t,`padding`,`y`),re=zm(i,`margin`,`x`),ie=zm(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=>wh(e,{width:le,height:ue})),t&&r){let e=Th(r,_h,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=Th(i,vh,T===`rtl`?-w:w,P,_,le,e);i.style.transform=`translate3d(${T===`rtl`?-t:t}px,0,0)`}let de=[I,L,R,z];yh.forEach((t,n)=>{e.style.setProperty(t,`${de[n]}px`)}),a&&p(e=>wh(e,{width:H,height:ee})),g(e=>wh(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=>wh(e,fe))});X(()=>{xh()},[]),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=bo(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:Vm.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=Oa(`div`,e,{ref:[t,o],state:w,props:[M,a],stateAttributesMapping:Ym}),P=Y.useMemo(()=>({computeThumbPosition:A}),[A]);return(0,J.jsx)(lh.Provider,{value:P,children:N})});function Ch(e){let t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function wh(e,t){for(let n in t)if(e[n]!==t[n])return t;return e}function Th(e,t,n,r,i,a,o){let s=ch(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 Eh=Y.createContext(void 0);function Dh(){let e=Y.useContext(Eh);if(e===void 0)throw Error(et(54));return e}var Oh=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}=Rm(),T=i===`vertical`,E={...w,hovering:c,scrolling:T?u:l,orientation:i},D=ol(),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 fr(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=en(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=zm(n,`margin`,a),s=zm(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(${$m})`,insetInlineEnd:0,[_h]:`${S.height}px`}:{insetInlineStart:0,insetInlineEnd:`var(${eh})`,bottom:0,[vh]:`${S.width}px`}}},M=Oa(`div`,e,{ref:[t,T?f:p],state:E,props:[j,s],stateAttributesMapping:Ym});return A?(0,J.jsx)(Eh.Provider,{value:i,children:M}):null}),kh=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{computeThumbPosition:o}=uh(),{hasMeasuredScrollbar:s,viewportState:c}=Rm(),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]),Oa(`div`,e,{ref:[t,l],state:c,stateAttributesMapping:Ym,props:[{role:`presentation`,style:{minWidth:`fit-content`}},a]})}),Ah=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}=Rm(),m=Dh(),h=m===`vertical`;return Oa(`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]})}),jh=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{cornerRef:o,cornerSize:s,hiddenState:c}=Rm(),l=Oa(`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 Mh({className:e,children:t,viewportClassName:n,...r}){return(0,J.jsxs)(oh,{"data-slot":`scroll-area`,className:q(`relative`,e),...r,children:[(0,J.jsx)(Sh,{"data-slot":`scroll-area-viewport`,className:q(`w-full rounded-[inherit] outline-none`,n??`h-full`),children:(0,J.jsx)(kh,{"data-slot":`scroll-area-content`,style:{minWidth:0},children:t})}),(0,J.jsx)(Nh,{}),(0,J.jsx)(jh,{})]})}function Nh({className:e,...t}){return(0,J.jsx)(Oh,{"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)(Ah,{"data-slot":`scroll-area-thumb`,className:`relative flex-1 rounded-full bg-muted-foreground/40 transition-colors hover:bg-muted-foreground/70`})})}var Ph=`min-w-[13rem] rounded-md border border-[var(--color-border)] bg-[var(--color-card)] text-[var(--color-card-foreground)] shadow-md outline-none`;function Fh({children:e}){return(0,J.jsx)(Mh,{viewportClassName:`max-h-[var(--available-height)]`,children:(0,J.jsx)(`div`,{className:`p-1`,children:e})})}var Ih=`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`,Lh=fm,Rh=vp,zh=mm,Bh=`data-[popup-open]:bg-[var(--color-accent)] data-[popup-open]:text-[var(--color-accent-foreground)]`;function Vh({className:e,...t}){return(0,J.jsx)(xm,{className:typeof e==`function`?e:q(Bh,e),...t})}function Hh({className:e,sideOffset:t=6,align:n=`start`,children:r,...i}){return(0,J.jsx)(Fp,{children:(0,J.jsx)(Zp,{sideOffset:t,align:n,className:`z-50 outline-none`,children:(0,J.jsx)(Mp,{className:q(Ph,e),...i,children:(0,J.jsx)(Fh,{children:r})})})})}function Uh({className:e,...t}){return(0,J.jsx)(xp,{className:q(Ih,e),...t})}function Wh({className:e,children:t,closeOnClick:n=!1,...r}){return(0,J.jsxs)(pp,{className:q(Ih,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)(mp,{children:(0,J.jsx)(du,{className:`h-3.5 w-3.5`})})}),t]})}function Gh({className:e,children:t,...n}){return(0,J.jsxs)(Dm,{className:q(Ih,`data-[popup-open]:bg-[var(--color-accent)]`,e),...n,children:[t,(0,J.jsx)(pu,{className:`ml-auto h-3.5 w-3.5 shrink-0 opacity-70`})]})}function Kh({className:e,children:t,...n}){return(0,J.jsx)(Fp,{children:(0,J.jsx)(Zp,{side:`right`,align:`start`,sideOffset:2,className:`z-50 outline-none`,children:(0,J.jsx)(Mp,{className:q(Ph,e),...n,children:(0,J.jsx)(Fh,{children:t})})})})}function qh({className:e,...t}){return(0,J.jsx)(wm,{className:q(`-mx-1 my-1 h-px bg-[var(--color-border)]`,e),...t})}function Jh({className:e,...t}){return(0,J.jsx)(yp,{className:q(`px-2 py-1.5 text-xs font-semibold text-[var(--color-muted-foreground)]`,e),...t})}function Yh(e){return Oa(e.defaultTagName??`div`,e,e)}function Xh({className:e,orientation:t=`horizontal`,...n}){return(0,J.jsx)(wm,{orientation:t,"data-slot":`separator`,className:q(`shrink-0 bg-border`,t===`horizontal`?`h-px w-full`:`h-full w-px`,e),...n})}function Zh({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`skeleton`,className:q(`animate-pulse rounded-md bg-accent`,e),...t})}var Qh=Y.createContext(void 0);function $h(e){let t=Y.useContext(Qh);if(!e&&t===void 0)throw Error(et(27));return t}var eg=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=$h(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return Oa(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:En,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),tg=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=$h(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=Tf({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,Q(Jn,e.nativeEvent))}return Oa(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),ng=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=$h(),c=Kc(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),Oa(`p`,e,{ref:t,props:[{id:c},o]})}),rg=Y.createContext(void 0);function ig(){let e=Y.useContext(rg);if(e===void 0)throw Error(et(26));return e}var ag=`--nested-dialogs`,og=`data-nested-dialog-open`,sg={...Tn,...fn,nestedDialogOpen(e){return e?{[og]:``}:null}},cg=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=$h(),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`);ig(),wo({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let C=o===void 0?Do(c.context.popupRef):o,w=g>0,T=c.useStateSetter(`popupElement`),E=Oa(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:w},props:[f,{id:S,"aria-labelledby":y,"aria-describedby":l,role:x,...Eo,hidden:!m,onKeyDown(e){Dd.has(e.key)&&e.stopPropagation()},style:{[ag]:g}},s],ref:[t,c.context.popupRef,T],stateAttributesMapping:sg});return(0,J.jsx)(lo,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:C,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:E})}),lg=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=$h(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,J.jsx)(rg.Provider,{value:n,children:(0,J.jsxs)(Wa,{ref:t,...r,children:[a&&o===!0&&(0,J.jsx)(Ip,{ref:i.context.internalBackdropRef,inert:Ol(!s)}),e.children]})}):null});function ug({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=_o(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=en(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 Jp(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]),Ro(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var dg={...cs,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},fg=class extends $o{constructor(e,t,n){let r=new Bo,i=pg(e,r,t,n);super(i,mg(r),dg)}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(Mo(this.state,e,t.trigger)))}};function pg(e,t,n,r=!1){return{...ns(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 mg(e){return{popupRef:Y.createRef(),backdropRef:Y.createRef(),internalBackdropRef:Y.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function hg(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=$h(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},b=Oo((e,t)=>new fg({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`);zo(b,x),Io(b);let{forceUnmount:w}=Lo(x,b);Y.useImperativeHandle(l,()=>({unmount:w,close:()=>b.setOpen(!1,Q(or))}),[w,b]);let T=x||S||u!=null;return(0,J.jsxs)(Qh.Provider,{value:b,children:[u&&(0,J.jsx)(ko,{handle:u,store:b}),T&&(0,J.jsx)(ug,{store:b,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:C}):n]})}var gg=qe(function(e){return hg(`dialog`,e)}),_g=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=$h(),c=Kc(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),Oa(`h2`,e,{ref:t,props:[{id:c},o]})}),vg=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=$h(!0),f=ls(l)??d;if(!f)throw Error(et(79));let p=Kc(s),m=f.useState(`floatingRootContext`),h=f.useState(`isOpenedByTrigger`,p),g=f.useState(`triggerPopupId`,p),_=Y.useRef(null),{registerTrigger:v,isMountedByThisTrigger:y}=Fo(p,_,f,{payload:c}),{getButtonProps:b,buttonRef:x}=Tf({disabled:a,native:o}),S=uo(m),C=tm(()=>f.select(`open`),e=>{f.set(`openMethod`,e)}),w={disabled:a,open:h},T=f.useState(`triggerProps`,y);return Oa(`button`,e,{state:w,ref:[x,t,v,_],props:[S.reference,T,C,{[Ia]:``,id:p,"aria-haspopup":`dialog`,"aria-expanded":h,"aria-controls":g},u,b],stateAttributesMapping:Cn})});function yg(e){return(0,J.jsx)(gg,{...e})}function bg({className:e,children:t,side:n=`left`,...r}){return(0,J.jsxs)(lg,{children:[(0,J.jsx)(eg,{className:`fixed inset-0 z-50 bg-black/40 backdrop-blur-[1px]`}),(0,J.jsx)(cg,{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 xg({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`sheet-header`,className:q(`flex flex-col gap-1 p-4`,e),...t})}function Sg({className:e,...t}){return(0,J.jsx)(_g,{className:q(`text-sm font-semibold`,e),...t})}function Cg({className:e,...t}){return(0,J.jsx)(ng,{className:q(`text-sm text-muted-foreground`,e),...t})}var wg=`(width < 48rem)`,Tg=()=>typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(wg):void 0,Eg=()=>Tg()?.matches??!1;function Dg(e){let t=Tg();return t?.addEventListener(`change`,e),()=>t?.removeEventListener(`change`,e)}function Og(){return(0,Y.useSyncExternalStore)(Dg,Eg,()=>!1)}var kg=`16rem`,Ag=`18rem`,jg=`3rem`,Mg=`b`,Ng=Y.createContext(null);function Pg(){let e=Y.useContext(Ng);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function Fg(){return Y.useContext(Ng)}function Ig({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...o}){let s=Og(),[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===Mg&&(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)(Ng.Provider,{value:g,children:(0,J.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":kg,"--sidebar-width-icon":jg,...i},className:q(`group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full`,r),...o,children:a})})}function Lg({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a}){let{isMobile:o,state:s,openMobile:c,setOpenMobile:l}=Pg();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)(yg,{open:c,onOpenChange:l,children:(0,J.jsxs)(bg,{"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":Ag},side:e,children:[(0,J.jsxs)(xg,{className:`sr-only`,children:[(0,J.jsx)(Sg,{children:`Sidebar`}),(0,J.jsx)(Cg,{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 Rg({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 zg({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 Bg({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 Vg({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 Hg({className:e,render:t=(0,J.jsx)(`div`,{}),...n}){return Yh({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 Ug({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 Wg({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 Gg({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 Kg({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 qg({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?du:mu;return(0,J.jsxs)(jl,{children:[(0,J.jsx)(Ml,{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)(Nl,{children:r?`Copied`:t})]})}var Jg=navigator.platform.startsWith(`Mac`)?`⌘B`:`Ctrl+B`;function Yg(){let{isMobile:e,setOpen:t}=Pg();return e?null:(0,J.jsx)(Zg,{label:`Hide the sidebar`,onClick:()=>t(!1)})}function Xg(){let e=Fg();if(!e)return null;let{isMobile:t,open:n,setOpen:r}=e;return t||n?null:(0,J.jsx)(Zg,{label:`Show the sidebar`,onClick:()=>r(!0)})}function Zg({label:e,onClick:t}){return(0,J.jsxs)(jl,{children:[(0,J.jsx)(Ml,{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)(vu,{className:`h-4 w-4`,"aria-hidden":!0})}),(0,J.jsxs)(Nl,{children:[e,` `,(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:Jg})]})]})}var Qg=`overview`,$g=`settings`;function e_(e){return/^[a-z][a-z0-9]*$/.test(e)&&e!==`overview`&&e!==`settings`}function t_(e,t){let n=new Set([Qg,$g,...t,...e]),r=new Map,i=new Map;for(let t of e){let e=n_(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 n_(e){let t=e.lastIndexOf(`-`);return t>0?e.slice(0,t):``}function r_({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 i_({open:e,onOpenChange:t,title:n,children:r}){return(0,J.jsx)(gg,{open:e,onOpenChange:t,children:(0,J.jsxs)(lg,{children:[(0,J.jsx)(eg,{className:`fixed inset-0 z-50 bg-black/40 backdrop-blur-[1px]`}),(0,J.jsxs)(cg,{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)(_g,{className:`text-sm font-semibold`,children:n}),(0,J.jsx)(tg,{"aria-label":`Close`,className:`rounded p-0.5 text-muted-foreground outline-none hover:text-foreground`,children:(0,J.jsx)(bu,{className:`h-4 w-4`,"aria-hidden":!0})})]}),r]})]})})}var a_=`oa.pending-draft`;function o_(){try{return globalThis.sessionStorage}catch{return}}function s_(e){o_()?.setItem(a_,e)}function c_(){let e=o_();if(!e)return null;let t=e.getItem(a_);return t!==null&&e.removeItem(a_),t}function l_({text:e,compact:t=!1}){return(0,J.jsx)(`div`,{className:t?`space-y-1.5 text-xs leading-relaxed`:`space-y-2.5 text-sm leading-5`,children:C_(e.replace(/\r\n/g,`
8
8
  `).split(`
9
- `),t)})}function i_(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 a_(e,t,n){let r=e.join(`
10
- `);return(0,J.jsxs)(`div`,{className:`relative rounded-lg border border-border bg-muted/50`,children:[(0,J.jsx)(Vg,{text:r,label:`Copy the code`,className:`absolute top-2.5 right-2.5`}),(0,J.jsx)(`pre`,{className:`px-4 py-3 pr-10 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:i_(t),children:n<e.length-1?`${t}\n`:t},n)):r})})]},n)}function o_(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 s_(e){return o_(e).length>0&&o_(e).every(e=>/^:?-+:?$/.test(e))}function c_(e){return e.replace(/^[ \t]*/,e=>e.replace(/\t/g,` `))}function l_(e){return/^ */.exec(c_(e))[0].length}function u_(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 d_(e){let t=/^[ \t]*[-*]\s+(.*)$/.exec(e);if(t)return{indent:l_(e),ordered:!1,start:1,text:t[1]};let n=/^[ \t]*(\d{1,3})[.)]\s+(.*)$/.exec(e);return n?{indent:l_(e),ordered:!0,start:Number(n[1]),text:n[2]}:null}function f_(e){return/^\s*(?:([-*_])\1{2,}|([-*_])(?: \2){2,})\s*$/.test(e)}function p_(e){return/^\s*```/.test(e)}var m_=12;function h_(e,t){let n=d_(e[t]).indent,r=t+1,i=!1;for(let a=t+1;a<e.length;a++){let t=e[a];if(i){p_(t)&&(i=!1),r=a+1;continue}if(!t.trim())continue;let o=l_(t)>=n+2,s=d_(t)!==null&&!f_(t);if(!o&&!s)break;o&&p_(t)&&(i=!0),r=a+1}return r}function g_(e,t,n,r){let i=[],a=d_(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&&!p_(u[t]),i=d;for(let r=e;r<=t;r++)n(r)&&u[r].trim()&&(i=Math.min(i,l_(u[r])));for(let a=e;a<=t;a++)n(a)&&(r[a]=i)}let i=u.length>0?__(u.map((e,t)=>u_(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:w_(e[2])}),i]}):(0,J.jsx)(`span`,{children:w_(e[2])})]},c.length):(0,J.jsxs)(`li`,{className:i?`space-y-1`:void 0,children:[w_(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),p_(t)&&m();continue}let e=d_(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,l_(t)),p_(t)&&(f=!0,p.push([u.length-1,u.length-1]))):u.length>0&&u.push(t)}return _(),i}function __(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&&s_(e[1])){let t=o_(e[0]),n=e.slice(2).map(o_);r.push((0,J.jsx)(`div`,{className:`overflow-x-auto`,children:(0,J.jsxs)(`table`,{className:`w-full border-collapse text-xs`,children:[(0,J.jsx)(`thead`,{children:(0,J.jsx)(`tr`,{children:t.map((e,t)=>(0,J.jsx)(`th`,{className:`border-b border-border px-2 py-1 text-left font-semibold`,children:w_(e)},t))})}),(0,J.jsx)(`tbody`,{children:n.map((e,n)=>(0,J.jsx)(`tr`,{children:t.map((t,n)=>(0,J.jsx)(`td`,{className:`border-b border-border/50 px-2 py-1 align-top`,children:w_(e[n]??``)},n))},n))})]})},o++))}else for(let t of e)r.push((0,J.jsx)(`p`,{children:w_(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(a_(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:w_(d[2])},o++));continue}if(f_(l)){r.push((0,J.jsx)(`hr`,{className:`border-border`},o++));continue}if(n<m_&&/^\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:__(a,t,n+1)},o++)),c=i-1;continue}if(n<m_&&d_(l)){let i=h_(e,c);for(let a of g_(e.slice(c,i),t,n,o++))r.push(a);c=i-1;continue}l.trim()&&r.push((0,J.jsx)(`p`,{children:w_(l)},o++))}return s(),i!==null&&r.push(a_(i.lines,i.language,o++)),r}var v_=`text-primary underline underline-offset-2 break-all`,y_=`rounded-[5px] border-[0.5px] border-foreground/10 bg-foreground/5 px-[3px] py-px text-[0.9em] text-(--code-foreground)`,b_=`whitespace-nowrap rounded bg-primary/10 px-1.5 text-primary hover:bg-primary/15`,x_=(0,Y.createContext)(void 0);function S_({number:e}){let t=(0,Y.useContext)(x_);return t?(0,J.jsxs)(`a`,{href:`${t}/issues/${e}`,target:`_blank`,rel:`noreferrer`,className:b_,children:[`#`,e]}):`#${e}`}function C_(e,t,n){return(0,J.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,className:v_,children:t},n)}function w_(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:y_,children:n.slice(1,-1)},a++));else if(n.startsWith(`[`)){let e=/^\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)$/.exec(n),r=/^\[([^\]]+)\]\(([^\s):]+)\)$/.exec(n);e?t.push(C_(e[2],e[1],a++)):r?t.push((0,J.jsx)(`code`,{title:r[2],className:y_,children:r[1]},a++)):t.push((0,J.jsx)(Y.Fragment,{children:n},a++))}else n.startsWith(`**`)?t.push((0,J.jsx)(`strong`,{children:w_(n.slice(2,-2))},a++)):n.startsWith(`*`)?t.push((0,J.jsx)(`em`,{children:w_(n.slice(1,-1))},a++)):n.startsWith(`#`)?t.push((0,J.jsx)(S_,{number:n.slice(1)},a++)):t.push(C_(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 T_(e){return lg(`alert-dialog`,e)}var E_=fg;function D_({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}=ud();return(0,J.jsxs)(T_,{open:p,onOpenChange:e=>{h||(m(e),e&&v())},children:[e&&(0,J.jsx)(E_,{render:e}),(0,J.jsxs)(rg,{children:[(0,J.jsx)(Jh,{className:`fixed inset-0 z-50 bg-black/40 backdrop-blur-[1px]`}),(0,J.jsxs)(ng,{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)(dg,{className:`text-sm font-semibold`,children:r}),(0,J.jsx)(Xh,{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)(Yh,{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})]})]})]})]})}function O_(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 k_=`data-checked`,A_=`data-unchecked`;function j_(e){return{checked(t){return e.indeterminate?{}:t?{[k_]:``}:{[A_]:``}},...Xd}}var M_=Y.createContext(void 0);function N_(){return Y.useContext(M_)}var P_=Y.createContext(void 0);function F_(){let e=Y.useContext(P_);if(e===void 0)throw Error(et(14));return e}var I_=`data-parent`,L_=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}=$d(),M=Df(),{labelId:N,registerControlId:P,getDescriptionProps:F}=nf(),I=N_(),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=Kc(),ee=I?.registerControlId!==P,te=jf({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=Tf(z,oe),{getButtonProps:ce,buttonRef:le}=yf({disabled:z,native:y}),ue=I?.validation??j,[de,fe]=pd({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=mr(u,ge,p?void 0:ye),xe=Of(a,N,ge,!y,te,x[`aria-label`]);X(()=>{ge.current&&(ge.current.indeterminate=me),I||E(de)},[de,me,I,E]),lf(de,()=>{I||(S(B),T(de!==A.initialValue),ue.change(de))});let Se=ha({checked:de,disabled:z,form:s,name:p?void 0:B,id:y?void 0:te,required:g,ref:be,style:B?Pr:Nr,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(Hn,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=j_(Ce),we=Oa(`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,[I_]: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),kt(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||O_(t)?.click()})},onClick(e){if(m||z)return;e.preventDefault();let t=ge.current;t&&_f(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)(P_.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})]})}),R_=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=F_(),c=s.checked||s.indeterminate,{mounted:l,transitionStatus:u,setMounted:d}=yo(c),f=Y.useRef(null),p={...s,transitionStatus:u};wo({batch:!0,enabled:!c,open:c,ref:f,onComplete(){c||d(!1)}});let m={...j_(s),...fn},h=a||l,g=Oa(`span`,e,{ref:[t,f],state:p,stateAttributesMapping:m,props:o});return h?g:null});function z_({className:e,disabled:t=!1,...n}){return(0,J.jsx)(L_,{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)(R_,{className:`flex items-center justify-center text-current`,children:(0,J.jsx)(su,{className:`h-3 w-3`,strokeWidth:3,"aria-hidden":!0})})})}var B_=O(`onModules`),V_=O(`runModuleCommand`),H_=O(`runComputerCommand`),U_=O(`runComputerCommandOn`),W_=O(`readModule`);function G_({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 K_={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 useLoginsOn(){return{ok:!1,error:`no dashboard to give a server logins from`}},async watchScreen(){},async sendToScreen(){return!1}},q_=(0,Y.createContext)(null);function J_(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 Y_(e){let t=(0,Y.useContext)(q_)??K_;return(0,Y.useMemo)(()=>({...t,package:e}),[t,e])}function X_({className:e,...t}){return(0,J.jsx)(`div`,{className:q(`rounded-lg border border-border bg-card text-card-foreground`,e),...t})}function Z_({className:e,...t}){return(0,J.jsx)(`div`,{className:q(`flex flex-col gap-1 px-4 pt-4`,e),...t})}function Q_({className:e,...t}){return(0,J.jsx)(`h3`,{className:q(`text-sm font-semibold`,e),...t})}function $_({icon:e,children:t,segment:n,onOpen:r,className:i}){let a=(0,Y.useContext)(q_)??K_;return(0,J.jsx)(Q_,{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)(ou,{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 ev({className:e,...t}){return(0,J.jsx)(`div`,{className:q(`p-4`,e),...t})}var tv=Y.createContext(void 0);function nv(){let e=Y.useContext(tv);if(e===void 0)throw Error(et(63));return e}var rv=`data-checked`,iv=`data-unchecked`,av={...Xd,checked(e){return e?{[rv]:``}:{[iv]:``}}},ov=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}=$d(),{labelId:A}=nf(),j=D||m,M=O??l,N=Y.useRef(null),P=mr(N,c,k.inputRef),F=Y.useRef(null),I=Tf(j,F),L=Kc(),R=jf({id:s}),z=u?void 0:R,[B,V]=pd({controlled:n,default:!!i,name:`Switch`,state:`checked`});ef(F,L,B,void 0,!j,l),X(()=>{T(B)},[B,T]),lf(B,()=>{b(M),C(B!==w.initialValue),k.change(B)});let{getButtonProps:H,buttonRef:ee}=yf({disabled:j,native:u}),te=Of(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&&_f(t,e)}},W={...k.getValidationProps(j),checked:B,disabled:j,form:o,id:z,name:M,required:p,style:M?Pr:Nr,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(Hn,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=Oa(`span`,e,{state:ne,ref:[t,F,ee],props:[U,y,H,e=>k.getValidationProps(j,e)],stateAttributesMapping:av});return(0,J.jsxs)(tv.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})]})}),sv=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return Oa(`span`,e,{state:nv(),ref:t,stateAttributesMapping:av,props:a})});function cv({className:e,disabled:t=!1,...n}){return(0,J.jsx)(ov,{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)(sv,{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 lv({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 uv({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 dv({className:e,...t}){return(0,J.jsx)(`tbody`,{"data-slot":`table-body`,className:q(`[&_tr:last-child]:border-0`,e),...t})}function fv({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 pv({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 mv({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 hv({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})}function gv(e){let t=Y.useRef(!0);t.current&&(t.current=!1,e())}var _v=Y.createContext(void 0),vv=Y.createContext(void 0);function yv(){let e=Y.useContext(_v);if(e===void 0)throw Error(et(60));return e}function bv(){let e=Y.useContext(vv);if(e===void 0)throw Error(et(61));return e}function xv(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 Sv=(e,t)=>Object.is(e,t);function Cv(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function wv(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!xv(e,t,(e,t)=>Cv(e,t,n)):e!==t}function Tv(e,t,n){return e?e.some(e=>e!==void 0&&Cv(t,e,n)):!1}function Ev(e,t,n){return e?e.findIndex(e=>e!==void 0&&Cv(e,t,n)):-1}function Dv(e,t){if(t!==Sv)return n=>Tv(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 Ov(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(Dv(t,n)):Ev(e,t,n);return i===-1?null:i}function kv(e,t,n,r,i,a){return Tv(r,t,i)?a!=null&&e>a&&Tv(r,n[a],i)?a:e:e===a?Ov(n,r,i,!0):a}function Av(e,t,n){return e.filter(e=>!Cv(t,e,n))}var jv={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:Om(t,r)!==``},hasNullItemLabel:(e,t)=>t?Em(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=>Cv(t,e,n)):Cv(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 Mv(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=Sv,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}=$d(),F=jf({id:t}),I=M||d,L=j??c,[R,z]=pd({controlled:n,default:y?r??Ze:r,name:`Select`,state:`value`}),[B,V]=pd({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}=Xp(B),de=Ve(()=>new $o({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},jv)).current,[fe,pe]=Y.useState(!1),{mounted:me,transitionStatus:he,forceUnmount:ge}=To({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=kl(le),Se=le??xe,Ce=Y.useMemo(()=>y?``:Om(R,x),[y,R,x]),K=Y.useMemo(()=>y&&Array.isArray(R)?R.map(e=>Om(e,x)):Om(R,x),[y,R,x]);ef(br(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=Ov(G.current,R,S,y);e===null&&(ae.current=null),!B&&de.set(`selectedIndex`,e)},[y,B,R,S,de]),lf(R,()=>{T(L),E(wv(R,k.initialValue,S)),N.change(R)});let Te=$((e,t)=>{let n=t,r=No(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(or))}}),[ge,Te,de]);let Ee=$((e,t)=>{i?.(e,t),!t.isCanceled&&z(e)}),De=$(e=>{let t=ah(e.scrollHeight,e.clientHeight),n=oh(e.scrollTop,t),r=n>0,i=n<t;de.set(`scrollUpArrowVisible`,r),de.set(`scrollDownArrowVisible`,i)}),Oe=us({open:B,onOpenChange:Te,elements:{reference:ye,floating:be}}),ke=uo(Oe,{enabled:!I,event:`mousedown`}),Ae=_o(Oe),je=Ds(Oe,{enabled:!I,listRef:H,activeIndex:_e,selectedIndex:ve,disabledIndices:Ze,onNavigate(e){e===null&&!B||de.set(`activeIndex`,e)},focusItemOnHover:C}),Me=Os(Oe,{enabled:!I&&(B||!f&&!y),listRef:ee,activeIndex:_e,selectedIndex:ve,disabledIndices:e=>Rd(H.current[e]),onMatch(e){B?de.set(`activeIndex`,e):Ee(G.current[e],Q(Hn))},onTyping(e){re.current=e}}),Ne=Y.useMemo(()=>ha(Me.reference,je.reference,Ae.reference,ke.reference,ue),[ke.reference,Me.reference,je.reference,Ae.reference,ue]),Pe=Y.useMemo(()=>ha(Eo,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`,_),gv(()=>{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=mr(g,N.inputRef),q=y?void 0:L,Re=Y.useMemo(()=>!y||!Array.isArray(R)||!L?null:R.map(e=>{let t=Om(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)(_v.Provider,{value:de,children:[(0,J.jsx)(vv.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(Hn,e.nativeEvent);function r(){if(y)return;let e=t.toLowerCase(),r=G.current.findIndex(t=>Om(t,x).toLowerCase()===e||Dm(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?Pr:Nr,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Re]})}function Nv(e){return e==null?void 0:`${e}-label`}function Pv(e,t){return e??t}var Fv=`data-popup-side`,Iv=400,Lv={...wn,...Xd,popupSide:e=>e?{[Fv]:e}:null,value:()=>null},Rv=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}=$d(),{labelId:m}=nf(),h=yv(),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=Pv(m,O);jf({id:i});let N=br(w),P=Y.useRef(null),F=Tf(y,P),{getButtonProps:I,buttonRef:L}=yf({disabled:y,native:o}),R=h.useStateSetter(`triggerElement`),z=ot(),B=ot(),V=ot();Y.useEffect(()=>{if(b)return V.start(Iv,()=>{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=ha(C,{id:j,role:`combobox`,"aria-expanded":b,"aria-haspopup":`listbox`,"aria-controls":b?T?.id??Fn(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(Hn,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=jr(e.currentTarget);function n(e){if(!P.current)return;let t=e.target;Z(P.current,t)||Z(N.current,t)||um(e,P.current)||h.context.setOpen(!1,Q(rr,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 Oa(`button`,e,{ref:[t,P,L,R],state:te,stateAttributesMapping:Lv,props:ee})}),zv={value:()=>null},Bv=Y.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,c=yv(),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)?Am(l,u,d):km(l,u,d)),Oa(`span`,e,{state:h,ref:[t,c.context.valueRef],props:[{children:g},s],stateAttributesMapping:zv})}),Vv=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return Oa(`span`,e,{state:{open:yv().useState(`open`)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:Cn})}),Hv=Y.forwardRef(function(e,t){let n=yv(),r=n.useState(`mounted`),i=n.useState(`forceMount`);return r||i?(0,J.jsx)(Wa,{ref:t,...e}):null}),Uv=Y.createContext(void 0);function Wv(){let e=Y.useContext(Uv);if(!e)throw Error(et(59));return e}function Gv(e,t){e&&Object.assign(e.style,t)}var Kv={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},qv={position:`fixed`},Jv=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=La,style:_,...v}=e,y=yv(),b=bv(),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),Wp((P||C)&&x,T===`touch`,E,D);let F=bl({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?qv:F.positionerStyles,R={open:x,side:I,align:F.align,anchorHidden:F.anchorHidden};X(()=>{y.set(`popupSide`,F.side)},[y,F.side]);let z=wl(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(Hn);if(t!==0&&!y.state.multiple&&w!==null&&Ev(y.context.valuesRef.current,w,O)===-1){let e=y.context.initialValueRef.current,t=e!=null&&Ev(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=>Ev(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:``};Gv(E,e),Gv(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)(jd,{elementsRef:y.context.listRef,labelsRef:y.context.labelsRef,onMapChange:V,children:(0,J.jsxs)(Uv.Provider,{value:H,children:[S&&C&&(0,J.jsx)(Ap,{inert:Ol(!x),cutout:D}),z]})})}),Yv=`--transform-origin`,Xv={...Tn,...fn},Zv=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,s=yv(),c=s.useState(`multiple`),l=s.useState(`readOnly`),u=s.useState(`highlightItemOnHover`),d=bv(),{side:f,align:p,alignItemWithTriggerActive:m,isPositioned:h,setControlledAlignItemWithTrigger:g}=Wv(),_=_p(!0)!=null,v=ol(),{nonce:y,disableStyleElements:b}=Km(),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=Ar(),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=ey(O),i=ty(O.getBoundingClientRect().height,`y`,r),a=jr(O),o=kt(O),c=o.getComputedStyle(O),l=parseFloat(c.marginTop),u=parseFloat(c.marginBottom),d=Qv(o.getComputedStyle(s.context.popupRef.current)),f=Math.min(a.documentElement.clientHeight-l-u,d),p=e.scrollTop,h=$v(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=nh(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=nh(g,0,$v(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]),wo({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,Gv(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(Yv),!m){N.request(()=>s.context.handleScrollArrowVisibility(k||e));return}let t=iy(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=kt(O),i=r.getComputedStyle(O),a=r.getComputedStyle(e),o=jr(D),c=ey(D),l=ny(D.getBoundingClientRect(),c),d=ny(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=Qv(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=ny(n.getBoundingClientRect(),c);T=ny(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=`${nh(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=$v(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){Gv(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=$v(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=nh(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(Yv,`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=kt(O);function t(e){s.context.setOpen(!1,Q(sr,e))}return fr(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){_&&xd.has(e.key)&&e.stopPropagation()},onScroll(e){k||P(e.currentTarget)},...m&&{style:k?{height:`100%`}:Kv},className:!k&&m?Fm.className:void 0},L=Oa(`div`,e,{ref:[t,s.context.popupRef],state:F,stateAttributesMapping:Xv,props:[T,I,Cl(E),o]});return(0,J.jsxs)(Y.Fragment,{children:[!b&&Fm.getElement(y),(0,J.jsx)(lo,{context:d,modal:!1,disabled:!w,openInteractionType:C,returnFocus:a,restoreFocus:!0,children:L})]})});function Qv(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function $v(e){return ah(e.scrollHeight,e.clientHeight)}function ey(e){return yc.getScale(e)}function ty(e,t,n){return e/n[t]}function ny(e,t){return ci({x:ty(e.x,`x`,t),y:ty(e.y,`y`,t),width:ty(e.width,`x`,t),height:ty(e.height,`y`,t)})}var ry=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function iy(e){let{style:t}=e,n={};for(let[e,r]of ry)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of ry){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var ay=Y.createContext(void 0);function oy(){let e=Y.useContext(ay);if(!e)throw Error(et(57));return e}var sy=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=Sf({guess:!0,label:o,textRef:u}),f=yv(),{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=kv(C,a,f.context.valuesRef.current,e,_,t),r=n===C,C===t&&!r&&(f.context.selectedItemTextRef.current=null)):(r=e!==void 0&&Cv(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}=yf({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?Av(n,a,_):[...n,a];f.context.setValue(r,Q(qn,e))}else f.context.setValue(a,Q(qn,e)),f.context.setOpen(!1,Q(qn,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&&Ct(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=Oa(`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)(ay.Provider,{value:P,children:N})})),cy=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}=yo(o),d=Oa(`span`,e,{ref:[t,c],state:{selected:o,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:fn});return wo({batch:!0,enabled:!o,open:o,ref:c,onComplete(){o||u(!1)}}),d})),ly=Y.forwardRef(function(e,t){let{selected:n}=oy();return e.keepMounted||n?(0,J.jsx)(cy,{...e,selected:n,ref:t}):null}),uy=Y.memo(Y.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=oy(),a=yv(),{render:o,className:s,style:c,...l}=e;return Oa(`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})})),dy=Mv;function fy(e){return(0,J.jsx)(Bv,{"data-slot":`select-value`,...e})}function py({className:e,size:t=`default`,children:n,...r}){return(0,J.jsxs)(Rv,{"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)(Vv,{className:`shrink-0 text-muted-foreground`,children:(0,J.jsx)(cu,{className:`h-3.5 w-3.5`,"aria-hidden":!0})})]})}function my({className:e,sideOffset:t=4,align:n=`start`,children:r,...i}){return(0,J.jsx)(Hv,{children:(0,J.jsx)(Jv,{sideOffset:t,align:n,alignItemWithTrigger:!1,className:`z-50 outline-none`,children:(0,J.jsx)(Zv,{"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 hy({className:e,children:t,...n}){return(0,J.jsxs)(sy,{"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)(uy,{children:t}),(0,J.jsx)(ly,{className:`absolute right-2 flex items-center`,children:(0,J.jsx)(su,{className:`h-3.5 w-3.5`,"aria-hidden":!0})})]})}var gy=Y.createContext(void 0);function _y(e){let t=Y.useContext(gy);if(t===void 0&&!e)throw Error(et(47));return t}var vy={...cs,disabled:e=>e.disabled,instantType:e=>e.instantType===`trigger-change`&&!cs.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===`trigger-press`&&cs.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod===`touch`&&e.openChangeReason===`trigger-press`,hasTriggerFocusGuards:(e,t)=>cs.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},yy=class extends $o{constructor(e,t,n){let r=new Bo;super(by(e,r,t,n),xy(r),vy)}setOpen=(e,t)=>{let n=t.reason===Wn,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=No(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=Mo(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 by(e,t,n,r=!1){let i={...ns(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 xy(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 Sy=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=wy(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),zo(u,d),Io(u);let{forceUnmount:m}=Lo(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(or))}),[m,u]);let h=d||f||s!=null;return(0,J.jsxs)(gy.Provider,{value:u,children:[s&&(0,J.jsx)(ko,{handle:s,store:u}),h&&(0,J.jsx)(Ty,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})});function Cy(e){return _y(!0)?(0,J.jsx)(Sy,{props:e}):(0,J.jsx)($a,{children:(0,J.jsx)(Sy,{props:e})})}function wy(e,t){let n=Oo((e,n)=>new yy(t,e,n));return Y.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function Ty({store:e,modal:t}){let n=_o(e.useState(`floatingRootContext`),{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),r=n.reference,i=n.floating;return Ro(e,{activeTriggerProps:r,inactiveTriggerProps:r,popupProps:i}),null}var Ey=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=_y(!0),h=ls(s)??m;if(!h)throw Error(et(74));let g=Kc(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}=Fo(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=bs(v,{enabled:!a&&l&&!T,mouseOnly:!0,move:!1,handleClose:Is(),restMs:u,delay:{close:d},triggerElementRef:x,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),O=uo(v,{stickIfOpen:$(()=>h.context.stickIfOpen)}),k=Yp(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),A=h.useState(`triggerProps`,C),{getButtonProps:j,buttonRef:M}=yf({disabled:a,native:o}),N={open(e){return w?wn.open(e):Cn.open(e)}},{handlePreFocusGuardFocus:P,handleFocusTargetFocus:F}=pm(h,x),I=Oa(`button`,e,{state:{disabled:a,open:y},ref:[M,t,S,x],props:[O.reference,D,A,k,{[Ia]:``,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)(Fr,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:P}),L,(0,J.jsx)(Fr,{ref:h.context.triggerFocusTargetRef,onFocus:F})]}):L}),Dy=Y.createContext(void 0);function Oy(){let e=Y.useContext(Dy);if(e===void 0)throw Error(et(45));return e}var ky=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return _y().useState(`mounted`)||n?(0,J.jsx)(Dy.Provider,{value:n,children:(0,J.jsx)(Wa,{ref:t,...r})}):null}),Ay=Y.createContext(void 0);function jy(){let e=Y.useContext(Ay);if(!e)throw Error(et(46));return e}var My=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=Ra,..._}=e,v=_y(),y=Oy(),b=Za(),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=bl({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`)});jp({store:v,domReference:x.useState(`domReferenceElement`),positionerElement:O,open:C});let M=E===!0&&w!==`trigger-hover`;Wp(C&&M,D===`touch`,O,T);let N=v.useStateSetter(`positionerElement`),P=wl(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)(Ay.Provider,{value:j,children:[S&&M&&(0,J.jsx)(Ap,{inert:Ol(!C),cutout:T}),(0,J.jsx)(Qa,{id:b,children:P})]})}),Ny=Y.createContext(void 0);function Py(){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 Fy=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=_y(),l=jy(),u=_p(!0)!=null,{context:d,hasClosePart:f}=Py(),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`);wo({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),vs(w,{enabled:D&&!E,closeDelay:O});let k=a===void 0?Do(c.context.popupRef):a,A=b!==!1&&f;c.useSyncedValue(`focusManagerModal`,A);let j=c.useStateSetter(`popupElement`),M=Oa(`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`,...Eo,"aria-labelledby":v,"aria-describedby":y,onKeyDown(e){u&&xd.has(e.key)&&e.stopPropagation()}},Cl(g),s],stateAttributesMapping:En});return(0,J.jsx)(lo,{context:w,openInteractionType:m,modal:A,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:o,restoreFocus:`popup`,getInsideElements:()=>[c.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:Nt(C)?C:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,J.jsx)(Ny.Provider,{value:d,children:M})})}),Iy=`data-[popup-open]:bg-[var(--color-accent)] data-[popup-open]:text-[var(--color-accent-foreground)]`,Ly=Cy;function Ry({className:e,...t}){return(0,J.jsx)(Ey,{className:typeof e==`function`?e:q(Iy,e),...t})}function zy({className:e,sideOffset:t=6,align:n=`start`,children:r,...i}){return(0,J.jsx)(ky,{children:(0,J.jsx)(My,{sideOffset:t,align:n,className:`z-50 outline-none`,children:(0,J.jsx)(Fy,{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)(Eh,{viewportClassName:`max-h-[var(--available-height)]`,children:(0,J.jsx)(`div`,{className:`p-3`,children:r})})})})})}function By(e,t){return e-t}function Vy(e,t,n,r,i,a){let o=nh(e,n,r);if(!i)return o;let s=a.slice();return s[t]=nh(o,a[t-1]??-1/0,a[t+1]??1/0),s.sort(By)}function Hy(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 Uy=()=>null,Wy={activeThumbIndex:Uy,max:Uy,min:Uy,minStepsBetweenValues:Uy,step:Uy,values:Uy,...Xd},Gy=Y.createContext(void 0);function Ky(){let e=Y.useContext(Gy);if(e===void 0)throw Error(et(62));return e}function qy(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&xv(e,t)}var Jy=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=Kc(o),E=Nv(T),D=$(g),O=$(_),{clearErrors:k}=af(),{state:A,disabled:j,name:M,setTouched:N,setDirty:P,validityData:F,validation:I}=$d(),{labelId:L}=nf(),[R,z]=Y.useState(),B=n??Pv(L,R),V=j||a,H=M??h,[ee,te]=pd({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(Hn),[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=>nh(e,f,d)).sort(By):[nh(ee,f,d)],[d,f,ve,ee]),be=ve?ye:ye[0];ef(I.inputRef,T,be,void 0,!V,h),lf(be,()=>{k(H),I.change(be);let e=F.initialValue,t;t=Array.isArray(be)&&Array.isArray(e)?!xv(be,e):be!==e,P(t)});let xe=$((e,t)=>{if(Number.isNaN(e)||qy(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=Vy(e,t,f,d,ve,ye);if(Hy(r,y,p)){let e=`key`in n?er:Xn,i=xe(r,Q(e,n.nativeEvent,void 0,{activeThumbIndex:t}));N(!0),i&&O(r,Vn(e,n.nativeEvent))}});X(()=>{if(!V)return;let e=Qt(jr(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=Oa(`div`,e,{state:Ce,ref:[t,U],props:[{"aria-labelledby":B,id:T,role:`group`},w,e=>I.getValidationProps(V,e)],stateAttributesMapping:Wy});return(0,J.jsx)(Gy.Provider,{value:K,children:(0,J.jsx)(jd,{elementsRef:ne,onMapChange:pe,children:we})})}),Yy=new Map;function Xy(e,t){let n=JSON.stringify({locale:Sm(e),options:t}),r=Yy.get(n);if(r)return r;let i=new Intl.NumberFormat(e,t);return Yy.set(n,i),i}function Zy(e,t,n){return e==null?``:Xy(t,n).format(e)}function Qy(e){return e===`touch`||e===`pen`}function $y(e,t){let n=e.getBoundingClientRect();return t?(n.top+n.bottom)/2:(n.left+n.right)/2}function eb(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 tb(e,t,n){let r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(Math.max(eb(t),eb(n))))}function nb(e,t,n,r,i,a,o,s){let c=e.slice(),l=a*o,u=c.length-1,d=s??e;c[t]=nh(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]=nh(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]=nh(a,n,t)}for(let e=0;e<=u;e+=1)c[e]=Number(c[e].toFixed(12));return c}function rb(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:nb(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(nh(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=nb(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=nh(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 ib=2;function ab(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 ob(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 sb=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}=Ky(),k=ol(),A=O.length>1,j=h===`vertical`,M=Y.useRef(null),N=Y.useRef(null),P=$(e=>{e&&N.current==null&&(N.current=kt(e).getComputedStyle(e))}),F=Y.useRef(null),I=Y.useRef(0),L=Y.useRef(0),R=Y.useRef(null),z=Y.useRef(!1),B=br(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 Mt(e)?D.current.some(t=>!Mt(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=ab(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=nh(((j?a-b-c.end:(k===`rtl`?s-y:y-o)-c.start)-u)/m,0,1),S=(d-f)*x+f;return S=tb(S,T,f),S=nh(S,f,d),A?rb(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(Mt(a)&&!V(a)?.disabled){let o=$y(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(Mt(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=ob(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&&Hy(n.value,T,p)&&(!s&&I.current>ib&&S(!0),G(n,nr,e))}),ie=$(e=>{if(ob(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,Vn(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(en(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,Yn,e),I.current=0}let r=jr(M.current);r.addEventListener(`touchmove`,re,{passive:!0}),r.addEventListener(`touchend`,ie,{passive:!0}),r.addEventListener(`touchcancel`,ie,{passive:!0})}),se=$(()=>{let e=jr(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=Ar();return Y.useEffect(()=>{let e=M.current;if(!e)return()=>se();let t=fr(e,`touchstart`,oe,{passive:!0});return()=>{t(),ce.cancel(),se()}},[se,oe,M,ce]),Y.useEffect(()=>{o&&se()},[o,se]),Oa(`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=en(e.nativeEvent);if(!t||o||e.defaultPrevented||!Mt(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],Qt(jr(t)))?e.preventDefault():ce.request(()=>{ne(i.thumbIndex)}),S(!0),g.current??G(i,Yn,e.nativeEvent),e.nativeEvent.pointerId&&t.setPointerCapture(e.nativeEvent.pointerId),I.current=0,z.current=Qy(e.pointerType);let a=jr(t);a.addEventListener(`pointermove`,re,{passive:!0}),a.addEventListener(`pointerup`,ie,{once:!0}),a.addEventListener(`pointercancel`,ae,{once:!0})}},a],stateAttributesMapping:Wy})}),cb=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=Ky();return Oa(`div`,e,{state:o,ref:t,props:[{style:{position:`relative`}},a],stateAttributesMapping:Wy})}),lb=()=>()=>{},ub=()=>!0,db=()=>!1;function fb(){return(0,Go.useSyncExternalStore)(lb,ub,db)}function pb(){let[e,t]=Y.useState(!1);return Y.useEffect(()=>{t(!0)},[]),e}var mb=ca(18)?fb:pb;function hb(){return!mb()}function gb(e,t,n){return(e-t)*100/(n-t)}function _b(e){let{script:t}=e,{nonce:n}=Km();return hb()?(0,J.jsx)(`script`,{nonce:n,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0}):null}var vb=`data-index`,yb,bb=new Set([...xd,yd,bd]);function xb(e,t,n,r){if(!(t<0))return e.length===2?`${Zy(e[t],r,n)} ${t===0?`start`:`end`} range`:n?Zy(e[t],r,n):void 0}function Sb(e,t,n,r,i){let a=e+t*n;return nh(Number(a.toFixed(Math.max(eb(e),eb(t),eb(r)))),r,i)}var Cb=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=Kc(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}=Ky(),re=ol(),ie=l||T,ae=G.length>1,oe=z===`vertical`,se=re===`rtl`,{setTouched:ce,validationMode:le}=$d(),ue=Y.useRef(null),de=Y.useRef(null),fe=Tf(ie,de),pe=Y.useRef(!1),me=$(e=>{pe.current||g?.(e)}),he=$(e=>{pe.current||h?.(e)}),ge=Kc(),_e=jf(),ve=ae?ge:_e,{ref:ye,index:be}=Sf({metadata:Y.useMemo(()=>({inputId:ve}),[ve])}),xe=ae?p??be:0,Se=xe===G.length-1,Ce=G[xe],K=gb(Ce,F,P),[we,Te]=Y.useState(),Ee=hb(),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=kt(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)?Nr:{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=ha({"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(Zy(Ce,N,D),Ce,xe):c??xb(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(Vy(Ce,xe,F,P,A,G)))},onKeyDown(e){if(e.defaultPrevented||!bb.has(e.key))return;xd.has(e.key)&&e.stopPropagation();let t=null,n=0,r=e.shiftKey?M:W,i=tb(Ce,W,F);switch(e.key){case md:n=1;break;case _d:n=se?-1:1;break;case hd:n=-1;break;case gd:n=se?1:-1;break;case yd:r=M,n=1;break;case bd:r=M,n=-1;break;case`End`:t=ae&&Number.isFinite(G[xe+1])?G[xe+1]-W*I:P;break;case vd:t=ae&&Number.isFinite(G[xe-1])?G[xe-1]+W*I:F;break;default:break}if(n!==0&&(t=Sb(i,r,n,F,P)),t!==null){let n=e.currentTarget;Pn(n)||(pe.current=!0,n.blur(),n.focus({preventScroll:!0,focusVisible:!0})),O(t,xe,e),e.preventDefault()}},step:W,style:{...Nr,width:`100%`,height:`100%`,writingMode:Ne},tabIndex:v,type:`range`,value:Ce??``},e=>E.getValidationProps(ie,e),{onFocus:me,onBlur:he,onKeyDown:_}),Ie=mr(de,E.inputRef,m);return Oa(`div`,e,{state:U,ref:[t,ye,ue],props:[{[vb]:xe,children:(0,J.jsxs)(Y.Fragment,{children:[r,(0,J.jsx)(`input`,{ref:Ie,...Fe,suppressHydrationWarning:!0}),k&&Se&&H&&(yb||=(0,J.jsx)(_b,{script:``}))]}),id:x,onPointerDown(e){if(ie)return;V.current=xe;let t=$y(e.currentTarget,oe);B.current=(oe?e.clientY:e.clientX)-t},style:Me,suppressHydrationWarning:H||void 0},b],stateAttributesMapping:Wy})});function wb(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 Tb=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}=Ky(),m=hb(),h=wb(u===`vertical`,p.length>1,s,s?o[0]:gb(p[0],l,c),s?o[1]:gb(p[p.length-1],l,c),s&&d&&m);return Oa(`div`,e,{state:f,ref:t,props:[{"data-base-ui-slider-indicator":d?``:void 0,style:h,suppressHydrationWarning:d||void 0},a],stateAttributesMapping:Wy})}),Eb=`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 Db({value:e,onValueChange:t,min:n=0,max:r=10,className:i,"aria-label":a}){return(0,J.jsx)(Jy,{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)(sb,{className:`flex w-full touch-none select-none items-center py-1.5`,children:(0,J.jsxs)(cb,{className:`relative h-1 w-full rounded-full bg-[var(--color-muted)]`,children:[(0,J.jsx)(Tb,{className:`rounded-full bg-primary`}),(0,J.jsx)(Cb,{"aria-label":a?`${a} minimum`:`Minimum`,className:Eb}),(0,J.jsx)(Cb,{"aria-label":a?`${a} maximum`:`Maximum`,className:Eb})]})})})}function Ob({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 kb(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=oa(),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)(Wf.Provider,{value:u,children:(0,J.jsx)(Hf.Provider,{value:void 0,children:(0,J.jsx)(om,{...e})})})}var Ab=500,jb=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}=Gf(!1),{store:m}=Uf(!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(Un,n)),b.start(Ab,()=>{x.current=!0})}function w(e){if(g)return;d.current=!0,xt(e),C(e.clientX,e.clientY,e.nativeEvent);let t=jr(_.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=en(e);Z(u.current,t)||p&&t&&fm(t)===p||s.current?.setOpen(!1,Q(rr,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(Ab,()=>{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=en(e);(Z(_.current,t)||Z(c.current,t)||Z(l.current,t))&&e.preventDefault()}return fr(jr(_.current),`contextmenu`,e)},[l,g,c]),Oa(`div`,e,{state:{open:h},ref:[_,t],props:[{onContextMenu:w,onTouchStart:E,onTouchMove:D,onTouchEnd:T,onTouchCancel:T,style:{WebkitTouchCallout:`none`}},a],stateAttributesMapping:wn})}),Mb=kb,Nb=jb,Pb=(0,Y.createContext)({title:null,actions:null});function Fb({children:e}){let{title:t}=(0,Y.useContext)(Pb);return t?(0,He.createPortal)(e,t):null}function Ib({children:e}){let{actions:t}=(0,Y.useContext)(Pb);return t?(0,He.createPortal)(e,t):null}function Lb({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)(Wg,{}),(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 Rb=`needs-you`,zb=`working-now`;function Bb(e){document.getElementById(e)?.scrollIntoView({behavior:`smooth`,block:`start`})}function Vb({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 Hb({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)(Ub,{on:n===null,onClick:()=>r(null),label:`All`,count:t}),e.map(e=>(0,J.jsx)(Ub,{on:n===e.value,onClick:()=>r(e.value),label:e.label,count:e.count},e.value))]})}function Ub({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 Wb=`file`,Gb={"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`},Kb={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`},qb={toml:`toml_light`,pnpm:`pnpm_light`,bun:`bun_light`},Jb={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 Yb(e){let t=e.slice(e.lastIndexOf(`/`)+1).toLowerCase(),n=Gb[t];if(n)return n;for(let e=t.indexOf(`.`,1);e!==-1;e=t.indexOf(`.`,e+1)){let n=Kb[t.slice(e+1)];if(n)return n}return Wb}var Xb=({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:Jb[e]}});function Zb({path:e,className:t}){let n=Yb(e),r=qb[n];return r?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Xb,{icon:r,className:q(t,`dark:hidden`)}),(0,J.jsx)(Xb,{icon:n,className:q(t,`hidden dark:inline-flex`)})]}):(0,J.jsx)(Xb,{icon:n,className:t})}function Qb({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 _=()=>{t_(s),u()};return(0,J.jsxs)(`div`,{className:`inline-flex shrink-0 items-center`,children:[(0,J.jsxs)(jl,{children:[(0,J.jsxs)(Ml,{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)(pu,{className:`h-3.5 w-3.5 animate-spin`,"aria-hidden":!0}):e,t!==void 0&&(f?n:t)]}),(0,J.jsx)(Nl,{...o?{className:o}:{},children:a})]}),(0,J.jsxs)(jh,{children:[(0,J.jsx)(Fh,{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)(cu,{className:`h-3 w-3`,"aria-hidden":!0})}),(0,J.jsx)(Ih,{align:`end`,className:`max-w-[20rem]`,children:(0,J.jsx)(Lh,{onClick:_,className:`items-start`,children:(0,J.jsx)(Bg,{label:`Configure first, then run`,description:c})})})]})]})}var $b=`modulepreload`,ex=function(e){return`/`+e},tx={},nx=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=ex(t,n),t=s(t),t in tx)return;tx[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`:$b,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)})},rx=50,ix={pages:[],cards:[],linkActions:[],panels:[],runSlots:[],settings:[],everyPage:[],loaded:!1},ax=new Map,ox=new Map;function sx(e){let t=ax.get(e);return t||(t=nx(()=>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)}),[]),ax.set(e,t),t.then(t=>void ox.set(e,t))),t}var cx=[];function lx(e,t){return(e.order??rx)-(t.order??rx)||e.package.localeCompare(t.package)}function ux(e=0){let{value:t,loaded:n}=ed(B_,cx,3e4,[e],{remember:`modules`,stored:!0}),[r,i]=(0,Y.useState)(ix);return(0,Y.useEffect)(()=>{if(!n)return;if(t.every(e=>ox.has(e.url))){i(dx(t.map(e=>({module:e,definition:ox.get(e.url)})),!0));return}let e=!0,r=new Map;for(let n of t)sx(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(dx(o,o.length===t.length))});return()=>{e=!1}},[t,n]),r}function dx(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??[])!Jg(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(lx),s.sort(lx),{pages:n,cards:r,linkActions:i,panels:a,runSlots:o,settings:s,everyPage:c,...l?{usageLimit:l}:{},...u?{schedule:u}:{},loaded:t}}var fx=(0,Y.createContext)(ix);function px(){return(0,Y.useContext)(fx)}function mx({projects:e,targets:t,resetKey:n,label:r,tooltip:i,disabled:a=!1,size:o=`sm`,variant:s=`outline`}){let{linkActions:c}=px(),l=(0,Y.useContext)(q_),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(`
11
- `)]);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=kS({...l??K_,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)(su,{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)(jl,{children:[(0,J.jsx)(Ml,{render:(0,J.jsx)(ze,{...l}),children:c}),(0,J.jsx)(Nl,{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 hx({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 gx({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 _x=`(no value)`;function vx({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===``?_x:e.value,label:e.label,disabled:e.disabled===!0}));return(0,J.jsx)(gx,{label:e,description:t,control:(0,J.jsxs)(dy,{items:a,value:n===``?_x:n,onValueChange:(e,t)=>{t.reason!==`none`&&i(e===_x?``:e)},children:[(0,J.jsx)(py,{size:`sm`,"aria-label":e,className:`max-w-[min(16rem,45vw)]`,children:(0,J.jsx)(fy,{})}),(0,J.jsx)(my,{align:`end`,children:a.map(e=>(0,J.jsx)(hy,{value:e.value,disabled:e.disabled,children:e.label},e.value))})]})})}var yx=(0,Y.createContext)(null);function bx(e){let t=(0,Y.useContext)(yx),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 xx=(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))(xx||{}),Sx=[0,1],Cx=[1,0],wx=[2,3],Tx=[3,2],Ex={L:Sx,M:Cx,Q:wx,H:Tx},Dx=/^\d*$/,Ox=/^[A-Z0-9 $%*+./:-]*$/,kx=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`,Ax=1,jx=40,Mx=3,Nx=3,Px=40,Fx=10,Ix=[[-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]],Lx=[[-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]],Rx=class{constructor(e,t,n,r){if(this.version=e,this.ecc=t,e<Ax||e>jx)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,xx.Timing),this.setFunctionModule(e,6,e%2==0,xx.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,Bx(r,e));this.setFunctionModule(8,7,Bx(r,6)),this.setFunctionModule(8,8,Bx(r,7)),this.setFunctionModule(7,8,Bx(r,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,Bx(r,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,Bx(r,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,Bx(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=Bx(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,xx.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,xx.Alignment)}setFunctionModule(e,t,n,r=xx.Function){this.modules[t][e]=n,this.types[t][e]=r}addEccAndInterleave(e){let t=this.version,n=this.ecc;if(e.length!==tS(t,n))throw RangeError(`Invalid argument`);let r=Lx[n[0]][t],i=Ix[n[0]][t],a=Math.floor(eS(t)/8),o=r-a%r,s=Math.floor(a/r),c=[],l=nS(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=rS(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(eS(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]=Bx(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+=Mx:r>5&&e++):(this.finderPenaltyAddHistory(r,i),n||(e+=this.finderPenaltyCountPatterns(i)*Px),n=this.modules[t][a],r=1);e+=this.finderPenaltyTerminateAndCount(n,r,i)*Px}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+=Mx:r>5&&e++):(this.finderPenaltyAddHistory(r,i),n||(e+=this.finderPenaltyCountPatterns(i)*Px),n=this.modules[a][t],r=1);e+=this.finderPenaltyTerminateAndCount(n,r,i)*Px}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+=Nx)}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*Fx,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 zx(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 Bx(e,t){return(e>>>t&1)!=0}var Vx=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()}},Hx=[1,10,12,14],Ux=[2,9,11,13],Wx=[4,8,16,16];function Gx(e,t){return e[Math.floor((t+7)/17)+1]}function Kx(e){let t=[];for(let n of e)zx(n,8,t);return new Vx(Wx,e.length,t)}function qx(e){if(!Xx(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);zx(Number.parseInt(e.substring(n,n+r),10),r*3+1,t),n+=r}return new Vx(Hx,e.length,t)}function Jx(e){if(!Zx(e))throw RangeError(`String contains unencodable characters in alphanumeric mode`);let t=[],n;for(n=0;n+2<=e.length;n+=2){let r=kx.indexOf(e.charAt(n))*45;r+=kx.indexOf(e.charAt(n+1)),zx(r,11,t)}return n<e.length&&zx(kx.indexOf(e.charAt(n)),6,t),new Vx(Ux,e.length,t)}function Yx(e){return e===``?[]:Xx(e)?[qx(e)]:Zx(e)?[Jx(e)]:[Kx($x(e))]}function Xx(e){return Dx.test(e)}function Zx(e){return Ox.test(e)}function Qx(e,t){let n=0;for(let r of e){let e=Gx(r.mode,t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}function $x(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 eS(e){if(e<Ax||e>jx)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 tS(e,t){return Math.floor(eS(e)/8)-Ix[t[0]][e]*Lx[t[0]][e]}function nS(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]=iS(t[e],n),e+1<t.length&&(t[e]^=t[e+1]);n=iS(n,2)}return t}function rS(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]^=iS(t,e))}return n}function iS(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 aS(e,t,n=1,r=40,i=-1,a=!0){if(!(Ax<=n&&n<=r&&r<=jx)||i<-1||i>7)throw RangeError(`Invalid value`);let o,s;for(o=n;;o++){let n=tS(o,t)*8,i=Qx(e,o);if(i<=n){s=i;break}if(o>=r)throw RangeError(`Data too long`)}for(let e of[Cx,wx,Tx])a&&s<=tS(o,e)*8&&(t=e);let c=[];for(let t of e){zx(t.mode[0],4,c),zx(t.numChars,Gx(t.mode,o),c);for(let e of t.getData())c.push(e)}let l=tS(o,t)*8;zx(0,Math.min(4,l-c.length),c),zx(0,(8-c.length%8)%8,c);for(let e=236;c.length<l;e^=253)zx(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 Rx(o,t,u,i)}function oS(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`?Yx(e):Array.isArray(e)?[Kx(e)]:void 0;if(!c)throw Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);let l=aS(c,Ex[n],i,a,o,r),u=sS({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 sS(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=xx.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 cS({text:e,label:t}){let{data:n,size:r}=oS(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 lS(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 uS=500;function dS({children:e,className:t}){let[n,r]=(0,Y.useState)(!1);return(0,Y.useEffect)(()=>{let e=setTimeout(()=>r(!0),uS);return()=>clearTimeout(e)},[]),(0,J.jsx)(`p`,{className:q(`text-xs text-muted-foreground`,!n&&`invisible`,t),children:e})}var fS={typescript:()=>nx(()=>import(`./typescript-Utq2Cl8c.js`),__vite__mapDeps([0,1])),tsx:()=>nx(()=>import(`./tsx-5f3ulCja.js`),__vite__mapDeps([2,3])),javascript:()=>nx(()=>import(`./javascript-Yelw-5ZN.js`),__vite__mapDeps([4,5])),jsx:()=>nx(()=>import(`./jsx-hEbJ82HF.js`),__vite__mapDeps([6,7])),json:()=>nx(()=>import(`./json-CaljABEy.js`),__vite__mapDeps([8,9])),jsonc:()=>nx(()=>import(`./jsonc-CYpm1nAK.js`),[]),json5:()=>nx(()=>import(`./json5-BR5RXkoi.js`),[]),html:()=>nx(()=>import(`./html-WQKKblVZ.js`),__vite__mapDeps([10,11,5,12])),vue:()=>nx(()=>import(`./vue-BqdMUtqy.js`),__vite__mapDeps([13,9,5,1,12,11])),svelte:()=>nx(()=>import(`./svelte-CdeT-Ich.js`),__vite__mapDeps([14,5,1,12,15])),astro:()=>nx(()=>import(`./astro-BZ97kZFP.js`),__vite__mapDeps([16,9,5,1,12,15,3])),xml:()=>nx(()=>import(`./xml-CoDIzWF0.js`),__vite__mapDeps([17,18,19])),css:()=>nx(()=>import(`./css-DUjzNfgv.js`),__vite__mapDeps([20,12])),scss:()=>nx(()=>import(`./scss-8bKmll0B.js`),__vite__mapDeps([21,12])),sass:()=>nx(()=>import(`./sass-DXrisJhu.js`),[]),less:()=>nx(()=>import(`./less-DVTAwKKz.js`),[]),markdown:()=>nx(()=>import(`./markdown-BYOwaDjH.js`),[]),mdx:()=>nx(()=>import(`./mdx-DQZ5AkYe.js`),[]),yaml:()=>nx(()=>import(`./yaml-CxbubiML.js`),__vite__mapDeps([22,23])),toml:()=>nx(()=>import(`./toml-CcmNWLt0.js`),[]),ini:()=>nx(()=>import(`./ini-B5eOa1yu.js`),[]),dotenv:()=>nx(()=>import(`./dotenv-CuH5my32.js`),[]),shellscript:()=>nx(()=>import(`./shellscript-BiGZg9Om.js`),__vite__mapDeps([24,25])),fish:()=>nx(()=>import(`./fish-BJitypiv.js`),[]),powershell:()=>nx(()=>import(`./powershell-QtSnmXcu.js`),[]),python:()=>nx(()=>import(`./python-gzcpVVnB.js`),[]),ruby:()=>nx(()=>import(`./ruby-DjBfgIB7.js`),__vite__mapDeps([26,5,12,27,28,29,1,3,7,11,30,18,19,31,25,23])),go:()=>nx(()=>import(`./go-rLFTqkRN.js`),[]),rust:()=>nx(()=>import(`./rust-DpiIf5JO.js`),[]),java:()=>nx(()=>import(`./java-DxlWrXwe.js`),__vite__mapDeps([32,19])),kotlin:()=>nx(()=>import(`./kotlin-DhhofPvG.js`),[]),swift:()=>nx(()=>import(`./swift-CyEgAFGc.js`),[]),c:()=>nx(()=>import(`./c-DWGmR78Y.js`),__vite__mapDeps([33,27])),cpp:()=>nx(()=>import(`./cpp-CJIxL8VH.js`),__vite__mapDeps([34,28,27])),csharp:()=>nx(()=>import(`./csharp-dmMxLVLW.js`),[]),php:()=>nx(()=>import(`./php-D7kNSOJl.js`),__vite__mapDeps([35,9,5,12,11,18,19,31])),lua:()=>nx(()=>import(`./lua-BJObVtAx.js`),__vite__mapDeps([36,30,27])),sql:()=>nx(()=>import(`./sql-BOsskAmu.js`),__vite__mapDeps([37,31])),graphql:()=>nx(()=>import(`./graphql-DAzSVzvB.js`),__vite__mapDeps([38,29,5,1,3,7])),prisma:()=>nx(()=>import(`./prisma-DMgNhnYS.js`),[]),proto:()=>nx(()=>import(`./proto-DB4EqR-F.js`),[]),docker:()=>nx(()=>import(`./docker-IyjqRm3v.js`),[]),make:()=>nx(()=>import(`./make-Dixweg8N.js`),[]),diff:()=>nx(()=>import(`./diff-woXpYk--.js`),[])},pS={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`},mS=2e5;function hS(e){let t=e.slice(e.lastIndexOf(`/`)+1).toLowerCase(),n=t.lastIndexOf(`.`);return pS[n===-1?t:t.slice(n+1)]}var gS,_S=new Map;function vS(){return gS??=Promise.all([nx(()=>import(`./core-Db3h5Pv3.js`),__vite__mapDeps([39,40])),nx(()=>import(`./engine-javascript-DbNy5Fxf.js`),[])]).then(([{createHighlighterCore:e},{createJavaScriptRegexEngine:t}])=>e({themes:[nx(()=>import(`./everforest-light-Df2xbC6M.js`),[]),nx(()=>import(`./everforest-dark-sB-x3p7T.js`),[])],langs:[],engine:t()})),gS}async function yS(e){let t=await vS();return _S.has(e)||_S.set(e,fS[e]().then(e=>t.loadLanguage(...e.default))),await _S.get(e),t}function bS(e,t){let n=hS(t),[r,i]=(0,Y.useState)(null);return(0,Y.useEffect)(()=>{if(!n||e.length>mS)return;let t=!0;return yS(n).then(r=>{if(!t)return;let a=r.codeToTokensWithThemes(e,{lang:n,themes:{light:`everforest-light`,dark:`everforest-dark`}});i({text:e,language:n,lines:a.map(e=>e.map(e=>({text:e.content,light:e.variants.light?.color,dark:e.variants.dark?.color})))})}).catch(()=>{}),()=>{t=!1}},[e,n]),r&&r.text===e&&r.language===n?r.lines:null}function xS({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))}var SS={};function CS(e){let{schedule:t,pages:n,loaded:r}=px(),i=(0,Y.useContext)(q_)??K_,a=e.map(e=>e.id).join(`,`),{value:o}=ed(async()=>{if(!r)return SS;let n=t?kS({...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))},SS,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 wS(e){if(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith(`/`))return;let[t,...n]=e.split(`/`).filter(Boolean);if(!(!t||!Jg(t)||n.length===0))return{segment:t,rest:n}}function TS(e){let t=e.match(/(?<![\w./:@-])[a-z][a-z0-9]*\/[^\s()[\]<>"'`]+/g)??[];return[...new Set(t.map(e=>e.replace(/[.,;:!?]+$/,``)).filter(e=>wS(e)!==void 0))]}var ES={};function DS(e){let{pages:t}=px(),n=(0,Y.useContext)(q_)??K_,r=e.map(({projectId:e,paths:t})=>`${e}\n${[...t].sort().join(`
9
+ `),t)})}function u_(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 d_(e,t,n){let r=e.join(`
10
+ `);return(0,J.jsxs)(`div`,{className:`relative rounded-lg border border-border bg-muted/50`,children:[(0,J.jsx)(qg,{text:r,label:`Copy the code`,className:`absolute top-2.5 right-2.5`}),(0,J.jsx)(`pre`,{className:`px-4 py-3 pr-10 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:u_(t),children:n<e.length-1?`${t}\n`:t},n)):r})})]},n)}function f_(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 p_(e){return f_(e).length>0&&f_(e).every(e=>/^:?-+:?$/.test(e))}function m_(e){return e.replace(/^[ \t]*/,e=>e.replace(/\t/g,` `))}function h_(e){return/^ */.exec(m_(e))[0].length}function g_(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 __(e){let t=/^[ \t]*[-*]\s+(.*)$/.exec(e);if(t)return{indent:h_(e),ordered:!1,start:1,text:t[1]};let n=/^[ \t]*(\d{1,3})[.)]\s+(.*)$/.exec(e);return n?{indent:h_(e),ordered:!0,start:Number(n[1]),text:n[2]}:null}function v_(e){return/^\s*(?:([-*_])\1{2,}|([-*_])(?: \2){2,})\s*$/.test(e)}function y_(e){return/^\s*```/.test(e)}var b_=12;function x_(e,t){let n=__(e[t]).indent,r=t+1,i=!1;for(let a=t+1;a<e.length;a++){let t=e[a];if(i){y_(t)&&(i=!1),r=a+1;continue}if(!t.trim())continue;let o=h_(t)>=n+2,s=__(t)!==null&&!v_(t);if(!o&&!s)break;o&&y_(t)&&(i=!0),r=a+1}return r}function S_(e,t,n,r){let i=[],a=__(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&&!y_(u[t]),i=d;for(let r=e;r<=t;r++)n(r)&&u[r].trim()&&(i=Math.min(i,h_(u[r])));for(let a=e;a<=t;a++)n(a)&&(r[a]=i)}let i=u.length>0?C_(u.map((e,t)=>g_(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:A_(e[2])}),i]}):(0,J.jsx)(`span`,{children:A_(e[2])})]},c.length):(0,J.jsxs)(`li`,{className:i?`space-y-1`:void 0,children:[A_(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),y_(t)&&m();continue}let e=__(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,h_(t)),y_(t)&&(f=!0,p.push([u.length-1,u.length-1]))):u.length>0&&u.push(t)}return _(),i}function C_(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&&p_(e[1])){let t=f_(e[0]),n=e.slice(2).map(f_);r.push((0,J.jsx)(`div`,{className:`overflow-x-auto`,children:(0,J.jsxs)(`table`,{className:`w-full border-collapse text-xs`,children:[(0,J.jsx)(`thead`,{children:(0,J.jsx)(`tr`,{children:t.map((e,t)=>(0,J.jsx)(`th`,{className:`border-b border-border px-2 py-1 text-left font-semibold`,children:A_(e)},t))})}),(0,J.jsx)(`tbody`,{children:n.map((e,n)=>(0,J.jsx)(`tr`,{children:t.map((t,n)=>(0,J.jsx)(`td`,{className:`border-b border-border/50 px-2 py-1 align-top`,children:A_(e[n]??``)},n))},n))})]})},o++))}else for(let t of e)r.push((0,J.jsx)(`p`,{children:A_(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(d_(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:A_(d[2])},o++));continue}if(v_(l)){r.push((0,J.jsx)(`hr`,{className:`border-border`},o++));continue}if(n<b_&&/^\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:C_(a,t,n+1)},o++)),c=i-1;continue}if(n<b_&&__(l)){let i=x_(e,c);for(let a of S_(e.slice(c,i),t,n,o++))r.push(a);c=i-1;continue}l.trim()&&r.push((0,J.jsx)(`p`,{children:A_(l)},o++))}return s(),i!==null&&r.push(d_(i.lines,i.language,o++)),r}var w_=`text-primary underline underline-offset-2 break-all`,T_=`rounded-[5px] border-[0.5px] border-foreground/10 bg-foreground/5 px-[3px] py-px text-[0.9em] text-(--code-foreground)`,E_=`whitespace-nowrap rounded bg-primary/10 px-1.5 text-primary hover:bg-primary/15`,D_=(0,Y.createContext)(void 0);function O_({number:e}){let t=(0,Y.useContext)(D_);return t?(0,J.jsxs)(`a`,{href:`${t}/issues/${e}`,target:`_blank`,rel:`noreferrer`,className:E_,children:[`#`,e]}):`#${e}`}function k_(e,t,n){return(0,J.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,className:w_,children:t},n)}function A_(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:T_,children:n.slice(1,-1)},a++));else if(n.startsWith(`[`)){let e=/^\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)$/.exec(n),r=/^\[([^\]]+)\]\(([^\s):]+)\)$/.exec(n);e?t.push(k_(e[2],e[1],a++)):r?t.push((0,J.jsx)(`code`,{title:r[2],className:T_,children:r[1]},a++)):t.push((0,J.jsx)(Y.Fragment,{children:n},a++))}else n.startsWith(`**`)?t.push((0,J.jsx)(`strong`,{children:A_(n.slice(2,-2))},a++)):n.startsWith(`*`)?t.push((0,J.jsx)(`em`,{children:A_(n.slice(1,-1))},a++)):n.startsWith(`#`)?t.push((0,J.jsx)(O_,{number:n.slice(1)},a++)):t.push(k_(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 j_(e){return hg(`alert-dialog`,e)}var M_=vg;function N_({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}=gd();return(0,J.jsxs)(j_,{open:p,onOpenChange:e=>{h||(m(e),e&&v())},children:[e&&(0,J.jsx)(M_,{render:e}),(0,J.jsxs)(lg,{children:[(0,J.jsx)(eg,{className:`fixed inset-0 z-50 bg-black/40 backdrop-blur-[1px]`}),(0,J.jsxs)(cg,{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)(_g,{className:`text-sm font-semibold`,children:r}),(0,J.jsx)(ng,{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)(tg,{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})]})]})]})]})}function P_(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 F_=`data-checked`,I_=`data-unchecked`;function L_(e){return{checked(t){return e.indeterminate?{}:t?{[F_]:``}:{[I_]:``}},...nf}}var R_=Y.createContext(void 0);function z_(){return Y.useContext(R_)}var B_=Y.createContext(void 0);function V_(){let e=Y.useContext(B_);if(e===void 0)throw Error(et(14));return e}var H_=`data-parent`,U_=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}=df(),{disabled:C,name:w,setDirty:T,setFilled:E,setTouched:D,state:O,validationMode:k,validityData:A,validation:j}=of(),M=Nf(),{labelId:N,registerControlId:P,getDescriptionProps:F}=lf(),I=z_(),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=Kc(),ee=I?.registerControlId!==P,te=Lf({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=jf(z,oe),{getButtonProps:ce,buttonRef:le}=Tf({disabled:z,native:y}),ue=I?.validation??j,[de,fe]=yd({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;sf(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=mr(u,ge,p?void 0:ye),xe=Pf(a,N,ge,!y,te,x[`aria-label`]);X(()=>{ge.current&&(ge.current.indeterminate=me),I||E(de)},[de,me,I,E]),hf(de,()=>{I||(S(B),T(de!==A.initialValue),ue.change(de))});let Se=ha({checked:de,disabled:z,form:s,name:p?void 0:B,id:y?void 0:te,required:g,ref:be,style:B?Pr:Nr,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(Hn,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=L_(Ce),we=Oa(`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,[H_]: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),kt(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||P_(t)?.click()})},onClick(e){if(m||z)return;e.preventDefault();let t=ge.current;t&&Cf(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)(B_.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})]})}),W_=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=V_(),c=s.checked||s.indeterminate,{mounted:l,transitionStatus:u,setMounted:d}=yo(c),f=Y.useRef(null),p={...s,transitionStatus:u};wo({batch:!0,enabled:!c,open:c,ref:f,onComplete(){c||d(!1)}});let m={...L_(s),...fn},h=a||l,g=Oa(`span`,e,{ref:[t,f],state:p,stateAttributesMapping:m,props:o});return h?g:null});function G_({className:e,disabled:t=!1,...n}){return(0,J.jsx)(U_,{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)(W_,{className:`flex items-center justify-center text-current`,children:(0,J.jsx)(du,{className:`h-3 w-3`,strokeWidth:3,"aria-hidden":!0})})})}var K_=O(`onModules`),q_=O(`runModuleCommand`),J_=O(`runComputerCommand`),Y_=O(`runComputerCommandOn`),X_=O(`readModule`);function Z_({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 Q_={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 useLoginsOn(){return{ok:!1,error:`no dashboard to give a server logins from`}},async watchScreen(){},async sendToScreen(){return!1}},$_=(0,Y.createContext)(null);function ev(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 tv(e){let t=(0,Y.useContext)($_)??Q_;return(0,Y.useMemo)(()=>({...t,package:e}),[t,e])}function nv({className:e,...t}){return(0,J.jsx)(`div`,{className:q(`rounded-lg border border-border bg-card text-card-foreground`,e),...t})}function rv({className:e,...t}){return(0,J.jsx)(`div`,{className:q(`flex flex-col gap-1 px-4 pt-4`,e),...t})}function iv({className:e,...t}){return(0,J.jsx)(`h3`,{className:q(`text-sm font-semibold`,e),...t})}function av({icon:e,children:t,segment:n,onOpen:r,className:i}){let a=(0,Y.useContext)($_)??Q_;return(0,J.jsx)(iv,{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)(uu,{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 ov({className:e,...t}){return(0,J.jsx)(`div`,{className:q(`p-4`,e),...t})}var sv=Y.createContext(void 0);function cv(){let e=Y.useContext(sv);if(e===void 0)throw Error(et(63));return e}var lv=`data-checked`,uv=`data-unchecked`,dv={...nf,checked(e){return e?{[lv]:``}:{[uv]:``}}},fv=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}=df(),{state:x,setTouched:S,setDirty:C,validityData:w,setFilled:T,validationMode:E,disabled:D,name:O,validation:k}=of(),{labelId:A}=lf(),j=D||m,M=O??l,N=Y.useRef(null),P=mr(N,c,k.inputRef),F=Y.useRef(null),I=jf(j,F),L=Kc(),R=Lf({id:s}),z=u?void 0:R,[B,V]=yd({controlled:n,default:!!i,name:`Switch`,state:`checked`});sf(F,L,B,void 0,!j,l),X(()=>{T(B)},[B,T]),hf(B,()=>{b(M),C(B!==w.initialValue),k.change(B)});let{getButtonProps:H,buttonRef:ee}=Tf({disabled:j,native:u}),te=Pf(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&&Cf(t,e)}},W={...k.getValidationProps(j),checked:B,disabled:j,form:o,id:z,name:M,required:p,style:M?Pr:Nr,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(Hn,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=Oa(`span`,e,{state:ne,ref:[t,F,ee],props:[U,y,H,e=>k.getValidationProps(j,e)],stateAttributesMapping:dv});return(0,J.jsxs)(sv.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})]})}),pv=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return Oa(`span`,e,{state:cv(),ref:t,stateAttributesMapping:dv,props:a})});function mv({className:e,disabled:t=!1,...n}){return(0,J.jsx)(fv,{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)(pv,{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 hv({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 gv({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 _v({className:e,...t}){return(0,J.jsx)(`tbody`,{"data-slot":`table-body`,className:q(`[&_tr:last-child]:border-0`,e),...t})}function vv({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 yv({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 bv({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 xv({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})}function Sv(e){let t=Y.useRef(!0);t.current&&(t.current=!1,e())}var Cv=Y.createContext(void 0),wv=Y.createContext(void 0);function Tv(){let e=Y.useContext(Cv);if(e===void 0)throw Error(et(60));return e}function Ev(){let e=Y.useContext(wv);if(e===void 0)throw Error(et(61));return e}function Dv(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 Ov=(e,t)=>Object.is(e,t);function kv(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Av(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!Dv(e,t,(e,t)=>kv(e,t,n)):e!==t}function jv(e,t,n){return e?e.some(e=>e!==void 0&&kv(t,e,n)):!1}function Mv(e,t,n){return e?e.findIndex(e=>e!==void 0&&kv(e,t,n)):-1}function Nv(e,t){if(t!==Ov)return n=>jv(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 Pv(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(Nv(t,n)):Mv(e,t,n);return i===-1?null:i}function Fv(e,t,n,r,i,a){return jv(r,t,i)?a!=null&&e>a&&jv(r,n[a],i)?a:e:e===a?Pv(n,r,i,!0):a}function Iv(e,t,n){return e.filter(e=>!kv(t,e,n))}var Lv={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:Pm(t,r)!==``},hasNullItemLabel:(e,t)=>t?Mm(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=>kv(t,e,n)):kv(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 Rv(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=Ov,highlightItemOnHover:C=!0,children:w}=e,{clearErrors:T}=df(),{setDirty:E,setTouched:D,setFocused:O,validityData:k,setFilled:A,name:j,disabled:M,validation:N,validationMode:P}=of(),F=Lf({id:t}),I=M||d,L=j??c,[R,z]=yd({controlled:n,default:y?r??Ze:r,name:`Select`,state:`value`}),[B,V]=yd({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}=nm(B),de=Ve(()=>new $o({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},Lv)).current,[fe,pe]=Y.useState(!1),{mounted:me,transitionStatus:he,forceUnmount:ge}=To({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=kl(le),Se=le??xe,Ce=Y.useMemo(()=>y?``:Pm(R,x),[y,R,x]),K=Y.useMemo(()=>y&&Array.isArray(R)?R.map(e=>Pm(e,x)):Pm(R,x),[y,R,x]);sf(br(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=Pv(G.current,R,S,y);e===null&&(ae.current=null),!B&&de.set(`selectedIndex`,e)},[y,B,R,S,de]),hf(R,()=>{T(L),E(Av(R,k.initialValue,S)),N.change(R)});let Te=$((e,t)=>{let n=t,r=No(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(or))}}),[ge,Te,de]);let Ee=$((e,t)=>{i?.(e,t),!t.isCanceled&&z(e)}),De=$(e=>{let t=dh(e.scrollHeight,e.clientHeight),n=fh(e.scrollTop,t),r=n>0,i=n<t;de.set(`scrollUpArrowVisible`,r),de.set(`scrollDownArrowVisible`,i)}),Oe=us({open:B,onOpenChange:Te,elements:{reference:ye,floating:be}}),ke=uo(Oe,{enabled:!I,event:`mousedown`}),Ae=_o(Oe),je=Ds(Oe,{enabled:!I,listRef:H,activeIndex:_e,selectedIndex:ve,disabledIndices:Ze,onNavigate(e){e===null&&!B||de.set(`activeIndex`,e)},focusItemOnHover:C}),Me=Os(Oe,{enabled:!I&&(B||!f&&!y),listRef:ee,activeIndex:_e,selectedIndex:ve,disabledIndices:e=>Wd(H.current[e]),onMatch(e){B?de.set(`activeIndex`,e):Ee(G.current[e],Q(Hn))},onTyping(e){re.current=e}}),Ne=Y.useMemo(()=>ha(Me.reference,je.reference,Ae.reference,ke.reference,ue),[ke.reference,Me.reference,je.reference,Ae.reference,ue]),Pe=Y.useMemo(()=>ha(Eo,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`,_),Sv(()=>{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=mr(g,N.inputRef),q=y?void 0:L,Re=Y.useMemo(()=>!y||!Array.isArray(R)||!L?null:R.map(e=>{let t=Pm(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)(Cv.Provider,{value:de,children:[(0,J.jsx)(wv.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(Hn,e.nativeEvent);function r(){if(y)return;let e=t.toLowerCase(),r=G.current.findIndex(t=>Pm(t,x).toLowerCase()===e||Nm(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?Pr:Nr,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Re]})}function zv(e){return e==null?void 0:`${e}-label`}function Bv(e,t){return e??t}var Vv=`data-popup-side`,Hv=400,Uv={...wn,...nf,popupSide:e=>e?{[Vv]:e}:null,value:()=>null},Wv=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}=of(),{labelId:m}=lf(),h=Tv(),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=Bv(m,O);Lf({id:i});let N=br(w),P=Y.useRef(null),F=jf(y,P),{getButtonProps:I,buttonRef:L}=Tf({disabled:y,native:o}),R=h.useStateSetter(`triggerElement`),z=ot(),B=ot(),V=ot();Y.useEffect(()=>{if(b)return V.start(Hv,()=>{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=ha(C,{id:j,role:`combobox`,"aria-expanded":b,"aria-haspopup":`listbox`,"aria-controls":b?T?.id??Fn(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(Hn,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=jr(e.currentTarget);function n(e){if(!P.current)return;let t=e.target;Z(P.current,t)||Z(N.current,t)||gm(e,P.current)||h.context.setOpen(!1,Q(rr,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 Oa(`button`,e,{ref:[t,P,L,R],state:te,stateAttributesMapping:Uv,props:ee})}),Gv={value:()=>null},Kv=Y.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,c=Tv(),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)?Im(l,u,d):Fm(l,u,d)),Oa(`span`,e,{state:h,ref:[t,c.context.valueRef],props:[{children:g},s],stateAttributesMapping:Gv})}),qv=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return Oa(`span`,e,{state:{open:Tv().useState(`open`)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:Cn})}),Jv=Y.forwardRef(function(e,t){let n=Tv(),r=n.useState(`mounted`),i=n.useState(`forceMount`);return r||i?(0,J.jsx)(Wa,{ref:t,...e}):null}),Yv=Y.createContext(void 0);function Xv(){let e=Y.useContext(Yv);if(!e)throw Error(et(59));return e}function Zv(e,t){e&&Object.assign(e.style,t)}var Qv={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},$v={position:`fixed`},ey=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=La,style:_,...v}=e,y=Tv(),b=Ev(),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),Xp((P||C)&&x,T===`touch`,E,D);let F=bl({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?$v:F.positionerStyles,R={open:x,side:I,align:F.align,anchorHidden:F.anchorHidden};X(()=>{y.set(`popupSide`,F.side)},[y,F.side]);let z=wl(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(Hn);if(t!==0&&!y.state.multiple&&w!==null&&Mv(y.context.valuesRef.current,w,O)===-1){let e=y.context.initialValueRef.current,t=e!=null&&Mv(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=>Mv(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:``};Zv(E,e),Zv(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)(Ld,{elementsRef:y.context.listRef,labelsRef:y.context.labelsRef,onMapChange:V,children:(0,J.jsxs)(Yv.Provider,{value:H,children:[S&&C&&(0,J.jsx)(Ip,{inert:Ol(!x),cutout:D}),z]})})}),ty=`--transform-origin`,ny={...Tn,...fn},ry=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,s=Tv(),c=s.useState(`multiple`),l=s.useState(`readOnly`),u=s.useState(`highlightItemOnHover`),d=Ev(),{side:f,align:p,alignItemWithTriggerActive:m,isPositioned:h,setControlledAlignItemWithTrigger:g}=Xv(),_=Cp(!0)!=null,v=ol(),{nonce:y,disableStyleElements:b}=Qm(),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=Ar(),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=oy(O),i=sy(O.getBoundingClientRect().height,`y`,r),a=jr(O),o=kt(O),c=o.getComputedStyle(O),l=parseFloat(c.marginTop),u=parseFloat(c.marginBottom),d=iy(o.getComputedStyle(s.context.popupRef.current)),f=Math.min(a.documentElement.clientHeight-l-u,d),p=e.scrollTop,h=ay(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=ch(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=ch(g,0,ay(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]),wo({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,Zv(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(ty),!m){N.request(()=>s.context.handleScrollArrowVisibility(k||e));return}let t=uy(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=kt(O),i=r.getComputedStyle(O),a=r.getComputedStyle(e),o=jr(D),c=oy(D),l=cy(D.getBoundingClientRect(),c),d=cy(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=iy(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=cy(n.getBoundingClientRect(),c);T=cy(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=`${ch(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=ay(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){Zv(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=ay(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=ch(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(ty,`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=kt(O);function t(e){s.context.setOpen(!1,Q(sr,e))}return fr(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){_&&Dd.has(e.key)&&e.stopPropagation()},onScroll(e){k||P(e.currentTarget)},...m&&{style:k?{height:`100%`}:Qv},className:!k&&m?Vm.className:void 0},L=Oa(`div`,e,{ref:[t,s.context.popupRef],state:F,stateAttributesMapping:ny,props:[T,I,Cl(E),o]});return(0,J.jsxs)(Y.Fragment,{children:[!b&&Vm.getElement(y),(0,J.jsx)(lo,{context:d,modal:!1,disabled:!w,openInteractionType:C,returnFocus:a,restoreFocus:!0,children:L})]})});function iy(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function ay(e){return dh(e.scrollHeight,e.clientHeight)}function oy(e){return yc.getScale(e)}function sy(e,t,n){return e/n[t]}function cy(e,t){return ci({x:sy(e.x,`x`,t),y:sy(e.y,`y`,t),width:sy(e.width,`x`,t),height:sy(e.height,`y`,t)})}var ly=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function uy(e){let{style:t}=e,n={};for(let[e,r]of ly)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of ly){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var dy=Y.createContext(void 0);function fy(){let e=Y.useContext(dy);if(!e)throw Error(et(57));return e}var py=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=Of({guess:!0,label:o,textRef:u}),f=Tv(),{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=Fv(C,a,f.context.valuesRef.current,e,_,t),r=n===C,C===t&&!r&&(f.context.selectedItemTextRef.current=null)):(r=e!==void 0&&kv(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}=Tf({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?Iv(n,a,_):[...n,a];f.context.setValue(r,Q(qn,e))}else f.context.setValue(a,Q(qn,e)),f.context.setOpen(!1,Q(qn,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&&Ct(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=Oa(`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)(dy.Provider,{value:P,children:N})})),my=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}=yo(o),d=Oa(`span`,e,{ref:[t,c],state:{selected:o,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:fn});return wo({batch:!0,enabled:!o,open:o,ref:c,onComplete(){o||u(!1)}}),d})),hy=Y.forwardRef(function(e,t){let{selected:n}=fy();return e.keepMounted||n?(0,J.jsx)(my,{...e,selected:n,ref:t}):null}),gy=Y.memo(Y.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=fy(),a=Tv(),{render:o,className:s,style:c,...l}=e;return Oa(`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})})),_y=Rv;function vy(e){return(0,J.jsx)(Kv,{"data-slot":`select-value`,...e})}function yy({className:e,size:t=`default`,children:n,...r}){return(0,J.jsxs)(Wv,{"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)(qv,{className:`shrink-0 text-muted-foreground`,children:(0,J.jsx)(fu,{className:`h-3.5 w-3.5`,"aria-hidden":!0})})]})}function by({className:e,sideOffset:t=4,align:n=`start`,children:r,...i}){return(0,J.jsx)(Jv,{children:(0,J.jsx)(ey,{sideOffset:t,align:n,alignItemWithTrigger:!1,className:`z-50 outline-none`,children:(0,J.jsx)(ry,{"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 xy({className:e,children:t,...n}){return(0,J.jsxs)(py,{"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)(gy,{children:t}),(0,J.jsx)(hy,{className:`absolute right-2 flex items-center`,children:(0,J.jsx)(du,{className:`h-3.5 w-3.5`,"aria-hidden":!0})})]})}var Sy=Y.createContext(void 0);function Cy(e){let t=Y.useContext(Sy);if(t===void 0&&!e)throw Error(et(47));return t}var wy={...cs,disabled:e=>e.disabled,instantType:e=>e.instantType===`trigger-change`&&!cs.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===`trigger-press`&&cs.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod===`touch`&&e.openChangeReason===`trigger-press`,hasTriggerFocusGuards:(e,t)=>cs.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},Ty=class extends $o{constructor(e,t,n){let r=new Bo;super(Ey(e,r,t,n),Dy(r),wy)}setOpen=(e,t)=>{let n=t.reason===Wn,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=No(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=Mo(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 Ey(e,t,n,r=!1){let i={...ns(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 Dy(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 Oy=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=Ay(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),zo(u,d),Io(u);let{forceUnmount:m}=Lo(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(or))}),[m,u]);let h=d||f||s!=null;return(0,J.jsxs)(Sy.Provider,{value:u,children:[s&&(0,J.jsx)(ko,{handle:s,store:u}),h&&(0,J.jsx)(jy,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})});function ky(e){return Cy(!0)?(0,J.jsx)(Oy,{props:e}):(0,J.jsx)($a,{children:(0,J.jsx)(Oy,{props:e})})}function Ay(e,t){let n=Oo((e,n)=>new Ty(t,e,n));return Y.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function jy({store:e,modal:t}){let n=_o(e.useState(`floatingRootContext`),{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),r=n.reference,i=n.floating;return Ro(e,{activeTriggerProps:r,inactiveTriggerProps:r,popupProps:i}),null}var My=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=Cy(!0),h=ls(s)??m;if(!h)throw Error(et(74));let g=Kc(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}=Fo(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=bs(v,{enabled:!a&&l&&!T,mouseOnly:!0,move:!1,handleClose:Is(),restMs:u,delay:{close:d},triggerElementRef:x,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),O=uo(v,{stickIfOpen:$(()=>h.context.stickIfOpen)}),k=tm(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),A=h.useState(`triggerProps`,C),{getButtonProps:j,buttonRef:M}=Tf({disabled:a,native:o}),N={open(e){return w?wn.open(e):Cn.open(e)}},{handlePreFocusGuardFocus:P,handleFocusTargetFocus:F}=ym(h,x),I=Oa(`button`,e,{state:{disabled:a,open:y},ref:[M,t,S,x],props:[O.reference,D,A,k,{[Ia]:``,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)(Fr,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:P}),L,(0,J.jsx)(Fr,{ref:h.context.triggerFocusTargetRef,onFocus:F})]}):L}),Ny=Y.createContext(void 0);function Py(){let e=Y.useContext(Ny);if(e===void 0)throw Error(et(45));return e}var Fy=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return Cy().useState(`mounted`)||n?(0,J.jsx)(Ny.Provider,{value:n,children:(0,J.jsx)(Wa,{ref:t,...r})}):null}),Iy=Y.createContext(void 0);function Ly(){let e=Y.useContext(Iy);if(!e)throw Error(et(46));return e}var Ry=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=Ra,..._}=e,v=Cy(),y=Py(),b=Za(),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=bl({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`)});Lp({store:v,domReference:x.useState(`domReferenceElement`),positionerElement:O,open:C});let M=E===!0&&w!==`trigger-hover`;Xp(C&&M,D===`touch`,O,T);let N=v.useStateSetter(`positionerElement`),P=wl(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)(Iy.Provider,{value:j,children:[S&&M&&(0,J.jsx)(Ip,{inert:Ol(!C),cutout:T}),(0,J.jsx)(Qa,{id:b,children:P})]})}),zy=Y.createContext(void 0);function By(){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 Vy=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=Cy(),l=Ly(),u=Cp(!0)!=null,{context:d,hasClosePart:f}=By(),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`);wo({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),vs(w,{enabled:D&&!E,closeDelay:O});let k=a===void 0?Do(c.context.popupRef):a,A=b!==!1&&f;c.useSyncedValue(`focusManagerModal`,A);let j=c.useStateSetter(`popupElement`),M=Oa(`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`,...Eo,"aria-labelledby":v,"aria-describedby":y,onKeyDown(e){u&&Dd.has(e.key)&&e.stopPropagation()}},Cl(g),s],stateAttributesMapping:En});return(0,J.jsx)(lo,{context:w,openInteractionType:m,modal:A,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:o,restoreFocus:`popup`,getInsideElements:()=>[c.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:Nt(C)?C:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,J.jsx)(zy.Provider,{value:d,children:M})})}),Hy=`data-[popup-open]:bg-[var(--color-accent)] data-[popup-open]:text-[var(--color-accent-foreground)]`,Uy=ky;function Wy({className:e,...t}){return(0,J.jsx)(My,{className:typeof e==`function`?e:q(Hy,e),...t})}function Gy({className:e,sideOffset:t=6,align:n=`start`,children:r,...i}){return(0,J.jsx)(Fy,{children:(0,J.jsx)(Ry,{sideOffset:t,align:n,className:`z-50 outline-none`,children:(0,J.jsx)(Vy,{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)(Mh,{viewportClassName:`max-h-[var(--available-height)]`,children:(0,J.jsx)(`div`,{className:`p-3`,children:r})})})})})}function Ky(e,t){return e-t}function qy(e,t,n,r,i,a){let o=ch(e,n,r);if(!i)return o;let s=a.slice();return s[t]=ch(o,a[t-1]??-1/0,a[t+1]??1/0),s.sort(Ky)}function Jy(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 Yy=()=>null,Xy={activeThumbIndex:Yy,max:Yy,min:Yy,minStepsBetweenValues:Yy,step:Yy,values:Yy,...nf},Zy=Y.createContext(void 0);function Qy(){let e=Y.useContext(Zy);if(e===void 0)throw Error(et(62));return e}function $y(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&Dv(e,t)}var eb=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=Kc(o),E=zv(T),D=$(g),O=$(_),{clearErrors:k}=df(),{state:A,disabled:j,name:M,setTouched:N,setDirty:P,validityData:F,validation:I}=of(),{labelId:L}=lf(),[R,z]=Y.useState(),B=n??Bv(L,R),V=j||a,H=M??h,[ee,te]=yd({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(Hn),[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=>ch(e,f,d)).sort(Ky):[ch(ee,f,d)],[d,f,ve,ee]),be=ve?ye:ye[0];sf(I.inputRef,T,be,void 0,!V,h),hf(be,()=>{k(H),I.change(be);let e=F.initialValue,t;t=Array.isArray(be)&&Array.isArray(e)?!Dv(be,e):be!==e,P(t)});let xe=$((e,t)=>{if(Number.isNaN(e)||$y(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=qy(e,t,f,d,ve,ye);if(Jy(r,y,p)){let e=`key`in n?er:Xn,i=xe(r,Q(e,n.nativeEvent,void 0,{activeThumbIndex:t}));N(!0),i&&O(r,Vn(e,n.nativeEvent))}});X(()=>{if(!V)return;let e=Qt(jr(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=Oa(`div`,e,{state:Ce,ref:[t,U],props:[{"aria-labelledby":B,id:T,role:`group`},w,e=>I.getValidationProps(V,e)],stateAttributesMapping:Xy});return(0,J.jsx)(Zy.Provider,{value:K,children:(0,J.jsx)(Ld,{elementsRef:ne,onMapChange:pe,children:we})})}),tb=new Map;function nb(e,t){let n=JSON.stringify({locale:Om(e),options:t}),r=tb.get(n);if(r)return r;let i=new Intl.NumberFormat(e,t);return tb.set(n,i),i}function rb(e,t,n){return e==null?``:nb(t,n).format(e)}function ib(e){return e===`touch`||e===`pen`}function ab(e,t){let n=e.getBoundingClientRect();return t?(n.top+n.bottom)/2:(n.left+n.right)/2}function ob(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 sb(e,t,n){let r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(Math.max(ob(t),ob(n))))}function cb(e,t,n,r,i,a,o,s){let c=e.slice(),l=a*o,u=c.length-1,d=s??e;c[t]=ch(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]=ch(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]=ch(a,n,t)}for(let e=0;e<=u;e+=1)c[e]=Number(c[e].toFixed(12));return c}function lb(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:cb(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(ch(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=cb(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=ch(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 ub=2;function db(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 fb(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 pb=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}=Qy(),k=ol(),A=O.length>1,j=h===`vertical`,M=Y.useRef(null),N=Y.useRef(null),P=$(e=>{e&&N.current==null&&(N.current=kt(e).getComputedStyle(e))}),F=Y.useRef(null),I=Y.useRef(0),L=Y.useRef(0),R=Y.useRef(null),z=Y.useRef(!1),B=br(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 Mt(e)?D.current.some(t=>!Mt(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=db(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=ch(((j?a-b-c.end:(k===`rtl`?s-y:y-o)-c.start)-u)/m,0,1),S=(d-f)*x+f;return S=sb(S,T,f),S=ch(S,f,d),A?lb(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(Mt(a)&&!V(a)?.disabled){let o=ab(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(Mt(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=fb(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&&Jy(n.value,T,p)&&(!s&&I.current>ub&&S(!0),G(n,nr,e))}),ie=$(e=>{if(fb(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,Vn(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(en(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,Yn,e),I.current=0}let r=jr(M.current);r.addEventListener(`touchmove`,re,{passive:!0}),r.addEventListener(`touchend`,ie,{passive:!0}),r.addEventListener(`touchcancel`,ie,{passive:!0})}),se=$(()=>{let e=jr(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=Ar();return Y.useEffect(()=>{let e=M.current;if(!e)return()=>se();let t=fr(e,`touchstart`,oe,{passive:!0});return()=>{t(),ce.cancel(),se()}},[se,oe,M,ce]),Y.useEffect(()=>{o&&se()},[o,se]),Oa(`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=en(e.nativeEvent);if(!t||o||e.defaultPrevented||!Mt(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],Qt(jr(t)))?e.preventDefault():ce.request(()=>{ne(i.thumbIndex)}),S(!0),g.current??G(i,Yn,e.nativeEvent),e.nativeEvent.pointerId&&t.setPointerCapture(e.nativeEvent.pointerId),I.current=0,z.current=ib(e.pointerType);let a=jr(t);a.addEventListener(`pointermove`,re,{passive:!0}),a.addEventListener(`pointerup`,ie,{once:!0}),a.addEventListener(`pointercancel`,ae,{once:!0})}},a],stateAttributesMapping:Xy})}),mb=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=Qy();return Oa(`div`,e,{state:o,ref:t,props:[{style:{position:`relative`}},a],stateAttributesMapping:Xy})}),hb=()=>()=>{},gb=()=>!0,_b=()=>!1;function vb(){return(0,Go.useSyncExternalStore)(hb,gb,_b)}function yb(){let[e,t]=Y.useState(!1);return Y.useEffect(()=>{t(!0)},[]),e}var bb=ca(18)?vb:yb;function xb(){return!bb()}function Sb(e,t,n){return(e-t)*100/(n-t)}function Cb(e){let{script:t}=e,{nonce:n}=Qm();return xb()?(0,J.jsx)(`script`,{nonce:n,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0}):null}var wb=`data-index`,Tb,Eb=new Set([...Dd,Td,Ed]);function Db(e,t,n,r){if(!(t<0))return e.length===2?`${rb(e[t],r,n)} ${t===0?`start`:`end`} range`:n?rb(e[t],r,n):void 0}function Ob(e,t,n,r,i){let a=e+t*n;return ch(Number(a.toFixed(Math.max(ob(e),ob(t),ob(r)))),r,i)}var kb=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=Kc(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}=Qy(),re=ol(),ie=l||T,ae=G.length>1,oe=z===`vertical`,se=re===`rtl`,{setTouched:ce,validationMode:le}=of(),ue=Y.useRef(null),de=Y.useRef(null),fe=jf(ie,de),pe=Y.useRef(!1),me=$(e=>{pe.current||g?.(e)}),he=$(e=>{pe.current||h?.(e)}),ge=Kc(),_e=Lf(),ve=ae?ge:_e,{ref:ye,index:be}=Of({metadata:Y.useMemo(()=>({inputId:ve}),[ve])}),xe=ae?p??be:0,Se=xe===G.length-1,Ce=G[xe],K=Sb(Ce,F,P),[we,Te]=Y.useState(),Ee=xb(),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=kt(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)?Nr:{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=ha({"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(rb(Ce,N,D),Ce,xe):c??Db(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(qy(Ce,xe,F,P,A,G)))},onKeyDown(e){if(e.defaultPrevented||!Eb.has(e.key))return;Dd.has(e.key)&&e.stopPropagation();let t=null,n=0,r=e.shiftKey?M:W,i=sb(Ce,W,F);switch(e.key){case bd:n=1;break;case Cd:n=se?-1:1;break;case xd:n=-1;break;case Sd:n=se?1:-1;break;case Td:r=M,n=1;break;case Ed:r=M,n=-1;break;case`End`:t=ae&&Number.isFinite(G[xe+1])?G[xe+1]-W*I:P;break;case wd:t=ae&&Number.isFinite(G[xe-1])?G[xe-1]+W*I:F;break;default:break}if(n!==0&&(t=Ob(i,r,n,F,P)),t!==null){let n=e.currentTarget;Pn(n)||(pe.current=!0,n.blur(),n.focus({preventScroll:!0,focusVisible:!0})),O(t,xe,e),e.preventDefault()}},step:W,style:{...Nr,width:`100%`,height:`100%`,writingMode:Ne},tabIndex:v,type:`range`,value:Ce??``},e=>E.getValidationProps(ie,e),{onFocus:me,onBlur:he,onKeyDown:_}),Ie=mr(de,E.inputRef,m);return Oa(`div`,e,{state:U,ref:[t,ye,ue],props:[{[wb]:xe,children:(0,J.jsxs)(Y.Fragment,{children:[r,(0,J.jsx)(`input`,{ref:Ie,...Fe,suppressHydrationWarning:!0}),k&&Se&&H&&(Tb||=(0,J.jsx)(Cb,{script:``}))]}),id:x,onPointerDown(e){if(ie)return;V.current=xe;let t=ab(e.currentTarget,oe);B.current=(oe?e.clientY:e.clientX)-t},style:Me,suppressHydrationWarning:H||void 0},b],stateAttributesMapping:Xy})});function Ab(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 jb=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}=Qy(),m=xb(),h=Ab(u===`vertical`,p.length>1,s,s?o[0]:Sb(p[0],l,c),s?o[1]:Sb(p[p.length-1],l,c),s&&d&&m);return Oa(`div`,e,{state:f,ref:t,props:[{"data-base-ui-slider-indicator":d?``:void 0,style:h,suppressHydrationWarning:d||void 0},a],stateAttributesMapping:Xy})}),Mb=`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 Nb({value:e,onValueChange:t,min:n=0,max:r=10,className:i,"aria-label":a}){return(0,J.jsx)(eb,{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)(pb,{className:`flex w-full touch-none select-none items-center py-1.5`,children:(0,J.jsxs)(mb,{className:`relative h-1 w-full rounded-full bg-[var(--color-muted)]`,children:[(0,J.jsx)(jb,{className:`rounded-full bg-primary`}),(0,J.jsx)(kb,{"aria-label":a?`${a} minimum`:`Minimum`,className:Mb}),(0,J.jsx)(kb,{"aria-label":a?`${a} maximum`:`Maximum`,className:Mb})]})})})}function Pb({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 Fb(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=oa(),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)(Xf.Provider,{value:u,children:(0,J.jsx)(Jf.Provider,{value:void 0,children:(0,J.jsx)(fm,{...e})})})}var Ib=500,Lb=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}=Zf(!1),{store:m}=Yf(!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(Un,n)),b.start(Ib,()=>{x.current=!0})}function w(e){if(g)return;d.current=!0,xt(e),C(e.clientX,e.clientY,e.nativeEvent);let t=jr(_.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=en(e);Z(u.current,t)||p&&t&&vm(t)===p||s.current?.setOpen(!1,Q(rr,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(Ib,()=>{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=en(e);(Z(_.current,t)||Z(c.current,t)||Z(l.current,t))&&e.preventDefault()}return fr(jr(_.current),`contextmenu`,e)},[l,g,c]),Oa(`div`,e,{state:{open:h},ref:[_,t],props:[{onContextMenu:w,onTouchStart:E,onTouchMove:D,onTouchEnd:T,onTouchCancel:T,style:{WebkitTouchCallout:`none`}},a],stateAttributesMapping:wn})}),Rb=Fb,zb=Lb,Bb=(0,Y.createContext)({title:null,actions:null});function Vb({children:e}){let{title:t}=(0,Y.useContext)(Bb);return t?(0,He.createPortal)(e,t):null}function Hb({children:e}){let{actions:t}=(0,Y.useContext)(Bb);return t?(0,He.createPortal)(e,t):null}function Ub({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)(Xg,{}),(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 Wb=`needs-you`,Gb=`working-now`;function Kb(e){document.getElementById(e)?.scrollIntoView({behavior:`smooth`,block:`start`})}function qb({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 Jb({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)(Yb,{on:n===null,onClick:()=>r(null),label:`All`,count:t}),e.map(e=>(0,J.jsx)(Yb,{on:n===e.value,onClick:()=>r(e.value),label:e.label,count:e.count},e.value))]})}function Yb({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 Xb=`file`,Zb={"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`},Qb={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`},$b={toml:`toml_light`,pnpm:`pnpm_light`,bun:`bun_light`},ex={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 tx(e){let t=e.slice(e.lastIndexOf(`/`)+1).toLowerCase(),n=Zb[t];if(n)return n;for(let e=t.indexOf(`.`,1);e!==-1;e=t.indexOf(`.`,e+1)){let n=Qb[t.slice(e+1)];if(n)return n}return Xb}var nx=({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:ex[e]}});function rx({path:e,className:t}){let n=tx(e),r=$b[n];return r?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(nx,{icon:r,className:q(t,`dark:hidden`)}),(0,J.jsx)(nx,{icon:n,className:q(t,`hidden dark:inline-flex`)})]}):(0,J.jsx)(nx,{icon:n,className:t})}function ix({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 _=()=>{s_(s),u()};return(0,J.jsxs)(`div`,{className:`inline-flex shrink-0 items-center`,children:[(0,J.jsxs)(jl,{children:[(0,J.jsxs)(Ml,{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)(_u,{className:`h-3.5 w-3.5 animate-spin`,"aria-hidden":!0}):e,t!==void 0&&(f?n:t)]}),(0,J.jsx)(Nl,{...o?{className:o}:{},children:a})]}),(0,J.jsxs)(Lh,{children:[(0,J.jsx)(Vh,{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)(fu,{className:`h-3 w-3`,"aria-hidden":!0})}),(0,J.jsx)(Hh,{align:`end`,className:`max-w-[20rem]`,children:(0,J.jsx)(Uh,{onClick:_,className:`items-start`,children:(0,J.jsx)(Kg,{label:`Configure first, then run`,description:c})})})]})]})}var ax=`modulepreload`,ox=function(e){return`/`+e},sx={},cx=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=ox(t,n),t=s(t),t in sx)return;sx[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`:ax,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)})},lx=50,ux={pages:[],cards:[],linkActions:[],panels:[],runSlots:[],settings:[],everyPage:[],loaded:!1},dx=new Map,fx=new Map;function px(e){let t=dx.get(e);return t||(t=cx(()=>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)}),[]),dx.set(e,t),t.then(t=>void fx.set(e,t))),t}var mx=[];function hx(e,t){return(e.order??lx)-(t.order??lx)||e.package.localeCompare(t.package)}function gx(e=0){let{value:t,loaded:n}=id(K_,mx,3e4,[e],{remember:`modules`,stored:!0}),[r,i]=(0,Y.useState)(ux);return(0,Y.useEffect)(()=>{if(!n)return;if(t.every(e=>fx.has(e.url))){i(_x(t.map(e=>({module:e,definition:fx.get(e.url)})),!0));return}let e=!0,r=new Map;for(let n of t)px(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(_x(o,o.length===t.length))});return()=>{e=!1}},[t,n]),r}function _x(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??[])!e_(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(hx),s.sort(hx),{pages:n,cards:r,linkActions:i,panels:a,runSlots:o,settings:s,everyPage:c,...l?{usageLimit:l}:{},...u?{schedule:u}:{},loaded:t}}var vx=(0,Y.createContext)(ux);function yx(){return(0,Y.useContext)(vx)}function bx({projects:e,targets:t,resetKey:n,label:r,tooltip:i,disabled:a=!1,size:o=`sm`,variant:s=`outline`}){let{linkActions:c}=yx(),l=(0,Y.useContext)($_),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(`
11
+ `)]);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=FS({...l??Q_,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)(du,{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)(jl,{children:[(0,J.jsx)(Ml,{render:(0,J.jsx)(ze,{...l}),children:c}),(0,J.jsx)(Nl,{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 xx({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 Sx({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 Cx=`(no value)`;function wx({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===``?Cx:e.value,label:e.label,disabled:e.disabled===!0}));return(0,J.jsx)(Sx,{label:e,description:t,control:(0,J.jsxs)(_y,{items:a,value:n===``?Cx:n,onValueChange:(e,t)=>{t.reason!==`none`&&i(e===Cx?``:e)},children:[(0,J.jsx)(yy,{size:`sm`,"aria-label":e,className:`max-w-[min(16rem,45vw)]`,children:(0,J.jsx)(vy,{})}),(0,J.jsx)(by,{align:`end`,children:a.map(e=>(0,J.jsx)(xy,{value:e.value,disabled:e.disabled,children:e.label},e.value))})]})})}var Tx=(0,Y.createContext)(null);function Ex(e){let t=(0,Y.useContext)(Tx),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 Dx=(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))(Dx||{}),Ox=[0,1],kx=[1,0],Ax=[2,3],jx=[3,2],Mx={L:Ox,M:kx,Q:Ax,H:jx},Nx=/^\d*$/,Px=/^[A-Z0-9 $%*+./:-]*$/,Fx=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`,Ix=1,Lx=40,Rx=3,zx=3,Bx=40,Vx=10,Hx=[[-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]],Ux=[[-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]],Wx=class{constructor(e,t,n,r){if(this.version=e,this.ecc=t,e<Ix||e>Lx)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,Dx.Timing),this.setFunctionModule(e,6,e%2==0,Dx.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,Kx(r,e));this.setFunctionModule(8,7,Kx(r,6)),this.setFunctionModule(8,8,Kx(r,7)),this.setFunctionModule(7,8,Kx(r,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,Kx(r,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,Kx(r,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,Kx(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=Kx(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,Dx.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,Dx.Alignment)}setFunctionModule(e,t,n,r=Dx.Function){this.modules[t][e]=n,this.types[t][e]=r}addEccAndInterleave(e){let t=this.version,n=this.ecc;if(e.length!==sS(t,n))throw RangeError(`Invalid argument`);let r=Ux[n[0]][t],i=Hx[n[0]][t],a=Math.floor(oS(t)/8),o=r-a%r,s=Math.floor(a/r),c=[],l=cS(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=lS(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(oS(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]=Kx(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+=Rx:r>5&&e++):(this.finderPenaltyAddHistory(r,i),n||(e+=this.finderPenaltyCountPatterns(i)*Bx),n=this.modules[t][a],r=1);e+=this.finderPenaltyTerminateAndCount(n,r,i)*Bx}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+=Rx:r>5&&e++):(this.finderPenaltyAddHistory(r,i),n||(e+=this.finderPenaltyCountPatterns(i)*Bx),n=this.modules[a][t],r=1);e+=this.finderPenaltyTerminateAndCount(n,r,i)*Bx}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+=zx)}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*Vx,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 Gx(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 Kx(e,t){return(e>>>t&1)!=0}var qx=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()}},Jx=[1,10,12,14],Yx=[2,9,11,13],Xx=[4,8,16,16];function Zx(e,t){return e[Math.floor((t+7)/17)+1]}function Qx(e){let t=[];for(let n of e)Gx(n,8,t);return new qx(Xx,e.length,t)}function $x(e){if(!nS(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);Gx(Number.parseInt(e.substring(n,n+r),10),r*3+1,t),n+=r}return new qx(Jx,e.length,t)}function eS(e){if(!rS(e))throw RangeError(`String contains unencodable characters in alphanumeric mode`);let t=[],n;for(n=0;n+2<=e.length;n+=2){let r=Fx.indexOf(e.charAt(n))*45;r+=Fx.indexOf(e.charAt(n+1)),Gx(r,11,t)}return n<e.length&&Gx(Fx.indexOf(e.charAt(n)),6,t),new qx(Yx,e.length,t)}function tS(e){return e===``?[]:nS(e)?[$x(e)]:rS(e)?[eS(e)]:[Qx(aS(e))]}function nS(e){return Nx.test(e)}function rS(e){return Px.test(e)}function iS(e,t){let n=0;for(let r of e){let e=Zx(r.mode,t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}function aS(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 oS(e){if(e<Ix||e>Lx)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 sS(e,t){return Math.floor(oS(e)/8)-Hx[t[0]][e]*Ux[t[0]][e]}function cS(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]=uS(t[e],n),e+1<t.length&&(t[e]^=t[e+1]);n=uS(n,2)}return t}function lS(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]^=uS(t,e))}return n}function uS(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 dS(e,t,n=1,r=40,i=-1,a=!0){if(!(Ix<=n&&n<=r&&r<=Lx)||i<-1||i>7)throw RangeError(`Invalid value`);let o,s;for(o=n;;o++){let n=sS(o,t)*8,i=iS(e,o);if(i<=n){s=i;break}if(o>=r)throw RangeError(`Data too long`)}for(let e of[kx,Ax,jx])a&&s<=sS(o,e)*8&&(t=e);let c=[];for(let t of e){Gx(t.mode[0],4,c),Gx(t.numChars,Zx(t.mode,o),c);for(let e of t.getData())c.push(e)}let l=sS(o,t)*8;Gx(0,Math.min(4,l-c.length),c),Gx(0,(8-c.length%8)%8,c);for(let e=236;c.length<l;e^=253)Gx(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 Wx(o,t,u,i)}function fS(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`?tS(e):Array.isArray(e)?[Qx(e)]:void 0;if(!c)throw Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);let l=dS(c,Mx[n],i,a,o,r),u=pS({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 pS(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=Dx.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 mS({text:e,label:t}){let{data:n,size:r}=fS(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 hS(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 gS=500;function _S({children:e,className:t}){let[n,r]=(0,Y.useState)(!1);return(0,Y.useEffect)(()=>{let e=setTimeout(()=>r(!0),gS);return()=>clearTimeout(e)},[]),(0,J.jsx)(`p`,{className:q(`text-xs text-muted-foreground`,!n&&`invisible`,t),children:e})}var vS={typescript:()=>cx(()=>import(`./typescript-Utq2Cl8c.js`),__vite__mapDeps([0,1])),tsx:()=>cx(()=>import(`./tsx-5f3ulCja.js`),__vite__mapDeps([2,3])),javascript:()=>cx(()=>import(`./javascript-Yelw-5ZN.js`),__vite__mapDeps([4,5])),jsx:()=>cx(()=>import(`./jsx-hEbJ82HF.js`),__vite__mapDeps([6,7])),json:()=>cx(()=>import(`./json-CaljABEy.js`),__vite__mapDeps([8,9])),jsonc:()=>cx(()=>import(`./jsonc-CYpm1nAK.js`),[]),json5:()=>cx(()=>import(`./json5-BR5RXkoi.js`),[]),html:()=>cx(()=>import(`./html-WQKKblVZ.js`),__vite__mapDeps([10,11,5,12])),vue:()=>cx(()=>import(`./vue-BqdMUtqy.js`),__vite__mapDeps([13,9,5,1,12,11])),svelte:()=>cx(()=>import(`./svelte-CdeT-Ich.js`),__vite__mapDeps([14,5,1,12,15])),astro:()=>cx(()=>import(`./astro-BZ97kZFP.js`),__vite__mapDeps([16,9,5,1,12,15,3])),xml:()=>cx(()=>import(`./xml-CoDIzWF0.js`),__vite__mapDeps([17,18,19])),css:()=>cx(()=>import(`./css-DUjzNfgv.js`),__vite__mapDeps([20,12])),scss:()=>cx(()=>import(`./scss-8bKmll0B.js`),__vite__mapDeps([21,12])),sass:()=>cx(()=>import(`./sass-DXrisJhu.js`),[]),less:()=>cx(()=>import(`./less-DVTAwKKz.js`),[]),markdown:()=>cx(()=>import(`./markdown-BYOwaDjH.js`),[]),mdx:()=>cx(()=>import(`./mdx-DQZ5AkYe.js`),[]),yaml:()=>cx(()=>import(`./yaml-CxbubiML.js`),__vite__mapDeps([22,23])),toml:()=>cx(()=>import(`./toml-CcmNWLt0.js`),[]),ini:()=>cx(()=>import(`./ini-B5eOa1yu.js`),[]),dotenv:()=>cx(()=>import(`./dotenv-CuH5my32.js`),[]),shellscript:()=>cx(()=>import(`./shellscript-BiGZg9Om.js`),__vite__mapDeps([24,25])),fish:()=>cx(()=>import(`./fish-BJitypiv.js`),[]),powershell:()=>cx(()=>import(`./powershell-QtSnmXcu.js`),[]),python:()=>cx(()=>import(`./python-gzcpVVnB.js`),[]),ruby:()=>cx(()=>import(`./ruby-DjBfgIB7.js`),__vite__mapDeps([26,5,12,27,28,29,1,3,7,11,30,18,19,31,25,23])),go:()=>cx(()=>import(`./go-rLFTqkRN.js`),[]),rust:()=>cx(()=>import(`./rust-DpiIf5JO.js`),[]),java:()=>cx(()=>import(`./java-DxlWrXwe.js`),__vite__mapDeps([32,19])),kotlin:()=>cx(()=>import(`./kotlin-DhhofPvG.js`),[]),swift:()=>cx(()=>import(`./swift-CyEgAFGc.js`),[]),c:()=>cx(()=>import(`./c-DWGmR78Y.js`),__vite__mapDeps([33,27])),cpp:()=>cx(()=>import(`./cpp-CJIxL8VH.js`),__vite__mapDeps([34,28,27])),csharp:()=>cx(()=>import(`./csharp-dmMxLVLW.js`),[]),php:()=>cx(()=>import(`./php-D7kNSOJl.js`),__vite__mapDeps([35,9,5,12,11,18,19,31])),lua:()=>cx(()=>import(`./lua-BJObVtAx.js`),__vite__mapDeps([36,30,27])),sql:()=>cx(()=>import(`./sql-BOsskAmu.js`),__vite__mapDeps([37,31])),graphql:()=>cx(()=>import(`./graphql-DAzSVzvB.js`),__vite__mapDeps([38,29,5,1,3,7])),prisma:()=>cx(()=>import(`./prisma-DMgNhnYS.js`),[]),proto:()=>cx(()=>import(`./proto-DB4EqR-F.js`),[]),docker:()=>cx(()=>import(`./docker-IyjqRm3v.js`),[]),make:()=>cx(()=>import(`./make-Dixweg8N.js`),[]),diff:()=>cx(()=>import(`./diff-woXpYk--.js`),[])},yS={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`},bS=2e5;function xS(e){let t=e.slice(e.lastIndexOf(`/`)+1).toLowerCase(),n=t.lastIndexOf(`.`);return yS[n===-1?t:t.slice(n+1)]}var SS,CS=new Map;function wS(){return SS??=Promise.all([cx(()=>import(`./core-Db3h5Pv3.js`),__vite__mapDeps([39,40])),cx(()=>import(`./engine-javascript-DbNy5Fxf.js`),[])]).then(([{createHighlighterCore:e},{createJavaScriptRegexEngine:t}])=>e({themes:[cx(()=>import(`./everforest-light-Df2xbC6M.js`),[]),cx(()=>import(`./everforest-dark-sB-x3p7T.js`),[])],langs:[],engine:t()})),SS}async function TS(e){let t=await wS();return CS.has(e)||CS.set(e,vS[e]().then(e=>t.loadLanguage(...e.default))),await CS.get(e),t}function ES(e,t){let n=xS(t),[r,i]=(0,Y.useState)(null);return(0,Y.useEffect)(()=>{if(!n||e.length>bS)return;let t=!0;return TS(n).then(r=>{if(!t)return;let a=r.codeToTokensWithThemes(e,{lang:n,themes:{light:`everforest-light`,dark:`everforest-dark`}});i({text:e,language:n,lines:a.map(e=>e.map(e=>({text:e.content,light:e.variants.light?.color,dark:e.variants.dark?.color})))})}).catch(()=>{}),()=>{t=!1}},[e,n]),r&&r.text===e&&r.language===n?r.lines:null}function DS({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))}var OS={};function kS(e){let{schedule:t,pages:n,loaded:r}=yx(),i=(0,Y.useContext)($_)??Q_,a=e.map(e=>e.id).join(`,`),{value:o}=id(async()=>{if(!r)return OS;let n=t?FS({...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))},OS,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 AS(e){if(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith(`/`))return;let[t,...n]=e.split(`/`).filter(Boolean);if(!(!t||!e_(t)||n.length===0))return{segment:t,rest:n}}function jS(e){let t=e.match(/(?<![\w./:@-])[a-z][a-z0-9]*\/[^\s()[\]<>"'`]+/g)??[];return[...new Set(t.map(e=>e.replace(/[.,;:!?]+$/,``)).filter(e=>AS(e)!==void 0))]}var MS={};function NS(e){let{pages:t}=yx(),n=(0,Y.useContext)($_)??Q_,r=e.map(({projectId:e,paths:t})=>`${e}\n${[...t].sort().join(`
12
12
  `)}`).join(`
13
13
 
14
- `),i=t.filter(e=>e.names!==void 0),{value:a}=ed(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=>wS(e)?.segment===i.segment);if(a.length===0)return;let o=await i.names(kS({...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},ES,6e4,[r,i.map(e=>e.package).join(`,`)],`previous`);return(e,t)=>{let r=a[`${e}\n${t}`],i=r&&wS(r.href);return r&&i?{title:r.title,open:()=>n.openPage(i.segment,i.rest,e)}:void 0}}function OS(e){return e}function kS(e,t={}){return{...e,runCommand:(n,r,i)=>V_(n,e.package,r,i,t.acts??!1),act:(t,n,r)=>V_(t,e.package,n,r,!0),runComputerCommand:(t,n,r)=>H_(e.package,t,n,r),runComputerCommandOn:(t,n,r)=>U_(e.package,t,n,r),read:(t,n,r={})=>W_(t,e.package,n,r)}}var AS=(0,Y.createContext)(null);function jS(){let e=(0,Y.useContext)(AS),t=(0,Y.useMemo)(()=>e&&!(`runCommand`in e)?kS(e):void 0,[e]);if(!e)throw Error(`useModuleHost is only available inside a module page`);return t??e}export{X_ as $,Bl as $n,Hh as $t,Ib as A,wu as An,f as Ar,Lg as At,dy as B,lu as Bn,ug as Bt,Zb as C,ed as Cn,w as Cr,Wg as Ct,zb as D,Tu as Dn,v as Dr,Pg as Dt,Vb as E,Su as En,_ as Er,jg as Et,Ob as F,yu as Fn,o as Fr,Ag as Ft,hv as G,Gl as Gn,Jh as Gt,hy as H,su as Hn,ng as Ht,Db as I,gu as In,Og as It,mv as J,Ul as Jn,jh as Jt,lv as K,eu as Kn,Gh as Kt,Ly as L,pu as Ln,bg as Lt,Fb as M,ju as Mn,a as Mr,Mg as Mt,Mb as N,_u as Nn,s as Nr,Rg as Nt,Bb as O,Ou as On,u as Or,Ng as Ot,Nb as P,vu as Pn,c as Pr,zg as Pt,cv as Q,Hl as Qn,Lh as Qt,zy as R,fu as Rn,Sg as Rt,Qb as S,$u as Sn,S as Sr,Ug as St,Rb as T,xu as Tn,y as Tr,Bg as Tt,py as U,ou as Un,Xh as Ut,my as V,cu as Vn,rg as Vt,fy as W,au as Wn,Yh as Wt,uv as X,Pl as Xn,Ih as Xt,pv as Y,Rl as Yn,Rh as Yt,fv as Z,Ll as Zn,Mh as Zt,vx as _,nd as _n,q as _r,Zg as _t,TS as a,Eh as an,Vl as ar,Y_ as at,ux as b,Vu as bn,E as br,Jg as bt,xS as c,zf as cn,Jl as cr,V_ as ct,lS as d,od as dn,jl as dr,T_ as dt,Vh as en,Kl as er,ev as et,cS as f,id as fn,Nl as fr,x_ as ft,hx as g,ld as gn,Re as gr,Qg as gt,gx as h,ad as hn,ze as hr,n_ as ht,jS as i,Fh as in,$l as ir,q_ as it,Pb as j,Au as jn,m as jr,Ig as jt,Lb as k,Eu as kn,d as kr,Fg as kt,bS as l,fd as ln,Xl as lr,z_ as lt,bx as m,sd as mn,Ml as mr,t_ as mt,OS as n,Bh as nn,Zl as nr,Q_ as nt,DS as o,Lf as on,zl as or,J_ as ot,yx as p,cd as pn,Al as pr,r_ as pt,dv as q,ql as qn,Wh as qt,kS as r,zh as rn,Ql as rr,$_ as rt,CS as s,Rf as sn,Il as sr,G_ as st,AS as t,Nh as tn,Fl as tr,Z_ as tt,dS as u,ud as un,Yl as ur,D_ as ut,mx as v,rd as vn,k as vr,Kg as vt,Hb as w,Cu as wn,x as wr,Vg as wt,px as x,Uu as xn,T as xr,Yg as xt,fx as y,Xu as yn,O as yr,qg as yt,Ry as z,uu as zn,dg as zt};
14
+ `),i=t.filter(e=>e.names!==void 0),{value:a}=id(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=>AS(e)?.segment===i.segment);if(a.length===0)return;let o=await i.names(FS({...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},MS,6e4,[r,i.map(e=>e.package).join(`,`)],`previous`);return(e,t)=>{let r=a[`${e}\n${t}`],i=r&&AS(r.href);return r&&i?{title:r.title,open:()=>n.openPage(i.segment,i.rest,e)}:void 0}}function PS(e){return e}function FS(e,t={}){return{...e,runCommand:(n,r,i)=>q_(n,e.package,r,i,t.acts??!1),act:(t,n,r)=>q_(t,e.package,n,r,!0),runComputerCommand:(t,n,r)=>J_(e.package,t,n,r),runComputerCommandOn:(t,n,r)=>Y_(e.package,t,n,r),read:(t,n,r={})=>X_(t,e.package,n,r)}}var IS=(0,Y.createContext)(null);function LS(){let e=(0,Y.useContext)(IS),t=(0,Y.useMemo)(()=>e&&!(`runCommand`in e)?FS(e):void 0,[e]);if(!e)throw Error(`useModuleHost is only available inside a module page`);return t??e}export{nv as $,Pl as $n,Jh as $t,Hb as A,Au as An,y as Ar,Ug as At,_y as B,mu as Bn,o as Br,gg as Bt,rx as C,rd as Cn,k as Cr,Xg as Ct,Gb as D,Eu as Dn,S as Dr,Bg as Dt,qb as E,Tu as En,T as Er,Lg as Et,Pb as F,Su as Fn,f as Fr,Ig as Ft,xv as G,lu as Gn,eg as Gt,xy as H,fu as Hn,cg as Ht,Nb as I,Cu as In,m as Ir,Pg as It,bv as J,ru as Jn,Lh as Jt,hv as K,Gl as Kn,Zh as Kt,Uy as L,bu as Ln,a as Lr,Eg as Lt,Vb as M,Pu as Mn,v as Mr,Rg as Mt,Rb as N,Fu as Nn,u as Nr,Wg as Nt,Kb as O,ku as On,w as Or,zg as Ot,zb as P,xu as Pn,d as Pr,Gg as Pt,mv as Q,Rl as Qn,Uh as Qt,Gy as R,_u as Rn,s as Rr,Og as Rt,ix as S,qu as Sn,q as Sr,Yg as St,Wb as T,Du as Tn,E as Tr,Kg as Tt,yy as U,du as Un,ng as Ut,by as V,pu as Vn,lg as Vt,vy as W,uu as Wn,tg as Wt,gv as X,ql as Xn,Hh as Xt,yv as Y,eu as Yn,Wh as Yt,vv as Z,Ul as Zn,Rh as Zt,wx as _,hd as _n,Nl as _r,r_ as _t,jS as a,Mh as an,Zl as ar,tv as at,gx as b,ed as bn,ze as br,e_ as bt,DS as c,Gf as cn,iu as cr,q_ as ct,hS as d,fd as dn,zl as dr,j_ as dt,qh as en,Ll as er,ov as et,mS as f,ud as fn,Il as fr,D_ as ft,xx as g,cd as gn,jl as gr,i_ as gt,Sx as h,dd as hn,Yl as hr,c_ as ht,LS as i,Vh as in,Fl as ir,$_ as it,Bb as j,Ou as jn,_ as jr,Hg as jt,Ub as k,Mu as kn,x as kr,Vg as kt,ES as l,vd as ln,$l as lr,G_ as lt,Ex as m,pd as mn,Xl as mr,s_ as mt,PS as n,Kh as nn,Bl as nr,iv as nt,NS as o,Uf as on,nu as or,ev as ot,Tx as p,md as pn,Jl as pr,l_ as pt,_v as q,tu as qn,Xh as qt,FS as r,Gh as rn,Kl as rr,av as rt,kS as s,Wf as sn,Ql as sr,Z_ as st,IS as t,zh as tn,Hl as tr,rv as tt,_S as u,gd as un,Vl as ur,N_ as ut,bx as v,od as vn,Al as vr,Qg as vt,Jb as w,id as wn,O as wr,qg as wt,yx as x,Gu as xn,Re as xr,t_ as xt,vx as y,ld as yn,Ml as yr,$g as yt,Wy as z,gu as zn,c as zr,_g as zt};