brd-ui-kit 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +137 -60
- package/dist/brd-ui-kit.css +1 -0
- package/dist/hooks/usePopupControls.d.ts +8 -0
- package/dist/index.cjs +48 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2553 -2527
- package/dist/index.js.map +1 -1
- package/package.json +6 -4
- package/src/styles/globals.css +84 -0
- package/src/styles/theme.css +94 -0
package/dist/index.cjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),Le=require("react"),cc=require("react-dom");function lc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=lc(Le),rn=lc(cc);function uc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=uc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function dc(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=uc(e))&&(r&&(r+=" "),r+=t);return r}const Ki=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,qi=dc,je=(e,t)=>n=>{var r;if(t?.variants==null)return qi(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const d=n?.[u],f=s?.[u];if(d===null)return null;const h=Ki(d)||Ki(f);return o[u][h]}),a=n&&Object.entries(n).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:h,...p}=d;return Object.entries(p).every(b=>{let[g,m]=b;return Array.isArray(m)?m.includes({...s,...a}[g]):{...s,...a}[g]===m})?[...u,f,h]:u},[]);return qi(e,i,l,n?.class,n?.className)},Dp=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Lp=(e,t)=>({classGroupId:e,validator:t}),fc=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),jr="-",Yi=[],jp="arbitrary..",Vp=e=>{const t=$p(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Fp(i);const a=i.split(jr),l=a[0]===""&&a.length>1?1:0;return pc(a,l,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const l=r[i],u=n[i];return l?u?Dp(u,l):l:u||Yi}return n[i]||Yi}}},pc=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const u=pc(e,t+1,s);if(u)return u}const i=n.validators;if(i===null)return;const a=t===0?e.join(jr):e.slice(t).join(jr),l=i.length;for(let u=0;u<l;u++){const d=i[u];if(d.validator(a))return d.classGroupId}},Fp=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?jp+r:void 0})(),$p=e=>{const{theme:t,classGroups:n}=e;return zp(n,t)},zp=(e,t)=>{const n=fc();for(const r in e){const o=e[r];Ls(o,n,r,t)}return n},Ls=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];Bp(i,t,n,r)}},Bp=(e,t,n,r)=>{if(typeof e=="string"){Gp(e,t,n);return}if(typeof e=="function"){Hp(e,t,n,r);return}Wp(e,t,n,r)},Gp=(e,t,n)=>{const r=e===""?t:mc(t,e);r.classGroupId=n},Hp=(e,t,n,r)=>{if(Up(e)){Ls(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Lp(n,e))},Wp=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[a,l]=o[i];Ls(l,mc(t,a),n,r)}},mc=(e,t)=>{let n=e;const r=t.split(jr),o=r.length;for(let s=0;s<o;s++){const i=r[s];let a=n.nextPart.get(i);a||(a=fc(),n.nextPart.set(i,a)),n=a}return n},Up=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Kp=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,i)=>{n[s]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let i=n[s];if(i!==void 0)return i;if((i=r[s])!==void 0)return o(s,i),i},set(s,i){s in n?n[s]=i:o(s,i)}}},ps="!",Xi=":",qp=[],Zi=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Yp=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,l=0,u;const d=o.length;for(let g=0;g<d;g++){const m=o[g];if(i===0&&a===0){if(m===Xi){s.push(o.slice(l,g)),l=g+1;continue}if(m==="/"){u=g;continue}}m==="["?i++:m==="]"?i--:m==="("?a++:m===")"&&a--}const f=s.length===0?o:o.slice(l);let h=f,p=!1;f.endsWith(ps)?(h=f.slice(0,-1),p=!0):f.startsWith(ps)&&(h=f.slice(1),p=!0);const b=u&&u>l?u-l:void 0;return Zi(s,p,h,b)};if(t){const o=t+Xi,s=r;r=i=>i.startsWith(o)?s(i.slice(o.length)):Zi(qp,!1,i,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},Xp=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const i=n[s],a=i[0]==="[",l=t.has(i);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(i)):o.push(i)}return o.length>0&&(o.sort(),r.push(...o)),r}},Zp=e=>({cache:Kp(e.cacheSize),parseClassName:Yp(e),sortModifiers:Xp(e),...Vp(e)}),Qp=/\s+/,Jp=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(Qp);let l="";for(let u=a.length-1;u>=0;u-=1){const d=a[u],{isExternal:f,modifiers:h,hasImportantModifier:p,baseClassName:b,maybePostfixModifierPosition:g}=n(d);if(f){l=d+(l.length>0?" "+l:l);continue}let m=!!g,y=r(m?b.substring(0,g):b);if(!y){if(!m){l=d+(l.length>0?" "+l:l);continue}if(y=r(b),!y){l=d+(l.length>0?" "+l:l);continue}m=!1}const v=h.length===0?"":h.length===1?h[0]:s(h).join(":"),C=p?v+ps:v,w=C+y;if(i.indexOf(w)>-1)continue;i.push(w);const R=o(y,m);for(let k=0;k<R.length;++k){const S=R[k];i.push(C+S)}l=d+(l.length>0?" "+l:l)}return l},em=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=hc(n))&&(o&&(o+=" "),o+=r);return o},hc=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=hc(e[r]))&&(n&&(n+=" "),n+=t);return n},tm=(e,...t)=>{let n,r,o,s;const i=l=>{const u=t.reduce((d,f)=>f(d),e());return n=Zp(u),r=n.cache.get,o=n.cache.set,s=a,a(l)},a=l=>{const u=r(l);if(u)return u;const d=Jp(l,n);return o(l,d),d};return s=i,(...l)=>s(em(...l))},nm=[],He=e=>{const t=n=>n[e]||nm;return t.isThemeGetter=!0,t},gc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,bc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,rm=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,om=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sm=/\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$/,im=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,am=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ut=e=>rm.test(e),me=e=>!!e&&!Number.isNaN(Number(e)),Kt=e=>!!e&&Number.isInteger(Number(e)),Ho=e=>e.endsWith("%")&&me(e.slice(0,-1)),Dt=e=>om.test(e),vc=()=>!0,lm=e=>sm.test(e)&&!im.test(e),js=()=>!1,um=e=>am.test(e),dm=e=>cm.test(e),fm=e=>!J(e)&&!ee(e),pm=e=>on(e,wc,js),J=e=>gc.test(e),fn=e=>on(e,Cc,lm),Qi=e=>on(e,wm,me),mm=e=>on(e,Rc,vc),hm=e=>on(e,Ec,js),Ji=e=>on(e,yc,js),gm=e=>on(e,xc,dm),pr=e=>on(e,Sc,um),ee=e=>bc.test(e),zn=e=>xn(e,Cc),bm=e=>xn(e,Ec),ea=e=>xn(e,yc),vm=e=>xn(e,wc),ym=e=>xn(e,xc),mr=e=>xn(e,Sc,!0),xm=e=>xn(e,Rc,!0),on=(e,t,n)=>{const r=gc.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},xn=(e,t,n=!1)=>{const r=bc.exec(e);return r?r[1]?t(r[1]):n:!1},yc=e=>e==="position"||e==="percentage",xc=e=>e==="image"||e==="url",wc=e=>e==="length"||e==="size"||e==="bg-size",Cc=e=>e==="length",wm=e=>e==="number",Ec=e=>e==="family-name",Rc=e=>e==="number"||e==="weight",Sc=e=>e==="shadow",Cm=()=>{const e=He("color"),t=He("font"),n=He("text"),r=He("font-weight"),o=He("tracking"),s=He("leading"),i=He("breakpoint"),a=He("container"),l=He("spacing"),u=He("radius"),d=He("shadow"),f=He("inset-shadow"),h=He("text-shadow"),p=He("drop-shadow"),b=He("blur"),g=He("perspective"),m=He("aspect"),y=He("ease"),v=He("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...w(),ee,J],k=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],E=()=>[ee,J,l],V=()=>[Ut,"full","auto",...E()],W=()=>[Kt,"none","subgrid",ee,J],H=()=>["auto",{span:["full",Kt,ee,J]},Kt,ee,J],P=()=>[Kt,"auto",ee,J],q=()=>["auto","min","max","fr",ee,J],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...E()],B=()=>[Ut,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],j=()=>[Ut,"screen","full","dvw","lvw","svw","min","max","fit",...E()],te=()=>[Ut,"screen","full","lh","dvh","lvh","svh","min","max","fit",...E()],T=()=>[e,ee,J],we=()=>[...w(),ea,Ji,{position:[ee,J]}],fe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ye=()=>["auto","cover","contain",vm,pm,{size:[ee,J]}],ae=()=>[Ho,zn,fn],ce=()=>["","none","full",u,ee,J],ge=()=>["",me,zn,fn],Ce=()=>["solid","dashed","dotted","double"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[me,Ho,ea,Ji],pe=()=>["","none",b,ee,J],xe=()=>["none",me,ee,J],O=()=>["none",me,ee,J],A=()=>[me,ee,J],F=()=>[Ut,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Dt],breakpoint:[Dt],color:[vc],container:[Dt],"drop-shadow":[Dt],ease:["in","out","in-out"],font:[fm],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Dt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Dt],shadow:[Dt],spacing:["px",me],text:[Dt],"text-shadow":[Dt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ut,J,ee,m]}],container:["container"],columns:[{columns:[me,J,ee,a]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:R()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{"inset-s":V(),start:V()}],end:[{"inset-e":V(),end:V()}],"inset-bs":[{"inset-bs":V()}],"inset-be":[{"inset-be":V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[Kt,"auto",ee,J]}],basis:[{basis:[Ut,"full","auto",a,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[me,Ut,"auto","initial","none",J]}],grow:[{grow:["",me,ee,J]}],shrink:[{shrink:["",me,ee,J]}],order:[{order:[Kt,"first","last","none",ee,J]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":q()}],"auto-rows":[{"auto-rows":q()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pbs:[{pbs:E()}],pbe:[{pbe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],"inline-size":[{inline:["auto",...j()]}],"min-inline-size":[{"min-inline":["auto",...j()]}],"max-inline-size":[{"max-inline":["none",...j()]}],"block-size":[{block:["auto",...te()]}],"min-block-size":[{"min-block":["auto",...te()]}],"max-block-size":[{"max-block":["none",...te()]}],w:[{w:[a,"screen",...B()]}],"min-w":[{"min-w":[a,"screen","none",...B()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh",...B()]}],"font-size":[{text:["base",n,zn,fn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,xm,mm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ho,J]}],"font-family":[{font:[bm,hm,t]}],"font-features":[{"font-features":[J]}],"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,ee,J]}],"line-clamp":[{"line-clamp":[me,"none",ee,Qi]}],leading:[{leading:[s,...E()]}],"list-image":[{"list-image":["none",ee,J]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ee,J]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[me,"from-font","auto",ee,fn]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[me,"auto",ee,J]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee,J]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee,J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:we()}],"bg-repeat":[{bg:fe()}],"bg-size":[{bg:ye()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Kt,ee,J],radial:["",ee,J],conic:[Kt,ee,J]},ym,gm]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:ge()}],"border-w-x":[{"border-x":ge()}],"border-w-y":[{"border-y":ge()}],"border-w-s":[{"border-s":ge()}],"border-w-e":[{"border-e":ge()}],"border-w-bs":[{"border-bs":ge()}],"border-w-be":[{"border-be":ge()}],"border-w-t":[{"border-t":ge()}],"border-w-r":[{"border-r":ge()}],"border-w-b":[{"border-b":ge()}],"border-w-l":[{"border-l":ge()}],"divide-x":[{"divide-x":ge()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ge()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ce(),"hidden","none"]}],"divide-style":[{divide:[...Ce(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...Ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[me,ee,J]}],"outline-w":[{outline:["",me,zn,fn]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",d,mr,pr]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",f,mr,pr]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[me,fn]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":ge()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",h,mr,pr]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[me,ee,J]}],"mix-blend":[{"mix-blend":[...Se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[me]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[ee,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[me]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:we()}],"mask-repeat":[{mask:fe()}],"mask-size":[{mask:ye()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ee,J]}],filter:[{filter:["","none",ee,J]}],blur:[{blur:pe()}],brightness:[{brightness:[me,ee,J]}],contrast:[{contrast:[me,ee,J]}],"drop-shadow":[{"drop-shadow":["","none",p,mr,pr]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",me,ee,J]}],"hue-rotate":[{"hue-rotate":[me,ee,J]}],invert:[{invert:["",me,ee,J]}],saturate:[{saturate:[me,ee,J]}],sepia:[{sepia:["",me,ee,J]}],"backdrop-filter":[{"backdrop-filter":["","none",ee,J]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[me,ee,J]}],"backdrop-contrast":[{"backdrop-contrast":[me,ee,J]}],"backdrop-grayscale":[{"backdrop-grayscale":["",me,ee,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[me,ee,J]}],"backdrop-invert":[{"backdrop-invert":["",me,ee,J]}],"backdrop-opacity":[{"backdrop-opacity":[me,ee,J]}],"backdrop-saturate":[{"backdrop-saturate":[me,ee,J]}],"backdrop-sepia":[{"backdrop-sepia":["",me,ee,J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ee,J]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[me,"initial",ee,J]}],ease:[{ease:["linear","initial",y,ee,J]}],delay:[{delay:[me,ee,J]}],animate:[{animate:["none",v,ee,J]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,ee,J]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:xe()}],"rotate-x":[{"rotate-x":xe()}],"rotate-y":[{"rotate-y":xe()}],"rotate-z":[{"rotate-z":xe()}],scale:[{scale:O()}],"scale-x":[{"scale-x":O()}],"scale-y":[{"scale-y":O()}],"scale-z":[{"scale-z":O()}],"scale-3d":["scale-3d"],skew:[{skew:A()}],"skew-x":[{"skew-x":A()}],"skew-y":[{"skew-y":A()}],transform:[{transform:[ee,J,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:F()}],"translate-x":[{"translate-x":F()}],"translate-y":[{"translate-y":F()}],"translate-z":[{"translate-z":F()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"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",ee,J]}],"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":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mbs":[{"scroll-mbs":E()}],"scroll-mbe":[{"scroll-mbe":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pbs":[{"scroll-pbs":E()}],"scroll-pbe":[{"scroll-pbe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",ee,J]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[me,zn,fn,Qi]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Em=tm(Cm);function z(...e){return Em(dc(e))}const Rm=["h1","h2","h3","body-xl-regular","body-xl-medium","body-lg-regular","body-lg-medium","body-md-regular","body-md-medium","body-sm-regular","body-sm-medium","body-xs-regular","body-xs-medium"],Vs=je("tracking-normal",{variants:{variant:{h1:"text-h1 font-medium",h2:"text-h2 font-medium",h3:"text-h3 font-medium","body-xl-regular":"text-xl font-normal","body-xl-medium":"text-xl font-medium","body-lg-regular":"text-lg font-normal","body-lg-medium":"text-lg font-medium","body-md-regular":"text-base font-normal","body-md-medium":"text-base font-medium","body-sm-regular":"text-sm font-normal","body-sm-medium":"text-sm font-medium","body-xs-regular":"text-xs font-normal","body-xs-medium":"text-xs font-medium"}},defaultVariants:{variant:"body-md-regular"}}),qe=(e="body-md-regular")=>Vs({variant:e}),Sm={h1:"h1",h2:"h2",h3:"h3","body-xl-regular":"p","body-xl-medium":"p","body-lg-regular":"p","body-lg-medium":"p","body-md-regular":"p","body-md-medium":"p","body-sm-regular":"p","body-sm-medium":"p","body-xs-regular":"p","body-xs-medium":"p"},km=({as:e,className:t,variant:n,...r})=>{const o=n??"body-md-regular",s=e??Sm[o];return x.jsx(s,{className:z(Vs({variant:o}),t),...r})},kc=je(`inline-flex items-center justify-center gap-2 px-2 transition-colors
|
|
2
|
-
focus:outline-none`,{variants:{variant:{waiting:"bg-warning-bg text-warning-text",in_progress:"bg-success-bg text-success-text",negotiation:"bg-negotiation-bg text-negotiation-text",documents:"bg-invalid-bg text-invalid-text",new:"bg-info-new-bg text-info-new-text",followup:"bg-follow-up-bg text-follow-up-text",interested:"bg-warning-bg text-warning-text",proposal:"bg-proposal-bg text-proposal-text",action_required:"bg-error-bg text-error-text",contract:"bg-contract-bg text-contract-text",completed:"bg-success-bg text-success-text",invalid:"bg-invalid-bg text-invalid-text"},kind:{status:"rounded-[0.875rem] py-1",priority:"rounded py-1"},dotPosition:{left:"py-1.5",right:"flex-row-reverse py-1.5"}},defaultVariants:{variant:"waiting",kind:"status"}}),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),Le=require("react"),pc=require("react-dom");function mc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=mc(Le),rn=mc(pc);function hc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=hc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function gc(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=hc(e))&&(r&&(r+=" "),r+=t);return r}const zp=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Bp=(e,t)=>({classGroupId:e,validator:t}),bc=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),$r="-",Xi=[],Gp="arbitrary..",Hp=e=>{const t=Up(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Wp(i);const a=i.split($r),l=a[0]===""&&a.length>1?1:0;return vc(a,l,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const l=r[i],u=n[i];return l?u?zp(u,l):l:u||Xi}return n[i]||Xi}}},vc=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const u=vc(e,t+1,s);if(u)return u}const i=n.validators;if(i===null)return;const a=t===0?e.join($r):e.slice(t).join($r),l=i.length;for(let u=0;u<l;u++){const d=i[u];if(d.validator(a))return d.classGroupId}},Wp=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Gp+r:void 0})(),Up=e=>{const{theme:t,classGroups:n}=e;return Kp(n,t)},Kp=(e,t)=>{const n=bc();for(const r in e){const o=e[r];Fs(o,n,r,t)}return n},Fs=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];qp(i,t,n,r)}},qp=(e,t,n,r)=>{if(typeof e=="string"){Yp(e,t,n);return}if(typeof e=="function"){Xp(e,t,n,r);return}Zp(e,t,n,r)},Yp=(e,t,n)=>{const r=e===""?t:yc(t,e);r.classGroupId=n},Xp=(e,t,n,r)=>{if(Qp(e)){Fs(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Bp(n,e))},Zp=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[a,l]=o[i];Fs(l,yc(t,a),n,r)}},yc=(e,t)=>{let n=e;const r=t.split($r),o=r.length;for(let s=0;s<o;s++){const i=r[s];let a=n.nextPart.get(i);a||(a=bc(),n.nextPart.set(i,a)),n=a}return n},Qp=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Jp=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,i)=>{n[s]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let i=n[s];if(i!==void 0)return i;if((i=r[s])!==void 0)return o(s,i),i},set(s,i){s in n?n[s]=i:o(s,i)}}},gs="!",Zi=":",em=[],Qi=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),tm=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,l=0,u;const d=o.length;for(let g=0;g<d;g++){const m=o[g];if(i===0&&a===0){if(m===Zi){s.push(o.slice(l,g)),l=g+1;continue}if(m==="/"){u=g;continue}}m==="["?i++:m==="]"?i--:m==="("?a++:m===")"&&a--}const f=s.length===0?o:o.slice(l);let h=f,p=!1;f.endsWith(gs)?(h=f.slice(0,-1),p=!0):f.startsWith(gs)&&(h=f.slice(1),p=!0);const b=u&&u>l?u-l:void 0;return Qi(s,p,h,b)};if(t){const o=t+Zi,s=r;r=i=>i.startsWith(o)?s(i.slice(o.length)):Qi(em,!1,i,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},nm=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const i=n[s],a=i[0]==="[",l=t.has(i);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(i)):o.push(i)}return o.length>0&&(o.sort(),r.push(...o)),r}},rm=e=>({cache:Jp(e.cacheSize),parseClassName:tm(e),sortModifiers:nm(e),...Hp(e)}),om=/\s+/,sm=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(om);let l="";for(let u=a.length-1;u>=0;u-=1){const d=a[u],{isExternal:f,modifiers:h,hasImportantModifier:p,baseClassName:b,maybePostfixModifierPosition:g}=n(d);if(f){l=d+(l.length>0?" "+l:l);continue}let m=!!g,y=r(m?b.substring(0,g):b);if(!y){if(!m){l=d+(l.length>0?" "+l:l);continue}if(y=r(b),!y){l=d+(l.length>0?" "+l:l);continue}m=!1}const v=h.length===0?"":h.length===1?h[0]:s(h).join(":"),C=p?v+gs:v,w=C+y;if(i.indexOf(w)>-1)continue;i.push(w);const R=o(y,m);for(let k=0;k<R.length;++k){const S=R[k];i.push(C+S)}l=d+(l.length>0?" "+l:l)}return l},im=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=xc(n))&&(o&&(o+=" "),o+=r);return o},xc=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=xc(e[r]))&&(n&&(n+=" "),n+=t);return n},Ji=(e,...t)=>{let n,r,o,s;const i=l=>{const u=t.reduce((d,f)=>f(d),e());return n=rm(u),r=n.cache.get,o=n.cache.set,s=a,a(l)},a=l=>{const u=r(l);if(u)return u;const d=sm(l,n);return o(l,d),d};return s=i,(...l)=>s(im(...l))},am=[],He=e=>{const t=n=>n[e]||am;return t.isThemeGetter=!0,t},wc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Cc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,cm=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,lm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,um=/\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$/,dm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ut=e=>cm.test(e),me=e=>!!e&&!Number.isNaN(Number(e)),Kt=e=>!!e&&Number.isInteger(Number(e)),Ko=e=>e.endsWith("%")&&me(e.slice(0,-1)),Dt=e=>lm.test(e),Ec=()=>!0,mm=e=>um.test(e)&&!dm.test(e),$s=()=>!1,hm=e=>fm.test(e),gm=e=>pm.test(e),bm=e=>!J(e)&&!ee(e),vm=e=>on(e,kc,$s),J=e=>wc.test(e),fn=e=>on(e,Ic,mm),ea=e=>on(e,km,me),ym=e=>on(e,Oc,Ec),xm=e=>on(e,Nc,$s),ta=e=>on(e,Rc,$s),wm=e=>on(e,Sc,gm),mr=e=>on(e,Pc,hm),ee=e=>Cc.test(e),zn=e=>xn(e,Ic),Cm=e=>xn(e,Nc),na=e=>xn(e,Rc),Em=e=>xn(e,kc),Rm=e=>xn(e,Sc),hr=e=>xn(e,Pc,!0),Sm=e=>xn(e,Oc,!0),on=(e,t,n)=>{const r=wc.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},xn=(e,t,n=!1)=>{const r=Cc.exec(e);return r?r[1]?t(r[1]):n:!1},Rc=e=>e==="position"||e==="percentage",Sc=e=>e==="image"||e==="url",kc=e=>e==="length"||e==="size"||e==="bg-size",Ic=e=>e==="length",km=e=>e==="number",Nc=e=>e==="family-name",Oc=e=>e==="number"||e==="weight",Pc=e=>e==="shadow",ra=()=>{const e=He("color"),t=He("font"),n=He("text"),r=He("font-weight"),o=He("tracking"),s=He("leading"),i=He("breakpoint"),a=He("container"),l=He("spacing"),u=He("radius"),d=He("shadow"),f=He("inset-shadow"),h=He("text-shadow"),p=He("drop-shadow"),b=He("blur"),g=He("perspective"),m=He("aspect"),y=He("ease"),v=He("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...w(),ee,J],k=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],E=()=>[ee,J,l],V=()=>[Ut,"full","auto",...E()],W=()=>[Kt,"none","subgrid",ee,J],H=()=>["auto",{span:["full",Kt,ee,J]},Kt,ee,J],P=()=>[Kt,"auto",ee,J],q=()=>["auto","min","max","fr",ee,J],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...E()],B=()=>[Ut,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],j=()=>[Ut,"screen","full","dvw","lvw","svw","min","max","fit",...E()],te=()=>[Ut,"screen","full","lh","dvh","lvh","svh","min","max","fit",...E()],T=()=>[e,ee,J],we=()=>[...w(),na,ta,{position:[ee,J]}],fe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ye=()=>["auto","cover","contain",Em,vm,{size:[ee,J]}],ae=()=>[Ko,zn,fn],ce=()=>["","none","full",u,ee,J],ge=()=>["",me,zn,fn],Ce=()=>["solid","dashed","dotted","double"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[me,Ko,na,ta],pe=()=>["","none",b,ee,J],xe=()=>["none",me,ee,J],O=()=>["none",me,ee,J],A=()=>[me,ee,J],F=()=>[Ut,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Dt],breakpoint:[Dt],color:[Ec],container:[Dt],"drop-shadow":[Dt],ease:["in","out","in-out"],font:[bm],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Dt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Dt],shadow:[Dt],spacing:["px",me],text:[Dt],"text-shadow":[Dt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ut,J,ee,m]}],container:["container"],columns:[{columns:[me,J,ee,a]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:R()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{"inset-s":V(),start:V()}],end:[{"inset-e":V(),end:V()}],"inset-bs":[{"inset-bs":V()}],"inset-be":[{"inset-be":V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[Kt,"auto",ee,J]}],basis:[{basis:[Ut,"full","auto",a,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[me,Ut,"auto","initial","none",J]}],grow:[{grow:["",me,ee,J]}],shrink:[{shrink:["",me,ee,J]}],order:[{order:[Kt,"first","last","none",ee,J]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":q()}],"auto-rows":[{"auto-rows":q()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pbs:[{pbs:E()}],pbe:[{pbe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],"inline-size":[{inline:["auto",...j()]}],"min-inline-size":[{"min-inline":["auto",...j()]}],"max-inline-size":[{"max-inline":["none",...j()]}],"block-size":[{block:["auto",...te()]}],"min-block-size":[{"min-block":["auto",...te()]}],"max-block-size":[{"max-block":["none",...te()]}],w:[{w:[a,"screen",...B()]}],"min-w":[{"min-w":[a,"screen","none",...B()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh",...B()]}],"font-size":[{text:["base",n,zn,fn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Sm,ym]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ko,J]}],"font-family":[{font:[Cm,xm,t]}],"font-features":[{"font-features":[J]}],"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,ee,J]}],"line-clamp":[{"line-clamp":[me,"none",ee,ea]}],leading:[{leading:[s,...E()]}],"list-image":[{"list-image":["none",ee,J]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ee,J]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[me,"from-font","auto",ee,fn]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[me,"auto",ee,J]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee,J]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee,J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:we()}],"bg-repeat":[{bg:fe()}],"bg-size":[{bg:ye()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Kt,ee,J],radial:["",ee,J],conic:[Kt,ee,J]},Rm,wm]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:ge()}],"border-w-x":[{"border-x":ge()}],"border-w-y":[{"border-y":ge()}],"border-w-s":[{"border-s":ge()}],"border-w-e":[{"border-e":ge()}],"border-w-bs":[{"border-bs":ge()}],"border-w-be":[{"border-be":ge()}],"border-w-t":[{"border-t":ge()}],"border-w-r":[{"border-r":ge()}],"border-w-b":[{"border-b":ge()}],"border-w-l":[{"border-l":ge()}],"divide-x":[{"divide-x":ge()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ge()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ce(),"hidden","none"]}],"divide-style":[{divide:[...Ce(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...Ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[me,ee,J]}],"outline-w":[{outline:["",me,zn,fn]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",d,hr,mr]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",f,hr,mr]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[me,fn]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":ge()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",h,hr,mr]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[me,ee,J]}],"mix-blend":[{"mix-blend":[...Se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[me]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[ee,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[me]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:we()}],"mask-repeat":[{mask:fe()}],"mask-size":[{mask:ye()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ee,J]}],filter:[{filter:["","none",ee,J]}],blur:[{blur:pe()}],brightness:[{brightness:[me,ee,J]}],contrast:[{contrast:[me,ee,J]}],"drop-shadow":[{"drop-shadow":["","none",p,hr,mr]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",me,ee,J]}],"hue-rotate":[{"hue-rotate":[me,ee,J]}],invert:[{invert:["",me,ee,J]}],saturate:[{saturate:[me,ee,J]}],sepia:[{sepia:["",me,ee,J]}],"backdrop-filter":[{"backdrop-filter":["","none",ee,J]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[me,ee,J]}],"backdrop-contrast":[{"backdrop-contrast":[me,ee,J]}],"backdrop-grayscale":[{"backdrop-grayscale":["",me,ee,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[me,ee,J]}],"backdrop-invert":[{"backdrop-invert":["",me,ee,J]}],"backdrop-opacity":[{"backdrop-opacity":[me,ee,J]}],"backdrop-saturate":[{"backdrop-saturate":[me,ee,J]}],"backdrop-sepia":[{"backdrop-sepia":["",me,ee,J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ee,J]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[me,"initial",ee,J]}],ease:[{ease:["linear","initial",y,ee,J]}],delay:[{delay:[me,ee,J]}],animate:[{animate:["none",v,ee,J]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,ee,J]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:xe()}],"rotate-x":[{"rotate-x":xe()}],"rotate-y":[{"rotate-y":xe()}],"rotate-z":[{"rotate-z":xe()}],scale:[{scale:O()}],"scale-x":[{"scale-x":O()}],"scale-y":[{"scale-y":O()}],"scale-z":[{"scale-z":O()}],"scale-3d":["scale-3d"],skew:[{skew:A()}],"skew-x":[{"skew-x":A()}],"skew-y":[{"skew-y":A()}],transform:[{transform:[ee,J,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:F()}],"translate-x":[{"translate-x":F()}],"translate-y":[{"translate-y":F()}],"translate-z":[{"translate-z":F()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"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",ee,J]}],"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":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mbs":[{"scroll-mbs":E()}],"scroll-mbe":[{"scroll-mbe":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pbs":[{"scroll-pbs":E()}],"scroll-pbe":[{"scroll-pbe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",ee,J]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[me,zn,fn,ea]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Im=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:o={},override:s={}})=>(Wn(e,"cacheSize",t),Wn(e,"prefix",n),Wn(e,"experimentalParseClassName",r),gr(e.theme,s.theme),gr(e.classGroups,s.classGroups),gr(e.conflictingClassGroups,s.conflictingClassGroups),gr(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),Wn(e,"orderSensitiveModifiers",s.orderSensitiveModifiers),br(e.theme,o.theme),br(e.classGroups,o.classGroups),br(e.conflictingClassGroups,o.conflictingClassGroups),br(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),Tc(e,o,"orderSensitiveModifiers"),e),Wn=(e,t,n)=>{n!==void 0&&(e[t]=n)},gr=(e,t)=>{if(t)for(const n in t)Wn(e,n,t[n])},br=(e,t)=>{if(t)for(const n in t)Tc(e,t,n)},Tc=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},Nm=(e,...t)=>typeof e=="function"?Ji(ra,e,...t):Ji(()=>Im(ra(),e),...t),Om=Nm({extend:{theme:{text:["h1","h2","h3"]}}});function z(...e){return Om(gc(e))}const oa=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,sa=gc,je=(e,t)=>n=>{var r;if(t?.variants==null)return sa(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const d=n?.[u],f=s?.[u];if(d===null)return null;const h=oa(d)||oa(f);return o[u][h]}),a=n&&Object.entries(n).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:h,...p}=d;return Object.entries(p).every(b=>{let[g,m]=b;return Array.isArray(m)?m.includes({...s,...a}[g]):{...s,...a}[g]===m})?[...u,f,h]:u},[]);return sa(e,i,l,n?.class,n?.className)},Pm=["h1","h2","h3","body-xl-regular","body-xl-medium","body-lg-regular","body-lg-medium","body-md-regular","body-md-medium","body-sm-regular","body-sm-medium","body-xs-regular","body-xs-medium"],zs=je("tracking-normal",{variants:{variant:{h1:"text-h1 font-medium",h2:"text-h2 font-medium",h3:"text-h3 font-medium","body-xl-regular":"text-xl font-normal","body-xl-medium":"text-xl font-medium","body-lg-regular":"text-lg font-normal","body-lg-medium":"text-lg font-medium","body-md-regular":"text-base font-normal","body-md-medium":"text-base font-medium","body-sm-regular":"text-sm font-normal","body-sm-medium":"text-sm font-medium","body-xs-regular":"text-xs font-normal","body-xs-medium":"text-xs font-medium"}},defaultVariants:{variant:"body-md-regular"}}),qe=(e="body-md-regular")=>zs({variant:e}),Tm={h1:"h1",h2:"h2",h3:"h3","body-xl-regular":"p","body-xl-medium":"p","body-lg-regular":"p","body-lg-medium":"p","body-md-regular":"p","body-md-medium":"p","body-sm-regular":"p","body-sm-medium":"p","body-xs-regular":"p","body-xs-medium":"p"},Am=({as:e,className:t,variant:n,...r})=>{const o=n??"body-md-regular",s=e??Tm[o];return x.jsx(s,{className:z(zs({variant:o}),t),...r})},Ac=je(`inline-flex items-center justify-center gap-2 px-2 transition-colors
|
|
2
|
+
focus:outline-none`,{variants:{variant:{waiting:"bg-warning-bg text-warning-text",in_progress:"bg-success-bg text-success-text",negotiation:"bg-negotiation-bg text-negotiation-text",documents:"bg-invalid-bg text-invalid-text",new:"bg-info-new-bg text-info-new-text",followup:"bg-follow-up-bg text-follow-up-text",interested:"bg-warning-bg text-warning-text",proposal:"bg-proposal-bg text-proposal-text",action_required:"bg-error-bg text-error-text",contract:"bg-contract-bg text-contract-text",completed:"bg-success-bg text-success-text",invalid:"bg-invalid-bg text-invalid-text"},kind:{status:"rounded-[0.875rem] py-1",priority:"rounded py-1"},dotPosition:{left:"py-1.5",right:"flex-row-reverse py-1.5"}},defaultVariants:{variant:"waiting",kind:"status"}}),Mm=je("tracking-normal whitespace-nowrap",{variants:{kind:{status:qe("body-xs-medium"),priority:qe("body-sm-regular")}},defaultVariants:{kind:"status"}});function _m({variant:e,kind:t="status",dotPosition:n,classNames:r={},children:o,...s}){const i=!!n,{className:a,dotClassName:l,labelClassName:u}=r;return x.jsxs("div",{className:z(Ac({variant:e,kind:t,dotPosition:n}),a),...s,children:[i&&x.jsx("span",{className:z("inline-block h-2 w-2 rounded-full bg-current",l),"aria-hidden":"true"}),x.jsx("span",{className:z(Mm({kind:t}),u),children:o})]})}function ia(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Bs(...e){return t=>{let n=!1;const r=e.map(o=>{const s=ia(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():ia(e[o],null)}}}}function ze(...e){return c.useCallback(Bs(...e),e)}var Dm=Symbol.for("react.lazy"),zr=c[" use ".trim().toString()];function Lm(e){return typeof e=="object"&&e!==null&&"then"in e}function Mc(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Dm&&"_payload"in e&&Lm(e._payload)}function _c(e){const t=Vm(e),n=c.forwardRef((r,o)=>{let{children:s,...i}=r;Mc(s)&&typeof zr=="function"&&(s=zr(s._payload));const a=c.Children.toArray(s),l=a.find($m);if(l){const u=l.props.children,d=a.map(f=>f===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:f);return x.jsx(t,{...i,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return x.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var jm=_c("Slot");function Vm(e){const t=c.forwardRef((n,r)=>{let{children:o,...s}=n;if(Mc(o)&&typeof zr=="function"&&(o=zr(o._payload)),c.isValidElement(o)){const i=Bm(o),a=zm(s,o.props);return o.type!==c.Fragment&&(a.ref=r?Bs(r,i):i),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fm=Symbol("radix.slottable");function $m(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fm}function zm(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Bm(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Gs=je(["inline-flex cursor-pointer items-center justify-center rounded-xl font-medium tracking-normal whitespace-nowrap transition-colors","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:origin-center","disabled:bg-disabled-bg disabled:text-disabled-text disabled:pointer-events-none"].join(" "),{variants:{variant:{primary:`bg-primary-inverse-bg text-primary-inverse-text
|
|
3
3
|
hover:bg-primary-inverse-hover-bg`,secondary:"bg-secondary-bg text-primary-text hover:bg-primary-hover-bg",secondaryBorder:`bg-primary-bg text-primary-text hover:bg-primary-hover-bg
|
|
4
4
|
disabled:border-inp-disabled-border border`,link:"text-primary-text hover:text-secondary-text underline underline-offset-3",ghost:`hover:bg-tertiary-bg hover:text-primary-text aria-expanded:bg-tertiary-bg
|
|
5
5
|
aria-expanded:text-primary-text`},size:{lg:`${qe("body-lg-medium")} w-fit gap-2 px-4.5 py-3
|
|
6
6
|
[&_svg]:size-[18px]`,md:`${qe("body-md-medium")} w-fit gap-2 px-4.5 py-2
|
|
7
7
|
[&_svg]:size-4`,sm:`${qe("body-sm-medium")} w-fit gap-2 px-3 py-2
|
|
8
8
|
[&_svg]:size-4`,xs:`${qe("body-xs-medium")} w-fit gap-1 px-3 py-2
|
|
9
|
-
[&_svg]:size-[14px]`,default:`${qe("body-sm-medium")} size-9 [&_svg]:size-4`}},compoundVariants:[{variant:"link",size:"lg",className:"[&_svg]:size-5"}],defaultVariants:{variant:"primary",size:"md"}}),
|
|
9
|
+
[&_svg]:size-[14px]`,default:`${qe("body-sm-medium")} size-9 [&_svg]:size-4`}},compoundVariants:[{variant:"link",size:"lg",className:"[&_svg]:size-5"}],defaultVariants:{variant:"primary",size:"md"}}),oo=({className:e,variant:t,size:n,asChild:r=!1,ref:o,...s})=>{const i=r?jm:"button";return x.jsx(i,{className:z(Gs({variant:t,size:n,className:e})),ref:o,...s})};oo.displayName="Button";const Gm=je("group/card rounded-lg",{variants:{variant:{light:`bg-primary-bg text-primary-text border-delicate-border
|
|
10
10
|
hover:border-default-border hover:bg-secondary-bg shadow-[0_2px_6px_rgba(0,0,0,0.1)]
|
|
11
11
|
hover:shadow-[0_2px_6px_rgba(0,0,0,0.12)]`,dark:`bg-secondary-inverse-bg text-primary-inverse-text
|
|
12
12
|
hover:bg-tertiary-inverse-bg border-transparent shadow-[0_1px_3px_rgba(0,0,0,0.2)]
|
|
13
|
-
hover:shadow-[0_6px_16px_rgba(0,0,0,0.30)]`},active:{true:"",false:""}},defaultVariants:{variant:"light",active:!1},compoundVariants:[{variant:"light",active:!0,class:"bg-tertiary-bg border-default-border shadow-[0_2px_6px_rgba(0,0,0,0.1)]"},{variant:"dark",active:!0,class:"bg-tertiary-inverse-bg shadow-[0_2px_6px_rgba(0,0,0,0.25)]"}]}),
|
|
14
|
-
tracking-tight`)
|
|
15
|
-
group-data-[disabled=true]/card:text-disabled-text`),zm=je("group-data-[disabled=true]/card:text-disabled-text p-6 pt-0"),Bm=je("group-data-[disabled=true]/card:text-disabled-text flex items-center p-6 pt-0"),Oc=({ref:e,className:t,variant:n,disabled:r,active:o,...s})=>x.jsx("div",{ref:e,"data-disabled":r||void 0,className:z(jm({variant:n,active:o}),t),...s});Oc.displayName="Card";const Pc=({ref:e,className:t,...n})=>x.jsx("div",{ref:e,className:z(Vm(),t),...n});Pc.displayName="CardHeader";const Tc=({ref:e,className:t,...n})=>x.jsx("div",{ref:e,className:z(Fm(),t),...n});Tc.displayName="CardTitle";const Ac=({ref:e,className:t,...n})=>x.jsx("div",{ref:e,className:z($m(),t),...n});Ac.displayName="CardDescription";const Mc=({ref:e,className:t,...n})=>x.jsx("div",{ref:e,className:z(zm(),t),...n});Mc.displayName="CardContent";const _c=({ref:e,className:t,...n})=>x.jsx("div",{ref:e,className:z(Bm(),t),...n});_c.displayName="CardFooter";function Gm(e,t){const n=c.createContext(t),r=s=>{const{children:i,...a}=s,l=c.useMemo(()=>a,Object.values(a));return x.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function o(s){const i=c.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function At(e,t=[]){let n=[];function r(s,i){const a=c.createContext(i),l=n.length;n=[...n,i];const u=f=>{const{scope:h,children:p,...b}=f,g=h?.[e]?.[l]||a,m=c.useMemo(()=>b,Object.values(b));return x.jsx(g.Provider,{value:m,children:p})};u.displayName=s+"Provider";function d(f,h){const p=h?.[e]?.[l]||a,b=c.useContext(p);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(i=>c.createContext(i));return function(a){const l=a?.[e]||s;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,Hm(o,...t)]}function Hm(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...a,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Ne(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var tn=globalThis?.document?c.useLayoutEffect:()=>{},Wm=c[" useInsertionEffect ".trim().toString()]||tn;function wn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=Um({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const d=c.useRef(e!==void 0);c.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const u=c.useCallback(d=>{if(a){const f=Km(d)?d(e):d;f!==e&&i.current?.(f)}else s(d)},[a,e,s,i]);return[l,u]}function Um({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),s=c.useRef(t);return Wm(()=>{s.current=t},[t]),c.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function Km(e){return typeof e=="function"}function zs(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function no(e){const[t,n]=c.useState(void 0);return tn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function qm(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var $t=e=>{const{present:t,children:n}=e,r=Ym(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=ze(r.ref,Xm(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};$t.displayName="Presence";function Ym(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),s=c.useRef("none"),i=e?"mounted":"unmounted",[a,l]=qm(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=hr(r.current);s.current=a==="mounted"?u:"none"},[a]),tn(()=>{const u=r.current,d=o.current;if(d!==e){const h=s.current,p=hr(u);e?l("MOUNT"):p==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),tn(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=p=>{const g=hr(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&g&&(l("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},h=p=>{p.target===t&&(s.current=hr(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function hr(e){return e?.animationName||"none"}function Xm(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Fr(e){const t=Zm(e),n=c.forwardRef((r,o)=>{const{children:s,...i}=r,a=c.Children.toArray(s),l=a.find(Jm);if(l){const u=l.props.children,d=a.map(f=>f===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:f);return x.jsx(t,{...i,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return x.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Zm(e){const t=c.forwardRef((n,r)=>{const{children:o,...s}=n;if(c.isValidElement(o)){const i=th(o),a=eh(s,o.props);return o.type!==c.Fragment&&(a.ref=r?Fs(r,i):i),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Dc=Symbol("radix.slottable");function Qm(e){const t=({children:n})=>x.jsx(x.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Dc,t}function Jm(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Dc}function eh(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function th(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var nh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Oe=nh.reduce((e,t)=>{const n=Fr(`Primitive.${t}`),r=c.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function rh(e,t){e&&rn.flushSync(()=>e.dispatchEvent(t))}var ro="Checkbox",[oh]=At(ro),[sh,Bs]=oh(ro);function ih(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:l,required:u,value:d="on",internal_do_not_use_render:f}=e,[h,p]=wn({prop:n,defaultProp:o??!1,onChange:l,caller:ro}),[b,g]=c.useState(null),[m,y]=c.useState(null),v=c.useRef(!1),C=b?!!i||!!b.closest("form"):!0,w={checked:h,disabled:s,setChecked:p,control:b,setControl:g,name:a,form:i,value:d,hasConsumerStoppedPropagationRef:v,required:u,defaultChecked:Zt(o)?!1:o,isFormControl:C,bubbleInput:m,setBubbleInput:y};return x.jsx(sh,{scope:t,...w,children:ah(f)?f(w):r})}var Lc="CheckboxTrigger",jc=c.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:i,disabled:a,checked:l,required:u,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:h,isFormControl:p,bubbleInput:b}=Bs(Lc,e),g=ze(o,d),m=c.useRef(l);return c.useEffect(()=>{const y=s?.form;if(y){const v=()=>f(m.current);return y.addEventListener("reset",v),()=>y.removeEventListener("reset",v)}},[s,f]),x.jsx(Oe.button,{type:"button",role:"checkbox","aria-checked":Zt(l)?"mixed":l,"aria-required":u,"data-state":Bc(l),"data-disabled":a?"":void 0,disabled:a,value:i,...r,ref:g,onKeyDown:Ne(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:Ne(n,y=>{f(v=>Zt(v)?!0:!v),b&&p&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})});jc.displayName=Lc;var Gs=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:l,onCheckedChange:u,form:d,...f}=e;return x.jsx(ih,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:u,name:r,form:d,value:l,internal_do_not_use_render:({isFormControl:h})=>x.jsxs(x.Fragment,{children:[x.jsx(jc,{...f,ref:t,__scopeCheckbox:n}),h&&x.jsx(zc,{__scopeCheckbox:n})]})})});Gs.displayName=ro;var Vc="CheckboxIndicator",Fc=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=Bs(Vc,n);return x.jsx($t,{present:r||Zt(s.checked)||s.checked===!0,children:x.jsx(Oe.span,{"data-state":Bc(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Fc.displayName=Vc;var $c="CheckboxBubbleInput",zc=c.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:l,name:u,value:d,form:f,bubbleInput:h,setBubbleInput:p}=Bs($c,e),b=ze(n,p),g=zs(s),m=no(r);c.useEffect(()=>{const v=h;if(!v)return;const C=window.HTMLInputElement.prototype,R=Object.getOwnPropertyDescriptor(C,"checked").set,k=!o.current;if(g!==s&&R){const S=new Event("click",{bubbles:k});v.indeterminate=Zt(s),R.call(v,Zt(s)?!1:s),v.dispatchEvent(S)}},[h,g,s,o]);const y=c.useRef(Zt(s)?!1:s);return x.jsx(Oe.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:a,disabled:l,name:u,value:d,form:f,...t,tabIndex:-1,ref:b,style:{...t.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});zc.displayName=$c;function ah(e){return typeof e=="function"}function Zt(e){return e==="indeterminate"}function Bc(e){return Zt(e)?"indeterminate":e?"checked":"unchecked"}function Gc({ref:e,className:t,color:n="currentColor",size:r=24,...o}){return x.jsx("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",stroke:n,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:t,...o,children:x.jsx("path",{d:"M13.4375 8.125L8.85414 12.5L6.5625 10.3125"})})}function Hc({ref:e,className:t,color:n="currentColor",size:r=24,...o}){return x.jsxs("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",stroke:n,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:t,...o,children:[x.jsx("path",{d:"M13.4375 8.125L8.85414 12.5L6.5625 10.3125"}),x.jsx("path",{d:"M10 17.5C14.1421 17.5 17.5 14.1421 17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5Z"})]})}Gc.displayName="Check";Hc.displayName="CircleCheck";const Wc=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const ch=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const lh=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const na=e=>{const t=lh(e);return t.charAt(0).toUpperCase()+t.slice(1)};var uh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const dh=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const fh=Le.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>Le.createElement("svg",{ref:l,...uh,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Wc("lucide",o),...!s&&!dh(a)&&{"aria-hidden":"true"},...a},[...i.map(([u,d])=>Le.createElement(u,d)),...Array.isArray(s)?s:[s]]));const Re=(e,t)=>{const n=Le.forwardRef(({className:r,...o},s)=>Le.createElement(fh,{ref:s,iconNode:t,className:Wc(`lucide-${ch(na(e))}`,`lucide-${e}`,r),...o}));return n.displayName=na(e),n};const ph=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]],mh=Re("bell-ring",ph);const hh=[["path",{d:"M15 13a3 3 0 1 0-6 0",key:"10j68g"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}]],gh=Re("book-user",hh);const bh=[["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2",key:"1ksdt3"}],["path",{d:"M22 13a18.15 18.15 0 0 1-20 0",key:"12hx5q"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],vh=Re("briefcase-business",bh);const yh=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],xh=Re("building-2",yh);const wh=[["path",{d:"M11 14h1v4",key:"fy54vd"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",key:"12vinp"}]],Ch=Re("calendar-1",wh);const Eh=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],Rh=Re("chart-line",Eh);const Sh=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],kh=Re("chevron-down",Sh);const Ih=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Nh=Re("chevron-left",Ih);const Oh=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ph=Re("chevron-right",Oh);const Th=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Ah=Re("chevrons-up-down",Th);const Mh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],_h=Re("circle-question-mark",Mh);const Dh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],Lh=Re("clock-3",Dh);const jh=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Uc=Re("ellipsis",jh);const Vh=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Fh=Re("folder-open",Vh);const $h=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],zh=Re("funnel",$h);const Bh=[["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"}]],Gh=Re("layout-grid",Bh);const Hh=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],Wh=Re("list-filter",Hh);const Uh=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],Kh=Re("list-todo",Uh);const qh=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],Yh=Re("message-circle",qh);const Xh=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],Zh=Re("palette",Xh);const Qh=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],Jh=Re("phone",Qh);const eg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],tg=Re("plus",eg);const ng=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],rg=Re("rotate-ccw",ng);const og=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],sg=Re("search",og);const ig=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ag=Re("settings",ig);const cg=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],lg=Re("tag",cg);const ug=[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],dg=Re("user-cog",ug);const fg=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],pg=Re("users",fg);const mg=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],hg=Re("wrench",mg);const gg=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Hs=Re("x",gg),bg={settings:ag,plus:tg,wrench:hg,phone:Jh,palette:Zh,building:xh,close:Hs,done:Gc,check:Hc,users:pg,"layout-grid":Gh,bell:mh,"book-user":gh,"user-gear":dg,folder:Fh,"briefcase-business":vh,calendar:Ch,"chart-line":Rh,message:Yh,search:sg,"list-filter":Wh,funnel:zh,dots:Uc,"check-list":Kh,tag:lg,chevron:kh,chevrons:Ah,"rotate-ccw":rg,question:_h,clock:Lh},vg={xs:"w-2.5 h-2.5",sm:"w-3.75 h-3.75",md:"w-5 h-5",lg:"w-6.25 h-6.25"},oo=({type:e,size:t="md",viewBox:n="0 0 24 24",strokeWidth:r=1.5,className:o,...s})=>{const i=bg[e],a=vg[t],l=z(a,o);return x.jsx("div",{...s,children:x.jsx(i,{viewBox:n,strokeWidth:r,className:l})})},yg=["peer bg-primary-bg border-inp-default-border grid size-5 shrink-0 cursor-pointer place-content-center rounded border","focus-visible:ring-inp-focus-border focus-visible:ring-1 focus-visible:outline-none","text-transparent transition-all duration-200","disabled:cursor-not-allowed","disabled:border-disabled-border disabled:bg-disabled-bg","disabled:data-[state=checked]:bg-disabled-bg","disabled:data-[state=checked]:border-disabled-border","disabled:data-[state=checked]:text-disabled-text","data-[state=checked]:border-primary-inverse-bg","data-[state=checked]:bg-primary-inverse-bg data-[state=checked]:text-primary-inverse-text","enabled:hover:border-inp-hover-border","enabled:hover:data-[state=checked]:bg-primary-inverse-hover-bg","enabled:hover:data-[state=checked]:border-primary-inverse-hover-bg"].join(" "),xg="grid place-content-center text-current",Kc=({className:e,ref:t,...n})=>x.jsx(Gs,{ref:t,className:z(yg,e),...n,children:x.jsx(Fc,{className:z(xg),children:x.jsx(oo,{type:"done",viewBox:"3 3 14 14"})})});Kc.displayName=Gs.displayName;function Wo({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=c.useRef(e!==void 0),[s,i]=c.useState(t),a=o?e:s;if(process.env.NODE_ENV!=="production"){c.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
13
|
+
hover:shadow-[0_6px_16px_rgba(0,0,0,0.30)]`},active:{true:"",false:""}},defaultVariants:{variant:"light",active:!1},compoundVariants:[{variant:"light",active:!0,class:"bg-tertiary-bg border-default-border shadow-[0_2px_6px_rgba(0,0,0,0.1)]"},{variant:"dark",active:!0,class:"bg-tertiary-inverse-bg shadow-[0_2px_6px_rgba(0,0,0,0.25)]"}]}),Hm=je("flex flex-col space-y-1.5 p-6"),Wm=je(`group-data-[disabled=true]/card:text-disabled-text leading-none font-semibold
|
|
14
|
+
tracking-tight`),Um=je(`${qe("body-sm-regular")} text-muted-foreground
|
|
15
|
+
group-data-[disabled=true]/card:text-disabled-text`),Km=je("group-data-[disabled=true]/card:text-disabled-text p-6 pt-0"),qm=je("group-data-[disabled=true]/card:text-disabled-text flex items-center p-6 pt-0"),Dc=({ref:e,className:t,variant:n,disabled:r,active:o,...s})=>x.jsx("div",{ref:e,"data-disabled":r||void 0,className:z(Gm({variant:n,active:o}),t),...s});Dc.displayName="Card";const Lc=({ref:e,className:t,...n})=>x.jsx("div",{ref:e,className:z(Hm(),t),...n});Lc.displayName="CardHeader";const jc=({ref:e,className:t,...n})=>x.jsx("div",{ref:e,className:z(Wm(),t),...n});jc.displayName="CardTitle";const Vc=({ref:e,className:t,...n})=>x.jsx("div",{ref:e,className:z(Um(),t),...n});Vc.displayName="CardDescription";const Fc=({ref:e,className:t,...n})=>x.jsx("div",{ref:e,className:z(Km(),t),...n});Fc.displayName="CardContent";const $c=({ref:e,className:t,...n})=>x.jsx("div",{ref:e,className:z(qm(),t),...n});$c.displayName="CardFooter";function Ym(e,t){const n=c.createContext(t),r=s=>{const{children:i,...a}=s,l=c.useMemo(()=>a,Object.values(a));return x.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function o(s){const i=c.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function At(e,t=[]){let n=[];function r(s,i){const a=c.createContext(i),l=n.length;n=[...n,i];const u=f=>{const{scope:h,children:p,...b}=f,g=h?.[e]?.[l]||a,m=c.useMemo(()=>b,Object.values(b));return x.jsx(g.Provider,{value:m,children:p})};u.displayName=s+"Provider";function d(f,h){const p=h?.[e]?.[l]||a,b=c.useContext(p);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(i=>c.createContext(i));return function(a){const l=a?.[e]||s;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,Xm(o,...t)]}function Xm(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...a,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Ne(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var tn=globalThis?.document?c.useLayoutEffect:()=>{},Zm=c[" useInsertionEffect ".trim().toString()]||tn;function wn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=Qm({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const d=c.useRef(e!==void 0);c.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const u=c.useCallback(d=>{if(a){const f=Jm(d)?d(e):d;f!==e&&i.current?.(f)}else s(d)},[a,e,s,i]);return[l,u]}function Qm({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),s=c.useRef(t);return Zm(()=>{s.current=t},[t]),c.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function Jm(e){return typeof e=="function"}function Hs(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function so(e){const[t,n]=c.useState(void 0);return tn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function eh(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var $t=e=>{const{present:t,children:n}=e,r=th(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=ze(r.ref,nh(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};$t.displayName="Presence";function th(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),s=c.useRef("none"),i=e?"mounted":"unmounted",[a,l]=eh(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=vr(r.current);s.current=a==="mounted"?u:"none"},[a]),tn(()=>{const u=r.current,d=o.current;if(d!==e){const h=s.current,p=vr(u);e?l("MOUNT"):p==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),tn(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=p=>{const g=vr(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&g&&(l("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},h=p=>{p.target===t&&(s.current=vr(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function vr(e){return e?.animationName||"none"}function nh(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Br(e){const t=rh(e),n=c.forwardRef((r,o)=>{const{children:s,...i}=r,a=c.Children.toArray(s),l=a.find(sh);if(l){const u=l.props.children,d=a.map(f=>f===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:f);return x.jsx(t,{...i,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return x.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function rh(e){const t=c.forwardRef((n,r)=>{const{children:o,...s}=n;if(c.isValidElement(o)){const i=ah(o),a=ih(s,o.props);return o.type!==c.Fragment&&(a.ref=r?Bs(r,i):i),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zc=Symbol("radix.slottable");function oh(e){const t=({children:n})=>x.jsx(x.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=zc,t}function sh(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zc}function ih(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function ah(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ch=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Oe=ch.reduce((e,t)=>{const n=Br(`Primitive.${t}`),r=c.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function lh(e,t){e&&rn.flushSync(()=>e.dispatchEvent(t))}var io="Checkbox",[uh]=At(io),[dh,Ws]=uh(io);function fh(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:l,required:u,value:d="on",internal_do_not_use_render:f}=e,[h,p]=wn({prop:n,defaultProp:o??!1,onChange:l,caller:io}),[b,g]=c.useState(null),[m,y]=c.useState(null),v=c.useRef(!1),C=b?!!i||!!b.closest("form"):!0,w={checked:h,disabled:s,setChecked:p,control:b,setControl:g,name:a,form:i,value:d,hasConsumerStoppedPropagationRef:v,required:u,defaultChecked:Zt(o)?!1:o,isFormControl:C,bubbleInput:m,setBubbleInput:y};return x.jsx(dh,{scope:t,...w,children:ph(f)?f(w):r})}var Bc="CheckboxTrigger",Gc=c.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:i,disabled:a,checked:l,required:u,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:h,isFormControl:p,bubbleInput:b}=Ws(Bc,e),g=ze(o,d),m=c.useRef(l);return c.useEffect(()=>{const y=s?.form;if(y){const v=()=>f(m.current);return y.addEventListener("reset",v),()=>y.removeEventListener("reset",v)}},[s,f]),x.jsx(Oe.button,{type:"button",role:"checkbox","aria-checked":Zt(l)?"mixed":l,"aria-required":u,"data-state":qc(l),"data-disabled":a?"":void 0,disabled:a,value:i,...r,ref:g,onKeyDown:Ne(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:Ne(n,y=>{f(v=>Zt(v)?!0:!v),b&&p&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})});Gc.displayName=Bc;var Us=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:l,onCheckedChange:u,form:d,...f}=e;return x.jsx(fh,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:u,name:r,form:d,value:l,internal_do_not_use_render:({isFormControl:h})=>x.jsxs(x.Fragment,{children:[x.jsx(Gc,{...f,ref:t,__scopeCheckbox:n}),h&&x.jsx(Kc,{__scopeCheckbox:n})]})})});Us.displayName=io;var Hc="CheckboxIndicator",Wc=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=Ws(Hc,n);return x.jsx($t,{present:r||Zt(s.checked)||s.checked===!0,children:x.jsx(Oe.span,{"data-state":qc(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Wc.displayName=Hc;var Uc="CheckboxBubbleInput",Kc=c.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:l,name:u,value:d,form:f,bubbleInput:h,setBubbleInput:p}=Ws(Uc,e),b=ze(n,p),g=Hs(s),m=so(r);c.useEffect(()=>{const v=h;if(!v)return;const C=window.HTMLInputElement.prototype,R=Object.getOwnPropertyDescriptor(C,"checked").set,k=!o.current;if(g!==s&&R){const S=new Event("click",{bubbles:k});v.indeterminate=Zt(s),R.call(v,Zt(s)?!1:s),v.dispatchEvent(S)}},[h,g,s,o]);const y=c.useRef(Zt(s)?!1:s);return x.jsx(Oe.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:a,disabled:l,name:u,value:d,form:f,...t,tabIndex:-1,ref:b,style:{...t.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Kc.displayName=Uc;function ph(e){return typeof e=="function"}function Zt(e){return e==="indeterminate"}function qc(e){return Zt(e)?"indeterminate":e?"checked":"unchecked"}function Yc({ref:e,className:t,color:n="currentColor",size:r=24,...o}){return x.jsx("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",stroke:n,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:t,...o,children:x.jsx("path",{d:"M13.4375 8.125L8.85414 12.5L6.5625 10.3125"})})}function Xc({ref:e,className:t,color:n="currentColor",size:r=24,...o}){return x.jsxs("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",stroke:n,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:t,...o,children:[x.jsx("path",{d:"M13.4375 8.125L8.85414 12.5L6.5625 10.3125"}),x.jsx("path",{d:"M10 17.5C14.1421 17.5 17.5 14.1421 17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5Z"})]})}Yc.displayName="Check";Xc.displayName="CircleCheck";const Zc=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const mh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const hh=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const aa=e=>{const t=hh(e);return t.charAt(0).toUpperCase()+t.slice(1)};var gh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const bh=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const vh=Le.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>Le.createElement("svg",{ref:l,...gh,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Zc("lucide",o),...!s&&!bh(a)&&{"aria-hidden":"true"},...a},[...i.map(([u,d])=>Le.createElement(u,d)),...Array.isArray(s)?s:[s]]));const Re=(e,t)=>{const n=Le.forwardRef(({className:r,...o},s)=>Le.createElement(vh,{ref:s,iconNode:t,className:Zc(`lucide-${mh(aa(e))}`,`lucide-${e}`,r),...o}));return n.displayName=aa(e),n};const yh=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]],xh=Re("bell-ring",yh);const wh=[["path",{d:"M15 13a3 3 0 1 0-6 0",key:"10j68g"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}]],Ch=Re("book-user",wh);const Eh=[["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2",key:"1ksdt3"}],["path",{d:"M22 13a18.15 18.15 0 0 1-20 0",key:"12hx5q"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],Rh=Re("briefcase-business",Eh);const Sh=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],kh=Re("building-2",Sh);const Ih=[["path",{d:"M11 14h1v4",key:"fy54vd"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",key:"12vinp"}]],Nh=Re("calendar-1",Ih);const Oh=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],Ph=Re("chart-line",Oh);const Th=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ah=Re("chevron-down",Th);const Mh=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],_h=Re("chevron-left",Mh);const Dh=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Lh=Re("chevron-right",Dh);const jh=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Vh=Re("chevrons-up-down",jh);const Fh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],$h=Re("circle-question-mark",Fh);const zh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],Bh=Re("clock-3",zh);const Gh=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Qc=Re("ellipsis",Gh);const Hh=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Wh=Re("folder-open",Hh);const Uh=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Kh=Re("funnel",Uh);const qh=[["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"}]],Yh=Re("layout-grid",qh);const Xh=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],Zh=Re("list-filter",Xh);const Qh=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],Jh=Re("list-todo",Qh);const eg=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],tg=Re("message-circle",eg);const ng=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],rg=Re("palette",ng);const og=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],sg=Re("phone",og);const ig=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ag=Re("plus",ig);const cg=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],lg=Re("rotate-ccw",cg);const ug=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],dg=Re("search",ug);const fg=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],pg=Re("settings",fg);const mg=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],hg=Re("tag",mg);const gg=[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],bg=Re("user-cog",gg);const vg=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],yg=Re("users",vg);const xg=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],wg=Re("wrench",xg);const Cg=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ks=Re("x",Cg),Eg={settings:pg,plus:ag,wrench:wg,phone:sg,palette:rg,building:kh,close:Ks,done:Yc,check:Xc,users:yg,"layout-grid":Yh,bell:xh,"book-user":Ch,"user-gear":bg,folder:Wh,"briefcase-business":Rh,calendar:Nh,"chart-line":Ph,message:tg,search:dg,"list-filter":Zh,funnel:Kh,dots:Qc,"check-list":Jh,tag:hg,chevron:Ah,chevrons:Vh,"rotate-ccw":lg,question:$h,clock:Bh},Rg={xs:"w-2.5 h-2.5",sm:"w-3.75 h-3.75",md:"w-5 h-5",lg:"w-6.25 h-6.25"},ao=({type:e,size:t="md",viewBox:n="0 0 24 24",strokeWidth:r=1.5,className:o,...s})=>{const i=Eg[e],a=Rg[t],l=z(a,o);return x.jsx("div",{...s,children:x.jsx(i,{viewBox:n,strokeWidth:r,className:l})})},Sg=["peer bg-primary-bg border-inp-default-border grid size-5 shrink-0 cursor-pointer place-content-center rounded border","focus-visible:ring-inp-focus-border focus-visible:ring-1 focus-visible:outline-none","text-transparent transition-all duration-200","disabled:cursor-not-allowed","disabled:border-disabled-border disabled:bg-disabled-bg","disabled:data-[state=checked]:bg-disabled-bg","disabled:data-[state=checked]:border-disabled-border","disabled:data-[state=checked]:text-disabled-text","data-[state=checked]:border-primary-inverse-bg","data-[state=checked]:bg-primary-inverse-bg data-[state=checked]:text-primary-inverse-text","enabled:hover:border-inp-hover-border","enabled:hover:data-[state=checked]:bg-primary-inverse-hover-bg","enabled:hover:data-[state=checked]:border-primary-inverse-hover-bg"].join(" "),kg="grid place-content-center text-current",Jc=({className:e,ref:t,...n})=>x.jsx(Us,{ref:t,className:z(Sg,e),...n,children:x.jsx(Wc,{className:z(kg),children:x.jsx(ao,{type:"done",viewBox:"3 3 14 14"})})});Jc.displayName=Us.displayName;function qo({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=c.useRef(e!==void 0),[s,i]=c.useState(t),a=o?e:s;if(process.env.NODE_ENV!=="production"){c.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
16
16
|
`))},[r,n,e]);const{current:u}=c.useRef(t);c.useEffect(()=>{!o&&JSON.stringify(u)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
17
|
-
`))},[JSON.stringify(t)])}const l=c.useCallback(u=>{o||i(u)},[]);return[a,l]}const
|
|
18
|
-
`));return c.cloneElement(s,o)}if(e&&typeof e=="string")return qg(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":St(8))}function qg(e,t){return e==="button"?Le.createElement("button",{type:"button",...t,key:t.key}):e==="img"?Le.createElement("img",{alt:"",...t,key:t.key}):c.createElement(e,t)}const ht="none",bs="trigger-press",Yg="trigger-hover",Ks="outside-press",Xg="item-press",sa="clear-press",Zg="chip-remove-press",In="input-change",Yt="input-clear",Qg="input-press",so="focus-out",nl="escape-key",Un="list-navigation";function de(e,t,n,r){let o=!1,s=!1;const i=et;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){s=!0},get isCanceled(){return o},get isPropagationAllowed(){return s},trigger:n,...i}}function Bn(e,t,n){const r=n??et;return{reason:e,event:t??new Event("base-ui"),...r}}const vs={...c};let ia=0;function Jg(e,t="mui"){const[n,r]=c.useState(e),o=e||n;return c.useEffect(()=>{n==null&&(ia+=1,r(`${t}-${ia}`))},[n,t]),o}const aa=vs.useId;function qs(e,t){if(aa!==void 0){const n=aa();return e??(t?`${t}-${n}`:n)}return Jg(e,t)}function Ys(e){return qs(e,"base-ui")}const eb=[];function rl(e){c.useEffect(e,eb)}const br=null;let ca=globalThis.requestAnimationFrame;class tb{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&ca!==requestAnimationFrame&&(ca=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const vr=new tb;class Nt{static create(){return new Nt}static request(t){return vr.request(t)}static cancel(t){return vr.cancel(t)}currentId=br;request(t){this.cancel(),this.currentId=vr.request(()=>{this.currentId=br,t()})}cancel=()=>{this.currentId!==br&&(vr.cancel(this.currentId),this.currentId=br)};disposeEffect=()=>this.cancel}function Xs(){const e=vt(Nt.create).current;return rl(e.disposeEffect),e}function Lt(e){return e==null?e:"current"in e?e.current:e}let Qn=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const nb={[Qn.startingStyle]:""},rb={[Qn.endingStyle]:""},ol={transitionStatus(e){return e==="starting"?nb:e==="ending"?rb:null}};function ob(e,t=!1,n=!0){const r=Xs();return re((o,s=null)=>{r.cancel();function i(){rn.flushSync(o)}const a=Lt(e);if(a==null)return;const l=a;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let u=function(){const f=Qn.startingStyle;if(!l.hasAttribute(f)){r.request(d);return}const h=new MutationObserver(()=>{l.hasAttribute(f)||(h.disconnect(),d())});h.observe(l,{attributes:!0,attributeFilter:[f]}),s?.addEventListener("abort",()=>h.disconnect(),{once:!0})},d=function(){Promise.all(l.getAnimations().map(f=>f.finished)).then(()=>{s?.aborted||i()}).catch(()=>{const f=l.getAnimations();if(n){if(s?.aborted)return;i()}else f.length>0&&f.some(h=>h.pending||h.playState!=="finished")&&d()})};if(t){u();return}r.request(d)}})}function sl(e,t=!1,n=!1){const[r,o]=c.useState(e&&t?"idle":void 0),[s,i]=c.useState(e);return e&&!s&&(i(!0),o("starting")),!e&&s&&r!=="ending"&&!n&&o("ending"),!e&&!s&&r==="ending"&&o(void 0),oe(()=>{if(!e&&s&&r!=="ending"&&n){const a=Nt.request(()=>{o("ending")});return()=>{Nt.cancel(a)}}},[e,s,r,n]),oe(()=>{if(!e||t)return;const a=Nt.request(()=>{o(void 0)});return()=>{Nt.cancel(a)}},[t,e]),oe(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&o("starting");const a=Nt.request(()=>{o("idle")});return()=>{Nt.cancel(a)}},[t,e,s,o,r]),c.useMemo(()=>({mounted:s,setMounted:i,transitionStatus:r}),[s,r])}let il=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function al(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:s}=e,{register:i,unregister:a,subscribeMapChange:l,elementsRef:u,labelsRef:d,nextIndexRef:f}=Sg(),h=c.useRef(-1),[p,b]=c.useState(s??(o===il.GuessFromOrder?()=>{if(h.current===-1){const y=f.current;f.current+=1,h.current=y}return h.current}:-1)),g=c.useRef(null),m=c.useCallback(y=>{if(g.current=y,p!==-1&&y!==null&&(u.current[p]=y,d)){const v=t!==void 0;d.current[p]=v?t:r?.current?.textContent??y.textContent}},[p,u,d,t,r]);return oe(()=>{if(s!=null)return;const y=g.current;if(y)return i(y,n),()=>{a(y)}},[s,i,a,n]),oe(()=>{if(s==null)return l(y=>{const v=g.current?y.get(g.current)?.index:null;v!=null&&b(v)})},[s,l,b]),c.useMemo(()=>({ref:m,index:p}),[p,m])}function io(){return typeof window<"u"}function sn(e){return Zs(e)?(e.nodeName||"").toLowerCase():"#document"}function Ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mt(e){var t;return(t=(Zs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Zs(e){return io()?e instanceof Node||e instanceof Ye(e).Node:!1}function Ae(e){return io()?e instanceof Element||e instanceof Ye(e).Element:!1}function Be(e){return io()?e instanceof HTMLElement||e instanceof Ye(e).HTMLElement:!1}function ys(e){return!io()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ye(e).ShadowRoot}function an(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=pt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function sb(e){return/^(table|td|th)$/.test(sn(e))}function ao(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const ib=/transform|translate|scale|rotate|perspective|filter/,ab=/paint|layout|strict|content/,pn=e=>!!e&&e!=="none";let Ko;function Qs(e){const t=Ae(e)?pt(e):e;return pn(t.transform)||pn(t.translate)||pn(t.scale)||pn(t.rotate)||pn(t.perspective)||!co()&&(pn(t.backdropFilter)||pn(t.filter))||ib.test(t.willChange||"")||ab.test(t.contain||"")}function cb(e){let t=Ft(e);for(;Be(t)&&!Vt(t);){if(Qs(t))return t;if(ao(t))return null;t=Ft(t)}return null}function co(){return Ko==null&&(Ko=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ko}function Vt(e){return/^(html|body|#document)$/.test(sn(e))}function pt(e){return Ye(e).getComputedStyle(e)}function lo(e){return Ae(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ft(e){if(sn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ys(e)&&e.host||Mt(e);return ys(t)?t.host:t}function cl(e){const t=Ft(e);return Vt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Be(t)&&an(t)?t:cl(t)}function Qt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=cl(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Ye(o);if(s){const a=xs(i);return t.concat(i,i.visualViewport||[],an(o)?o:[],a&&n?Qt(a):[])}else return t.concat(o,Qt(o,[],n))}function xs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}let ws;process.env.NODE_ENV!=="production"&&(ws=new Set);function la(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");ws.has(t)||(ws.add(t),console.error(`Base UI: ${t}`))}}const ll=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(ll.displayName="CompositeRootContext");function lb(e=!1){const t=c.useContext(ll);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":St(16));return t}function ub(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:s}=e,i=r&&t!==!1,a=r&&t===!1;return{props:c.useMemo(()=>{const u={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return r||(u.tabIndex=o,!s&&n&&(u.tabIndex=t?o:-1)),(s&&(t||i)||!s&&n)&&(u["aria-disabled"]=n),s&&(!t||a)&&(u.disabled=n),u},[r,n,t,i,a,s,o])}}function uo(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,s=c.useRef(null),i=lb(!0)!==void 0,a=re(()=>{const h=s.current;return!!(h?.tagName==="A"&&h?.href)}),{props:l}=ub({focusableWhenDisabled:n,disabled:t,composite:i,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&c.useEffect(()=>{if(!s.current)return;const h=s.current.tagName==="BUTTON";if(o){if(!h){const p=vs.captureOwnerStack?.()||"";la(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${p}`)}}else if(h){const p=vs.captureOwnerStack?.()||"";la(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${p}`)}},[o]);const u=c.useCallback(()=>{const h=s.current;db(h)&&i&&t&&l.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,l.disabled,i]);oe(u,[u]);const d=c.useCallback((h={})=>{const{onClick:p,onMouseDown:b,onKeyUp:g,onKeyDown:m,onPointerDown:y,...v}=h;return Jc({type:o?"button":void 0,onClick(w){if(t){w.preventDefault();return}p?.(w)},onMouseDown(w){t||b?.(w)},onKeyDown(w){if(t||(gs(w),m?.(w)),w.baseUIHandlerPrevented)return;const R=w.target===w.currentTarget&&!o&&!a()&&!t,k=w.key==="Enter",S=w.key===" ";R&&((S||k)&&w.preventDefault(),k&&p?.(w))},onKeyUp(w){t||(gs(w),g?.(w)),!w.baseUIHandlerPrevented&&w.target===w.currentTarget&&!o&&!t&&w.key===" "&&p?.(w)},onPointerDown(w){if(t){w.preventDefault();return}y?.(w)}},o?void 0:{role:"button"},l,v)},[t,l,o,a]),f=re(h=>{s.current=h,u()});return{getButtonProps:d,buttonRef:f}}function db(e){return Be(e)&&e.tagName==="BUTTON"}const Cn=typeof navigator<"u",qo=mb(),ul=gb(),Js=hb(),dl=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),fl=qo.platform==="MacIntel"&&qo.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(qo.platform),ua=Cn&&/firefox/i.test(Js),fb=Cn&&/apple/i.test(navigator.vendor),$r=Cn&&/android/i.test(ul)||/android/i.test(Js);Cn&&ul.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const pb=Js.includes("jsdom/");function mb(){if(!Cn)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function hb(){if(!Cn)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function gb(){if(!Cn)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const Cs="data-base-ui-focusable",pl="active",ml="selected",bb="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Jt="ArrowLeft",en="ArrowRight",ei="ArrowUp",tr="ArrowDown";function jt(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Ee(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&ys(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ct(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Rt(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function vb(e){return e.matches("html,body")}function ti(e){return Be(e)&&e.matches(bb)}function Es(e){return e?e.getAttribute("role")==="combobox"&&ti(e):!1}function Rs(e){return e?e.hasAttribute(Cs)?e:e.querySelector(`[${Cs}]`)||e:null}function On(e,t,n=!0){return e.filter(o=>o.parentId===t&&(!n||o.context?.open)).flatMap(o=>[o,...On(e,o.id,n)])}function da(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(s=>s.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}function Te(e){e.preventDefault(),e.stopPropagation()}function yb(e){return"nativeEvent"in e}function hl(e){return e.pointerType===""&&e.isTrusted?!0:$r&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function gl(e){return pb?!1:!$r&&e.width===0&&e.height===0||$r&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function fa(e,t){return["mouse","pen"].includes(e)}function bl(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const xb=["top","right","bottom","left"],nn=Math.min,dt=Math.max,zr=Math.round,Nn=Math.floor,Pt=e=>({x:e,y:e}),wb={left:"right",right:"left",bottom:"top",top:"bottom"};function Br(e,t,n){return dt(e,nn(t,n))}function Tt(e,t){return typeof e=="function"?e(t):e}function ft(e){return e.split("-")[0]}function zt(e){return e.split("-")[1]}function ni(e){return e==="x"?"y":"x"}function fo(e){return e==="y"?"height":"width"}function bt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function po(e){return ni(bt(e))}function Cb(e,t,n){n===void 0&&(n=!1);const r=zt(e),o=po(e),s=fo(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Gr(i)),[i,Gr(i)]}function Eb(e){const t=Gr(e);return[Ss(e),t,Ss(t)]}function Ss(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const pa=["left","right"],ma=["right","left"],Rb=["top","bottom"],Sb=["bottom","top"];function kb(e,t,n){switch(e){case"top":case"bottom":return n?t?ma:pa:t?pa:ma;case"left":case"right":return t?Rb:Sb;default:return[]}}function Ib(e,t,n,r){const o=zt(e);let s=kb(ft(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ss)))),s}function Gr(e){const t=ft(e);return wb[t]+e.slice(t.length)}function Nb(e){return{top:0,right:0,bottom:0,left:0,...e}}function ri(e){return typeof e!="number"?Nb(e):{top:e,right:e,bottom:e,left:e}}function Hr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function yr(e,t,n){return Math.floor(e/t)!==n}function Kn(e,t){return t<0||t>=e.current.length}function Yo(e,t){return Qe(e,{disabledIndices:t})}function ha(e,t){return Qe(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Qe(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let s=t;do s+=n?-o:o;while(s>=0&&s<=e.current.length-1&&qn(e,s,r));return s}function Ob(e,{event:t,orientation:n,loopFocus:r,rtl:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u;const h=[],p={};let b=!1;{let y=null,v=-1;e.current.forEach((C,w)=>{if(C==null)return;const R=C.closest('[role="row"]');R&&(b=!0),(R!==y||v===-1)&&(y=R,v+=1,h[v]=[]),h[v].push(w),p[w]=v})}const g=b&&h.length>0&&h.some(y=>y.length!==s);function m(y){if(!g||u===-1)return;const v=p[u];if(v==null)return;const C=h[v].indexOf(u);let w=y==="up"?v-1:v+1;r&&(w<0?w=h.length-1:w>=h.length&&(w=0));const R=new Set;for(;w>=0&&w<h.length&&!R.has(w);){R.add(w);const k=h[w];if(k.length===0){w=y==="up"?w-1:w+1;continue}const S=Math.min(C,k.length-1);for(let E=S;E>=0;E-=1){const V=k[E];if(!qn(e,V,i))return V}w=y==="up"?w-1:w+1,r&&(w<0?w=h.length-1:w>=h.length&&(w=0))}}if(t.key===ei){const y=m("up");if(y!==void 0)d&&Te(t),f=y;else{if(d&&Te(t),u===-1)f=l;else if(f=Qe(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:i}),r&&(u-s<a||f<0)){const v=u%s,C=l%s,w=l-(C-v);C===v?f=l:f=C>v?w:w-s}Kn(e,f)&&(f=u)}}if(t.key===tr){const y=m("down");y!==void 0?(d&&Te(t),f=y):(d&&Te(t),u===-1?f=a:(f=Qe(e,{startingIndex:u,amount:s,disabledIndices:i}),r&&u+s>l&&(f=Qe(e,{startingIndex:u%s-s,amount:s,disabledIndices:i}))),Kn(e,f)&&(f=u))}if(n==="both"){const y=Nn(u/s);t.key===(o?Jt:en)&&(d&&Te(t),u%s!==s-1?(f=Qe(e,{startingIndex:u,disabledIndices:i}),r&&yr(f,s,y)&&(f=Qe(e,{startingIndex:u-u%s-1,disabledIndices:i}))):r&&(f=Qe(e,{startingIndex:u-u%s-1,disabledIndices:i})),yr(f,s,y)&&(f=u)),t.key===(o?en:Jt)&&(d&&Te(t),u%s!==0?(f=Qe(e,{startingIndex:u,decrement:!0,disabledIndices:i}),r&&yr(f,s,y)&&(f=Qe(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:i}))):r&&(f=Qe(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:i})),yr(f,s,y)&&(f=u));const v=Nn(l/s)===y;Kn(e,f)&&(r&&v?f=t.key===(o?en:Jt)?l:Qe(e,{startingIndex:u-u%s-1,disabledIndices:i}):f=u)}return f}function Pb(e,t,n){const r=[];let o=0;return e.forEach(({width:s,height:i},a)=>{if(s>t&&process.env.NODE_ENV!=="production")throw new Error(`[Floating UI]: Invalid grid - item width at index ${a} is greater than grid columns`);let l=!1;for(;!l;){const u=[];for(let d=0;d<s;d+=1)for(let f=0;f<i;f+=1)u.push(o+d+f*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),l=!0):o+=1}}),[...r]}function Tb(e,t,n,r,o){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(o){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*r:s;case"br":return n.lastIndexOf(e);default:return-1}}function Ab(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function qn(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r?r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true":!1}var Mb=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Wr=Mb.join(","),vl=typeof Element>"u",_n=vl?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ur=!vl&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Kr=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Kr(t.parentNode));return i},_b=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},yl=function(t,n,r){if(Kr(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Wr));return n&&_n.call(t,Wr)&&o.unshift(t),o=o.filter(r),o},qr=function(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Kr(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,u=qr(l,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:i,candidates:u})}else{var d=_n.call(i,Wr);d&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var f=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),h=!Kr(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(f&&h){var p=qr(f===!0?i.children:f.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:i,candidates:p})}else s.unshift.apply(s,i.children)}}return o},xl=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},wl=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||_b(t))&&!xl(t)?0:t.tabIndex},Db=function(t,n){var r=wl(t);return r<0&&n&&!xl(t)?0:r},Lb=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Cl=function(t){return t.tagName==="INPUT"},jb=function(t){return Cl(t)&&t.type==="hidden"},Vb=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Fb=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},$b=function(t){if(!t.name)return!0;var n=t.form||Ur(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=Fb(o,t.form);return!s||s===t},zb=function(t){return Cl(t)&&t.type==="radio"},Bb=function(t){return zb(t)&&!$b(t)},Gb=function(t){var n,r=t&&Ur(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var u,d,f;r=Ur(o),o=(u=r)===null||u===void 0?void 0:u.host,s=!!((d=o)!==null&&d!==void 0&&(f=d.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return s},ga=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},Hb=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var i=_n.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(_n.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var u=t.parentElement,d=Ur(t);if(u&&!u.shadowRoot&&o(u)===!0)return ga(t);t.assignedSlot?t=t.assignedSlot:!u&&d!==t.ownerDocument?t=d.host:t=u}t=l}if(Gb(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ga(t);return!1},Wb=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return _n.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},ks=function(t,n){return!(n.disabled||jb(n)||Hb(n,t)||Vb(n)||Wb(n))},Is=function(t,n){return!(Bb(n)||wl(n)<0||!ks(t,n))},Ub=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},El=function(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=Db(a,i),u=i?El(o.candidates):a;l===0?i?n.push.apply(n,u):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:u})}),r.sort(Lb).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},mo=function(t,n){n=n||{};var r;return n.getShadowRoot?r=qr([t],n.includeContainer,{filter:Is.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Ub}):r=yl(t,n.includeContainer,Is.bind(null,n)),El(r)},Kb=function(t,n){n=n||{};var r;return n.getShadowRoot?r=qr([t],n.includeContainer,{filter:ks.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=yl(t,n.includeContainer,ks.bind(null,n)),r},Rl=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return _n.call(t,Wr)===!1?!1:Is(n,t)};function $e(e){return e?.ownerDocument||document}const nr=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Sl(e,t){const n=mo(e,nr()),r=n.length;if(r===0)return;const o=jt($e(e)),s=n.indexOf(o),i=s===-1?t===1?0:r-1:s+t;return n[i]}function kl(e){return Sl($e(e).body,1)||e}function Il(e){return Sl($e(e).body,-1)||e}function Yn(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ee(n,r)}function qb(e){mo(e,nr()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function ba(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function oi(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,s=re(o),i=ob(r,n,!1);c.useEffect(()=>{if(!t)return;const a=new AbortController;return i(s,a.signal),()=>{a.abort()}},[t,n,s,i])}const Gn=0;class Dn{static create(){return new Dn}currentId=Gn;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Gn,n()},t)}isStarted(){return this.currentId!==Gn}clear=()=>{this.currentId!==Gn&&(clearTimeout(this.currentId),this.currentId=Gn)};disposeEffect=()=>this.clear}function hn(){const e=vt(Dn.create).current;return rl(e.disposeEffect),e}let va={},ya={},xa="";function Yb(e){if(typeof document>"u")return!1;const t=$e(e);return Ye(t).innerWidth-t.documentElement.clientWidth>0}function Xb(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=$e(e),r=n.documentElement,o=n.body,s=an(r)?r:o,i=s.style.overflowY,a=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",s.style.overflowY="scroll";const l=s.offsetWidth;s.style.overflowY="hidden";const u=s.offsetWidth;return s.style.overflowY=i,r.style.scrollbarGutter=a,l===u}function Zb(e){const t=$e(e),n=t.documentElement,r=t.body,o=an(n)?n:r,s={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,s)}}function Qb(e){const t=$e(e),n=t.documentElement,r=t.body,o=Ye(n);let s=0,i=0,a=!1;const l=Nt.create();if(dl&&(o.visualViewport?.scale??1)!==1)return()=>{};function u(){const h=o.getComputedStyle(n),p=o.getComputedStyle(r),m=(h.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,i=n.scrollLeft,va={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},xa=n.style.scrollBehavior,ya={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const y=n.scrollHeight>n.clientHeight,v=n.scrollWidth>n.clientWidth,C=h.overflowY==="scroll"||p.overflowY==="scroll",w=h.overflowX==="scroll"||p.overflowX==="scroll",R=Math.max(0,o.innerWidth-r.clientWidth),k=Math.max(0,o.innerHeight-r.clientHeight),S=parseFloat(p.marginTop)+parseFloat(p.marginBottom),E=parseFloat(p.marginLeft)+parseFloat(p.marginRight),V=an(n)?n:r;if(a=Xb(e),a){n.style.scrollbarGutter=m,V.style.overflowY="hidden",V.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:m,overflowY:"hidden",overflowX:"hidden"}),(y||C)&&(n.style.overflowY="scroll"),(v||w)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:S||k?`calc(100dvh - ${S+k}px)`:"100dvh",width:E||R?`calc(100vw - ${E+R}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=s,r.scrollLeft=i,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function d(){Object.assign(n.style,va),Object.assign(r.style,ya),a||(n.scrollTop=s,n.scrollLeft=i,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=xa)}function f(){d(),l.request(u)}return u(),o.addEventListener("resize",f),()=>{l.cancel(),d(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",f)}}class Jb{lockCount=0;restore=null;timeoutLock=Dn.create();timeoutUnlock=Dn.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=$e(t).documentElement,o=Ye(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=Me;return}const s=fl||!Yb(t);this.restore=s?Zb(t):Qb(t)}}const ev=new Jb;function tv(e=!0,t=null){oe(()=>{if(e)return ev.acquire(t)},[e,t])}function gt(e){const t=vt(nv,e).current;return t.next=e,oe(t.effect),t}function nv(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function rv(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}const Nl=c.createContext(null);process.env.NODE_ENV!=="production"&&(Nl.displayName="FloatingNodeContext");const Ol=c.createContext(null);process.env.NODE_ENV!=="production"&&(Ol.displayName="FloatingTreeContext");const Pl=()=>c.useContext(Nl)?.id||null,ho=e=>{const t=c.useContext(Ol);return e??t};function Yr(e){return`data-base-ui-${e}`}const Tl={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},si={...Tl,position:"fixed",top:0,left:0},ov={...Tl,position:"absolute"},Jn=c.forwardRef(function(t,n){const[r,o]=c.useState();oe(()=>{fb&&o("button")},[]);const s={tabIndex:0,role:r};return x.jsx("span",{...t,ref:n,style:si,"aria-hidden":r?void 0:!0,...s,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(Jn.displayName="FocusGuard");let wa=0;function Xn(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(wa);const s=()=>e?.focus({preventScroll:n});o?s():wa=requestAnimationFrame(s)}const Pn={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Ca(e){return e==="inert"?Pn.inert:e==="aria-hidden"?Pn["aria-hidden"]:Pn.none}let xr=new WeakSet,wr={},Xo=0;const Al=e=>e&&(e.host||Al(e.parentNode)),sv=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Al(n);return e.contains(r)?r:null}).filter(n=>n!=null);function iv(e,t,n,r){const o="data-base-ui-inert",s=r?"inert":n?"aria-hidden":null,i=sv(t,e),a=new Set,l=new Set(i),u=[];wr[o]||(wr[o]=new WeakMap);const d=wr[o];i.forEach(f),h(t),a.clear();function f(p){!p||a.has(p)||(a.add(p),p.parentNode&&f(p.parentNode))}function h(p){!p||l.has(p)||[].forEach.call(p.children,b=>{if(sn(b)!=="script")if(a.has(b))h(b);else{const g=s?b.getAttribute(s):null,m=g!==null&&g!=="false",y=Ca(s),v=(y.get(b)||0)+1,C=(d.get(b)||0)+1;y.set(b,v),d.set(b,C),u.push(b),v===1&&m&&xr.add(b),C===1&&b.setAttribute(o,""),!m&&s&&b.setAttribute(s,s==="inert"?"":"true")}})}return Xo+=1,()=>{u.forEach(p=>{const b=Ca(s),m=(b.get(p)||0)-1,y=(d.get(p)||0)-1;b.set(p,m),d.set(p,y),m||(!xr.has(p)&&s&&p.removeAttribute(s),xr.delete(p)),y||p.removeAttribute(o)}),Xo-=1,Xo||(Pn.inert=new WeakMap,Pn["aria-hidden"]=new WeakMap,Pn.none=new WeakMap,xr=new WeakSet,wr={})}}function av(e,t=!1,n=!1){const r=$e(e[0]).body;return iv(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const ii=c.createContext(null);process.env.NODE_ENV!=="production"&&(ii.displayName="PortalContext");const Ml=()=>c.useContext(ii),cv=Yr("portal");function lv(e={}){const{ref:t,container:n,componentProps:r=et,elementProps:o}=e,s=qs(),a=Ml()?.portalNode,[l,u]=c.useState(null),[d,f]=c.useState(null),h=re(m=>{m!==null&&f(m)}),p=c.useRef(null);oe(()=>{if(n===null){p.current&&(p.current=null,f(null),u(null));return}if(s==null)return;const m=(n&&(Zs(n)?n:n.current))??a??document.body;if(m==null){p.current&&(p.current=null,f(null),u(null));return}p.current!==m&&(p.current=m,f(null),u(m))},[n,a,s]);const b=tt("div",r,{ref:[t,h],props:[{id:s,[cv]:""},o]});return{portalNode:d,portalSubtree:l&&b?rn.createPortal(b,l):null}}const _l=c.forwardRef(function(t,n){const{children:r,container:o,className:s,render:i,renderGuards:a,...l}=t,{portalNode:u,portalSubtree:d}=lv({container:o,ref:n,componentProps:t,elementProps:l}),f=c.useRef(null),h=c.useRef(null),p=c.useRef(null),b=c.useRef(null),[g,m]=c.useState(null),y=g?.modal,v=g?.open,C=typeof a=="boolean"?a:!!g&&!g.modal&&g.open&&!!u;c.useEffect(()=>{if(!u||y)return;function R(k){u&&k.relatedTarget&&Yn(k)&&(k.type==="focusin"?ba:qb)(u)}return u.addEventListener("focusin",R,!0),u.addEventListener("focusout",R,!0),()=>{u.removeEventListener("focusin",R,!0),u.removeEventListener("focusout",R,!0)}},[u,y]),c.useEffect(()=>{!u||v||ba(u)},[v,u]);const w=c.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:h,beforeInsideRef:p,afterInsideRef:b,portalNode:u,setFocusManagerState:m}),[u]);return x.jsxs(c.Fragment,{children:[d,x.jsxs(ii.Provider,{value:w,children:[C&&u&&x.jsx(Jn,{"data-type":"outside",ref:f,onFocus:R=>{if(Yn(R,u))p.current?.focus();else{const k=g?g.domReference:null;Il(k)?.focus()}}}),C&&u&&x.jsx("span",{"aria-owns":u.id,style:Hg}),u&&rn.createPortal(r,u),C&&u&&x.jsx(Jn,{"data-type":"outside",ref:h,onFocus:R=>{if(Yn(R,u))b.current?.focus();else{const k=g?g.domReference:null;kl(k)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,de(so,R.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(_l.displayName="FloatingPortal");function uv(e,t){const n=Ye(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const Ea=20;let Xt=[];function ai(){Xt=Xt.filter(e=>e.deref()?.isConnected)}function dv(e){ai(),e&&sn(e)!=="body"&&(Xt.push(new WeakRef(e)),Xt.length>Ea&&(Xt=Xt.slice(-Ea)))}function Zo(){return ai(),Xt[Xt.length-1]?.deref()}function fv(e){if(!e)return null;const t=nr();return Rl(e,t)?e:mo(e,t)[0]||e}function pv(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():pt(e).display!=="none"}function Ra(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=nr(),o=Kb(e,n).filter(i=>{const a=i.getAttribute("data-tabindex")||"";return Rl(i,n)||i.hasAttribute("data-tabindex")&&!a.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||o.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function mv(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:s=!0,restoreFocus:i=!1,modal:a=!0,closeOnFocusOut:l=!0,openInteractionType:u="",nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:h,externalTree:p}=e,b="rootStore"in t?t.rootStore:t,g=b.useState("open"),m=b.useState("domReferenceElement"),y=b.useState("floatingElement"),{events:v,dataRef:C}=b.context,w=re(()=>C.current.floatingContext?.nodeId),R=o===!1,k=Es(m)&&R,S=c.useRef(["content"]),E=gt(o),V=gt(s),W=gt(u),H=ho(p),P=Ml(),q=c.useRef(null),Y=c.useRef(null),$=c.useRef(!1),N=c.useRef(!1),B=c.useRef(!1),j=c.useRef(-1),te=c.useRef(""),T=c.useRef(""),we=c.useRef(null),fe=c.useRef(null),ye=Zn(we,h,P?.beforeInsideRef),ae=Zn(fe,P?.afterInsideRef),ce=hn(),ge=hn(),Ce=Xs(),Se=P!=null,X=Rs(y),pe=re((A=X)=>A?mo(A,nr()):[]),xe=re(A=>{const F=pe(A);return S.current.map(()=>F).filter(Boolean).flat()});c.useEffect(()=>{if(r||!a)return;function A(ue){ue.key==="Tab"&&Ee(X,jt($e(X)))&&pe().length===0&&!k&&Te(ue)}const F=$e(X);return F.addEventListener("keydown",A),()=>{F.removeEventListener("keydown",A)}},[r,m,X,a,S,k,pe,xe]),c.useEffect(()=>{if(r||!g)return;const A=$e(X);function F(){B.current=!1}function ue(G){const U=ct(G),M=Ee(y,U)||Ee(m,U)||Ee(P?.portalNode,U);B.current=!M,T.current=G.pointerType||"keyboard",U?.closest(`[${Bg}]`)&&(N.current=!0)}function I(){T.current="keyboard"}return A.addEventListener("pointerdown",ue,!0),A.addEventListener("pointerup",F,!0),A.addEventListener("pointercancel",F,!0),A.addEventListener("keydown",I,!0),()=>{A.removeEventListener("pointerdown",ue,!0),A.removeEventListener("pointerup",F,!0),A.removeEventListener("pointercancel",F,!0),A.removeEventListener("keydown",I,!0)}},[r,y,m,X,g,P]),c.useEffect(()=>{if(r||!l)return;const A=$e(X);function F(){N.current=!0,ge.start(0,()=>{N.current=!1})}function ue(K){const D=ct(K),ie=pe().indexOf(D);ie!==-1&&(j.current=ie)}function I(K){const D=K.relatedTarget,Q=K.currentTarget,ie=ct(K);queueMicrotask(()=>{const be=w(),Ge=b.context.triggerElements,nt=D?.hasAttribute(Yr("focus-guard"))&&[we.current,fe.current,P?.beforeInsideRef.current,P?.afterInsideRef.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,Lt(f),Lt(d)].includes(D),_e=!(Ee(m,D)||Ee(y,D)||Ee(D,y)||Ee(P?.portalNode,D)||D!=null&&Ge.hasElement(D)||Ge.hasMatchingElement(ke=>Ee(ke,D))||nt||H&&(On(H.nodesRef.current,be).find(ke=>Ee(ke.context?.elements.floating,D)||Ee(ke.context?.elements.domReference,D))||da(H.nodesRef.current,be).find(ke=>[ke.context?.elements.floating,Rs(ke.context?.elements.floating)].includes(D)||ke.context?.elements.domReference===D)));if(Q===m&&X&&Ra(X,S),i&&Q!==m&&!pv(ie)&&jt(A)===A.body){if(Be(X)&&(X.focus(),i==="popup")){Ce.request(()=>{X.focus()});return}const ke=j.current,Ve=pe(),rt=Ve[ke]||Ve[Ve.length-1]||X;Be(rt)&&rt.focus()}if(C.current.insideReactTree){C.current.insideReactTree=!1;return}(k||!a)&&D&&_e&&!N.current&&(k||D!==Zo())&&($.current=!0,b.setOpen(!1,de(so,K)))})}function G(){B.current||(C.current.insideReactTree=!0,ce.start(0,()=>{C.current.insideReactTree=!1}))}const U=Be(m)?m:null,M=[];if(!(!y&&!U))return U&&(U.addEventListener("focusout",I),U.addEventListener("pointerdown",F),M.push(()=>{U.removeEventListener("focusout",I),U.removeEventListener("pointerdown",F)})),y&&(y.addEventListener("focusin",ue),y.addEventListener("focusout",I),P&&(y.addEventListener("focusout",G,!0),M.push(()=>{y.removeEventListener("focusout",G,!0)})),M.push(()=>{y.removeEventListener("focusin",ue),y.removeEventListener("focusout",I)})),()=>{M.forEach(K=>{K()})}},[r,m,y,X,a,H,P,b,l,i,pe,k,w,S,C,ce,ge,Ce,d,f]),c.useEffect(()=>{if(r||!y||!g)return;const A=Array.from(P?.portalNode?.querySelectorAll(`[${Yr("portal")}]`)||[]),ue=(H?da(H.nodesRef.current,w()):[]).find(G=>Es(G.context?.elements.domReference||null))?.context?.elements.domReference,I=[y,ue,...A,q.current,Y.current,we.current,fe.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,Lt(f),Lt(d),k?m:null].filter(G=>G!=null);return av(I,a||k)},[g,r,m,y,a,S,P,k,H,w,d,f]),oe(()=>{if(!g||r||!Be(X))return;const A=$e(X),F=jt(A);queueMicrotask(()=>{const ue=xe(X),I=E.current,G=typeof I=="function"?I(W.current||""):I;if(G===void 0||G===!1)return;let U;G===!0||G===null?U=ue[0]||X:U=Lt(G),U=U||ue[0]||X,!Ee(X,F)&&Xn(U,{preventScroll:U===X})})},[r,g,X,R,xe,E,W]),oe(()=>{if(r||!X)return;const A=$e(X),F=jt(A);dv(F);function ue(U){if(U.open||(te.current=uv(U.nativeEvent,T.current)),U.reason===Yg&&U.nativeEvent.type==="mouseleave"&&($.current=!0),U.reason===Ks)if(U.nested)$.current=!1;else if(hl(U.nativeEvent)||gl(U.nativeEvent))$.current=!1;else{let M=!1;document.createElement("div").focus({get preventScroll(){return M=!0,!1}}),M?$.current=!1:$.current=!0}}v.on("openchange",ue);const I=A.createElement("span");I.setAttribute("tabindex","-1"),I.setAttribute("aria-hidden","true"),Object.assign(I.style,si),Se&&m&&m.insertAdjacentElement("afterend",I);function G(){const U=V.current;let M=typeof U=="function"?U(te.current):U;if(M===void 0||M===!1)return null;if(M===null&&(M=!0),typeof M=="boolean"){const D=m||Zo();return D&&D.isConnected?D:I}const K=m||Zo()||I;return Lt(M)||K}return()=>{v.off("openchange",ue);const U=jt(A),M=Ee(y,U)||H&&On(H.nodesRef.current,w(),!1).some(D=>Ee(D.context?.elements.floating,U)),K=G();queueMicrotask(()=>{const D=fv(K),Q=typeof V.current!="boolean";V.current&&!$.current&&Be(D)&&(!(!Q&&D!==U&&U!==A.body)||M)&&D.focus({preventScroll:!0}),I.remove(),$.current=!1})}},[r,y,X,V,C,v,H,Se,m,w]),oe(()=>{if(!dl||g||!y)return;const A=jt($e(y));!Be(A)||!ti(A)||Ee(y,A)&&A.blur()},[g,y]),oe(()=>{if(!(r||!P))return P.setFocusManagerState({modal:a,closeOnFocusOut:l,open:g,onOpenChange:b.setOpen,domReference:m}),()=>{P.setFocusManagerState(null)}},[r,P,a,g,b,l,m]),oe(()=>{if(!(r||!X))return Ra(X,S),()=>{queueMicrotask(ai)}},[r,X,S]);const O=!r&&(a?!k:!0)&&(Se||a);return x.jsxs(c.Fragment,{children:[O&&x.jsx(Jn,{"data-type":"inside",ref:ye,onFocus:A=>{if(a){const F=xe();Xn(F[F.length-1])}else P?.portalNode&&($.current=!1,Yn(A,P.portalNode)?kl(m)?.focus():Lt(f??P.beforeOutsideRef)?.focus())}}),n,O&&x.jsx(Jn,{"data-type":"inside",ref:ae,onFocus:A=>{a?Xn(xe()[0]):P?.portalNode&&(l&&($.current=!0),Yn(A,P.portalNode)?Il(m)?.focus():Lt(d??P.afterOutsideRef)?.focus())}})]})}function Dl(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:s="click",toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:l=!0,touchOpenDelay:u=0,reason:d=bs}=t,f=c.useRef(void 0),h=Xs(),p=hn(),b=c.useMemo(()=>({onPointerDown(g){f.current=g.pointerType},onMouseDown(g){const m=f.current,y=g.nativeEvent,v=n.select("open");if(g.button!==0||s==="click"||fa(m)&&a)return;const C=r.current.openEvent,w=C?.type,R=n.select("domReferenceElement")!==g.currentTarget,k=v&&R||!(v&&i&&(!(C&&l)||w==="click"||w==="mousedown"));if(ti(y.target)){const E=de(d,y,y.target);k&&m==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,E)}):n.setOpen(k,E);return}const S=g.currentTarget;h.request(()=>{const E=de(d,y,S);k&&m==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,E)}):n.setOpen(k,E)})},onClick(g){if(s==="mousedown-only")return;const m=f.current;if(s==="mousedown"&&m){f.current=void 0;return}if(fa(m)&&a)return;const y=n.select("open"),v=r.current.openEvent,C=n.select("domReferenceElement")!==g.currentTarget,w=y&&C||!(y&&i&&(!(v&&l)||bl(v))),R=de(d,g.nativeEvent,g.currentTarget);w&&m==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,R)}):n.setOpen(w,R)},onKeyDown(){f.current=void 0}}),[r,s,a,n,l,i,h,p,u,d]);return c.useMemo(()=>o?{reference:b}:et,[o,b])}function Sa(e,t,n){let{reference:r,floating:o}=e;const s=bt(t),i=po(t),a=fo(i),l=ft(t),u=s==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(zt(t)){case"start":p[i]-=h*(n&&u?-1:1);break;case"end":p[i]+=h*(n&&u?-1:1);break}return p}async function hv(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Tt(t,e),b=ri(p),m=a[h?f==="floating"?"reference":"floating":f],y=Hr(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(m)))==null||n?m:m.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),v=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),w=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},R=Hr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:C,strategy:l}):v);return{top:(y.top-R.top+b.top)/w.y,bottom:(R.bottom-y.bottom+b.bottom)/w.y,left:(y.left-R.left+b.left)/w.x,right:(R.right-y.right+b.right)/w.x}}const gv=50,bv=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:hv},l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=Sa(u,r,l),h=r,p=0;const b={};for(let g=0;g<s.length;g++){const m=s[g];if(!m)continue;const{name:y,fn:v}=m,{x:C,y:w,data:R,reset:k}=await v({x:d,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:b,rects:u,platform:a,elements:{reference:e,floating:t}});d=C??d,f=w??f,b[y]={...b[y],...R},k&&p<gv&&(p++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(u=k.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:d,y:f}=Sa(u,h,l)),g=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:b}},vv=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=Tt(e,t)||{};if(u==null)return{};const f=ri(d),h={x:n,y:r},p=po(o),b=fo(p),g=await i.getDimensions(u),m=p==="y",y=m?"top":"left",v=m?"bottom":"right",C=m?"clientHeight":"clientWidth",w=s.reference[b]+s.reference[p]-h[p]-s.floating[b],R=h[p]-s.reference[p],k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let S=k?k[C]:0;(!S||!await(i.isElement==null?void 0:i.isElement(k)))&&(S=a.floating[C]||s.floating[b]);const E=w/2-R/2,V=S/2-g[b]/2-1,W=nn(f[y],V),H=nn(f[v],V),P=W,q=S-g[b]-H,Y=S/2-g[b]/2+E,$=Br(P,Y,q),N=!l.arrow&&zt(o)!=null&&Y!==$&&s.reference[b]/2-(Y<P?W:H)-g[b]/2<0,B=N?Y<P?Y-P:Y-q:0;return{[p]:h[p]+B,data:{[p]:$,centerOffset:Y-$-B,...N&&{alignmentOffset:B}},reset:N}}}),yv=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...m}=Tt(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=ft(o),v=bt(a),C=ft(a)===a,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),R=h||(C||!g?[Gr(a)]:Eb(a)),k=b!=="none";!h&&k&&R.push(...Ib(a,g,b,w));const S=[a,...R],E=await l.detectOverflow(t,m),V=[];let W=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&V.push(E[y]),f){const Y=Cb(o,i,w);V.push(E[Y[0]],E[Y[1]])}if(W=[...W,{placement:o,overflows:V}],!V.every(Y=>Y<=0)){var H,P;const Y=(((H=s.flip)==null?void 0:H.index)||0)+1,$=S[Y];if($&&(!(f==="alignment"?v!==bt($):!1)||W.every(j=>bt(j.placement)===v?j.overflows[0]>0:!0)))return{data:{index:Y,overflows:W},reset:{placement:$}};let N=(P=W.filter(B=>B.overflows[0]<=0).sort((B,j)=>B.overflows[1]-j.overflows[1])[0])==null?void 0:P.placement;if(!N)switch(p){case"bestFit":{var q;const B=(q=W.filter(j=>{if(k){const te=bt(j.placement);return te===v||te==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(te=>te>0).reduce((te,T)=>te+T,0)]).sort((j,te)=>j[1]-te[1])[0])==null?void 0:q[0];B&&(N=B);break}case"initialPlacement":N=a;break}if(o!==N)return{reset:{placement:N}}}return{}}}};function ka(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ia(e){return xb.some(t=>e[t]>=0)}const xv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=Tt(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=ka(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Ia(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=ka(i,n.floating);return{data:{escapedOffsets:a,escaped:Ia(a)}}}default:return{}}}}},Ll=new Set(["left","top"]);async function wv(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=ft(n),a=zt(n),l=bt(n)==="y",u=Ll.has(i)?-1:1,d=s&&l?-1:1,f=Tt(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:b}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof b=="number"&&(p=a==="end"?b*-1:b),l?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const Cv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await wv(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},Ev=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x:v,y:C}=y;return{x:v,y:C}}},...u}=Tt(e,t),d={x:n,y:r},f=await s.detectOverflow(t,u),h=bt(ft(o)),p=ni(h);let b=d[p],g=d[h];if(i){const y=p==="y"?"top":"left",v=p==="y"?"bottom":"right",C=b+f[y],w=b-f[v];b=Br(C,b,w)}if(a){const y=h==="y"?"top":"left",v=h==="y"?"bottom":"right",C=g+f[y],w=g-f[v];g=Br(C,g,w)}const m=l.fn({...t,[p]:b,[h]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:i,[h]:a}}}}}},Rv=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Tt(e,t),d={x:n,y:r},f=bt(o),h=ni(f);let p=d[h],b=d[f];const g=Tt(a,t),m=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const C=h==="y"?"height":"width",w=s.reference[h]-s.floating[C]+m.mainAxis,R=s.reference[h]+s.reference[C]-m.mainAxis;p<w?p=w:p>R&&(p=R)}if(u){var y,v;const C=h==="y"?"width":"height",w=Ll.has(ft(o)),R=s.reference[f]-s.floating[C]+(w&&((y=i.offset)==null?void 0:y[f])||0)+(w?0:m.crossAxis),k=s.reference[f]+s.reference[C]+(w?0:((v=i.offset)==null?void 0:v[f])||0)-(w?m.crossAxis:0);b<R?b=R:b>k&&(b=k)}return{[h]:p,[f]:b}}}},Sv=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...u}=Tt(e,t),d=await i.detectOverflow(t,u),f=ft(o),h=zt(o),p=bt(o)==="y",{width:b,height:g}=s.floating;let m,y;f==="top"||f==="bottom"?(m=f,y=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,m=h==="end"?"top":"bottom");const v=g-d.top-d.bottom,C=b-d.left-d.right,w=nn(g-d[m],v),R=nn(b-d[y],C),k=!t.middlewareData.shift;let S=w,E=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=v),k&&!h){const W=dt(d.left,0),H=dt(d.right,0),P=dt(d.top,0),q=dt(d.bottom,0);p?E=b-2*(W!==0||H!==0?W+H:dt(d.left,d.right)):S=g-2*(P!==0||q!==0?P+q:dt(d.top,d.bottom))}await l({...t,availableWidth:E,availableHeight:S});const V=await i.getDimensions(a.floating);return b!==V.width||g!==V.height?{reset:{rects:!0}}:{}}}};function jl(e){const t=pt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Be(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=zr(n)!==s||zr(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function ci(e){return Ae(e)?e:e.contextElement}function Tn(e){const t=ci(e);if(!Be(t))return Pt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=jl(t);let i=(s?zr(n.width):n.width)/r,a=(s?zr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const kv=Pt(0);function Vl(e){const t=Ye(e);return!co()||!t.visualViewport?kv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Iv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ye(e)?!1:t}function gn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=ci(e);let i=Pt(1);t&&(r?Ae(r)&&(i=Tn(r)):i=Tn(e));const a=Iv(s,n,r)?Vl(s):Pt(0);let l=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const h=Ye(s),p=r&&Ae(r)?Ye(r):r;let b=h,g=xs(b);for(;g&&r&&p!==b;){const m=Tn(g),y=g.getBoundingClientRect(),v=pt(g),C=y.left+(g.clientLeft+parseFloat(v.paddingLeft))*m.x,w=y.top+(g.clientTop+parseFloat(v.paddingTop))*m.y;l*=m.x,u*=m.y,d*=m.x,f*=m.y,l+=C,u+=w,b=Ye(g),g=xs(b)}}return Hr({width:d,height:f,x:l,y:u})}function go(e,t){const n=lo(e).scrollLeft;return t?t.left+n:gn(Mt(e)).left+n}function Fl(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-go(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Nv(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Mt(r),a=t?ao(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=Pt(1);const d=Pt(0),f=Be(r);if((f||!f&&!s)&&((sn(r)!=="body"||an(i))&&(l=lo(r)),f)){const p=gn(r);u=Tn(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const h=i&&!f&&!s?Fl(i,l):Pt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-l.scrollTop*u.y+d.y+h.y}}function Ov(e){return Array.from(e.getClientRects())}function Pv(e){const t=Mt(e),n=lo(e),r=e.ownerDocument.body,o=dt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=dt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+go(e);const a=-n.scrollTop;return pt(r).direction==="rtl"&&(i+=dt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Na=25;function Tv(e,t){const n=Ye(e),r=Mt(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const d=co();(!d||d&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const u=go(r);if(u<=0){const d=r.ownerDocument,f=d.body,h=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,b=Math.abs(r.clientWidth-f.clientWidth-p);b<=Na&&(s-=b)}else u<=Na&&(s+=u);return{width:s,height:i,x:a,y:l}}function Av(e,t){const n=gn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Be(e)?Tn(e):Pt(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,u=r*s.y;return{width:i,height:a,x:l,y:u}}function Oa(e,t,n){let r;if(t==="viewport")r=Tv(e,n);else if(t==="document")r=Pv(Mt(e));else if(Ae(t))r=Av(t,n);else{const o=Vl(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Hr(r)}function $l(e,t){const n=Ft(e);return n===t||!Ae(n)||Vt(n)?!1:pt(n).position==="fixed"||$l(n,t)}function Mv(e,t){const n=t.get(e);if(n)return n;let r=Qt(e,[],!1).filter(a=>Ae(a)&&sn(a)!=="body"),o=null;const s=pt(e).position==="fixed";let i=s?Ft(e):e;for(;Ae(i)&&!Vt(i);){const a=pt(i),l=Qs(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||an(i)&&!l&&$l(e,i))?r=r.filter(d=>d!==i):o=a,i=Ft(i)}return t.set(e,r),r}function _v(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?ao(t)?[]:Mv(t,this._c):[].concat(n),r],a=Oa(t,i[0],o);let l=a.top,u=a.right,d=a.bottom,f=a.left;for(let h=1;h<i.length;h++){const p=Oa(t,i[h],o);l=dt(p.top,l),u=nn(p.right,u),d=nn(p.bottom,d),f=dt(p.left,f)}return{width:u-f,height:d-l,x:f,y:l}}function Dv(e){const{width:t,height:n}=jl(e);return{width:t,height:n}}function Lv(e,t,n){const r=Be(t),o=Mt(t),s=n==="fixed",i=gn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Pt(0);function u(){l.x=go(o)}if(r||!r&&!s)if((sn(t)!=="body"||an(o))&&(a=lo(t)),r){const p=gn(t,!0,s,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&u();s&&!r&&o&&u();const d=o&&!r&&!s?Fl(o,a):Pt(0),f=i.left+a.scrollLeft-l.x-d.x,h=i.top+a.scrollTop-l.y-d.y;return{x:f,y:h,width:i.width,height:i.height}}function Qo(e){return pt(e).position==="static"}function Pa(e,t){if(!Be(e)||pt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Mt(e)===n&&(n=n.ownerDocument.body),n}function zl(e,t){const n=Ye(e);if(ao(e))return n;if(!Be(e)){let o=Ft(e);for(;o&&!Vt(o);){if(Ae(o)&&!Qo(o))return o;o=Ft(o)}return n}let r=Pa(e,t);for(;r&&sb(r)&&Qo(r);)r=Pa(r,t);return r&&Vt(r)&&Qo(r)&&!Qs(r)?n:r||cb(e)||n}const jv=async function(e){const t=this.getOffsetParent||zl,n=this.getDimensions,r=await n(e.floating);return{reference:Lv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Vv(e){return pt(e).direction==="rtl"}const Fv={convertOffsetParentRelativeRectToViewportRelativeRect:Nv,getDocumentElement:Mt,getClippingRect:_v,getOffsetParent:zl,getElementRects:jv,getClientRects:Ov,getDimensions:Dv,getScale:Tn,isElement:Ae,isRTL:Vv};function Bl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $v(e,t){let n=null,r;const o=Mt(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:h,height:p}=u;if(a||t(),!h||!p)return;const b=Nn(f),g=Nn(o.clientWidth-(d+h)),m=Nn(o.clientHeight-(f+p)),y=Nn(d),C={rootMargin:-b+"px "+-g+"px "+-m+"px "+-y+"px",threshold:dt(0,nn(1,l))||1};let w=!0;function R(k){const S=k[0].intersectionRatio;if(S!==l){if(!w)return i();S?i(!1,S):r=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!Bl(u,e.getBoundingClientRect())&&i(),w=!1}try{n=new IntersectionObserver(R,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(R,C)}n.observe(e)}return i(!0),s}function Ns(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=ci(e),d=o||s?[...u?Qt(u):[],...t?Qt(t):[]]:[];d.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=u&&a?$v(u,n):null;let h=-1,p=null;i&&(p=new ResizeObserver(y=>{let[v]=y;v&&v.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=p)==null||C.observe(t)})),n()}),u&&!l&&p.observe(u),t&&p.observe(t));let b,g=l?gn(e):null;l&&m();function m(){const y=gn(e);g&&!Bl(g,y)&&n(),g=y,b=requestAnimationFrame(m)}return n(),()=>{var y;d.forEach(v=>{o&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),f?.(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(b)}}const zv=Cv,Bv=Ev,Gv=yv,Hv=Sv,Wv=xv,Ta=vv,Uv=Rv,Kv=(e,t,n)=>{const r=new Map,o={platform:Fv,...n},s={...o.platform,_c:r};return bv(e,t,{...o,platform:s})};var qv=typeof document<"u",Yv=function(){},_r=qv?Le.useLayoutEffect:Yv;function Xr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Xr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Xr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Gl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Aa(e,t){const n=Gl(e);return Math.round(t*n)/n}function Jo(e){const t=c.useRef(e);return _r(()=>{t.current=e}),t}function Hl(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,f]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=c.useState(r);Xr(h,r)||p(r);const[b,g]=c.useState(null),[m,y]=c.useState(null),v=c.useCallback(j=>{j!==k.current&&(k.current=j,g(j))},[]),C=c.useCallback(j=>{j!==S.current&&(S.current=j,y(j))},[]),w=s||b,R=i||m,k=c.useRef(null),S=c.useRef(null),E=c.useRef(d),V=l!=null,W=Jo(l),H=Jo(o),P=Jo(u),q=c.useCallback(()=>{if(!k.current||!S.current)return;const j={placement:t,strategy:n,middleware:h};H.current&&(j.platform=H.current),Kv(k.current,S.current,j).then(te=>{const T={...te,isPositioned:P.current!==!1};Y.current&&!Xr(E.current,T)&&(E.current=T,rn.flushSync(()=>{f(T)}))})},[h,t,n,H,P]);_r(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(j=>({...j,isPositioned:!1})))},[u]);const Y=c.useRef(!1);_r(()=>(Y.current=!0,()=>{Y.current=!1}),[]),_r(()=>{if(w&&(k.current=w),R&&(S.current=R),w&&R){if(W.current)return W.current(w,R,q);q()}},[w,R,q,W,V]);const $=c.useMemo(()=>({reference:k,floating:S,setReference:v,setFloating:C}),[v,C]),N=c.useMemo(()=>({reference:w,floating:R}),[w,R]),B=c.useMemo(()=>{const j={position:n,left:0,top:0};if(!N.floating)return j;const te=Aa(N.floating,d.x),T=Aa(N.floating,d.y);return a?{...j,transform:"translate("+te+"px, "+T+"px)",...Gl(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:te,top:T}},[n,a,N.floating,d.x,d.y]);return c.useMemo(()=>({...d,update:q,refs:$,elements:N,floatingStyles:B}),[d,q,$,N,B])}const Xv=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ta({element:r.current,padding:o}).fn(n):{}:r?Ta({element:r,padding:o}).fn(n):{}}}},Wl=(e,t)=>{const n=zv(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ul=(e,t)=>{const n=Bv(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kl=(e,t)=>({fn:Uv(e).fn,options:[e,t]}),ql=(e,t)=>{const n=Gv(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yl=(e,t)=>{const n=Hv(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xl=(e,t)=>{const n=Wv(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zv=(e,t)=>{const n=Xv(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qv={intentional:"onClick",sloppy:"onPointerDown"};function Jv(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function ey(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),s=n.useState("referenceElement"),i=n.useState("domReferenceElement"),{onOpenChange:a,dataRef:l}=n.context,{enabled:u=!0,escapeKey:d=!0,outsidePress:f=!0,outsidePressEvent:h="sloppy",referencePress:p=!1,referencePressEvent:b="sloppy",ancestorScroll:g=!1,bubbles:m,externalTree:y}=t,v=ho(y),C=re(typeof f=="function"?f:()=>!1),w=typeof f=="function"?C:f,R=c.useRef(!1),{escapeKey:k,outsidePress:S}=Jv(m),E=c.useRef(null),V=hn(),W=hn(),H=re(()=>{W.clear(),l.current.insideReactTree=!1}),P=c.useRef(!1),q=c.useRef(""),Y=re(O=>{q.current=O.pointerType}),$=re(()=>{const O=q.current,A=O==="pen"||!O?"mouse":O,F=typeof h=="function"?h():h;return typeof F=="string"?F:F[A]}),N=re(O=>{if(!r||!u||!d||O.key!=="Escape"||P.current)return;const A=l.current.floatingContext?.nodeId,F=v?On(v.nodesRef.current,A):[];if(!k&&F.length>0){let G=!0;if(F.forEach(U=>{U.context?.open&&!U.context.dataRef.current.__escapeKeyBubbles&&(G=!1)}),!G)return}const ue=yb(O)?O.nativeEvent:O,I=de(nl,ue);n.setOpen(!1,I),!k&&!I.isPropagationAllowed&&O.stopPropagation()}),B=re(O=>{const A=$();return A==="intentional"&&O.type!=="click"||A==="sloppy"&&O.type==="click"}),j=re(()=>{l.current.insideReactTree=!0,W.start(0,H)}),te=re((O,A=!1)=>{if(B(O)){H();return}if(l.current.insideReactTree){H();return}if($()==="intentional"&&A||typeof w=="function"&&!w(O))return;const F=ct(O),ue=`[${Yr("inert")}]`,I=$e(n.select("floatingElement")).querySelectorAll(ue),G=n.context.triggerElements;if(F&&(G.hasElement(F)||G.hasMatchingElement(Q=>Ee(Q,F))))return;let U=Ae(F)?F:null;for(;U&&!Vt(U);){const Q=Ft(U);if(Vt(Q)||!Ae(Q))break;U=Q}if(I.length&&Ae(F)&&!vb(F)&&!Ee(F,n.select("floatingElement"))&&Array.from(I).every(Q=>!Ee(U,Q)))return;if(Be(F)&&!("touches"in O)){const Q=Vt(F),ie=pt(F),be=/auto|scroll/,Ge=Q||be.test(ie.overflowX),nt=Q||be.test(ie.overflowY),_e=Ge&&F.clientWidth>0&&F.scrollWidth>F.clientWidth,ke=nt&&F.clientHeight>0&&F.scrollHeight>F.clientHeight,Ve=ie.direction==="rtl",rt=ke&&(Ve?O.offsetX<=F.offsetWidth-F.clientWidth:O.offsetX>F.clientWidth),Je=_e&&O.offsetY>F.clientHeight;if(rt||Je)return}const M=l.current.floatingContext?.nodeId,K=v&&On(v.nodesRef.current,M).some(Q=>Rt(O,Q.context?.elements.floating));if(Rt(O,n.select("floatingElement"))||Rt(O,n.select("domReferenceElement"))||K)return;const D=v?On(v.nodesRef.current,M):[];if(D.length>0){let Q=!0;if(D.forEach(ie=>{ie.context?.open&&!ie.context.dataRef.current.__outsidePressBubbles&&(Q=!1)}),!Q)return}n.setOpen(!1,de(Ks,O)),H()}),T=re(O=>{$()!=="sloppy"||O.pointerType==="touch"||!n.select("open")||!u||Rt(O,n.select("floatingElement"))||Rt(O,n.select("domReferenceElement"))||te(O)}),we=re(O=>{if($()!=="sloppy"||!n.select("open")||!u||Rt(O,n.select("floatingElement"))||Rt(O,n.select("domReferenceElement")))return;const A=O.touches[0];A&&(E.current={startTime:Date.now(),startX:A.clientX,startY:A.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},V.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}),fe=re(O=>{const A=ct(O);function F(){we(O),A?.removeEventListener(O.type,F)}A?.addEventListener(O.type,F)}),ye=re(O=>{const A=R.current;if(R.current=!1,V.clear(),O.type==="mousedown"&&E.current&&!E.current.dismissOnMouseDown)return;const F=ct(O);function ue(){O.type==="pointerdown"?T(O):te(O,A),F?.removeEventListener(O.type,ue)}F?.addEventListener(O.type,ue)}),ae=re(O=>{if($()!=="sloppy"||!E.current||Rt(O,n.select("floatingElement"))||Rt(O,n.select("domReferenceElement")))return;const A=O.touches[0];if(!A)return;const F=Math.abs(A.clientX-E.current.startX),ue=Math.abs(A.clientY-E.current.startY),I=Math.sqrt(F*F+ue*ue);I>5&&(E.current.dismissOnTouchEnd=!0),I>10&&(te(O),V.clear(),E.current=null)}),ce=re(O=>{const A=ct(O);function F(){ae(O),A?.removeEventListener(O.type,F)}A?.addEventListener(O.type,F)}),ge=re(O=>{$()!=="sloppy"||!E.current||Rt(O,n.select("floatingElement"))||Rt(O,n.select("domReferenceElement"))||(E.current.dismissOnTouchEnd&&te(O),V.clear(),E.current=null)}),Ce=re(O=>{const A=ct(O);function F(){ge(O),A?.removeEventListener(O.type,F)}A?.addEventListener(O.type,F)});c.useEffect(()=>{if(!r||!u)return;l.current.__escapeKeyBubbles=k,l.current.__outsidePressBubbles=S;const O=new Dn;function A(U){n.setOpen(!1,de(ht,U))}function F(){O.clear(),P.current=!0}function ue(){O.start(co()?5:0,()=>{P.current=!1})}const I=$e(o);I.addEventListener("pointerdown",Y,!0),d&&(I.addEventListener("keydown",N),I.addEventListener("compositionstart",F),I.addEventListener("compositionend",ue)),w&&(I.addEventListener("click",ye,!0),I.addEventListener("pointerdown",ye,!0),I.addEventListener("touchstart",fe,!0),I.addEventListener("touchmove",ce,!0),I.addEventListener("touchend",Ce,!0),I.addEventListener("mousedown",ye,!0));let G=[];return g&&(Ae(i)&&(G=Qt(i)),Ae(o)&&(G=G.concat(Qt(o))),!Ae(s)&&s&&s.contextElement&&(G=G.concat(Qt(s.contextElement)))),G=G.filter(U=>U!==I.defaultView?.visualViewport),G.forEach(U=>{U.addEventListener("scroll",A,{passive:!0})}),()=>{I.removeEventListener("pointerdown",Y,!0),d&&(I.removeEventListener("keydown",N),I.removeEventListener("compositionstart",F),I.removeEventListener("compositionend",ue)),w&&(I.removeEventListener("click",ye,!0),I.removeEventListener("pointerdown",ye,!0),I.removeEventListener("touchstart",fe,!0),I.removeEventListener("touchmove",ce,!0),I.removeEventListener("touchend",Ce,!0),I.removeEventListener("mousedown",ye,!0)),G.forEach(U=>{U.removeEventListener("scroll",A)}),O.clear(),R.current=!1}},[l,o,s,i,d,w,r,a,g,u,k,S,N,te,ye,T,fe,ce,Ce,Y,n]),c.useEffect(H,[w,H]);const Se=c.useMemo(()=>({onKeyDown:N,...p&&{[Qv[b]]:O=>{n.setOpen(!1,de(bs,O.nativeEvent))},...b!=="intentional"&&{onClick(O){n.setOpen(!1,de(bs,O.nativeEvent))}}}}),[N,n,p,b]),X=re(O=>{const A=ct(O.nativeEvent);!Ee(n.select("floatingElement"),A)||O.button!==0||(R.current=!0)}),pe=re(O=>{!r||!u||O.button!==0||(R.current=!0)}),xe=c.useMemo(()=>({onKeyDown:N,onPointerDown:X,onMouseDown:X,onMouseUp:X,onClickCapture:j,onMouseDownCapture(O){j(),pe(O)},onPointerDownCapture(O){j(),pe(O)},onMouseUpCapture:j,onTouchEndCapture:j,onTouchMoveCapture:j}),[N,X,j,pe]);return c.useMemo(()=>u?{reference:Se,floating:xe,trigger:Se}:{},[u,Se,xe])}var ty=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(s){({stack:o}=s)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
17
|
+
`))},[JSON.stringify(t)])}const l=c.useCallback(u=>{o||i(u)},[]);return[a,l]}const ca={};function vt(e,t){const n=c.useRef(ca);return n.current===ca&&(n.current=e(t)),n}const Yo=c[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Ig=Yo&&Yo!==c.useLayoutEffect?Yo:e=>e();function re(e){const t=vt(Ng).current;return t.next=e,Ig(t.effect),t.trampoline}function Ng(){const e={next:void 0,callback:Og,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Og(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const Pg=()=>{},oe=typeof document<"u"?c.useLayoutEffect:Pg,qs=c.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(qs.displayName="CompositeListContext");function Tg(){return c.useContext(qs)}function el(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,s=re(o),i=c.useRef(0),a=vt(Mg).current,l=vt(Ag).current,[u,d]=c.useState(0),f=c.useRef(u),h=re((y,v)=>{l.set(y,v??null),f.current+=1,d(f.current)}),p=re(y=>{l.delete(y),f.current+=1,d(f.current)}),b=c.useMemo(()=>{const y=new Map;return Array.from(l.keys()).filter(C=>C.isConnected).sort(_g).forEach((C,w)=>{const R=l.get(C)??{};y.set(C,{...R,index:w})}),y},[l,u]);oe(()=>{if(typeof MutationObserver!="function"||b.size===0)return;const y=new MutationObserver(v=>{const C=new Set,w=R=>C.has(R)?C.delete(R):C.add(R);v.forEach(R=>{R.removedNodes.forEach(w),R.addedNodes.forEach(w)}),C.size===0&&(f.current+=1,d(f.current))});return b.forEach((v,C)=>{C.parentElement&&y.observe(C.parentElement,{childList:!0})}),()=>{y.disconnect()}},[b]),oe(()=>{f.current===u&&(n.current.length!==b.size&&(n.current.length=b.size),r&&r.current.length!==b.size&&(r.current.length=b.size),i.current=b.size),s(b)},[s,b,n,r,u]),oe(()=>()=>{n.current=[]},[n]),oe(()=>()=>{r&&(r.current=[])},[r]);const g=re(y=>(a.add(y),()=>{a.delete(y)}));oe(()=>{a.forEach(y=>y(b))},[a,b]);const m=c.useMemo(()=>({register:h,unregister:p,subscribeMapChange:g,elementsRef:n,labelsRef:r,nextIndexRef:i}),[h,p,g,n,r,i]);return x.jsx(qs.Provider,{value:m,children:t})}function Ag(){return new Map}function Mg(){return new Set}function _g(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const tl=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(tl.displayName="DirectionContext");function nl(){return c.useContext(tl)?.direction??"ltr"}function St(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function Qn(e,t,n,r){const o=vt(rl).current;return Lg(o,e,t,n,r)&&ol(o,[e,t,n,r]),o.callback}function Dg(e){const t=vt(rl).current;return jg(t,e)&&ol(t,e),t.callback}function rl(){return{callback:null,cleanup:null,refs:[]}}function Lg(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function jg(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function ol(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=s(n);typeof i=="function"&&(r[o]=i);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=r[o];typeof i=="function"?i():s(null);break}case"object":{s.current=null;break}}}}}}}const Vg=parseInt(c.version,10);function Ys(e){return Vg>=e}function la(e){if(!c.isValidElement(e))return null;const t=e,n=t.props;return(Ys(19)?n?.ref:t.ref)??null}function bs(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Fg(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const s=t[r](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function $g(e,t){return typeof e=="function"?e(t):e}function zg(e,t){return typeof e=="function"?e(t):e}const Un={};function sl(e,t,n,r,o){let s={...vs(e,Un)};return t&&(s=Lr(s,t)),n&&(s=Lr(s,n)),r&&(s=Lr(s,r)),s}function Bg(e){if(e.length===0)return Un;if(e.length===1)return vs(e[0],Un);let t={...vs(e[0],Un)};for(let n=1;n<e.length;n+=1)t=Lr(t,e[n]);return t}function Lr(e,t){return il(t)?t(e):Gg(e,t)}function Gg(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=bs(e.style,r);break}case"className":{e[n]=al(e.className,r);break}default:Hg(n,r)?e[n]=Wg(e[n],r):e[n]=r}}return e}function Hg(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function il(e){return typeof e=="function"}function vs(e,t){return il(e)?e(t):e??Un}function Wg(e,t){return t?e?n=>{if(Ug(n)){const o=n;ys(o);const s=t(o);return o.baseUIHandlerPrevented||e?.(o),s}const r=t(n);return e?.(n),r}:t:e}function ys(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function al(e,t){return t?e?t+" "+e:t:e}function Ug(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Me(){}const yr=Object.freeze([]),et=Object.freeze({}),Kg={style:{transition:"none"}},qg="data-base-ui-click-trigger",Yg={fallbackAxisSide:"none"},Xg={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function tt(e,t,n={}){const r=t.render,o=Zg(t,n);if(n.enabled===!1)return null;const s=n.state??et;return Jg(e,r,o,s)}function Zg(e,t={}){const{className:n,style:r,render:o}=e,{state:s=et,ref:i,props:a,stateAttributesMapping:l,enabled:u=!0}=t,d=u?$g(n,s):void 0,f=u?zg(r,s):void 0,h=u?Fg(s,l):et,p=u?bs(h,Array.isArray(a)?Bg(a):a)??et:et;return typeof document<"u"&&(u?Array.isArray(i)?p.ref=Dg([p.ref,la(o),...i]):p.ref=Qn(p.ref,la(o),i):Qn(null,null)),u?(d!==void 0&&(p.className=al(p.className,d)),f!==void 0&&(p.style=bs(p.style,f)),p):et}const Qg=Symbol.for("react.lazy");function Jg(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=sl(n,t.props);o.ref=n.ref;let s=t;if(s?.$$typeof===Qg&&(s=c.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!c.isValidElement(s))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
|
|
18
|
+
`));return c.cloneElement(s,o)}if(e&&typeof e=="string")return eb(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":St(8))}function eb(e,t){return e==="button"?Le.createElement("button",{type:"button",...t,key:t.key}):e==="img"?Le.createElement("img",{alt:"",...t,key:t.key}):c.createElement(e,t)}const ht="none",xs="trigger-press",tb="trigger-hover",Xs="outside-press",nb="item-press",ua="clear-press",rb="chip-remove-press",In="input-change",Yt="input-clear",ob="input-press",co="focus-out",cl="escape-key",Kn="list-navigation";function de(e,t,n,r){let o=!1,s=!1;const i=et;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){s=!0},get isCanceled(){return o},get isPropagationAllowed(){return s},trigger:n,...i}}function Bn(e,t,n){const r=n??et;return{reason:e,event:t??new Event("base-ui"),...r}}const ws={...c};let da=0;function sb(e,t="mui"){const[n,r]=c.useState(e),o=e||n;return c.useEffect(()=>{n==null&&(da+=1,r(`${t}-${da}`))},[n,t]),o}const fa=ws.useId;function Zs(e,t){if(fa!==void 0){const n=fa();return e??(t?`${t}-${n}`:n)}return sb(e,t)}function Qs(e){return Zs(e,"base-ui")}const ib=[];function ll(e){c.useEffect(e,ib)}const xr=null;let pa=globalThis.requestAnimationFrame;class ab{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&pa!==requestAnimationFrame&&(pa=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const wr=new ab;class Nt{static create(){return new Nt}static request(t){return wr.request(t)}static cancel(t){return wr.cancel(t)}currentId=xr;request(t){this.cancel(),this.currentId=wr.request(()=>{this.currentId=xr,t()})}cancel=()=>{this.currentId!==xr&&(wr.cancel(this.currentId),this.currentId=xr)};disposeEffect=()=>this.cancel}function Js(){const e=vt(Nt.create).current;return ll(e.disposeEffect),e}function Lt(e){return e==null?e:"current"in e?e.current:e}let Jn=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const cb={[Jn.startingStyle]:""},lb={[Jn.endingStyle]:""},ul={transitionStatus(e){return e==="starting"?cb:e==="ending"?lb:null}};function ub(e,t=!1,n=!0){const r=Js();return re((o,s=null)=>{r.cancel();function i(){rn.flushSync(o)}const a=Lt(e);if(a==null)return;const l=a;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let u=function(){const f=Jn.startingStyle;if(!l.hasAttribute(f)){r.request(d);return}const h=new MutationObserver(()=>{l.hasAttribute(f)||(h.disconnect(),d())});h.observe(l,{attributes:!0,attributeFilter:[f]}),s?.addEventListener("abort",()=>h.disconnect(),{once:!0})},d=function(){Promise.all(l.getAnimations().map(f=>f.finished)).then(()=>{s?.aborted||i()}).catch(()=>{const f=l.getAnimations();if(n){if(s?.aborted)return;i()}else f.length>0&&f.some(h=>h.pending||h.playState!=="finished")&&d()})};if(t){u();return}r.request(d)}})}function dl(e,t=!1,n=!1){const[r,o]=c.useState(e&&t?"idle":void 0),[s,i]=c.useState(e);return e&&!s&&(i(!0),o("starting")),!e&&s&&r!=="ending"&&!n&&o("ending"),!e&&!s&&r==="ending"&&o(void 0),oe(()=>{if(!e&&s&&r!=="ending"&&n){const a=Nt.request(()=>{o("ending")});return()=>{Nt.cancel(a)}}},[e,s,r,n]),oe(()=>{if(!e||t)return;const a=Nt.request(()=>{o(void 0)});return()=>{Nt.cancel(a)}},[t,e]),oe(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&o("starting");const a=Nt.request(()=>{o("idle")});return()=>{Nt.cancel(a)}},[t,e,s,o,r]),c.useMemo(()=>({mounted:s,setMounted:i,transitionStatus:r}),[s,r])}let fl=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function pl(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:s}=e,{register:i,unregister:a,subscribeMapChange:l,elementsRef:u,labelsRef:d,nextIndexRef:f}=Tg(),h=c.useRef(-1),[p,b]=c.useState(s??(o===fl.GuessFromOrder?()=>{if(h.current===-1){const y=f.current;f.current+=1,h.current=y}return h.current}:-1)),g=c.useRef(null),m=c.useCallback(y=>{if(g.current=y,p!==-1&&y!==null&&(u.current[p]=y,d)){const v=t!==void 0;d.current[p]=v?t:r?.current?.textContent??y.textContent}},[p,u,d,t,r]);return oe(()=>{if(s!=null)return;const y=g.current;if(y)return i(y,n),()=>{a(y)}},[s,i,a,n]),oe(()=>{if(s==null)return l(y=>{const v=g.current?y.get(g.current)?.index:null;v!=null&&b(v)})},[s,l,b]),c.useMemo(()=>({ref:m,index:p}),[p,m])}function lo(){return typeof window<"u"}function sn(e){return ei(e)?(e.nodeName||"").toLowerCase():"#document"}function Ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mt(e){var t;return(t=(ei(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ei(e){return lo()?e instanceof Node||e instanceof Ye(e).Node:!1}function Ae(e){return lo()?e instanceof Element||e instanceof Ye(e).Element:!1}function Be(e){return lo()?e instanceof HTMLElement||e instanceof Ye(e).HTMLElement:!1}function Cs(e){return!lo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ye(e).ShadowRoot}function an(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=pt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function db(e){return/^(table|td|th)$/.test(sn(e))}function uo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const fb=/transform|translate|scale|rotate|perspective|filter/,pb=/paint|layout|strict|content/,pn=e=>!!e&&e!=="none";let Xo;function ti(e){const t=Ae(e)?pt(e):e;return pn(t.transform)||pn(t.translate)||pn(t.scale)||pn(t.rotate)||pn(t.perspective)||!fo()&&(pn(t.backdropFilter)||pn(t.filter))||fb.test(t.willChange||"")||pb.test(t.contain||"")}function mb(e){let t=Ft(e);for(;Be(t)&&!Vt(t);){if(ti(t))return t;if(uo(t))return null;t=Ft(t)}return null}function fo(){return Xo==null&&(Xo=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Xo}function Vt(e){return/^(html|body|#document)$/.test(sn(e))}function pt(e){return Ye(e).getComputedStyle(e)}function po(e){return Ae(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ft(e){if(sn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Cs(e)&&e.host||Mt(e);return Cs(t)?t.host:t}function ml(e){const t=Ft(e);return Vt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Be(t)&&an(t)?t:ml(t)}function Qt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ml(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Ye(o);if(s){const a=Es(i);return t.concat(i,i.visualViewport||[],an(o)?o:[],a&&n?Qt(a):[])}else return t.concat(o,Qt(o,[],n))}function Es(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}let Rs;process.env.NODE_ENV!=="production"&&(Rs=new Set);function ma(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Rs.has(t)||(Rs.add(t),console.error(`Base UI: ${t}`))}}const hl=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(hl.displayName="CompositeRootContext");function hb(e=!1){const t=c.useContext(hl);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":St(16));return t}function gb(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:s}=e,i=r&&t!==!1,a=r&&t===!1;return{props:c.useMemo(()=>{const u={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return r||(u.tabIndex=o,!s&&n&&(u.tabIndex=t?o:-1)),(s&&(t||i)||!s&&n)&&(u["aria-disabled"]=n),s&&(!t||a)&&(u.disabled=n),u},[r,n,t,i,a,s,o])}}function mo(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,s=c.useRef(null),i=hb(!0)!==void 0,a=re(()=>{const h=s.current;return!!(h?.tagName==="A"&&h?.href)}),{props:l}=gb({focusableWhenDisabled:n,disabled:t,composite:i,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&c.useEffect(()=>{if(!s.current)return;const h=s.current.tagName==="BUTTON";if(o){if(!h){const p=ws.captureOwnerStack?.()||"";ma(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${p}`)}}else if(h){const p=ws.captureOwnerStack?.()||"";ma(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${p}`)}},[o]);const u=c.useCallback(()=>{const h=s.current;bb(h)&&i&&t&&l.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,l.disabled,i]);oe(u,[u]);const d=c.useCallback((h={})=>{const{onClick:p,onMouseDown:b,onKeyUp:g,onKeyDown:m,onPointerDown:y,...v}=h;return sl({type:o?"button":void 0,onClick(w){if(t){w.preventDefault();return}p?.(w)},onMouseDown(w){t||b?.(w)},onKeyDown(w){if(t||(ys(w),m?.(w)),w.baseUIHandlerPrevented)return;const R=w.target===w.currentTarget&&!o&&!a()&&!t,k=w.key==="Enter",S=w.key===" ";R&&((S||k)&&w.preventDefault(),k&&p?.(w))},onKeyUp(w){t||(ys(w),g?.(w)),!w.baseUIHandlerPrevented&&w.target===w.currentTarget&&!o&&!t&&w.key===" "&&p?.(w)},onPointerDown(w){if(t){w.preventDefault();return}y?.(w)}},o?void 0:{role:"button"},l,v)},[t,l,o,a]),f=re(h=>{s.current=h,u()});return{getButtonProps:d,buttonRef:f}}function bb(e){return Be(e)&&e.tagName==="BUTTON"}const Cn=typeof navigator<"u",Zo=xb(),gl=Cb(),ni=wb(),bl=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),vl=Zo.platform==="MacIntel"&&Zo.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Zo.platform),ha=Cn&&/firefox/i.test(ni),vb=Cn&&/apple/i.test(navigator.vendor),Gr=Cn&&/android/i.test(gl)||/android/i.test(ni);Cn&&gl.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const yb=ni.includes("jsdom/");function xb(){if(!Cn)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function wb(){if(!Cn)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Cb(){if(!Cn)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const Ss="data-base-ui-focusable",yl="active",xl="selected",Eb="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Jt="ArrowLeft",en="ArrowRight",ri="ArrowUp",nr="ArrowDown";function jt(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Ee(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Cs(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ct(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Rt(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Rb(e){return e.matches("html,body")}function oi(e){return Be(e)&&e.matches(Eb)}function ks(e){return e?e.getAttribute("role")==="combobox"&&oi(e):!1}function Is(e){return e?e.hasAttribute(Ss)?e:e.querySelector(`[${Ss}]`)||e:null}function On(e,t,n=!0){return e.filter(o=>o.parentId===t&&(!n||o.context?.open)).flatMap(o=>[o,...On(e,o.id,n)])}function ga(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(s=>s.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}function Te(e){e.preventDefault(),e.stopPropagation()}function Sb(e){return"nativeEvent"in e}function wl(e){return e.pointerType===""&&e.isTrusted?!0:Gr&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Cl(e){return yb?!1:!Gr&&e.width===0&&e.height===0||Gr&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function ba(e,t){return["mouse","pen"].includes(e)}function El(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const kb=["top","right","bottom","left"],nn=Math.min,dt=Math.max,Hr=Math.round,Nn=Math.floor,Pt=e=>({x:e,y:e}),Ib={left:"right",right:"left",bottom:"top",top:"bottom"};function Wr(e,t,n){return dt(e,nn(t,n))}function Tt(e,t){return typeof e=="function"?e(t):e}function ft(e){return e.split("-")[0]}function zt(e){return e.split("-")[1]}function si(e){return e==="x"?"y":"x"}function ho(e){return e==="y"?"height":"width"}function bt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function go(e){return si(bt(e))}function Nb(e,t,n){n===void 0&&(n=!1);const r=zt(e),o=go(e),s=ho(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Ur(i)),[i,Ur(i)]}function Ob(e){const t=Ur(e);return[Ns(e),t,Ns(t)]}function Ns(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const va=["left","right"],ya=["right","left"],Pb=["top","bottom"],Tb=["bottom","top"];function Ab(e,t,n){switch(e){case"top":case"bottom":return n?t?ya:va:t?va:ya;case"left":case"right":return t?Pb:Tb;default:return[]}}function Mb(e,t,n,r){const o=zt(e);let s=Ab(ft(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ns)))),s}function Ur(e){const t=ft(e);return Ib[t]+e.slice(t.length)}function _b(e){return{top:0,right:0,bottom:0,left:0,...e}}function ii(e){return typeof e!="number"?_b(e):{top:e,right:e,bottom:e,left:e}}function Kr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Cr(e,t,n){return Math.floor(e/t)!==n}function qn(e,t){return t<0||t>=e.current.length}function Qo(e,t){return Qe(e,{disabledIndices:t})}function xa(e,t){return Qe(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Qe(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let s=t;do s+=n?-o:o;while(s>=0&&s<=e.current.length-1&&Yn(e,s,r));return s}function Db(e,{event:t,orientation:n,loopFocus:r,rtl:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u;const h=[],p={};let b=!1;{let y=null,v=-1;e.current.forEach((C,w)=>{if(C==null)return;const R=C.closest('[role="row"]');R&&(b=!0),(R!==y||v===-1)&&(y=R,v+=1,h[v]=[]),h[v].push(w),p[w]=v})}const g=b&&h.length>0&&h.some(y=>y.length!==s);function m(y){if(!g||u===-1)return;const v=p[u];if(v==null)return;const C=h[v].indexOf(u);let w=y==="up"?v-1:v+1;r&&(w<0?w=h.length-1:w>=h.length&&(w=0));const R=new Set;for(;w>=0&&w<h.length&&!R.has(w);){R.add(w);const k=h[w];if(k.length===0){w=y==="up"?w-1:w+1;continue}const S=Math.min(C,k.length-1);for(let E=S;E>=0;E-=1){const V=k[E];if(!Yn(e,V,i))return V}w=y==="up"?w-1:w+1,r&&(w<0?w=h.length-1:w>=h.length&&(w=0))}}if(t.key===ri){const y=m("up");if(y!==void 0)d&&Te(t),f=y;else{if(d&&Te(t),u===-1)f=l;else if(f=Qe(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:i}),r&&(u-s<a||f<0)){const v=u%s,C=l%s,w=l-(C-v);C===v?f=l:f=C>v?w:w-s}qn(e,f)&&(f=u)}}if(t.key===nr){const y=m("down");y!==void 0?(d&&Te(t),f=y):(d&&Te(t),u===-1?f=a:(f=Qe(e,{startingIndex:u,amount:s,disabledIndices:i}),r&&u+s>l&&(f=Qe(e,{startingIndex:u%s-s,amount:s,disabledIndices:i}))),qn(e,f)&&(f=u))}if(n==="both"){const y=Nn(u/s);t.key===(o?Jt:en)&&(d&&Te(t),u%s!==s-1?(f=Qe(e,{startingIndex:u,disabledIndices:i}),r&&Cr(f,s,y)&&(f=Qe(e,{startingIndex:u-u%s-1,disabledIndices:i}))):r&&(f=Qe(e,{startingIndex:u-u%s-1,disabledIndices:i})),Cr(f,s,y)&&(f=u)),t.key===(o?en:Jt)&&(d&&Te(t),u%s!==0?(f=Qe(e,{startingIndex:u,decrement:!0,disabledIndices:i}),r&&Cr(f,s,y)&&(f=Qe(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:i}))):r&&(f=Qe(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:i})),Cr(f,s,y)&&(f=u));const v=Nn(l/s)===y;qn(e,f)&&(r&&v?f=t.key===(o?en:Jt)?l:Qe(e,{startingIndex:u-u%s-1,disabledIndices:i}):f=u)}return f}function Lb(e,t,n){const r=[];let o=0;return e.forEach(({width:s,height:i},a)=>{if(s>t&&process.env.NODE_ENV!=="production")throw new Error(`[Floating UI]: Invalid grid - item width at index ${a} is greater than grid columns`);let l=!1;for(;!l;){const u=[];for(let d=0;d<s;d+=1)for(let f=0;f<i;f+=1)u.push(o+d+f*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),l=!0):o+=1}}),[...r]}function jb(e,t,n,r,o){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(o){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*r:s;case"br":return n.lastIndexOf(e);default:return-1}}function Vb(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Yn(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r?r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true":!1}var Fb=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],qr=Fb.join(","),Rl=typeof Element>"u",_n=Rl?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Yr=!Rl&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Xr=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Xr(t.parentNode));return i},$b=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Sl=function(t,n,r){if(Xr(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(qr));return n&&_n.call(t,qr)&&o.unshift(t),o=o.filter(r),o},Zr=function(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Xr(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,u=Zr(l,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:i,candidates:u})}else{var d=_n.call(i,qr);d&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var f=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),h=!Xr(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(f&&h){var p=Zr(f===!0?i.children:f.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:i,candidates:p})}else s.unshift.apply(s,i.children)}}return o},kl=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Il=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||$b(t))&&!kl(t)?0:t.tabIndex},zb=function(t,n){var r=Il(t);return r<0&&n&&!kl(t)?0:r},Bb=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Nl=function(t){return t.tagName==="INPUT"},Gb=function(t){return Nl(t)&&t.type==="hidden"},Hb=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Wb=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Ub=function(t){if(!t.name)return!0;var n=t.form||Yr(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=Wb(o,t.form);return!s||s===t},Kb=function(t){return Nl(t)&&t.type==="radio"},qb=function(t){return Kb(t)&&!Ub(t)},Yb=function(t){var n,r=t&&Yr(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var u,d,f;r=Yr(o),o=(u=r)===null||u===void 0?void 0:u.host,s=!!((d=o)!==null&&d!==void 0&&(f=d.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return s},wa=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},Xb=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var i=_n.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(_n.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var u=t.parentElement,d=Yr(t);if(u&&!u.shadowRoot&&o(u)===!0)return wa(t);t.assignedSlot?t=t.assignedSlot:!u&&d!==t.ownerDocument?t=d.host:t=u}t=l}if(Yb(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return wa(t);return!1},Zb=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return _n.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Os=function(t,n){return!(n.disabled||Gb(n)||Xb(n,t)||Hb(n)||Zb(n))},Ps=function(t,n){return!(qb(n)||Il(n)<0||!Os(t,n))},Qb=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Ol=function(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=zb(a,i),u=i?Ol(o.candidates):a;l===0?i?n.push.apply(n,u):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:u})}),r.sort(Bb).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},bo=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Zr([t],n.includeContainer,{filter:Ps.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Qb}):r=Sl(t,n.includeContainer,Ps.bind(null,n)),Ol(r)},Jb=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Zr([t],n.includeContainer,{filter:Os.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Sl(t,n.includeContainer,Os.bind(null,n)),r},Pl=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return _n.call(t,qr)===!1?!1:Ps(n,t)};function $e(e){return e?.ownerDocument||document}const rr=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Tl(e,t){const n=bo(e,rr()),r=n.length;if(r===0)return;const o=jt($e(e)),s=n.indexOf(o),i=s===-1?t===1?0:r-1:s+t;return n[i]}function Al(e){return Tl($e(e).body,1)||e}function Ml(e){return Tl($e(e).body,-1)||e}function Xn(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ee(n,r)}function ev(e){bo(e,rr()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Ca(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function ai(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,s=re(o),i=ub(r,n,!1);c.useEffect(()=>{if(!t)return;const a=new AbortController;return i(s,a.signal),()=>{a.abort()}},[t,n,s,i])}const Gn=0;class Dn{static create(){return new Dn}currentId=Gn;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Gn,n()},t)}isStarted(){return this.currentId!==Gn}clear=()=>{this.currentId!==Gn&&(clearTimeout(this.currentId),this.currentId=Gn)};disposeEffect=()=>this.clear}function hn(){const e=vt(Dn.create).current;return ll(e.disposeEffect),e}let Ea={},Ra={},Sa="";function tv(e){if(typeof document>"u")return!1;const t=$e(e);return Ye(t).innerWidth-t.documentElement.clientWidth>0}function nv(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=$e(e),r=n.documentElement,o=n.body,s=an(r)?r:o,i=s.style.overflowY,a=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",s.style.overflowY="scroll";const l=s.offsetWidth;s.style.overflowY="hidden";const u=s.offsetWidth;return s.style.overflowY=i,r.style.scrollbarGutter=a,l===u}function rv(e){const t=$e(e),n=t.documentElement,r=t.body,o=an(n)?n:r,s={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,s)}}function ov(e){const t=$e(e),n=t.documentElement,r=t.body,o=Ye(n);let s=0,i=0,a=!1;const l=Nt.create();if(bl&&(o.visualViewport?.scale??1)!==1)return()=>{};function u(){const h=o.getComputedStyle(n),p=o.getComputedStyle(r),m=(h.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,i=n.scrollLeft,Ea={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Sa=n.style.scrollBehavior,Ra={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const y=n.scrollHeight>n.clientHeight,v=n.scrollWidth>n.clientWidth,C=h.overflowY==="scroll"||p.overflowY==="scroll",w=h.overflowX==="scroll"||p.overflowX==="scroll",R=Math.max(0,o.innerWidth-r.clientWidth),k=Math.max(0,o.innerHeight-r.clientHeight),S=parseFloat(p.marginTop)+parseFloat(p.marginBottom),E=parseFloat(p.marginLeft)+parseFloat(p.marginRight),V=an(n)?n:r;if(a=nv(e),a){n.style.scrollbarGutter=m,V.style.overflowY="hidden",V.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:m,overflowY:"hidden",overflowX:"hidden"}),(y||C)&&(n.style.overflowY="scroll"),(v||w)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:S||k?`calc(100dvh - ${S+k}px)`:"100dvh",width:E||R?`calc(100vw - ${E+R}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=s,r.scrollLeft=i,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function d(){Object.assign(n.style,Ea),Object.assign(r.style,Ra),a||(n.scrollTop=s,n.scrollLeft=i,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=Sa)}function f(){d(),l.request(u)}return u(),o.addEventListener("resize",f),()=>{l.cancel(),d(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",f)}}class sv{lockCount=0;restore=null;timeoutLock=Dn.create();timeoutUnlock=Dn.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=$e(t).documentElement,o=Ye(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=Me;return}const s=vl||!tv(t);this.restore=s?rv(t):ov(t)}}const iv=new sv;function av(e=!0,t=null){oe(()=>{if(e)return iv.acquire(t)},[e,t])}function gt(e){const t=vt(cv,e).current;return t.next=e,oe(t.effect),t}function cv(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function lv(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}const _l=c.createContext(null);process.env.NODE_ENV!=="production"&&(_l.displayName="FloatingNodeContext");const Dl=c.createContext(null);process.env.NODE_ENV!=="production"&&(Dl.displayName="FloatingTreeContext");const Ll=()=>c.useContext(_l)?.id||null,vo=e=>{const t=c.useContext(Dl);return e??t};function Qr(e){return`data-base-ui-${e}`}const jl={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},ci={...jl,position:"fixed",top:0,left:0},uv={...jl,position:"absolute"},er=c.forwardRef(function(t,n){const[r,o]=c.useState();oe(()=>{vb&&o("button")},[]);const s={tabIndex:0,role:r};return x.jsx("span",{...t,ref:n,style:ci,"aria-hidden":r?void 0:!0,...s,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(er.displayName="FocusGuard");let ka=0;function Zn(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(ka);const s=()=>e?.focus({preventScroll:n});o?s():ka=requestAnimationFrame(s)}const Pn={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Ia(e){return e==="inert"?Pn.inert:e==="aria-hidden"?Pn["aria-hidden"]:Pn.none}let Er=new WeakSet,Rr={},Jo=0;const Vl=e=>e&&(e.host||Vl(e.parentNode)),dv=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Vl(n);return e.contains(r)?r:null}).filter(n=>n!=null);function fv(e,t,n,r){const o="data-base-ui-inert",s=r?"inert":n?"aria-hidden":null,i=dv(t,e),a=new Set,l=new Set(i),u=[];Rr[o]||(Rr[o]=new WeakMap);const d=Rr[o];i.forEach(f),h(t),a.clear();function f(p){!p||a.has(p)||(a.add(p),p.parentNode&&f(p.parentNode))}function h(p){!p||l.has(p)||[].forEach.call(p.children,b=>{if(sn(b)!=="script")if(a.has(b))h(b);else{const g=s?b.getAttribute(s):null,m=g!==null&&g!=="false",y=Ia(s),v=(y.get(b)||0)+1,C=(d.get(b)||0)+1;y.set(b,v),d.set(b,C),u.push(b),v===1&&m&&Er.add(b),C===1&&b.setAttribute(o,""),!m&&s&&b.setAttribute(s,s==="inert"?"":"true")}})}return Jo+=1,()=>{u.forEach(p=>{const b=Ia(s),m=(b.get(p)||0)-1,y=(d.get(p)||0)-1;b.set(p,m),d.set(p,y),m||(!Er.has(p)&&s&&p.removeAttribute(s),Er.delete(p)),y||p.removeAttribute(o)}),Jo-=1,Jo||(Pn.inert=new WeakMap,Pn["aria-hidden"]=new WeakMap,Pn.none=new WeakMap,Er=new WeakSet,Rr={})}}function pv(e,t=!1,n=!1){const r=$e(e[0]).body;return fv(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const li=c.createContext(null);process.env.NODE_ENV!=="production"&&(li.displayName="PortalContext");const Fl=()=>c.useContext(li),mv=Qr("portal");function hv(e={}){const{ref:t,container:n,componentProps:r=et,elementProps:o}=e,s=Zs(),a=Fl()?.portalNode,[l,u]=c.useState(null),[d,f]=c.useState(null),h=re(m=>{m!==null&&f(m)}),p=c.useRef(null);oe(()=>{if(n===null){p.current&&(p.current=null,f(null),u(null));return}if(s==null)return;const m=(n&&(ei(n)?n:n.current))??a??document.body;if(m==null){p.current&&(p.current=null,f(null),u(null));return}p.current!==m&&(p.current=m,f(null),u(m))},[n,a,s]);const b=tt("div",r,{ref:[t,h],props:[{id:s,[mv]:""},o]});return{portalNode:d,portalSubtree:l&&b?rn.createPortal(b,l):null}}const $l=c.forwardRef(function(t,n){const{children:r,container:o,className:s,render:i,renderGuards:a,...l}=t,{portalNode:u,portalSubtree:d}=hv({container:o,ref:n,componentProps:t,elementProps:l}),f=c.useRef(null),h=c.useRef(null),p=c.useRef(null),b=c.useRef(null),[g,m]=c.useState(null),y=g?.modal,v=g?.open,C=typeof a=="boolean"?a:!!g&&!g.modal&&g.open&&!!u;c.useEffect(()=>{if(!u||y)return;function R(k){u&&k.relatedTarget&&Xn(k)&&(k.type==="focusin"?Ca:ev)(u)}return u.addEventListener("focusin",R,!0),u.addEventListener("focusout",R,!0),()=>{u.removeEventListener("focusin",R,!0),u.removeEventListener("focusout",R,!0)}},[u,y]),c.useEffect(()=>{!u||v||Ca(u)},[v,u]);const w=c.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:h,beforeInsideRef:p,afterInsideRef:b,portalNode:u,setFocusManagerState:m}),[u]);return x.jsxs(c.Fragment,{children:[d,x.jsxs(li.Provider,{value:w,children:[C&&u&&x.jsx(er,{"data-type":"outside",ref:f,onFocus:R=>{if(Xn(R,u))p.current?.focus();else{const k=g?g.domReference:null;Ml(k)?.focus()}}}),C&&u&&x.jsx("span",{"aria-owns":u.id,style:Xg}),u&&rn.createPortal(r,u),C&&u&&x.jsx(er,{"data-type":"outside",ref:h,onFocus:R=>{if(Xn(R,u))b.current?.focus();else{const k=g?g.domReference:null;Al(k)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,de(co,R.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&($l.displayName="FloatingPortal");function gv(e,t){const n=Ye(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const Na=20;let Xt=[];function ui(){Xt=Xt.filter(e=>e.deref()?.isConnected)}function bv(e){ui(),e&&sn(e)!=="body"&&(Xt.push(new WeakRef(e)),Xt.length>Na&&(Xt=Xt.slice(-Na)))}function es(){return ui(),Xt[Xt.length-1]?.deref()}function vv(e){if(!e)return null;const t=rr();return Pl(e,t)?e:bo(e,t)[0]||e}function yv(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():pt(e).display!=="none"}function Oa(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=rr(),o=Jb(e,n).filter(i=>{const a=i.getAttribute("data-tabindex")||"";return Pl(i,n)||i.hasAttribute("data-tabindex")&&!a.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||o.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function xv(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:s=!0,restoreFocus:i=!1,modal:a=!0,closeOnFocusOut:l=!0,openInteractionType:u="",nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:h,externalTree:p}=e,b="rootStore"in t?t.rootStore:t,g=b.useState("open"),m=b.useState("domReferenceElement"),y=b.useState("floatingElement"),{events:v,dataRef:C}=b.context,w=re(()=>C.current.floatingContext?.nodeId),R=o===!1,k=ks(m)&&R,S=c.useRef(["content"]),E=gt(o),V=gt(s),W=gt(u),H=vo(p),P=Fl(),q=c.useRef(null),Y=c.useRef(null),$=c.useRef(!1),N=c.useRef(!1),B=c.useRef(!1),j=c.useRef(-1),te=c.useRef(""),T=c.useRef(""),we=c.useRef(null),fe=c.useRef(null),ye=Qn(we,h,P?.beforeInsideRef),ae=Qn(fe,P?.afterInsideRef),ce=hn(),ge=hn(),Ce=Js(),Se=P!=null,X=Is(y),pe=re((A=X)=>A?bo(A,rr()):[]),xe=re(A=>{const F=pe(A);return S.current.map(()=>F).filter(Boolean).flat()});c.useEffect(()=>{if(r||!a)return;function A(ue){ue.key==="Tab"&&Ee(X,jt($e(X)))&&pe().length===0&&!k&&Te(ue)}const F=$e(X);return F.addEventListener("keydown",A),()=>{F.removeEventListener("keydown",A)}},[r,m,X,a,S,k,pe,xe]),c.useEffect(()=>{if(r||!g)return;const A=$e(X);function F(){B.current=!1}function ue(G){const U=ct(G),M=Ee(y,U)||Ee(m,U)||Ee(P?.portalNode,U);B.current=!M,T.current=G.pointerType||"keyboard",U?.closest(`[${qg}]`)&&(N.current=!0)}function I(){T.current="keyboard"}return A.addEventListener("pointerdown",ue,!0),A.addEventListener("pointerup",F,!0),A.addEventListener("pointercancel",F,!0),A.addEventListener("keydown",I,!0),()=>{A.removeEventListener("pointerdown",ue,!0),A.removeEventListener("pointerup",F,!0),A.removeEventListener("pointercancel",F,!0),A.removeEventListener("keydown",I,!0)}},[r,y,m,X,g,P]),c.useEffect(()=>{if(r||!l)return;const A=$e(X);function F(){N.current=!0,ge.start(0,()=>{N.current=!1})}function ue(K){const D=ct(K),ie=pe().indexOf(D);ie!==-1&&(j.current=ie)}function I(K){const D=K.relatedTarget,Q=K.currentTarget,ie=ct(K);queueMicrotask(()=>{const be=w(),Ge=b.context.triggerElements,nt=D?.hasAttribute(Qr("focus-guard"))&&[we.current,fe.current,P?.beforeInsideRef.current,P?.afterInsideRef.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,Lt(f),Lt(d)].includes(D),_e=!(Ee(m,D)||Ee(y,D)||Ee(D,y)||Ee(P?.portalNode,D)||D!=null&&Ge.hasElement(D)||Ge.hasMatchingElement(ke=>Ee(ke,D))||nt||H&&(On(H.nodesRef.current,be).find(ke=>Ee(ke.context?.elements.floating,D)||Ee(ke.context?.elements.domReference,D))||ga(H.nodesRef.current,be).find(ke=>[ke.context?.elements.floating,Is(ke.context?.elements.floating)].includes(D)||ke.context?.elements.domReference===D)));if(Q===m&&X&&Oa(X,S),i&&Q!==m&&!yv(ie)&&jt(A)===A.body){if(Be(X)&&(X.focus(),i==="popup")){Ce.request(()=>{X.focus()});return}const ke=j.current,Ve=pe(),rt=Ve[ke]||Ve[Ve.length-1]||X;Be(rt)&&rt.focus()}if(C.current.insideReactTree){C.current.insideReactTree=!1;return}(k||!a)&&D&&_e&&!N.current&&(k||D!==es())&&($.current=!0,b.setOpen(!1,de(co,K)))})}function G(){B.current||(C.current.insideReactTree=!0,ce.start(0,()=>{C.current.insideReactTree=!1}))}const U=Be(m)?m:null,M=[];if(!(!y&&!U))return U&&(U.addEventListener("focusout",I),U.addEventListener("pointerdown",F),M.push(()=>{U.removeEventListener("focusout",I),U.removeEventListener("pointerdown",F)})),y&&(y.addEventListener("focusin",ue),y.addEventListener("focusout",I),P&&(y.addEventListener("focusout",G,!0),M.push(()=>{y.removeEventListener("focusout",G,!0)})),M.push(()=>{y.removeEventListener("focusin",ue),y.removeEventListener("focusout",I)})),()=>{M.forEach(K=>{K()})}},[r,m,y,X,a,H,P,b,l,i,pe,k,w,S,C,ce,ge,Ce,d,f]),c.useEffect(()=>{if(r||!y||!g)return;const A=Array.from(P?.portalNode?.querySelectorAll(`[${Qr("portal")}]`)||[]),ue=(H?ga(H.nodesRef.current,w()):[]).find(G=>ks(G.context?.elements.domReference||null))?.context?.elements.domReference,I=[y,ue,...A,q.current,Y.current,we.current,fe.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,Lt(f),Lt(d),k?m:null].filter(G=>G!=null);return pv(I,a||k)},[g,r,m,y,a,S,P,k,H,w,d,f]),oe(()=>{if(!g||r||!Be(X))return;const A=$e(X),F=jt(A);queueMicrotask(()=>{const ue=xe(X),I=E.current,G=typeof I=="function"?I(W.current||""):I;if(G===void 0||G===!1)return;let U;G===!0||G===null?U=ue[0]||X:U=Lt(G),U=U||ue[0]||X,!Ee(X,F)&&Zn(U,{preventScroll:U===X})})},[r,g,X,R,xe,E,W]),oe(()=>{if(r||!X)return;const A=$e(X),F=jt(A);bv(F);function ue(U){if(U.open||(te.current=gv(U.nativeEvent,T.current)),U.reason===tb&&U.nativeEvent.type==="mouseleave"&&($.current=!0),U.reason===Xs)if(U.nested)$.current=!1;else if(wl(U.nativeEvent)||Cl(U.nativeEvent))$.current=!1;else{let M=!1;document.createElement("div").focus({get preventScroll(){return M=!0,!1}}),M?$.current=!1:$.current=!0}}v.on("openchange",ue);const I=A.createElement("span");I.setAttribute("tabindex","-1"),I.setAttribute("aria-hidden","true"),Object.assign(I.style,ci),Se&&m&&m.insertAdjacentElement("afterend",I);function G(){const U=V.current;let M=typeof U=="function"?U(te.current):U;if(M===void 0||M===!1)return null;if(M===null&&(M=!0),typeof M=="boolean"){const D=m||es();return D&&D.isConnected?D:I}const K=m||es()||I;return Lt(M)||K}return()=>{v.off("openchange",ue);const U=jt(A),M=Ee(y,U)||H&&On(H.nodesRef.current,w(),!1).some(D=>Ee(D.context?.elements.floating,U)),K=G();queueMicrotask(()=>{const D=vv(K),Q=typeof V.current!="boolean";V.current&&!$.current&&Be(D)&&(!(!Q&&D!==U&&U!==A.body)||M)&&D.focus({preventScroll:!0}),I.remove(),$.current=!1})}},[r,y,X,V,C,v,H,Se,m,w]),oe(()=>{if(!bl||g||!y)return;const A=jt($e(y));!Be(A)||!oi(A)||Ee(y,A)&&A.blur()},[g,y]),oe(()=>{if(!(r||!P))return P.setFocusManagerState({modal:a,closeOnFocusOut:l,open:g,onOpenChange:b.setOpen,domReference:m}),()=>{P.setFocusManagerState(null)}},[r,P,a,g,b,l,m]),oe(()=>{if(!(r||!X))return Oa(X,S),()=>{queueMicrotask(ui)}},[r,X,S]);const O=!r&&(a?!k:!0)&&(Se||a);return x.jsxs(c.Fragment,{children:[O&&x.jsx(er,{"data-type":"inside",ref:ye,onFocus:A=>{if(a){const F=xe();Zn(F[F.length-1])}else P?.portalNode&&($.current=!1,Xn(A,P.portalNode)?Al(m)?.focus():Lt(f??P.beforeOutsideRef)?.focus())}}),n,O&&x.jsx(er,{"data-type":"inside",ref:ae,onFocus:A=>{a?Zn(xe()[0]):P?.portalNode&&(l&&($.current=!0),Xn(A,P.portalNode)?Ml(m)?.focus():Lt(d??P.afterOutsideRef)?.focus())}})]})}function zl(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:s="click",toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:l=!0,touchOpenDelay:u=0,reason:d=xs}=t,f=c.useRef(void 0),h=Js(),p=hn(),b=c.useMemo(()=>({onPointerDown(g){f.current=g.pointerType},onMouseDown(g){const m=f.current,y=g.nativeEvent,v=n.select("open");if(g.button!==0||s==="click"||ba(m)&&a)return;const C=r.current.openEvent,w=C?.type,R=n.select("domReferenceElement")!==g.currentTarget,k=v&&R||!(v&&i&&(!(C&&l)||w==="click"||w==="mousedown"));if(oi(y.target)){const E=de(d,y,y.target);k&&m==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,E)}):n.setOpen(k,E);return}const S=g.currentTarget;h.request(()=>{const E=de(d,y,S);k&&m==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,E)}):n.setOpen(k,E)})},onClick(g){if(s==="mousedown-only")return;const m=f.current;if(s==="mousedown"&&m){f.current=void 0;return}if(ba(m)&&a)return;const y=n.select("open"),v=r.current.openEvent,C=n.select("domReferenceElement")!==g.currentTarget,w=y&&C||!(y&&i&&(!(v&&l)||El(v))),R=de(d,g.nativeEvent,g.currentTarget);w&&m==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,R)}):n.setOpen(w,R)},onKeyDown(){f.current=void 0}}),[r,s,a,n,l,i,h,p,u,d]);return c.useMemo(()=>o?{reference:b}:et,[o,b])}function Pa(e,t,n){let{reference:r,floating:o}=e;const s=bt(t),i=go(t),a=ho(i),l=ft(t),u=s==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(zt(t)){case"start":p[i]-=h*(n&&u?-1:1);break;case"end":p[i]+=h*(n&&u?-1:1);break}return p}async function wv(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Tt(t,e),b=ii(p),m=a[h?f==="floating"?"reference":"floating":f],y=Kr(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(m)))==null||n?m:m.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),v=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),w=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},R=Kr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:C,strategy:l}):v);return{top:(y.top-R.top+b.top)/w.y,bottom:(R.bottom-y.bottom+b.bottom)/w.y,left:(y.left-R.left+b.left)/w.x,right:(R.right-y.right+b.right)/w.x}}const Cv=50,Ev=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:wv},l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=Pa(u,r,l),h=r,p=0;const b={};for(let g=0;g<s.length;g++){const m=s[g];if(!m)continue;const{name:y,fn:v}=m,{x:C,y:w,data:R,reset:k}=await v({x:d,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:b,rects:u,platform:a,elements:{reference:e,floating:t}});d=C??d,f=w??f,b[y]={...b[y],...R},k&&p<Cv&&(p++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(u=k.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:d,y:f}=Pa(u,h,l)),g=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:b}},Rv=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=Tt(e,t)||{};if(u==null)return{};const f=ii(d),h={x:n,y:r},p=go(o),b=ho(p),g=await i.getDimensions(u),m=p==="y",y=m?"top":"left",v=m?"bottom":"right",C=m?"clientHeight":"clientWidth",w=s.reference[b]+s.reference[p]-h[p]-s.floating[b],R=h[p]-s.reference[p],k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let S=k?k[C]:0;(!S||!await(i.isElement==null?void 0:i.isElement(k)))&&(S=a.floating[C]||s.floating[b]);const E=w/2-R/2,V=S/2-g[b]/2-1,W=nn(f[y],V),H=nn(f[v],V),P=W,q=S-g[b]-H,Y=S/2-g[b]/2+E,$=Wr(P,Y,q),N=!l.arrow&&zt(o)!=null&&Y!==$&&s.reference[b]/2-(Y<P?W:H)-g[b]/2<0,B=N?Y<P?Y-P:Y-q:0;return{[p]:h[p]+B,data:{[p]:$,centerOffset:Y-$-B,...N&&{alignmentOffset:B}},reset:N}}}),Sv=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...m}=Tt(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=ft(o),v=bt(a),C=ft(a)===a,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),R=h||(C||!g?[Ur(a)]:Ob(a)),k=b!=="none";!h&&k&&R.push(...Mb(a,g,b,w));const S=[a,...R],E=await l.detectOverflow(t,m),V=[];let W=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&V.push(E[y]),f){const Y=Nb(o,i,w);V.push(E[Y[0]],E[Y[1]])}if(W=[...W,{placement:o,overflows:V}],!V.every(Y=>Y<=0)){var H,P;const Y=(((H=s.flip)==null?void 0:H.index)||0)+1,$=S[Y];if($&&(!(f==="alignment"?v!==bt($):!1)||W.every(j=>bt(j.placement)===v?j.overflows[0]>0:!0)))return{data:{index:Y,overflows:W},reset:{placement:$}};let N=(P=W.filter(B=>B.overflows[0]<=0).sort((B,j)=>B.overflows[1]-j.overflows[1])[0])==null?void 0:P.placement;if(!N)switch(p){case"bestFit":{var q;const B=(q=W.filter(j=>{if(k){const te=bt(j.placement);return te===v||te==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(te=>te>0).reduce((te,T)=>te+T,0)]).sort((j,te)=>j[1]-te[1])[0])==null?void 0:q[0];B&&(N=B);break}case"initialPlacement":N=a;break}if(o!==N)return{reset:{placement:N}}}return{}}}};function Ta(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Aa(e){return kb.some(t=>e[t]>=0)}const kv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=Tt(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=Ta(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Aa(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=Ta(i,n.floating);return{data:{escapedOffsets:a,escaped:Aa(a)}}}default:return{}}}}},Bl=new Set(["left","top"]);async function Iv(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=ft(n),a=zt(n),l=bt(n)==="y",u=Bl.has(i)?-1:1,d=s&&l?-1:1,f=Tt(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:b}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof b=="number"&&(p=a==="end"?b*-1:b),l?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const Nv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await Iv(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},Ov=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x:v,y:C}=y;return{x:v,y:C}}},...u}=Tt(e,t),d={x:n,y:r},f=await s.detectOverflow(t,u),h=bt(ft(o)),p=si(h);let b=d[p],g=d[h];if(i){const y=p==="y"?"top":"left",v=p==="y"?"bottom":"right",C=b+f[y],w=b-f[v];b=Wr(C,b,w)}if(a){const y=h==="y"?"top":"left",v=h==="y"?"bottom":"right",C=g+f[y],w=g-f[v];g=Wr(C,g,w)}const m=l.fn({...t,[p]:b,[h]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:i,[h]:a}}}}}},Pv=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Tt(e,t),d={x:n,y:r},f=bt(o),h=si(f);let p=d[h],b=d[f];const g=Tt(a,t),m=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const C=h==="y"?"height":"width",w=s.reference[h]-s.floating[C]+m.mainAxis,R=s.reference[h]+s.reference[C]-m.mainAxis;p<w?p=w:p>R&&(p=R)}if(u){var y,v;const C=h==="y"?"width":"height",w=Bl.has(ft(o)),R=s.reference[f]-s.floating[C]+(w&&((y=i.offset)==null?void 0:y[f])||0)+(w?0:m.crossAxis),k=s.reference[f]+s.reference[C]+(w?0:((v=i.offset)==null?void 0:v[f])||0)-(w?m.crossAxis:0);b<R?b=R:b>k&&(b=k)}return{[h]:p,[f]:b}}}},Tv=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...u}=Tt(e,t),d=await i.detectOverflow(t,u),f=ft(o),h=zt(o),p=bt(o)==="y",{width:b,height:g}=s.floating;let m,y;f==="top"||f==="bottom"?(m=f,y=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,m=h==="end"?"top":"bottom");const v=g-d.top-d.bottom,C=b-d.left-d.right,w=nn(g-d[m],v),R=nn(b-d[y],C),k=!t.middlewareData.shift;let S=w,E=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=v),k&&!h){const W=dt(d.left,0),H=dt(d.right,0),P=dt(d.top,0),q=dt(d.bottom,0);p?E=b-2*(W!==0||H!==0?W+H:dt(d.left,d.right)):S=g-2*(P!==0||q!==0?P+q:dt(d.top,d.bottom))}await l({...t,availableWidth:E,availableHeight:S});const V=await i.getDimensions(a.floating);return b!==V.width||g!==V.height?{reset:{rects:!0}}:{}}}};function Gl(e){const t=pt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Be(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Hr(n)!==s||Hr(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function di(e){return Ae(e)?e:e.contextElement}function Tn(e){const t=di(e);if(!Be(t))return Pt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Gl(t);let i=(s?Hr(n.width):n.width)/r,a=(s?Hr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Av=Pt(0);function Hl(e){const t=Ye(e);return!fo()||!t.visualViewport?Av:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Mv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ye(e)?!1:t}function gn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=di(e);let i=Pt(1);t&&(r?Ae(r)&&(i=Tn(r)):i=Tn(e));const a=Mv(s,n,r)?Hl(s):Pt(0);let l=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const h=Ye(s),p=r&&Ae(r)?Ye(r):r;let b=h,g=Es(b);for(;g&&r&&p!==b;){const m=Tn(g),y=g.getBoundingClientRect(),v=pt(g),C=y.left+(g.clientLeft+parseFloat(v.paddingLeft))*m.x,w=y.top+(g.clientTop+parseFloat(v.paddingTop))*m.y;l*=m.x,u*=m.y,d*=m.x,f*=m.y,l+=C,u+=w,b=Ye(g),g=Es(b)}}return Kr({width:d,height:f,x:l,y:u})}function yo(e,t){const n=po(e).scrollLeft;return t?t.left+n:gn(Mt(e)).left+n}function Wl(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-yo(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function _v(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Mt(r),a=t?uo(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=Pt(1);const d=Pt(0),f=Be(r);if((f||!f&&!s)&&((sn(r)!=="body"||an(i))&&(l=po(r)),f)){const p=gn(r);u=Tn(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const h=i&&!f&&!s?Wl(i,l):Pt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-l.scrollTop*u.y+d.y+h.y}}function Dv(e){return Array.from(e.getClientRects())}function Lv(e){const t=Mt(e),n=po(e),r=e.ownerDocument.body,o=dt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=dt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+yo(e);const a=-n.scrollTop;return pt(r).direction==="rtl"&&(i+=dt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Ma=25;function jv(e,t){const n=Ye(e),r=Mt(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const d=fo();(!d||d&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const u=yo(r);if(u<=0){const d=r.ownerDocument,f=d.body,h=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,b=Math.abs(r.clientWidth-f.clientWidth-p);b<=Ma&&(s-=b)}else u<=Ma&&(s+=u);return{width:s,height:i,x:a,y:l}}function Vv(e,t){const n=gn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Be(e)?Tn(e):Pt(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,u=r*s.y;return{width:i,height:a,x:l,y:u}}function _a(e,t,n){let r;if(t==="viewport")r=jv(e,n);else if(t==="document")r=Lv(Mt(e));else if(Ae(t))r=Vv(t,n);else{const o=Hl(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Kr(r)}function Ul(e,t){const n=Ft(e);return n===t||!Ae(n)||Vt(n)?!1:pt(n).position==="fixed"||Ul(n,t)}function Fv(e,t){const n=t.get(e);if(n)return n;let r=Qt(e,[],!1).filter(a=>Ae(a)&&sn(a)!=="body"),o=null;const s=pt(e).position==="fixed";let i=s?Ft(e):e;for(;Ae(i)&&!Vt(i);){const a=pt(i),l=ti(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||an(i)&&!l&&Ul(e,i))?r=r.filter(d=>d!==i):o=a,i=Ft(i)}return t.set(e,r),r}function $v(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?uo(t)?[]:Fv(t,this._c):[].concat(n),r],a=_a(t,i[0],o);let l=a.top,u=a.right,d=a.bottom,f=a.left;for(let h=1;h<i.length;h++){const p=_a(t,i[h],o);l=dt(p.top,l),u=nn(p.right,u),d=nn(p.bottom,d),f=dt(p.left,f)}return{width:u-f,height:d-l,x:f,y:l}}function zv(e){const{width:t,height:n}=Gl(e);return{width:t,height:n}}function Bv(e,t,n){const r=Be(t),o=Mt(t),s=n==="fixed",i=gn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Pt(0);function u(){l.x=yo(o)}if(r||!r&&!s)if((sn(t)!=="body"||an(o))&&(a=po(t)),r){const p=gn(t,!0,s,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&u();s&&!r&&o&&u();const d=o&&!r&&!s?Wl(o,a):Pt(0),f=i.left+a.scrollLeft-l.x-d.x,h=i.top+a.scrollTop-l.y-d.y;return{x:f,y:h,width:i.width,height:i.height}}function ts(e){return pt(e).position==="static"}function Da(e,t){if(!Be(e)||pt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Mt(e)===n&&(n=n.ownerDocument.body),n}function Kl(e,t){const n=Ye(e);if(uo(e))return n;if(!Be(e)){let o=Ft(e);for(;o&&!Vt(o);){if(Ae(o)&&!ts(o))return o;o=Ft(o)}return n}let r=Da(e,t);for(;r&&db(r)&&ts(r);)r=Da(r,t);return r&&Vt(r)&&ts(r)&&!ti(r)?n:r||mb(e)||n}const Gv=async function(e){const t=this.getOffsetParent||Kl,n=this.getDimensions,r=await n(e.floating);return{reference:Bv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Hv(e){return pt(e).direction==="rtl"}const Wv={convertOffsetParentRelativeRectToViewportRelativeRect:_v,getDocumentElement:Mt,getClippingRect:$v,getOffsetParent:Kl,getElementRects:Gv,getClientRects:Dv,getDimensions:zv,getScale:Tn,isElement:Ae,isRTL:Hv};function ql(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Uv(e,t){let n=null,r;const o=Mt(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:h,height:p}=u;if(a||t(),!h||!p)return;const b=Nn(f),g=Nn(o.clientWidth-(d+h)),m=Nn(o.clientHeight-(f+p)),y=Nn(d),C={rootMargin:-b+"px "+-g+"px "+-m+"px "+-y+"px",threshold:dt(0,nn(1,l))||1};let w=!0;function R(k){const S=k[0].intersectionRatio;if(S!==l){if(!w)return i();S?i(!1,S):r=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!ql(u,e.getBoundingClientRect())&&i(),w=!1}try{n=new IntersectionObserver(R,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(R,C)}n.observe(e)}return i(!0),s}function Ts(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=di(e),d=o||s?[...u?Qt(u):[],...t?Qt(t):[]]:[];d.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=u&&a?Uv(u,n):null;let h=-1,p=null;i&&(p=new ResizeObserver(y=>{let[v]=y;v&&v.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=p)==null||C.observe(t)})),n()}),u&&!l&&p.observe(u),t&&p.observe(t));let b,g=l?gn(e):null;l&&m();function m(){const y=gn(e);g&&!ql(g,y)&&n(),g=y,b=requestAnimationFrame(m)}return n(),()=>{var y;d.forEach(v=>{o&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),f?.(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(b)}}const Kv=Nv,qv=Ov,Yv=Sv,Xv=Tv,Zv=kv,La=Rv,Qv=Pv,Jv=(e,t,n)=>{const r=new Map,o={platform:Wv,...n},s={...o.platform,_c:r};return Ev(e,t,{...o,platform:s})};var ey=typeof document<"u",ty=function(){},jr=ey?Le.useLayoutEffect:ty;function Jr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Jr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Jr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Yl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ja(e,t){const n=Yl(e);return Math.round(t*n)/n}function ns(e){const t=c.useRef(e);return jr(()=>{t.current=e}),t}function Xl(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,f]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=c.useState(r);Jr(h,r)||p(r);const[b,g]=c.useState(null),[m,y]=c.useState(null),v=c.useCallback(j=>{j!==k.current&&(k.current=j,g(j))},[]),C=c.useCallback(j=>{j!==S.current&&(S.current=j,y(j))},[]),w=s||b,R=i||m,k=c.useRef(null),S=c.useRef(null),E=c.useRef(d),V=l!=null,W=ns(l),H=ns(o),P=ns(u),q=c.useCallback(()=>{if(!k.current||!S.current)return;const j={placement:t,strategy:n,middleware:h};H.current&&(j.platform=H.current),Jv(k.current,S.current,j).then(te=>{const T={...te,isPositioned:P.current!==!1};Y.current&&!Jr(E.current,T)&&(E.current=T,rn.flushSync(()=>{f(T)}))})},[h,t,n,H,P]);jr(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(j=>({...j,isPositioned:!1})))},[u]);const Y=c.useRef(!1);jr(()=>(Y.current=!0,()=>{Y.current=!1}),[]),jr(()=>{if(w&&(k.current=w),R&&(S.current=R),w&&R){if(W.current)return W.current(w,R,q);q()}},[w,R,q,W,V]);const $=c.useMemo(()=>({reference:k,floating:S,setReference:v,setFloating:C}),[v,C]),N=c.useMemo(()=>({reference:w,floating:R}),[w,R]),B=c.useMemo(()=>{const j={position:n,left:0,top:0};if(!N.floating)return j;const te=ja(N.floating,d.x),T=ja(N.floating,d.y);return a?{...j,transform:"translate("+te+"px, "+T+"px)",...Yl(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:te,top:T}},[n,a,N.floating,d.x,d.y]);return c.useMemo(()=>({...d,update:q,refs:$,elements:N,floatingStyles:B}),[d,q,$,N,B])}const ny=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?La({element:r.current,padding:o}).fn(n):{}:r?La({element:r,padding:o}).fn(n):{}}}},Zl=(e,t)=>{const n=Kv(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ql=(e,t)=>{const n=qv(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jl=(e,t)=>({fn:Qv(e).fn,options:[e,t]}),eu=(e,t)=>{const n=Yv(e);return{name:n.name,fn:n.fn,options:[e,t]}},tu=(e,t)=>{const n=Xv(e);return{name:n.name,fn:n.fn,options:[e,t]}},nu=(e,t)=>{const n=Zv(e);return{name:n.name,fn:n.fn,options:[e,t]}},ry=(e,t)=>{const n=ny(e);return{name:n.name,fn:n.fn,options:[e,t]}},oy={intentional:"onClick",sloppy:"onPointerDown"};function sy(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function iy(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),s=n.useState("referenceElement"),i=n.useState("domReferenceElement"),{onOpenChange:a,dataRef:l}=n.context,{enabled:u=!0,escapeKey:d=!0,outsidePress:f=!0,outsidePressEvent:h="sloppy",referencePress:p=!1,referencePressEvent:b="sloppy",ancestorScroll:g=!1,bubbles:m,externalTree:y}=t,v=vo(y),C=re(typeof f=="function"?f:()=>!1),w=typeof f=="function"?C:f,R=c.useRef(!1),{escapeKey:k,outsidePress:S}=sy(m),E=c.useRef(null),V=hn(),W=hn(),H=re(()=>{W.clear(),l.current.insideReactTree=!1}),P=c.useRef(!1),q=c.useRef(""),Y=re(O=>{q.current=O.pointerType}),$=re(()=>{const O=q.current,A=O==="pen"||!O?"mouse":O,F=typeof h=="function"?h():h;return typeof F=="string"?F:F[A]}),N=re(O=>{if(!r||!u||!d||O.key!=="Escape"||P.current)return;const A=l.current.floatingContext?.nodeId,F=v?On(v.nodesRef.current,A):[];if(!k&&F.length>0){let G=!0;if(F.forEach(U=>{U.context?.open&&!U.context.dataRef.current.__escapeKeyBubbles&&(G=!1)}),!G)return}const ue=Sb(O)?O.nativeEvent:O,I=de(cl,ue);n.setOpen(!1,I),!k&&!I.isPropagationAllowed&&O.stopPropagation()}),B=re(O=>{const A=$();return A==="intentional"&&O.type!=="click"||A==="sloppy"&&O.type==="click"}),j=re(()=>{l.current.insideReactTree=!0,W.start(0,H)}),te=re((O,A=!1)=>{if(B(O)){H();return}if(l.current.insideReactTree){H();return}if($()==="intentional"&&A||typeof w=="function"&&!w(O))return;const F=ct(O),ue=`[${Qr("inert")}]`,I=$e(n.select("floatingElement")).querySelectorAll(ue),G=n.context.triggerElements;if(F&&(G.hasElement(F)||G.hasMatchingElement(Q=>Ee(Q,F))))return;let U=Ae(F)?F:null;for(;U&&!Vt(U);){const Q=Ft(U);if(Vt(Q)||!Ae(Q))break;U=Q}if(I.length&&Ae(F)&&!Rb(F)&&!Ee(F,n.select("floatingElement"))&&Array.from(I).every(Q=>!Ee(U,Q)))return;if(Be(F)&&!("touches"in O)){const Q=Vt(F),ie=pt(F),be=/auto|scroll/,Ge=Q||be.test(ie.overflowX),nt=Q||be.test(ie.overflowY),_e=Ge&&F.clientWidth>0&&F.scrollWidth>F.clientWidth,ke=nt&&F.clientHeight>0&&F.scrollHeight>F.clientHeight,Ve=ie.direction==="rtl",rt=ke&&(Ve?O.offsetX<=F.offsetWidth-F.clientWidth:O.offsetX>F.clientWidth),Je=_e&&O.offsetY>F.clientHeight;if(rt||Je)return}const M=l.current.floatingContext?.nodeId,K=v&&On(v.nodesRef.current,M).some(Q=>Rt(O,Q.context?.elements.floating));if(Rt(O,n.select("floatingElement"))||Rt(O,n.select("domReferenceElement"))||K)return;const D=v?On(v.nodesRef.current,M):[];if(D.length>0){let Q=!0;if(D.forEach(ie=>{ie.context?.open&&!ie.context.dataRef.current.__outsidePressBubbles&&(Q=!1)}),!Q)return}n.setOpen(!1,de(Xs,O)),H()}),T=re(O=>{$()!=="sloppy"||O.pointerType==="touch"||!n.select("open")||!u||Rt(O,n.select("floatingElement"))||Rt(O,n.select("domReferenceElement"))||te(O)}),we=re(O=>{if($()!=="sloppy"||!n.select("open")||!u||Rt(O,n.select("floatingElement"))||Rt(O,n.select("domReferenceElement")))return;const A=O.touches[0];A&&(E.current={startTime:Date.now(),startX:A.clientX,startY:A.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},V.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}),fe=re(O=>{const A=ct(O);function F(){we(O),A?.removeEventListener(O.type,F)}A?.addEventListener(O.type,F)}),ye=re(O=>{const A=R.current;if(R.current=!1,V.clear(),O.type==="mousedown"&&E.current&&!E.current.dismissOnMouseDown)return;const F=ct(O);function ue(){O.type==="pointerdown"?T(O):te(O,A),F?.removeEventListener(O.type,ue)}F?.addEventListener(O.type,ue)}),ae=re(O=>{if($()!=="sloppy"||!E.current||Rt(O,n.select("floatingElement"))||Rt(O,n.select("domReferenceElement")))return;const A=O.touches[0];if(!A)return;const F=Math.abs(A.clientX-E.current.startX),ue=Math.abs(A.clientY-E.current.startY),I=Math.sqrt(F*F+ue*ue);I>5&&(E.current.dismissOnTouchEnd=!0),I>10&&(te(O),V.clear(),E.current=null)}),ce=re(O=>{const A=ct(O);function F(){ae(O),A?.removeEventListener(O.type,F)}A?.addEventListener(O.type,F)}),ge=re(O=>{$()!=="sloppy"||!E.current||Rt(O,n.select("floatingElement"))||Rt(O,n.select("domReferenceElement"))||(E.current.dismissOnTouchEnd&&te(O),V.clear(),E.current=null)}),Ce=re(O=>{const A=ct(O);function F(){ge(O),A?.removeEventListener(O.type,F)}A?.addEventListener(O.type,F)});c.useEffect(()=>{if(!r||!u)return;l.current.__escapeKeyBubbles=k,l.current.__outsidePressBubbles=S;const O=new Dn;function A(U){n.setOpen(!1,de(ht,U))}function F(){O.clear(),P.current=!0}function ue(){O.start(fo()?5:0,()=>{P.current=!1})}const I=$e(o);I.addEventListener("pointerdown",Y,!0),d&&(I.addEventListener("keydown",N),I.addEventListener("compositionstart",F),I.addEventListener("compositionend",ue)),w&&(I.addEventListener("click",ye,!0),I.addEventListener("pointerdown",ye,!0),I.addEventListener("touchstart",fe,!0),I.addEventListener("touchmove",ce,!0),I.addEventListener("touchend",Ce,!0),I.addEventListener("mousedown",ye,!0));let G=[];return g&&(Ae(i)&&(G=Qt(i)),Ae(o)&&(G=G.concat(Qt(o))),!Ae(s)&&s&&s.contextElement&&(G=G.concat(Qt(s.contextElement)))),G=G.filter(U=>U!==I.defaultView?.visualViewport),G.forEach(U=>{U.addEventListener("scroll",A,{passive:!0})}),()=>{I.removeEventListener("pointerdown",Y,!0),d&&(I.removeEventListener("keydown",N),I.removeEventListener("compositionstart",F),I.removeEventListener("compositionend",ue)),w&&(I.removeEventListener("click",ye,!0),I.removeEventListener("pointerdown",ye,!0),I.removeEventListener("touchstart",fe,!0),I.removeEventListener("touchmove",ce,!0),I.removeEventListener("touchend",Ce,!0),I.removeEventListener("mousedown",ye,!0)),G.forEach(U=>{U.removeEventListener("scroll",A)}),O.clear(),R.current=!1}},[l,o,s,i,d,w,r,a,g,u,k,S,N,te,ye,T,fe,ce,Ce,Y,n]),c.useEffect(H,[w,H]);const Se=c.useMemo(()=>({onKeyDown:N,...p&&{[oy[b]]:O=>{n.setOpen(!1,de(xs,O.nativeEvent))},...b!=="intentional"&&{onClick(O){n.setOpen(!1,de(xs,O.nativeEvent))}}}}),[N,n,p,b]),X=re(O=>{const A=ct(O.nativeEvent);!Ee(n.select("floatingElement"),A)||O.button!==0||(R.current=!0)}),pe=re(O=>{!r||!u||O.button!==0||(R.current=!0)}),xe=c.useMemo(()=>({onKeyDown:N,onPointerDown:X,onMouseDown:X,onMouseUp:X,onClickCapture:j,onMouseDownCapture(O){j(),pe(O)},onPointerDownCapture(O){j(),pe(O)},onMouseUpCapture:j,onTouchEndCapture:j,onTouchMoveCapture:j}),[N,X,j,pe]);return c.useMemo(()=>u?{reference:Se,floating:xe,trigger:Se}:{},[u,Se,xe])}var ay=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(s){({stack:o}=s)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
19
19
|
\`createSelector([state => state.todos], todos => todos)\`
|
|
20
20
|
This could lead to inefficient memoization and unnecessary re-renders.
|
|
21
|
-
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},
|
|
21
|
+
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},cy=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:s,inputSelectorResultsCopy:i}=e,a=r(()=>({}),...o);if(!(a.apply(null,s)===a.apply(null,i))){let u;try{throw new Error}catch(d){({stack:u}=d)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
22
22
|
This means your output selector will likely run more frequently than intended.
|
|
23
23
|
Avoid returning a new reference inside your input selector, e.g.
|
|
24
|
-
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:s,secondInputs:i,stack:u})}},ry={inputStabilityCheck:"once",identityFunctionCheck:"once"},Zr=Symbol("NOT_FOUND");function oy(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function sy(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function iy(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Ma=e=>Array.isArray(e)?e:[e];function ay(e){const t=Array.isArray(e[0])?e[0]:e;return iy(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function _a(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var cy=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...ry,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:ty},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:ny}}};function ly(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Zr},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function uy(e,t){let n=[];function r(a){const l=n.findIndex(u=>t(a,u.key));if(l>-1){const u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return Zr}function o(a,l){r(a)===Zr&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function s(){return n}function i(){n=[]}return{get:r,put:o,getEntries:s,clear:i}}var dy=(e,t)=>e===t;function fy(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let s=0;s<o;s++)if(!e(n[s],r[s]))return!1;return!0}}function py(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=dy,maxSize:o=1,resultEqualityCheck:s}=n,i=fy(r);let a=0;const l=o<=1?ly(i):uy(o,i);function u(){let d=l.get(arguments);if(d===Zr){if(d=e.apply(null,arguments),a++,s){const h=l.getEntries().find(p=>s(p.value,d));h&&(d=h.value,a!==0&&a--)}l.put(arguments,d)}return d}return u.clearCache=()=>{l.clear(),u.resetResultsCount()},u.resultsCount=()=>a,u.resetResultsCount=()=>{a=0},u}var my=class{constructor(e){this.value=e}deref(){return this.value}},hy=typeof WeakRef<"u"?WeakRef:my,gy=0,Da=1;function Cr(){return{s:gy,v:void 0,o:null,p:null}}function Zl(e,t={}){let n=Cr();const{resultEqualityCheck:r}=t;let o,s=0;function i(){let a=n;const{length:l}=arguments;for(let f=0,h=l;f<h;f++){const p=arguments[f];if(typeof p=="function"||typeof p=="object"&&p!==null){let b=a.o;b===null&&(a.o=b=new WeakMap);const g=b.get(p);g===void 0?(a=Cr(),b.set(p,a)):a=g}else{let b=a.p;b===null&&(a.p=b=new Map);const g=b.get(p);g===void 0?(a=Cr(),b.set(p,a)):a=g}}const u=a;let d;if(a.s===Da)d=a.v;else if(d=e.apply(null,arguments),s++,r){const f=o?.deref?.()??o;f!=null&&r(f,d)&&(d=f,s!==0&&s--),o=typeof d=="object"&&d!==null||typeof d=="function"?new hy(d):d}return u.s=Da,u.v=d,d}return i.clearCache=()=>{n=Cr(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function Ql(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,i=0,a,l={},u=o.pop();typeof u=="object"&&(l=u,u=o.pop()),oy(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const d={...n,...l},{memoize:f,memoizeOptions:h=[],argsMemoize:p=Zl,argsMemoizeOptions:b=[],devModeChecks:g={}}=d,m=Ma(h),y=Ma(b),v=ay(o),C=f(function(){return s++,u.apply(null,arguments)},...m);let w=!0;const R=p(function(){i++;const S=_a(v,arguments);if(a=C.apply(null,S),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:E,inputStabilityCheck:V}=cy(w,g);if(E.shouldRun&&E.run(u,S,a),V.shouldRun){const W=_a(v,arguments);V.run({inputSelectorResults:S,inputSelectorResultsCopy:W},{memoize:f,memoizeOptions:m},arguments)}w&&(w=!1)}return a},...y);return Object.assign(R,{resultFunc:u,memoizedResultFunc:C,dependencies:v,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>a,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:f,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var by=Ql(Zl),vy=Object.assign((e,t=by)=>{sy(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((i,a,l)=>(i[n[l]]=a,i),{}))},{withTypes:()=>vy});Ql({memoize:py,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const ne=(e,t,n,r,o,s,...i)=>{if(i.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":St(1));let a;if(e)a=e;else throw new Error("Missing arguments");return a};var Er={exports:{}},es={};var La;function yy(){if(La)return es;La=1;var e=Le;function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(f,h){var p=h(),b=r({inst:{value:p,getSnapshot:h}}),g=b[0].inst,m=b[1];return s(function(){g.value=p,g.getSnapshot=h,l(g)&&m({inst:g})},[f,p,h]),o(function(){return l(g)&&m({inst:g}),f(function(){l(g)&&m({inst:g})})},[f]),i(p),p}function l(f){var h=f.getSnapshot;f=f.value;try{var p=h();return!n(f,p)}catch{return!0}}function u(f,h){return h()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return es.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,es}var ts={};var ja;function xy(){return ja||(ja=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,b){return p===b&&(p!==0||1/p===1/b)||p!==p&&b!==b}function t(p,b){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=b();if(!f){var m=b();s(g,m)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}m=i({inst:{value:g,getSnapshot:b}});var y=m[0].inst,v=m[1];return l(function(){y.value=g,y.getSnapshot=b,n(y)&&v({inst:y})},[p,g,b]),a(function(){return n(y)&&v({inst:y}),p(function(){n(y)&&v({inst:y})})},[p]),u(g),g}function n(p){var b=p.getSnapshot;p=p.value;try{var g=b();return!s(p,g)}catch{return!0}}function r(p,b){return b()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=Le,s=typeof Object.is=="function"?Object.is:e,i=o.useState,a=o.useEffect,l=o.useLayoutEffect,u=o.useDebugValue,d=!1,f=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;ts.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),ts}var Va;function li(){return Va||(Va=1,process.env.NODE_ENV==="production"?Er.exports=yy():Er.exports=xy()),Er.exports}var wy=li(),Rr={exports:{}},ns={};var Fa;function Cy(){if(Fa)return ns;Fa=1;var e=Le,t=li();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;return ns.useSyncExternalStoreWithSelector=function(u,d,f,h,p){var b=s(null);if(b.current===null){var g={hasValue:!1,value:null};b.current=g}else g=b.current;b=a(function(){function y(k){if(!v){if(v=!0,C=k,k=h(k),p!==void 0&&g.hasValue){var S=g.value;if(p(S,k))return w=S}return w=k}if(S=w,r(C,k))return S;var E=h(k);return p!==void 0&&p(S,E)?(C=k,S):(C=k,w=E)}var v=!1,C,w,R=f===void 0?null:f;return[function(){return y(d())},R===null?void 0:function(){return y(R())}]},[d,f,h,p]);var m=o(u,b[0],b[1]);return i(function(){g.hasValue=!0,g.value=m},[m]),l(m),m},ns}var rs={};var $a;function Ey(){return $a||($a=1,process.env.NODE_ENV!=="production"&&(function(){function e(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=Le,n=li(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,s=t.useRef,i=t.useEffect,a=t.useMemo,l=t.useDebugValue;rs.useSyncExternalStoreWithSelector=function(u,d,f,h,p){var b=s(null);if(b.current===null){var g={hasValue:!1,value:null};b.current=g}else g=b.current;b=a(function(){function y(k){if(!v){if(v=!0,C=k,k=h(k),p!==void 0&&g.hasValue){var S=g.value;if(p(S,k))return w=S}return w=k}if(S=w,r(C,k))return S;var E=h(k);return p!==void 0&&p(S,E)?(C=k,S):(C=k,w=E)}var v=!1,C,w,R=f===void 0?null:f;return[function(){return y(d())},R===null?void 0:function(){return y(R())}]},[d,f,h,p]);var m=o(u,b[0],b[1]);return i(function(){g.hasValue=!0,g.value=m},[m]),l(m),m},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),rs}var za;function Ry(){return za||(za=1,process.env.NODE_ENV==="production"?Rr.exports=Cy():Rr.exports=Ey()),Rr.exports}var Sy=Ry();const ky=Us(19),Iy=ky?Oy:Py;function _(e,t,n,r,o){return Iy(e,t,n,r,o)}function Ny(e,t,n,r,o){const s=c.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return wy.useSyncExternalStore(e.subscribe,s,s)}function Oy(e,t,n,r,o){return Ny(e,t,n,r,o)}function Py(e,t,n,r,o){return Sy.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,n,r,o))}class Jl{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,o){return _(this,t,n,r,o)}}class Ty extends Jl{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){c.useDebugValue(t),oe(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;oe(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this;if(process.env.NODE_ENV!=="production"){c.useDebugValue(t,i=>Object.keys(i));const o=c.useRef(Object.keys(t)).current,s=Object.keys(t);(o.length!==s.length||o.some((i,a)=>i!==s[a]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);oe(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){c.useDebugValue(t);const r=n!==void 0;if(oe(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r]),process.env.NODE_ENV!=="production"){const o=this.controlledValues??=new Map;o.has(t)||o.set(t,r);const s=o.get(t);s!==void 0&&s!==r&&console.error(`A component is changing the ${r?"":"un"}controlled state of ${t.toString()} to be ${r?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(t,n,r,o){const s=this.selectors[t];return s(this.state,n,r,o)}useState(t,n,r,o){return c.useDebugValue(t),_(this,this.selectors[t],n,r,o)}useContextCallback(t,n){c.useDebugValue(t);const r=re(n??Me);this.context[t]=r}useStateSetter(t){const n=c.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(s=>{const i=r(s);if(!Object.is(o,i)){const a=o;o=i,n(i,a,this)}})}}const Ay={open:ne(e=>e.open),domReferenceElement:ne(e=>e.domReferenceElement),referenceElement:ne(e=>e.positionReference??e.referenceElement),floatingElement:ne(e=>e.floatingElement),floatingId:ne(e=>e.floatingId)};class My extends Ty{constructor(t){const{nested:n,noEmit:r,onOpenChange:o,triggerElements:s,...i}=t;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:rv(),nested:n,noEmit:r,triggerElements:s},Ay)}setOpen=(t,n)=>{if((!t||!this.state.open||bl(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}}class _y{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);if(r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n),process.env.NODE_ENV!=="production"&&this.elementsSet.size!==this.idMap.size))throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.")}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function eu(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=qs(),s=Pl()!=null;if(process.env.NODE_ENV!=="production"){const a=r.reference;a&&!Ae(a)&&console.error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `context.setPositionReference()`","instead.")}const i=vt(()=>new My({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new _y,floatingId:o,nested:s,noEmit:!1})).current;return oe(()=>{const a={open:t,floatingId:o};r.reference!==void 0&&(a.referenceElement=r.reference,a.domReferenceElement=Ae(r.reference)?r.reference:null),r.floating!==void 0&&(a.floatingElement=r.floating),i.update(a)},[t,o,r.reference,r.floating,i]),i.context.onOpenChange=n,i.context.nested=s,i.context.noEmit=!1,i}function Dy(e={}){const{nodeId:t,externalTree:n}=e,r=eu(e),o=e.rootContext||r,s={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[i,a]=c.useState(null),l=c.useRef(null),u=ho(n);oe(()=>{s.domReference&&(l.current=s.domReference)},[s.domReference]);const d=Hl({...e,elements:{...s,...i&&{reference:i}}}),f=c.useCallback(S=>{const E=Ae(S)?{getBoundingClientRect:()=>S.getBoundingClientRect(),getClientRects:()=>S.getClientRects(),contextElement:S}:S;a(E),d.refs.setReference(E)},[d.refs]),[h,p]=c.useState(null),[b,g]=c.useState(null);o.useSyncedValue("referenceElement",h),o.useSyncedValue("domReferenceElement",Ae(h)?h:null),o.useSyncedValue("floatingElement",b);const m=c.useCallback(S=>{(Ae(S)||S===null)&&(l.current=S,p(S)),(Ae(d.refs.reference.current)||d.refs.reference.current===null||S!==null&&!Ae(S))&&d.refs.setReference(S)},[d.refs,p]),y=c.useCallback(S=>{g(S),d.refs.setFloating(S)},[d.refs]),v=c.useMemo(()=>({...d.refs,setReference:m,setFloating:y,setPositionReference:f,domReference:l}),[d.refs,m,y,f]),C=c.useMemo(()=>({...d.elements,domReference:s.domReference}),[d.elements,s.domReference]),w=o.useState("open"),R=o.useState("floatingId"),k=c.useMemo(()=>({...d,dataRef:o.context.dataRef,open:w,onOpenChange:o.setOpen,events:o.context.events,floatingId:R,refs:v,elements:C,nodeId:t,rootStore:o}),[d,v,C,t,o,w,R]);return oe(()=>{o.context.dataRef.current.floatingContext=k;const S=u?.nodesRef.current.find(E=>E.id===t);S&&(S.context=k)}),c.useMemo(()=>({...d,context:k,refs:v,elements:C,rootStore:o}),[d,v,C,k,o])}function Ly(e=[]){const t=e.map(u=>u?.reference),n=e.map(u=>u?.floating),r=e.map(u=>u?.item),o=e.map(u=>u?.trigger),s=c.useCallback(u=>Sr(u,e,"reference"),t),i=c.useCallback(u=>Sr(u,e,"floating"),n),a=c.useCallback(u=>Sr(u,e,"item"),r),l=c.useCallback(u=>Sr(u,e,"trigger"),o);return c.useMemo(()=>({getReferenceProps:s,getFloatingProps:i,getItemProps:a,getTriggerProps:l}),[s,i,a,l])}function Sr(e,t,n){const r=new Map,o=n==="item",s={};n==="floating"&&(s.tabIndex=-1,s[Cs]="");for(const i in e)o&&e&&(i===pl||i===ml)||(s[i]=e[i]);for(let i=0;i<t.length;i+=1){let a;const l=t[i]?.[n];typeof l=="function"?a=e?l(e):null:a=l,a&&Ba(s,a,o,r)}return Ba(s,e,o,r),s}function Ba(e,t,n,r){for(const o in t){const s=t[o];n&&(o===pl||o===ml)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof s=="function"&&(r.get(o)?.push(s),e[o]=(...i)=>r.get(o)?.map(a=>a(...i)).find(a=>a!==void 0))):e[o]=s)}}const jy="Escape";function bo(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function kr(e,t){return bo(t,e===ei||e===tr,e===Jt||e===en)}function os(e,t,n){return bo(t,e===tr,n?e===Jt:e===en)||e==="Enter"||e===" "||e===""}function Vy(e,t,n){return bo(t,n?e===Jt:e===en,e===tr)}function Fy(e,t,n,r){const o=n?e===en:e===Jt,s=e===ei;return t==="both"||t==="horizontal"&&r&&r>1?e===jy:bo(t,o,s)}function $y(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),s=n.useState("domReferenceElement"),i=n.context.dataRef,{listRef:a,activeIndex:l,onNavigate:u=()=>{},enabled:d=!0,selectedIndex:f=null,allowEscape:h=!1,loopFocus:p=!1,nested:b=!1,rtl:g=!1,virtual:m=!1,focusItemOnOpen:y="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:C=!0,disabledIndices:w=void 0,orientation:R="vertical",parentOrientation:k,cols:S=1,id:E,resetOnPointerLeave:V=!0,externalTree:W}=t;process.env.NODE_ENV!=="production"&&(h&&(p||console.warn("`useListNavigation` looping must be enabled to allow escaping."),m||console.warn("`useListNavigation` must be virtual to allow escaping.")),R==="vertical"&&S>1&&console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const H=Rs(o),P=gt(H),q=Pl(),Y=ho(W);oe(()=>{i.current.orientation=R},[i,R]);const $=Es(s),N=c.useRef(y),B=c.useRef(f??-1),j=c.useRef(null),te=c.useRef(!0),T=re(M=>{u(B.current===-1?null:B.current,M)}),we=c.useRef(T),fe=c.useRef(!!o),ye=c.useRef(r),ae=c.useRef(!1),ce=c.useRef(!1),ge=gt(w),Ce=gt(r),Se=gt(f),X=gt(V),pe=re(()=>{function M(ie){m?Y?.events.emit("virtualfocus",ie):Xn(ie,{sync:ae.current,preventScroll:!0})}const K=a.current[B.current],D=ce.current;K&&M(K),(ae.current?ie=>ie():requestAnimationFrame)(()=>{const ie=a.current[B.current]||K;if(!ie)return;K||M(ie),O&&(D||!te.current)&&ie.scrollIntoView?.({block:"nearest",inline:"nearest"})})});oe(()=>{d&&(r&&o?(B.current=f??-1,N.current&&f!=null&&(ce.current=!0,T())):fe.current&&(B.current=-1,we.current()))},[d,r,o,f,T]),oe(()=>{if(d){if(!r){ae.current=!1;return}if(o)if(l==null){if(ae.current=!1,Se.current!=null)return;if(fe.current&&(B.current=-1,pe()),(!ye.current||!fe.current)&&N.current&&(j.current!=null||N.current===!0&&j.current==null)){let M=0;const K=()=>{a.current[0]==null?(M<2&&(M?requestAnimationFrame:queueMicrotask)(K),M+=1):(B.current=j.current==null||os(j.current,R,g)||b?Yo(a):ha(a),j.current=null,T())};K()}}else Kn(a,l)||(B.current=l,pe(),ce.current=!1)}},[d,r,o,l,Se,b,a,R,g,T,pe,ge]),oe(()=>{if(!d||o||!Y||m||!fe.current)return;const M=Y.nodesRef.current,K=M.find(ie=>ie.id===q)?.context?.elements.floating,D=jt($e(o)),Q=M.some(ie=>ie.context&&Ee(ie.context.elements.floating,D));K&&!Q&&te.current&&K.focus({preventScroll:!0})},[d,o,Y,q,m]),oe(()=>{we.current=T,ye.current=r,fe.current=!!o}),oe(()=>{r||(j.current=null,N.current=y)},[r,y]);const xe=l!=null,O=c.useMemo(()=>{function M(D){if(!Ce.current)return;const Q=a.current.indexOf(D.currentTarget);Q!==-1&&B.current!==Q&&(B.current=Q,T(D))}return{onFocus(D){ae.current=!0,M(D)},onClick:({currentTarget:D})=>D.focus({preventScroll:!0}),onMouseMove(D){ae.current=!0,ce.current=!1,v&&M(D)},onPointerLeave(D){if(!Ce.current||!te.current||D.pointerType==="touch")return;ae.current=!0;const Q=D.relatedTarget;!v||a.current.includes(Q)||X.current&&(Xn(null,{sync:!0}),B.current=-1,T(D),m||P.current?.focus({preventScroll:!0}))}}},[Ce,P,v,a,T,X,m]),A=c.useCallback(()=>k??Y?.nodesRef.current.find(M=>M.id===q)?.context?.dataRef?.current.orientation,[q,Y,k]),F=re(M=>{if(te.current=!1,ae.current=!0,M.which===229||!Ce.current&&M.currentTarget===P.current)return;if(b&&Fy(M.key,R,g,S)){kr(M.key,A())||Te(M),n.setOpen(!1,de(Un,M.nativeEvent)),Be(s)&&(m?Y?.events.emit("virtualfocus",s):s.focus());return}const K=B.current,D=Yo(a,w),Q=ha(a,w);if($||(M.key==="Home"&&(Te(M),B.current=D,T(M)),M.key==="End"&&(Te(M),B.current=Q,T(M))),S>1){const ie=Array.from({length:a.current.length},()=>({width:1,height:1})),be=Pb(ie,S),Ge=be.findIndex(ke=>ke!=null&&!qn(a,ke,w)),nt=be.reduce((ke,Ve,rt)=>Ve!=null&&!qn(a,Ve,w)?rt:ke,-1),_e=be[Ob({current:be.map(ke=>ke!=null?a.current[ke]:null)},{event:M,orientation:R,loopFocus:p,rtl:g,cols:S,disabledIndices:Ab([...(typeof w!="function"?w:null)||a.current.map((ke,Ve)=>qn(a,Ve,w)?Ve:void 0),void 0],be),minIndex:Ge,maxIndex:nt,prevIndex:Tb(B.current>Q?D:B.current,ie,be,S,M.key===tr?"bl":M.key===(g?Jt:en)?"tr":"tl"),stopEvent:!0})];if(_e!=null&&(B.current=_e,T(M)),R==="both")return}if(kr(M.key,R)){if(Te(M),r&&!m&&jt(M.currentTarget.ownerDocument)===M.currentTarget){B.current=os(M.key,R,g)?D:Q,T(M);return}os(M.key,R,g)?p?K>=Q?h&&K!==a.current.length?B.current=-1:(ae.current=!1,B.current=D):B.current=Qe(a,{startingIndex:K,disabledIndices:w}):B.current=Math.min(Q,Qe(a,{startingIndex:K,disabledIndices:w})):p?K<=D?h&&K!==-1?B.current=a.current.length:(ae.current=!1,B.current=Q):B.current=Qe(a,{startingIndex:K,decrement:!0,disabledIndices:w}):B.current=Math.max(D,Qe(a,{startingIndex:K,decrement:!0,disabledIndices:w})),Kn(a,B.current)&&(B.current=-1),T(M)}}),ue=c.useMemo(()=>m&&r&&xe&&{"aria-activedescendant":`${E}-${l}`},[m,r,xe,E,l]),I=c.useMemo(()=>({"aria-orientation":R==="both"?void 0:R,...$?{}:ue,onKeyDown(M){if(M.key==="Tab"&&M.shiftKey&&r&&!m){const K=ct(M.nativeEvent);if(K&&!Ee(P.current,K))return;Te(M),n.setOpen(!1,de(so,M.nativeEvent)),Be(s)&&s.focus();return}F(M)},onPointerMove(){te.current=!0}}),[ue,F,P,R,$,n,r,m,s]),G=c.useMemo(()=>{function M(D){y==="auto"&&hl(D.nativeEvent)&&(N.current=!m)}function K(D){N.current=y,y==="auto"&&gl(D.nativeEvent)&&(N.current=!0)}return{onKeyDown(D){const Q=n.select("open");te.current=!1;const ie=D.key.startsWith("Arrow"),be=Vy(D.key,A(),g),Ge=kr(D.key,R),nt=(b?be:Ge)||D.key==="Enter"||D.key.trim()==="";if(m&&Q)return F(D);if(!(!Q&&!C&&ie)){if(nt){const _e=kr(D.key,A());j.current=b&&_e?null:D.key}if(b){be&&(Te(D),Q?(B.current=Yo(a,ge.current),T(D)):n.setOpen(!0,de(Un,D.nativeEvent,D.currentTarget)));return}Ge&&(Se.current!=null&&(B.current=Se.current),Te(D),!Q&&C?n.setOpen(!0,de(Un,D.nativeEvent,D.currentTarget)):F(D),Q&&T(D))}},onFocus(D){n.select("open")&&!m&&(B.current=-1,T(D))},onPointerDown:K,onPointerEnter:K,onMouseDown:M,onClick:M}},[F,ge,y,a,b,T,n,C,R,A,g,Se,m]),U=c.useMemo(()=>({...ue,...G}),[ue,G]);return c.useMemo(()=>d?{reference:U,floating:I,item:O,trigger:G}:{},[d,U,I,G,O])}function zy(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,o=n.useState("open"),{listRef:s,activeIndex:i,onMatch:a,onTypingChange:l,enabled:u=!0,resetMs:d=750,selectedIndex:f=null}=t,h=hn(),p=c.useRef(""),b=c.useRef(f??i??-1),g=c.useRef(null);oe(()=>{!o&&f!==null||(h.clear(),g.current=null,p.current!==""&&(p.current=""))},[o,f,h]),oe(()=>{o&&p.current===""&&(b.current=f??i??-1)},[o,f,i]);const m=re(R=>{R?r.current.typing||(r.current.typing=R,l?.(R)):r.current.typing&&(r.current.typing=R,l?.(R))}),y=re(R=>{function k(P,q,Y){const $=q.find(N=>N?.toLocaleLowerCase().indexOf(Y.toLocaleLowerCase())===0);return $?P.indexOf($):-1}const S=s.current;if(p.current.length>0&&p.current[0]!==" "&&(k(S,S,p.current)===-1?m(!1):R.key===" "&&Te(R)),S==null||R.key.length!==1||R.ctrlKey||R.metaKey||R.altKey)return;o&&R.key!==" "&&(Te(R),m(!0));const E=p.current==="";E&&(b.current=f??i??-1),S.every(P=>P?P[0]?.toLocaleLowerCase()!==P[1]?.toLocaleLowerCase():!0)&&p.current===R.key&&(p.current="",b.current=g.current),p.current+=R.key,h.start(d,()=>{p.current="",b.current=g.current,m(!1)});const W=E?f??i??-1:b.current,H=k(S,[...S.slice((W||0)+1),...S.slice(0,(W||0)+1)],p.current);H!==-1?(a?.(H),g.current=H):R.key!==" "&&(p.current="",m(!1))}),v=re(R=>{const k=R.relatedTarget,S=n.select("domReferenceElement"),E=n.select("floatingElement"),V=Ee(S,k),W=Ee(E,k);V||W||(h.clear(),p.current="",b.current=g.current,m(!1))}),C=c.useMemo(()=>({onKeyDown:y,onBlur:v}),[y,v]),w=c.useMemo(()=>({onKeyDown:y,onKeyUp(R){R.key===" "&&m(!1)},onBlur:v}),[y,v,m]);return c.useMemo(()=>u?{reference:C,floating:w}:{},[u,C,w])}function By(e){const t=c.useRef(""),n=c.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:c.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o?e(o,o.pointerType):e(o,t.current),t.current=""},[e]),onPointerDown:n}}function Gy(e){const[t,n]=c.useState(null),r=re((a,l)=>{e||n(l||(fl?"touch":""))}),o=c.useCallback(()=>{n(null)},[]),{onClick:s,onPointerDown:i}=By(r);return c.useMemo(()=>({openMethod:t,reset:o,triggerProps:{onClick:s,onPointerDown:i}}),[t,o,s,i])}let ui=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Qn.startingStyle]="startingStyle",e[e.endingStyle=Qn.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),Os=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Hy={[Os.popupOpen]:""},Wy={[Os.popupOpen]:"",[Os.pressed]:""},Uy={[ui.open]:""},Ky={[ui.closed]:""},qy={[ui.anchorHidden]:""},Yy={open(e){return e?Hy:null}},Xy={open(e){return e?Wy:null}},tu={open(e){return e?Uy:Ky},anchorHidden(e){return e?qy:null}};function Zy(e){return Us(19)?e:e?"true":void 0}const nu=c.forwardRef(function(t,n){const{cutout:r,...o}=t;let s;if(r){const i=r?.getBoundingClientRect();s=`polygon(
|
|
24
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:s,secondInputs:i,stack:u})}},ly={inputStabilityCheck:"once",identityFunctionCheck:"once"},eo=Symbol("NOT_FOUND");function uy(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function dy(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function fy(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Va=e=>Array.isArray(e)?e:[e];function py(e){const t=Array.isArray(e[0])?e[0]:e;return fy(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Fa(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var my=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...ly,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:ay},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:cy}}};function hy(e){let t;return{get(n){return t&&e(t.key,n)?t.value:eo},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function gy(e,t){let n=[];function r(a){const l=n.findIndex(u=>t(a,u.key));if(l>-1){const u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return eo}function o(a,l){r(a)===eo&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function s(){return n}function i(){n=[]}return{get:r,put:o,getEntries:s,clear:i}}var by=(e,t)=>e===t;function vy(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let s=0;s<o;s++)if(!e(n[s],r[s]))return!1;return!0}}function yy(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=by,maxSize:o=1,resultEqualityCheck:s}=n,i=vy(r);let a=0;const l=o<=1?hy(i):gy(o,i);function u(){let d=l.get(arguments);if(d===eo){if(d=e.apply(null,arguments),a++,s){const h=l.getEntries().find(p=>s(p.value,d));h&&(d=h.value,a!==0&&a--)}l.put(arguments,d)}return d}return u.clearCache=()=>{l.clear(),u.resetResultsCount()},u.resultsCount=()=>a,u.resetResultsCount=()=>{a=0},u}var xy=class{constructor(e){this.value=e}deref(){return this.value}},wy=typeof WeakRef<"u"?WeakRef:xy,Cy=0,$a=1;function Sr(){return{s:Cy,v:void 0,o:null,p:null}}function ru(e,t={}){let n=Sr();const{resultEqualityCheck:r}=t;let o,s=0;function i(){let a=n;const{length:l}=arguments;for(let f=0,h=l;f<h;f++){const p=arguments[f];if(typeof p=="function"||typeof p=="object"&&p!==null){let b=a.o;b===null&&(a.o=b=new WeakMap);const g=b.get(p);g===void 0?(a=Sr(),b.set(p,a)):a=g}else{let b=a.p;b===null&&(a.p=b=new Map);const g=b.get(p);g===void 0?(a=Sr(),b.set(p,a)):a=g}}const u=a;let d;if(a.s===$a)d=a.v;else if(d=e.apply(null,arguments),s++,r){const f=o?.deref?.()??o;f!=null&&r(f,d)&&(d=f,s!==0&&s--),o=typeof d=="object"&&d!==null||typeof d=="function"?new wy(d):d}return u.s=$a,u.v=d,d}return i.clearCache=()=>{n=Sr(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function ou(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,i=0,a,l={},u=o.pop();typeof u=="object"&&(l=u,u=o.pop()),uy(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const d={...n,...l},{memoize:f,memoizeOptions:h=[],argsMemoize:p=ru,argsMemoizeOptions:b=[],devModeChecks:g={}}=d,m=Va(h),y=Va(b),v=py(o),C=f(function(){return s++,u.apply(null,arguments)},...m);let w=!0;const R=p(function(){i++;const S=Fa(v,arguments);if(a=C.apply(null,S),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:E,inputStabilityCheck:V}=my(w,g);if(E.shouldRun&&E.run(u,S,a),V.shouldRun){const W=Fa(v,arguments);V.run({inputSelectorResults:S,inputSelectorResultsCopy:W},{memoize:f,memoizeOptions:m},arguments)}w&&(w=!1)}return a},...y);return Object.assign(R,{resultFunc:u,memoizedResultFunc:C,dependencies:v,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>a,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:f,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var Ey=ou(ru),Ry=Object.assign((e,t=Ey)=>{dy(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((i,a,l)=>(i[n[l]]=a,i),{}))},{withTypes:()=>Ry});ou({memoize:yy,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const ne=(e,t,n,r,o,s,...i)=>{if(i.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":St(1));let a;if(e)a=e;else throw new Error("Missing arguments");return a};var kr={exports:{}},rs={};var za;function Sy(){if(za)return rs;za=1;var e=Le;function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(f,h){var p=h(),b=r({inst:{value:p,getSnapshot:h}}),g=b[0].inst,m=b[1];return s(function(){g.value=p,g.getSnapshot=h,l(g)&&m({inst:g})},[f,p,h]),o(function(){return l(g)&&m({inst:g}),f(function(){l(g)&&m({inst:g})})},[f]),i(p),p}function l(f){var h=f.getSnapshot;f=f.value;try{var p=h();return!n(f,p)}catch{return!0}}function u(f,h){return h()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return rs.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,rs}var os={};var Ba;function ky(){return Ba||(Ba=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,b){return p===b&&(p!==0||1/p===1/b)||p!==p&&b!==b}function t(p,b){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=b();if(!f){var m=b();s(g,m)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}m=i({inst:{value:g,getSnapshot:b}});var y=m[0].inst,v=m[1];return l(function(){y.value=g,y.getSnapshot=b,n(y)&&v({inst:y})},[p,g,b]),a(function(){return n(y)&&v({inst:y}),p(function(){n(y)&&v({inst:y})})},[p]),u(g),g}function n(p){var b=p.getSnapshot;p=p.value;try{var g=b();return!s(p,g)}catch{return!0}}function r(p,b){return b()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=Le,s=typeof Object.is=="function"?Object.is:e,i=o.useState,a=o.useEffect,l=o.useLayoutEffect,u=o.useDebugValue,d=!1,f=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;os.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),os}var Ga;function fi(){return Ga||(Ga=1,process.env.NODE_ENV==="production"?kr.exports=Sy():kr.exports=ky()),kr.exports}var Iy=fi(),Ir={exports:{}},ss={};var Ha;function Ny(){if(Ha)return ss;Ha=1;var e=Le,t=fi();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;return ss.useSyncExternalStoreWithSelector=function(u,d,f,h,p){var b=s(null);if(b.current===null){var g={hasValue:!1,value:null};b.current=g}else g=b.current;b=a(function(){function y(k){if(!v){if(v=!0,C=k,k=h(k),p!==void 0&&g.hasValue){var S=g.value;if(p(S,k))return w=S}return w=k}if(S=w,r(C,k))return S;var E=h(k);return p!==void 0&&p(S,E)?(C=k,S):(C=k,w=E)}var v=!1,C,w,R=f===void 0?null:f;return[function(){return y(d())},R===null?void 0:function(){return y(R())}]},[d,f,h,p]);var m=o(u,b[0],b[1]);return i(function(){g.hasValue=!0,g.value=m},[m]),l(m),m},ss}var is={};var Wa;function Oy(){return Wa||(Wa=1,process.env.NODE_ENV!=="production"&&(function(){function e(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=Le,n=fi(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,s=t.useRef,i=t.useEffect,a=t.useMemo,l=t.useDebugValue;is.useSyncExternalStoreWithSelector=function(u,d,f,h,p){var b=s(null);if(b.current===null){var g={hasValue:!1,value:null};b.current=g}else g=b.current;b=a(function(){function y(k){if(!v){if(v=!0,C=k,k=h(k),p!==void 0&&g.hasValue){var S=g.value;if(p(S,k))return w=S}return w=k}if(S=w,r(C,k))return S;var E=h(k);return p!==void 0&&p(S,E)?(C=k,S):(C=k,w=E)}var v=!1,C,w,R=f===void 0?null:f;return[function(){return y(d())},R===null?void 0:function(){return y(R())}]},[d,f,h,p]);var m=o(u,b[0],b[1]);return i(function(){g.hasValue=!0,g.value=m},[m]),l(m),m},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),is}var Ua;function Py(){return Ua||(Ua=1,process.env.NODE_ENV==="production"?Ir.exports=Ny():Ir.exports=Oy()),Ir.exports}var Ty=Py();const Ay=Ys(19),My=Ay?Dy:Ly;function _(e,t,n,r,o){return My(e,t,n,r,o)}function _y(e,t,n,r,o){const s=c.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return Iy.useSyncExternalStore(e.subscribe,s,s)}function Dy(e,t,n,r,o){return _y(e,t,n,r,o)}function Ly(e,t,n,r,o){return Ty.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,n,r,o))}class su{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,o){return _(this,t,n,r,o)}}class jy extends su{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){c.useDebugValue(t),oe(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;oe(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this;if(process.env.NODE_ENV!=="production"){c.useDebugValue(t,i=>Object.keys(i));const o=c.useRef(Object.keys(t)).current,s=Object.keys(t);(o.length!==s.length||o.some((i,a)=>i!==s[a]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);oe(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){c.useDebugValue(t);const r=n!==void 0;if(oe(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r]),process.env.NODE_ENV!=="production"){const o=this.controlledValues??=new Map;o.has(t)||o.set(t,r);const s=o.get(t);s!==void 0&&s!==r&&console.error(`A component is changing the ${r?"":"un"}controlled state of ${t.toString()} to be ${r?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(t,n,r,o){const s=this.selectors[t];return s(this.state,n,r,o)}useState(t,n,r,o){return c.useDebugValue(t),_(this,this.selectors[t],n,r,o)}useContextCallback(t,n){c.useDebugValue(t);const r=re(n??Me);this.context[t]=r}useStateSetter(t){const n=c.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(s=>{const i=r(s);if(!Object.is(o,i)){const a=o;o=i,n(i,a,this)}})}}const Vy={open:ne(e=>e.open),domReferenceElement:ne(e=>e.domReferenceElement),referenceElement:ne(e=>e.positionReference??e.referenceElement),floatingElement:ne(e=>e.floatingElement),floatingId:ne(e=>e.floatingId)};class Fy extends jy{constructor(t){const{nested:n,noEmit:r,onOpenChange:o,triggerElements:s,...i}=t;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:lv(),nested:n,noEmit:r,triggerElements:s},Vy)}setOpen=(t,n)=>{if((!t||!this.state.open||El(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}}class $y{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);if(r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n),process.env.NODE_ENV!=="production"&&this.elementsSet.size!==this.idMap.size))throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.")}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function iu(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=Zs(),s=Ll()!=null;if(process.env.NODE_ENV!=="production"){const a=r.reference;a&&!Ae(a)&&console.error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `context.setPositionReference()`","instead.")}const i=vt(()=>new Fy({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new $y,floatingId:o,nested:s,noEmit:!1})).current;return oe(()=>{const a={open:t,floatingId:o};r.reference!==void 0&&(a.referenceElement=r.reference,a.domReferenceElement=Ae(r.reference)?r.reference:null),r.floating!==void 0&&(a.floatingElement=r.floating),i.update(a)},[t,o,r.reference,r.floating,i]),i.context.onOpenChange=n,i.context.nested=s,i.context.noEmit=!1,i}function zy(e={}){const{nodeId:t,externalTree:n}=e,r=iu(e),o=e.rootContext||r,s={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[i,a]=c.useState(null),l=c.useRef(null),u=vo(n);oe(()=>{s.domReference&&(l.current=s.domReference)},[s.domReference]);const d=Xl({...e,elements:{...s,...i&&{reference:i}}}),f=c.useCallback(S=>{const E=Ae(S)?{getBoundingClientRect:()=>S.getBoundingClientRect(),getClientRects:()=>S.getClientRects(),contextElement:S}:S;a(E),d.refs.setReference(E)},[d.refs]),[h,p]=c.useState(null),[b,g]=c.useState(null);o.useSyncedValue("referenceElement",h),o.useSyncedValue("domReferenceElement",Ae(h)?h:null),o.useSyncedValue("floatingElement",b);const m=c.useCallback(S=>{(Ae(S)||S===null)&&(l.current=S,p(S)),(Ae(d.refs.reference.current)||d.refs.reference.current===null||S!==null&&!Ae(S))&&d.refs.setReference(S)},[d.refs,p]),y=c.useCallback(S=>{g(S),d.refs.setFloating(S)},[d.refs]),v=c.useMemo(()=>({...d.refs,setReference:m,setFloating:y,setPositionReference:f,domReference:l}),[d.refs,m,y,f]),C=c.useMemo(()=>({...d.elements,domReference:s.domReference}),[d.elements,s.domReference]),w=o.useState("open"),R=o.useState("floatingId"),k=c.useMemo(()=>({...d,dataRef:o.context.dataRef,open:w,onOpenChange:o.setOpen,events:o.context.events,floatingId:R,refs:v,elements:C,nodeId:t,rootStore:o}),[d,v,C,t,o,w,R]);return oe(()=>{o.context.dataRef.current.floatingContext=k;const S=u?.nodesRef.current.find(E=>E.id===t);S&&(S.context=k)}),c.useMemo(()=>({...d,context:k,refs:v,elements:C,rootStore:o}),[d,v,C,k,o])}function By(e=[]){const t=e.map(u=>u?.reference),n=e.map(u=>u?.floating),r=e.map(u=>u?.item),o=e.map(u=>u?.trigger),s=c.useCallback(u=>Nr(u,e,"reference"),t),i=c.useCallback(u=>Nr(u,e,"floating"),n),a=c.useCallback(u=>Nr(u,e,"item"),r),l=c.useCallback(u=>Nr(u,e,"trigger"),o);return c.useMemo(()=>({getReferenceProps:s,getFloatingProps:i,getItemProps:a,getTriggerProps:l}),[s,i,a,l])}function Nr(e,t,n){const r=new Map,o=n==="item",s={};n==="floating"&&(s.tabIndex=-1,s[Ss]="");for(const i in e)o&&e&&(i===yl||i===xl)||(s[i]=e[i]);for(let i=0;i<t.length;i+=1){let a;const l=t[i]?.[n];typeof l=="function"?a=e?l(e):null:a=l,a&&Ka(s,a,o,r)}return Ka(s,e,o,r),s}function Ka(e,t,n,r){for(const o in t){const s=t[o];n&&(o===yl||o===xl)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof s=="function"&&(r.get(o)?.push(s),e[o]=(...i)=>r.get(o)?.map(a=>a(...i)).find(a=>a!==void 0))):e[o]=s)}}const Gy="Escape";function xo(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Or(e,t){return xo(t,e===ri||e===nr,e===Jt||e===en)}function as(e,t,n){return xo(t,e===nr,n?e===Jt:e===en)||e==="Enter"||e===" "||e===""}function Hy(e,t,n){return xo(t,n?e===Jt:e===en,e===nr)}function Wy(e,t,n,r){const o=n?e===en:e===Jt,s=e===ri;return t==="both"||t==="horizontal"&&r&&r>1?e===Gy:xo(t,o,s)}function Uy(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),s=n.useState("domReferenceElement"),i=n.context.dataRef,{listRef:a,activeIndex:l,onNavigate:u=()=>{},enabled:d=!0,selectedIndex:f=null,allowEscape:h=!1,loopFocus:p=!1,nested:b=!1,rtl:g=!1,virtual:m=!1,focusItemOnOpen:y="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:C=!0,disabledIndices:w=void 0,orientation:R="vertical",parentOrientation:k,cols:S=1,id:E,resetOnPointerLeave:V=!0,externalTree:W}=t;process.env.NODE_ENV!=="production"&&(h&&(p||console.warn("`useListNavigation` looping must be enabled to allow escaping."),m||console.warn("`useListNavigation` must be virtual to allow escaping.")),R==="vertical"&&S>1&&console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const H=Is(o),P=gt(H),q=Ll(),Y=vo(W);oe(()=>{i.current.orientation=R},[i,R]);const $=ks(s),N=c.useRef(y),B=c.useRef(f??-1),j=c.useRef(null),te=c.useRef(!0),T=re(M=>{u(B.current===-1?null:B.current,M)}),we=c.useRef(T),fe=c.useRef(!!o),ye=c.useRef(r),ae=c.useRef(!1),ce=c.useRef(!1),ge=gt(w),Ce=gt(r),Se=gt(f),X=gt(V),pe=re(()=>{function M(ie){m?Y?.events.emit("virtualfocus",ie):Zn(ie,{sync:ae.current,preventScroll:!0})}const K=a.current[B.current],D=ce.current;K&&M(K),(ae.current?ie=>ie():requestAnimationFrame)(()=>{const ie=a.current[B.current]||K;if(!ie)return;K||M(ie),O&&(D||!te.current)&&ie.scrollIntoView?.({block:"nearest",inline:"nearest"})})});oe(()=>{d&&(r&&o?(B.current=f??-1,N.current&&f!=null&&(ce.current=!0,T())):fe.current&&(B.current=-1,we.current()))},[d,r,o,f,T]),oe(()=>{if(d){if(!r){ae.current=!1;return}if(o)if(l==null){if(ae.current=!1,Se.current!=null)return;if(fe.current&&(B.current=-1,pe()),(!ye.current||!fe.current)&&N.current&&(j.current!=null||N.current===!0&&j.current==null)){let M=0;const K=()=>{a.current[0]==null?(M<2&&(M?requestAnimationFrame:queueMicrotask)(K),M+=1):(B.current=j.current==null||as(j.current,R,g)||b?Qo(a):xa(a),j.current=null,T())};K()}}else qn(a,l)||(B.current=l,pe(),ce.current=!1)}},[d,r,o,l,Se,b,a,R,g,T,pe,ge]),oe(()=>{if(!d||o||!Y||m||!fe.current)return;const M=Y.nodesRef.current,K=M.find(ie=>ie.id===q)?.context?.elements.floating,D=jt($e(o)),Q=M.some(ie=>ie.context&&Ee(ie.context.elements.floating,D));K&&!Q&&te.current&&K.focus({preventScroll:!0})},[d,o,Y,q,m]),oe(()=>{we.current=T,ye.current=r,fe.current=!!o}),oe(()=>{r||(j.current=null,N.current=y)},[r,y]);const xe=l!=null,O=c.useMemo(()=>{function M(D){if(!Ce.current)return;const Q=a.current.indexOf(D.currentTarget);Q!==-1&&B.current!==Q&&(B.current=Q,T(D))}return{onFocus(D){ae.current=!0,M(D)},onClick:({currentTarget:D})=>D.focus({preventScroll:!0}),onMouseMove(D){ae.current=!0,ce.current=!1,v&&M(D)},onPointerLeave(D){if(!Ce.current||!te.current||D.pointerType==="touch")return;ae.current=!0;const Q=D.relatedTarget;!v||a.current.includes(Q)||X.current&&(Zn(null,{sync:!0}),B.current=-1,T(D),m||P.current?.focus({preventScroll:!0}))}}},[Ce,P,v,a,T,X,m]),A=c.useCallback(()=>k??Y?.nodesRef.current.find(M=>M.id===q)?.context?.dataRef?.current.orientation,[q,Y,k]),F=re(M=>{if(te.current=!1,ae.current=!0,M.which===229||!Ce.current&&M.currentTarget===P.current)return;if(b&&Wy(M.key,R,g,S)){Or(M.key,A())||Te(M),n.setOpen(!1,de(Kn,M.nativeEvent)),Be(s)&&(m?Y?.events.emit("virtualfocus",s):s.focus());return}const K=B.current,D=Qo(a,w),Q=xa(a,w);if($||(M.key==="Home"&&(Te(M),B.current=D,T(M)),M.key==="End"&&(Te(M),B.current=Q,T(M))),S>1){const ie=Array.from({length:a.current.length},()=>({width:1,height:1})),be=Lb(ie,S),Ge=be.findIndex(ke=>ke!=null&&!Yn(a,ke,w)),nt=be.reduce((ke,Ve,rt)=>Ve!=null&&!Yn(a,Ve,w)?rt:ke,-1),_e=be[Db({current:be.map(ke=>ke!=null?a.current[ke]:null)},{event:M,orientation:R,loopFocus:p,rtl:g,cols:S,disabledIndices:Vb([...(typeof w!="function"?w:null)||a.current.map((ke,Ve)=>Yn(a,Ve,w)?Ve:void 0),void 0],be),minIndex:Ge,maxIndex:nt,prevIndex:jb(B.current>Q?D:B.current,ie,be,S,M.key===nr?"bl":M.key===(g?Jt:en)?"tr":"tl"),stopEvent:!0})];if(_e!=null&&(B.current=_e,T(M)),R==="both")return}if(Or(M.key,R)){if(Te(M),r&&!m&&jt(M.currentTarget.ownerDocument)===M.currentTarget){B.current=as(M.key,R,g)?D:Q,T(M);return}as(M.key,R,g)?p?K>=Q?h&&K!==a.current.length?B.current=-1:(ae.current=!1,B.current=D):B.current=Qe(a,{startingIndex:K,disabledIndices:w}):B.current=Math.min(Q,Qe(a,{startingIndex:K,disabledIndices:w})):p?K<=D?h&&K!==-1?B.current=a.current.length:(ae.current=!1,B.current=Q):B.current=Qe(a,{startingIndex:K,decrement:!0,disabledIndices:w}):B.current=Math.max(D,Qe(a,{startingIndex:K,decrement:!0,disabledIndices:w})),qn(a,B.current)&&(B.current=-1),T(M)}}),ue=c.useMemo(()=>m&&r&&xe&&{"aria-activedescendant":`${E}-${l}`},[m,r,xe,E,l]),I=c.useMemo(()=>({"aria-orientation":R==="both"?void 0:R,...$?{}:ue,onKeyDown(M){if(M.key==="Tab"&&M.shiftKey&&r&&!m){const K=ct(M.nativeEvent);if(K&&!Ee(P.current,K))return;Te(M),n.setOpen(!1,de(co,M.nativeEvent)),Be(s)&&s.focus();return}F(M)},onPointerMove(){te.current=!0}}),[ue,F,P,R,$,n,r,m,s]),G=c.useMemo(()=>{function M(D){y==="auto"&&wl(D.nativeEvent)&&(N.current=!m)}function K(D){N.current=y,y==="auto"&&Cl(D.nativeEvent)&&(N.current=!0)}return{onKeyDown(D){const Q=n.select("open");te.current=!1;const ie=D.key.startsWith("Arrow"),be=Hy(D.key,A(),g),Ge=Or(D.key,R),nt=(b?be:Ge)||D.key==="Enter"||D.key.trim()==="";if(m&&Q)return F(D);if(!(!Q&&!C&&ie)){if(nt){const _e=Or(D.key,A());j.current=b&&_e?null:D.key}if(b){be&&(Te(D),Q?(B.current=Qo(a,ge.current),T(D)):n.setOpen(!0,de(Kn,D.nativeEvent,D.currentTarget)));return}Ge&&(Se.current!=null&&(B.current=Se.current),Te(D),!Q&&C?n.setOpen(!0,de(Kn,D.nativeEvent,D.currentTarget)):F(D),Q&&T(D))}},onFocus(D){n.select("open")&&!m&&(B.current=-1,T(D))},onPointerDown:K,onPointerEnter:K,onMouseDown:M,onClick:M}},[F,ge,y,a,b,T,n,C,R,A,g,Se,m]),U=c.useMemo(()=>({...ue,...G}),[ue,G]);return c.useMemo(()=>d?{reference:U,floating:I,item:O,trigger:G}:{},[d,U,I,G,O])}function Ky(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,o=n.useState("open"),{listRef:s,activeIndex:i,onMatch:a,onTypingChange:l,enabled:u=!0,resetMs:d=750,selectedIndex:f=null}=t,h=hn(),p=c.useRef(""),b=c.useRef(f??i??-1),g=c.useRef(null);oe(()=>{!o&&f!==null||(h.clear(),g.current=null,p.current!==""&&(p.current=""))},[o,f,h]),oe(()=>{o&&p.current===""&&(b.current=f??i??-1)},[o,f,i]);const m=re(R=>{R?r.current.typing||(r.current.typing=R,l?.(R)):r.current.typing&&(r.current.typing=R,l?.(R))}),y=re(R=>{function k(P,q,Y){const $=q.find(N=>N?.toLocaleLowerCase().indexOf(Y.toLocaleLowerCase())===0);return $?P.indexOf($):-1}const S=s.current;if(p.current.length>0&&p.current[0]!==" "&&(k(S,S,p.current)===-1?m(!1):R.key===" "&&Te(R)),S==null||R.key.length!==1||R.ctrlKey||R.metaKey||R.altKey)return;o&&R.key!==" "&&(Te(R),m(!0));const E=p.current==="";E&&(b.current=f??i??-1),S.every(P=>P?P[0]?.toLocaleLowerCase()!==P[1]?.toLocaleLowerCase():!0)&&p.current===R.key&&(p.current="",b.current=g.current),p.current+=R.key,h.start(d,()=>{p.current="",b.current=g.current,m(!1)});const W=E?f??i??-1:b.current,H=k(S,[...S.slice((W||0)+1),...S.slice(0,(W||0)+1)],p.current);H!==-1?(a?.(H),g.current=H):R.key!==" "&&(p.current="",m(!1))}),v=re(R=>{const k=R.relatedTarget,S=n.select("domReferenceElement"),E=n.select("floatingElement"),V=Ee(S,k),W=Ee(E,k);V||W||(h.clear(),p.current="",b.current=g.current,m(!1))}),C=c.useMemo(()=>({onKeyDown:y,onBlur:v}),[y,v]),w=c.useMemo(()=>({onKeyDown:y,onKeyUp(R){R.key===" "&&m(!1)},onBlur:v}),[y,v,m]);return c.useMemo(()=>u?{reference:C,floating:w}:{},[u,C,w])}function qy(e){const t=c.useRef(""),n=c.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:c.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o?e(o,o.pointerType):e(o,t.current),t.current=""},[e]),onPointerDown:n}}function Yy(e){const[t,n]=c.useState(null),r=re((a,l)=>{e||n(l||(vl?"touch":""))}),o=c.useCallback(()=>{n(null)},[]),{onClick:s,onPointerDown:i}=qy(r);return c.useMemo(()=>({openMethod:t,reset:o,triggerProps:{onClick:s,onPointerDown:i}}),[t,o,s,i])}let pi=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Jn.startingStyle]="startingStyle",e[e.endingStyle=Jn.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),As=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Xy={[As.popupOpen]:""},Zy={[As.popupOpen]:"",[As.pressed]:""},Qy={[pi.open]:""},Jy={[pi.closed]:""},ex={[pi.anchorHidden]:""},tx={open(e){return e?Xy:null}},nx={open(e){return e?Zy:null}},au={open(e){return e?Qy:Jy},anchorHidden(e){return e?ex:null}};function rx(e){return Ys(19)?e:e?"true":void 0}const cu=c.forwardRef(function(t,n){const{cutout:r,...o}=t;let s;if(r){const i=r?.getBoundingClientRect();s=`polygon(
|
|
25
25
|
0% 0%,
|
|
26
26
|
100% 0%,
|
|
27
27
|
100% 100%,
|
|
@@ -32,47 +32,47 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
32
32
|
${i.right}px ${i.bottom}px,
|
|
33
33
|
${i.right}px ${i.top}px,
|
|
34
34
|
${i.left}px ${i.top}px
|
|
35
|
-
)`}return x.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})});process.env.NODE_ENV!=="production"&&(nu.displayName="InternalBackdrop");function Qy(e){const t=c.useRef(!0);t.current&&(t.current=!1,e())}const di=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(di.displayName="ComboboxRootContext");const fi=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(fi.displayName="ComboboxFloatingContext");const pi=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(pi.displayName="ComboboxDerivedItemsContext");const mi=c.createContext("");process.env.NODE_ENV!=="production"&&(mi.displayName="ComboboxInputValueContext");function mt(){const e=c.useContext(di);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.":St(22));return e}function vo(){const e=c.useContext(fi);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.":St(23));return e}function cn(){const e=c.useContext(pi);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.":St(24));return e}function hi(){return c.useContext(mi)}const Jy=(e,t)=>Object.is(e,t);function bn(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function ex(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:bn(t,r,n))}function Qr(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:bn(r,t,n))}function tx(e,t,n){return e.filter(r=>!bn(t,r,n))}function Ps(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function gi(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function nx(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(gi(e)){for(const t of e)for(const n of t.items)if(n&&n.value==null&&n.label!=null)return!0;return!1}for(const t of e)if(t&&t.value==null&&t.label!=null)return!0;return!1}function at(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return Ps(e)}function Hn(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Ps(e.value):Ps(e)}function ru(e,t,n){function r(){return at(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){const o=gi(t)?t.flatMap(s=>s.items):t;if(e==null||typeof e!="object"){const s=o.find(i=>i.value===e);return s&&s.label!=null?s.label:r()}if("value"in e){const s=o.find(i=>i&&i.value===e.value);if(s&&s.label!=null)return s.label}}return r()}function rx(e,t,n){return e.reduce((r,o,s)=>(s>0&&r.push(", "),r.push(x.jsx(c.Fragment,{children:ru(o,t,n)},s)),r),[])}const L={id:ne(e=>e.id),query:ne(e=>e.query),items:ne(e=>e.items),selectedValue:ne(e=>e.selectedValue),hasSelectionChips:ne(e=>{const t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:ne(e=>{const{selectedValue:t,selectionMode:n}=e;return t==null?!1:n==="multiple"&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:ne((e,t)=>t?nx(e.items):!1),open:ne(e=>e.open),mounted:ne(e=>e.mounted),forceMounted:ne(e=>e.forceMounted),inline:ne(e=>e.inline),activeIndex:ne(e=>e.activeIndex),selectedIndex:ne(e=>e.selectedIndex),isActive:ne((e,t)=>e.activeIndex===t),isSelected:ne((e,t)=>{const n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(o=>bn(t,o,n)):bn(t,r,n)}),transitionStatus:ne(e=>e.transitionStatus),popupProps:ne(e=>e.popupProps),inputProps:ne(e=>e.inputProps),triggerProps:ne(e=>e.triggerProps),getItemProps:ne(e=>e.getItemProps),positionerElement:ne(e=>e.positionerElement),listElement:ne(e=>e.listElement),triggerElement:ne(e=>e.triggerElement),inputElement:ne(e=>e.inputElement),popupSide:ne(e=>e.popupSide),openMethod:ne(e=>e.openMethod),inputInsidePopup:ne(e=>e.inputInsidePopup),selectionMode:ne(e=>e.selectionMode),listRef:ne(e=>e.listRef),labelsRef:ne(e=>e.labelsRef),popupRef:ne(e=>e.popupRef),emptyRef:ne(e=>e.emptyRef),inputRef:ne(e=>e.inputRef),keyboardActiveRef:ne(e=>e.keyboardActiveRef),chipsContainerRef:ne(e=>e.chipsContainerRef),clearRef:ne(e=>e.clearRef),valuesRef:ne(e=>e.valuesRef),allValuesRef:ne(e=>e.allValuesRef),name:ne(e=>e.name),disabled:ne(e=>e.disabled),readOnly:ne(e=>e.readOnly),required:ne(e=>e.required),grid:ne(e=>e.grid),isGrouped:ne(e=>e.isGrouped),virtualized:ne(e=>e.virtualized),onOpenChangeComplete:ne(e=>e.onOpenChangeComplete),openOnInputClick:ne(e=>e.openOnInputClick),itemToStringLabel:ne(e=>e.itemToStringLabel),isItemEqualToValue:ne(e=>e.isItemEqualToValue),modal:ne(e=>e.modal),autoHighlight:ne(e=>e.autoHighlight),submitOnItemClick:ne(e=>e.submitOnItemClick)};let Ga=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const ox={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},sx={valid(e){return e===null?null:e?{[Ga.valid]:""}:{[Ga.invalid]:""}}},ou=c.createContext({invalid:void 0,name:void 0,validityData:{state:ox,errors:[],error:"",value:"",initialValue:null},setValidityData:Me,disabled:void 0,touched:!1,setTouched:Me,dirty:!1,setDirty:Me,filled:!1,setFilled:Me,focused:!1,setFocused:Me,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=et)=>e,getInputValidationProps:(e=et)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(ou.displayName="FieldRootContext");function rr(e=!0){const t=c.useContext(ou);if(t.setValidityData===Me&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":St(28));return t}function ix(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const su=c.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Me,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(su.displayName="FormContext");function iu(){return c.useContext(su)}function ax(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:s,commit:i}=e,{formRef:a}=iu(),{invalid:l,markedDirtyRef:u,validityData:d,setValidityData:f}=rr(),h=re(e.getValue);oe(()=>{if(!t)return;let p=n;p===void 0&&(p=h()),d.initialValue===null&&p!==null&&f(b=>({...b,initialValue:p}))},[t,f,n,d.initialValue,h]),oe(()=>{!t||!r||a.current.fields.set(r,{getValue:h,name:o,controlRef:s,validityData:ix(d,l),validate(p=!0){let b=n;b===void 0&&(b=h()),u.current=!0,p?rn.flushSync(()=>i(b)):i(b)}})},[i,s,t,a,h,r,l,u,o,d,n]),oe(()=>{const p=a.current.fields;return()=>{r&&p.delete(r)}},[a,r])}const au=c.createContext({controlId:void 0,registerControlId:Me,labelId:void 0,setLabelId:Me,messageIds:[],setMessageIds:Me,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(au.displayName="LabelableContext");function bi(){return c.useContext(au)}function cu(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:s}=bi(),i=Ys(t),a=n?o:void 0,l=vt(()=>Symbol("labelable-control")),u=c.useRef(!1),d=c.useRef(t!=null),f=re(()=>{!u.current||s===Me||(u.current=!1,s(l.current,void 0))});return oe(()=>{if(s===Me)return;let h;if(n){const p=r?.current;Ae(p)&&p.closest("label")!=null?h=t??null:h=a??i}else if(t!=null)d.current=!0,h=t;else if(d.current)h=i;else{f();return}if(h===void 0){f();return}u.current=!0,s(l.current,h)},[t,r,a,s,n,i,l,f]),c.useEffect(()=>f,[f]),o??i}function cx(e,t){return(n,r)=>{if(n==null)return!1;const o=at(n,t);return e.contains(o,r)}}function lx(e,t,n){return(r,o)=>{if(r==null)return!1;if(!o)return!0;const s=at(r,t),i=n!=null?at(n,t):"";return i&&e.contains(i,o)&&i.length===o.length?!0:e.contains(s,o)}}const Ha=new Map;function lu(e){return Array.isArray(e)?e.map(t=>lu(t)).join(","):e==null?"":String(e)}function ux(e={}){const t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${lu(e.locale)}|${JSON.stringify(t)}`,r=Ha.get(n);if(r)return r;const o=new Intl.Collator(e.locale,t),s={contains(i,a,l){if(!a)return!0;const u=at(i,l);for(let d=0;d<=u.length-a.length;d+=1)if(o.compare(u.slice(d,d+a.length),a)===0)return!0;return!1},startsWith(i,a,l){if(!a)return!0;const u=at(i,l);return o.compare(u.slice(0,a.length),a)===0},endsWith(i,a,l){if(!a)return!0;const u=at(i,l),d=a.length;return u.length>=d&&o.compare(u.slice(u.length-d),a)===0}};return Ha.set(n,s),s}const dx=ux;function Ir(e,t){const n=c.useRef(e),r=re(t);oe(()=>{n.current!==e&&r(n.current)},[e,r]),oe(()=>{n.current=e},[e])}const uu=Symbol("none"),mn={value:uu,index:-1};function fx(e){const{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:o,onSelectedValueChange:s,defaultInputValue:i,inputValue:a,selectionMode:l="none",onItemHighlighted:u,name:d,disabled:f=!1,readOnly:h=!1,required:p=!1,inputRef:b,grid:g=!1,items:m,filteredItems:y,filter:v,openOnInputClick:C=!0,autoHighlight:w=!1,keepHighlight:R=!1,highlightItemOnHover:k=!0,loopFocus:S=!0,itemToStringLabel:E,itemToStringValue:V,isItemEqualToValue:W=Jy,virtualized:H=!1,inline:P=!1,fillInputOnItemPress:q=!0,modal:Y=!1,limit:$=-1,autoComplete:N="list",formAutoComplete:B,locale:j,submitOnItemClick:te=!1}=e,{clearErrors:T}=iu(),{setDirty:we,validityData:fe,shouldValidateOnChange:ye,setFilled:ae,name:ce,disabled:ge,setTouched:Ce,setFocused:Se,validationMode:X,validation:pe}=rr(),xe=cu({id:t}),O=dx({locale:j}),[A,F]=c.useState(!1),[ue,I]=c.useState(null),G=c.useRef([]),U=c.useRef([]),M=c.useRef(null),K=c.useRef(null),D=c.useRef(null),Q=c.useRef(!0),ie=c.useRef(!1),be=c.useRef(null),Ge=c.useRef(null),nt=c.useRef(null),_e=c.useRef(mn),ke=c.useRef(null),Ve=c.useRef([]),rt=c.useRef([]),Je=ge||f,lt=ce??d,Xe=l==="multiple",ot=l==="single",_t=a!==void 0||i!==void 0,yt=m!==void 0,Pe=y!==void 0;let Ie;w==="always"?Ie="always":Ie=w?"input-change":!1;const[le,st]=Wo({controlled:o,default:Xe?r??gr:r,name:"Combobox",state:"selectedValue"}),it=c.useMemo(()=>v===null?()=>!0:v!==void 0?v:ot&&!A?lx(O,E,le):cx(O,E),[v,ot,le,A,O,E]),ln=vt(()=>_t?i??"":ot?at(le,E):"").current,[We,jn]=Wo({controlled:a,default:ln,name:"Combobox",state:"inputValue"}),[De,Po]=Wo({controlled:e.open,default:e.defaultOpen,name:"Combobox",state:"open"}),xt=gi(m),Ze=ue??(We===""?"":String(We).trim()),Vn=ot?at(le,E):"",En=ot&&!A&&Ze!==""&&Vn!==""&&Vn.length===Ze.length&&O.contains(Vn,Ze),Bt=En?"":Ze,ir=yt&&Pe&&En,Gt=c.useMemo(()=>m?xt?m.flatMap(Z=>Z.items):m:gr,[m,xt]),wt=c.useMemo(()=>{if(y&&!ir)return y;if(!m)return gr;if(xt){const se=m,he=[];let Fe=0;for(const Ue of se){if($>-1&&Fe>=$)break;const Ke=Bt===""?Ue.items:Ue.items.filter(fr=>it(fr,Bt,E));if(Ke.length===0)continue;const un=$>-1?$-Fe:1/0,dn=Ke.slice(0,un);if(dn.length>0){const fr={...Ue,items:dn};he.push(fr),Fe+=dn.length}}return he}if(Bt==="")return $>-1?Gt.slice(0,$):Gt;const Z=[];for(const se of Gt){if($>-1&&Z.length>=$)break;it(se,Bt,E)&&Z.push(se)}return Z},[y,ir,m,xt,Bt,$,it,E,Gt]),ut=c.useMemo(()=>xt?wt.flatMap(se=>se.items):wt,[wt,xt]),ve=vt(()=>new Jl({id:xe,selectedValue:le,open:De,filter:it,query:Ze,items:m,selectionMode:l,listRef:G,labelsRef:U,popupRef:M,emptyRef:D,inputRef:K,keyboardActiveRef:Q,chipsContainerRef:be,clearRef:Ge,valuesRef:Ve,allValuesRef:rt,selectionEventRef:nt,name:lt,disabled:Je,readOnly:h,required:p,grid:g,isGrouped:xt,virtualized:H,openOnInputClick:C,itemToStringLabel:E,isItemEqualToValue:W,modal:Y,autoHighlight:Ie,submitOnItemClick:te,hasInputValue:_t,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:P,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},positionerElement:null,listElement:null,triggerElement:null,inputElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,onOpenChangeComplete:n||Me,setOpen:Me,setInputValue:Me,setSelectedValue:Me,setIndices:Me,onItemHighlighted:Me,handleSelection:Me,getItemProps:()=>et,forceMount:Me,requestSubmit:Me})).current,Ht=l==="none"?We:le,gp=c.useMemo(()=>l==="none"?Ht:Array.isArray(le)?le.map(Z=>Hn(Z,V)):Hn(le,V),[Ht,V,l,le]),To=re(u),Ao=re(n),ar=_(ve,L.activeIndex),bp=_(ve,L.selectedIndex),cr=_(ve,L.positionerElement),Hi=_(ve,L.listElement),Fn=_(ve,L.triggerElement),Mo=_(ve,L.inputElement),Ct=_(ve,L.inline),Wt=_(ve,L.inputInsidePopup),vp=gt(Fn),{mounted:Wi,setMounted:yp,transitionStatus:_o}=sl(De),{openMethod:Ui,triggerProps:Do,reset:xp}=Gy(De);ax({id:xe,name:lt,commit:pe.commit,value:Ht,controlRef:Wt?vp:K,getValue:()=>gp});const lr=re(()=>{m?U.current=ut.map(Z=>at(Z,E)):ve.set("forceMounted",!0)}),wp=c.useRef(le);oe(()=>{le!==wp.current&&lr()},[lr,le]);const Et=re(Z=>{ve.update(Z);const se=Z.type||"none";if(Z.activeIndex!==void 0)if(Z.activeIndex===null)_e.current!==mn&&(_e.current=mn,To(void 0,Bn(se,void 0,{index:-1})));else{const he=Ve.current[Z.activeIndex];_e.current={value:he,index:Z.activeIndex},To(he,Bn(se,void 0,{index:Z.activeIndex}))}}),It=re((Z,se)=>{if(ie.current=se.reason===Yt,e.onInputValueChange?.(Z,se),!se.isCanceled){if(se.reason===In){const he=se.event,Fe=he.inputType;if(he.type==="compositionend"||Fe!=null&&Fe!==""&&Fe!=="insertReplacementText"){const Ke=Z.trim()!=="";Ke&&F(!0),ke.current={hasQuery:Ke},Ke&&Ie&&ve.state.activeIndex==null&&ve.set("activeIndex",0)}}jn(Z)}}),$n=re((Z,se)=>{if(De!==Z&&(se.reason==="escape-key"&&yt&&ut.length===0&&!ve.state.emptyRef.current&&se.allowPropagation(),e.onOpenChange?.(Z,se),!se.isCanceled&&(!Z&&A&&(ot?(Ct||I(Ze),Ze===""&&F(!1)):Xe&&(Ct||Wt?Et({activeIndex:null}):I(Ze),It("",de(Yt,se.event)))),Po(Z),!Z&&Wt&&(se.reason===so||se.reason===Ks)&&(Ce(!0),Se(!1),X==="onBlur")))){const he=l==="none"?We:le;pe.commit(he)}}),ur=re((Z,se)=>{if(s?.(Z,se),se.isCanceled)return;st(Z),(l==="none"&&M.current&&q||ot&&!ve.state.inputInsidePopup)&&It(at(Z,E),de(se.reason,se.event)),ot&&Z!=null&&se.reason!==In&&A&&!Ct&&I(Ze)}),Cp=re((Z,se)=>{let he=se;if(he===void 0){if(ar===null)return;he=Ve.current[ar]}const Fe=ct(Z),Ue=nt.current??Z;nt.current=null;const Ke=de(Xg,Ue),un=Fe?.closest("a")?.getAttribute("href");if(un){un.startsWith("#")&&$n(!1,Ke);return}if(Xe){const dn=Array.isArray(le)?le:[],_p=ex(dn,he,ve.state.isItemEqualToValue)?tx(dn,he,ve.state.isItemEqualToValue):[...dn,he];if(ur(_p,Ke),!(K.current?K.current.value.trim()!=="":!1))return;ve.state.inputInsidePopup?It("",de(Yt,Ke.event)):$n(!1,Ke)}else ur(he,Ke),$n(!1,Ke)}),Lo=re(()=>{if(!ve.state.submitOnItemClick)return;const Z=ve.state.inputElement?.form;Z&&typeof Z.requestSubmit=="function"&&Z.requestSubmit()}),jo=re(()=>{if(yp(!1),Ao?.(!1),F(!1),xp(),I(null),Et(l==="none"?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Xe&&K.current&&K.current.value!==""&&!ie.current&&It("",de(Yt)),ot)if(ve.state.inputInsidePopup)K.current&&K.current.value!==""&&It("",de(Yt));else{const Z=at(le,E);K.current&&K.current.value!==Z&&It(Z,de(Z===""?Yt:ht))}}),Ep=c.useMemo(()=>Ct&&cr?{current:cr.closest('[role="dialog"]')}:M,[Ct,cr]);oi({enabled:!e.actionsRef,open:De,ref:Ep,onComplete(){De||jo()}}),c.useImperativeHandle(e.actionsRef,()=>({unmount:jo}),[jo]),oe(function(){if(De||l==="none")return;const se=m?Gt:rt.current;if(Xe){const he=Array.isArray(le)?le:[],Fe=he[he.length-1],Ue=Qr(se,Fe,W);Et({selectedIndex:Ue===-1?null:Ue})}else{const he=Qr(se,le,W);Et({selectedIndex:he===-1?null:he})}},[De,le,m,l,Gt,Xe,W,Et]),oe(()=>{m&&(Ve.current=ut,G.current.length=ut.length)},[m,ut]),oe(()=>{const Z=ke.current;if(Z&&(Z.hasQuery?Ie&&ve.set("activeIndex",0):Ie==="always"&&ve.set("activeIndex",0),ke.current=null),!De&&!Ct)return;const he=yt||Pe?ut:Ve.current,Fe=ve.state.activeIndex;if(Fe==null){if(Ie==="always"&&he.length>0){ve.set("activeIndex",0);return}_e.current!==mn&&(_e.current=mn,ve.state.onItemHighlighted(void 0,Bn(ht,void 0,{index:-1})));return}if(Fe>=he.length){_e.current!==mn&&(_e.current=mn,ve.state.onItemHighlighted(void 0,Bn(ht,void 0,{index:-1}))),ve.set("activeIndex",null);return}const Ue=he[Fe],Ke=_e.current.value,un=Ke!==uu&&bn(Ue,Ke,ve.state.isItemEqualToValue);(_e.current.index!==Fe||!un)&&(_e.current={value:Ue,index:Fe},ve.state.onItemHighlighted(Ue,Bn(ht,void 0,{index:Fe})))},[ar,Ie,Pe,yt,ut,Ct,De,ve]),oe(()=>{if(l==="none"){ae(String(We)!=="");return}ae(Xe?Array.isArray(le)&&le.length>0:le!=null)},[ae,l,We,le,Xe]),c.useEffect(()=>{yt&&Ie&&ut.length===0&&Et({activeIndex:null})},[yt,Ie,ut.length,Et]),Ir(Ze,()=>{!De||Ze===""||Ze===String(ln)||F(!0)}),Ir(le,()=>{if(l!=="none"&&(T(lt),we(le!==fe.initialValue),ye()?pe.commit(le):pe.commit(le,!0),ot&&!_t&&!Wt)){const Z=at(le,E);We!==Z&&It(Z,de(ht))}}),Ir(We,()=>{l==="none"&&(T(lt),we(We!==fe.initialValue),ye()?pe.commit(We):pe.commit(We,!0))}),Ir(m,()=>{if(!ot||_t||Wt||A)return;const Z=at(le,E);We!==Z&&It(Z,de(ht))});const dr=eu({open:Ct?!0:De,onOpenChange:$n,elements:{reference:Wt?Fn:Mo,floating:cr}});let Vo,Fo;Ct||(Vo=g?"grid":"listbox",Fo=De?"true":"false");const Rp=c.useMemo(()=>{const Z=Mo?.tagName==="INPUT",se=Z||De,he=Z?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return se&&(he.role="combobox",he["aria-expanded"]=Fo,he["aria-haspopup"]=Vo,he["aria-controls"]=De?Hi?.id:void 0,he["aria-autocomplete"]=N),{reference:he,floating:{role:"presentation"}}},[Mo,De,Fo,Vo,Hi?.id,N]),Sp=Dl(dr,{enabled:!h&&!Je&&C,event:"mousedown-only",toggle:!1,touchOpenDelay:Wt?0:50,reason:Qg}),kp=ey(dr,{enabled:!h&&!Je&&!Ct,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:Ct?!0:void 0,outsidePress(Z){const se=ct(Z);return!Ee(Fn,se)&&!Ee(Ge.current,se)&&!Ee(be.current,se)}}),Ip=$y(dr,{enabled:!h&&!Je,id:xe,listRef:G,activeIndex:ar,selectedIndex:bp,virtual:!0,loopFocus:S,allowEscape:S&&!Ie,focusItemOnOpen:A||l==="none"&&!Ie?!1:"auto",focusItemOnHover:k,resetOnPointerLeave:!R,cols:g?2:1,orientation:g?"horizontal":void 0,disabledIndices:gr,onNavigate(Z,se){!se&&!De||_o==="ending"||Et(se?{activeIndex:Z,type:Q.current?"keyboard":"pointer"}:{activeIndex:Z})}}),{getReferenceProps:$o,getFloatingProps:zo,getItemProps:Bo}=Ly([Rp,Sp,kp,Ip]);Qy(()=>{ve.update({inline:P,popupProps:zo(),inputProps:$o(),triggerProps:Do,getItemProps:Bo,setOpen:$n,setInputValue:It,setSelectedValue:ur,setIndices:Et,onItemHighlighted:To,handleSelection:Cp,forceMount:lr,requestSubmit:Lo})}),oe(()=>{ve.update({id:xe,selectedValue:le,open:De,mounted:Wi,transitionStatus:_o,items:m,inline:P,popupProps:zo(),inputProps:$o(),triggerProps:Do,openMethod:Ui,getItemProps:Bo,selectionMode:l,name:lt,disabled:Je,readOnly:h,required:p,grid:g,isGrouped:xt,virtualized:H,onOpenChangeComplete:Ao,openOnInputClick:C,itemToStringLabel:E,modal:Y,autoHighlight:Ie,isItemEqualToValue:W,submitOnItemClick:te,hasInputValue:_t,requestSubmit:Lo})},[ve,xe,le,De,Wi,_o,m,zo,$o,Bo,Ui,Do,l,lt,Je,h,p,pe,g,xt,H,Ao,C,E,Y,W,te,_t,P,Lo,Ie]);const Np=Zn(b,pe.inputRef),Op=c.useMemo(()=>({query:Ze,hasItems:yt,filteredItems:wt,flatFilteredItems:ut}),[Ze,yt,wt,ut]),Pp=c.useMemo(()=>Array.isArray(Ht)?"":Hn(Ht,V),[Ht,V]),Tp=Xe&&Array.isArray(le)&&le.length>0,Go=Xe||l==="none"?void 0:lt,Ap=c.useMemo(()=>!Xe||!Array.isArray(le)||!lt?null:le.map(Z=>{const se=Hn(Z,V);return x.jsx("input",{type:"hidden",name:lt,value:se},se)}),[Xe,le,lt,V]),Mp=x.jsxs(c.Fragment,{children:[e.children,x.jsx("input",{...pe.getInputValidationProps({onFocus(){if(Wt){Fn?.focus();return}(K.current||Fn)?.focus()},onChange(Z){if(Z.nativeEvent.defaultPrevented)return;const se=Z.target.value,he=de(ht,Z.nativeEvent);function Fe(){if(Xe)return;if(l==="none"){we(se!==fe.initialValue),It(se,he),ye()&&pe.commit(se);return}const Ue=Ve.current.find(Ke=>Hn(Ke,V).toLowerCase()===se.toLowerCase());Ue!=null&&(we(Ue!==fe.initialValue),ur?.(Ue,he),ye()&&pe.commit(Ue))}m?Fe():(lr(),queueMicrotask(Fe))}}),id:xe&&Go==null?`${xe}-hidden-input`:void 0,name:Go,autoComplete:B,disabled:Je,required:p&&!Tp,readOnly:h,value:Pp,ref:Np,style:Go?ov:si,tabIndex:-1,"aria-hidden":!0}),Ap]});return x.jsx(di.Provider,{value:ve,children:x.jsx(fi.Provider,{value:dr,children:x.jsx(pi.Provider,{value:Op,children:x.jsx(mi.Provider,{value:We,children:Mp})})})})}const du={...Xy,...sx,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null};function px(e){const t=e.getBoundingClientRect();if(process.env.NODE_ENV!=="production")return t;const n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||r.content!=="none"))return t;const s=parseFloat(n.width)||0,i=parseFloat(n.height)||0,a=parseFloat(r.width)||0,l=parseFloat(r.height)||0,u=Math.max(t.width,s,a),d=Math.max(t.height,i,l),f=u-t.width,h=d-t.height;return{left:t.left-f/2,right:t.right+f/2,top:t.top-h/2,bottom:t.bottom+h/2}}const Nr=2,fu=c.forwardRef(function(t,n){const{render:r,className:o,nativeButton:s=!0,disabled:i=!1,id:a,...l}=t,{state:u,disabled:d,setTouched:f,setFocused:h,validationMode:p,validation:b}=rr(),{labelId:g}=bi(),m=mt(),{filteredItems:y}=cn(),v=_(m,L.selectionMode),C=_(m,L.disabled),w=_(m,L.readOnly),R=_(m,L.required),k=_(m,L.mounted),S=_(m,L.popupSide),E=_(m,L.positionerElement),V=_(m,L.listElement),W=_(m,L.triggerProps),H=_(m,L.triggerElement),P=_(m,L.inputInsidePopup),q=_(m,L.id),Y=_(m,L.open),$=_(m,L.selectedValue),N=_(m,L.activeIndex),B=_(m,L.selectedIndex),j=_(m,L.hasSelectedValue),te=vo(),T=hi(),we=hn(),fe=d||C||i,ye=y.length===0,ae=k&&E?S:null;cu({id:P?a:void 0});const ce=P?a??q:a,ge=c.useRef("");function Ce(I){ge.current=I.pointerType}const Se=te.useState("domReferenceElement");c.useEffect(()=>{P&&H&&H!==Se&&te.set("domReferenceElement",H)},[H,Se,te,P]);const{reference:X}=zy(te,{enabled:!Y&&!w&&!C&&v==="single",listRef:m.state.labelsRef,activeIndex:N,selectedIndex:B,onMatch(I){const G=m.state.valuesRef.current[I];G!==void 0&&m.state.setSelectedValue(G,de("none"))}}),{reference:pe}=Dl(te,{enabled:!w&&!C,event:"mousedown"}),{buttonRef:xe,getButtonProps:O}=uo({native:s,disabled:fe}),A={...u,open:Y,disabled:fe,popupSide:ae,listEmpty:ye,placeholder:!j},F=re(I=>{m.set("triggerElement",I)});return tt("button",t,{ref:[n,xe,F],state:A,props:[W,pe,X,{id:ce,tabIndex:P?0:-1,role:P?"combobox":void 0,"aria-expanded":Y?"true":"false","aria-haspopup":P?"dialog":"listbox","aria-controls":Y?V?.id:void 0,"aria-required":P&&R||void 0,"aria-labelledby":g,onPointerDown:Ce,onPointerEnter:Ce,onFocus(){h(!0),!(fe||w)&&we.start(0,m.state.forceMount)},onBlur(I){if(!Ee(E,I.relatedTarget)&&(f(!0),h(!1),p==="onBlur")){const G=v==="none"?T:$;b.commit(G)}},onMouseDown(I){if(fe||w||(P||te.set("domReferenceElement",I.currentTarget),m.state.forceMount(),ge.current!=="touch"&&(m.state.inputRef.current?.focus(),P||I.preventDefault()),Y))return;const G=$e(I.currentTarget);function U(M){if(!H)return;const K=ct(M),D=m.state.positionerElement,Q=m.state.listElement;if(Ee(H,K)||Ee(D,K)||Ee(Q,K)||K===H)return;const ie=px(H),be=M.clientX>=ie.left-Nr&&M.clientX<=ie.right+Nr,Ge=M.clientY>=ie.top-Nr&&M.clientY<=ie.bottom+Nr;be&&Ge||m.state.setOpen(!1,de("cancel-open",M))}P&&G.addEventListener("mouseup",U,{once:!0})},onKeyDown(I){fe||w||(I.key==="ArrowDown"||I.key==="ArrowUp")&&(Te(I),m.state.setOpen(!0,de(Un,I.nativeEvent)),m.state.inputRef.current?.focus())}},b?b.getValidationProps(l):l,O],stateAttributesMapping:du})});process.env.NODE_ENV!=="production"&&(fu.displayName="ComboboxTrigger");const vi=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(vi.displayName="ComboboxChipsContext");function pu(){return c.useContext(vi)}const yi=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(yi.displayName="ComboboxPositionerContext");function xi(e){const t=c.useContext(yi);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Popup> and <Combobox.Arrow> must be used within the <Combobox.Positioner> component":St(21));return t}const wi=c.forwardRef(function(t,n){const{render:r,className:o,disabled:s=!1,id:i,...a}=t,{state:l,disabled:u,setTouched:d,setFocused:f,validationMode:h,validation:p}=rr(),{labelId:b}=bi(),g=pu(),y=!!xi(!0),v=mt(),{filteredItems:C}=cn(),w=hi(),R=Xc(),k=_(v,L.required),S=_(v,L.disabled),E=_(v,L.readOnly),V=_(v,L.name),W=_(v,L.selectionMode),H=_(v,L.autoHighlight),P=_(v,L.inputProps),q=_(v,L.triggerProps),Y=_(v,L.open),$=_(v,L.mounted),N=_(v,L.selectedValue),B=_(v,L.popupSide),j=_(v,L.positionerElement),te=_(v,L.id),T=_(v,L.inline),we=!!H,fe=$&&j?B:null,ye=u||S||s,ae=C.length===0,ge=Ys(i??(y||T?void 0:te)),[Ce,Se]=c.useState(null),X=c.useRef(!1),pe=c.useRef(null),xe=c.useRef(!1),O=re(I=>{const G=y||v.state.inline;G&&!v.state.hasInputValue&&v.state.setInputValue("",de(ht)),v.update({inputElement:I,inputInsidePopup:G})}),A={...l,open:Y,disabled:ye,readOnly:E,popupSide:fe,listEmpty:ae};function F(I){if(!g)return;let G;const{highlightedChipIndex:U}=g;if(U!==void 0){if(I.key==="ArrowLeft")I.preventDefault(),U>0?G=U-1:G=void 0;else if(I.key==="ArrowRight")I.preventDefault(),U<N.length-1?G=U+1:G=void 0;else if(I.key==="Backspace"||I.key==="Delete"){I.preventDefault();const M=U>=N.length-1?N.length-2:U;G=M>=0?M:void 0,v.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return G}return I.key==="ArrowLeft"&&(I.currentTarget.selectionStart??0)===0&&N.length>0?(I.preventDefault(),G=Math.max(N.length-1,0)):I.key==="Backspace"&&I.currentTarget.value===""&&N.length>0&&(v.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),I.preventDefault()),G}return tt("input",t,{state:A,ref:[n,v.state.inputRef,O],props:[P,q,{type:"text",value:t.value??Ce??w,"aria-readonly":E||void 0,"aria-required":k||void 0,"aria-labelledby":b,disabled:ye,readOnly:E,required:W==="none"?k:void 0,...W==="none"&&V&&{name:V},id:ge,onFocus(){if(f(!0),!T||!xe.current)return;xe.current=!1;const I=pe.current;I==null||!Object.hasOwn(v.state.valuesRef.current,I)||v.state.setIndices({activeIndex:I})},onBlur(){d(!0),f(!1);const I=v.state.activeIndex;if(T&&I!==null&&H!=="always"&&(pe.current=I,xe.current=!0,v.state.setIndices({activeIndex:null})),h==="onBlur"){const G=W==="none"?w:N;p.commit(G)}},onCompositionStart(I){$r||(X.current=!0,Se(I.currentTarget.value))},onCompositionEnd(I){X.current=!1;const G=I.currentTarget.value;Se(null),v.state.setInputValue(G,de(In,I.nativeEvent))},onChange(I){const G=I.nativeEvent.inputType,U=!G||G==="insertReplacementText",M=X.current||!U;if(X.current){const ie=I.currentTarget.value;Se(ie),ie===""&&!v.state.openOnInputClick&&!v.state.inputInsidePopup&&v.state.setOpen(!1,de(Yt,I.nativeEvent));const be=ie.trim(),Ge=we&&be!=="";!E&&!ye&&be&&M&&(v.state.setOpen(!0,de(In,I.nativeEvent)),we||v.state.setIndices({activeIndex:null,selectedIndex:null,type:v.state.keyboardActiveRef.current?"keyboard":"pointer"})),Y&&v.state.activeIndex!==null&&!Ge&&v.state.setIndices({activeIndex:null,selectedIndex:null,type:v.state.keyboardActiveRef.current?"keyboard":"pointer"});return}v.state.setInputValue(I.currentTarget.value,de(In,I.nativeEvent));const K=I.currentTarget.value==="",D=de(Yt,I.nativeEvent);K&&!v.state.inputInsidePopup&&(W==="single"&&v.state.setSelectedValue(null,D),v.state.openOnInputClick||v.state.setOpen(!1,D));const Q=I.currentTarget.value.trim();!E&&!ye&&Q&&M&&(v.state.setOpen(!0,de(In,I.nativeEvent)),we||v.state.setIndices({activeIndex:null,selectedIndex:null,type:v.state.keyboardActiveRef.current?"keyboard":"pointer"})),Y&&v.state.activeIndex!==null&&!we&&v.state.setIndices({activeIndex:null,selectedIndex:null,type:v.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(I){if(ye||E||I.ctrlKey||I.shiftKey||I.altKey||I.metaKey)return;v.state.keyboardActiveRef.current=!0;const G=I.currentTarget,U=G.scrollWidth-G.clientWidth,M=R==="rtl";if(I.key==="Home"){Te(I);const Q=ua&&M?G.value.length:0;G.setSelectionRange(Q,Q),G.scrollLeft=0;return}if(I.key==="End"){Te(I);const Q=ua&&M?0:G.value.length;G.setSelectionRange(Q,Q),G.scrollLeft=M?-U:U;return}if(!$&&I.key==="Escape"){const Q=W==="multiple"&&Array.isArray(N)?N.length===0:N===null,ie=de(nl,I.nativeEvent),be=W==="multiple"?[]:null;v.state.setInputValue("",ie),v.state.setSelectedValue(be,ie),!Q&&!v.state.inline&&!ie.isPropagationAllowed&&I.stopPropagation();return}if(g&&I.key==="Backspace"&&G.value===""&&g.highlightedChipIndex===void 0&&Array.isArray(N)&&N.length>0){const Q=N.slice(0,-1);v.state.setIndices({activeIndex:null,selectedIndex:null,type:v.state.keyboardActiveRef.current?"keyboard":"pointer"}),v.state.setSelectedValue(Q,de(ht,I.nativeEvent));return}const K=g?.highlightedChipIndex!==void 0,D=F(I);if(g?.setHighlightedChipIndex(D),D!==void 0?g?.chipsRef.current[D]?.focus():K&&v.state.inputRef.current?.focus(),I.which!==229&&I.key==="Enter"&&Y){const Q=v.state.activeIndex,ie=I.nativeEvent;if(Q===null){v.state.setOpen(!1,de(ht,ie));return}Te(I);const be=v.state.listRef.current[Q];be&&(v.state.selectionEventRef.current=ie,be.click(),v.state.selectionEventRef.current=null)}},onPointerMove(){v.state.keyboardActiveRef.current=!1},onPointerDown(){v.state.keyboardActiveRef.current=!1}},p?p.getValidationProps(a):a],stateAttributesMapping:du})});process.env.NODE_ENV!=="production"&&(wi.displayName="ComboboxInput");const mx={...ol,...Yy},mu=c.forwardRef(function(t,n){const{render:r,className:o,disabled:s=!1,nativeButton:i=!0,keepMounted:a=!1,...l}=t,{disabled:u}=rr(),d=mt(),f=_(d,L.selectionMode),h=_(d,L.disabled),p=_(d,L.readOnly),b=_(d,L.open),g=_(d,L.selectedValue),m=_(d,L.hasSelectionChips),y=hi();let v=!1;f==="none"?v=y!=="":f==="single"?v=g!=null:v=m;const C=u||h||s,{buttonRef:w,getButtonProps:R}=uo({native:i,disabled:C}),{mounted:k,transitionStatus:S,setMounted:E}=sl(v),V={disabled:C,open:b,transitionStatus:S};oi({open:v,ref:d.state.clearRef,onComplete(){v||E(!1)}});const W=tt("button",t,{state:V,ref:[n,w,d.state.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(P){P.preventDefault()},onClick(P){if(C||p)return;const q=d.state.keyboardActiveRef;d.state.setInputValue("",de(sa,P.nativeEvent)),f!=="none"?(d.state.setSelectedValue(Array.isArray(g)?[]:null,de(sa,P.nativeEvent)),d.state.setIndices({activeIndex:null,selectedIndex:null,type:q.current?"keyboard":"pointer"})):d.state.setIndices({activeIndex:null,type:q.current?"keyboard":"pointer"}),d.state.inputRef.current?.focus()}},l,R],stateAttributesMapping:mx});return a||k?W:null});process.env.NODE_ENV!=="production"&&(mu.displayName="ComboboxClear");const Ci=c.createContext(null);process.env.NODE_ENV!=="production"&&(Ci.displayName="GroupCollectionContext");function hx(){return c.useContext(Ci)}function gx(e){const{children:t,items:n}=e,r=c.useMemo(()=>({items:n}),[n]);return x.jsx(Ci.Provider,{value:r,children:t})}function hu(e){const{children:t}=e,{filteredItems:n}=cn(),r=hx(),o=r?r.items:n;return o?x.jsx(c.Fragment,{children:o.map(t)}):null}const gu=c.forwardRef(function(t,n){var r;const{render:o,className:s,children:i,...a}=t,l=mt(),u=vo(),d=!!xi(!0),{filteredItems:f}=cn(),h=_(l,L.items),p=_(l,L.labelsRef),b=_(l,L.listRef),g=_(l,L.selectionMode),m=_(l,L.grid),y=_(l,L.popupProps),v=_(l,L.disabled),C=_(l,L.readOnly),w=_(l,L.virtualized),R=g==="multiple",k=f.length===0,S=re(q=>{l.set("positionerElement",q)}),E=re(q=>{l.set("listElement",q)}),V=c.useMemo(()=>typeof i=="function"?r||(r=x.jsx(hu,{children:i})):i,[i]),W={empty:k},H=u.useState("floatingId"),P=tt("div",t,{state:W,ref:[n,E,d?null:S],props:[y,{children:V,tabIndex:-1,id:H,role:m?"grid":"listbox","aria-multiselectable":R?"true":void 0,onKeyDown(q){if(!(v||C)&&q.key==="Enter"){const Y=l.state.activeIndex;if(Y==null)return;Te(q);const $=q.nativeEvent,N=l.state.listRef.current[Y];N&&(l.state.selectionEventRef.current=$,N.click(),l.state.selectionEventRef.current=null)}},onKeyDownCapture(){l.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){l.state.keyboardActiveRef.current=!1}},a]});return w?P:x.jsx(qc,{elementsRef:b,labelsRef:h?void 0:p,children:P})});process.env.NODE_ENV!=="production"&&(gu.displayName="ComboboxList");const Ei=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ei.displayName="ComboboxPortalContext");function bx(){const e=c.useContext(Ei);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Portal> is missing.":St(20));return e}const bu=c.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,s=mt(),i=_(s,L.mounted),a=_(s,L.forceMounted);return i||r||a?x.jsx(Ei.Provider,{value:r,children:x.jsx(_l,{ref:n,...o})}):null});process.env.NODE_ENV!=="production"&&(bu.displayName="ComboboxPortal");const vx=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:d=0,offsetParent:f="real"}=Tt(e,t)||{};if(u==null)return{};const h=ri(d),p={x:n,y:r},b=po(o),g=fo(b),m=await i.getDimensions(u),y=b==="y",v=y?"top":"left",C=y?"bottom":"right",w=y?"clientHeight":"clientWidth",R=s.reference[g]+s.reference[b]-p[b]-s.floating[g],k=p[b]-s.reference[b],S=f==="real"?await i.getOffsetParent?.(u):a.floating;let E=a.floating[w]||s.floating[g];(!E||!await i.isElement?.(S))&&(E=a.floating[w]||s.floating[g]);const V=R/2-k/2,W=E/2-m[g]/2-1,H=Math.min(h[v],W),P=Math.min(h[C],W),q=H,Y=E-m[g]-P,$=E/2-m[g]/2+V,N=Br(q,$,Y),B=!l.arrow&&zt(o)!=null&&$!==N&&s.reference[g]/2-($<q?H:P)-m[g]/2<0,j=B?$<q?$-q:$-Y:0;return{[b]:p[b]+j,data:{[b]:N,centerOffset:$-N-j,...B&&{alignmentOffset:j}},reset:B}}}),yx=(e,t)=>({...vx(e),options:[e,t]}),xx={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,s=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:(await Xl().fn(e)).data?.referenceHidden||s}}}},wx={sideX:"left",sideY:"top"};function vu(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function Wa(e,t,n){const{rects:r,placement:o}=e;return{side:vu(t,ft(o),n),align:zt(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Cx(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,collisionBoundary:a,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,keepMounted:h=!1,floatingRootContext:p,mounted:b,collisionAvoidance:g,shiftCrossAxis:m=!1,nodeId:y,adaptiveOrigin:v,lazyFlip:C=!1,externalTree:w}=e,[R,k]=c.useState(null);!b&&R!==null&&k(null);const S=g.side||"flip",E=g.align||"flip",V=g.fallbackAxisSide||"end",W=typeof t=="function"?t:void 0,H=re(W),P=W?H:t,q=gt(t),$=Xc()==="rtl",N=R||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":$?"left":"right","inline-start":$?"right":"left"}[r],B=s==="center"?N:`${N}-${s}`;let j=l;const te=1,T=r==="bottom"?te:0,we=r==="top"?te:0,fe=r==="right"?te:0,ye=r==="left"?te:0;typeof j=="number"?j={top:j+T,right:j+ye,bottom:j+we,left:j+fe}:j&&(j={top:(j.top||0)+T,right:(j.right||0)+ye,bottom:(j.bottom||0)+we,left:(j.left||0)+fe});const ae={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:j},ce=c.useRef(null),ge=gt(o),Ce=gt(i),pe=[Wl(Pe=>{const Ie=Wa(Pe,r,$),le=typeof ge.current=="function"?ge.current(Ie):ge.current,st=typeof Ce.current=="function"?Ce.current(Ie):Ce.current;return{mainAxis:le,crossAxis:st,alignmentAxis:st}},[typeof o!="function"?o:0,typeof i!="function"?i:0,$,r])],xe=E==="none"&&S!=="shift",O=!xe&&(u||m||S==="shift"),A=S==="none"?null:ql({...ae,padding:{top:j.top+te,right:j.right+te,bottom:j.bottom+te,left:j.left+te},mainAxis:!m&&S==="flip",crossAxis:E==="flip"?"alignment":!1,fallbackAxisSideDirection:V}),F=xe?null:Ul(Pe=>{const Ie=$e(Pe.elements.floating).documentElement;return{...ae,rootBoundary:m?{x:0,y:0,width:Ie.clientWidth,height:Ie.clientHeight}:void 0,mainAxis:E!=="none",crossAxis:O,limiter:u||m?void 0:Kl(le=>{if(!ce.current)return{};const{width:st,height:it}=ce.current.getBoundingClientRect(),ln=bt(ft(le.placement)),We=ln==="y"?st:it,jn=ln==="y"?j.left+j.right:j.top+j.bottom;return{offset:We/2+jn/2}})}},[ae,u,m,j,E]);S==="shift"||E==="shift"||s==="center"?pe.push(F,A):pe.push(A,F),pe.push(Yl({...ae,apply({elements:{floating:Pe},rects:{reference:Ie},availableWidth:le,availableHeight:st}){const it=Pe.style;it.setProperty("--available-width",`${le}px`),it.setProperty("--available-height",`${st}px`),it.setProperty("--anchor-width",`${Ie.width}px`),it.setProperty("--anchor-height",`${Ie.height}px`)}}),yx(()=>({element:ce.current||document.createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(Pe){const{elements:Ie,middlewareData:le,placement:st,rects:it,y:ln}=Pe,We=ft(st),jn=bt(We),De=ce.current,Po=le.arrow?.x||0,xt=le.arrow?.y||0,Ze=De?.clientWidth||0,Vn=De?.clientHeight||0,En=Po+Ze/2,Bt=xt+Vn/2,ir=Math.abs(le.shift?.y||0),Gt=it.reference.height/2,wt=typeof o=="function"?o(Wa(Pe,r,$)):o,ut=ir>wt,ve={top:`${En}px calc(100% + ${wt}px)`,bottom:`${En}px ${-wt}px`,left:`calc(100% + ${wt}px) ${Bt}px`,right:`${-wt}px ${Bt}px`}[We],Ht=`${En}px ${it.reference.y+Gt-ln}px`;return Ie.floating.style.setProperty("--transform-origin",O&&jn==="y"&&ut?Ht:ve),{}}},xx,v),oe(()=>{!b&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[b,p]);const ue=c.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:I,elements:G,x:U,y:M,middlewareData:K,update:D,placement:Q,context:ie,isPositioned:be,floatingStyles:Ge}=Dy({rootContext:p,placement:B,middleware:pe,strategy:n,whileElementsMounted:h?void 0:(...Pe)=>Ns(...Pe,ue),nodeId:y,externalTree:w}),{sideX:nt,sideY:_e}=K.adaptiveOrigin||wx,ke=be?n:"fixed",Ve=c.useMemo(()=>{const Pe=v?{position:ke,[nt]:U,[_e]:M}:{position:ke,...Ge};return be||(Pe.opacity=0),Pe},[v,ke,nt,U,_e,M,Ge,be]),rt=c.useRef(null);oe(()=>{if(!b)return;const Pe=q.current,Ie=typeof Pe=="function"?Pe():Pe,st=(Ua(Ie)?Ie.current:Ie)||null||null;st!==rt.current&&(I.setPositionReference(st),rt.current=st)},[b,I,P,q]),c.useEffect(()=>{if(!b)return;const Pe=q.current;typeof Pe!="function"&&Ua(Pe)&&Pe.current!==rt.current&&(I.setPositionReference(Pe.current),rt.current=Pe.current)},[b,I,P,q]),c.useEffect(()=>{if(h&&b&&G.domReference&&G.floating)return Ns(G.domReference,G.floating,D,ue)},[h,b,G,D,ue]);const Je=ft(Q),lt=vu(r,Je,$),Xe=zt(Q)||"center",ot=!!K.hide?.referenceHidden;oe(()=>{C&&b&&be&&k(Je)},[C,b,be,Je]);const _t=c.useMemo(()=>({position:"absolute",top:K.arrow?.y,left:K.arrow?.x}),[K.arrow]),yt=K.arrow?.centerOffset!==0;return c.useMemo(()=>({positionerStyles:Ve,arrowStyles:_t,arrowRef:ce,arrowUncentered:yt,side:lt,align:Xe,physicalSide:Je,anchorHidden:ot,refs:I,context:ie,isPositioned:be,update:D}),[Ve,_t,ce,yt,lt,Xe,Je,ot,I,ie,be,D])}function Ua(e){return e!=null&&"current"in e}function yu(e){return e==="starting"?zg:et}const xu=c.forwardRef(function(t,n){const{render:r,className:o,anchor:s,positionMethod:i="absolute",side:a="bottom",align:l="center",sideOffset:u=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:h=5,arrowPadding:p=5,sticky:b=!1,disableAnchorTracking:g=!1,collisionAvoidance:m=Gg,...y}=t,v=mt(),{filteredItems:C}=cn(),w=vo(),R=bx(),k=_(v,L.modal),S=_(v,L.open),E=_(v,L.mounted),V=_(v,L.openMethod),W=_(v,L.triggerElement),H=_(v,L.inputElement),P=_(v,L.inputInsidePopup),q=_(v,L.transitionStatus),Y=C.length===0,N=Cx({anchor:s??(P?W:H),floatingRootContext:w,positionMethod:i,mounted:E,side:a,sideOffset:u,align:l,alignOffset:d,arrowPadding:p,collisionBoundary:f,collisionPadding:h,sticky:b,disableAnchorTracking:g,keepMounted:R,collisionAvoidance:m,lazyFlip:!0});tv(S&&k&&V!=="touch",W);const B=c.useMemo(()=>{const fe={...N.positionerStyles};return S||(fe.pointerEvents="none"),{role:"presentation",hidden:!E,style:fe}},[S,E,N.positionerStyles]),j={open:S,side:N.side,align:N.align,anchorHidden:N.anchorHidden,empty:Y};oe(()=>{v.set("popupSide",N.side)},[v,N.side]);const te=c.useMemo(()=>({side:N.side,align:N.align,arrowRef:N.arrowRef,arrowUncentered:N.arrowUncentered,arrowStyles:N.arrowStyles,anchorHidden:N.anchorHidden,isPositioned:N.isPositioned}),[N.side,N.align,N.arrowRef,N.arrowUncentered,N.arrowStyles,N.anchorHidden,N.isPositioned]),T=re(fe=>{v.set("positionerElement",fe)}),we=tt("div",t,{state:j,ref:[n,T],props:[B,yu(q),y],stateAttributesMapping:tu});return x.jsxs(yi.Provider,{value:te,children:[E&&k&&x.jsx(nu,{inert:Zy(!S),cutout:H??W}),we]})});process.env.NODE_ENV!=="production"&&(xu.displayName="ComboboxPositioner");const Ex={...tu,...ol},wu=c.forwardRef(function(t,n){const{render:r,className:o,initialFocus:s,finalFocus:i,...a}=t,l=mt(),u=xi(),d=vo(),{filteredItems:f}=cn(),h=_(l,L.mounted),p=_(l,L.open),b=_(l,L.openMethod),g=_(l,L.transitionStatus),m=_(l,L.inputInsidePopup),y=_(l,L.inputElement),v=f.length===0;oi({open:p,ref:l.state.popupRef,onComplete(){p&&l.state.onOpenChangeComplete(!0)}});const C={open:p,side:u.side,align:u.align,anchorHidden:u.anchorHidden,transitionStatus:g,empty:v},w=tt("div",t,{state:C,ref:[n,l.state.popupRef],props:[{role:m?"dialog":"presentation",tabIndex:-1,onFocus(E){const V=ct(E.nativeEvent);b!=="touch"&&(Ee(l.state.listElement,V)||V===E.currentTarget)&&l.state.inputRef.current?.focus()}},yu(g),a],stateAttributesMapping:Ex}),k=s===void 0?m?E=>E==="touch"?l.state.popupRef.current:y:!1:s;let S;return i!=null?S=i:S=m?void 0:!1,x.jsx(mv,{context:d,disabled:!h,modal:!m,openInteractionType:b,initialFocus:k,returnFocus:S,children:w})});process.env.NODE_ENV!=="production"&&(wu.displayName="ComboboxPopup");const Ri=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ri.displayName="ComboboxGroupContext");function Rx(){const e=c.useContext(Ri);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxGroupContext is missing. ComboboxGroup parts must be placed within <Combobox.Group>.":St(18));return e}const Cu=c.forwardRef(function(t,n){const{render:r,className:o,items:s,...i}=t,[a,l]=c.useState(),u=c.useMemo(()=>({labelId:a,setLabelId:l,items:s}),[a,l,s]),d=tt("div",t,{ref:n,props:[{role:"group","aria-labelledby":a},i]}),f=x.jsx(Ri.Provider,{value:u,children:d});return s?x.jsx(gx,{items:s,children:f}):f});process.env.NODE_ENV!=="production"&&(Cu.displayName="ComboboxGroup");const Eu=c.forwardRef(function(t,n){const{render:r,className:o,id:s,...i}=t,{setLabelId:a}=Rx(),l=Ys(s);return oe(()=>(a(l),()=>{a(void 0)}),[l,a]),tt("div",t,{ref:n,props:[{id:l},i]})});process.env.NODE_ENV!=="production"&&(Eu.displayName="ComboboxGroupLabel");const Ru=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ru.displayName="ComboboxItemContext");const Su=c.createContext(!1);process.env.NODE_ENV!=="production"&&(Su.displayName="ComboboxRowContext");function Sx(){return c.useContext(Su)}const ku=c.memo(c.forwardRef(function(t,n){const{render:r,className:o,value:s=null,index:i,disabled:a=!1,nativeButton:l=!1,...u}=t,d=c.useRef(!1),f=c.useRef(null),h=al({index:i,textRef:f,indexGuessBehavior:il.GuessFromOrder}),p=mt(),b=Sx(),{flatFilteredItems:g,hasItems:m}=cn(),y=_(p,L.open),v=_(p,L.selectionMode),C=_(p,L.readOnly),w=_(p,L.virtualized),R=_(p,L.isItemEqualToValue),k=v!=="none",S=i??(w?Qr(g,s,R):h.index),E=h.index!==-1,V=_(p,L.id),W=_(p,L.isActive,S),H=_(p,L.isSelected,s),P=_(p,L.getItemProps),q=c.useRef(null),Y=V!=null&&E?`${V}-${S}`:void 0,$=H&&k;oe(()=>{if(!(E&&(w||i!=null)))return;const ce=p.state.listRef.current;return ce[S]=q.current,()=>{delete ce[S]}},[E,w,S,i,p]),oe(()=>{if(!E||m)return;const ae=p.state.valuesRef.current;return ae[S]=s,v!=="none"&&p.state.allValuesRef.current.push(s),()=>{delete ae[S]}},[E,m,S,s,p,v]),oe(()=>{if(!y){d.current=!1;return}if(!E||m)return;const ae=p.state.selectedValue,ce=Array.isArray(ae)?ae[ae.length-1]:ae;bn(s,ce,R)&&p.set("selectedIndex",S)},[E,m,y,p,S,s,R]);const N={disabled:a,selected:$,highlighted:W},B=P({active:W,selected:$});B.id=void 0,B.onFocus=void 0;const{getButtonProps:j,buttonRef:te}=uo({disabled:a,focusableWhenDisabled:!0,native:l});function T(ae){function ce(){p.state.handleSelection(ae,s)}p.state.submitOnItemClick?(rn.flushSync(ce),p.state.requestSubmit()):ce()}const we={id:Y,role:b?"gridcell":"option","aria-selected":k?$:void 0,tabIndex:void 0,onPointerDownCapture(ae){d.current=!0,ae.preventDefault()},onClick(ae){a||C||T(ae.nativeEvent)},onMouseUp(ae){const ce=d.current;d.current=!1,!(a||C||ae.button!==0||ce||!W)&&T(ae.nativeEvent)}},fe=tt("div",t,{ref:[te,n,h.ref,q],state:N,props:[B,we,u,j]}),ye=c.useMemo(()=>({selected:$,textRef:f}),[$,f]);return x.jsx(Ru.Provider,{value:ye,children:fe})}));process.env.NODE_ENV!=="production"&&(ku.displayName="ComboboxItem");const Iu=c.forwardRef(function(t,n){const{render:r,className:o,children:s,...i}=t,{filteredItems:a}=cn(),l=mt(),u=a.length===0?s:null;return tt("div",t,{ref:[n,l.state.emptyRef],props:[{children:u,role:"status","aria-live":"polite","aria-atomic":!0},i]})});process.env.NODE_ENV!=="production"&&(Iu.displayName="ComboboxEmpty");const Nu=c.forwardRef(function(t,n){const{className:r,render:o,orientation:s="horizontal",...i}=t;return tt("div",t,{state:{orientation:s},ref:n,props:[{role:"separator","aria-orientation":s},i]})});process.env.NODE_ENV!=="production"&&(Nu.displayName="Separator");function kx(e){const{multiple:t=!1,defaultValue:n,value:r,onValueChange:o,autoComplete:s,...i}=e;return x.jsx(fx,{...i,selectionMode:t?"multiple":"single",selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:o,formAutoComplete:s})}function Ix(e){const{children:t,placeholder:n}=e,r=mt(),o=_(r,L.itemToStringLabel),s=_(r,L.selectedValue),i=_(r,L.items),a=_(r,L.selectionMode)==="multiple",l=_(r,L.hasSelectedValue),u=!l&&n!=null&&t==null,d=_(r,L.hasNullItemLabel,u);let f=null;return typeof t=="function"?f=t(s):t!=null?f=t:!l&&n!=null&&!d?f=n:a&&Array.isArray(s)?f=rx(s,i,o):f=ru(s,i,o),x.jsx(c.Fragment,{children:f})}const Ou=c.forwardRef(function(t,n){const{render:r,className:o,...s}=t,i=mt(),a=_(i,L.open),l=_(i,L.hasSelectionChips),[u,d]=c.useState(void 0);a&&u!==void 0&&d(void 0);const f=c.useRef([]),h=tt("div",t,{ref:[n,i.state.chipsContainerRef],props:[l?{role:"toolbar"}:et,s]}),p=c.useMemo(()=>({highlightedChipIndex:u,setHighlightedChipIndex:d,chipsRef:f}),[u,d,f]);return x.jsx(vi.Provider,{value:p,children:x.jsx(qc,{elementsRef:f,children:h})})});process.env.NODE_ENV!=="production"&&(Ou.displayName="ComboboxChips");const Si=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(Si.displayName="ComboboxChipContext");function Nx(){const e=c.useContext(Si);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"useComboboxChipContext must be used within a ComboboxChip":St(17));return e}const Pu=c.forwardRef(function(t,n){const{render:r,className:o,...s}=t,i=mt(),{setHighlightedChipIndex:a,chipsRef:l}=pu(),u=_(i,L.disabled),d=_(i,L.readOnly),f=_(i,L.selectedValue),{ref:h,index:p}=al();function b(v){let C=p;if(v.key==="ArrowLeft")v.preventDefault(),p>0?C=p-1:C=void 0;else if(v.key==="ArrowRight")v.preventDefault(),p<f.length-1?C=p+1:C=void 0;else if(v.key==="Backspace"||v.key==="Delete"){const w=p>=f.length-1?f.length-2:p;C=w>=0?w:void 0,Te(v),i.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),i.state.setSelectedValue(f.filter((R,k)=>k!==p),de(ht,v.nativeEvent))}else v.key==="Enter"||v.key===" "?(Te(v),C=void 0):v.key==="ArrowDown"||v.key==="ArrowUp"?(Te(v),i.state.setOpen(!0,de(Un,v.nativeEvent)),C=void 0):v.key.length===1&&!v.ctrlKey&&!v.metaKey&&!v.altKey&&(C=void 0);return C}const m=tt("div",t,{ref:[n,h],state:{disabled:u},props:[{tabIndex:-1,"aria-disabled":u||void 0,"aria-readonly":d||void 0,onKeyDown(v){if(u||d)return;const C=b(v);rn.flushSync(()=>{a(C)}),C===void 0?i.state.inputRef.current?.focus():l.current[C]?.focus()},onMouseDown(v){d||(v.preventDefault(),!u&&i.state.inputRef.current?.focus())}},s]}),y=c.useMemo(()=>({index:p}),[p]);return x.jsx(Si.Provider,{value:y,children:m})});process.env.NODE_ENV!=="production"&&(Pu.displayName="ComboboxChip");const Tu=c.forwardRef(function(t,n){const{render:r,className:o,disabled:s=!1,nativeButton:i=!0,...a}=t,l=mt(),{index:u}=Nx(),d=_(l,L.disabled),f=_(l,L.readOnly),h=_(l,L.selectedValue),p=_(l,L.isItemEqualToValue),b=d||s,{buttonRef:g,getButtonProps:m}=uo({native:i,disabled:b||f,focusableWhenDisabled:!0}),y={disabled:b};function v(R){const k=l.state.activeIndex;if(k==null)return;const S=Qr(l.state.valuesRef.current,R,p);S!==-1&&k===S&&l.state.setIndices({activeIndex:null,type:l.state.keyboardActiveRef.current?"keyboard":"pointer"})}function C(R){const k=de(Zg,R.nativeEvent),S=h[u];return v(S),l.state.setSelectedValue(h.filter((E,V)=>V!==u),k),l.state.inputRef.current?.focus(),k}return tt("button",t,{ref:[n,g],state:y,props:[{tabIndex:-1,onClick(R){if(b||f)return;C(R).isPropagationAllowed||R.stopPropagation()},onKeyDown(R){b||f||(R.key==="Enter"||R.key===" ")&&(C(R).isPropagationAllowed||Te(R))}},a,m]})});process.env.NODE_ENV!=="production"&&(Tu.displayName="ComboboxChipRemove");var Ox=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],yo=Ox.reduce((e,t)=>{const n=Nc(`Primitive.${t}`),r=c.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Px="Label",Au=c.forwardRef((e,t)=>x.jsx(yo.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Au.displayName=Px;var Mu=Au;const Tx=je(qe("body-sm-regular")),ki=({className:e,ref:t,...n})=>x.jsx(Mu,{ref:t,className:z(Tx(),e),...n});ki.displayName=Mu.displayName;var Ax="Separator",Ka="horizontal",Mx=["horizontal","vertical"],_u=c.forwardRef((e,t)=>{const{decorative:n,orientation:r=Ka,...o}=e,s=_x(r)?r:Ka,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return x.jsx(yo.div,{"data-orientation":s,...a,...o,ref:t})});_u.displayName=Ax;function _x(e){return Mx.includes(e)}var Du=_u;const Ii=({className:e,orientation:t="horizontal",decorative:n=!0,ref:r,...o})=>x.jsx(Du,{ref:r,decorative:n,orientation:t,className:z("bg-delicate-border shrink-0",t==="horizontal"?"h-px w-full":"h-full w-px",e),...o});Ii.displayName=Du.displayName;const Dx=je("group/field data-[invalid=true]:text-error-text flex h-full w-full gap-2",{variants:{orientation:{vertical:["flex-col"],horizontal:["flex-row items-center","*:data-[slot=field-label]:flex-auto",`has-[>[data-slot=field-content]]:items-start
|
|
36
|
-
has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`]}},defaultVariants:{orientation:"vertical"}}),
|
|
35
|
+
)`}return x.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})});process.env.NODE_ENV!=="production"&&(cu.displayName="InternalBackdrop");function ox(e){const t=c.useRef(!0);t.current&&(t.current=!1,e())}const mi=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(mi.displayName="ComboboxRootContext");const hi=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(hi.displayName="ComboboxFloatingContext");const gi=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(gi.displayName="ComboboxDerivedItemsContext");const bi=c.createContext("");process.env.NODE_ENV!=="production"&&(bi.displayName="ComboboxInputValueContext");function mt(){const e=c.useContext(mi);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.":St(22));return e}function wo(){const e=c.useContext(hi);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.":St(23));return e}function cn(){const e=c.useContext(gi);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.":St(24));return e}function vi(){return c.useContext(bi)}const sx=(e,t)=>Object.is(e,t);function bn(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function ix(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:bn(t,r,n))}function to(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:bn(r,t,n))}function ax(e,t,n){return e.filter(r=>!bn(t,r,n))}function Ms(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function yi(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function cx(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(yi(e)){for(const t of e)for(const n of t.items)if(n&&n.value==null&&n.label!=null)return!0;return!1}for(const t of e)if(t&&t.value==null&&t.label!=null)return!0;return!1}function at(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return Ms(e)}function Hn(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Ms(e.value):Ms(e)}function lu(e,t,n){function r(){return at(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){const o=yi(t)?t.flatMap(s=>s.items):t;if(e==null||typeof e!="object"){const s=o.find(i=>i.value===e);return s&&s.label!=null?s.label:r()}if("value"in e){const s=o.find(i=>i&&i.value===e.value);if(s&&s.label!=null)return s.label}}return r()}function lx(e,t,n){return e.reduce((r,o,s)=>(s>0&&r.push(", "),r.push(x.jsx(c.Fragment,{children:lu(o,t,n)},s)),r),[])}const L={id:ne(e=>e.id),query:ne(e=>e.query),items:ne(e=>e.items),selectedValue:ne(e=>e.selectedValue),hasSelectionChips:ne(e=>{const t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:ne(e=>{const{selectedValue:t,selectionMode:n}=e;return t==null?!1:n==="multiple"&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:ne((e,t)=>t?cx(e.items):!1),open:ne(e=>e.open),mounted:ne(e=>e.mounted),forceMounted:ne(e=>e.forceMounted),inline:ne(e=>e.inline),activeIndex:ne(e=>e.activeIndex),selectedIndex:ne(e=>e.selectedIndex),isActive:ne((e,t)=>e.activeIndex===t),isSelected:ne((e,t)=>{const n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(o=>bn(t,o,n)):bn(t,r,n)}),transitionStatus:ne(e=>e.transitionStatus),popupProps:ne(e=>e.popupProps),inputProps:ne(e=>e.inputProps),triggerProps:ne(e=>e.triggerProps),getItemProps:ne(e=>e.getItemProps),positionerElement:ne(e=>e.positionerElement),listElement:ne(e=>e.listElement),triggerElement:ne(e=>e.triggerElement),inputElement:ne(e=>e.inputElement),popupSide:ne(e=>e.popupSide),openMethod:ne(e=>e.openMethod),inputInsidePopup:ne(e=>e.inputInsidePopup),selectionMode:ne(e=>e.selectionMode),listRef:ne(e=>e.listRef),labelsRef:ne(e=>e.labelsRef),popupRef:ne(e=>e.popupRef),emptyRef:ne(e=>e.emptyRef),inputRef:ne(e=>e.inputRef),keyboardActiveRef:ne(e=>e.keyboardActiveRef),chipsContainerRef:ne(e=>e.chipsContainerRef),clearRef:ne(e=>e.clearRef),valuesRef:ne(e=>e.valuesRef),allValuesRef:ne(e=>e.allValuesRef),name:ne(e=>e.name),disabled:ne(e=>e.disabled),readOnly:ne(e=>e.readOnly),required:ne(e=>e.required),grid:ne(e=>e.grid),isGrouped:ne(e=>e.isGrouped),virtualized:ne(e=>e.virtualized),onOpenChangeComplete:ne(e=>e.onOpenChangeComplete),openOnInputClick:ne(e=>e.openOnInputClick),itemToStringLabel:ne(e=>e.itemToStringLabel),isItemEqualToValue:ne(e=>e.isItemEqualToValue),modal:ne(e=>e.modal),autoHighlight:ne(e=>e.autoHighlight),submitOnItemClick:ne(e=>e.submitOnItemClick)};let qa=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const ux={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},dx={valid(e){return e===null?null:e?{[qa.valid]:""}:{[qa.invalid]:""}}},uu=c.createContext({invalid:void 0,name:void 0,validityData:{state:ux,errors:[],error:"",value:"",initialValue:null},setValidityData:Me,disabled:void 0,touched:!1,setTouched:Me,dirty:!1,setDirty:Me,filled:!1,setFilled:Me,focused:!1,setFocused:Me,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=et)=>e,getInputValidationProps:(e=et)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(uu.displayName="FieldRootContext");function or(e=!0){const t=c.useContext(uu);if(t.setValidityData===Me&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":St(28));return t}function fx(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const du=c.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Me,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(du.displayName="FormContext");function fu(){return c.useContext(du)}function px(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:s,commit:i}=e,{formRef:a}=fu(),{invalid:l,markedDirtyRef:u,validityData:d,setValidityData:f}=or(),h=re(e.getValue);oe(()=>{if(!t)return;let p=n;p===void 0&&(p=h()),d.initialValue===null&&p!==null&&f(b=>({...b,initialValue:p}))},[t,f,n,d.initialValue,h]),oe(()=>{!t||!r||a.current.fields.set(r,{getValue:h,name:o,controlRef:s,validityData:fx(d,l),validate(p=!0){let b=n;b===void 0&&(b=h()),u.current=!0,p?rn.flushSync(()=>i(b)):i(b)}})},[i,s,t,a,h,r,l,u,o,d,n]),oe(()=>{const p=a.current.fields;return()=>{r&&p.delete(r)}},[a,r])}const pu=c.createContext({controlId:void 0,registerControlId:Me,labelId:void 0,setLabelId:Me,messageIds:[],setMessageIds:Me,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(pu.displayName="LabelableContext");function xi(){return c.useContext(pu)}function mu(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:s}=xi(),i=Qs(t),a=n?o:void 0,l=vt(()=>Symbol("labelable-control")),u=c.useRef(!1),d=c.useRef(t!=null),f=re(()=>{!u.current||s===Me||(u.current=!1,s(l.current,void 0))});return oe(()=>{if(s===Me)return;let h;if(n){const p=r?.current;Ae(p)&&p.closest("label")!=null?h=t??null:h=a??i}else if(t!=null)d.current=!0,h=t;else if(d.current)h=i;else{f();return}if(h===void 0){f();return}u.current=!0,s(l.current,h)},[t,r,a,s,n,i,l,f]),c.useEffect(()=>f,[f]),o??i}function mx(e,t){return(n,r)=>{if(n==null)return!1;const o=at(n,t);return e.contains(o,r)}}function hx(e,t,n){return(r,o)=>{if(r==null)return!1;if(!o)return!0;const s=at(r,t),i=n!=null?at(n,t):"";return i&&e.contains(i,o)&&i.length===o.length?!0:e.contains(s,o)}}const Ya=new Map;function hu(e){return Array.isArray(e)?e.map(t=>hu(t)).join(","):e==null?"":String(e)}function gx(e={}){const t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${hu(e.locale)}|${JSON.stringify(t)}`,r=Ya.get(n);if(r)return r;const o=new Intl.Collator(e.locale,t),s={contains(i,a,l){if(!a)return!0;const u=at(i,l);for(let d=0;d<=u.length-a.length;d+=1)if(o.compare(u.slice(d,d+a.length),a)===0)return!0;return!1},startsWith(i,a,l){if(!a)return!0;const u=at(i,l);return o.compare(u.slice(0,a.length),a)===0},endsWith(i,a,l){if(!a)return!0;const u=at(i,l),d=a.length;return u.length>=d&&o.compare(u.slice(u.length-d),a)===0}};return Ya.set(n,s),s}const bx=gx;function Pr(e,t){const n=c.useRef(e),r=re(t);oe(()=>{n.current!==e&&r(n.current)},[e,r]),oe(()=>{n.current=e},[e])}const gu=Symbol("none"),mn={value:gu,index:-1};function vx(e){const{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:o,onSelectedValueChange:s,defaultInputValue:i,inputValue:a,selectionMode:l="none",onItemHighlighted:u,name:d,disabled:f=!1,readOnly:h=!1,required:p=!1,inputRef:b,grid:g=!1,items:m,filteredItems:y,filter:v,openOnInputClick:C=!0,autoHighlight:w=!1,keepHighlight:R=!1,highlightItemOnHover:k=!0,loopFocus:S=!0,itemToStringLabel:E,itemToStringValue:V,isItemEqualToValue:W=sx,virtualized:H=!1,inline:P=!1,fillInputOnItemPress:q=!0,modal:Y=!1,limit:$=-1,autoComplete:N="list",formAutoComplete:B,locale:j,submitOnItemClick:te=!1}=e,{clearErrors:T}=fu(),{setDirty:we,validityData:fe,shouldValidateOnChange:ye,setFilled:ae,name:ce,disabled:ge,setTouched:Ce,setFocused:Se,validationMode:X,validation:pe}=or(),xe=mu({id:t}),O=bx({locale:j}),[A,F]=c.useState(!1),[ue,I]=c.useState(null),G=c.useRef([]),U=c.useRef([]),M=c.useRef(null),K=c.useRef(null),D=c.useRef(null),Q=c.useRef(!0),ie=c.useRef(!1),be=c.useRef(null),Ge=c.useRef(null),nt=c.useRef(null),_e=c.useRef(mn),ke=c.useRef(null),Ve=c.useRef([]),rt=c.useRef([]),Je=ge||f,lt=ce??d,Xe=l==="multiple",ot=l==="single",_t=a!==void 0||i!==void 0,yt=m!==void 0,Pe=y!==void 0;let Ie;w==="always"?Ie="always":Ie=w?"input-change":!1;const[le,st]=qo({controlled:o,default:Xe?r??yr:r,name:"Combobox",state:"selectedValue"}),it=c.useMemo(()=>v===null?()=>!0:v!==void 0?v:ot&&!A?hx(O,E,le):mx(O,E),[v,ot,le,A,O,E]),ln=vt(()=>_t?i??"":ot?at(le,E):"").current,[We,jn]=qo({controlled:a,default:ln,name:"Combobox",state:"inputValue"}),[De,Mo]=qo({controlled:e.open,default:e.defaultOpen,name:"Combobox",state:"open"}),xt=yi(m),Ze=ue??(We===""?"":String(We).trim()),Vn=ot?at(le,E):"",En=ot&&!A&&Ze!==""&&Vn!==""&&Vn.length===Ze.length&&O.contains(Vn,Ze),Bt=En?"":Ze,ar=yt&&Pe&&En,Gt=c.useMemo(()=>m?xt?m.flatMap(Z=>Z.items):m:yr,[m,xt]),wt=c.useMemo(()=>{if(y&&!ar)return y;if(!m)return yr;if(xt){const se=m,he=[];let Fe=0;for(const Ue of se){if($>-1&&Fe>=$)break;const Ke=Bt===""?Ue.items:Ue.items.filter(pr=>it(pr,Bt,E));if(Ke.length===0)continue;const un=$>-1?$-Fe:1/0,dn=Ke.slice(0,un);if(dn.length>0){const pr={...Ue,items:dn};he.push(pr),Fe+=dn.length}}return he}if(Bt==="")return $>-1?Gt.slice(0,$):Gt;const Z=[];for(const se of Gt){if($>-1&&Z.length>=$)break;it(se,Bt,E)&&Z.push(se)}return Z},[y,ar,m,xt,Bt,$,it,E,Gt]),ut=c.useMemo(()=>xt?wt.flatMap(se=>se.items):wt,[wt,xt]),ve=vt(()=>new su({id:xe,selectedValue:le,open:De,filter:it,query:Ze,items:m,selectionMode:l,listRef:G,labelsRef:U,popupRef:M,emptyRef:D,inputRef:K,keyboardActiveRef:Q,chipsContainerRef:be,clearRef:Ge,valuesRef:Ve,allValuesRef:rt,selectionEventRef:nt,name:lt,disabled:Je,readOnly:h,required:p,grid:g,isGrouped:xt,virtualized:H,openOnInputClick:C,itemToStringLabel:E,isItemEqualToValue:W,modal:Y,autoHighlight:Ie,submitOnItemClick:te,hasInputValue:_t,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:P,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},positionerElement:null,listElement:null,triggerElement:null,inputElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,onOpenChangeComplete:n||Me,setOpen:Me,setInputValue:Me,setSelectedValue:Me,setIndices:Me,onItemHighlighted:Me,handleSelection:Me,getItemProps:()=>et,forceMount:Me,requestSubmit:Me})).current,Ht=l==="none"?We:le,Cp=c.useMemo(()=>l==="none"?Ht:Array.isArray(le)?le.map(Z=>Hn(Z,V)):Hn(le,V),[Ht,V,l,le]),_o=re(u),Do=re(n),cr=_(ve,L.activeIndex),Ep=_(ve,L.selectedIndex),lr=_(ve,L.positionerElement),Ki=_(ve,L.listElement),Fn=_(ve,L.triggerElement),Lo=_(ve,L.inputElement),Ct=_(ve,L.inline),Wt=_(ve,L.inputInsidePopup),Rp=gt(Fn),{mounted:qi,setMounted:Sp,transitionStatus:jo}=dl(De),{openMethod:Yi,triggerProps:Vo,reset:kp}=Yy(De);px({id:xe,name:lt,commit:pe.commit,value:Ht,controlRef:Wt?Rp:K,getValue:()=>Cp});const ur=re(()=>{m?U.current=ut.map(Z=>at(Z,E)):ve.set("forceMounted",!0)}),Ip=c.useRef(le);oe(()=>{le!==Ip.current&&ur()},[ur,le]);const Et=re(Z=>{ve.update(Z);const se=Z.type||"none";if(Z.activeIndex!==void 0)if(Z.activeIndex===null)_e.current!==mn&&(_e.current=mn,_o(void 0,Bn(se,void 0,{index:-1})));else{const he=Ve.current[Z.activeIndex];_e.current={value:he,index:Z.activeIndex},_o(he,Bn(se,void 0,{index:Z.activeIndex}))}}),It=re((Z,se)=>{if(ie.current=se.reason===Yt,e.onInputValueChange?.(Z,se),!se.isCanceled){if(se.reason===In){const he=se.event,Fe=he.inputType;if(he.type==="compositionend"||Fe!=null&&Fe!==""&&Fe!=="insertReplacementText"){const Ke=Z.trim()!=="";Ke&&F(!0),ke.current={hasQuery:Ke},Ke&&Ie&&ve.state.activeIndex==null&&ve.set("activeIndex",0)}}jn(Z)}}),$n=re((Z,se)=>{if(De!==Z&&(se.reason==="escape-key"&&yt&&ut.length===0&&!ve.state.emptyRef.current&&se.allowPropagation(),e.onOpenChange?.(Z,se),!se.isCanceled&&(!Z&&A&&(ot?(Ct||I(Ze),Ze===""&&F(!1)):Xe&&(Ct||Wt?Et({activeIndex:null}):I(Ze),It("",de(Yt,se.event)))),Mo(Z),!Z&&Wt&&(se.reason===co||se.reason===Xs)&&(Ce(!0),Se(!1),X==="onBlur")))){const he=l==="none"?We:le;pe.commit(he)}}),dr=re((Z,se)=>{if(s?.(Z,se),se.isCanceled)return;st(Z),(l==="none"&&M.current&&q||ot&&!ve.state.inputInsidePopup)&&It(at(Z,E),de(se.reason,se.event)),ot&&Z!=null&&se.reason!==In&&A&&!Ct&&I(Ze)}),Np=re((Z,se)=>{let he=se;if(he===void 0){if(cr===null)return;he=Ve.current[cr]}const Fe=ct(Z),Ue=nt.current??Z;nt.current=null;const Ke=de(nb,Ue),un=Fe?.closest("a")?.getAttribute("href");if(un){un.startsWith("#")&&$n(!1,Ke);return}if(Xe){const dn=Array.isArray(le)?le:[],$p=ix(dn,he,ve.state.isItemEqualToValue)?ax(dn,he,ve.state.isItemEqualToValue):[...dn,he];if(dr($p,Ke),!(K.current?K.current.value.trim()!=="":!1))return;ve.state.inputInsidePopup?It("",de(Yt,Ke.event)):$n(!1,Ke)}else dr(he,Ke),$n(!1,Ke)}),Fo=re(()=>{if(!ve.state.submitOnItemClick)return;const Z=ve.state.inputElement?.form;Z&&typeof Z.requestSubmit=="function"&&Z.requestSubmit()}),$o=re(()=>{if(Sp(!1),Do?.(!1),F(!1),kp(),I(null),Et(l==="none"?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Xe&&K.current&&K.current.value!==""&&!ie.current&&It("",de(Yt)),ot)if(ve.state.inputInsidePopup)K.current&&K.current.value!==""&&It("",de(Yt));else{const Z=at(le,E);K.current&&K.current.value!==Z&&It(Z,de(Z===""?Yt:ht))}}),Op=c.useMemo(()=>Ct&&lr?{current:lr.closest('[role="dialog"]')}:M,[Ct,lr]);ai({enabled:!e.actionsRef,open:De,ref:Op,onComplete(){De||$o()}}),c.useImperativeHandle(e.actionsRef,()=>({unmount:$o}),[$o]),oe(function(){if(De||l==="none")return;const se=m?Gt:rt.current;if(Xe){const he=Array.isArray(le)?le:[],Fe=he[he.length-1],Ue=to(se,Fe,W);Et({selectedIndex:Ue===-1?null:Ue})}else{const he=to(se,le,W);Et({selectedIndex:he===-1?null:he})}},[De,le,m,l,Gt,Xe,W,Et]),oe(()=>{m&&(Ve.current=ut,G.current.length=ut.length)},[m,ut]),oe(()=>{const Z=ke.current;if(Z&&(Z.hasQuery?Ie&&ve.set("activeIndex",0):Ie==="always"&&ve.set("activeIndex",0),ke.current=null),!De&&!Ct)return;const he=yt||Pe?ut:Ve.current,Fe=ve.state.activeIndex;if(Fe==null){if(Ie==="always"&&he.length>0){ve.set("activeIndex",0);return}_e.current!==mn&&(_e.current=mn,ve.state.onItemHighlighted(void 0,Bn(ht,void 0,{index:-1})));return}if(Fe>=he.length){_e.current!==mn&&(_e.current=mn,ve.state.onItemHighlighted(void 0,Bn(ht,void 0,{index:-1}))),ve.set("activeIndex",null);return}const Ue=he[Fe],Ke=_e.current.value,un=Ke!==gu&&bn(Ue,Ke,ve.state.isItemEqualToValue);(_e.current.index!==Fe||!un)&&(_e.current={value:Ue,index:Fe},ve.state.onItemHighlighted(Ue,Bn(ht,void 0,{index:Fe})))},[cr,Ie,Pe,yt,ut,Ct,De,ve]),oe(()=>{if(l==="none"){ae(String(We)!=="");return}ae(Xe?Array.isArray(le)&&le.length>0:le!=null)},[ae,l,We,le,Xe]),c.useEffect(()=>{yt&&Ie&&ut.length===0&&Et({activeIndex:null})},[yt,Ie,ut.length,Et]),Pr(Ze,()=>{!De||Ze===""||Ze===String(ln)||F(!0)}),Pr(le,()=>{if(l!=="none"&&(T(lt),we(le!==fe.initialValue),ye()?pe.commit(le):pe.commit(le,!0),ot&&!_t&&!Wt)){const Z=at(le,E);We!==Z&&It(Z,de(ht))}}),Pr(We,()=>{l==="none"&&(T(lt),we(We!==fe.initialValue),ye()?pe.commit(We):pe.commit(We,!0))}),Pr(m,()=>{if(!ot||_t||Wt||A)return;const Z=at(le,E);We!==Z&&It(Z,de(ht))});const fr=iu({open:Ct?!0:De,onOpenChange:$n,elements:{reference:Wt?Fn:Lo,floating:lr}});let zo,Bo;Ct||(zo=g?"grid":"listbox",Bo=De?"true":"false");const Pp=c.useMemo(()=>{const Z=Lo?.tagName==="INPUT",se=Z||De,he=Z?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return se&&(he.role="combobox",he["aria-expanded"]=Bo,he["aria-haspopup"]=zo,he["aria-controls"]=De?Ki?.id:void 0,he["aria-autocomplete"]=N),{reference:he,floating:{role:"presentation"}}},[Lo,De,Bo,zo,Ki?.id,N]),Tp=zl(fr,{enabled:!h&&!Je&&C,event:"mousedown-only",toggle:!1,touchOpenDelay:Wt?0:50,reason:ob}),Ap=iy(fr,{enabled:!h&&!Je&&!Ct,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:Ct?!0:void 0,outsidePress(Z){const se=ct(Z);return!Ee(Fn,se)&&!Ee(Ge.current,se)&&!Ee(be.current,se)}}),Mp=Uy(fr,{enabled:!h&&!Je,id:xe,listRef:G,activeIndex:cr,selectedIndex:Ep,virtual:!0,loopFocus:S,allowEscape:S&&!Ie,focusItemOnOpen:A||l==="none"&&!Ie?!1:"auto",focusItemOnHover:k,resetOnPointerLeave:!R,cols:g?2:1,orientation:g?"horizontal":void 0,disabledIndices:yr,onNavigate(Z,se){!se&&!De||jo==="ending"||Et(se?{activeIndex:Z,type:Q.current?"keyboard":"pointer"}:{activeIndex:Z})}}),{getReferenceProps:Go,getFloatingProps:Ho,getItemProps:Wo}=By([Pp,Tp,Ap,Mp]);ox(()=>{ve.update({inline:P,popupProps:Ho(),inputProps:Go(),triggerProps:Vo,getItemProps:Wo,setOpen:$n,setInputValue:It,setSelectedValue:dr,setIndices:Et,onItemHighlighted:_o,handleSelection:Np,forceMount:ur,requestSubmit:Fo})}),oe(()=>{ve.update({id:xe,selectedValue:le,open:De,mounted:qi,transitionStatus:jo,items:m,inline:P,popupProps:Ho(),inputProps:Go(),triggerProps:Vo,openMethod:Yi,getItemProps:Wo,selectionMode:l,name:lt,disabled:Je,readOnly:h,required:p,grid:g,isGrouped:xt,virtualized:H,onOpenChangeComplete:Do,openOnInputClick:C,itemToStringLabel:E,modal:Y,autoHighlight:Ie,isItemEqualToValue:W,submitOnItemClick:te,hasInputValue:_t,requestSubmit:Fo})},[ve,xe,le,De,qi,jo,m,Ho,Go,Wo,Yi,Vo,l,lt,Je,h,p,pe,g,xt,H,Do,C,E,Y,W,te,_t,P,Fo,Ie]);const _p=Qn(b,pe.inputRef),Dp=c.useMemo(()=>({query:Ze,hasItems:yt,filteredItems:wt,flatFilteredItems:ut}),[Ze,yt,wt,ut]),Lp=c.useMemo(()=>Array.isArray(Ht)?"":Hn(Ht,V),[Ht,V]),jp=Xe&&Array.isArray(le)&&le.length>0,Uo=Xe||l==="none"?void 0:lt,Vp=c.useMemo(()=>!Xe||!Array.isArray(le)||!lt?null:le.map(Z=>{const se=Hn(Z,V);return x.jsx("input",{type:"hidden",name:lt,value:se},se)}),[Xe,le,lt,V]),Fp=x.jsxs(c.Fragment,{children:[e.children,x.jsx("input",{...pe.getInputValidationProps({onFocus(){if(Wt){Fn?.focus();return}(K.current||Fn)?.focus()},onChange(Z){if(Z.nativeEvent.defaultPrevented)return;const se=Z.target.value,he=de(ht,Z.nativeEvent);function Fe(){if(Xe)return;if(l==="none"){we(se!==fe.initialValue),It(se,he),ye()&&pe.commit(se);return}const Ue=Ve.current.find(Ke=>Hn(Ke,V).toLowerCase()===se.toLowerCase());Ue!=null&&(we(Ue!==fe.initialValue),dr?.(Ue,he),ye()&&pe.commit(Ue))}m?Fe():(ur(),queueMicrotask(Fe))}}),id:xe&&Uo==null?`${xe}-hidden-input`:void 0,name:Uo,autoComplete:B,disabled:Je,required:p&&!jp,readOnly:h,value:Lp,ref:_p,style:Uo?uv:ci,tabIndex:-1,"aria-hidden":!0}),Vp]});return x.jsx(mi.Provider,{value:ve,children:x.jsx(hi.Provider,{value:fr,children:x.jsx(gi.Provider,{value:Dp,children:x.jsx(bi.Provider,{value:We,children:Fp})})})})}const bu={...nx,...dx,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null};function yx(e){const t=e.getBoundingClientRect();if(process.env.NODE_ENV!=="production")return t;const n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||r.content!=="none"))return t;const s=parseFloat(n.width)||0,i=parseFloat(n.height)||0,a=parseFloat(r.width)||0,l=parseFloat(r.height)||0,u=Math.max(t.width,s,a),d=Math.max(t.height,i,l),f=u-t.width,h=d-t.height;return{left:t.left-f/2,right:t.right+f/2,top:t.top-h/2,bottom:t.bottom+h/2}}const Tr=2,vu=c.forwardRef(function(t,n){const{render:r,className:o,nativeButton:s=!0,disabled:i=!1,id:a,...l}=t,{state:u,disabled:d,setTouched:f,setFocused:h,validationMode:p,validation:b}=or(),{labelId:g}=xi(),m=mt(),{filteredItems:y}=cn(),v=_(m,L.selectionMode),C=_(m,L.disabled),w=_(m,L.readOnly),R=_(m,L.required),k=_(m,L.mounted),S=_(m,L.popupSide),E=_(m,L.positionerElement),V=_(m,L.listElement),W=_(m,L.triggerProps),H=_(m,L.triggerElement),P=_(m,L.inputInsidePopup),q=_(m,L.id),Y=_(m,L.open),$=_(m,L.selectedValue),N=_(m,L.activeIndex),B=_(m,L.selectedIndex),j=_(m,L.hasSelectedValue),te=wo(),T=vi(),we=hn(),fe=d||C||i,ye=y.length===0,ae=k&&E?S:null;mu({id:P?a:void 0});const ce=P?a??q:a,ge=c.useRef("");function Ce(I){ge.current=I.pointerType}const Se=te.useState("domReferenceElement");c.useEffect(()=>{P&&H&&H!==Se&&te.set("domReferenceElement",H)},[H,Se,te,P]);const{reference:X}=Ky(te,{enabled:!Y&&!w&&!C&&v==="single",listRef:m.state.labelsRef,activeIndex:N,selectedIndex:B,onMatch(I){const G=m.state.valuesRef.current[I];G!==void 0&&m.state.setSelectedValue(G,de("none"))}}),{reference:pe}=zl(te,{enabled:!w&&!C,event:"mousedown"}),{buttonRef:xe,getButtonProps:O}=mo({native:s,disabled:fe}),A={...u,open:Y,disabled:fe,popupSide:ae,listEmpty:ye,placeholder:!j},F=re(I=>{m.set("triggerElement",I)});return tt("button",t,{ref:[n,xe,F],state:A,props:[W,pe,X,{id:ce,tabIndex:P?0:-1,role:P?"combobox":void 0,"aria-expanded":Y?"true":"false","aria-haspopup":P?"dialog":"listbox","aria-controls":Y?V?.id:void 0,"aria-required":P&&R||void 0,"aria-labelledby":g,onPointerDown:Ce,onPointerEnter:Ce,onFocus(){h(!0),!(fe||w)&&we.start(0,m.state.forceMount)},onBlur(I){if(!Ee(E,I.relatedTarget)&&(f(!0),h(!1),p==="onBlur")){const G=v==="none"?T:$;b.commit(G)}},onMouseDown(I){if(fe||w||(P||te.set("domReferenceElement",I.currentTarget),m.state.forceMount(),ge.current!=="touch"&&(m.state.inputRef.current?.focus(),P||I.preventDefault()),Y))return;const G=$e(I.currentTarget);function U(M){if(!H)return;const K=ct(M),D=m.state.positionerElement,Q=m.state.listElement;if(Ee(H,K)||Ee(D,K)||Ee(Q,K)||K===H)return;const ie=yx(H),be=M.clientX>=ie.left-Tr&&M.clientX<=ie.right+Tr,Ge=M.clientY>=ie.top-Tr&&M.clientY<=ie.bottom+Tr;be&&Ge||m.state.setOpen(!1,de("cancel-open",M))}P&&G.addEventListener("mouseup",U,{once:!0})},onKeyDown(I){fe||w||(I.key==="ArrowDown"||I.key==="ArrowUp")&&(Te(I),m.state.setOpen(!0,de(Kn,I.nativeEvent)),m.state.inputRef.current?.focus())}},b?b.getValidationProps(l):l,O],stateAttributesMapping:bu})});process.env.NODE_ENV!=="production"&&(vu.displayName="ComboboxTrigger");const wi=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(wi.displayName="ComboboxChipsContext");function yu(){return c.useContext(wi)}const Ci=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ci.displayName="ComboboxPositionerContext");function Ei(e){const t=c.useContext(Ci);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Popup> and <Combobox.Arrow> must be used within the <Combobox.Positioner> component":St(21));return t}const Ri=c.forwardRef(function(t,n){const{render:r,className:o,disabled:s=!1,id:i,...a}=t,{state:l,disabled:u,setTouched:d,setFocused:f,validationMode:h,validation:p}=or(),{labelId:b}=xi(),g=yu(),y=!!Ei(!0),v=mt(),{filteredItems:C}=cn(),w=vi(),R=nl(),k=_(v,L.required),S=_(v,L.disabled),E=_(v,L.readOnly),V=_(v,L.name),W=_(v,L.selectionMode),H=_(v,L.autoHighlight),P=_(v,L.inputProps),q=_(v,L.triggerProps),Y=_(v,L.open),$=_(v,L.mounted),N=_(v,L.selectedValue),B=_(v,L.popupSide),j=_(v,L.positionerElement),te=_(v,L.id),T=_(v,L.inline),we=!!H,fe=$&&j?B:null,ye=u||S||s,ae=C.length===0,ge=Qs(i??(y||T?void 0:te)),[Ce,Se]=c.useState(null),X=c.useRef(!1),pe=c.useRef(null),xe=c.useRef(!1),O=re(I=>{const G=y||v.state.inline;G&&!v.state.hasInputValue&&v.state.setInputValue("",de(ht)),v.update({inputElement:I,inputInsidePopup:G})}),A={...l,open:Y,disabled:ye,readOnly:E,popupSide:fe,listEmpty:ae};function F(I){if(!g)return;let G;const{highlightedChipIndex:U}=g;if(U!==void 0){if(I.key==="ArrowLeft")I.preventDefault(),U>0?G=U-1:G=void 0;else if(I.key==="ArrowRight")I.preventDefault(),U<N.length-1?G=U+1:G=void 0;else if(I.key==="Backspace"||I.key==="Delete"){I.preventDefault();const M=U>=N.length-1?N.length-2:U;G=M>=0?M:void 0,v.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return G}return I.key==="ArrowLeft"&&(I.currentTarget.selectionStart??0)===0&&N.length>0?(I.preventDefault(),G=Math.max(N.length-1,0)):I.key==="Backspace"&&I.currentTarget.value===""&&N.length>0&&(v.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),I.preventDefault()),G}return tt("input",t,{state:A,ref:[n,v.state.inputRef,O],props:[P,q,{type:"text",value:t.value??Ce??w,"aria-readonly":E||void 0,"aria-required":k||void 0,"aria-labelledby":b,disabled:ye,readOnly:E,required:W==="none"?k:void 0,...W==="none"&&V&&{name:V},id:ge,onFocus(){if(f(!0),!T||!xe.current)return;xe.current=!1;const I=pe.current;I==null||!Object.hasOwn(v.state.valuesRef.current,I)||v.state.setIndices({activeIndex:I})},onBlur(){d(!0),f(!1);const I=v.state.activeIndex;if(T&&I!==null&&H!=="always"&&(pe.current=I,xe.current=!0,v.state.setIndices({activeIndex:null})),h==="onBlur"){const G=W==="none"?w:N;p.commit(G)}},onCompositionStart(I){Gr||(X.current=!0,Se(I.currentTarget.value))},onCompositionEnd(I){X.current=!1;const G=I.currentTarget.value;Se(null),v.state.setInputValue(G,de(In,I.nativeEvent))},onChange(I){const G=I.nativeEvent.inputType,U=!G||G==="insertReplacementText",M=X.current||!U;if(X.current){const ie=I.currentTarget.value;Se(ie),ie===""&&!v.state.openOnInputClick&&!v.state.inputInsidePopup&&v.state.setOpen(!1,de(Yt,I.nativeEvent));const be=ie.trim(),Ge=we&&be!=="";!E&&!ye&&be&&M&&(v.state.setOpen(!0,de(In,I.nativeEvent)),we||v.state.setIndices({activeIndex:null,selectedIndex:null,type:v.state.keyboardActiveRef.current?"keyboard":"pointer"})),Y&&v.state.activeIndex!==null&&!Ge&&v.state.setIndices({activeIndex:null,selectedIndex:null,type:v.state.keyboardActiveRef.current?"keyboard":"pointer"});return}v.state.setInputValue(I.currentTarget.value,de(In,I.nativeEvent));const K=I.currentTarget.value==="",D=de(Yt,I.nativeEvent);K&&!v.state.inputInsidePopup&&(W==="single"&&v.state.setSelectedValue(null,D),v.state.openOnInputClick||v.state.setOpen(!1,D));const Q=I.currentTarget.value.trim();!E&&!ye&&Q&&M&&(v.state.setOpen(!0,de(In,I.nativeEvent)),we||v.state.setIndices({activeIndex:null,selectedIndex:null,type:v.state.keyboardActiveRef.current?"keyboard":"pointer"})),Y&&v.state.activeIndex!==null&&!we&&v.state.setIndices({activeIndex:null,selectedIndex:null,type:v.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(I){if(ye||E||I.ctrlKey||I.shiftKey||I.altKey||I.metaKey)return;v.state.keyboardActiveRef.current=!0;const G=I.currentTarget,U=G.scrollWidth-G.clientWidth,M=R==="rtl";if(I.key==="Home"){Te(I);const Q=ha&&M?G.value.length:0;G.setSelectionRange(Q,Q),G.scrollLeft=0;return}if(I.key==="End"){Te(I);const Q=ha&&M?0:G.value.length;G.setSelectionRange(Q,Q),G.scrollLeft=M?-U:U;return}if(!$&&I.key==="Escape"){const Q=W==="multiple"&&Array.isArray(N)?N.length===0:N===null,ie=de(cl,I.nativeEvent),be=W==="multiple"?[]:null;v.state.setInputValue("",ie),v.state.setSelectedValue(be,ie),!Q&&!v.state.inline&&!ie.isPropagationAllowed&&I.stopPropagation();return}if(g&&I.key==="Backspace"&&G.value===""&&g.highlightedChipIndex===void 0&&Array.isArray(N)&&N.length>0){const Q=N.slice(0,-1);v.state.setIndices({activeIndex:null,selectedIndex:null,type:v.state.keyboardActiveRef.current?"keyboard":"pointer"}),v.state.setSelectedValue(Q,de(ht,I.nativeEvent));return}const K=g?.highlightedChipIndex!==void 0,D=F(I);if(g?.setHighlightedChipIndex(D),D!==void 0?g?.chipsRef.current[D]?.focus():K&&v.state.inputRef.current?.focus(),I.which!==229&&I.key==="Enter"&&Y){const Q=v.state.activeIndex,ie=I.nativeEvent;if(Q===null){v.state.setOpen(!1,de(ht,ie));return}Te(I);const be=v.state.listRef.current[Q];be&&(v.state.selectionEventRef.current=ie,be.click(),v.state.selectionEventRef.current=null)}},onPointerMove(){v.state.keyboardActiveRef.current=!1},onPointerDown(){v.state.keyboardActiveRef.current=!1}},p?p.getValidationProps(a):a],stateAttributesMapping:bu})});process.env.NODE_ENV!=="production"&&(Ri.displayName="ComboboxInput");const xx={...ul,...tx},xu=c.forwardRef(function(t,n){const{render:r,className:o,disabled:s=!1,nativeButton:i=!0,keepMounted:a=!1,...l}=t,{disabled:u}=or(),d=mt(),f=_(d,L.selectionMode),h=_(d,L.disabled),p=_(d,L.readOnly),b=_(d,L.open),g=_(d,L.selectedValue),m=_(d,L.hasSelectionChips),y=vi();let v=!1;f==="none"?v=y!=="":f==="single"?v=g!=null:v=m;const C=u||h||s,{buttonRef:w,getButtonProps:R}=mo({native:i,disabled:C}),{mounted:k,transitionStatus:S,setMounted:E}=dl(v),V={disabled:C,open:b,transitionStatus:S};ai({open:v,ref:d.state.clearRef,onComplete(){v||E(!1)}});const W=tt("button",t,{state:V,ref:[n,w,d.state.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(P){P.preventDefault()},onClick(P){if(C||p)return;const q=d.state.keyboardActiveRef;d.state.setInputValue("",de(ua,P.nativeEvent)),f!=="none"?(d.state.setSelectedValue(Array.isArray(g)?[]:null,de(ua,P.nativeEvent)),d.state.setIndices({activeIndex:null,selectedIndex:null,type:q.current?"keyboard":"pointer"})):d.state.setIndices({activeIndex:null,type:q.current?"keyboard":"pointer"}),d.state.inputRef.current?.focus()}},l,R],stateAttributesMapping:xx});return a||k?W:null});process.env.NODE_ENV!=="production"&&(xu.displayName="ComboboxClear");const Si=c.createContext(null);process.env.NODE_ENV!=="production"&&(Si.displayName="GroupCollectionContext");function wx(){return c.useContext(Si)}function Cx(e){const{children:t,items:n}=e,r=c.useMemo(()=>({items:n}),[n]);return x.jsx(Si.Provider,{value:r,children:t})}function wu(e){const{children:t}=e,{filteredItems:n}=cn(),r=wx(),o=r?r.items:n;return o?x.jsx(c.Fragment,{children:o.map(t)}):null}const Cu=c.forwardRef(function(t,n){var r;const{render:o,className:s,children:i,...a}=t,l=mt(),u=wo(),d=!!Ei(!0),{filteredItems:f}=cn(),h=_(l,L.items),p=_(l,L.labelsRef),b=_(l,L.listRef),g=_(l,L.selectionMode),m=_(l,L.grid),y=_(l,L.popupProps),v=_(l,L.disabled),C=_(l,L.readOnly),w=_(l,L.virtualized),R=g==="multiple",k=f.length===0,S=re(q=>{l.set("positionerElement",q)}),E=re(q=>{l.set("listElement",q)}),V=c.useMemo(()=>typeof i=="function"?r||(r=x.jsx(wu,{children:i})):i,[i]),W={empty:k},H=u.useState("floatingId"),P=tt("div",t,{state:W,ref:[n,E,d?null:S],props:[y,{children:V,tabIndex:-1,id:H,role:m?"grid":"listbox","aria-multiselectable":R?"true":void 0,onKeyDown(q){if(!(v||C)&&q.key==="Enter"){const Y=l.state.activeIndex;if(Y==null)return;Te(q);const $=q.nativeEvent,N=l.state.listRef.current[Y];N&&(l.state.selectionEventRef.current=$,N.click(),l.state.selectionEventRef.current=null)}},onKeyDownCapture(){l.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){l.state.keyboardActiveRef.current=!1}},a]});return w?P:x.jsx(el,{elementsRef:b,labelsRef:h?void 0:p,children:P})});process.env.NODE_ENV!=="production"&&(Cu.displayName="ComboboxList");const ki=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(ki.displayName="ComboboxPortalContext");function Ex(){const e=c.useContext(ki);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Portal> is missing.":St(20));return e}const Eu=c.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,s=mt(),i=_(s,L.mounted),a=_(s,L.forceMounted);return i||r||a?x.jsx(ki.Provider,{value:r,children:x.jsx($l,{ref:n,...o})}):null});process.env.NODE_ENV!=="production"&&(Eu.displayName="ComboboxPortal");const Rx=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:d=0,offsetParent:f="real"}=Tt(e,t)||{};if(u==null)return{};const h=ii(d),p={x:n,y:r},b=go(o),g=ho(b),m=await i.getDimensions(u),y=b==="y",v=y?"top":"left",C=y?"bottom":"right",w=y?"clientHeight":"clientWidth",R=s.reference[g]+s.reference[b]-p[b]-s.floating[g],k=p[b]-s.reference[b],S=f==="real"?await i.getOffsetParent?.(u):a.floating;let E=a.floating[w]||s.floating[g];(!E||!await i.isElement?.(S))&&(E=a.floating[w]||s.floating[g]);const V=R/2-k/2,W=E/2-m[g]/2-1,H=Math.min(h[v],W),P=Math.min(h[C],W),q=H,Y=E-m[g]-P,$=E/2-m[g]/2+V,N=Wr(q,$,Y),B=!l.arrow&&zt(o)!=null&&$!==N&&s.reference[g]/2-($<q?H:P)-m[g]/2<0,j=B?$<q?$-q:$-Y:0;return{[b]:p[b]+j,data:{[b]:N,centerOffset:$-N-j,...B&&{alignmentOffset:j}},reset:B}}}),Sx=(e,t)=>({...Rx(e),options:[e,t]}),kx={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,s=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:(await nu().fn(e)).data?.referenceHidden||s}}}},Ix={sideX:"left",sideY:"top"};function Ru(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function Xa(e,t,n){const{rects:r,placement:o}=e;return{side:Ru(t,ft(o),n),align:zt(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Nx(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,collisionBoundary:a,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,keepMounted:h=!1,floatingRootContext:p,mounted:b,collisionAvoidance:g,shiftCrossAxis:m=!1,nodeId:y,adaptiveOrigin:v,lazyFlip:C=!1,externalTree:w}=e,[R,k]=c.useState(null);!b&&R!==null&&k(null);const S=g.side||"flip",E=g.align||"flip",V=g.fallbackAxisSide||"end",W=typeof t=="function"?t:void 0,H=re(W),P=W?H:t,q=gt(t),$=nl()==="rtl",N=R||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":$?"left":"right","inline-start":$?"right":"left"}[r],B=s==="center"?N:`${N}-${s}`;let j=l;const te=1,T=r==="bottom"?te:0,we=r==="top"?te:0,fe=r==="right"?te:0,ye=r==="left"?te:0;typeof j=="number"?j={top:j+T,right:j+ye,bottom:j+we,left:j+fe}:j&&(j={top:(j.top||0)+T,right:(j.right||0)+ye,bottom:(j.bottom||0)+we,left:(j.left||0)+fe});const ae={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:j},ce=c.useRef(null),ge=gt(o),Ce=gt(i),pe=[Zl(Pe=>{const Ie=Xa(Pe,r,$),le=typeof ge.current=="function"?ge.current(Ie):ge.current,st=typeof Ce.current=="function"?Ce.current(Ie):Ce.current;return{mainAxis:le,crossAxis:st,alignmentAxis:st}},[typeof o!="function"?o:0,typeof i!="function"?i:0,$,r])],xe=E==="none"&&S!=="shift",O=!xe&&(u||m||S==="shift"),A=S==="none"?null:eu({...ae,padding:{top:j.top+te,right:j.right+te,bottom:j.bottom+te,left:j.left+te},mainAxis:!m&&S==="flip",crossAxis:E==="flip"?"alignment":!1,fallbackAxisSideDirection:V}),F=xe?null:Ql(Pe=>{const Ie=$e(Pe.elements.floating).documentElement;return{...ae,rootBoundary:m?{x:0,y:0,width:Ie.clientWidth,height:Ie.clientHeight}:void 0,mainAxis:E!=="none",crossAxis:O,limiter:u||m?void 0:Jl(le=>{if(!ce.current)return{};const{width:st,height:it}=ce.current.getBoundingClientRect(),ln=bt(ft(le.placement)),We=ln==="y"?st:it,jn=ln==="y"?j.left+j.right:j.top+j.bottom;return{offset:We/2+jn/2}})}},[ae,u,m,j,E]);S==="shift"||E==="shift"||s==="center"?pe.push(F,A):pe.push(A,F),pe.push(tu({...ae,apply({elements:{floating:Pe},rects:{reference:Ie},availableWidth:le,availableHeight:st}){const it=Pe.style;it.setProperty("--available-width",`${le}px`),it.setProperty("--available-height",`${st}px`),it.setProperty("--anchor-width",`${Ie.width}px`),it.setProperty("--anchor-height",`${Ie.height}px`)}}),Sx(()=>({element:ce.current||document.createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(Pe){const{elements:Ie,middlewareData:le,placement:st,rects:it,y:ln}=Pe,We=ft(st),jn=bt(We),De=ce.current,Mo=le.arrow?.x||0,xt=le.arrow?.y||0,Ze=De?.clientWidth||0,Vn=De?.clientHeight||0,En=Mo+Ze/2,Bt=xt+Vn/2,ar=Math.abs(le.shift?.y||0),Gt=it.reference.height/2,wt=typeof o=="function"?o(Xa(Pe,r,$)):o,ut=ar>wt,ve={top:`${En}px calc(100% + ${wt}px)`,bottom:`${En}px ${-wt}px`,left:`calc(100% + ${wt}px) ${Bt}px`,right:`${-wt}px ${Bt}px`}[We],Ht=`${En}px ${it.reference.y+Gt-ln}px`;return Ie.floating.style.setProperty("--transform-origin",O&&jn==="y"&&ut?Ht:ve),{}}},kx,v),oe(()=>{!b&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[b,p]);const ue=c.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:I,elements:G,x:U,y:M,middlewareData:K,update:D,placement:Q,context:ie,isPositioned:be,floatingStyles:Ge}=zy({rootContext:p,placement:B,middleware:pe,strategy:n,whileElementsMounted:h?void 0:(...Pe)=>Ts(...Pe,ue),nodeId:y,externalTree:w}),{sideX:nt,sideY:_e}=K.adaptiveOrigin||Ix,ke=be?n:"fixed",Ve=c.useMemo(()=>{const Pe=v?{position:ke,[nt]:U,[_e]:M}:{position:ke,...Ge};return be||(Pe.opacity=0),Pe},[v,ke,nt,U,_e,M,Ge,be]),rt=c.useRef(null);oe(()=>{if(!b)return;const Pe=q.current,Ie=typeof Pe=="function"?Pe():Pe,st=(Za(Ie)?Ie.current:Ie)||null||null;st!==rt.current&&(I.setPositionReference(st),rt.current=st)},[b,I,P,q]),c.useEffect(()=>{if(!b)return;const Pe=q.current;typeof Pe!="function"&&Za(Pe)&&Pe.current!==rt.current&&(I.setPositionReference(Pe.current),rt.current=Pe.current)},[b,I,P,q]),c.useEffect(()=>{if(h&&b&&G.domReference&&G.floating)return Ts(G.domReference,G.floating,D,ue)},[h,b,G,D,ue]);const Je=ft(Q),lt=Ru(r,Je,$),Xe=zt(Q)||"center",ot=!!K.hide?.referenceHidden;oe(()=>{C&&b&&be&&k(Je)},[C,b,be,Je]);const _t=c.useMemo(()=>({position:"absolute",top:K.arrow?.y,left:K.arrow?.x}),[K.arrow]),yt=K.arrow?.centerOffset!==0;return c.useMemo(()=>({positionerStyles:Ve,arrowStyles:_t,arrowRef:ce,arrowUncentered:yt,side:lt,align:Xe,physicalSide:Je,anchorHidden:ot,refs:I,context:ie,isPositioned:be,update:D}),[Ve,_t,ce,yt,lt,Xe,Je,ot,I,ie,be,D])}function Za(e){return e!=null&&"current"in e}function Su(e){return e==="starting"?Kg:et}const ku=c.forwardRef(function(t,n){const{render:r,className:o,anchor:s,positionMethod:i="absolute",side:a="bottom",align:l="center",sideOffset:u=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:h=5,arrowPadding:p=5,sticky:b=!1,disableAnchorTracking:g=!1,collisionAvoidance:m=Yg,...y}=t,v=mt(),{filteredItems:C}=cn(),w=wo(),R=Ex(),k=_(v,L.modal),S=_(v,L.open),E=_(v,L.mounted),V=_(v,L.openMethod),W=_(v,L.triggerElement),H=_(v,L.inputElement),P=_(v,L.inputInsidePopup),q=_(v,L.transitionStatus),Y=C.length===0,N=Nx({anchor:s??(P?W:H),floatingRootContext:w,positionMethod:i,mounted:E,side:a,sideOffset:u,align:l,alignOffset:d,arrowPadding:p,collisionBoundary:f,collisionPadding:h,sticky:b,disableAnchorTracking:g,keepMounted:R,collisionAvoidance:m,lazyFlip:!0});av(S&&k&&V!=="touch",W);const B=c.useMemo(()=>{const fe={...N.positionerStyles};return S||(fe.pointerEvents="none"),{role:"presentation",hidden:!E,style:fe}},[S,E,N.positionerStyles]),j={open:S,side:N.side,align:N.align,anchorHidden:N.anchorHidden,empty:Y};oe(()=>{v.set("popupSide",N.side)},[v,N.side]);const te=c.useMemo(()=>({side:N.side,align:N.align,arrowRef:N.arrowRef,arrowUncentered:N.arrowUncentered,arrowStyles:N.arrowStyles,anchorHidden:N.anchorHidden,isPositioned:N.isPositioned}),[N.side,N.align,N.arrowRef,N.arrowUncentered,N.arrowStyles,N.anchorHidden,N.isPositioned]),T=re(fe=>{v.set("positionerElement",fe)}),we=tt("div",t,{state:j,ref:[n,T],props:[B,Su(q),y],stateAttributesMapping:au});return x.jsxs(Ci.Provider,{value:te,children:[E&&k&&x.jsx(cu,{inert:rx(!S),cutout:H??W}),we]})});process.env.NODE_ENV!=="production"&&(ku.displayName="ComboboxPositioner");const Ox={...au,...ul},Iu=c.forwardRef(function(t,n){const{render:r,className:o,initialFocus:s,finalFocus:i,...a}=t,l=mt(),u=Ei(),d=wo(),{filteredItems:f}=cn(),h=_(l,L.mounted),p=_(l,L.open),b=_(l,L.openMethod),g=_(l,L.transitionStatus),m=_(l,L.inputInsidePopup),y=_(l,L.inputElement),v=f.length===0;ai({open:p,ref:l.state.popupRef,onComplete(){p&&l.state.onOpenChangeComplete(!0)}});const C={open:p,side:u.side,align:u.align,anchorHidden:u.anchorHidden,transitionStatus:g,empty:v},w=tt("div",t,{state:C,ref:[n,l.state.popupRef],props:[{role:m?"dialog":"presentation",tabIndex:-1,onFocus(E){const V=ct(E.nativeEvent);b!=="touch"&&(Ee(l.state.listElement,V)||V===E.currentTarget)&&l.state.inputRef.current?.focus()}},Su(g),a],stateAttributesMapping:Ox}),k=s===void 0?m?E=>E==="touch"?l.state.popupRef.current:y:!1:s;let S;return i!=null?S=i:S=m?void 0:!1,x.jsx(xv,{context:d,disabled:!h,modal:!m,openInteractionType:b,initialFocus:k,returnFocus:S,children:w})});process.env.NODE_ENV!=="production"&&(Iu.displayName="ComboboxPopup");const Ii=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ii.displayName="ComboboxGroupContext");function Px(){const e=c.useContext(Ii);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxGroupContext is missing. ComboboxGroup parts must be placed within <Combobox.Group>.":St(18));return e}const Nu=c.forwardRef(function(t,n){const{render:r,className:o,items:s,...i}=t,[a,l]=c.useState(),u=c.useMemo(()=>({labelId:a,setLabelId:l,items:s}),[a,l,s]),d=tt("div",t,{ref:n,props:[{role:"group","aria-labelledby":a},i]}),f=x.jsx(Ii.Provider,{value:u,children:d});return s?x.jsx(Cx,{items:s,children:f}):f});process.env.NODE_ENV!=="production"&&(Nu.displayName="ComboboxGroup");const Ou=c.forwardRef(function(t,n){const{render:r,className:o,id:s,...i}=t,{setLabelId:a}=Px(),l=Qs(s);return oe(()=>(a(l),()=>{a(void 0)}),[l,a]),tt("div",t,{ref:n,props:[{id:l},i]})});process.env.NODE_ENV!=="production"&&(Ou.displayName="ComboboxGroupLabel");const Pu=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(Pu.displayName="ComboboxItemContext");const Tu=c.createContext(!1);process.env.NODE_ENV!=="production"&&(Tu.displayName="ComboboxRowContext");function Tx(){return c.useContext(Tu)}const Au=c.memo(c.forwardRef(function(t,n){const{render:r,className:o,value:s=null,index:i,disabled:a=!1,nativeButton:l=!1,...u}=t,d=c.useRef(!1),f=c.useRef(null),h=pl({index:i,textRef:f,indexGuessBehavior:fl.GuessFromOrder}),p=mt(),b=Tx(),{flatFilteredItems:g,hasItems:m}=cn(),y=_(p,L.open),v=_(p,L.selectionMode),C=_(p,L.readOnly),w=_(p,L.virtualized),R=_(p,L.isItemEqualToValue),k=v!=="none",S=i??(w?to(g,s,R):h.index),E=h.index!==-1,V=_(p,L.id),W=_(p,L.isActive,S),H=_(p,L.isSelected,s),P=_(p,L.getItemProps),q=c.useRef(null),Y=V!=null&&E?`${V}-${S}`:void 0,$=H&&k;oe(()=>{if(!(E&&(w||i!=null)))return;const ce=p.state.listRef.current;return ce[S]=q.current,()=>{delete ce[S]}},[E,w,S,i,p]),oe(()=>{if(!E||m)return;const ae=p.state.valuesRef.current;return ae[S]=s,v!=="none"&&p.state.allValuesRef.current.push(s),()=>{delete ae[S]}},[E,m,S,s,p,v]),oe(()=>{if(!y){d.current=!1;return}if(!E||m)return;const ae=p.state.selectedValue,ce=Array.isArray(ae)?ae[ae.length-1]:ae;bn(s,ce,R)&&p.set("selectedIndex",S)},[E,m,y,p,S,s,R]);const N={disabled:a,selected:$,highlighted:W},B=P({active:W,selected:$});B.id=void 0,B.onFocus=void 0;const{getButtonProps:j,buttonRef:te}=mo({disabled:a,focusableWhenDisabled:!0,native:l});function T(ae){function ce(){p.state.handleSelection(ae,s)}p.state.submitOnItemClick?(rn.flushSync(ce),p.state.requestSubmit()):ce()}const we={id:Y,role:b?"gridcell":"option","aria-selected":k?$:void 0,tabIndex:void 0,onPointerDownCapture(ae){d.current=!0,ae.preventDefault()},onClick(ae){a||C||T(ae.nativeEvent)},onMouseUp(ae){const ce=d.current;d.current=!1,!(a||C||ae.button!==0||ce||!W)&&T(ae.nativeEvent)}},fe=tt("div",t,{ref:[te,n,h.ref,q],state:N,props:[B,we,u,j]}),ye=c.useMemo(()=>({selected:$,textRef:f}),[$,f]);return x.jsx(Pu.Provider,{value:ye,children:fe})}));process.env.NODE_ENV!=="production"&&(Au.displayName="ComboboxItem");const Mu=c.forwardRef(function(t,n){const{render:r,className:o,children:s,...i}=t,{filteredItems:a}=cn(),l=mt(),u=a.length===0?s:null;return tt("div",t,{ref:[n,l.state.emptyRef],props:[{children:u,role:"status","aria-live":"polite","aria-atomic":!0},i]})});process.env.NODE_ENV!=="production"&&(Mu.displayName="ComboboxEmpty");const _u=c.forwardRef(function(t,n){const{className:r,render:o,orientation:s="horizontal",...i}=t;return tt("div",t,{state:{orientation:s},ref:n,props:[{role:"separator","aria-orientation":s},i]})});process.env.NODE_ENV!=="production"&&(_u.displayName="Separator");function Ax(e){const{multiple:t=!1,defaultValue:n,value:r,onValueChange:o,autoComplete:s,...i}=e;return x.jsx(vx,{...i,selectionMode:t?"multiple":"single",selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:o,formAutoComplete:s})}function Mx(e){const{children:t,placeholder:n}=e,r=mt(),o=_(r,L.itemToStringLabel),s=_(r,L.selectedValue),i=_(r,L.items),a=_(r,L.selectionMode)==="multiple",l=_(r,L.hasSelectedValue),u=!l&&n!=null&&t==null,d=_(r,L.hasNullItemLabel,u);let f=null;return typeof t=="function"?f=t(s):t!=null?f=t:!l&&n!=null&&!d?f=n:a&&Array.isArray(s)?f=lx(s,i,o):f=lu(s,i,o),x.jsx(c.Fragment,{children:f})}const Du=c.forwardRef(function(t,n){const{render:r,className:o,...s}=t,i=mt(),a=_(i,L.open),l=_(i,L.hasSelectionChips),[u,d]=c.useState(void 0);a&&u!==void 0&&d(void 0);const f=c.useRef([]),h=tt("div",t,{ref:[n,i.state.chipsContainerRef],props:[l?{role:"toolbar"}:et,s]}),p=c.useMemo(()=>({highlightedChipIndex:u,setHighlightedChipIndex:d,chipsRef:f}),[u,d,f]);return x.jsx(wi.Provider,{value:p,children:x.jsx(el,{elementsRef:f,children:h})})});process.env.NODE_ENV!=="production"&&(Du.displayName="ComboboxChips");const Ni=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ni.displayName="ComboboxChipContext");function _x(){const e=c.useContext(Ni);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"useComboboxChipContext must be used within a ComboboxChip":St(17));return e}const Lu=c.forwardRef(function(t,n){const{render:r,className:o,...s}=t,i=mt(),{setHighlightedChipIndex:a,chipsRef:l}=yu(),u=_(i,L.disabled),d=_(i,L.readOnly),f=_(i,L.selectedValue),{ref:h,index:p}=pl();function b(v){let C=p;if(v.key==="ArrowLeft")v.preventDefault(),p>0?C=p-1:C=void 0;else if(v.key==="ArrowRight")v.preventDefault(),p<f.length-1?C=p+1:C=void 0;else if(v.key==="Backspace"||v.key==="Delete"){const w=p>=f.length-1?f.length-2:p;C=w>=0?w:void 0,Te(v),i.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),i.state.setSelectedValue(f.filter((R,k)=>k!==p),de(ht,v.nativeEvent))}else v.key==="Enter"||v.key===" "?(Te(v),C=void 0):v.key==="ArrowDown"||v.key==="ArrowUp"?(Te(v),i.state.setOpen(!0,de(Kn,v.nativeEvent)),C=void 0):v.key.length===1&&!v.ctrlKey&&!v.metaKey&&!v.altKey&&(C=void 0);return C}const m=tt("div",t,{ref:[n,h],state:{disabled:u},props:[{tabIndex:-1,"aria-disabled":u||void 0,"aria-readonly":d||void 0,onKeyDown(v){if(u||d)return;const C=b(v);rn.flushSync(()=>{a(C)}),C===void 0?i.state.inputRef.current?.focus():l.current[C]?.focus()},onMouseDown(v){d||(v.preventDefault(),!u&&i.state.inputRef.current?.focus())}},s]}),y=c.useMemo(()=>({index:p}),[p]);return x.jsx(Ni.Provider,{value:y,children:m})});process.env.NODE_ENV!=="production"&&(Lu.displayName="ComboboxChip");const ju=c.forwardRef(function(t,n){const{render:r,className:o,disabled:s=!1,nativeButton:i=!0,...a}=t,l=mt(),{index:u}=_x(),d=_(l,L.disabled),f=_(l,L.readOnly),h=_(l,L.selectedValue),p=_(l,L.isItemEqualToValue),b=d||s,{buttonRef:g,getButtonProps:m}=mo({native:i,disabled:b||f,focusableWhenDisabled:!0}),y={disabled:b};function v(R){const k=l.state.activeIndex;if(k==null)return;const S=to(l.state.valuesRef.current,R,p);S!==-1&&k===S&&l.state.setIndices({activeIndex:null,type:l.state.keyboardActiveRef.current?"keyboard":"pointer"})}function C(R){const k=de(rb,R.nativeEvent),S=h[u];return v(S),l.state.setSelectedValue(h.filter((E,V)=>V!==u),k),l.state.inputRef.current?.focus(),k}return tt("button",t,{ref:[n,g],state:y,props:[{tabIndex:-1,onClick(R){if(b||f)return;C(R).isPropagationAllowed||R.stopPropagation()},onKeyDown(R){b||f||(R.key==="Enter"||R.key===" ")&&(C(R).isPropagationAllowed||Te(R))}},a,m]})});process.env.NODE_ENV!=="production"&&(ju.displayName="ComboboxChipRemove");var Dx=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Co=Dx.reduce((e,t)=>{const n=_c(`Primitive.${t}`),r=c.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Lx="Label",Vu=c.forwardRef((e,t)=>x.jsx(Co.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Vu.displayName=Lx;var Fu=Vu;const jx=je(qe("body-sm-regular")),Oi=({className:e,ref:t,...n})=>x.jsx(Fu,{ref:t,className:z(jx(),e),...n});Oi.displayName=Fu.displayName;var Vx="Separator",Qa="horizontal",Fx=["horizontal","vertical"],$u=c.forwardRef((e,t)=>{const{decorative:n,orientation:r=Qa,...o}=e,s=$x(r)?r:Qa,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return x.jsx(Co.div,{"data-orientation":s,...a,...o,ref:t})});$u.displayName=Vx;function $x(e){return Fx.includes(e)}var zu=$u;const Pi=({className:e,orientation:t="horizontal",decorative:n=!0,ref:r,...o})=>x.jsx(zu,{ref:r,decorative:n,orientation:t,className:z("bg-delicate-border shrink-0",t==="horizontal"?"h-px w-full":"h-full w-px",e),...o});Pi.displayName=zu.displayName;const zx=je("group/field data-[invalid=true]:text-error-text flex h-full w-full gap-2",{variants:{orientation:{vertical:["flex-col"],horizontal:["flex-row items-center","*:data-[slot=field-label]:flex-auto",`has-[>[data-slot=field-content]]:items-start
|
|
36
|
+
has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`]}},defaultVariants:{orientation:"vertical"}}),Bx="flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",Gx="mb-3 font-medium data-[variant=legend]:text-base data-[variant=label]:text-sm",Hx="group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",Wx="group/field-content flex flex-1 flex-col gap-2",Ux=[`group/field-label peer/field-label text-primary-text flex w-fit gap-2 text-sm
|
|
37
37
|
leading-[150%] font-normal tracking-normal
|
|
38
38
|
group-data-[disabled=true]/field:opacity-50`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col
|
|
39
39
|
has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border
|
|
40
40
|
*:data-[slot=field]:p-4`,`has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary
|
|
41
|
-
dark:has-data-[state=checked]:bg-primary/10`].join(" "),
|
|
42
|
-
group-data-[disabled=true]/field:opacity-50`,qe("body-sm-regular")].join(" "),
|
|
41
|
+
dark:has-data-[state=checked]:bg-primary/10`].join(" "),Kx=[`text-primary-text flex w-fit items-center gap-2
|
|
42
|
+
group-data-[disabled=true]/field:opacity-50`,qe("body-sm-regular")].join(" "),qx=["text-sub-label-text group-has-data-[orientation=horizontal]/field:text-balance",qe("body-xs-regular"),"last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5","[&>a:hover]:text-primary-text [&>a]:underline [&>a]:underline-offset-4"].join(" "),Yx="relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",Xx="absolute inset-0 top-1/2",Zx="bg-background text-muted-foreground relative mx-auto block w-fit px-2",Qx="ml-4 flex list-disc flex-col gap-1",Jx="text-error-text text-xs leading-[140%] font-normal tracking-normal";function ew({className:e,...t}){return x.jsx("fieldset",{"data-slot":"field-set",className:z(Bx,e),...t})}function tw({className:e,variant:t="legend",...n}){return x.jsx("legend",{"data-slot":"field-legend","data-variant":t,className:z(Gx,e),...n})}function nw({className:e,...t}){return x.jsx("div",{"data-slot":"field-group",className:z(Hx,e),...t})}function Bu({className:e,orientation:t="vertical",...n}){return x.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:z(zx({orientation:t}),e),...n})}function rw({className:e,...t}){return x.jsx("div",{"data-slot":"field-content",className:z(Wx,e),...t})}function Gu({className:e,...t}){return x.jsx(Oi,{"data-slot":"field-label",className:z(Ux,e),...t})}function ow({className:e,...t}){return x.jsx("div",{"data-slot":"field-label",className:z(Kx,e),...t})}function Hu({className:e,...t}){return x.jsx("p",{"data-slot":"field-description",className:z(qx,e),...t})}function sw({children:e,className:t,...n}){return x.jsxs("div",{"data-slot":"field-separator","data-content":!!e,className:z(Yx,t),...n,children:[x.jsx(Pi,{className:Xx}),e&&x.jsx("span",{className:Zx,"data-slot":"field-separator-content",children:e})]})}function Wu({className:e,children:t,errors:n,...r}){const o=Le.useMemo(()=>t||(n?n.length===1&&n[0]?.message?n[0].message:x.jsx("ul",{className:Qx,children:n.map(s=>s?.message?x.jsx("li",{children:s.message},s.message):null)}):null),[t,n]);return o?x.jsx("div",{role:"alert","data-slot":"field-error",className:z(Jx,e),...r,children:o}):null}const iw=je(`text-primary-text hover:border-inp-hover-border focus:border-inp-focus-border
|
|
43
43
|
placeholder:text-placeholder-text disabled:border-inp-disabled-border bg-primary-bg
|
|
44
44
|
disabled:bg-disabled-bg disabled:text-disabled-text
|
|
45
45
|
disabled:placeholder:text-disabled-text aria-invalid:border-error-text
|
|
46
46
|
aria-valid:border-success-text w-full rounded-xl border px-3 py-2.5 tracking-normal
|
|
47
47
|
placeholder:text-sm focus:outline-none focus-visible:ring-0
|
|
48
|
-
disabled:pointer-events-none`,{variants:{variant:{primary:"border-inp-default-border"},sizeInput:{lg:"h-12 text-base",md:"h-10 text-sm",sm:"h-8 text-sm",xs:"h-6 text-xs"}},defaultVariants:{variant:"primary",sizeInput:"md"}})
|
|
48
|
+
disabled:pointer-events-none`,{variants:{variant:{primary:"border-inp-default-border"},sizeInput:{lg:"h-12 text-base",md:"h-10 text-sm",sm:"h-8 text-sm",xs:"h-6 text-xs"}},defaultVariants:{variant:"primary",sizeInput:"md"}}),Uu=({className:e,type:t="text",variant:n,sizeInput:r,ref:o,...s})=>x.jsx("input",{"data-slot":"input",type:t,className:z(iw({variant:n,sizeInput:r}),e),ref:o,...s}),aw=[`border-inp-default-border bg-primary-bg text-primary-text flex h-31 w-full
|
|
49
49
|
resize-none rounded-xl border px-3 py-2.5 text-sm`,"hover:border-inp-hover-border focus:border-inp-focus-border focus:outline-none","placeholder:text-placeholder-text placeholder:text-sm",`disabled:border-inp-disabled-border disabled:bg-disabled-bg
|
|
50
|
-
disabled:text-disabled-text disabled:placeholder:text-disabled-text`].join(" "),
|
|
50
|
+
disabled:text-disabled-text disabled:placeholder:text-disabled-text`].join(" "),Ti=({className:e,ref:t,...n})=>x.jsx("textarea",{className:z(aw,e),ref:t,...n});Ti.displayName="Textarea";const cw=je(`text-secondary-text group-data-[disabled=true]/input-group:text-disabled-text flex
|
|
51
51
|
h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium
|
|
52
52
|
select-none [&>kbd]:rounded-[calc(var(--radius)-5px)]
|
|
53
53
|
[&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.4rem] has-[>kbd]:mr-[-0.35rem]","block-start":`order-first w-full justify-start px-3 pt-3
|
|
54
54
|
group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3`,"block-end":`order-last w-full justify-start px-3 pb-3
|
|
55
|
-
group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3`}},defaultVariants:{align:"inline-start"}}),
|
|
56
|
-
[&>svg:not([class*='size-'])]:size-3.5`,sm:"h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function
|
|
55
|
+
group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3`}},defaultVariants:{align:"inline-start"}}),lw=je("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2
|
|
56
|
+
[&>svg:not([class*='size-'])]:size-3.5`,sm:"h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function Ku({className:e,...t}){return x.jsx("div",{"data-slot":"input-group",role:"group",className:z(`group/input-group border-inp-default-border bg-primary-bg relative flex w-full
|
|
57
57
|
items-center rounded-xl border transition-[color,box-shadow] outline-none`,"h-10 has-[>textarea]:h-auto","hover:border-inp-hover-border","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2",`has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col
|
|
58
58
|
has-[>[data-align=block-start]]:[&>input]:pb-3`,`has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col
|
|
59
59
|
has-[>[data-align=block-end]]:[&>input]:pt-3`,`has-[[data-slot=input-group-control]:focus-visible]:ring-inp-focus-border/20
|
|
60
60
|
has-[[data-slot=input-group-control]:focus-visible]:border-inp-focus-border`,"has-[[data-slot=input-group-control][aria-invalid=true]]:border-error-text","has-[[data-slot=input-group-control][aria-valid=true]]:border-success-text",`has-[[data-slot=input-group-control][disabled]]:border-inp-disabled-border
|
|
61
61
|
has-[[data-slot=input-group-control][disabled]]:bg-disabled-bg
|
|
62
62
|
has-[[data-slot=input-group-control][disabled]]:text-disabled-text
|
|
63
|
-
has-[[data-slot=input-group-control][disabled]]:[&_svg]:text-disabled-text`,e),...t})}function
|
|
64
|
-
[&_svg:not([class*='size-'])]:size-4`,e),...t})}function
|
|
65
|
-
disabled:border-0 disabled:bg-transparent dark:bg-transparent`,e),...t})}function
|
|
63
|
+
has-[[data-slot=input-group-control][disabled]]:[&_svg]:text-disabled-text`,e),...t})}function qu({className:e,align:t="inline-start",...n}){return x.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:z(cw({align:t}),e),onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}function Yu({className:e,type:t="button",variant:n="primary",size:r="xs",...o}){return x.jsx(oo,{type:t,"data-size":r,variant:n,className:z(lw({size:r}),e),...o})}function uw({className:e,...t}){return x.jsx("span",{className:z(`text-secondary-text flex items-center gap-2 text-sm [&_svg]:pointer-events-none
|
|
64
|
+
[&_svg:not([class*='size-'])]:size-4`,e),...t})}function Xu({className:e,...t}){return x.jsx(Uu,{"data-slot":"input-group-control",className:z(`flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0
|
|
65
|
+
disabled:border-0 disabled:bg-transparent dark:bg-transparent`,e),...t})}function dw({className:e,...t}){return x.jsx(Ti,{"data-slot":"input-group-control",className:z(`flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none
|
|
66
66
|
focus-visible:ring-0 disabled:border-0 disabled:bg-transparent
|
|
67
|
-
dark:bg-transparent`,e),...t})}const
|
|
68
|
-
cursor-pointer focus-visible:border-0 focus-visible:ring-0 focus-visible:outline-none`,
|
|
67
|
+
dark:bg-transparent`,e),...t})}const fw=`absolute top-1/2 right-3 z-10 -translate-y-1/2
|
|
68
|
+
cursor-pointer focus-visible:border-0 focus-visible:ring-0 focus-visible:outline-none`,pw=je("text-primary-text pointer-events-none transition-colors",{variants:{disabled:{true:"text-disabled-text",false:""}},defaultVariants:{disabled:!1}}),Zu=`h-full rounded-none border-0 bg-transparent p-0
|
|
69
69
|
pr-1.5 shadow-none hover:bg-transparent hover:shadow-none focus:bg-transparent
|
|
70
|
-
focus:shadow-none`,
|
|
70
|
+
focus:shadow-none`,mw="pointer-events-none",hw=`has-[[data-slot=input-group-control]:focus-visible]:border-inp-focus-border
|
|
71
71
|
has-[[data-slot=combobox-trigger]:focus-visible]:border-inp-focus-border px-0
|
|
72
72
|
has-[[data-slot=combobox-trigger]:focus-visible]:ring-0
|
|
73
73
|
has-[[data-slot=combobox-trigger]:focus-visible]:outline-none
|
|
74
74
|
has-[[data-slot=input-group-control]:focus-visible]:ring-0
|
|
75
|
-
has-[[data-slot=input-group-control]:focus-visible]:outline-none`,
|
|
75
|
+
has-[[data-slot=input-group-control]:focus-visible]:outline-none`,gw="cursor-pointer",bw="isolate z-50",vw=`bg-primary-bg text-primary-text data-open:animate-in
|
|
76
76
|
data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0
|
|
77
77
|
data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2
|
|
78
78
|
data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2
|
|
@@ -82,11 +82,11 @@ border-inp-focus-border absolute max-h-63 w-(--anchor-width) min-w-(--anchor-wid
|
|
|
82
82
|
origin-(--transform-origin) overflow-auto rounded-xl border pl-0
|
|
83
83
|
shadow-[0px_4px_12px_0px_rgba(0,0,0,0.1)] duration-100 *:data-[slot=input-group]:m-1
|
|
84
84
|
*:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8
|
|
85
|
-
*:data-[slot=input-group]:shadow-none`,
|
|
85
|
+
*:data-[slot=input-group]:shadow-none`,yw=`text-primary-text data-disabled:text-disabled-text
|
|
86
86
|
data-highlighted:bg-tertiary-bg relative flex w-full cursor-pointer items-center gap-2
|
|
87
87
|
px-4 py-2 text-sm outline-none select-none data-disabled:pointer-events-none
|
|
88
|
-
[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,
|
|
89
|
-
text-center text-sm group-data-empty/combobox-content:flex`,
|
|
88
|
+
[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,xw="text-secondary-text px-4 py-2 text-xs",ww=`text-secondary-text hidden w-full justify-center py-2
|
|
89
|
+
text-center text-sm group-data-empty/combobox-content:flex`,Cw="bg-delicate-border -mx-1 my-1 h-px",Ew=je(`border-inp-default-border bg-primary-bg text-primary-text hover:border-inp-hover-border
|
|
90
90
|
has-aria-invalid:border-error-text has-aria-valid:border-success-text
|
|
91
91
|
has-aria-invalid:ring-error-text/20 focus-within:border-inp-focus-border relative flex
|
|
92
92
|
min-h-10 w-full flex-wrap items-center gap-1 rounded-xl border bg-clip-padding py-1.5
|
|
@@ -94,12 +94,12 @@ text-center text-sm group-data-empty/combobox-content:flex`,gw="bg-delicate-bord
|
|
|
94
94
|
focus-within:outline-none disabled:pointer-events-none has-aria-invalid:ring-1
|
|
95
95
|
has-data-[slot=combobox-chip]:pl-1`,{variants:{disabled:{true:`border-inp-disabled-border bg-disabled-bg text-disabled-text
|
|
96
96
|
hover:border-inp-disabled-border [&_input]:text-disabled-text
|
|
97
|
-
[&_input::placeholder]:text-disabled-text [&_svg]:text-disabled-text`,false:""}},defaultVariants:{disabled:!1}}),
|
|
97
|
+
[&_input::placeholder]:text-disabled-text [&_svg]:text-disabled-text`,false:""}},defaultVariants:{disabled:!1}}),Rw=`text-primary-text flex items-center justify-center
|
|
98
98
|
px-1.5 text-xs font-medium whitespace-nowrap has-disabled:pointer-events-none
|
|
99
99
|
has-disabled:cursor-not-allowed has-disabled:opacity-50
|
|
100
|
-
has-data-[slot=combobox-chip-remove]:pr-0`,
|
|
101
|
-
disabled:placeholder:text-disabled-text min-w-16 flex-1 outline-none`,{variants:{disabled:{true:"absolute left-0 w-0 min-w-0 flex-1 p-0 opacity-0",false:""}},defaultVariants:{disabled:!1}}),xo=c.createContext(null);function xw({children:e,...t}){const[n,r]=c.useState(null),o=c.useMemo(()=>({anchorElement:n,setAnchorElement:r}),[n]);return x.jsx(xo,{value:o,children:x.jsx(kx,{...t,children:e})})}function ww({className:e,label:t,description:n,error:r,children:o,...s}){return x.jsxs(Lu,{className:e,...s,children:[t&&x.jsx(ju,{children:t}),o,n&&x.jsx(Vu,{children:n}),r&&x.jsx(Fu,{children:r})]})}function Cw({...e}){return x.jsx(Ix,{"data-slot":"combobox-value",...e})}function Uu({className:e,children:t,...n}){return x.jsxs(fu,{"data-slot":"combobox-trigger",className:z(iw,e),...n,children:[t,x.jsx(oo,{type:"chevron",className:z(aw({disabled:n.disabled})),size:"md"})]})}function Ew({className:e,...t}){return x.jsx(mu,{"data-slot":"combobox-clear",className:z(e),...t,render:x.jsx(Gu,{variant:"link",size:"icon-xs",className:Wu,children:x.jsx(Hs,{className:cw})})})}function Rw({className:e,children:t,disabled:n=!1,showTrigger:r=!0,showClear:o=!1,...s}){const i=c.use(xo),a=c.useCallback(l=>{i&&i.setAnchorElement(u=>u===l?u:l)},[i]);return x.jsxs(zu,{ref:a,className:z(lw,e),children:[x.jsx(wi,{render:x.jsx(Hu,{disabled:n}),...s}),x.jsxs(Bu,{align:"inline-end",className:uw,children:[r&&x.jsx(Uu,{}),o&&x.jsx(Ew,{disabled:n})]}),t]})}function Sw({className:e,side:t="bottom",sideOffset:n=8,align:r="start",alignOffset:o=0,anchor:s,...i}){const a=c.use(xo),l=c.useCallback(()=>{if(typeof document>"u")return null;const u=document.activeElement;return u?u.closest('[data-slot="combobox-chips"]')??u.closest('[data-slot="input-group"]'):null},[]);return x.jsx(bu,{children:x.jsx(xu,{side:t,sideOffset:n,align:r,alignOffset:o,anchor:s??a?.anchorElement??l,className:dw,children:x.jsx(wu,{"data-slot":"combobox-content","data-chips":!!s,className:z(fw,e),...i})})})}function kw({className:e,...t}){return x.jsx(gu,{"data-slot":"combobox-list",className:z(e),...t})}function Iw({className:e,children:t,...n}){return x.jsx(ku,{"data-slot":"combobox-item",className:z(pw,e),...n,children:t})}function Nw({className:e,...t}){return x.jsx(Cu,{"data-slot":"combobox-group",className:z(e),...t})}function Ow({className:e,...t}){return x.jsx(Eu,{"data-slot":"combobox-label",className:z(mw,e),...t})}function Pw({...e}){return x.jsx(hu,{"data-slot":"combobox-collection",...e})}function Tw({className:e,...t}){return x.jsx(Iu,{"data-slot":"combobox-empty",className:z(hw,e),...t})}function Aw({className:e,...t}){return x.jsx(Nu,{"data-slot":"combobox-separator",className:z(gw,e),...t})}function Mw({className:e,disabled:t=!1,...n}){const r=c.use(xo),o=c.useCallback(s=>{r&&r.setAnchorElement(i=>i===s?i:s)},[r]);return x.jsx(Ou,{ref:o,"data-slot":"combobox-chips",className:z(bw({disabled:t}),e),...n})}function _w({className:e,children:t,showRemove:n=!0,...r}){return x.jsxs(Pu,{"data-slot":"combobox-chip",className:z(vw,e),...r,children:[t,n&&x.jsx(Tu,{render:x.jsx(to,{className:Wu,variant:"ghost",children:x.jsx(Hs,{className:"text-secondary-text"})})})]})}function Dw({className:e,...t}){return x.jsx(wi,{"data-slot":"combobox-chip-input",className:z(yw({disabled:t.disabled}),e),...t})}var Lw=c[" useId ".trim().toString()]||(()=>{}),jw=0;function An(e){const[t,n]=c.useState(Lw());return tn(()=>{n(r=>r??String(jw++))},[e]),t?`radix-${t}`:""}function vn(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}function Vw(e,t=globalThis?.document){const n=vn(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Fw="DismissableLayer",Ts="dismissableLayer.update",$w="dismissableLayer.pointerDownOutside",zw="dismissableLayer.focusOutside",qa,Ku=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Oi=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,u=c.useContext(Ku),[d,f]=c.useState(null),h=d?.ownerDocument??globalThis?.document,[,p]=c.useState({}),b=ze(t,S=>f(S)),g=Array.from(u.layers),[m]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(m),v=d?g.indexOf(d):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,w=v>=y,R=Hw(S=>{const E=S.target,V=[...u.branches].some(W=>W.contains(E));!w||V||(o?.(S),i?.(S),S.defaultPrevented||a?.())},h),k=Ww(S=>{const E=S.target;[...u.branches].some(W=>W.contains(E))||(s?.(S),i?.(S),S.defaultPrevented||a?.())},h);return Vw(S=>{v===u.layers.size-1&&(r?.(S),!S.defaultPrevented&&a&&(S.preventDefault(),a()))},h),c.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(qa=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Ya(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=qa)}},[d,h,n,u]),c.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Ya())},[d,u]),c.useEffect(()=>{const S=()=>p({});return document.addEventListener(Ts,S),()=>document.removeEventListener(Ts,S)},[]),x.jsx(Oe.div,{...l,ref:b,style:{pointerEvents:C?w?"auto":"none":void 0,...e.style},onFocusCapture:Ne(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Ne(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Ne(e.onPointerDownCapture,R.onPointerDownCapture)})});Oi.displayName=Fw;var Bw="DismissableLayerBranch",Gw=c.forwardRef((e,t)=>{const n=c.useContext(Ku),r=c.useRef(null),o=ze(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),x.jsx(Oe.div,{...e,ref:o})});Gw.displayName=Bw;function Hw(e,t=globalThis?.document){const n=vn(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){qu($w,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ww(e,t=globalThis?.document){const n=vn(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&qu(zw,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ya(){const e=new CustomEvent(Ts);document.dispatchEvent(e)}function qu(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?rh(o,s):o.dispatchEvent(s)}var ss="focusScope.autoFocusOnMount",is="focusScope.autoFocusOnUnmount",Xa={bubbles:!1,cancelable:!0},Uw="FocusScope",Yu=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=c.useState(null),u=vn(o),d=vn(s),f=c.useRef(null),h=ze(t,g=>l(g)),p=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let g=function(C){if(p.paused||!a)return;const w=C.target;a.contains(w)?f.current=w:qt(f.current,{select:!0})},m=function(C){if(p.paused||!a)return;const w=C.relatedTarget;w!==null&&(a.contains(w)||qt(f.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const R of C)R.removedNodes.length>0&&qt(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",m);const v=new MutationObserver(y);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",m),v.disconnect()}}},[r,a,p.paused]),c.useEffect(()=>{if(a){Qa.add(p);const g=document.activeElement;if(!a.contains(g)){const y=new CustomEvent(ss,Xa);a.addEventListener(ss,u),a.dispatchEvent(y),y.defaultPrevented||(Kw(Qw(Xu(a)),{select:!0}),document.activeElement===g&&qt(a))}return()=>{a.removeEventListener(ss,u),setTimeout(()=>{const y=new CustomEvent(is,Xa);a.addEventListener(is,d),a.dispatchEvent(y),y.defaultPrevented||qt(g??document.body,{select:!0}),a.removeEventListener(is,d),Qa.remove(p)},0)}}},[a,u,d,p]);const b=c.useCallback(g=>{if(!n&&!r||p.paused)return;const m=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(m&&y){const v=g.currentTarget,[C,w]=qw(v);C&&w?!g.shiftKey&&y===w?(g.preventDefault(),n&&qt(C,{select:!0})):g.shiftKey&&y===C&&(g.preventDefault(),n&&qt(w,{select:!0})):y===v&&g.preventDefault()}},[n,r,p.paused]);return x.jsx(Oe.div,{tabIndex:-1,...i,ref:h,onKeyDown:b})});Yu.displayName=Uw;function Kw(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(qt(r,{select:t}),document.activeElement!==n)return}function qw(e){const t=Xu(e),n=Za(t,e),r=Za(t.reverse(),e);return[n,r]}function Xu(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Za(e,t){for(const n of e)if(!Yw(n,{upTo:t}))return n}function Yw(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 Xw(e){return e instanceof HTMLInputElement&&"select"in e}function qt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Xw(e)&&t&&e.select()}}var Qa=Zw();function Zw(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Ja(e,t),e.unshift(t)},remove(t){e=Ja(e,t),e[0]?.resume()}}}function Ja(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Qw(e){return e.filter(t=>t.tagName!=="A")}var Jw="Portal",Pi=c.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=c.useState(!1);tn(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?cc.createPortal(x.jsx(Oe.div,{...r,ref:t}),i):null});Pi.displayName=Jw;var as=0;function eC(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ec()),document.body.insertAdjacentElement("beforeend",e[1]??ec()),as++,()=>{as===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),as--}},[])}function ec(){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 Ot=function(){return Ot=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ot.apply(this,arguments)};function Zu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function tC(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Dr="right-scroll-bar-position",Lr="width-before-scroll-bar",nC="with-scroll-bars-hidden",rC="--removed-body-scroll-bar-size";function cs(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function oC(e,t){var n=Le.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var sC=typeof window<"u"?c.useLayoutEffect:c.useEffect,tc=new WeakMap;function iC(e,t){var n=oC(null,function(r){return e.forEach(function(o){return cs(o,r)})});return sC(function(){var r=tc.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||cs(a,null)}),s.forEach(function(a){o.has(a)||cs(a,i)})}tc.set(n,e)},[e]),n}function aC(e){return e}function cC(e,t){t===void 0&&(t=aC);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var d=i;i=[],d.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return o}function lC(e){e===void 0&&(e={});var t=cC(null);return t.options=Ot({async:!0,ssr:!1},e),t}var Qu=function(e){var t=e.sideCar,n=Zu(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,Ot({},n))};Qu.isSideCarExport=!0;function uC(e,t){return e.useMedium(t),Qu}var Ju=lC(),ls=function(){},wo=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:ls,onWheelCapture:ls,onTouchMoveCapture:ls}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,p=e.noRelative,b=e.noIsolation,g=e.inert,m=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,C=e.gapMode,w=Zu(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=h,k=iC([n,t]),S=Ot(Ot({},w),o);return c.createElement(c.Fragment,null,d&&c.createElement(R,{sideCar:Ju,removeScrollBar:u,shards:f,noRelative:p,noIsolation:b,inert:g,setCallbacks:s,allowPinchZoom:!!m,lockRef:n,gapMode:C}),i?c.cloneElement(c.Children.only(a),Ot(Ot({},S),{ref:k})):c.createElement(v,Ot({},S,{className:l,ref:k}),a))});wo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};wo.classNames={fullWidth:Lr,zeroRight:Dr};var dC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function fC(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=dC();return t&&e.setAttribute("nonce",t),e}function pC(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function mC(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var hC=function(){var e=0,t=null;return{add:function(n){e==0&&(t=fC())&&(pC(t,n),mC(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},gC=function(){var e=hC();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ed=function(){var e=gC(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},bC={left:0,top:0,right:0,gap:0},us=function(e){return parseInt(e||"",10)||0},vC=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[us(n),us(r),us(o)]},yC=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return bC;var t=vC(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},xC=ed(),Mn="data-scroll-locked",wC=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
102
|
-
.`.concat(
|
|
100
|
+
has-data-[slot=combobox-chip-remove]:pr-0`,Sw=je(`text-primary-text placeholder:text-placeholder-text disabled:text-disabled-text
|
|
101
|
+
disabled:placeholder:text-disabled-text min-w-16 flex-1 outline-none`,{variants:{disabled:{true:"absolute left-0 w-0 min-w-0 flex-1 p-0 opacity-0",false:""}},defaultVariants:{disabled:!1}}),Eo=c.createContext(null);function kw({children:e,...t}){const[n,r]=c.useState(null),o=c.useMemo(()=>({anchorElement:n,setAnchorElement:r}),[n]);return x.jsx(Eo,{value:o,children:x.jsx(Ax,{...t,children:e})})}function Iw({className:e,label:t,description:n,error:r,children:o,...s}){return x.jsxs(Bu,{className:e,...s,children:[t&&x.jsx(Gu,{children:t}),o,n&&x.jsx(Hu,{children:n}),r&&x.jsx(Wu,{children:r})]})}function Nw({...e}){return x.jsx(Mx,{"data-slot":"combobox-value",...e})}function Qu({className:e,children:t,...n}){return x.jsxs(vu,{"data-slot":"combobox-trigger",className:z(fw,e),...n,children:[t,x.jsx(ao,{type:"chevron",className:z(pw({disabled:n.disabled})),size:"md"})]})}function Ow({className:e,...t}){return x.jsx(xu,{"data-slot":"combobox-clear",className:z(e),...t,render:x.jsx(Yu,{variant:"link",size:"icon-xs",className:Zu,children:x.jsx(Ks,{className:mw})})})}function Pw({className:e,children:t,disabled:n=!1,showTrigger:r=!0,showClear:o=!1,...s}){const i=c.use(Eo),a=c.useCallback(l=>{i&&i.setAnchorElement(u=>u===l?u:l)},[i]);return x.jsxs(Ku,{ref:a,className:z(hw,e),children:[x.jsx(Ri,{render:x.jsx(Xu,{disabled:n}),...s}),x.jsxs(qu,{align:"inline-end",className:gw,children:[r&&x.jsx(Qu,{}),o&&x.jsx(Ow,{disabled:n})]}),t]})}function Tw({className:e,side:t="bottom",sideOffset:n=8,align:r="start",alignOffset:o=0,anchor:s,...i}){const a=c.use(Eo),l=c.useCallback(()=>{if(typeof document>"u")return null;const u=document.activeElement;return u?u.closest('[data-slot="combobox-chips"]')??u.closest('[data-slot="input-group"]'):null},[]);return x.jsx(Eu,{children:x.jsx(ku,{side:t,sideOffset:n,align:r,alignOffset:o,anchor:s??a?.anchorElement??l,className:bw,children:x.jsx(Iu,{"data-slot":"combobox-content","data-chips":!!s,className:z(vw,e),...i})})})}function Aw({className:e,...t}){return x.jsx(Cu,{"data-slot":"combobox-list",className:z(e),...t})}function Mw({className:e,children:t,...n}){return x.jsx(Au,{"data-slot":"combobox-item",className:z(yw,e),...n,children:t})}function _w({className:e,...t}){return x.jsx(Nu,{"data-slot":"combobox-group",className:z(e),...t})}function Dw({className:e,...t}){return x.jsx(Ou,{"data-slot":"combobox-label",className:z(xw,e),...t})}function Lw({...e}){return x.jsx(wu,{"data-slot":"combobox-collection",...e})}function jw({className:e,...t}){return x.jsx(Mu,{"data-slot":"combobox-empty",className:z(ww,e),...t})}function Vw({className:e,...t}){return x.jsx(_u,{"data-slot":"combobox-separator",className:z(Cw,e),...t})}function Fw({className:e,disabled:t=!1,...n}){const r=c.use(Eo),o=c.useCallback(s=>{r&&r.setAnchorElement(i=>i===s?i:s)},[r]);return x.jsx(Du,{ref:o,"data-slot":"combobox-chips",className:z(Ew({disabled:t}),e),...n})}function $w({className:e,children:t,showRemove:n=!0,...r}){return x.jsxs(Lu,{"data-slot":"combobox-chip",className:z(Rw,e),...r,children:[t,n&&x.jsx(ju,{render:x.jsx(oo,{className:Zu,variant:"ghost",children:x.jsx(Ks,{className:"text-secondary-text"})})})]})}function zw({className:e,...t}){return x.jsx(Ri,{"data-slot":"combobox-chip-input",className:z(Sw({disabled:t.disabled}),e),...t})}var Bw=c[" useId ".trim().toString()]||(()=>{}),Gw=0;function An(e){const[t,n]=c.useState(Bw());return tn(()=>{n(r=>r??String(Gw++))},[e]),t?`radix-${t}`:""}function vn(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}function Hw(e,t=globalThis?.document){const n=vn(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Ww="DismissableLayer",_s="dismissableLayer.update",Uw="dismissableLayer.pointerDownOutside",Kw="dismissableLayer.focusOutside",Ja,Ju=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ai=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,u=c.useContext(Ju),[d,f]=c.useState(null),h=d?.ownerDocument??globalThis?.document,[,p]=c.useState({}),b=ze(t,S=>f(S)),g=Array.from(u.layers),[m]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(m),v=d?g.indexOf(d):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,w=v>=y,R=Xw(S=>{const E=S.target,V=[...u.branches].some(W=>W.contains(E));!w||V||(o?.(S),i?.(S),S.defaultPrevented||a?.())},h),k=Zw(S=>{const E=S.target;[...u.branches].some(W=>W.contains(E))||(s?.(S),i?.(S),S.defaultPrevented||a?.())},h);return Hw(S=>{v===u.layers.size-1&&(r?.(S),!S.defaultPrevented&&a&&(S.preventDefault(),a()))},h),c.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ja=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ec(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Ja)}},[d,h,n,u]),c.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ec())},[d,u]),c.useEffect(()=>{const S=()=>p({});return document.addEventListener(_s,S),()=>document.removeEventListener(_s,S)},[]),x.jsx(Oe.div,{...l,ref:b,style:{pointerEvents:C?w?"auto":"none":void 0,...e.style},onFocusCapture:Ne(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Ne(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Ne(e.onPointerDownCapture,R.onPointerDownCapture)})});Ai.displayName=Ww;var qw="DismissableLayerBranch",Yw=c.forwardRef((e,t)=>{const n=c.useContext(Ju),r=c.useRef(null),o=ze(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),x.jsx(Oe.div,{...e,ref:o})});Yw.displayName=qw;function Xw(e,t=globalThis?.document){const n=vn(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){ed(Uw,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Zw(e,t=globalThis?.document){const n=vn(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&ed(Kw,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ec(){const e=new CustomEvent(_s);document.dispatchEvent(e)}function ed(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?lh(o,s):o.dispatchEvent(s)}var cs="focusScope.autoFocusOnMount",ls="focusScope.autoFocusOnUnmount",tc={bubbles:!1,cancelable:!0},Qw="FocusScope",td=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=c.useState(null),u=vn(o),d=vn(s),f=c.useRef(null),h=ze(t,g=>l(g)),p=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let g=function(C){if(p.paused||!a)return;const w=C.target;a.contains(w)?f.current=w:qt(f.current,{select:!0})},m=function(C){if(p.paused||!a)return;const w=C.relatedTarget;w!==null&&(a.contains(w)||qt(f.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const R of C)R.removedNodes.length>0&&qt(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",m);const v=new MutationObserver(y);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",m),v.disconnect()}}},[r,a,p.paused]),c.useEffect(()=>{if(a){rc.add(p);const g=document.activeElement;if(!a.contains(g)){const y=new CustomEvent(cs,tc);a.addEventListener(cs,u),a.dispatchEvent(y),y.defaultPrevented||(Jw(oC(nd(a)),{select:!0}),document.activeElement===g&&qt(a))}return()=>{a.removeEventListener(cs,u),setTimeout(()=>{const y=new CustomEvent(ls,tc);a.addEventListener(ls,d),a.dispatchEvent(y),y.defaultPrevented||qt(g??document.body,{select:!0}),a.removeEventListener(ls,d),rc.remove(p)},0)}}},[a,u,d,p]);const b=c.useCallback(g=>{if(!n&&!r||p.paused)return;const m=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(m&&y){const v=g.currentTarget,[C,w]=eC(v);C&&w?!g.shiftKey&&y===w?(g.preventDefault(),n&&qt(C,{select:!0})):g.shiftKey&&y===C&&(g.preventDefault(),n&&qt(w,{select:!0})):y===v&&g.preventDefault()}},[n,r,p.paused]);return x.jsx(Oe.div,{tabIndex:-1,...i,ref:h,onKeyDown:b})});td.displayName=Qw;function Jw(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(qt(r,{select:t}),document.activeElement!==n)return}function eC(e){const t=nd(e),n=nc(t,e),r=nc(t.reverse(),e);return[n,r]}function nd(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function nc(e,t){for(const n of e)if(!tC(n,{upTo:t}))return n}function tC(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 nC(e){return e instanceof HTMLInputElement&&"select"in e}function qt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&nC(e)&&t&&e.select()}}var rc=rC();function rC(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=oc(e,t),e.unshift(t)},remove(t){e=oc(e,t),e[0]?.resume()}}}function oc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function oC(e){return e.filter(t=>t.tagName!=="A")}var sC="Portal",Mi=c.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=c.useState(!1);tn(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?pc.createPortal(x.jsx(Oe.div,{...r,ref:t}),i):null});Mi.displayName=sC;var us=0;function iC(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??sc()),document.body.insertAdjacentElement("beforeend",e[1]??sc()),us++,()=>{us===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),us--}},[])}function sc(){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 Ot=function(){return Ot=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ot.apply(this,arguments)};function rd(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function aC(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Vr="right-scroll-bar-position",Fr="width-before-scroll-bar",cC="with-scroll-bars-hidden",lC="--removed-body-scroll-bar-size";function ds(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function uC(e,t){var n=Le.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var dC=typeof window<"u"?c.useLayoutEffect:c.useEffect,ic=new WeakMap;function fC(e,t){var n=uC(null,function(r){return e.forEach(function(o){return ds(o,r)})});return dC(function(){var r=ic.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||ds(a,null)}),s.forEach(function(a){o.has(a)||ds(a,i)})}ic.set(n,e)},[e]),n}function pC(e){return e}function mC(e,t){t===void 0&&(t=pC);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var d=i;i=[],d.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return o}function hC(e){e===void 0&&(e={});var t=mC(null);return t.options=Ot({async:!0,ssr:!1},e),t}var od=function(e){var t=e.sideCar,n=rd(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,Ot({},n))};od.isSideCarExport=!0;function gC(e,t){return e.useMedium(t),od}var sd=hC(),fs=function(){},Ro=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:fs,onWheelCapture:fs,onTouchMoveCapture:fs}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,p=e.noRelative,b=e.noIsolation,g=e.inert,m=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,C=e.gapMode,w=rd(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=h,k=fC([n,t]),S=Ot(Ot({},w),o);return c.createElement(c.Fragment,null,d&&c.createElement(R,{sideCar:sd,removeScrollBar:u,shards:f,noRelative:p,noIsolation:b,inert:g,setCallbacks:s,allowPinchZoom:!!m,lockRef:n,gapMode:C}),i?c.cloneElement(c.Children.only(a),Ot(Ot({},S),{ref:k})):c.createElement(v,Ot({},S,{className:l,ref:k}),a))});Ro.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ro.classNames={fullWidth:Fr,zeroRight:Vr};var bC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function vC(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=bC();return t&&e.setAttribute("nonce",t),e}function yC(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xC(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var wC=function(){var e=0,t=null;return{add:function(n){e==0&&(t=vC())&&(yC(t,n),xC(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},CC=function(){var e=wC();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},id=function(){var e=CC(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},EC={left:0,top:0,right:0,gap:0},ps=function(e){return parseInt(e||"",10)||0},RC=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ps(n),ps(r),ps(o)]},SC=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return EC;var t=RC(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},kC=id(),Mn="data-scroll-locked",IC=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
102
|
+
.`.concat(cC,` {
|
|
103
103
|
overflow: hidden `).concat(r,`;
|
|
104
104
|
padding-right: `).concat(a,"px ").concat(r,`;
|
|
105
105
|
}
|
|
@@ -116,47 +116,47 @@ has-data-[slot=combobox-chip-remove]:pr-0`,yw=je(`text-primary-text placeholder:
|
|
|
116
116
|
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
.`).concat(
|
|
119
|
+
.`).concat(Vr,` {
|
|
120
120
|
right: `).concat(a,"px ").concat(r,`;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
.`).concat(
|
|
123
|
+
.`).concat(Fr,` {
|
|
124
124
|
margin-right: `).concat(a,"px ").concat(r,`;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
.`).concat(
|
|
127
|
+
.`).concat(Vr," .").concat(Vr,` {
|
|
128
128
|
right: 0 `).concat(r,`;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
.`).concat(
|
|
131
|
+
.`).concat(Fr," .").concat(Fr,` {
|
|
132
132
|
margin-right: 0 `).concat(r,`;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
body[`).concat(Mn,`] {
|
|
136
|
-
`).concat(
|
|
136
|
+
`).concat(lC,": ").concat(a,`px;
|
|
137
137
|
}
|
|
138
|
-
`)},
|
|
138
|
+
`)},ac=function(){var e=parseInt(document.body.getAttribute(Mn)||"0",10);return isFinite(e)?e:0},NC=function(){c.useEffect(function(){return document.body.setAttribute(Mn,(ac()+1).toString()),function(){var e=ac()-1;e<=0?document.body.removeAttribute(Mn):document.body.setAttribute(Mn,e.toString())}},[])},OC=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;NC();var s=c.useMemo(function(){return SC(o)},[o]);return c.createElement(kC,{styles:IC(s,!t,o,n?"":"!important")})},Ds=!1;if(typeof window<"u")try{var Ar=Object.defineProperty({},"passive",{get:function(){return Ds=!0,!0}});window.addEventListener("test",Ar,Ar),window.removeEventListener("test",Ar,Ar)}catch{Ds=!1}var Rn=Ds?{passive:!1}:!1,PC=function(e){return e.tagName==="TEXTAREA"},ad=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!PC(e)&&n[t]==="visible")},TC=function(e){return ad(e,"overflowY")},AC=function(e){return ad(e,"overflowX")},cc=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=cd(e,r);if(o){var s=ld(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},MC=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},_C=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},cd=function(e,t){return e==="v"?TC(t):AC(t)},ld=function(e,t){return e==="v"?MC(t):_C(t)},DC=function(e,t){return e==="h"&&t==="rtl"?-1:1},LC=function(e,t,n,r,o){var s=DC(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,l=t.contains(a),u=!1,d=i>0,f=0,h=0;do{if(!a)break;var p=ld(e,a),b=p[0],g=p[1],m=p[2],y=g-m-s*b;(b||y)&&cd(e,a)&&(f+=y,h+=b);var v=a.parentNode;a=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&Math.abs(f)<1||!d&&Math.abs(h)<1)&&(u=!0),u},Mr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},lc=function(e){return[e.deltaX,e.deltaY]},uc=function(e){return e&&"current"in e?e.current:e},jC=function(e,t){return e[0]===t[0]&&e[1]===t[1]},VC=function(e){return`
|
|
139
139
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
140
140
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
141
|
-
`)},
|
|
141
|
+
`)},FC=0,Sn=[];function $C(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(FC++)[0],s=c.useState(id)[0],i=c.useRef(e);c.useEffect(function(){i.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=aC([e.lockRef.current],(e.shards||[]).map(uc),!0).filter(Boolean);return g.forEach(function(m){return m.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(g,m){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var y=Mr(g),v=n.current,C="deltaX"in g?g.deltaX:v[0]-y[0],w="deltaY"in g?g.deltaY:v[1]-y[1],R,k=g.target,S=Math.abs(C)>Math.abs(w)?"h":"v";if("touches"in g&&S==="h"&&k.type==="range")return!1;var E=window.getSelection(),V=E&&E.anchorNode,W=V?V===k||V.contains(k):!1;if(W)return!1;var H=cc(S,k);if(!H)return!0;if(H?R=S:(R=S==="v"?"h":"v",H=cc(S,k)),!H)return!1;if(!r.current&&"changedTouches"in g&&(C||w)&&(r.current=R),!R)return!0;var P=r.current||R;return LC(P,m,g,P==="h"?C:w)},[]),l=c.useCallback(function(g){var m=g;if(!(!Sn.length||Sn[Sn.length-1]!==s)){var y="deltaY"in m?lc(m):Mr(m),v=t.current.filter(function(R){return R.name===m.type&&(R.target===m.target||m.target===R.shadowParent)&&jC(R.delta,y)})[0];if(v&&v.should){m.cancelable&&m.preventDefault();return}if(!v){var C=(i.current.shards||[]).map(uc).filter(Boolean).filter(function(R){return R.contains(m.target)}),w=C.length>0?a(m,C[0]):!i.current.noIsolation;w&&m.cancelable&&m.preventDefault()}}},[]),u=c.useCallback(function(g,m,y,v){var C={name:g,delta:m,target:y,should:v,shadowParent:zC(y)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(w){return w!==C})},1)},[]),d=c.useCallback(function(g){n.current=Mr(g),r.current=void 0},[]),f=c.useCallback(function(g){u(g.type,lc(g),g.target,a(g,e.lockRef.current))},[]),h=c.useCallback(function(g){u(g.type,Mr(g),g.target,a(g,e.lockRef.current))},[]);c.useEffect(function(){return Sn.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Rn),document.addEventListener("touchmove",l,Rn),document.addEventListener("touchstart",d,Rn),function(){Sn=Sn.filter(function(g){return g!==s}),document.removeEventListener("wheel",l,Rn),document.removeEventListener("touchmove",l,Rn),document.removeEventListener("touchstart",d,Rn)}},[]);var p=e.removeScrollBar,b=e.inert;return c.createElement(c.Fragment,null,b?c.createElement(s,{styles:VC(o)}):null,p?c.createElement(OC,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function zC(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const BC=gC(sd,$C);var ud=c.forwardRef(function(e,t){return c.createElement(Ro,Ot({},e,{ref:t,sideCar:BC}))});ud.classNames=Ro.classNames;var GC=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},kn=new WeakMap,_r=new WeakMap,Dr={},ms=0,dd=function(e){return e&&(e.host||dd(e.parentNode))},HC=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=dd(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},WC=function(e,t,n,r){var o=HC(t,Array.isArray(e)?e:[e]);Dr[n]||(Dr[n]=new WeakMap);var s=Dr[n],i=[],a=new Set,l=new Set(o),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};o.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(a.has(h))d(h);else try{var p=h.getAttribute(r),b=p!==null&&p!=="false",g=(kn.get(h)||0)+1,m=(s.get(h)||0)+1;kn.set(h,g),s.set(h,m),i.push(h),g===1&&b&&_r.set(h,!0),m===1&&h.setAttribute(n,"true"),b||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return d(t),a.clear(),ms++,function(){i.forEach(function(f){var h=kn.get(f)-1,p=s.get(f)-1;kn.set(f,h),s.set(f,p),h||(_r.has(f)||f.removeAttribute(r),_r.delete(f)),p||f.removeAttribute(n)}),ms--,ms||(kn=new WeakMap,kn=new WeakMap,_r=new WeakMap,Dr={})}},UC=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=GC(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),WC(r,o,n,"aria-hidden")):function(){return null}},So="Dialog",[fd]=At(So),[KC,kt]=fd(So),pd=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=c.useRef(null),l=c.useRef(null),[u,d]=wn({prop:r,defaultProp:o??!1,onChange:s,caller:So});return x.jsx(KC,{scope:t,triggerRef:a,contentRef:l,contentId:An(),titleId:An(),descriptionId:An(),open:u,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(f=>!f),[d]),modal:i,children:n})};pd.displayName=So;var md="DialogTrigger",hd=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=kt(md,n),s=ze(t,o.triggerRef);return x.jsx(Oe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Li(o.open),...r,ref:s,onClick:Ne(e.onClick,o.onOpenToggle)})});hd.displayName=md;var _i="DialogPortal",[qC,gd]=fd(_i,{forceMount:void 0}),bd=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=kt(_i,t);return x.jsx(qC,{scope:t,forceMount:n,children:c.Children.map(r,i=>x.jsx($t,{present:n||s.open,children:x.jsx(Mi,{asChild:!0,container:o,children:i})}))})};bd.displayName=_i;var no="DialogOverlay",vd=c.forwardRef((e,t)=>{const n=gd(no,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=kt(no,e.__scopeDialog);return s.modal?x.jsx($t,{present:r||s.open,children:x.jsx(XC,{...o,ref:t})}):null});vd.displayName=no;var YC=Br("DialogOverlay.RemoveScroll"),XC=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=kt(no,n);return x.jsx(ud,{as:YC,allowPinchZoom:!0,shards:[o.contentRef],children:x.jsx(Oe.div,{"data-state":Li(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),yn="DialogContent",yd=c.forwardRef((e,t)=>{const n=gd(yn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=kt(yn,e.__scopeDialog);return x.jsx($t,{present:r||s.open,children:s.modal?x.jsx(ZC,{...o,ref:t}):x.jsx(QC,{...o,ref:t})})});yd.displayName=yn;var ZC=c.forwardRef((e,t)=>{const n=kt(yn,e.__scopeDialog),r=c.useRef(null),o=ze(t,n.contentRef,r);return c.useEffect(()=>{const s=r.current;if(s)return UC(s)},[]),x.jsx(xd,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ne(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ne(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:Ne(e.onFocusOutside,s=>s.preventDefault())})}),QC=c.forwardRef((e,t)=>{const n=kt(yn,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return x.jsx(xd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),xd=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=kt(yn,n),l=c.useRef(null),u=ze(t,l);return iC(),x.jsxs(x.Fragment,{children:[x.jsx(td,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:x.jsx(Ai,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Li(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),x.jsxs(x.Fragment,{children:[x.jsx(JC,{titleId:a.titleId}),x.jsx(tE,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Di="DialogTitle",wd=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=kt(Di,n);return x.jsx(Oe.h2,{id:o.titleId,...r,ref:t})});wd.displayName=Di;var Cd="DialogDescription",Ed=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=kt(Cd,n);return x.jsx(Oe.p,{id:o.descriptionId,...r,ref:t})});Ed.displayName=Cd;var Rd="DialogClose",Sd=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=kt(Rd,n);return x.jsx(Oe.button,{type:"button",...r,ref:t,onClick:Ne(e.onClick,()=>o.onOpenChange(!1))})});Sd.displayName=Rd;function Li(e){return e?"open":"closed"}var kd="DialogTitleWarning",[nR,Id]=Ym(kd,{contentName:yn,titleName:Di,docsSlug:"dialog"}),JC=({titleId:e})=>{const t=Id(kd),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
142
142
|
|
|
143
143
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
144
144
|
|
|
145
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},
|
|
146
|
-
hover:text-primary-inverse-text`,false:"text-secondary-text hover:bg-primary-hover-bg hover:text-primary-text"}},defaultVariants:{collapsed:!1,active:!1}}),
|
|
145
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},eE="DialogDescriptionWarning",tE=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Id(eE).contentName}}.`;return c.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},nE=pd,rE=hd,oE=bd,Nd=vd,Od=yd,Pd=wd,Td=Ed,Ad=Sd;const sE=["data-open:animate-in data-closed:animate-out data-closed:fade-out-0","data-open:fade-in-0 bg-primary-inverse-bg/20 duration-100","fixed inset-0 isolate z-50"],iE=["fixed left-[50%] top-[50%] z-50 grid w-full max-w-[45.125rem] translate-x-[-50%]","translate-y-[-50%] gap-8 bg-primary-bg p-6 shadow-[0px_10px_40px_0px_rgba(0,0,0,0.15)] duration-200","rounded-[8px]","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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]"],aE=["absolute cursor-pointer right-6 top-7 inline-flex size-5 items-center justify-center rounded-sm text-secondary-text","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inp-focus-border","disabled:pointer-events-none"],cE=["flex flex-col gap-1.5 pr-10 text-left"],lE=["flex flex-col-reverse sm:flex-row sm:justify-end gap-4 [&>*]:flex-1"],uE=["relative pb-3 tracking-normal text-lg font-medium text-primary-text","after:pointer-events-none after:absolute after:bottom-0 after:h-px after:-left-6 after:-right-16 after:bg-delicate-border"],dE=["tracking-normal text-sm font-normal text-secondary-text"],fE=nE,pE=rE,Md=oE,mE=Ad,ji=({className:e,...t})=>x.jsx(Nd,{className:z(...sE,e),...t});ji.displayName=Nd.displayName;const _d=({className:e,children:t,showCloseButton:n=!0,...r})=>x.jsxs(Md,{children:[x.jsx(ji,{}),x.jsxs(Od,{className:z(...iE,e),...r,children:[t,n&&x.jsxs(Ad,{className:z(...aE),children:[x.jsx(ao,{type:"close",viewBox:"3.2 3.2 17.1 17.1"}),x.jsx("span",{className:"sr-only",children:"Close"})]})]})]});_d.displayName=Od.displayName;const Dd=({className:e,...t})=>x.jsx("div",{className:z(...cE,e),...t});Dd.displayName="DialogHeader";const Ld=({className:e,...t})=>x.jsx("div",{className:z(...lE,e),...t});Ld.displayName="DialogFooter";const jd=({className:e,...t})=>x.jsx(Pd,{className:z(...uE,e),...t});jd.displayName=Pd.displayName;const Vd=({className:e,...t})=>x.jsx(Td,{className:z(...dE,e),...t});Vd.displayName=Td.displayName;const hE=je(["flex h-9 w-full cursor-pointer items-center rounded-xl transition-colors","disabled:pointer-events-none disabled:opacity-50"].join(" "),{variants:{collapsed:{true:"justify-center px-0",false:"justify-start gap-3 px-2"},active:{true:`bg-primary-inverse-bg text-primary-inverse-text hover:bg-primary-inverse-bg
|
|
146
|
+
hover:text-primary-inverse-text`,false:"text-secondary-text hover:bg-primary-hover-bg hover:text-primary-text"}},defaultVariants:{collapsed:!1,active:!1}}),gE=qe("body-sm-medium"),bE=({icon:e,label:t,badge:n,active:r=!1,collapsed:o=!1,disabled:s=!1,onAction:i,className:a,...l})=>{const u=z(hE({active:r,collapsed:o}),s&&"pointer-events-none opacity-50",a),d=x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"shrink-0 text-inherit [&_svg]:size-5 [&_svg]:shrink-0",children:e}),!o&&t&&x.jsx("span",{className:gE,children:t}),!o&&n&&x.jsx("span",{className:"ml-auto shrink-0",children:n})]});if("href"in l&&typeof l.href=="string"){const{href:p,rel:b,target:g,...m}=l,y=g==="_blank"?[b,"noopener","noreferrer"].filter(Boolean).join(" "):b;return x.jsx("a",{href:p,target:g,rel:y,"aria-disabled":s||void 0,tabIndex:s?-1:void 0,className:u,onClick:v=>{if(s){v.preventDefault();return}i?.()},...m,children:d})}const{type:f="button",...h}=l;return x.jsx("button",{type:f,disabled:s,className:u,onClick:()=>i?.(),...h,children:d})},vE=je("px-2.5 py-3",{variants:{divider:{true:"",false:""}},defaultVariants:{divider:!1}}),yE=[qe("body-xs-medium"),"mb-1 px-2 text-secondary-text uppercase"].join(" "),xE=({title:e,divider:t=!1,collapsed:n=!1,className:r,children:o,...s})=>x.jsxs("section",{className:z(vE({divider:t}),r),...s,children:[!n&&e&&x.jsx("p",{className:yE,children:e}),x.jsx("div",{className:"space-y-1",children:o})]}),Fd=({className:e,...t})=>x.jsx("nav",{role:"navigation","aria-label":"pagination",className:z("mx-auto flex w-full justify-center",e),...t});Fd.displayName="Pagination";const $d=({className:e,ref:t,...n})=>x.jsx("ul",{ref:t,className:z("flex flex-row items-center gap-1",e),...n});$d.displayName="PaginationContent";const zd=({className:e,ref:t,...n})=>x.jsx("li",{ref:t,className:z("",e),...n});zd.displayName="PaginationItem";const ko=({className:e,isActive:t,size:n=null,...r})=>x.jsx("a",{"aria-current":t?"page":void 0,className:z(Gs({size:n}),e),...r});ko.displayName="PaginationLink";const Bd=({className:e,...t})=>x.jsxs(ko,{"aria-label":"Go to previous page",size:"md",className:z("gap-1 pl-2.5",e),...t,children:[x.jsx(_h,{className:"h-4 w-4"}),x.jsx("span",{children:"Previous"})]});Bd.displayName="PaginationPrevious";const Gd=({className:e,...t})=>x.jsxs(ko,{"aria-label":"Go to next page",size:"md",className:z("gap-1 pr-2.5",e),...t,children:[x.jsx("span",{children:"Next"}),x.jsx(Lh,{className:"h-4 w-4"})]});Gd.displayName="PaginationNext";const Hd=({className:e,...t})=>x.jsxs("span",{"aria-hidden":!0,className:z("flex h-9 w-9 items-center justify-center",e),...t,children:[x.jsx(Qc,{className:"h-4 w-4"}),x.jsx("span",{className:"sr-only",children:"More pages"})]});Hd.displayName="PaginationEllipsis";function wE(e,t=[]){let n=[];function r(s,i){const a=c.createContext(i);a.displayName=s+"Context";const l=n.length;n=[...n,i];const u=f=>{const{scope:h,children:p,...b}=f,g=h?.[e]?.[l]||a,m=c.useMemo(()=>b,Object.values(b));return x.jsx(g.Provider,{value:m,children:p})};u.displayName=s+"Provider";function d(f,h){const p=h?.[e]?.[l]||a,b=c.useContext(p);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(i=>c.createContext(i));return function(a){const l=a?.[e]||s;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,CE(o,...t)]}function CE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...a,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Vi="Progress",Fi=100,[EE]=wE(Vi),[RE,SE]=EE(Vi),Wd=c.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:s=kE,...i}=e;(o||o===0)&&!dc(o)&&console.error(IE(`${o}`,"Progress"));const a=dc(o)?o:Fi;r!==null&&!fc(r,a)&&console.error(NE(`${r}`,"Progress"));const l=fc(r,a)?r:null,u=ro(l)?s(l,a):void 0;return x.jsx(RE,{scope:n,value:l,max:a,children:x.jsx(Co.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":ro(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":qd(l,a),"data-value":l??void 0,"data-max":a,...i,ref:t})})});Wd.displayName=Vi;var Ud="ProgressIndicator",Kd=c.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=SE(Ud,n);return x.jsx(Co.div,{"data-state":qd(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Kd.displayName=Ud;function kE(e,t){return`${Math.round(e/t*100)}%`}function qd(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function ro(e){return typeof e=="number"}function dc(e){return ro(e)&&!isNaN(e)&&e>0}function fc(e,t){return ro(e)&&!isNaN(e)&&e<=t&&e>=0}function IE(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Fi}\`.`}function NE(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
147
147
|
- a positive number
|
|
148
|
-
- less than the value passed to \`max\` (or ${
|
|
148
|
+
- less than the value passed to \`max\` (or ${Fi} if no \`max\` prop is set)
|
|
149
149
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
150
150
|
|
|
151
|
-
Defaulting to \`null\`.`}var Gd=Fd,EE=zd;const Hd=({className:e,value:t=0,max:n=100,ref:r,...o})=>{const s=Math.min(n,Math.max(0,Number(t))),i=s/n*100,a=i>=100,l=`${Math.round(i)}%`;return x.jsxs("div",{className:"flex items-center gap-1",children:[x.jsx(Gd,{ref:r,value:s,max:n,className:z("bg-primary-inverse-bg/20 relative h-1.5 w-full overflow-hidden rounded-full",e),...o,children:x.jsx(EE,{className:z("h-full w-full flex-1 rounded-[0.75rem] transition-all",a?"bg-success-text":"bg-primary-inverse-bg"),style:{transform:`translateX(-${n-i}%)`}})}),x.jsx("p",{className:z("text-center",qe("body-xs-regular"),a?"text-success-text":"text-primary-text"),children:l})]})};Hd.displayName=Gd.displayName;function RE(e){const t=e+"CollectionProvider",[n,r]=At(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:m,children:y}=g,v=Le.useRef(null),C=Le.useRef(new Map).current;return x.jsx(o,{scope:m,itemMap:C,collectionRef:v,children:y})};i.displayName=t;const a=e+"CollectionSlot",l=Fr(a),u=Le.forwardRef((g,m)=>{const{scope:y,children:v}=g,C=s(a,y),w=ze(m,C.collectionRef);return x.jsx(l,{ref:w,children:v})});u.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=Fr(d),p=Le.forwardRef((g,m)=>{const{scope:y,children:v,...C}=g,w=Le.useRef(null),R=ze(m,w),k=s(d,y);return Le.useEffect(()=>(k.itemMap.set(w,{ref:w,...C}),()=>{k.itemMap.delete(w)})),x.jsx(h,{[f]:"",ref:R,children:v})});p.displayName=d;function b(g){const m=s(e+"CollectionConsumer",g);return Le.useCallback(()=>{const v=m.collectionRef.current;if(!v)return[];const C=Array.from(v.querySelectorAll(`[${f}]`));return Array.from(m.itemMap.values()).sort((k,S)=>C.indexOf(k.ref.current)-C.indexOf(S.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:i,Slot:u,ItemSlot:p},b,r]}var SE=c.createContext(void 0);function ji(e){const t=c.useContext(SE);return e||t||"ltr"}var fs="rovingFocusGroup.onEntryFocus",kE={bubbles:!1,cancelable:!0},or="RovingFocusGroup",[Ms,Wd,IE]=RE(or),[NE,Ro]=At(or,[IE]),[OE,PE]=NE(or),Ud=c.forwardRef((e,t)=>x.jsx(Ms.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsx(Ms.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsx(TE,{...e,ref:t})})}));Ud.displayName=or;var TE=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=c.useRef(null),p=ze(t,h),b=ji(s),[g,m]=wn({prop:i,defaultProp:a??null,onChange:l,caller:or}),[y,v]=c.useState(!1),C=vn(u),w=Wd(n),R=c.useRef(!1),[k,S]=c.useState(0);return c.useEffect(()=>{const E=h.current;if(E)return E.addEventListener(fs,C),()=>E.removeEventListener(fs,C)},[C]),x.jsx(OE,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:g,onItemFocus:c.useCallback(E=>m(E),[m]),onItemShiftTab:c.useCallback(()=>v(!0),[]),onFocusableItemAdd:c.useCallback(()=>S(E=>E+1),[]),onFocusableItemRemove:c.useCallback(()=>S(E=>E-1),[]),children:x.jsx(Oe.div,{tabIndex:y||k===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:Ne(e.onMouseDown,()=>{R.current=!0}),onFocus:Ne(e.onFocus,E=>{const V=!R.current;if(E.target===E.currentTarget&&V&&!y){const W=new CustomEvent(fs,kE);if(E.currentTarget.dispatchEvent(W),!W.defaultPrevented){const H=w().filter(N=>N.focusable),P=H.find(N=>N.active),q=H.find(N=>N.id===g),$=[P,q,...H].filter(Boolean).map(N=>N.ref.current);Yd($,d)}}R.current=!1}),onBlur:Ne(e.onBlur,()=>v(!1))})})}),Kd="RovingFocusGroupItem",qd=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...a}=e,l=An(),u=s||l,d=PE(Kd,n),f=d.currentTabStopId===u,h=Wd(n),{onFocusableItemAdd:p,onFocusableItemRemove:b,currentTabStopId:g}=d;return c.useEffect(()=>{if(r)return p(),()=>b()},[r,p,b]),x.jsx(Ms.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:x.jsx(Oe.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:Ne(e.onMouseDown,m=>{r?d.onItemFocus(u):m.preventDefault()}),onFocus:Ne(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:Ne(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){d.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const y=_E(m,d.orientation,d.dir);if(y!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let C=h().filter(w=>w.focusable).map(w=>w.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const w=C.indexOf(m.currentTarget);C=d.loop?DE(C,w+1):C.slice(w+1)}setTimeout(()=>Yd(C))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:g!=null}):i})})});qd.displayName=Kd;var AE={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ME(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function _E(e,t,n){const r=ME(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return AE[r]}function Yd(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function DE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Xd=Ud,Zd=qd,Vi="Radio",[LE,Qd]=At(Vi),[jE,VE]=LE(Vi),Jd=c.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:s,disabled:i,value:a="on",onCheck:l,form:u,...d}=e,[f,h]=c.useState(null),p=ze(t,m=>h(m)),b=c.useRef(!1),g=f?u||!!f.closest("form"):!0;return x.jsxs(jE,{scope:n,checked:o,disabled:i,children:[x.jsx(Oe.button,{type:"button",role:"radio","aria-checked":o,"data-state":rf(o),"data-disabled":i?"":void 0,disabled:i,value:a,...d,ref:p,onClick:Ne(e.onClick,m=>{o||l?.(),g&&(b.current=m.isPropagationStopped(),b.current||m.stopPropagation())})}),g&&x.jsx(nf,{control:f,bubbles:!b.current,name:r,value:a,checked:o,required:s,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});Jd.displayName=Vi;var ef="RadioIndicator",tf=c.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,s=VE(ef,n);return x.jsx($t,{present:r||s.checked,children:x.jsx(Oe.span,{"data-state":rf(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});tf.displayName=ef;var FE="RadioBubbleInput",nf=c.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const i=c.useRef(null),a=ze(i,s),l=zs(n),u=no(t);return c.useEffect(()=>{const d=i.current;if(!d)return;const f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&p){const b=new Event("click",{bubbles:r});p.call(d,n),d.dispatchEvent(b)}},[l,n,r]),x.jsx(Oe.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});nf.displayName=FE;function rf(e){return e?"checked":"unchecked"}var $E=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],So="RadioGroup",[zE]=At(So,[Ro,Qd]),of=Ro(),sf=Qd(),[BE,GE]=zE(So),af=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:s,required:i=!1,disabled:a=!1,orientation:l,dir:u,loop:d=!0,onValueChange:f,...h}=e,p=of(n),b=ji(u),[g,m]=wn({prop:s,defaultProp:o??null,onChange:f,caller:So});return x.jsx(BE,{scope:n,name:r,required:i,disabled:a,value:g,onValueChange:m,children:x.jsx(Xd,{asChild:!0,...p,orientation:l,dir:b,loop:d,children:x.jsx(Oe.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":a?"":void 0,dir:b,...h,ref:t})})})});af.displayName=So;var cf="RadioGroupItem",lf=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,s=GE(cf,n),i=s.disabled||r,a=of(n),l=sf(n),u=c.useRef(null),d=ze(t,u),f=s.value===o.value,h=c.useRef(!1);return c.useEffect(()=>{const p=g=>{$E.includes(g.key)&&(h.current=!0)},b=()=>h.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",b)}},[]),x.jsx(Zd,{asChild:!0,...a,focusable:!i,active:f,children:x.jsx(Jd,{disabled:i,required:s.required,checked:f,...l,...o,name:s.name,ref:d,onCheck:()=>s.onValueChange(o.value),onKeyDown:Ne(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:Ne(o.onFocus,()=>{h.current&&u.current?.click()})})})});lf.displayName=cf;var HE="RadioGroupIndicator",uf=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=sf(n);return x.jsx(tf,{...o,...r,ref:t})});uf.displayName=HE;var df=af,ff=lf,WE=uf;const UE=["grid gap-2"],KE=["group size-5 cursor-pointer place-content-center rounded-full border transition-colors duration-200","border-inp-hover-border bg-primary-bg","data-[state=checked]:border-primary-text","enabled:hover:border-inp-hover-border enabled:hover:bg-tertiary-bg","enabled:hover:data-[state=checked]:border-inp-hover-border enabled:hover:data-[state=checked]:bg-tertiary-bg","disabled:cursor-not-allowed disabled:border-disabled-border disabled:bg-disabled-bg","disabled:data-[state=checked]:border-disabled-border disabled:data-[state=checked]:bg-disabled-bg","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inp-focus-border"],qE=["flex items-center justify-center"],YE=["size-2.5 rounded-full bg-primary-text transition-colors duration-200","group-hover:bg-secondary-text","group-disabled:bg-disabled-text"],pf=({className:e,ref:t,...n})=>x.jsx(df,{className:z(UE,e),...n,ref:t});pf.displayName=df.displayName;const mf=({className:e,ref:t,...n})=>x.jsx(ff,{ref:t,className:z(KE,e),...n,children:x.jsx(WE,{className:z(qE),children:x.jsx("span",{className:z(YE)})})});mf.displayName=ff.displayName;var ko="Switch",[XE]=At(ko),[ZE,QE]=XE(ko),hf=c.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:l="on",onCheckedChange:u,form:d,...f}=e,[h,p]=c.useState(null),b=ze(t,C=>p(C)),g=c.useRef(!1),m=h?d||!!h.closest("form"):!0,[y,v]=wn({prop:o,defaultProp:s??!1,onChange:u,caller:ko});return x.jsxs(ZE,{scope:n,checked:y,disabled:a,children:[x.jsx(Oe.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":yf(y),"data-disabled":a?"":void 0,disabled:a,value:l,...f,ref:b,onClick:Ne(e.onClick,C=>{v(w=>!w),m&&(g.current=C.isPropagationStopped(),g.current||C.stopPropagation())})}),m&&x.jsx(vf,{control:h,bubbles:!g.current,name:r,value:l,checked:y,required:i,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});hf.displayName=ko;var gf="SwitchThumb",bf=c.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=QE(gf,n);return x.jsx(Oe.span,{"data-state":yf(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});bf.displayName=gf;var JE="SwitchBubbleInput",vf=c.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const i=c.useRef(null),a=ze(i,s),l=zs(n),u=no(t);return c.useEffect(()=>{const d=i.current;if(!d)return;const f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&p){const b=new Event("click",{bubbles:r});p.call(d,n),d.dispatchEvent(b)}},[l,n,r]),x.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});vf.displayName=JE;function yf(e){return e?"checked":"unchecked"}var xf=hf,e0=bf;const t0=["peer group relative inline-flex h-6 w-12 shrink-0 cursor-pointer items-center rounded-full border p-1 transition-colors","border-inp-default-border bg-primary-bg","enabled:hover:border-inp-hover-border","data-[state=checked]:bg-primary-inverse-bg","data-[state=checked]:border-inp-default-border enabled:hover:data-[state=checked]:border-inp-hover-border","disabled:cursor-not-allowed disabled:border-disabled-border disabled:bg-disabled-bg","disabled:data-[state=checked]:border-disabled-border disabled:data-[state=checked]:bg-disabled-bg","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inp-focus-border"],n0=["pointer-events-none block size-4 rounded-full transition-transform","bg-primary-inverse-bg data-[state=checked]:translate-x-6 data-[state=checked]:bg-primary-bg","group-disabled:bg-disabled-text group-disabled:data-[state=checked]:bg-disabled-text"],wf=({className:e,ref:t,...n})=>x.jsx(xf,{className:z(t0,e),...n,ref:t,children:x.jsx(e0,{className:z(n0)})});wf.displayName=xf.displayName;const Cf=({ref:e,className:t,...n})=>x.jsx("div",{className:"relative w-full overflow-auto",children:x.jsx("table",{ref:e,className:z("w-full caption-bottom text-sm",t),...n})});Cf.displayName="Table";const Ef=({ref:e,className:t,...n})=>x.jsx("thead",{ref:e,className:z("text-primary-text [&_tr]:border-b",t),...n});Ef.displayName="TableHeader";const Rf=({ref:e,className:t,...n})=>x.jsx("tbody",{ref:e,className:z(t),...n});Rf.displayName="TableBody";const Sf=({ref:e,className:t,...n})=>x.jsx("tfoot",{ref:e,className:z("bg-muted/50 border-t font-medium",t),...n});Sf.displayName="TableFooter";const kf=({ref:e,className:t,...n})=>x.jsx("tr",{ref:e,className:z(`hover:bg-muted/50 data-[state=selected]:bg-muted border-delicate-border border-b
|
|
152
|
-
transition-colors`,t),...n});
|
|
153
|
-
[&:has([role=checkbox])]:pr-0 *:[[role=checkbox]]:translate-y-0.5`,t),...n});
|
|
154
|
-
*:[[role=checkbox]]:translate-y-0.5`,t),...n});
|
|
155
|
-
focus-visible:ring-offset-2 focus-visible:outline-none`,"data-[orientation=vertical]:flex-1",t),...n});Uf.displayName=Bf.displayName;var l0="Arrow",Kf=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return x.jsx(Oe.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});Kf.displayName=l0;var u0=Kf,$i="Popper",[qf,Yf]=At($i),[d0,Xf]=qf($i),Zf=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return x.jsx(d0,{scope:t,anchor:r,onAnchorChange:o,children:n})};Zf.displayName=$i;var Qf="PopperAnchor",Jf=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Xf(Qf,n),i=c.useRef(null),a=ze(t,i),l=c.useRef(null);return c.useEffect(()=>{const u=l.current;l.current=r?.current||i.current,u!==l.current&&s.onAnchorChange(l.current)}),r?null:x.jsx(Oe.div,{...o,ref:a})});Jf.displayName=Qf;var zi="PopperContent",[f0,p0]=qf(zi),ep=c.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:b,...g}=e,m=Xf(zi,n),[y,v]=c.useState(null),C=ze(t,Ce=>v(Ce)),[w,R]=c.useState(null),k=no(w),S=k?.width??0,E=k?.height??0,V=r+(s!=="center"?"-"+s:""),W=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},H=Array.isArray(u)?u:[u],P=H.length>0,q={padding:W,boundary:H.filter(h0),altBoundary:P},{refs:Y,floatingStyles:$,placement:N,isPositioned:B,middlewareData:j}=Hl({strategy:"fixed",placement:V,whileElementsMounted:(...Ce)=>Ns(...Ce,{animationFrame:p==="always"}),elements:{reference:m.anchor},middleware:[Wl({mainAxis:o+E,alignmentAxis:i}),l&&Ul({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Kl():void 0,...q}),l&&ql({...q}),Yl({...q,apply:({elements:Ce,rects:Se,availableWidth:X,availableHeight:pe})=>{const{width:xe,height:O}=Se.reference,A=Ce.floating.style;A.setProperty("--radix-popper-available-width",`${X}px`),A.setProperty("--radix-popper-available-height",`${pe}px`),A.setProperty("--radix-popper-anchor-width",`${xe}px`),A.setProperty("--radix-popper-anchor-height",`${O}px`)}}),w&&Zv({element:w,padding:a}),g0({arrowWidth:S,arrowHeight:E}),h&&Xl({strategy:"referenceHidden",...q})]}),[te,T]=rp(N),we=vn(b);tn(()=>{B&&we?.()},[B,we]);const fe=j.arrow?.x,ye=j.arrow?.y,ae=j.arrow?.centerOffset!==0,[ce,ge]=c.useState();return tn(()=>{y&&ge(window.getComputedStyle(y).zIndex)},[y]),x.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:B?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[j.transformOrigin?.x,j.transformOrigin?.y].join(" "),...j.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(f0,{scope:n,placedSide:te,onArrowChange:R,arrowX:fe,arrowY:ye,shouldHideArrow:ae,children:x.jsx(Oe.div,{"data-side":te,"data-align":T,...g,ref:C,style:{...g.style,animation:B?void 0:"none"}})})})});ep.displayName=zi;var tp="PopperArrow",m0={top:"bottom",right:"left",bottom:"top",left:"right"},np=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=p0(tp,r),i=m0[s.placedSide];return x.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:x.jsx(u0,{...o,ref:n,style:{...o.style,display:"block"}})})});np.displayName=tp;function h0(e){return e!==null}var g0=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,d]=rp(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+l/2;let b="",g="";return u==="bottom"?(b=i?f:`${h}px`,g=`${-l}px`):u==="top"?(b=i?f:`${h}px`,g=`${r.floating.height+l}px`):u==="right"?(b=`${-l}px`,g=i?f:`${p}px`):u==="left"&&(b=`${r.floating.width+l}px`,g=i?f:`${p}px`),{data:{x:b,y:g}}}});function rp(e){const[t,n="center"]=e.split("-");return[t,n]}var b0=Zf,v0=Jf,y0=ep,x0=np,w0=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),C0="VisuallyHidden",op=c.forwardRef((e,t)=>x.jsx(Oe.span,{...e,ref:t,style:{...w0,...e.style}}));op.displayName=C0;var E0=op,[No]=At("Tooltip",[Yf]),Oo=Yf(),sp="TooltipProvider",R0=700,_s="tooltip.open",[S0,Bi]=No(sp),ip=e=>{const{__scopeTooltip:t,delayDuration:n=R0,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=c.useRef(!0),a=c.useRef(!1),l=c.useRef(0);return c.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),x.jsx(S0,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:c.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:s})};ip.displayName=sp;var er="Tooltip",[k0,sr]=No(er),ap=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,l=Bi(er,e.__scopeTooltip),u=Oo(t),[d,f]=c.useState(null),h=An(),p=c.useRef(0),b=i??l.disableHoverableContent,g=a??l.delayDuration,m=c.useRef(!1),[y,v]=wn({prop:r,defaultProp:o??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(_s))):l.onClose(),s?.(S)},caller:er}),C=c.useMemo(()=>y?m.current?"delayed-open":"instant-open":"closed",[y]),w=c.useCallback(()=>{window.clearTimeout(p.current),p.current=0,m.current=!1,v(!0)},[v]),R=c.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),k=c.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{m.current=!0,v(!0),p.current=0},g)},[g,v]);return c.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),x.jsx(b0,{...u,children:x.jsx(k0,{scope:t,contentId:h,open:y,stateAttribute:C,trigger:d,onTriggerChange:f,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?k():w()},[l.isOpenDelayedRef,k,w]),onTriggerLeave:c.useCallback(()=>{b?R():(window.clearTimeout(p.current),p.current=0)},[R,b]),onOpen:w,onClose:R,disableHoverableContent:b,children:n})})};ap.displayName=er;var Ds="TooltipTrigger",cp=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=sr(Ds,n),s=Bi(Ds,n),i=Oo(n),a=c.useRef(null),l=ze(t,a,o.onTriggerChange),u=c.useRef(!1),d=c.useRef(!1),f=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),x.jsx(v0,{asChild:!0,...i,children:x.jsx(Oe.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:Ne(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:Ne(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:Ne(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ne(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Ne(e.onBlur,o.onClose),onClick:Ne(e.onClick,o.onClose)})})});cp.displayName=Ds;var Gi="TooltipPortal",[I0,N0]=No(Gi,{forceMount:void 0}),lp=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=sr(Gi,t);return x.jsx(I0,{scope:t,forceMount:n,children:x.jsx($t,{present:n||s.open,children:x.jsx(Pi,{asChild:!0,container:o,children:r})})})};lp.displayName=Gi;var Ln="TooltipContent",up=c.forwardRef((e,t)=>{const n=N0(Ln,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=sr(Ln,e.__scopeTooltip);return x.jsx($t,{present:r||i.open,children:i.disableHoverableContent?x.jsx(dp,{side:o,...s,ref:t}):x.jsx(O0,{side:o,...s,ref:t})})}),O0=c.forwardRef((e,t)=>{const n=sr(Ln,e.__scopeTooltip),r=Bi(Ln,e.__scopeTooltip),o=c.useRef(null),s=ze(t,o),[i,a]=c.useState(null),{trigger:l,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,h=c.useCallback(()=>{a(null),f(!1)},[f]),p=c.useCallback((b,g)=>{const m=b.currentTarget,y={x:b.clientX,y:b.clientY},v=M0(y,m.getBoundingClientRect()),C=_0(y,v),w=D0(g.getBoundingClientRect()),R=j0([...C,...w]);a(R),f(!0)},[f]);return c.useEffect(()=>()=>h(),[h]),c.useEffect(()=>{if(l&&d){const b=m=>p(m,d),g=m=>p(m,l);return l.addEventListener("pointerleave",b),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",g)}}},[l,d,p,h]),c.useEffect(()=>{if(i){const b=g=>{const m=g.target,y={x:g.clientX,y:g.clientY},v=l?.contains(m)||d?.contains(m),C=!L0(y,i);v?h():C&&(h(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,d,i,u,h]),x.jsx(dp,{...e,ref:s})}),[P0,T0]=No(er,{isInside:!1}),A0=Qm("TooltipContent"),dp=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,l=sr(Ln,n),u=Oo(n),{onClose:d}=l;return c.useEffect(()=>(document.addEventListener(_s,d),()=>document.removeEventListener(_s,d)),[d]),c.useEffect(()=>{if(l.trigger){const f=h=>{h.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),x.jsx(Oi,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:x.jsxs(y0,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.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:[x.jsx(A0,{children:r}),x.jsx(P0,{scope:n,isInside:!0,children:x.jsx(E0,{id:l.contentId,role:"tooltip",children:o||r})})]})})});up.displayName=Ln;var fp="TooltipArrow",pp=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Oo(n);return T0(fp,n).isInside?null:x.jsx(x0,{...o,...r,ref:t})});pp.displayName=fp;function M0(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function _0(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function D0(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function L0(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],u=a.x,d=a.y,f=l.x,h=l.y;d>r!=h>r&&n<(f-u)*(r-d)/(h-d)+u&&(o=!o)}return o}function j0(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),V0(t)}function V0(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var F0=ip,$0=ap,z0=cp,B0=lp,mp=up,G0=pp;const H0=`bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95
|
|
151
|
+
Defaulting to \`null\`.`}var Yd=Wd,OE=Kd;const Xd=({className:e,value:t=0,max:n=100,ref:r,...o})=>{const s=Math.min(n,Math.max(0,Number(t))),i=s/n*100,a=i>=100,l=`${Math.round(i)}%`;return x.jsxs("div",{className:"flex items-center gap-1",children:[x.jsx(Yd,{ref:r,value:s,max:n,className:z("bg-primary-inverse-bg/20 relative h-1.5 w-full overflow-hidden rounded-full",e),...o,children:x.jsx(OE,{className:z("h-full w-full flex-1 rounded-[0.75rem] transition-all",a?"bg-success-text":"bg-primary-inverse-bg"),style:{transform:`translateX(-${n-i}%)`}})}),x.jsx("p",{className:z("text-center",qe("body-xs-regular"),a?"text-success-text":"text-primary-text"),children:l})]})};Xd.displayName=Yd.displayName;function PE(e){const t=e+"CollectionProvider",[n,r]=At(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:m,children:y}=g,v=Le.useRef(null),C=Le.useRef(new Map).current;return x.jsx(o,{scope:m,itemMap:C,collectionRef:v,children:y})};i.displayName=t;const a=e+"CollectionSlot",l=Br(a),u=Le.forwardRef((g,m)=>{const{scope:y,children:v}=g,C=s(a,y),w=ze(m,C.collectionRef);return x.jsx(l,{ref:w,children:v})});u.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=Br(d),p=Le.forwardRef((g,m)=>{const{scope:y,children:v,...C}=g,w=Le.useRef(null),R=ze(m,w),k=s(d,y);return Le.useEffect(()=>(k.itemMap.set(w,{ref:w,...C}),()=>{k.itemMap.delete(w)})),x.jsx(h,{[f]:"",ref:R,children:v})});p.displayName=d;function b(g){const m=s(e+"CollectionConsumer",g);return Le.useCallback(()=>{const v=m.collectionRef.current;if(!v)return[];const C=Array.from(v.querySelectorAll(`[${f}]`));return Array.from(m.itemMap.values()).sort((k,S)=>C.indexOf(k.ref.current)-C.indexOf(S.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:i,Slot:u,ItemSlot:p},b,r]}var TE=c.createContext(void 0);function $i(e){const t=c.useContext(TE);return e||t||"ltr"}var hs="rovingFocusGroup.onEntryFocus",AE={bubbles:!1,cancelable:!0},sr="RovingFocusGroup",[Ls,Zd,ME]=PE(sr),[_E,Io]=At(sr,[ME]),[DE,LE]=_E(sr),Qd=c.forwardRef((e,t)=>x.jsx(Ls.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsx(Ls.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsx(jE,{...e,ref:t})})}));Qd.displayName=sr;var jE=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=c.useRef(null),p=ze(t,h),b=$i(s),[g,m]=wn({prop:i,defaultProp:a??null,onChange:l,caller:sr}),[y,v]=c.useState(!1),C=vn(u),w=Zd(n),R=c.useRef(!1),[k,S]=c.useState(0);return c.useEffect(()=>{const E=h.current;if(E)return E.addEventListener(hs,C),()=>E.removeEventListener(hs,C)},[C]),x.jsx(DE,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:g,onItemFocus:c.useCallback(E=>m(E),[m]),onItemShiftTab:c.useCallback(()=>v(!0),[]),onFocusableItemAdd:c.useCallback(()=>S(E=>E+1),[]),onFocusableItemRemove:c.useCallback(()=>S(E=>E-1),[]),children:x.jsx(Oe.div,{tabIndex:y||k===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:Ne(e.onMouseDown,()=>{R.current=!0}),onFocus:Ne(e.onFocus,E=>{const V=!R.current;if(E.target===E.currentTarget&&V&&!y){const W=new CustomEvent(hs,AE);if(E.currentTarget.dispatchEvent(W),!W.defaultPrevented){const H=w().filter(N=>N.focusable),P=H.find(N=>N.active),q=H.find(N=>N.id===g),$=[P,q,...H].filter(Boolean).map(N=>N.ref.current);tf($,d)}}R.current=!1}),onBlur:Ne(e.onBlur,()=>v(!1))})})}),Jd="RovingFocusGroupItem",ef=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...a}=e,l=An(),u=s||l,d=LE(Jd,n),f=d.currentTabStopId===u,h=Zd(n),{onFocusableItemAdd:p,onFocusableItemRemove:b,currentTabStopId:g}=d;return c.useEffect(()=>{if(r)return p(),()=>b()},[r,p,b]),x.jsx(Ls.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:x.jsx(Oe.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:Ne(e.onMouseDown,m=>{r?d.onItemFocus(u):m.preventDefault()}),onFocus:Ne(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:Ne(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){d.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const y=$E(m,d.orientation,d.dir);if(y!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let C=h().filter(w=>w.focusable).map(w=>w.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const w=C.indexOf(m.currentTarget);C=d.loop?zE(C,w+1):C.slice(w+1)}setTimeout(()=>tf(C))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:g!=null}):i})})});ef.displayName=Jd;var VE={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function FE(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function $E(e,t,n){const r=FE(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return VE[r]}function tf(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function zE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var nf=Qd,rf=ef,zi="Radio",[BE,of]=At(zi),[GE,HE]=BE(zi),sf=c.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:s,disabled:i,value:a="on",onCheck:l,form:u,...d}=e,[f,h]=c.useState(null),p=ze(t,m=>h(m)),b=c.useRef(!1),g=f?u||!!f.closest("form"):!0;return x.jsxs(GE,{scope:n,checked:o,disabled:i,children:[x.jsx(Oe.button,{type:"button",role:"radio","aria-checked":o,"data-state":uf(o),"data-disabled":i?"":void 0,disabled:i,value:a,...d,ref:p,onClick:Ne(e.onClick,m=>{o||l?.(),g&&(b.current=m.isPropagationStopped(),b.current||m.stopPropagation())})}),g&&x.jsx(lf,{control:f,bubbles:!b.current,name:r,value:a,checked:o,required:s,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});sf.displayName=zi;var af="RadioIndicator",cf=c.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,s=HE(af,n);return x.jsx($t,{present:r||s.checked,children:x.jsx(Oe.span,{"data-state":uf(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});cf.displayName=af;var WE="RadioBubbleInput",lf=c.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const i=c.useRef(null),a=ze(i,s),l=Hs(n),u=so(t);return c.useEffect(()=>{const d=i.current;if(!d)return;const f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&p){const b=new Event("click",{bubbles:r});p.call(d,n),d.dispatchEvent(b)}},[l,n,r]),x.jsx(Oe.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});lf.displayName=WE;function uf(e){return e?"checked":"unchecked"}var UE=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],No="RadioGroup",[KE]=At(No,[Io,of]),df=Io(),ff=of(),[qE,YE]=KE(No),pf=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:s,required:i=!1,disabled:a=!1,orientation:l,dir:u,loop:d=!0,onValueChange:f,...h}=e,p=df(n),b=$i(u),[g,m]=wn({prop:s,defaultProp:o??null,onChange:f,caller:No});return x.jsx(qE,{scope:n,name:r,required:i,disabled:a,value:g,onValueChange:m,children:x.jsx(nf,{asChild:!0,...p,orientation:l,dir:b,loop:d,children:x.jsx(Oe.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":a?"":void 0,dir:b,...h,ref:t})})})});pf.displayName=No;var mf="RadioGroupItem",hf=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,s=YE(mf,n),i=s.disabled||r,a=df(n),l=ff(n),u=c.useRef(null),d=ze(t,u),f=s.value===o.value,h=c.useRef(!1);return c.useEffect(()=>{const p=g=>{UE.includes(g.key)&&(h.current=!0)},b=()=>h.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",b)}},[]),x.jsx(rf,{asChild:!0,...a,focusable:!i,active:f,children:x.jsx(sf,{disabled:i,required:s.required,checked:f,...l,...o,name:s.name,ref:d,onCheck:()=>s.onValueChange(o.value),onKeyDown:Ne(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:Ne(o.onFocus,()=>{h.current&&u.current?.click()})})})});hf.displayName=mf;var XE="RadioGroupIndicator",gf=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=ff(n);return x.jsx(cf,{...o,...r,ref:t})});gf.displayName=XE;var bf=pf,vf=hf,ZE=gf;const QE=["grid gap-2"],JE=["group size-5 cursor-pointer place-content-center rounded-full border transition-colors duration-200","border-inp-hover-border bg-primary-bg","data-[state=checked]:border-primary-text","enabled:hover:border-inp-hover-border enabled:hover:bg-tertiary-bg","enabled:hover:data-[state=checked]:border-inp-hover-border enabled:hover:data-[state=checked]:bg-tertiary-bg","disabled:cursor-not-allowed disabled:border-disabled-border disabled:bg-disabled-bg","disabled:data-[state=checked]:border-disabled-border disabled:data-[state=checked]:bg-disabled-bg","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inp-focus-border"],e0=["flex items-center justify-center"],t0=["size-2.5 rounded-full bg-primary-text transition-colors duration-200","group-hover:bg-secondary-text","group-disabled:bg-disabled-text"],yf=({className:e,ref:t,...n})=>x.jsx(bf,{className:z(QE,e),...n,ref:t});yf.displayName=bf.displayName;const xf=({className:e,ref:t,...n})=>x.jsx(vf,{ref:t,className:z(JE,e),...n,children:x.jsx(ZE,{className:z(e0),children:x.jsx("span",{className:z(t0)})})});xf.displayName=vf.displayName;var Oo="Switch",[n0]=At(Oo),[r0,o0]=n0(Oo),wf=c.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:l="on",onCheckedChange:u,form:d,...f}=e,[h,p]=c.useState(null),b=ze(t,C=>p(C)),g=c.useRef(!1),m=h?d||!!h.closest("form"):!0,[y,v]=wn({prop:o,defaultProp:s??!1,onChange:u,caller:Oo});return x.jsxs(r0,{scope:n,checked:y,disabled:a,children:[x.jsx(Oe.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":Sf(y),"data-disabled":a?"":void 0,disabled:a,value:l,...f,ref:b,onClick:Ne(e.onClick,C=>{v(w=>!w),m&&(g.current=C.isPropagationStopped(),g.current||C.stopPropagation())})}),m&&x.jsx(Rf,{control:h,bubbles:!g.current,name:r,value:l,checked:y,required:i,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});wf.displayName=Oo;var Cf="SwitchThumb",Ef=c.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=o0(Cf,n);return x.jsx(Oe.span,{"data-state":Sf(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Ef.displayName=Cf;var s0="SwitchBubbleInput",Rf=c.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const i=c.useRef(null),a=ze(i,s),l=Hs(n),u=so(t);return c.useEffect(()=>{const d=i.current;if(!d)return;const f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&p){const b=new Event("click",{bubbles:r});p.call(d,n),d.dispatchEvent(b)}},[l,n,r]),x.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Rf.displayName=s0;function Sf(e){return e?"checked":"unchecked"}var kf=wf,i0=Ef;const a0=["peer group relative inline-flex h-6 w-12 shrink-0 cursor-pointer items-center rounded-full border p-1 transition-colors","border-inp-default-border bg-primary-bg","enabled:hover:border-inp-hover-border","data-[state=checked]:bg-primary-inverse-bg","data-[state=checked]:border-inp-default-border enabled:hover:data-[state=checked]:border-inp-hover-border","disabled:cursor-not-allowed disabled:border-disabled-border disabled:bg-disabled-bg","disabled:data-[state=checked]:border-disabled-border disabled:data-[state=checked]:bg-disabled-bg","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inp-focus-border"],c0=["pointer-events-none block size-4 rounded-full transition-transform","bg-primary-inverse-bg data-[state=checked]:translate-x-6 data-[state=checked]:bg-primary-bg","group-disabled:bg-disabled-text group-disabled:data-[state=checked]:bg-disabled-text"],If=({className:e,ref:t,...n})=>x.jsx(kf,{className:z(a0,e),...n,ref:t,children:x.jsx(i0,{className:z(c0)})});If.displayName=kf.displayName;const Nf=({ref:e,className:t,...n})=>x.jsx("div",{className:"relative w-full overflow-auto",children:x.jsx("table",{ref:e,className:z("w-full caption-bottom text-sm",t),...n})});Nf.displayName="Table";const Of=({ref:e,className:t,...n})=>x.jsx("thead",{ref:e,className:z("text-primary-text [&_tr]:border-b",t),...n});Of.displayName="TableHeader";const Pf=({ref:e,className:t,...n})=>x.jsx("tbody",{ref:e,className:z(t),...n});Pf.displayName="TableBody";const Tf=({ref:e,className:t,...n})=>x.jsx("tfoot",{ref:e,className:z("bg-muted/50 border-t font-medium",t),...n});Tf.displayName="TableFooter";const Af=({ref:e,className:t,...n})=>x.jsx("tr",{ref:e,className:z(`hover:bg-muted/50 data-[state=selected]:bg-muted border-delicate-border border-b
|
|
152
|
+
transition-colors`,t),...n});Af.displayName="TableRow";const Mf=({ref:e,className:t,...n})=>x.jsx("th",{ref:e,className:z(`text-muted-foreground h-10 px-6.25 text-left align-middle font-medium
|
|
153
|
+
[&:has([role=checkbox])]:pr-0 *:[[role=checkbox]]:translate-y-0.5`,t),...n});Mf.displayName="TableHead";const _f=({ref:e,className:t,...n})=>x.jsx("td",{ref:e,className:z(`px-6.25 pt-6 pb-3.5 align-middle [&:has([role=checkbox])]:pr-0
|
|
154
|
+
*:[[role=checkbox]]:translate-y-0.5`,t),...n});_f.displayName="TableCell";const Df=({ref:e,className:t,...n})=>x.jsx("caption",{ref:e,className:z("text-muted-foreground mt-4 text-sm",t),...n});Df.displayName="TableCaption";var Po="Tabs",[l0]=At(Po,[Io]),Lf=Io(),[u0,Bi]=l0(Po),jf=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:a,activationMode:l="automatic",...u}=e,d=$i(a),[f,h]=wn({prop:r,onChange:o,defaultProp:s??"",caller:Po});return x.jsx(u0,{scope:n,baseId:An(),value:f,onValueChange:h,orientation:i,dir:d,activationMode:l,children:x.jsx(Oe.div,{dir:d,"data-orientation":i,...u,ref:t})})});jf.displayName=Po;var Vf="TabsList",Ff=c.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=Bi(Vf,n),i=Lf(n);return x.jsx(nf,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:r,children:x.jsx(Oe.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});Ff.displayName=Vf;var $f="TabsTrigger",zf=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,i=Bi($f,n),a=Lf(n),l=Hf(i.baseId,r),u=Wf(i.baseId,r),d=r===i.value;return x.jsx(rf,{asChild:!0,...a,focusable:!o,active:d,children:x.jsx(Oe.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...s,ref:t,onMouseDown:Ne(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:Ne(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:Ne(e.onFocus,()=>{const f=i.activationMode!=="manual";!d&&!o&&f&&i.onValueChange(r)})})})});zf.displayName=$f;var Bf="TabsContent",Gf=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...i}=e,a=Bi(Bf,n),l=Hf(a.baseId,r),u=Wf(a.baseId,r),d=r===a.value,f=c.useRef(d);return c.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),x.jsx($t,{present:o||d,children:({present:h})=>x.jsx(Oe.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&s})})});Gf.displayName=Bf;function Hf(e,t){return`${e}-trigger-${t}`}function Wf(e,t){return`${e}-content-${t}`}var d0=jf,Uf=Ff,Kf=zf,qf=Gf;const f0=je(["text-primary-text inline-flex items-stretch","data-[orientation=horizontal]:w-full data-[orientation=horizontal]:gap-1","data-[orientation=vertical]:h-fit data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col data-[orientation=vertical]:gap-1"].join(" "),{variants:{variant:{default:["bg-tertiary-bg rounded-lg","data-[orientation=horizontal]:flex-row"].join(" "),line:["border-default-border border-b","data-[orientation=horizontal]:flex-row"].join(" ")}},defaultVariants:{variant:"default"}}),p0=je(["inline-flex items-center justify-center whitespace-nowrap transition-all","focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","cursor-pointer disabled:pointer-events-none disabled:opacity-50","data-[orientation=horizontal]:h-full data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-1","data-[orientation=vertical]:h-full data-[orientation=vertical]:w-full"].join(" "),{variants:{variant:{default:[qe("body-sm-medium"),"rounded-xl px-3 py-3","text-primary-text hover:bg-primary-hover-bg hover:text-primary-inverse-bg bg-transparent","data-[state=active]:bg-primary-inverse-bg data-[state=active]:text-primary-bg","active:text-primary-bg active:bg-neutral-500"].join(" "),line:[qe("body-sm-medium"),"-mb-px rounded-none border-b-2 border-transparent px-4 py-3","text-primary-inverse-bg hover:bg-primary-hover-bg hover:text-primary-inverse-bg","data-[state=active]:bg-primary-inverse-bg data-[state=active]:text-primary-bg","active:bg-secondary-inverse-text active:text-primary-bg"].join(" ")}},defaultVariants:{variant:"default"}}),Yf=c.createContext("default"),m0=d0,Xf=({ref:e,className:t,variant:n="default",...r})=>x.jsx(Yf,{value:n,children:x.jsx(Uf,{ref:e,className:z(f0({variant:n}),t),...r})});Xf.displayName=Uf.displayName;const Zf=({ref:e,className:t,variant:n,...r})=>{const o=c.use(Yf),s=n??o;return x.jsx(Kf,{ref:e,className:z(p0({variant:s}),t),...r})};Zf.displayName=Kf.displayName;const Qf=({ref:e,className:t,...n})=>x.jsx(qf,{ref:e,className:z(`text-primary-text focus-visible:ring-ring focus-visible:ring-2
|
|
155
|
+
focus-visible:ring-offset-2 focus-visible:outline-none`,"data-[orientation=vertical]:flex-1",t),...n});Qf.displayName=qf.displayName;var h0="Arrow",Jf=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return x.jsx(Oe.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});Jf.displayName=h0;var g0=Jf,Gi="Popper",[ep,tp]=At(Gi),[b0,np]=ep(Gi),rp=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return x.jsx(b0,{scope:t,anchor:r,onAnchorChange:o,children:n})};rp.displayName=Gi;var op="PopperAnchor",sp=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=np(op,n),i=c.useRef(null),a=ze(t,i),l=c.useRef(null);return c.useEffect(()=>{const u=l.current;l.current=r?.current||i.current,u!==l.current&&s.onAnchorChange(l.current)}),r?null:x.jsx(Oe.div,{...o,ref:a})});sp.displayName=op;var Hi="PopperContent",[v0,y0]=ep(Hi),ip=c.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:b,...g}=e,m=np(Hi,n),[y,v]=c.useState(null),C=ze(t,Ce=>v(Ce)),[w,R]=c.useState(null),k=so(w),S=k?.width??0,E=k?.height??0,V=r+(s!=="center"?"-"+s:""),W=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},H=Array.isArray(u)?u:[u],P=H.length>0,q={padding:W,boundary:H.filter(w0),altBoundary:P},{refs:Y,floatingStyles:$,placement:N,isPositioned:B,middlewareData:j}=Xl({strategy:"fixed",placement:V,whileElementsMounted:(...Ce)=>Ts(...Ce,{animationFrame:p==="always"}),elements:{reference:m.anchor},middleware:[Zl({mainAxis:o+E,alignmentAxis:i}),l&&Ql({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Jl():void 0,...q}),l&&eu({...q}),tu({...q,apply:({elements:Ce,rects:Se,availableWidth:X,availableHeight:pe})=>{const{width:xe,height:O}=Se.reference,A=Ce.floating.style;A.setProperty("--radix-popper-available-width",`${X}px`),A.setProperty("--radix-popper-available-height",`${pe}px`),A.setProperty("--radix-popper-anchor-width",`${xe}px`),A.setProperty("--radix-popper-anchor-height",`${O}px`)}}),w&&ry({element:w,padding:a}),C0({arrowWidth:S,arrowHeight:E}),h&&nu({strategy:"referenceHidden",...q})]}),[te,T]=lp(N),we=vn(b);tn(()=>{B&&we?.()},[B,we]);const fe=j.arrow?.x,ye=j.arrow?.y,ae=j.arrow?.centerOffset!==0,[ce,ge]=c.useState();return tn(()=>{y&&ge(window.getComputedStyle(y).zIndex)},[y]),x.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:B?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[j.transformOrigin?.x,j.transformOrigin?.y].join(" "),...j.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(v0,{scope:n,placedSide:te,onArrowChange:R,arrowX:fe,arrowY:ye,shouldHideArrow:ae,children:x.jsx(Oe.div,{"data-side":te,"data-align":T,...g,ref:C,style:{...g.style,animation:B?void 0:"none"}})})})});ip.displayName=Hi;var ap="PopperArrow",x0={top:"bottom",right:"left",bottom:"top",left:"right"},cp=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=y0(ap,r),i=x0[s.placedSide];return x.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:x.jsx(g0,{...o,ref:n,style:{...o.style,display:"block"}})})});cp.displayName=ap;function w0(e){return e!==null}var C0=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,d]=lp(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+l/2;let b="",g="";return u==="bottom"?(b=i?f:`${h}px`,g=`${-l}px`):u==="top"?(b=i?f:`${h}px`,g=`${r.floating.height+l}px`):u==="right"?(b=`${-l}px`,g=i?f:`${p}px`):u==="left"&&(b=`${r.floating.width+l}px`,g=i?f:`${p}px`),{data:{x:b,y:g}}}});function lp(e){const[t,n="center"]=e.split("-");return[t,n]}var E0=rp,R0=sp,S0=ip,k0=cp,I0=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),N0="VisuallyHidden",up=c.forwardRef((e,t)=>x.jsx(Oe.span,{...e,ref:t,style:{...I0,...e.style}}));up.displayName=N0;var O0=up,[To]=At("Tooltip",[tp]),Ao=tp(),dp="TooltipProvider",P0=700,js="tooltip.open",[T0,Wi]=To(dp),fp=e=>{const{__scopeTooltip:t,delayDuration:n=P0,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=c.useRef(!0),a=c.useRef(!1),l=c.useRef(0);return c.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),x.jsx(T0,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:c.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:s})};fp.displayName=dp;var tr="Tooltip",[A0,ir]=To(tr),pp=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,l=Wi(tr,e.__scopeTooltip),u=Ao(t),[d,f]=c.useState(null),h=An(),p=c.useRef(0),b=i??l.disableHoverableContent,g=a??l.delayDuration,m=c.useRef(!1),[y,v]=wn({prop:r,defaultProp:o??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(js))):l.onClose(),s?.(S)},caller:tr}),C=c.useMemo(()=>y?m.current?"delayed-open":"instant-open":"closed",[y]),w=c.useCallback(()=>{window.clearTimeout(p.current),p.current=0,m.current=!1,v(!0)},[v]),R=c.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),k=c.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{m.current=!0,v(!0),p.current=0},g)},[g,v]);return c.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),x.jsx(E0,{...u,children:x.jsx(A0,{scope:t,contentId:h,open:y,stateAttribute:C,trigger:d,onTriggerChange:f,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?k():w()},[l.isOpenDelayedRef,k,w]),onTriggerLeave:c.useCallback(()=>{b?R():(window.clearTimeout(p.current),p.current=0)},[R,b]),onOpen:w,onClose:R,disableHoverableContent:b,children:n})})};pp.displayName=tr;var Vs="TooltipTrigger",mp=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ir(Vs,n),s=Wi(Vs,n),i=Ao(n),a=c.useRef(null),l=ze(t,a,o.onTriggerChange),u=c.useRef(!1),d=c.useRef(!1),f=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),x.jsx(R0,{asChild:!0,...i,children:x.jsx(Oe.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:Ne(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:Ne(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:Ne(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ne(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Ne(e.onBlur,o.onClose),onClick:Ne(e.onClick,o.onClose)})})});mp.displayName=Vs;var Ui="TooltipPortal",[M0,_0]=To(Ui,{forceMount:void 0}),hp=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=ir(Ui,t);return x.jsx(M0,{scope:t,forceMount:n,children:x.jsx($t,{present:n||s.open,children:x.jsx(Mi,{asChild:!0,container:o,children:r})})})};hp.displayName=Ui;var Ln="TooltipContent",gp=c.forwardRef((e,t)=>{const n=_0(Ln,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=ir(Ln,e.__scopeTooltip);return x.jsx($t,{present:r||i.open,children:i.disableHoverableContent?x.jsx(bp,{side:o,...s,ref:t}):x.jsx(D0,{side:o,...s,ref:t})})}),D0=c.forwardRef((e,t)=>{const n=ir(Ln,e.__scopeTooltip),r=Wi(Ln,e.__scopeTooltip),o=c.useRef(null),s=ze(t,o),[i,a]=c.useState(null),{trigger:l,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,h=c.useCallback(()=>{a(null),f(!1)},[f]),p=c.useCallback((b,g)=>{const m=b.currentTarget,y={x:b.clientX,y:b.clientY},v=F0(y,m.getBoundingClientRect()),C=$0(y,v),w=z0(g.getBoundingClientRect()),R=G0([...C,...w]);a(R),f(!0)},[f]);return c.useEffect(()=>()=>h(),[h]),c.useEffect(()=>{if(l&&d){const b=m=>p(m,d),g=m=>p(m,l);return l.addEventListener("pointerleave",b),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",g)}}},[l,d,p,h]),c.useEffect(()=>{if(i){const b=g=>{const m=g.target,y={x:g.clientX,y:g.clientY},v=l?.contains(m)||d?.contains(m),C=!B0(y,i);v?h():C&&(h(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,d,i,u,h]),x.jsx(bp,{...e,ref:s})}),[L0,j0]=To(tr,{isInside:!1}),V0=oh("TooltipContent"),bp=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,l=ir(Ln,n),u=Ao(n),{onClose:d}=l;return c.useEffect(()=>(document.addEventListener(js,d),()=>document.removeEventListener(js,d)),[d]),c.useEffect(()=>{if(l.trigger){const f=h=>{h.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),x.jsx(Ai,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:x.jsxs(S0,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.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:[x.jsx(V0,{children:r}),x.jsx(L0,{scope:n,isInside:!0,children:x.jsx(O0,{id:l.contentId,role:"tooltip",children:o||r})})]})})});gp.displayName=Ln;var vp="TooltipArrow",yp=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ao(n);return j0(vp,n).isInside?null:x.jsx(k0,{...o,...r,ref:t})});yp.displayName=vp;function F0(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function $0(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function z0(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function B0(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],u=a.x,d=a.y,f=l.x,h=l.y;d>r!=h>r&&n<(f-u)*(r-d)/(h-d)+u&&(o=!o)}return o}function G0(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),H0(t)}function H0(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var W0=fp,U0=pp,K0=mp,q0=hp,xp=gp,Y0=yp;const X0=`bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95
|
|
156
156
|
data-[state=closed]:animate-out data-[state=closed]:fade-out-0
|
|
157
157
|
data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2
|
|
158
158
|
data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2
|
|
159
159
|
data-[side=top]:slide-in-from-bottom-2 z-50
|
|
160
160
|
origin-[--radix-tooltip-content-transform-origin] overflow-hidden rounded-md px-3
|
|
161
|
-
py-1.5 text-xs`,W0=
|
|
161
|
+
py-1.5 text-xs`,Z0=W0,Q0=U0,J0=K0,eR=Y0,wp=({className:e,sideOffset:t=4,ref:n,...r})=>x.jsx(q0,{children:x.jsx(xp,{ref:n,sideOffset:t,className:z(X0,e),...r})});wp.displayName=xp.displayName;exports.Badge=_m;exports.Button=oo;exports.Card=Dc;exports.CardContent=Fc;exports.CardDescription=Vc;exports.CardFooter=$c;exports.CardHeader=Lc;exports.CardTitle=jc;exports.Checkbox=Jc;exports.Combobox=kw;exports.ComboboxChip=$w;exports.ComboboxChips=Fw;exports.ComboboxChipsInput=zw;exports.ComboboxCollection=Lw;exports.ComboboxContent=Tw;exports.ComboboxEmpty=jw;exports.ComboboxField=Iw;exports.ComboboxGroup=_w;exports.ComboboxInput=Pw;exports.ComboboxItem=Mw;exports.ComboboxLabel=Dw;exports.ComboboxList=Aw;exports.ComboboxSeparator=Vw;exports.ComboboxTrigger=Qu;exports.ComboboxValue=Nw;exports.Dialog=fE;exports.DialogClose=mE;exports.DialogContent=_d;exports.DialogDescription=Vd;exports.DialogFooter=Ld;exports.DialogHeader=Dd;exports.DialogOverlay=ji;exports.DialogPortal=Md;exports.DialogTitle=jd;exports.DialogTrigger=pE;exports.Field=Bu;exports.FieldContent=rw;exports.FieldDescription=Hu;exports.FieldError=Wu;exports.FieldGroup=nw;exports.FieldLabel=Gu;exports.FieldLegend=tw;exports.FieldSeparator=sw;exports.FieldSet=ew;exports.FieldTitle=ow;exports.Icon=ao;exports.Input=Uu;exports.InputGroup=Ku;exports.InputGroupAddon=qu;exports.InputGroupButton=Yu;exports.InputGroupInput=Xu;exports.InputGroupText=uw;exports.InputGroupTextarea=dw;exports.Label=Oi;exports.NavigationItem=bE;exports.NavigationMenu=xE;exports.Pagination=Fd;exports.PaginationContent=$d;exports.PaginationEllipsis=Hd;exports.PaginationItem=zd;exports.PaginationLink=ko;exports.PaginationNext=Gd;exports.PaginationPrevious=Bd;exports.Progress=Xd;exports.RadioGroup=yf;exports.RadioGroupItem=xf;exports.Separator=Pi;exports.Switch=If;exports.Table=Nf;exports.TableBody=Pf;exports.TableCaption=Df;exports.TableCell=_f;exports.TableFooter=Tf;exports.TableHead=Mf;exports.TableHeader=Of;exports.TableRow=Af;exports.Tabs=m0;exports.TabsContent=Qf;exports.TabsList=Xf;exports.TabsTrigger=Zf;exports.Textarea=Ti;exports.Tooltip=Q0;exports.TooltipArrow=eR;exports.TooltipContent=wp;exports.TooltipProvider=Z0;exports.TooltipTrigger=J0;exports.Typography=Am;exports.badgeVariants=Ac;exports.buttonVariants=Gs;exports.cn=z;exports.getTypographyClassName=qe;exports.typographyClassNames=zs;exports.typographyVariantOptions=Pm;
|
|
162
162
|
//# sourceMappingURL=index.cjs.map
|