import{r as s,j as i,e as Yo,K as Ot,$ as Ye,R as fe,S as Xo,L as Zo}from"./login-aN2dRsX6.js";import{r as _r,R as qo}from"./index-Ci65TyJp.js";import{X as Qo}from"./x-CZwmhdFm.js";import{c as Jo,o as ea,s as ta,f as ra,b as na,h as oa,l as aa,d as ir,a as sa}from"./floating-ui.dom-C5vApqfE.js";import{c as ve}from"./createLucideIcon-C44k9nIN.js";import"./app-gmlkJjeD.js";function Fe({className:e}){const t=s.useId();return i.jsxs("svg",{className:e,fill:"none",children:[i.jsx("defs",{children:i.jsx("pattern",{id:t,x:"0",y:"0",width:"10",height:"10",patternUnits:"userSpaceOnUse",children:i.jsx("path",{d:"M-3 13 15-5M-5 5l18-18M-1 21 17 3"})})}),i.jsx("rect",{stroke:"none",fill:`url(#${t})`,width:"100%",height:"100%"})]})}function cr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Je(...e){return t=>{let r=!1;const n=e.map(o=>{const a=cr(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():cr(e[o],null)}}}}function G(...e){return s.useCallback(Je(...e),e)}var se=s.forwardRef((e,t)=>{const{children:r,...n}=e,o=s.Children.toArray(r),a=o.find(ia);if(a){const c=a.props.children,l=o.map(u=>u===a?s.Children.count(c)>1?s.Children.only(null):s.isValidElement(c)?c.props.children:null:u);return i.jsx(Rt,{...n,ref:t,children:s.isValidElement(c)?s.cloneElement(c,void 0,l):null})}return i.jsx(Rt,{...n,ref:t,children:r})});se.displayName="Slot";var Rt=s.forwardRef((e,t)=>{const{children:r,...n}=e;if(s.isValidElement(r)){const o=la(r),a=ca(n,r.props);return r.type!==s.Fragment&&(a.ref=t?Je(t,o):o),s.cloneElement(r,a)}return s.Children.count(r)>1?s.Children.only(null):null});Rt.displayName="SlotClone";var Ir=({children:e})=>i.jsx(i.Fragment,{children:e});function ia(e){return s.isValidElement(e)&&e.type===Ir}function ca(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...l)=>{a(...l),o(...l)}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function la(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function jr(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=jr(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Tr(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=jr(e))&&(n&&(n+=" "),n+=t);return n}const lr=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ur=Tr,kr=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return ur(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,c=Object.keys(o).map(d=>{const f=r==null?void 0:r[d],p=a==null?void 0:a[d];if(f===null)return null;const h=lr(f)||lr(p);return o[d][h]}),l=r&&Object.entries(r).reduce((d,f)=>{let[p,h]=f;return h===void 0||(d[p]=h),d},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,f)=>{let{class:p,className:h,...v}=f;return Object.entries(v).every(g=>{let[m,x]=g;return Array.isArray(x)?x.includes({...a,...l}[m]):{...a,...l}[m]===x})?[...d,p,h]:d},[]);return ur(e,c,u,r==null?void 0:r.class,r==null?void 0:r.className)};/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ua=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],da=ve("BookOpen",ua);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const fa=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],pa=ve("ChevronsUpDown",fa);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ma=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],ha=ve("Folder",ma);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ga=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],va=ve("LayoutGrid",ga);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ba=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],xa=ve("LogOut",ba);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wa=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],ya=ve("PanelLeft",wa);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ca=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ea=ve("Settings",Ca),ht=768;function Dr(){const[e,t]=s.useState();return s.useEffect(()=>{const r=window.matchMedia(`(max-width: ${ht-1}px)`),n=()=>{t(window.innerWidth<ht)};return r.addEventListener("change",n),t(window.innerWidth<ht),()=>r.removeEventListener("change",n)},[]),!!e}const Lt="-",Sa=e=>{const t=Ra(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:c=>{const l=c.split(Lt);return l[0]===""&&l.length!==1&&l.shift(),Or(l,t)||Ma(c)},getConflictingClassGroupIds:(c,l)=>{const u=r[c]||[];return l&&n[c]?[...u,...n[c]]:u}}},Or=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?Or(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Lt);return(c=t.validators.find(({validator:l})=>l(a)))==null?void 0:c.classGroupId},dr=/^\[(.+)\]$/,Ma=e=>{if(dr.test(e)){const t=dr.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Ra=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const o in r)Pt(r[o],n,o,t);return n},Pt=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:fr(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(Pa(o)){Pt(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,c])=>{Pt(c,fr(t,a),r,n)})})},fr=(e,t)=>{let r=e;return t.split(Lt).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Pa=e=>e.isThemeGetter,Na=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(a,c)=>{r.set(a,c),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let c=r.get(a);if(c!==void 0)return c;if((c=n.get(a))!==void 0)return o(a,c),c},set(a,c){r.has(a)?r.set(a,c):o(a,c)}}},Nt="!",At=":",Aa=At.length,_a=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const a=[];let c=0,l=0,u=0,d;for(let g=0;g<o.length;g++){let m=o[g];if(c===0&&l===0){if(m===At){a.push(o.slice(u,g)),u=g+Aa;continue}if(m==="/"){d=g;continue}}m==="["?c++:m==="]"?c--:m==="("?l++:m===")"&&l--}const f=a.length===0?o:o.substring(u),p=Ia(f),h=p!==f,v=d&&d>u?d-u:void 0;return{modifiers:a,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:v}};if(t){const o=t+At,a=n;n=c=>c.startsWith(o)?a(c.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:c,maybePostfixModifierPosition:void 0}}if(r){const o=n;n=a=>r({className:a,parseClassName:o})}return n},Ia=e=>e.endsWith(Nt)?e.substring(0,e.length-1):e.startsWith(Nt)?e.substring(1):e,ja=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const o=[];let a=[];return n.forEach(c=>{c[0]==="["||t[c]?(o.push(...a.sort(),c),a=[]):a.push(c)}),o.push(...a.sort()),o}},Ta=e=>({cache:Na(e.cacheSize),parseClassName:_a(e),sortModifiers:ja(e),...Sa(e)}),ka=/\s+/,Da=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=t,c=[],l=e.trim().split(ka);let u="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:p,modifiers:h,hasImportantModifier:v,baseClassName:g,maybePostfixModifierPosition:m}=r(f);if(p){u=f+(u.length>0?" "+u:u);continue}let x=!!m,b=n(x?g.substring(0,m):g);if(!b){if(!x){u=f+(u.length>0?" "+u:u);continue}if(b=n(g),!b){u=f+(u.length>0?" "+u:u);continue}x=!1}const y=a(h).join(":"),P=v?y+Nt:y,M=P+b;if(c.includes(M))continue;c.push(M);const N=o(b,x);for(let w=0;w<N.length;++w){const R=N[w];c.push(P+R)}u=f+(u.length>0?" "+u:u)}return u};function Oa(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Lr(t))&&(n&&(n+=" "),n+=r);return n}const Lr=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Lr(e[n]))&&(r&&(r+=" "),r+=t);return r};function La(e,...t){let r,n,o,a=c;function c(u){const d=t.reduce((f,p)=>p(f),e());return r=Ta(d),n=r.cache.get,o=r.cache.set,a=l,l(u)}function l(u){const d=n(u);if(d)return d;const f=Da(u,r);return o(u,f),f}return function(){return a(Oa.apply(null,arguments))}}const V=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Fr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$r=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Fa=/^\d+\/\d+$/,$a=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,za=/\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$/,Ga=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ba=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Va=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,we=e=>Fa.test(e),T=e=>!!e&&!Number.isNaN(Number(e)),pe=e=>!!e&&Number.isInteger(Number(e)),pr=e=>e.endsWith("%")&&T(e.slice(0,-1)),le=e=>$a.test(e),Wa=()=>!0,Ua=e=>za.test(e)&&!Ga.test(e),Ft=()=>!1,Ka=e=>Ba.test(e),Ha=e=>Va.test(e),Ya=e=>!C(e)&&!E(e),Xa=e=>Re(e,Br,Ft),C=e=>Fr.test(e),me=e=>Re(e,Vr,Ua),gt=e=>Re(e,ss,T),Za=e=>Re(e,zr,Ft),qa=e=>Re(e,Gr,Ha),Qa=e=>Re(e,Ft,Ka),E=e=>$r.test(e),$e=e=>Pe(e,Vr),Ja=e=>Pe(e,is),es=e=>Pe(e,zr),ts=e=>Pe(e,Br),rs=e=>Pe(e,Gr),ns=e=>Pe(e,cs,!0),Re=(e,t,r)=>{const n=Fr.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Pe=(e,t,r=!1)=>{const n=$r.exec(e);return n?n[1]?t(n[1]):r:!1},zr=e=>e==="position",os=new Set(["image","url"]),Gr=e=>os.has(e),as=new Set(["length","size","percentage"]),Br=e=>as.has(e),Vr=e=>e==="length",ss=e=>e==="number",is=e=>e==="family-name",cs=e=>e==="shadow",ls=()=>{const e=V("color"),t=V("font"),r=V("text"),n=V("font-weight"),o=V("tracking"),a=V("leading"),c=V("breakpoint"),l=V("container"),u=V("spacing"),d=V("radius"),f=V("shadow"),p=V("inset-shadow"),h=V("drop-shadow"),v=V("blur"),g=V("perspective"),m=V("aspect"),x=V("ease"),b=V("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],w=()=>[E,C,u],R=()=>[we,"full","auto",...w()],j=()=>[pe,"none","subgrid",E,C],z=()=>["auto",{span:["full",pe,E,C]},E,C],L=()=>[pe,"auto",E,C],U=()=>["auto","min","max","fr",E,C],H=()=>["start","end","center","between","around","evenly","stretch","baseline"],F=()=>["start","end","center","stretch"],$=()=>["auto",...w()],W=()=>[we,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],A=()=>[e,E,C],X=()=>[pr,me],_=()=>["","none","full",d,E,C],S=()=>["",T,$e,me],D=()=>["solid","dashed","dotted","double"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["","none",v,E,C],ce=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",E,C],re=()=>["none",T,E,C],ae=()=>["none",T,E,C],ee=()=>[T,E,C],Y=()=>[we,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[le],breakpoint:[le],color:[Wa],container:[le],"drop-shadow":[le],ease:["in","out","in-out"],font:[Ya],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[le],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[le],shadow:[le],spacing:["px",T],text:[le],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",we,C,E,m]}],container:["container"],columns:[{columns:[T,C,E,l]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...P(),C,E]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{start:R()}],end:[{end:R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[pe,"auto",E,C]}],basis:[{basis:[we,"full","auto",l,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[T,we,"auto","initial","none",C]}],grow:[{grow:["",T,E,C]}],shrink:[{shrink:["",T,E,C]}],order:[{order:[pe,"first","last","none",E,C]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...F(),"baseline"]}],"align-self":[{self:["auto",...F(),"baseline"]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[l,"screen",...W()]}],"min-w":[{"min-w":[l,"screen","none",...W()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[c]},...W()]}],h:[{h:["screen",...W()]}],"min-h":[{"min-h":["screen","none",...W()]}],"max-h":[{"max-h":["screen",...W()]}],"font-size":[{text:["base",r,$e,me]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,E,gt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pr,C]}],"font-family":[{font:[Ja,C,t]}],"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:[o,E,C]}],"line-clamp":[{"line-clamp":[T,"none",E,gt]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":["none",E,C]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",E,C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:[T,"from-font","auto",E,me]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[T,"auto",E,C]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",E,C]}],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",E,C]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...P(),es,Za]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",ts,Xa]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pe,E,C],radial:["",E,C],conic:[pe,E,C]},rs,qa]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:_()}],"rounded-s":[{"rounded-s":_()}],"rounded-e":[{"rounded-e":_()}],"rounded-t":[{"rounded-t":_()}],"rounded-r":[{"rounded-r":_()}],"rounded-b":[{"rounded-b":_()}],"rounded-l":[{"rounded-l":_()}],"rounded-ss":[{"rounded-ss":_()}],"rounded-se":[{"rounded-se":_()}],"rounded-ee":[{"rounded-ee":_()}],"rounded-es":[{"rounded-es":_()}],"rounded-tl":[{"rounded-tl":_()}],"rounded-tr":[{"rounded-tr":_()}],"rounded-br":[{"rounded-br":_()}],"rounded-bl":[{"rounded-bl":_()}],"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()}],"divide-x":[{"divide-x":S()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":S()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...D(),"hidden","none"]}],"divide-style":[{divide:[...D(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...D(),"none","hidden"]}],"outline-offset":[{"outline-offset":[T,E,C]}],"outline-w":[{outline:["",T,$e,me]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",f,ns,Qa]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",E,C,p]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:S()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[T,me]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":S()}],"inset-ring-color":[{"inset-ring":A()}],opacity:[{opacity:[T,E,C]}],"mix-blend":[{"mix-blend":[...B(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none",E,C]}],blur:[{blur:Z()}],brightness:[{brightness:[T,E,C]}],contrast:[{contrast:[T,E,C]}],"drop-shadow":[{"drop-shadow":["","none",h,E,C]}],grayscale:[{grayscale:["",T,E,C]}],"hue-rotate":[{"hue-rotate":[T,E,C]}],invert:[{invert:["",T,E,C]}],saturate:[{saturate:[T,E,C]}],sepia:[{sepia:["",T,E,C]}],"backdrop-filter":[{"backdrop-filter":["","none",E,C]}],"backdrop-blur":[{"backdrop-blur":Z()}],"backdrop-brightness":[{"backdrop-brightness":[T,E,C]}],"backdrop-contrast":[{"backdrop-contrast":[T,E,C]}],"backdrop-grayscale":[{"backdrop-grayscale":["",T,E,C]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[T,E,C]}],"backdrop-invert":[{"backdrop-invert":["",T,E,C]}],"backdrop-opacity":[{"backdrop-opacity":[T,E,C]}],"backdrop-saturate":[{"backdrop-saturate":[T,E,C]}],"backdrop-sepia":[{"backdrop-sepia":["",T,E,C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",E,C]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[T,"initial",E,C]}],ease:[{ease:["linear","initial",x,E,C]}],delay:[{delay:[T,E,C]}],animate:[{animate:["none",b,E,C]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,E,C]}],"perspective-origin":[{"perspective-origin":ce()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:ae()}],"scale-x":[{"scale-x":ae()}],"scale-y":[{"scale-y":ae()}],"scale-z":[{"scale-z":ae()}],"scale-3d":["scale-3d"],skew:[{skew:ee()}],"skew-x":[{"skew-x":ee()}],"skew-y":[{"skew-y":ee()}],transform:[{transform:[E,C,"","none","gpu","cpu"]}],"transform-origin":[{origin:ce()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Y()}],"translate-x":[{"translate-x":Y()}],"translate-y":[{"translate-y":Y()}],"translate-z":[{"translate-z":Y()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",E,C]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",E,C]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[T,$e,me,gt]}],stroke:[{stroke:["none",...A()]}],"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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-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"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},us=La(ls);function k(...e){return us(Tr(e))}const ds=kr("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",outline:"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function fs({className:e,variant:t,size:r,asChild:n=!1,...o}){const a=n?se:"button";return i.jsx(a,{"data-slot":"button",className:k(ds({variant:t,size:r,className:e})),...o})}var ps=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],O=ps.reduce((e,t)=>{const r=s.forwardRef((n,o)=>{const{asChild:a,...c}=n,l=a?se:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(l,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Wr(e,t){e&&_r.flushSync(()=>e.dispatchEvent(t))}function I(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ms(e,t){const r=s.createContext(t),n=a=>{const{children:c,...l}=a,u=s.useMemo(()=>l,Object.values(l));return i.jsx(r.Provider,{value:u,children:c})};n.displayName=e+"Provider";function o(a){const c=s.useContext(r);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function de(e,t=[]){let r=[];function n(a,c){const l=s.createContext(c),u=r.length;r=[...r,c];const d=p=>{var b;const{scope:h,children:v,...g}=p,m=((b=h==null?void 0:h[e])==null?void 0:b[u])||l,x=s.useMemo(()=>g,Object.values(g));return i.jsx(m.Provider,{value:x,children:v})};d.displayName=a+"Provider";function f(p,h){var m;const v=((m=h==null?void 0:h[e])==null?void 0:m[u])||l,g=s.useContext(v);if(g)return g;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=r.map(c=>s.createContext(c));return function(l){const u=(l==null?void 0:l[e])||a;return s.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[n,hs(o,...t)]}function hs(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const c=n.reduce((l,{useScope:u,scopeName:d})=>{const p=u(a)[`__scope${d}`];return{...l,...p}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return r.scopeName=t.scopeName,r}var ie=globalThis!=null&&globalThis.document?s.useLayoutEffect:()=>{},gs=Yo.useId||(()=>{}),vs=0;function he(e){const[t,r]=s.useState(gs());return ie(()=>{r(n=>n??String(vs++))},[e]),e||(t?`radix-${t}`:"")}function J(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function et({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=bs({defaultProp:t,onChange:r}),a=e!==void 0,c=a?e:n,l=J(r),u=s.useCallback(d=>{if(a){const p=typeof d=="function"?d(e):d;p!==e&&l(p)}else o(d)},[a,e,o,l]);return[c,u]}function bs({defaultProp:e,onChange:t}){const r=s.useState(e),[n]=r,o=s.useRef(n),a=J(t);return s.useEffect(()=>{o.current!==n&&(a(n),o.current=n)},[n,o,a]),r}function xs(e,t=globalThis==null?void 0:globalThis.document){const r=J(e);s.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var ws="DismissableLayer",_t="dismissableLayer.update",ys="dismissableLayer.pointerDownOutside",Cs="dismissableLayer.focusOutside",mr,Ur=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),tt=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:c,onDismiss:l,...u}=e,d=s.useContext(Ur),[f,p]=s.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=s.useState({}),g=G(t,R=>p(R)),m=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(x),y=f?m.indexOf(f):-1,P=d.layersWithOutsidePointerEventsDisabled.size>0,M=y>=b,N=Ms(R=>{const j=R.target,z=[...d.branches].some(L=>L.contains(j));!M||z||(o==null||o(R),c==null||c(R),R.defaultPrevented||l==null||l())},h),w=Rs(R=>{const j=R.target;[...d.branches].some(L=>L.contains(j))||(a==null||a(R),c==null||c(R),R.defaultPrevented||l==null||l())},h);return xs(R=>{y===d.layers.size-1&&(n==null||n(R),!R.defaultPrevented&&l&&(R.preventDefault(),l()))},h),s.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(mr=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),hr(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=mr)}},[f,h,r,d]),s.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),hr())},[f,d]),s.useEffect(()=>{const R=()=>v({});return document.addEventListener(_t,R),()=>document.removeEventListener(_t,R)},[]),i.jsx(O.div,{...u,ref:g,style:{pointerEvents:P?M?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,w.onFocusCapture),onBlurCapture:I(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,N.onPointerDownCapture)})});tt.displayName=ws;var Es="DismissableLayerBranch",Ss=s.forwardRef((e,t)=>{const r=s.useContext(Ur),n=s.useRef(null),o=G(t,n);return s.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),i.jsx(O.div,{...e,ref:o})});Ss.displayName=Es;function Ms(e,t=globalThis==null?void 0:globalThis.document){const r=J(e),n=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let u=function(){Kr(ys,r,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);n.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Rs(e,t=globalThis==null?void 0:globalThis.document){const r=J(e),n=s.useRef(!1);return s.useEffect(()=>{const o=a=>{a.target&&!n.current&&Kr(Cs,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function hr(){const e=new CustomEvent(_t);document.dispatchEvent(e)}function Kr(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Wr(o,a):o.dispatchEvent(a)}var vt="focusScope.autoFocusOnMount",bt="focusScope.autoFocusOnUnmount",gr={bubbles:!1,cancelable:!0},Ps="FocusScope",$t=s.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...c}=e,[l,u]=s.useState(null),d=J(o),f=J(a),p=s.useRef(null),h=G(t,m=>u(m)),v=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(n){let m=function(P){if(v.paused||!l)return;const M=P.target;l.contains(M)?p.current=M:ue(p.current,{select:!0})},x=function(P){if(v.paused||!l)return;const M=P.relatedTarget;M!==null&&(l.contains(M)||ue(p.current,{select:!0}))},b=function(P){if(document.activeElement===document.body)for(const N of P)N.removedNodes.length>0&&ue(l)};document.addEventListener("focusin",m),document.addEventListener("focusout",x);const y=new MutationObserver(b);return l&&y.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",x),y.disconnect()}}},[n,l,v.paused]),s.useEffect(()=>{if(l){br.add(v);const m=document.activeElement;if(!l.contains(m)){const b=new CustomEvent(vt,gr);l.addEventListener(vt,d),l.dispatchEvent(b),b.defaultPrevented||(Ns(Ts(Hr(l)),{select:!0}),document.activeElement===m&&ue(l))}return()=>{l.removeEventListener(vt,d),setTimeout(()=>{const b=new CustomEvent(bt,gr);l.addEventListener(bt,f),l.dispatchEvent(b),b.defaultPrevented||ue(m??document.body,{select:!0}),l.removeEventListener(bt,f),br.remove(v)},0)}}},[l,d,f,v]);const g=s.useCallback(m=>{if(!r&&!n||v.paused)return;const x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,b=document.activeElement;if(x&&b){const y=m.currentTarget,[P,M]=As(y);P&&M?!m.shiftKey&&b===M?(m.preventDefault(),r&&ue(P,{select:!0})):m.shiftKey&&b===P&&(m.preventDefault(),r&&ue(M,{select:!0})):b===y&&m.preventDefault()}},[r,n,v.paused]);return i.jsx(O.div,{tabIndex:-1,...c,ref:h,onKeyDown:g})});$t.displayName=Ps;function Ns(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(ue(n,{select:t}),document.activeElement!==r)return}function As(e){const t=Hr(e),r=vr(t,e),n=vr(t.reverse(),e);return[r,n]}function Hr(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function vr(e,t){for(const r of e)if(!_s(r,{upTo:t}))return r}function _s(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Is(e){return e instanceof HTMLInputElement&&"select"in e}function ue(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Is(e)&&t&&e.select()}}var br=js();function js(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=xr(e,t),e.unshift(t)},remove(t){var r;e=xr(e,t),(r=e[0])==null||r.resume()}}}function xr(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Ts(e){return e.filter(t=>t.tagName!=="A")}var ks="Portal",rt=s.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[o,a]=s.useState(!1);ie(()=>a(!0),[]);const c=r||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return c?qo.createPortal(i.jsx(O.div,{...n,ref:t}),c):null});rt.displayName=ks;function Ds(e,t){return s.useReducer((r,n)=>t[r][n]??r,e)}var oe=e=>{const{present:t,children:r}=e,n=Os(t),o=typeof r=="function"?r({present:n.isPresent}):s.Children.only(r),a=G(n.ref,Ls(o));return typeof r=="function"||n.isPresent?s.cloneElement(o,{ref:a}):null};oe.displayName="Presence";function Os(e){const[t,r]=s.useState(),n=s.useRef({}),o=s.useRef(e),a=s.useRef("none"),c=e?"mounted":"unmounted",[l,u]=Ds(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const d=ze(n.current);a.current=l==="mounted"?d:"none"},[l]),ie(()=>{const d=n.current,f=o.current;if(f!==e){const h=a.current,v=ze(d);e?u("MOUNT"):v==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&h!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),ie(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,p=v=>{const m=ze(n.current).includes(v.animationName);if(v.target===t&&m&&(u("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},h=v=>{v.target===t&&(a.current=ze(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:s.useCallback(d=>{d&&(n.current=getComputedStyle(d)),r(d)},[])}}function ze(e){return(e==null?void 0:e.animationName)||"none"}function Ls(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var xt=0;function Yr(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??wr()),document.body.insertAdjacentElement("beforeend",e[1]??wr()),xt++,()=>{xt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),xt--}},[])}function wr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ne=function(){return ne=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},ne.apply(this,arguments)};function Xr(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Fs(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Ue="right-scroll-bar-position",Ke="width-before-scroll-bar",$s="with-scroll-bars-hidden",zs="--removed-body-scroll-bar-size";function wt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Gs(e,t){var r=s.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Bs=typeof window<"u"?s.useLayoutEffect:s.useEffect,yr=new WeakMap;function Vs(e,t){var r=Gs(null,function(n){return e.forEach(function(o){return wt(o,n)})});return Bs(function(){var n=yr.get(r);if(n){var o=new Set(n),a=new Set(e),c=r.current;o.forEach(function(l){a.has(l)||wt(l,null)}),a.forEach(function(l){o.has(l)||wt(l,c)})}yr.set(r,e)},[e]),r}function Ws(e){return e}function Us(e,t){t===void 0&&(t=Ws);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var c=t(a,n);return r.push(c),function(){r=r.filter(function(l){return l!==c})}},assignSyncMedium:function(a){for(n=!0;r.length;){var c=r;r=[],c.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var c=[];if(r.length){var l=r;r=[],l.forEach(a),c=r}var u=function(){var f=c;c=[],f.forEach(a)},d=function(){return Promise.resolve().then(u)};d(),r={push:function(f){c.push(f),d()},filter:function(f){return c=c.filter(f),r}}}};return o}function Ks(e){e===void 0&&(e={});var t=Us(null);return t.options=ne({async:!0,ssr:!1},e),t}var Zr=function(e){var t=e.sideCar,r=Xr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return s.createElement(n,ne({},r))};Zr.isSideCarExport=!0;function Hs(e,t){return e.useMedium(t),Zr}var qr=Ks(),yt=function(){},nt=s.forwardRef(function(e,t){var r=s.useRef(null),n=s.useState({onScrollCapture:yt,onWheelCapture:yt,onTouchMoveCapture:yt}),o=n[0],a=n[1],c=e.forwardProps,l=e.children,u=e.className,d=e.removeScrollBar,f=e.enabled,p=e.shards,h=e.sideCar,v=e.noIsolation,g=e.inert,m=e.allowPinchZoom,x=e.as,b=x===void 0?"div":x,y=e.gapMode,P=Xr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=h,N=Vs([r,t]),w=ne(ne({},P),o);return s.createElement(s.Fragment,null,f&&s.createElement(M,{sideCar:qr,removeScrollBar:d,shards:p,noIsolation:v,inert:g,setCallbacks:a,allowPinchZoom:!!m,lockRef:r,gapMode:y}),c?s.cloneElement(s.Children.only(l),ne(ne({},w),{ref:N})):s.createElement(b,ne({},w,{className:u,ref:N}),l))});nt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};nt.classNames={fullWidth:Ke,zeroRight:Ue};var Ys=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Xs(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ys();return t&&e.setAttribute("nonce",t),e}function Zs(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function qs(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Qs=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Xs())&&(Zs(t,r),qs(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Js=function(){var e=Qs();return function(t,r){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Qr=function(){var e=Js(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},ei={left:0,top:0,right:0,gap:0},Ct=function(e){return parseInt(e||"",10)||0},ti=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ct(r),Ct(n),Ct(o)]},ri=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ei;var t=ti(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},ni=Qr(),Se="data-scroll-locked",oi=function(e,t,r,n){var o=e.left,a=e.top,c=e.right,l=e.gap;return r===void 0&&(r="margin"),`
  .`.concat($s,` {
   overflow: hidden `).concat(n,`;
   padding-right: `).concat(l,"px ").concat(n,`;
  }
  body[`).concat(Se,`] {
    overflow: hidden `).concat(n,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
    padding-left: `.concat(o,`px;
    padding-top: `).concat(a,`px;
    padding-right: `).concat(c,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(l,"px ").concat(n,`;
    `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(Ue,` {
    right: `).concat(l,"px ").concat(n,`;
  }
  
  .`).concat(Ke,` {
    margin-right: `).concat(l,"px ").concat(n,`;
  }
  
  .`).concat(Ue," .").concat(Ue,` {
    right: 0 `).concat(n,`;
  }
  
  .`).concat(Ke," .").concat(Ke,` {
    margin-right: 0 `).concat(n,`;
  }
  
  body[`).concat(Se,`] {
    `).concat(zs,": ").concat(l,`px;
  }
`)},Cr=function(){var e=parseInt(document.body.getAttribute(Se)||"0",10);return isFinite(e)?e:0},ai=function(){s.useEffect(function(){return document.body.setAttribute(Se,(Cr()+1).toString()),function(){var e=Cr()-1;e<=0?document.body.removeAttribute(Se):document.body.setAttribute(Se,e.toString())}},[])},si=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;ai();var a=s.useMemo(function(){return ri(o)},[o]);return s.createElement(ni,{styles:oi(a,!t,o,r?"":"!important")})},It=!1;if(typeof window<"u")try{var Ge=Object.defineProperty({},"passive",{get:function(){return It=!0,!0}});window.addEventListener("test",Ge,Ge),window.removeEventListener("test",Ge,Ge)}catch{It=!1}var ye=It?{passive:!1}:!1,ii=function(e){return e.tagName==="TEXTAREA"},Jr=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!ii(e)&&r[t]==="visible")},ci=function(e){return Jr(e,"overflowY")},li=function(e){return Jr(e,"overflowX")},Er=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=en(e,n);if(o){var a=tn(e,n),c=a[1],l=a[2];if(c>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},ui=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},di=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},en=function(e,t){return e==="v"?ci(t):li(t)},tn=function(e,t){return e==="v"?ui(t):di(t)},fi=function(e,t){return e==="h"&&t==="rtl"?-1:1},pi=function(e,t,r,n,o){var a=fi(e,window.getComputedStyle(t).direction),c=a*n,l=r.target,u=t.contains(l),d=!1,f=c>0,p=0,h=0;do{var v=tn(e,l),g=v[0],m=v[1],x=v[2],b=m-x-a*g;(g||b)&&en(e,l)&&(p+=b,h+=g),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(f&&Math.abs(p)<1||!f&&Math.abs(h)<1)&&(d=!0),d},Be=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Sr=function(e){return[e.deltaX,e.deltaY]},Mr=function(e){return e&&"current"in e?e.current:e},mi=function(e,t){return e[0]===t[0]&&e[1]===t[1]},hi=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},gi=0,Ce=[];function vi(e){var t=s.useRef([]),r=s.useRef([0,0]),n=s.useRef(),o=s.useState(gi++)[0],a=s.useState(Qr)[0],c=s.useRef(e);s.useEffect(function(){c.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Fs([e.lockRef.current],(e.shards||[]).map(Mr),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=s.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!c.current.allowPinchZoom;var b=Be(m),y=r.current,P="deltaX"in m?m.deltaX:y[0]-b[0],M="deltaY"in m?m.deltaY:y[1]-b[1],N,w=m.target,R=Math.abs(P)>Math.abs(M)?"h":"v";if("touches"in m&&R==="h"&&w.type==="range")return!1;var j=Er(R,w);if(!j)return!0;if(j?N=R:(N=R==="v"?"h":"v",j=Er(R,w)),!j)return!1;if(!n.current&&"changedTouches"in m&&(P||M)&&(n.current=N),!N)return!0;var z=n.current||N;return pi(z,x,m,z==="h"?P:M)},[]),u=s.useCallback(function(m){var x=m;if(!(!Ce.length||Ce[Ce.length-1]!==a)){var b="deltaY"in x?Sr(x):Be(x),y=t.current.filter(function(N){return N.name===x.type&&(N.target===x.target||x.target===N.shadowParent)&&mi(N.delta,b)})[0];if(y&&y.should){x.cancelable&&x.preventDefault();return}if(!y){var P=(c.current.shards||[]).map(Mr).filter(Boolean).filter(function(N){return N.contains(x.target)}),M=P.length>0?l(x,P[0]):!c.current.noIsolation;M&&x.cancelable&&x.preventDefault()}}},[]),d=s.useCallback(function(m,x,b,y){var P={name:m,delta:x,target:b,should:y,shadowParent:bi(b)};t.current.push(P),setTimeout(function(){t.current=t.current.filter(function(M){return M!==P})},1)},[]),f=s.useCallback(function(m){r.current=Be(m),n.current=void 0},[]),p=s.useCallback(function(m){d(m.type,Sr(m),m.target,l(m,e.lockRef.current))},[]),h=s.useCallback(function(m){d(m.type,Be(m),m.target,l(m,e.lockRef.current))},[]);s.useEffect(function(){return Ce.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",u,ye),document.addEventListener("touchmove",u,ye),document.addEventListener("touchstart",f,ye),function(){Ce=Ce.filter(function(m){return m!==a}),document.removeEventListener("wheel",u,ye),document.removeEventListener("touchmove",u,ye),document.removeEventListener("touchstart",f,ye)}},[]);var v=e.removeScrollBar,g=e.inert;return s.createElement(s.Fragment,null,g?s.createElement(a,{styles:hi(o)}):null,v?s.createElement(si,{gapMode:e.gapMode}):null)}function bi(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const xi=Hs(qr,vi);var zt=s.forwardRef(function(e,t){return s.createElement(nt,ne({},e,{ref:t,sideCar:xi}))});zt.classNames=nt.classNames;var wi=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ee=new WeakMap,Ve=new WeakMap,We={},Et=0,rn=function(e){return e&&(e.host||rn(e.parentNode))},yi=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=rn(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Ci=function(e,t,r,n){var o=yi(t,Array.isArray(e)?e:[e]);We[r]||(We[r]=new WeakMap);var a=We[r],c=[],l=new Set,u=new Set(o),d=function(p){!p||l.has(p)||(l.add(p),d(p.parentNode))};o.forEach(d);var f=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(h){if(l.has(h))f(h);else try{var v=h.getAttribute(n),g=v!==null&&v!=="false",m=(Ee.get(h)||0)+1,x=(a.get(h)||0)+1;Ee.set(h,m),a.set(h,x),c.push(h),m===1&&g&&Ve.set(h,!0),x===1&&h.setAttribute(r,"true"),g||h.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",h,b)}})};return f(t),l.clear(),Et++,function(){c.forEach(function(p){var h=Ee.get(p)-1,v=a.get(p)-1;Ee.set(p,h),a.set(p,v),h||(Ve.has(p)||p.removeAttribute(n),Ve.delete(p)),v||p.removeAttribute(r)}),Et--,Et||(Ee=new WeakMap,Ee=new WeakMap,Ve=new WeakMap,We={})}},nn=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=wi(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),Ci(n,o,r,"aria-hidden")):function(){return null}},Gt="Dialog",[on,dd]=de(Gt),[Ei,te]=on(Gt),an=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:c=!0}=e,l=s.useRef(null),u=s.useRef(null),[d=!1,f]=et({prop:n,defaultProp:o,onChange:a});return i.jsx(Ei,{scope:t,triggerRef:l,contentRef:u,contentId:he(),titleId:he(),descriptionId:he(),open:d,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(p=>!p),[f]),modal:c,children:r})};an.displayName=Gt;var sn="DialogTrigger",Si=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=te(sn,r),a=G(t,o.triggerRef);return i.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Wt(o.open),...n,ref:a,onClick:I(e.onClick,o.onOpenToggle)})});Si.displayName=sn;var Bt="DialogPortal",[Mi,cn]=on(Bt,{forceMount:void 0}),ln=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=te(Bt,t);return i.jsx(Mi,{scope:t,forceMount:r,children:s.Children.map(n,c=>i.jsx(oe,{present:r||a.open,children:i.jsx(rt,{asChild:!0,container:o,children:c})}))})};ln.displayName=Bt;var Xe="DialogOverlay",un=s.forwardRef((e,t)=>{const r=cn(Xe,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=te(Xe,e.__scopeDialog);return a.modal?i.jsx(oe,{present:n||a.open,children:i.jsx(Ri,{...o,ref:t})}):null});un.displayName=Xe;var Ri=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=te(Xe,r);return i.jsx(zt,{as:se,allowPinchZoom:!0,shards:[o.contentRef],children:i.jsx(O.div,{"data-state":Wt(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),ge="DialogContent",dn=s.forwardRef((e,t)=>{const r=cn(ge,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=te(ge,e.__scopeDialog);return i.jsx(oe,{present:n||a.open,children:a.modal?i.jsx(Pi,{...o,ref:t}):i.jsx(Ni,{...o,ref:t})})});dn.displayName=ge;var Pi=s.forwardRef((e,t)=>{const r=te(ge,e.__scopeDialog),n=s.useRef(null),o=G(t,r.contentRef,n);return s.useEffect(()=>{const a=n.current;if(a)return nn(a)},[]),i.jsx(fn,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,a=>{var c;a.preventDefault(),(c=r.triggerRef.current)==null||c.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0;(c.button===2||l)&&a.preventDefault()}),onFocusOutside:I(e.onFocusOutside,a=>a.preventDefault())})}),Ni=s.forwardRef((e,t)=>{const r=te(ge,e.__scopeDialog),n=s.useRef(!1),o=s.useRef(!1);return i.jsx(fn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var c,l;(c=e.onCloseAutoFocus)==null||c.call(e,a),a.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=a.target;((d=r.triggerRef.current)==null?void 0:d.contains(c))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),fn=s.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...c}=e,l=te(ge,r),u=s.useRef(null),d=G(t,u);return Yr(),i.jsxs(i.Fragment,{children:[i.jsx($t,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:i.jsx(tt,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Wt(l.open),...c,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(Ai,{titleId:l.titleId}),i.jsx(Ii,{contentRef:u,descriptionId:l.descriptionId})]})]})}),Vt="DialogTitle",pn=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=te(Vt,r);return i.jsx(O.h2,{id:o.titleId,...n,ref:t})});pn.displayName=Vt;var mn="DialogDescription",hn=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=te(mn,r);return i.jsx(O.p,{id:o.descriptionId,...n,ref:t})});hn.displayName=mn;var gn="DialogClose",vn=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=te(gn,r);return i.jsx(O.button,{type:"button",...n,ref:t,onClick:I(e.onClick,()=>o.onOpenChange(!1))})});vn.displayName=gn;function Wt(e){return e?"open":"closed"}var bn="DialogTitleWarning",[fd,xn]=ms(bn,{contentName:ge,titleName:Vt,docsSlug:"dialog"}),Ai=({titleId:e})=>{const t=xn(bn),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},_i="DialogDescriptionWarning",Ii=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${xn(_i).contentName}}.`;return s.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},ji=an,Ti=ln,ki=un,Di=dn,Oi=pn,Li=hn,Fi=vn;function $i({...e}){return i.jsx(ji,{"data-slot":"sheet",...e})}function zi({...e}){return i.jsx(Ti,{"data-slot":"sheet-portal",...e})}function Gi({className:e,...t}){return i.jsx(ki,{"data-slot":"sheet-overlay",className:k("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e),...t})}function Bi({className:e,children:t,side:r="right",...n}){return i.jsxs(zi,{children:[i.jsx(Gi,{}),i.jsxs(Di,{"data-slot":"sheet-content",className:k("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",r==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",r==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",r==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...n,children:[t,i.jsxs(Fi,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[i.jsx(Qo,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Vi({className:e,...t}){return i.jsx("div",{"data-slot":"sheet-header",className:k("flex flex-col gap-1.5 p-4",e),...t})}function Wi({className:e,...t}){return i.jsx(Oi,{"data-slot":"sheet-title",className:k("text-foreground font-semibold",e),...t})}function Ui({className:e,...t}){return i.jsx(Li,{"data-slot":"sheet-description",className:k("text-muted-foreground text-sm",e),...t})}var He=typeof document<"u"?s.useLayoutEffect:s.useEffect;function Ze(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Ze(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!Ze(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function wn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Rr(e,t){const r=wn(e);return Math.round(t*r)/r}function St(e){const t=s.useRef(e);return He(()=>{t.current=e}),t}function Ki(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:c}={},transform:l=!0,whileElementsMounted:u,open:d}=e,[f,p]=s.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=s.useState(n);Ze(h,n)||v(n);const[g,m]=s.useState(null),[x,b]=s.useState(null),y=s.useCallback(_=>{_!==w.current&&(w.current=_,m(_))},[]),P=s.useCallback(_=>{_!==R.current&&(R.current=_,b(_))},[]),M=a||g,N=c||x,w=s.useRef(null),R=s.useRef(null),j=s.useRef(f),z=u!=null,L=St(u),U=St(o),H=St(d),F=s.useCallback(()=>{if(!w.current||!R.current)return;const _={placement:t,strategy:r,middleware:h};U.current&&(_.platform=U.current),Jo(w.current,R.current,_).then(S=>{const D={...S,isPositioned:H.current!==!1};$.current&&!Ze(j.current,D)&&(j.current=D,_r.flushSync(()=>{p(D)}))})},[h,t,r,U,H]);He(()=>{d===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,p(_=>({..._,isPositioned:!1})))},[d]);const $=s.useRef(!1);He(()=>($.current=!0,()=>{$.current=!1}),[]),He(()=>{if(M&&(w.current=M),N&&(R.current=N),M&&N){if(L.current)return L.current(M,N,F);F()}},[M,N,F,L,z]);const W=s.useMemo(()=>({reference:w,floating:R,setReference:y,setFloating:P}),[y,P]),A=s.useMemo(()=>({reference:M,floating:N}),[M,N]),X=s.useMemo(()=>{const _={position:r,left:0,top:0};if(!A.floating)return _;const S=Rr(A.floating,f.x),D=Rr(A.floating,f.y);return l?{..._,transform:"translate("+S+"px, "+D+"px)",...wn(A.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:S,top:D}},[r,l,A.floating,f.x,f.y]);return s.useMemo(()=>({...f,update:F,refs:W,elements:A,floatingStyles:X}),[f,F,W,A,X])}const Hi=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?ir({element:n.current,padding:o}).fn(r):{}:n?ir({element:n,padding:o}).fn(r):{}}}},Yi=(e,t)=>({...ea(e),options:[e,t]}),Xi=(e,t)=>({...ta(e),options:[e,t]}),Zi=(e,t)=>({...aa(e),options:[e,t]}),qi=(e,t)=>({...ra(e),options:[e,t]}),Qi=(e,t)=>({...na(e),options:[e,t]}),Ji=(e,t)=>({...oa(e),options:[e,t]}),ec=(e,t)=>({...Hi(e),options:[e,t]});var tc="Arrow",yn=s.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return i.jsx(O.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});yn.displayName=tc;var rc=yn;function nc(e){const[t,r]=s.useState(void 0);return ie(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let c,l;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;c=d.inlineSize,l=d.blockSize}else c=e.offsetWidth,l=e.offsetHeight;r({width:c,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Ut="Popper",[Cn,ot]=de(Ut),[oc,En]=Cn(Ut),Sn=e=>{const{__scopePopper:t,children:r}=e,[n,o]=s.useState(null);return i.jsx(oc,{scope:t,anchor:n,onAnchorChange:o,children:r})};Sn.displayName=Ut;var Mn="PopperAnchor",Rn=s.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=En(Mn,r),c=s.useRef(null),l=G(t,c);return s.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||c.current)}),n?null:i.jsx(O.div,{...o,ref:l})});Rn.displayName=Mn;var Kt="PopperContent",[ac,sc]=Cn(Kt),Pn=s.forwardRef((e,t)=>{var Y,Ne,q,Ae,or,ar;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:c=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:g,...m}=e,x=En(Kt,r),[b,y]=s.useState(null),P=G(t,_e=>y(_e)),[M,N]=s.useState(null),w=nc(M),R=(w==null?void 0:w.width)??0,j=(w==null?void 0:w.height)??0,z=n+(a!=="center"?"-"+a:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},U=Array.isArray(d)?d:[d],H=U.length>0,F={padding:L,boundary:U.filter(cc),altBoundary:H},{refs:$,floatingStyles:W,placement:A,isPositioned:X,middlewareData:_}=Ki({strategy:"fixed",placement:z,whileElementsMounted:(..._e)=>sa(..._e,{animationFrame:v==="always"}),elements:{reference:x.anchor},middleware:[Yi({mainAxis:o+j,alignmentAxis:c}),u&&Xi({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Zi():void 0,...F}),u&&qi({...F}),Qi({...F,apply:({elements:_e,rects:sr,availableWidth:Wo,availableHeight:Uo})=>{const{width:Ko,height:Ho}=sr.reference,Le=_e.floating.style;Le.setProperty("--radix-popper-available-width",`${Wo}px`),Le.setProperty("--radix-popper-available-height",`${Uo}px`),Le.setProperty("--radix-popper-anchor-width",`${Ko}px`),Le.setProperty("--radix-popper-anchor-height",`${Ho}px`)}}),M&&ec({element:M,padding:l}),lc({arrowWidth:R,arrowHeight:j}),h&&Ji({strategy:"referenceHidden",...F})]}),[S,D]=_n(A),B=J(g);ie(()=>{X&&(B==null||B())},[X,B]);const Z=(Y=_.arrow)==null?void 0:Y.x,ce=(Ne=_.arrow)==null?void 0:Ne.y,re=((q=_.arrow)==null?void 0:q.centerOffset)!==0,[ae,ee]=s.useState();return ie(()=>{b&&ee(window.getComputedStyle(b).zIndex)},[b]),i.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:X?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(Ae=_.transformOrigin)==null?void 0:Ae.x,(or=_.transformOrigin)==null?void 0:or.y].join(" "),...((ar=_.hide)==null?void 0:ar.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(ac,{scope:r,placedSide:S,onArrowChange:N,arrowX:Z,arrowY:ce,shouldHideArrow:re,children:i.jsx(O.div,{"data-side":S,"data-align":D,...m,ref:P,style:{...m.style,animation:X?void 0:"none"}})})})});Pn.displayName=Kt;var Nn="PopperArrow",ic={top:"bottom",right:"left",bottom:"top",left:"right"},An=s.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=sc(Nn,n),c=ic[a.placedSide];return i.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:i.jsx(rc,{...o,ref:r,style:{...o.style,display:"block"}})})});An.displayName=Nn;function cc(e){return e!==null}var lc=e=>({name:"transformOrigin",options:e,fn(t){var x,b,y;const{placement:r,rects:n,middlewareData:o}=t,c=((x=o.arrow)==null?void 0:x.centerOffset)!==0,l=c?0:e.arrowWidth,u=c?0:e.arrowHeight,[d,f]=_n(r),p={start:"0%",center:"50%",end:"100%"}[f],h=(((b=o.arrow)==null?void 0:b.x)??0)+l/2,v=(((y=o.arrow)==null?void 0:y.y)??0)+u/2;let g="",m="";return d==="bottom"?(g=c?p:`${h}px`,m=`${-u}px`):d==="top"?(g=c?p:`${h}px`,m=`${n.floating.height+u}px`):d==="right"?(g=`${-u}px`,m=c?p:`${v}px`):d==="left"&&(g=`${n.floating.width+u}px`,m=c?p:`${v}px`),{data:{x:g,y:m}}}});function _n(e){const[t,r="center"]=e.split("-");return[t,r]}var In=Sn,jn=Rn,Tn=Pn,kn=An,uc="VisuallyHidden",Dn=s.forwardRef((e,t)=>i.jsx(O.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Dn.displayName=uc;var dc=Dn,[at,pd]=de("Tooltip",[ot]),st=ot(),On="TooltipProvider",fc=700,jt="tooltip.open",[pc,Ht]=at(On),Ln=e=>{const{__scopeTooltip:t,delayDuration:r=fc,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,[c,l]=s.useState(!0),u=s.useRef(!1),d=s.useRef(0);return s.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),i.jsx(pc,{scope:t,isOpenDelayed:c,delayDuration:r,onOpen:s.useCallback(()=>{window.clearTimeout(d.current),l(!1)},[]),onClose:s.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l(!0),n)},[n]),isPointerInTransitRef:u,onPointerInTransitChange:s.useCallback(f=>{u.current=f},[]),disableHoverableContent:o,children:a})};Ln.displayName=On;var it="Tooltip",[mc,ke]=at(it),Fn=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:c,delayDuration:l}=e,u=Ht(it,e.__scopeTooltip),d=st(t),[f,p]=s.useState(null),h=he(),v=s.useRef(0),g=c??u.disableHoverableContent,m=l??u.delayDuration,x=s.useRef(!1),[b=!1,y]=et({prop:n,defaultProp:o,onChange:R=>{R?(u.onOpen(),document.dispatchEvent(new CustomEvent(jt))):u.onClose(),a==null||a(R)}}),P=s.useMemo(()=>b?x.current?"delayed-open":"instant-open":"closed",[b]),M=s.useCallback(()=>{window.clearTimeout(v.current),v.current=0,x.current=!1,y(!0)},[y]),N=s.useCallback(()=>{window.clearTimeout(v.current),v.current=0,y(!1)},[y]),w=s.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{x.current=!0,y(!0),v.current=0},m)},[m,y]);return s.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),i.jsx(In,{...d,children:i.jsx(mc,{scope:t,contentId:h,open:b,stateAttribute:P,trigger:f,onTriggerChange:p,onTriggerEnter:s.useCallback(()=>{u.isOpenDelayed?w():M()},[u.isOpenDelayed,w,M]),onTriggerLeave:s.useCallback(()=>{g?N():(window.clearTimeout(v.current),v.current=0)},[N,g]),onOpen:M,onClose:N,disableHoverableContent:g,children:r})})};Fn.displayName=it;var Tt="TooltipTrigger",$n=s.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=ke(Tt,r),a=Ht(Tt,r),c=st(r),l=s.useRef(null),u=G(t,l,o.onTriggerChange),d=s.useRef(!1),f=s.useRef(!1),p=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),i.jsx(jn,{asChild:!0,...c,children:i.jsx(O.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:u,onPointerMove:I(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:I(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:I(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:I(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:I(e.onBlur,o.onClose),onClick:I(e.onClick,o.onClose)})})});$n.displayName=Tt;var Yt="TooltipPortal",[hc,gc]=at(Yt,{forceMount:void 0}),zn=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=ke(Yt,t);return i.jsx(hc,{scope:t,forceMount:r,children:i.jsx(oe,{present:r||a.open,children:i.jsx(rt,{asChild:!0,container:o,children:n})})})};zn.displayName=Yt;var Me="TooltipContent",Gn=s.forwardRef((e,t)=>{const r=gc(Me,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,c=ke(Me,e.__scopeTooltip);return i.jsx(oe,{present:n||c.open,children:c.disableHoverableContent?i.jsx(Bn,{side:o,...a,ref:t}):i.jsx(vc,{side:o,...a,ref:t})})}),vc=s.forwardRef((e,t)=>{const r=ke(Me,e.__scopeTooltip),n=Ht(Me,e.__scopeTooltip),o=s.useRef(null),a=G(t,o),[c,l]=s.useState(null),{trigger:u,onClose:d}=r,f=o.current,{onPointerInTransitChange:p}=n,h=s.useCallback(()=>{l(null),p(!1)},[p]),v=s.useCallback((g,m)=>{const x=g.currentTarget,b={x:g.clientX,y:g.clientY},y=wc(b,x.getBoundingClientRect()),P=yc(b,y),M=Cc(m.getBoundingClientRect()),N=Sc([...P,...M]);l(N),p(!0)},[p]);return s.useEffect(()=>()=>h(),[h]),s.useEffect(()=>{if(u&&f){const g=x=>v(x,f),m=x=>v(x,u);return u.addEventListener("pointerleave",g),f.addEventListener("pointerleave",m),()=>{u.removeEventListener("pointerleave",g),f.removeEventListener("pointerleave",m)}}},[u,f,v,h]),s.useEffect(()=>{if(c){const g=m=>{const x=m.target,b={x:m.clientX,y:m.clientY},y=(u==null?void 0:u.contains(x))||(f==null?void 0:f.contains(x)),P=!Ec(b,c);y?h():P&&(h(),d())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[u,f,c,d,h]),i.jsx(Bn,{...e,ref:a})}),[bc,xc]=at(it,{isInside:!1}),Bn=s.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:c,...l}=e,u=ke(Me,r),d=st(r),{onClose:f}=u;return s.useEffect(()=>(document.addEventListener(jt,f),()=>document.removeEventListener(jt,f)),[f]),s.useEffect(()=>{if(u.trigger){const p=h=>{const v=h.target;v!=null&&v.contains(u.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,f]),i.jsx(tt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:i.jsxs(Tn,{"data-state":u.stateAttribute,...d,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[i.jsx(Ir,{children:n}),i.jsx(bc,{scope:r,isInside:!0,children:i.jsx(dc,{id:u.contentId,role:"tooltip",children:o||n})})]})})});Gn.displayName=Me;var Vn="TooltipArrow",Wn=s.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=st(r);return xc(Vn,r).isInside?null:i.jsx(kn,{...o,...n,ref:t})});Wn.displayName=Vn;function wc(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function yc(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Cc(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function Ec(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,c=t.length-1;a<t.length;c=a++){const l=t[a].x,u=t[a].y,d=t[c].x,f=t[c].y;u>n!=f>n&&r<(d-l)*(n-u)/(f-u)+l&&(o=!o)}return o}function Sc(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Mc(t)}function Mc(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],c=t[t.length-2];if((a.x-c.x)*(o.y-c.y)>=(a.y-c.y)*(o.x-c.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],c=r[r.length-2];if((a.x-c.x)*(o.y-c.y)>=(a.y-c.y)*(o.x-c.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Rc=Ln,Pc=Fn,Nc=$n,Ac=zn,_c=Gn,Ic=Wn;function Un({delayDuration:e=0,...t}){return i.jsx(Rc,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function jc({...e}){return i.jsx(Un,{children:i.jsx(Pc,{"data-slot":"tooltip",...e})})}function Tc({...e}){return i.jsx(Nc,{"data-slot":"tooltip-trigger",...e})}function kc({className:e,sideOffset:t=4,children:r,...n}){return i.jsx(Ac,{children:i.jsxs(_c,{"data-slot":"tooltip-content",sideOffset:t,className:k("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-w-sm rounded-md px-3 py-1.5 text-xs",e),...n,children:[r,i.jsx(Ic,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const Dc="sidebar_state",Oc=60*60*24*7,Lc="16rem",Fc="18rem",$c="3rem",zc="b",Kn=s.createContext(null);function ct(){const e=s.useContext(Kn);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function Gc({defaultOpen:e=!0,open:t,onOpenChange:r,className:n,style:o,children:a,...c}){const l=Dr(),[u,d]=s.useState(!1),[f,p]=s.useState(e),h=t??f,v=s.useCallback(b=>{const y=typeof b=="function"?b(h):b;r?r(y):p(y),document.cookie=`${Dc}=${y}; path=/; max-age=${Oc}`},[r,h]),g=s.useCallback(()=>l?d(b=>!b):v(b=>!b),[l,v,d]);s.useEffect(()=>{const b=y=>{y.key===zc&&(y.metaKey||y.ctrlKey)&&(y.preventDefault(),g())};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[g]);const m=h?"expanded":"collapsed",x=s.useMemo(()=>({state:m,open:h,setOpen:v,isMobile:l,openMobile:u,setOpenMobile:d,toggleSidebar:g}),[m,h,v,l,u,d,g]);return i.jsx(Kn.Provider,{value:x,children:i.jsx(Un,{delayDuration:0,children:i.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Lc,"--sidebar-width-icon":$c,...o},className:k("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",n),...c,children:a})})})}function Bc({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:n,children:o,...a}){const{isMobile:c,state:l,openMobile:u,setOpenMobile:d}=ct();return r==="none"?i.jsx("div",{"data-slot":"sidebar",className:k("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",n),...a,children:o}):c?i.jsxs($i,{open:u,onOpenChange:d,...a,children:[i.jsxs(Vi,{className:"sr-only",children:[i.jsx(Wi,{children:"Sidebar"}),i.jsx(Ui,{children:"Displays the mobile sidebar."})]}),i.jsx(Bi,{"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":Fc},side:e,children:i.jsx("div",{className:"flex h-full w-full flex-col",children:o})})]}):i.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":l,"data-collapsible":l==="collapsed"?r:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[i.jsx("div",{className:k("relative h-svh 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)")}),i.jsx("div",{className:k("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",n),...a,children:i.jsx("div",{"data-sidebar":"sidebar",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:o})})]})}function Vc({className:e,onClick:t,...r}){const{toggleSidebar:n}=ct();return i.jsxs(fs,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:k("h-7 w-7",e),onClick:o=>{t==null||t(o),n()},...r,children:[i.jsx(ya,{}),i.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Wc({className:e,...t}){return i.jsx("main",{"data-slot":"sidebar-inset",className:k("bg-background relative flex max-w-full min-h-svh flex-1 flex-col","peer-data-[variant=inset]:min-h-[calc(100svh-(--spacing(4)))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-0",e),...t})}function Uc({className:e,...t}){return i.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:k("flex flex-col gap-2 p-2",e),...t})}function Kc({className:e,...t}){return i.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:k("flex flex-col gap-2 p-2",e),...t})}function Hc({className:e,...t}){return i.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:k("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function Hn({className:e,...t}){return i.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:k("relative flex w-full min-w-0 flex-col p-2",e),...t})}function Yc({className:e,asChild:t=!1,...r}){const n=t?se:"div";return i.jsx(n,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:k("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),...r})}function Xc({className:e,...t}){return i.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:k("w-full text-sm",e),...t})}function lt({className:e,...t}){return i.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:k("flex w-full min-w-0 flex-col gap-1",e),...t})}function ut({className:e,...t}){return i.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:k("group/menu-item relative",e),...t})}const Zc=kr("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function dt({asChild:e=!1,isActive:t=!1,variant:r="default",size:n="default",tooltip:o,className:a,...c}){const l=e?se:"button",{isMobile:u,state:d}=ct(),f=i.jsx(l,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":n,"data-active":t,className:k(Zc({variant:r,size:n}),a),...c});return o?(typeof o=="string"&&(o={children:o}),i.jsxs(jc,{children:[i.jsx(Tc,{asChild:!0,children:f}),i.jsx(kc,{side:"right",align:"center",hidden:d!=="collapsed"||u,...o})]})):f}function qc({variant:e="header",children:t,...r}){return e==="sidebar"?i.jsx(Wc,{...r,children:t}):i.jsx("main",{className:"mx-auto flex h-full w-full max-w-7xl flex-1 flex-col gap-4 rounded-xl",...r,children:t})}function Qc({children:e,variant:t="header"}){const r=Ot().props.sidebarOpen;return t==="header"?i.jsx("div",{className:"flex min-h-screen w-full flex-col",children:e}):i.jsx(Gc,{defaultOpen:r,children:e})}function Jc({iconNode:e,className:t,...r}){return i.jsx(e,{className:k("h-4 w-4",t),...r})}function el({items:e,className:t,...r}){return i.jsx(Hn,{...r,className:`group-data-[collapsible=icon]:p-0 ${t||""}`,children:i.jsx(Xc,{children:i.jsx(lt,{children:e.map(n=>i.jsx(ut,{children:i.jsx(dt,{asChild:!0,className:"text-neutral-600 hover:text-neutral-800 dark:text-neutral-300 dark:hover:text-neutral-100",children:i.jsxs("a",{href:n.href,target:"_blank",rel:"noopener noreferrer",children:[n.icon&&i.jsx(Jc,{iconNode:n.icon,className:"h-5 w-5"}),i.jsx("span",{children:n.title})]})})},n.title))})})})}function tl({items:e=[]}){const t=Ot();return i.jsxs(Hn,{className:"px-2 py-0",children:[i.jsx(Yc,{children:"Platform"}),i.jsx(lt,{children:e.map(r=>i.jsx(ut,{children:i.jsx(dt,{asChild:!0,isActive:t.url.startsWith(r.href),tooltip:{children:r.title},children:i.jsxs(Ye,{href:r.href,prefetch:!0,children:[r.icon&&i.jsx(r.icon,{}),i.jsx("span",{children:r.title})]})})},r.title))})]})}function Yn(e){const t=e+"CollectionProvider",[r,n]=de(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),c=v=>{const{scope:g,children:m}=v,x=fe.useRef(null),b=fe.useRef(new Map).current;return i.jsx(o,{scope:g,itemMap:b,collectionRef:x,children:m})};c.displayName=t;const l=e+"CollectionSlot",u=fe.forwardRef((v,g)=>{const{scope:m,children:x}=v,b=a(l,m),y=G(g,b.collectionRef);return i.jsx(se,{ref:y,children:x})});u.displayName=l;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=fe.forwardRef((v,g)=>{const{scope:m,children:x,...b}=v,y=fe.useRef(null),P=G(g,y),M=a(d,m);return fe.useEffect(()=>(M.itemMap.set(y,{ref:y,...b}),()=>void M.itemMap.delete(y))),i.jsx(se,{[f]:"",ref:P,children:x})});p.displayName=d;function h(v){const g=a(e+"CollectionConsumer",v);return fe.useCallback(()=>{const x=g.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((M,N)=>b.indexOf(M.ref.current)-b.indexOf(N.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:c,Slot:u,ItemSlot:p},h,n]}var rl=s.createContext(void 0);function Xn(e){const t=s.useContext(rl);return e||t||"ltr"}var Mt="rovingFocusGroup.onEntryFocus",nl={bubbles:!1,cancelable:!0},ft="RovingFocusGroup",[kt,Zn,ol]=Yn(ft),[al,qn]=de(ft,[ol]),[sl,il]=al(ft),Qn=s.forwardRef((e,t)=>i.jsx(kt.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(kt.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx(cl,{...e,ref:t})})}));Qn.displayName=ft;var cl=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:c,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,h=s.useRef(null),v=G(t,h),g=Xn(a),[m=null,x]=et({prop:c,defaultProp:l,onChange:u}),[b,y]=s.useState(!1),P=J(d),M=Zn(r),N=s.useRef(!1),[w,R]=s.useState(0);return s.useEffect(()=>{const j=h.current;if(j)return j.addEventListener(Mt,P),()=>j.removeEventListener(Mt,P)},[P]),i.jsx(sl,{scope:r,orientation:n,dir:g,loop:o,currentTabStopId:m,onItemFocus:s.useCallback(j=>x(j),[x]),onItemShiftTab:s.useCallback(()=>y(!0),[]),onFocusableItemAdd:s.useCallback(()=>R(j=>j+1),[]),onFocusableItemRemove:s.useCallback(()=>R(j=>j-1),[]),children:i.jsx(O.div,{tabIndex:b||w===0?-1:0,"data-orientation":n,...p,ref:v,style:{outline:"none",...e.style},onMouseDown:I(e.onMouseDown,()=>{N.current=!0}),onFocus:I(e.onFocus,j=>{const z=!N.current;if(j.target===j.currentTarget&&z&&!b){const L=new CustomEvent(Mt,nl);if(j.currentTarget.dispatchEvent(L),!L.defaultPrevented){const U=M().filter(A=>A.focusable),H=U.find(A=>A.active),F=U.find(A=>A.id===m),W=[H,F,...U].filter(Boolean).map(A=>A.ref.current);to(W,f)}}N.current=!1}),onBlur:I(e.onBlur,()=>y(!1))})})}),Jn="RovingFocusGroupItem",eo=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,...c}=e,l=he(),u=a||l,d=il(Jn,r),f=d.currentTabStopId===u,p=Zn(r),{onFocusableItemAdd:h,onFocusableItemRemove:v}=d;return s.useEffect(()=>{if(n)return h(),()=>v()},[n,h,v]),i.jsx(kt.ItemSlot,{scope:r,id:u,focusable:n,active:o,children:i.jsx(O.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:t,onMouseDown:I(e.onMouseDown,g=>{n?d.onItemFocus(u):g.preventDefault()}),onFocus:I(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:I(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const m=dl(g,d.orientation,d.dir);if(m!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let b=p().filter(y=>y.focusable).map(y=>y.ref.current);if(m==="last")b.reverse();else if(m==="prev"||m==="next"){m==="prev"&&b.reverse();const y=b.indexOf(g.currentTarget);b=d.loop?fl(b,y+1):b.slice(y+1)}setTimeout(()=>to(b))}})})})});eo.displayName=Jn;var ll={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ul(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dl(e,t,r){const n=ul(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return ll[n]}function to(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function fl(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var pl=Qn,ml=eo,Dt=["Enter"," "],hl=["ArrowDown","PageUp","Home"],ro=["ArrowUp","PageDown","End"],gl=[...hl,...ro],vl={ltr:[...Dt,"ArrowRight"],rtl:[...Dt,"ArrowLeft"]},bl={ltr:["ArrowLeft"],rtl:["ArrowRight"]},De="Menu",[je,xl,wl]=Yn(De),[be,no]=de(De,[wl,ot,qn]),pt=ot(),oo=qn(),[yl,xe]=be(De),[Cl,Oe]=be(De),ao=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:a,modal:c=!0}=e,l=pt(t),[u,d]=s.useState(null),f=s.useRef(!1),p=J(a),h=Xn(o);return s.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),i.jsx(In,{...l,children:i.jsx(yl,{scope:t,open:r,onOpenChange:p,content:u,onContentChange:d,children:i.jsx(Cl,{scope:t,onClose:s.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:h,modal:c,children:n})})})};ao.displayName=De;var El="MenuAnchor",Xt=s.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=pt(r);return i.jsx(jn,{...o,...n,ref:t})});Xt.displayName=El;var Zt="MenuPortal",[Sl,so]=be(Zt,{forceMount:void 0}),io=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:o}=e,a=xe(Zt,t);return i.jsx(Sl,{scope:t,forceMount:r,children:i.jsx(oe,{present:r||a.open,children:i.jsx(rt,{asChild:!0,container:o,children:n})})})};io.displayName=Zt;var Q="MenuContent",[Ml,qt]=be(Q),co=s.forwardRef((e,t)=>{const r=so(Q,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,a=xe(Q,e.__scopeMenu),c=Oe(Q,e.__scopeMenu);return i.jsx(je.Provider,{scope:e.__scopeMenu,children:i.jsx(oe,{present:n||a.open,children:i.jsx(je.Slot,{scope:e.__scopeMenu,children:c.modal?i.jsx(Rl,{...o,ref:t}):i.jsx(Pl,{...o,ref:t})})})})}),Rl=s.forwardRef((e,t)=>{const r=xe(Q,e.__scopeMenu),n=s.useRef(null),o=G(t,n);return s.useEffect(()=>{const a=n.current;if(a)return nn(a)},[]),i.jsx(Qt,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:I(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),Pl=s.forwardRef((e,t)=>{const r=xe(Q,e.__scopeMenu);return i.jsx(Qt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Qt=s.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:c,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:h,onDismiss:v,disableOutsideScroll:g,...m}=e,x=xe(Q,r),b=Oe(Q,r),y=pt(r),P=oo(r),M=xl(r),[N,w]=s.useState(null),R=s.useRef(null),j=G(t,R,x.onContentChange),z=s.useRef(0),L=s.useRef(""),U=s.useRef(0),H=s.useRef(null),F=s.useRef("right"),$=s.useRef(0),W=g?zt:s.Fragment,A=g?{as:se,allowPinchZoom:!0}:void 0,X=S=>{var Y,Ne;const D=L.current+S,B=M().filter(q=>!q.disabled),Z=document.activeElement,ce=(Y=B.find(q=>q.ref.current===Z))==null?void 0:Y.textValue,re=B.map(q=>q.textValue),ae=$l(re,D,ce),ee=(Ne=B.find(q=>q.textValue===ae))==null?void 0:Ne.ref.current;(function q(Ae){L.current=Ae,window.clearTimeout(z.current),Ae!==""&&(z.current=window.setTimeout(()=>q(""),1e3))})(D),ee&&setTimeout(()=>ee.focus())};s.useEffect(()=>()=>window.clearTimeout(z.current),[]),Yr();const _=s.useCallback(S=>{var B,Z;return F.current===((B=H.current)==null?void 0:B.side)&&Gl(S,(Z=H.current)==null?void 0:Z.area)},[]);return i.jsx(Ml,{scope:r,searchRef:L,onItemEnter:s.useCallback(S=>{_(S)&&S.preventDefault()},[_]),onItemLeave:s.useCallback(S=>{var D;_(S)||((D=R.current)==null||D.focus(),w(null))},[_]),onTriggerLeave:s.useCallback(S=>{_(S)&&S.preventDefault()},[_]),pointerGraceTimerRef:U,onPointerGraceIntentChange:s.useCallback(S=>{H.current=S},[]),children:i.jsx(W,{...A,children:i.jsx($t,{asChild:!0,trapped:o,onMountAutoFocus:I(a,S=>{var D;S.preventDefault(),(D=R.current)==null||D.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:i.jsx(tt,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:h,onDismiss:v,children:i.jsx(pl,{asChild:!0,...P,dir:b.dir,orientation:"vertical",loop:n,currentTabStopId:N,onCurrentTabStopIdChange:w,onEntryFocus:I(u,S=>{b.isUsingKeyboardRef.current||S.preventDefault()}),preventScrollOnEntryFocus:!0,children:i.jsx(Tn,{role:"menu","aria-orientation":"vertical","data-state":Mo(x.open),"data-radix-menu-content":"",dir:b.dir,...y,...m,ref:j,style:{outline:"none",...m.style},onKeyDown:I(m.onKeyDown,S=>{const B=S.target.closest("[data-radix-menu-content]")===S.currentTarget,Z=S.ctrlKey||S.altKey||S.metaKey,ce=S.key.length===1;B&&(S.key==="Tab"&&S.preventDefault(),!Z&&ce&&X(S.key));const re=R.current;if(S.target!==re||!gl.includes(S.key))return;S.preventDefault();const ee=M().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);ro.includes(S.key)&&ee.reverse(),Ll(ee)}),onBlur:I(e.onBlur,S=>{S.currentTarget.contains(S.target)||(window.clearTimeout(z.current),L.current="")}),onPointerMove:I(e.onPointerMove,Te(S=>{const D=S.target,B=$.current!==S.clientX;if(S.currentTarget.contains(D)&&B){const Z=S.clientX>$.current?"right":"left";F.current=Z,$.current=S.clientX}}))})})})})})})});co.displayName=Q;var Nl="MenuGroup",Jt=s.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return i.jsx(O.div,{role:"group",...n,ref:t})});Jt.displayName=Nl;var Al="MenuLabel",lo=s.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return i.jsx(O.div,{...n,ref:t})});lo.displayName=Al;var qe="MenuItem",Pr="menu.itemSelect",mt=s.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...o}=e,a=s.useRef(null),c=Oe(qe,e.__scopeMenu),l=qt(qe,e.__scopeMenu),u=G(t,a),d=s.useRef(!1),f=()=>{const p=a.current;if(!r&&p){const h=new CustomEvent(Pr,{bubbles:!0,cancelable:!0});p.addEventListener(Pr,v=>n==null?void 0:n(v),{once:!0}),Wr(p,h),h.defaultPrevented?d.current=!1:c.onClose()}};return i.jsx(uo,{...o,ref:u,disabled:r,onClick:I(e.onClick,f),onPointerDown:p=>{var h;(h=e.onPointerDown)==null||h.call(e,p),d.current=!0},onPointerUp:I(e.onPointerUp,p=>{var h;d.current||(h=p.currentTarget)==null||h.click()}),onKeyDown:I(e.onKeyDown,p=>{const h=l.searchRef.current!=="";r||h&&p.key===" "||Dt.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});mt.displayName=qe;var uo=s.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:o,...a}=e,c=qt(qe,r),l=oo(r),u=s.useRef(null),d=G(t,u),[f,p]=s.useState(!1),[h,v]=s.useState("");return s.useEffect(()=>{const g=u.current;g&&v((g.textContent??"").trim())},[a.children]),i.jsx(je.ItemSlot,{scope:r,disabled:n,textValue:o??h,children:i.jsx(ml,{asChild:!0,...l,focusable:!n,children:i.jsx(O.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...a,ref:d,onPointerMove:I(e.onPointerMove,Te(g=>{n?c.onItemLeave(g):(c.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:I(e.onPointerLeave,Te(g=>c.onItemLeave(g))),onFocus:I(e.onFocus,()=>p(!0)),onBlur:I(e.onBlur,()=>p(!1))})})})}),_l="MenuCheckboxItem",fo=s.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...o}=e;return i.jsx(vo,{scope:e.__scopeMenu,checked:r,children:i.jsx(mt,{role:"menuitemcheckbox","aria-checked":Qe(r)?"mixed":r,...o,ref:t,"data-state":tr(r),onSelect:I(o.onSelect,()=>n==null?void 0:n(Qe(r)?!0:!r),{checkForDefaultPrevented:!1})})})});fo.displayName=_l;var po="MenuRadioGroup",[Il,jl]=be(po,{value:void 0,onValueChange:()=>{}}),mo=s.forwardRef((e,t)=>{const{value:r,onValueChange:n,...o}=e,a=J(n);return i.jsx(Il,{scope:e.__scopeMenu,value:r,onValueChange:a,children:i.jsx(Jt,{...o,ref:t})})});mo.displayName=po;var ho="MenuRadioItem",go=s.forwardRef((e,t)=>{const{value:r,...n}=e,o=jl(ho,e.__scopeMenu),a=r===o.value;return i.jsx(vo,{scope:e.__scopeMenu,checked:a,children:i.jsx(mt,{role:"menuitemradio","aria-checked":a,...n,ref:t,"data-state":tr(a),onSelect:I(n.onSelect,()=>{var c;return(c=o.onValueChange)==null?void 0:c.call(o,r)},{checkForDefaultPrevented:!1})})})});go.displayName=ho;var er="MenuItemIndicator",[vo,Tl]=be(er,{checked:!1}),bo=s.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...o}=e,a=Tl(er,r);return i.jsx(oe,{present:n||Qe(a.checked)||a.checked===!0,children:i.jsx(O.span,{...o,ref:t,"data-state":tr(a.checked)})})});bo.displayName=er;var kl="MenuSeparator",xo=s.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return i.jsx(O.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});xo.displayName=kl;var Dl="MenuArrow",wo=s.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=pt(r);return i.jsx(kn,{...o,...n,ref:t})});wo.displayName=Dl;var Ol="MenuSub",[md,yo]=be(Ol),Ie="MenuSubTrigger",Co=s.forwardRef((e,t)=>{const r=xe(Ie,e.__scopeMenu),n=Oe(Ie,e.__scopeMenu),o=yo(Ie,e.__scopeMenu),a=qt(Ie,e.__scopeMenu),c=s.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=a,d={__scopeMenu:e.__scopeMenu},f=s.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return s.useEffect(()=>f,[f]),s.useEffect(()=>{const p=l.current;return()=>{window.clearTimeout(p),u(null)}},[l,u]),i.jsx(Xt,{asChild:!0,...d,children:i.jsx(uo,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":Mo(r.open),...e,ref:Je(t,o.onTriggerChange),onClick:p=>{var h;(h=e.onClick)==null||h.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:I(e.onPointerMove,Te(p=>{a.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!r.open&&!c.current&&(a.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{r.onOpenChange(!0),f()},100))})),onPointerLeave:I(e.onPointerLeave,Te(p=>{var v,g;f();const h=(v=r.content)==null?void 0:v.getBoundingClientRect();if(h){const m=(g=r.content)==null?void 0:g.dataset.side,x=m==="right",b=x?-5:5,y=h[x?"left":"right"],P=h[x?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+b,y:p.clientY},{x:y,y:h.top},{x:P,y:h.top},{x:P,y:h.bottom},{x:y,y:h.bottom}],side:m}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:I(e.onKeyDown,p=>{var v;const h=a.searchRef.current!=="";e.disabled||h&&p.key===" "||vl[n.dir].includes(p.key)&&(r.onOpenChange(!0),(v=r.content)==null||v.focus(),p.preventDefault())})})})});Co.displayName=Ie;var Eo="MenuSubContent",So=s.forwardRef((e,t)=>{const r=so(Q,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,a=xe(Q,e.__scopeMenu),c=Oe(Q,e.__scopeMenu),l=yo(Eo,e.__scopeMenu),u=s.useRef(null),d=G(t,u);return i.jsx(je.Provider,{scope:e.__scopeMenu,children:i.jsx(oe,{present:n||a.open,children:i.jsx(je.Slot,{scope:e.__scopeMenu,children:i.jsx(Qt,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:d,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var p;c.isUsingKeyboardRef.current&&((p=u.current)==null||p.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:I(e.onFocusOutside,f=>{f.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:I(e.onEscapeKeyDown,f=>{c.onClose(),f.preventDefault()}),onKeyDown:I(e.onKeyDown,f=>{var v;const p=f.currentTarget.contains(f.target),h=bl[c.dir].includes(f.key);p&&h&&(a.onOpenChange(!1),(v=l.trigger)==null||v.focus(),f.preventDefault())})})})})})});So.displayName=Eo;function Mo(e){return e?"open":"closed"}function Qe(e){return e==="indeterminate"}function tr(e){return Qe(e)?"indeterminate":e?"checked":"unchecked"}function Ll(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function Fl(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function $l(e,t,r){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let c=Fl(e,Math.max(a,0));o.length===1&&(c=c.filter(d=>d!==r));const u=c.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return u!==r?u:void 0}function zl(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,c=t.length-1;a<t.length;c=a++){const l=t[a].x,u=t[a].y,d=t[c].x,f=t[c].y;u>n!=f>n&&r<(d-l)*(n-u)/(f-u)+l&&(o=!o)}return o}function Gl(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return zl(r,t)}function Te(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Bl=ao,Vl=Xt,Wl=io,Ul=co,Kl=Jt,Hl=lo,Yl=mt,Xl=fo,Zl=mo,ql=go,Ql=bo,Jl=xo,eu=wo,tu=Co,ru=So,rr="DropdownMenu",[nu,hd]=de(rr,[no]),K=no(),[ou,Ro]=nu(rr),Po=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:a,onOpenChange:c,modal:l=!0}=e,u=K(t),d=s.useRef(null),[f=!1,p]=et({prop:o,defaultProp:a,onChange:c});return i.jsx(ou,{scope:t,triggerId:he(),triggerRef:d,contentId:he(),open:f,onOpenChange:p,onOpenToggle:s.useCallback(()=>p(h=>!h),[p]),modal:l,children:i.jsx(Bl,{...u,open:f,onOpenChange:p,dir:n,modal:l,children:r})})};Po.displayName=rr;var No="DropdownMenuTrigger",Ao=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,a=Ro(No,r),c=K(r);return i.jsx(Vl,{asChild:!0,...c,children:i.jsx(O.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...o,ref:Je(t,a.triggerRef),onPointerDown:I(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:I(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});Ao.displayName=No;var au="DropdownMenuPortal",_o=e=>{const{__scopeDropdownMenu:t,...r}=e,n=K(t);return i.jsx(Wl,{...n,...r})};_o.displayName=au;var Io="DropdownMenuContent",jo=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ro(Io,r),a=K(r),c=s.useRef(!1);return i.jsx(Ul,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...n,ref:t,onCloseAutoFocus:I(e.onCloseAutoFocus,l=>{var u;c.current||(u=o.triggerRef.current)==null||u.focus(),c.current=!1,l.preventDefault()}),onInteractOutside:I(e.onInteractOutside,l=>{const u=l.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,f=u.button===2||d;(!o.modal||f)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});jo.displayName=Io;var su="DropdownMenuGroup",To=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=K(r);return i.jsx(Kl,{...o,...n,ref:t})});To.displayName=su;var iu="DropdownMenuLabel",ko=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=K(r);return i.jsx(Hl,{...o,...n,ref:t})});ko.displayName=iu;var cu="DropdownMenuItem",Do=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=K(r);return i.jsx(Yl,{...o,...n,ref:t})});Do.displayName=cu;var lu="DropdownMenuCheckboxItem",uu=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=K(r);return i.jsx(Xl,{...o,...n,ref:t})});uu.displayName=lu;var du="DropdownMenuRadioGroup",fu=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=K(r);return i.jsx(Zl,{...o,...n,ref:t})});fu.displayName=du;var pu="DropdownMenuRadioItem",mu=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=K(r);return i.jsx(ql,{...o,...n,ref:t})});mu.displayName=pu;var hu="DropdownMenuItemIndicator",gu=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=K(r);return i.jsx(Ql,{...o,...n,ref:t})});gu.displayName=hu;var vu="DropdownMenuSeparator",Oo=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=K(r);return i.jsx(Jl,{...o,...n,ref:t})});Oo.displayName=vu;var bu="DropdownMenuArrow",xu=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=K(r);return i.jsx(eu,{...o,...n,ref:t})});xu.displayName=bu;var wu="DropdownMenuSubTrigger",yu=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=K(r);return i.jsx(tu,{...o,...n,ref:t})});yu.displayName=wu;var Cu="DropdownMenuSubContent",Eu=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=K(r);return i.jsx(ru,{...o,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Eu.displayName=Cu;var Su=Po,Mu=Ao,Ru=_o,Pu=jo,Nu=To,Au=ko,_u=Do,Iu=Oo;function ju({...e}){return i.jsx(Su,{"data-slot":"dropdown-menu",...e})}function Tu({...e}){return i.jsx(Mu,{"data-slot":"dropdown-menu-trigger",...e})}function ku({className:e,sideOffset:t=4,...r}){return i.jsx(Ru,{children:i.jsx(Pu,{"data-slot":"dropdown-menu-content",sideOffset:t,className:k("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md",e),...r})})}function Du({...e}){return i.jsx(Nu,{"data-slot":"dropdown-menu-group",...e})}function Nr({className:e,inset:t,variant:r="default",...n}){return i.jsx(_u,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:k("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n})}function Ou({className:e,inset:t,...r}){return i.jsx(Au,{"data-slot":"dropdown-menu-label","data-inset":t,className:k("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...r})}function Ar({className:e,...t}){return i.jsx(Iu,{"data-slot":"dropdown-menu-separator",className:k("bg-border -mx-1 my-1 h-px",e),...t})}var nr="Avatar",[Lu,gd]=de(nr),[Fu,Lo]=Lu(nr),Fo=s.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[o,a]=s.useState("idle");return i.jsx(Fu,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:i.jsx(O.span,{...n,ref:t})})});Fo.displayName=nr;var $o="AvatarImage",zo=s.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...a}=e,c=Lo($o,r),l=$u(n,a.referrerPolicy),u=J(d=>{o(d),c.onImageLoadingStatusChange(d)});return ie(()=>{l!=="idle"&&u(l)},[l,u]),l==="loaded"?i.jsx(O.img,{...a,ref:t,src:n}):null});zo.displayName=$o;var Go="AvatarFallback",Bo=s.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...o}=e,a=Lo(Go,r),[c,l]=s.useState(n===void 0);return s.useEffect(()=>{if(n!==void 0){const u=window.setTimeout(()=>l(!0),n);return()=>window.clearTimeout(u)}},[n]),c&&a.imageLoadingStatus!=="loaded"?i.jsx(O.span,{...o,ref:t}):null});Bo.displayName=Go;function $u(e,t){const[r,n]=s.useState("idle");return ie(()=>{if(!e){n("error");return}let o=!0;const a=new window.Image,c=l=>()=>{o&&n(l)};return n("loading"),a.onload=c("loaded"),a.onerror=c("error"),a.src=e,t&&(a.referrerPolicy=t),()=>{o=!1}},[e,t]),r}var zu=Fo,Gu=zo,Bu=Bo;function Vu({className:e,...t}){return i.jsx(zu,{"data-slot":"avatar",className:k("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function Wu({className:e,...t}){return i.jsx(Gu,{"data-slot":"avatar-image",className:k("aspect-square size-full",e),...t})}function Uu({className:e,...t}){return i.jsx(Bu,{"data-slot":"avatar-fallback",className:k("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function Ku(){return s.useCallback(e=>{const t=e.trim().split(" ");if(t.length===0)return"";if(t.length===1)return t[0].charAt(0).toUpperCase();const r=t[0].charAt(0),n=t[t.length-1].charAt(0);return`${r}${n}`.toUpperCase()},[])}function Vo({user:e,showEmail:t=!1}){const r=Ku();return i.jsxs(i.Fragment,{children:[i.jsxs(Vu,{className:"h-8 w-8 overflow-hidden rounded-full",children:[i.jsx(Wu,{src:e.avatar,alt:e.name}),i.jsx(Uu,{className:"rounded-lg bg-neutral-200 text-black dark:bg-neutral-700 dark:text-white",children:r(e.name)})]}),i.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[i.jsx("span",{className:"truncate font-medium",children:e.name}),t&&i.jsx("span",{className:"truncate text-xs text-muted-foreground",children:e.email})]})]})}function Hu(){return s.useCallback(()=>{document.body.style.removeProperty("pointer-events")},[])}function Yu({user:e}){const t=Hu(),r=()=>{t(),Xo.flushAll()};return i.jsxs(i.Fragment,{children:[i.jsx(Ou,{className:"p-0 font-normal",children:i.jsx("div",{className:"flex items-center gap-2 px-1 py-1.5 text-left text-sm",children:i.jsx(Vo,{user:e,showEmail:!0})})}),i.jsx(Ar,{}),i.jsx(Du,{children:i.jsx(Nr,{asChild:!0,children:i.jsxs(Ye,{className:"block w-full",href:route("profile.edit"),as:"button",prefetch:!0,onClick:t,children:[i.jsx(Ea,{className:"mr-2"}),"Settings"]})})}),i.jsx(Ar,{}),i.jsx(Nr,{asChild:!0,children:i.jsxs(Ye,{className:"block w-full",method:"post",href:route("logout"),as:"button",onClick:r,children:[i.jsx(xa,{className:"mr-2"}),"Log out"]})})]})}function Xu(){const{auth:e}=Ot().props,{state:t}=ct(),r=Dr();return i.jsx(lt,{children:i.jsx(ut,{children:i.jsxs(ju,{children:[i.jsx(Tu,{asChild:!0,children:i.jsxs(dt,{size:"lg",className:"group text-sidebar-accent-foreground data-[state=open]:bg-sidebar-accent",children:[i.jsx(Vo,{user:e.user}),i.jsx(pa,{className:"ml-auto size-4"})]})}),i.jsx(ku,{className:"w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg",align:"end",side:r?"bottom":t==="collapsed"?"left":"bottom",children:i.jsx(Yu,{user:e.user})})]})})})}function Zu(e){return i.jsx("svg",{...e,viewBox:"0 0 40 42",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.2 5.63325L8.6 0.855469L0 5.63325V32.1434L16.2 41.1434L32.4 32.1434V23.699L40 19.4767V9.85547L31.4 5.07769L22.8 9.85547V18.2999L17.2 21.411V5.63325ZM38 18.2999L32.4 21.411V15.2545L38 12.1434V18.2999ZM36.9409 10.4439L31.4 13.5221L25.8591 10.4439L31.4 7.36561L36.9409 10.4439ZM24.8 18.2999V12.1434L30.4 15.2545V21.411L24.8 18.2999ZM23.8 20.0323L29.3409 23.1105L16.2 30.411L10.6591 27.3328L23.8 20.0323ZM7.6 27.9212L15.2 32.1434V38.2999L2 30.9666V7.92116L7.6 11.0323V27.9212ZM8.6 9.29991L3.05913 6.22165L8.6 3.14339L14.1409 6.22165L8.6 9.29991ZM30.4 24.8101L17.2 32.1434V38.2999L30.4 30.9666V24.8101ZM9.6 11.0323L15.2 7.92117V22.5221L9.6 25.6333V11.0323Z"})})}function qu(){return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"flex aspect-square size-8 items-center justify-center rounded-md bg-sidebar-primary text-sidebar-primary-foreground",children:i.jsx(Zu,{className:"size-5 fill-current text-white dark:text-black"})}),i.jsx("div",{className:"ml-1 grid flex-1 text-left text-sm",children:i.jsx("span",{className:"mb-0.5 truncate leading-tight font-semibold",children:"Laravel Starter Kit"})})]})}const Qu=[{title:"Dashboard",href:"/dashboard",icon:va}],Ju=[{title:"Repository",href:"https://github.com/laravel/react-starter-kit",icon:ha},{title:"Documentation",href:"https://laravel.com/docs/starter-kits#react",icon:da}];function ed(){return i.jsxs(Bc,{collapsible:"icon",variant:"inset",children:[i.jsx(Uc,{children:i.jsx(lt,{children:i.jsx(ut,{children:i.jsx(dt,{size:"lg",asChild:!0,children:i.jsx(Ye,{href:"/dashboard",prefetch:!0,children:i.jsx(qu,{})})})})})}),i.jsx(Hc,{children:i.jsx(tl,{items:Qu})}),i.jsxs(Kc,{children:[i.jsx(el,{items:Ju,className:"mt-auto"}),i.jsx(Xu,{})]})]})}function td({breadcrumbs:e=[]}){return i.jsx("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b border-sidebar-border/50 px-6 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12 md:px-4",children:i.jsx("div",{className:"flex items-center gap-2",children:i.jsx(Vc,{className:"-ml-1"})})})}function rd({children:e,breadcrumbs:t=[]}){return i.jsxs(Qc,{variant:"sidebar",children:[i.jsx(ed,{}),i.jsxs(qc,{variant:"sidebar",className:"overflow-x-hidden",children:[i.jsx(td,{breadcrumbs:t}),e]})]})}const nd=({children:e,breadcrumbs:t,...r})=>i.jsx(rd,{breadcrumbs:t,...r,children:e}),od=[{title:"Dashboard",href:"/dashboard"}];function vd(){return i.jsxs(nd,{breadcrumbs:od,children:[i.jsx(Zo,{title:"Dashboard"}),i.jsxs("div",{className:"flex h-full flex-1 flex-col gap-4 rounded-xl p-4 overflow-x-auto",children:[i.jsxs("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[i.jsx("div",{className:"relative aspect-video overflow-hidden rounded-xl border border-sidebar-border/70 dark:border-sidebar-border",children:i.jsx(Fe,{className:"absolute inset-0 size-full stroke-neutral-900/20 dark:stroke-neutral-100/20"})}),i.jsx("div",{className:"relative aspect-video overflow-hidden rounded-xl border border-sidebar-border/70 dark:border-sidebar-border",children:i.jsx(Fe,{className:"absolute inset-0 size-full stroke-neutral-900/20 dark:stroke-neutral-100/20"})}),i.jsx("div",{className:"relative aspect-video overflow-hidden rounded-xl border border-sidebar-border/70 dark:border-sidebar-border",children:i.jsx(Fe,{className:"absolute inset-0 size-full stroke-neutral-900/20 dark:stroke-neutral-100/20"})})]}),i.jsx("div",{className:"relative min-h-[100vh] flex-1 overflow-hidden rounded-xl border border-sidebar-border/70 md:min-h-min dark:border-sidebar-border",children:i.jsx(Fe,{className:"absolute inset-0 size-full stroke-neutral-900/20 dark:stroke-neutral-100/20"})})]})]})}export{vd as default};
