brd-ui-kit 0.0.6 → 0.1.1
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/dist/brd-ui-kit.css +1 -1
- package/dist/components/app-pagination/app-pagination.d.ts +15 -0
- package/dist/components/app-pagination/app-pagination.stories.d.ts +52 -0
- package/dist/components/app-pagination/app-pagination.styles.d.ts +13 -0
- package/dist/components/app-pagination/index.d.ts +1 -0
- package/dist/components/app-sidebar/app-sidebar.d.ts +33 -0
- package/dist/components/app-sidebar/app-sidebar.stories.d.ts +52 -0
- package/dist/components/app-sidebar/app-sidebar.styles.d.ts +13 -0
- package/dist/components/app-sidebar/index.d.ts +3 -0
- package/dist/components/basic-checkbox/basic-checkbox.d.ts +14 -0
- package/dist/components/basic-checkbox/basic-checkbox.stories.d.ts +46 -0
- package/dist/components/basic-checkbox/index.d.ts +1 -0
- package/dist/components/basic-modal/basic-modal.d.ts +21 -0
- package/dist/components/basic-modal/basic-modal.stories.d.ts +57 -0
- package/dist/components/basic-modal/index.d.ts +1 -0
- package/dist/components/basic-table/basic-table.d.ts +7 -0
- package/dist/components/basic-table/index.d.ts +1 -0
- package/dist/components/basic-tooltip/basic-tooltip.d.ts +19 -0
- package/dist/components/basic-tooltip/index.d.ts +1 -0
- package/dist/components/input-field/index.d.ts +2 -0
- package/dist/components/input-field/input-field.d.ts +14 -0
- package/dist/components/input-field/input-field.stories.d.ts +48 -0
- package/dist/components/radio-button/index.d.ts +1 -0
- package/dist/components/radio-button/radio-button.d.ts +20 -0
- package/dist/components/radio-button/radio-button.stories.d.ts +28 -0
- package/dist/components/select-field/index.d.ts +1 -0
- package/dist/components/select-field/select-field.d.ts +18 -0
- package/dist/components/select-field/select-field.stories.d.ts +30 -0
- package/dist/components/textarea-field/index.d.ts +1 -0
- package/dist/components/textarea-field/textarea-field.d.ts +7 -0
- package/dist/components/textarea-field/textarea-field.stories.d.ts +43 -0
- package/dist/components/ui/field/field.stories.d.ts +1 -1
- package/dist/index.cjs +379 -61
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.js +57037 -5967
- package/dist/index.js.map +1 -1
- package/dist/utils/helpers.d.ts +2 -0
- package/package.json +15 -15
package/dist/index.cjs
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),_e=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(_e),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"}}),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),ae=require("react"),xl=require("react-dom");function nA(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=nA(ae),dt=nA(xl);function rA(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=rA(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function oA(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=rA(e))&&(r&&(r+=" "),r+=t);return r}const OG=(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},IG=(e,t)=>({classGroupId:e,validator:t}),iA=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),yf="-",ik=[],AG="arbitrary..",MG=e=>{const t=_G(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return PG(s);const a=s.split(yf),l=a[0]===""&&a.length>1?1:0;return sA(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=r[s],u=n[s];return l?u?OG(u,l):l:u||ik}return n[s]||ik}}},sA=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const u=sA(e,t+1,i);if(u)return u}const s=n.validators;if(s===null)return;const a=t===0?e.join(yf):e.slice(t).join(yf),l=s.length;for(let u=0;u<l;u++){const d=s[u];if(d.validator(a))return d.classGroupId}},PG=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?AG+r:void 0})(),_G=e=>{const{theme:t,classGroups:n}=e;return TG(n,t)},TG=(e,t)=>{const n=iA();for(const r in e){const o=e[r];Ex(o,n,r,t)}return n},Ex=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];DG(s,t,n,r)}},DG=(e,t,n,r)=>{if(typeof e=="string"){LG(e,t,n);return}if(typeof e=="function"){jG(e,t,n,r);return}VG(e,t,n,r)},LG=(e,t,n)=>{const r=e===""?t:aA(t,e);r.classGroupId=n},jG=(e,t,n,r)=>{if(FG(e)){Ex(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(IG(n,e))},VG=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];Ex(l,aA(t,a),n,r)}},aA=(e,t)=>{let n=e;const r=t.split(yf),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=iA(),n.nextPart.set(s,a)),n=a}return n},FG=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,$G=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},wb="!",sk=":",zG=[],ak=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),BG=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,u;const d=o.length;for(let g=0;g<d;g++){const h=o[g];if(s===0&&a===0){if(h===sk){i.push(o.slice(l,g)),l=g+1;continue}if(h==="/"){u=g;continue}}h==="["?s++:h==="]"?s--:h==="("?a++:h===")"&&a--}const f=i.length===0?o:o.slice(l);let m=f,p=!1;f.endsWith(wb)?(m=f.slice(0,-1),p=!0):f.startsWith(wb)&&(m=f.slice(1),p=!0);const v=u&&u>l?u-l:void 0;return ak(i,p,m,v)};if(t){const o=t+sk,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):ak(zG,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},HG=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},GG=e=>({cache:$G(e.cacheSize),parseClassName:BG(e),sortModifiers:HG(e),...MG(e)}),WG=/\s+/,UG=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(WG);let l="";for(let u=a.length-1;u>=0;u-=1){const d=a[u],{isExternal:f,modifiers:m,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:g}=n(d);if(f){l=d+(l.length>0?" "+l:l);continue}let h=!!g,b=r(h?v.substring(0,g):v);if(!b){if(!h){l=d+(l.length>0?" "+l:l);continue}if(b=r(v),!b){l=d+(l.length>0?" "+l:l);continue}h=!1}const y=m.length===0?"":m.length===1?m[0]:i(m).join(":"),x=p?y+wb:y,w=x+b;if(s.indexOf(w)>-1)continue;s.push(w);const C=o(b,h);for(let R=0;R<C.length;++R){const k=C[R];s.push(x+k)}l=d+(l.length>0?" "+l:l)}return l},qG=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=lA(n))&&(o&&(o+=" "),o+=r);return o},lA=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=lA(e[r]))&&(n&&(n+=" "),n+=t);return n},lk=(e,...t)=>{let n,r,o,i;const s=l=>{const u=t.reduce((d,f)=>f(d),e());return n=GG(u),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const u=r(l);if(u)return u;const d=UG(l,n);return o(l,d),d};return i=s,(...l)=>i(qG(...l))},KG=[],fn=e=>{const t=n=>n[e]||KG;return t.isThemeGetter=!0,t},cA=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,uA=/^\((?:(\w[\w-]*):)?(.+)\)$/i,YG=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,XG=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ZG=/\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$/,JG=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,QG=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,eW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ui=e=>YG.test(e),Qe=e=>!!e&&!Number.isNaN(Number(e)),di=e=>!!e&&Number.isInteger(Number(e)),hg=e=>e.endsWith("%")&&Qe(e.slice(0,-1)),zo=e=>XG.test(e),dA=()=>!0,tW=e=>ZG.test(e)&&!JG.test(e),Cx=()=>!1,nW=e=>QG.test(e),rW=e=>eW.test(e),oW=e=>!Ne(e)&&!_e(e),iW=e=>ts(e,mA,Cx),Ne=e=>cA.test(e),ks=e=>ts(e,hA,tW),ck=e=>ts(e,pW,Qe),sW=e=>ts(e,vA,dA),aW=e=>ts(e,gA,Cx),uk=e=>ts(e,fA,Cx),lW=e=>ts(e,pA,rW),lu=e=>ts(e,bA,nW),_e=e=>uA.test(e),Rl=e=>na(e,hA),cW=e=>na(e,gA),dk=e=>na(e,fA),uW=e=>na(e,mA),dW=e=>na(e,pA),cu=e=>na(e,bA,!0),fW=e=>na(e,vA,!0),ts=(e,t,n)=>{const r=cA.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},na=(e,t,n=!1)=>{const r=uA.exec(e);return r?r[1]?t(r[1]):n:!1},fA=e=>e==="position"||e==="percentage",pA=e=>e==="image"||e==="url",mA=e=>e==="length"||e==="size"||e==="bg-size",hA=e=>e==="length",pW=e=>e==="number",gA=e=>e==="family-name",vA=e=>e==="number"||e==="weight",bA=e=>e==="shadow",fk=()=>{const e=fn("color"),t=fn("font"),n=fn("text"),r=fn("font-weight"),o=fn("tracking"),i=fn("leading"),s=fn("breakpoint"),a=fn("container"),l=fn("spacing"),u=fn("radius"),d=fn("shadow"),f=fn("inset-shadow"),m=fn("text-shadow"),p=fn("drop-shadow"),v=fn("blur"),g=fn("perspective"),h=fn("aspect"),b=fn("ease"),y=fn("animate"),x=()=>["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"],C=()=>[...w(),_e,Ne],R=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],S=()=>[_e,Ne,l],P=()=>[ui,"full","auto",...S()],L=()=>[di,"none","subgrid",_e,Ne],_=()=>["auto",{span:["full",di,_e,Ne]},di,_e,Ne],O=()=>[di,"auto",_e,Ne],B=()=>["auto","min","max","fr",_e,Ne],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...S()],D=()=>[ui,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],T=()=>[ui,"screen","full","dvw","lvw","svw","min","max","fit",...S()],q=()=>[ui,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],A=()=>[e,_e,Ne],ee=()=>[...w(),dk,uk,{position:[_e,Ne]}],ie=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Y=()=>["auto","cover","contain",uW,iW,{size:[_e,Ne]}],Q=()=>[hg,Rl,ks],X=()=>["","none","full",u,_e,Ne],J=()=>["",Qe,Rl,ks],te=()=>["solid","dashed","dotted","double"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[Qe,hg,dk,uk],re=()=>["","none",v,_e,Ne],oe=()=>["none",Qe,_e,Ne],M=()=>["none",Qe,_e,Ne],N=()=>[Qe,_e,Ne],j=()=>[ui,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[zo],breakpoint:[zo],color:[dA],container:[zo],"drop-shadow":[zo],ease:["in","out","in-out"],font:[oW],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[zo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[zo],shadow:[zo],spacing:["px",Qe],text:[zo],"text-shadow":[zo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ui,Ne,_e,h]}],container:["container"],columns:[{columns:[Qe,Ne,_e,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:C()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[di,"auto",_e,Ne]}],basis:[{basis:[ui,"full","auto",a,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Qe,ui,"auto","initial","none",Ne]}],grow:[{grow:["",Qe,_e,Ne]}],shrink:[{shrink:["",Qe,_e,Ne]}],order:[{order:[di,"first","last","none",_e,Ne]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],"inline-size":[{inline:["auto",...T()]}],"min-inline-size":[{"min-inline":["auto",...T()]}],"max-inline-size":[{"max-inline":["none",...T()]}],"block-size":[{block:["auto",...q()]}],"min-block-size":[{"min-block":["auto",...q()]}],"max-block-size":[{"max-block":["none",...q()]}],w:[{w:[a,"screen",...D()]}],"min-w":[{"min-w":[a,"screen","none",...D()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",n,Rl,ks]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,fW,sW]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",hg,Ne]}],"font-family":[{font:[cW,aW,t]}],"font-features":[{"font-features":[Ne]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,_e,Ne]}],"line-clamp":[{"line-clamp":[Qe,"none",_e,ck]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",_e,Ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",_e,Ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[Qe,"from-font","auto",_e,ks]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[Qe,"auto",_e,Ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",_e,Ne]}],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",_e,Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:Y()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},di,_e,Ne],radial:["",_e,Ne],conic:[di,_e,Ne]},dW,lW]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Qe,_e,Ne]}],"outline-w":[{outline:["",Qe,Rl,ks]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",d,cu,lu]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",f,cu,lu]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[Qe,ks]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",m,cu,lu]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[Qe,_e,Ne]}],"mix-blend":[{"mix-blend":[...le(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":le()}],"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":[Qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[_e,Ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"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":[Qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:Y()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",_e,Ne]}],filter:[{filter:["","none",_e,Ne]}],blur:[{blur:re()}],brightness:[{brightness:[Qe,_e,Ne]}],contrast:[{contrast:[Qe,_e,Ne]}],"drop-shadow":[{"drop-shadow":["","none",p,cu,lu]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",Qe,_e,Ne]}],"hue-rotate":[{"hue-rotate":[Qe,_e,Ne]}],invert:[{invert:["",Qe,_e,Ne]}],saturate:[{saturate:[Qe,_e,Ne]}],sepia:[{sepia:["",Qe,_e,Ne]}],"backdrop-filter":[{"backdrop-filter":["","none",_e,Ne]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[Qe,_e,Ne]}],"backdrop-contrast":[{"backdrop-contrast":[Qe,_e,Ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Qe,_e,Ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qe,_e,Ne]}],"backdrop-invert":[{"backdrop-invert":["",Qe,_e,Ne]}],"backdrop-opacity":[{"backdrop-opacity":[Qe,_e,Ne]}],"backdrop-saturate":[{"backdrop-saturate":[Qe,_e,Ne]}],"backdrop-sepia":[{"backdrop-sepia":["",Qe,_e,Ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",_e,Ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Qe,"initial",_e,Ne]}],ease:[{ease:["linear","initial",b,_e,Ne]}],delay:[{delay:[Qe,_e,Ne]}],animate:[{animate:["none",y,_e,Ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,_e,Ne]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:M()}],"scale-x":[{"scale-x":M()}],"scale-y":[{"scale-y":M()}],"scale-z":[{"scale-z":M()}],"scale-3d":["scale-3d"],skew:[{skew:N()}],"skew-x":[{"skew-x":N()}],"skew-y":[{"skew-y":N()}],transform:[{transform:[_e,Ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:j()}],"translate-x":[{"translate-x":j()}],"translate-y":[{"translate-y":j()}],"translate-z":[{"translate-z":j()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",_e,Ne]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",_e,Ne]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[Qe,Rl,ks,ck]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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"]}},mW=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:o={},override:i={}})=>(Vl(e,"cacheSize",t),Vl(e,"prefix",n),Vl(e,"experimentalParseClassName",r),uu(e.theme,i.theme),uu(e.classGroups,i.classGroups),uu(e.conflictingClassGroups,i.conflictingClassGroups),uu(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Vl(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),du(e.theme,o.theme),du(e.classGroups,o.classGroups),du(e.conflictingClassGroups,o.conflictingClassGroups),du(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),yA(e,o,"orderSensitiveModifiers"),e),Vl=(e,t,n)=>{n!==void 0&&(e[t]=n)},uu=(e,t)=>{if(t)for(const n in t)Vl(e,n,t[n])},du=(e,t)=>{if(t)for(const n in t)yA(e,t,n)},yA=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},hW=(e,...t)=>typeof e=="function"?lk(fk,e,...t):lk(()=>mW(fk(),e),...t),gW=hW({extend:{theme:{text:["h1","h2","h3"]}}});function fe(...e){return gW(oA(e))}const pk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,mk=oA,Ot=(e,t)=>n=>{var r;if(t?.variants==null)return mk(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const d=n?.[u],f=i?.[u];if(d===null)return null;const m=pk(d)||pk(f);return o[u][m]}),a=n&&Object.entries(n).reduce((u,d)=>{let[f,m]=d;return m===void 0||(u[f]=m),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:m,...p}=d;return Object.entries(p).every(v=>{let[g,h]=v;return Array.isArray(h)?h.includes({...i,...a}[g]):{...i,...a}[g]===h})?[...u,f,m]:u},[]);return mk(e,s,l,n?.class,n?.className)},vW=["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"],kx=Ot("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"}}),vn=(e="body-md-regular")=>kx({variant:e}),bW={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"},yW=({as:e,className:t,variant:n,...r})=>{const o=n??"body-md-regular",i=e??bW[o];return E.jsx(i,{className:fe(kx({variant:o}),t),...r})},xf=Ot(`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"}}),xW=Ot("tracking-normal whitespace-nowrap",{variants:{kind:{status:vn("body-xs-medium"),priority:vn("body-sm-regular")}},defaultVariants:{kind:"status"}});function qd({variant:e,kind:t="status",dotPosition:n,classNames:r={},children:o,...i}){const s=!!n,{className:a,dotClassName:l,labelClassName:u}=r;return E.jsxs("div",{className:fe(xf({variant:e,kind:t,dotPosition:n}),a),...i,children:[s&&E.jsx("span",{className:fe("inline-block h-2 w-2 rounded-full bg-current",l),"aria-hidden":"true"}),E.jsx("span",{className:fe(xW({kind:t}),u),children:o})]})}function hk(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Rx(...e){return t=>{let n=!1;const r=e.map(o=>{const i=hk(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():hk(e[o],null)}}}}function rn(...e){return c.useCallback(Rx(...e),e)}var wW=Symbol.for("react.lazy"),wf=c[" use ".trim().toString()];function EW(e){return typeof e=="object"&&e!==null&&"then"in e}function xA(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===wW&&"_payload"in e&&EW(e._payload)}function wA(e){const t=kW(e),n=c.forwardRef((r,o)=>{let{children:i,...s}=r;xA(i)&&typeof wf=="function"&&(i=wf(i._payload));const a=c.Children.toArray(i),l=a.find(SW);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 E.jsx(t,{...s,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return E.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var CW=wA("Slot");function kW(e){const t=c.forwardRef((n,r)=>{let{children:o,...i}=n;if(xA(o)&&typeof wf=="function"&&(o=wf(o._payload)),c.isValidElement(o)){const s=OW(o),a=NW(i,o.props);return o.type!==c.Fragment&&(a.ref=r?Rx(r,s):s),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var RW=Symbol("radix.slottable");function SW(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===RW}function NW(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function OW(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 Sx=Ot(["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
|
-
aria-expanded:text-primary-text`},size:{lg:`${
|
|
6
|
-
[&_svg]:size-[18px]`,md:`${
|
|
7
|
-
[&_svg]:size-4`,sm:`${
|
|
8
|
-
[&_svg]:size-4`,xs:`${
|
|
9
|
-
[&_svg]:size-[14px]`,default:`${
|
|
5
|
+
aria-expanded:text-primary-text`},size:{lg:`${vn("body-lg-medium")} w-fit gap-2 px-4.5 py-3
|
|
6
|
+
[&_svg]:size-[18px]`,md:`${vn("body-md-medium")} w-fit gap-2 px-4.5 py-2
|
|
7
|
+
[&_svg]:size-4`,sm:`${vn("body-sm-medium")} w-fit gap-2 px-3 py-2
|
|
8
|
+
[&_svg]:size-4`,xs:`${vn("body-xs-medium")} w-fit gap-1 px-3 py-2
|
|
9
|
+
[&_svg]:size-[14px]`,default:`${vn("body-sm-medium")} size-9 [&_svg]:size-4`}},compoundVariants:[{variant:"link",size:"lg",className:"[&_svg]:size-5"}],defaultVariants:{variant:"primary",size:"md"}}),Qo=({className:e,variant:t,size:n,asChild:r=!1,ref:o,...i})=>{const s=r?CW:"button";return E.jsx(s,{className:fe(Sx({variant:t,size:n,className:e})),ref:o,...i})};Qo.displayName="Button";const IW=Ot("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`),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=_e.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>_e.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])=>_e.createElement(u,d)),...Array.isArray(s)?s:[s]]));const Re=(e,t)=>{const n=_e.forwardRef(({className:r,...o},s)=>_e.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(`
|
|
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)]"}]}),AW=Ot("flex flex-col space-y-1.5 p-6"),MW=Ot(`group-data-[disabled=true]/card:text-disabled-text leading-none font-semibold
|
|
14
|
+
tracking-tight`),PW=Ot(`${vn("body-sm-regular")} text-muted-foreground
|
|
15
|
+
group-data-[disabled=true]/card:text-disabled-text`),_W=Ot("group-data-[disabled=true]/card:text-disabled-text p-6 pt-0"),TW=Ot("group-data-[disabled=true]/card:text-disabled-text flex items-center p-6 pt-0"),EA=({ref:e,className:t,variant:n,disabled:r,active:o,...i})=>E.jsx("div",{ref:e,"data-disabled":r||void 0,className:fe(IW({variant:n,active:o}),t),...i});EA.displayName="Card";const CA=({ref:e,className:t,...n})=>E.jsx("div",{ref:e,className:fe(AW(),t),...n});CA.displayName="CardHeader";const kA=({ref:e,className:t,...n})=>E.jsx("div",{ref:e,className:fe(MW(),t),...n});kA.displayName="CardTitle";const RA=({ref:e,className:t,...n})=>E.jsx("div",{ref:e,className:fe(PW(),t),...n});RA.displayName="CardDescription";const SA=({ref:e,className:t,...n})=>E.jsx("div",{ref:e,className:fe(_W(),t),...n});SA.displayName="CardContent";const NA=({ref:e,className:t,...n})=>E.jsx("div",{ref:e,className:fe(TW(),t),...n});NA.displayName="CardFooter";function DW(e,t){const n=c.createContext(t),r=i=>{const{children:s,...a}=i,l=c.useMemo(()=>a,Object.values(a));return E.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(i){const s=c.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function No(e,t=[]){let n=[];function r(i,s){const a=c.createContext(s),l=n.length;n=[...n,s];const u=f=>{const{scope:m,children:p,...v}=f,g=m?.[e]?.[l]||a,h=c.useMemo(()=>v,Object.values(v));return E.jsx(g.Provider,{value:h,children:p})};u.displayName=i+"Provider";function d(f,m){const p=m?.[e]?.[l]||a,v=c.useContext(p);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(s=>c.createContext(s));return function(a){const l=a?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,LW(o,...t)]}function LW(...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(i){const s=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(i)[`__scope${u}`];return{...a,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Ct(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var $i=globalThis?.document?c.useLayoutEffect:()=>{},jW=c[" useInsertionEffect ".trim().toString()]||$i;function ra({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=VW({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=FW(d)?d(e):d;f!==e&&s.current?.(f)}else i(d)},[a,e,i,s]);return[l,u]}function VW({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),i=c.useRef(t);return jW(()=>{i.current=t},[t]),c.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function FW(e){return typeof e=="function"}function Nx(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 im(e){const[t,n]=c.useState(void 0);return $i(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,a=u.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function $W(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var ni=e=>{const{present:t,children:n}=e,r=zW(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),i=rn(r.ref,BW(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:i}):null};ni.displayName="Presence";function zW(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),i=c.useRef("none"),s=e?"mounted":"unmounted",[a,l]=$W(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=fu(r.current);i.current=a==="mounted"?u:"none"},[a]),$i(()=>{const u=r.current,d=o.current;if(d!==e){const m=i.current,p=fu(u);e?l("MOUNT"):p==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&m!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),$i(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=p=>{const g=fu(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&g&&(l("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},m=p=>{p.target===t&&(i.current=fu(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),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 fu(e){return e?.animationName||"none"}function BW(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 Ef(e){const t=HW(e),n=c.forwardRef((r,o)=>{const{children:i,...s}=r,a=c.Children.toArray(i),l=a.find(WW);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 E.jsx(t,{...s,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return E.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function HW(e){const t=c.forwardRef((n,r)=>{const{children:o,...i}=n;if(c.isValidElement(o)){const s=qW(o),a=UW(i,o.props);return o.type!==c.Fragment&&(a.ref=r?Rx(r,s):s),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var OA=Symbol("radix.slottable");function GW(e){const t=({children:n})=>E.jsx(E.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=OA,t}function WW(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===OA}function UW(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function qW(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 KW=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],It=KW.reduce((e,t)=>{const n=Ef(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function YW(e,t){e&&dt.flushSync(()=>e.dispatchEvent(t))}var sm="Checkbox",[XW]=No(sm),[ZW,Ox]=XW(sm);function JW(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:i,form:s,name:a,onCheckedChange:l,required:u,value:d="on",internal_do_not_use_render:f}=e,[m,p]=ra({prop:n,defaultProp:o??!1,onChange:l,caller:sm}),[v,g]=c.useState(null),[h,b]=c.useState(null),y=c.useRef(!1),x=v?!!s||!!v.closest("form"):!0,w={checked:m,disabled:i,setChecked:p,control:v,setControl:g,name:a,form:s,value:d,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:Pi(o)?!1:o,isFormControl:x,bubbleInput:h,setBubbleInput:b};return E.jsx(ZW,{scope:t,...w,children:QW(f)?f(w):r})}var IA="CheckboxTrigger",AA=c.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:i,value:s,disabled:a,checked:l,required:u,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:m,isFormControl:p,bubbleInput:v}=Ox(IA,e),g=rn(o,d),h=c.useRef(l);return c.useEffect(()=>{const b=i?.form;if(b){const y=()=>f(h.current);return b.addEventListener("reset",y),()=>b.removeEventListener("reset",y)}},[i,f]),E.jsx(It.button,{type:"button",role:"checkbox","aria-checked":Pi(l)?"mixed":l,"aria-required":u,"data-state":DA(l),"data-disabled":a?"":void 0,disabled:a,value:s,...r,ref:g,onKeyDown:Ct(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:Ct(n,b=>{f(y=>Pi(y)?!0:!y),v&&p&&(m.current=b.isPropagationStopped(),m.current||b.stopPropagation())})})});AA.displayName=IA;var Ix=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:s,disabled:a,value:l,onCheckedChange:u,form:d,...f}=e;return E.jsx(JW,{__scopeCheckbox:n,checked:o,defaultChecked:i,disabled:a,required:s,onCheckedChange:u,name:r,form:d,value:l,internal_do_not_use_render:({isFormControl:m})=>E.jsxs(E.Fragment,{children:[E.jsx(AA,{...f,ref:t,__scopeCheckbox:n}),m&&E.jsx(TA,{__scopeCheckbox:n})]})})});Ix.displayName=sm;var MA="CheckboxIndicator",PA=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=Ox(MA,n);return E.jsx(ni,{present:r||Pi(i.checked)||i.checked===!0,children:E.jsx(It.span,{"data-state":DA(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});PA.displayName=MA;var _A="CheckboxBubbleInput",TA=c.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:i,defaultChecked:s,required:a,disabled:l,name:u,value:d,form:f,bubbleInput:m,setBubbleInput:p}=Ox(_A,e),v=rn(n,p),g=Nx(i),h=im(r);c.useEffect(()=>{const y=m;if(!y)return;const x=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(x,"checked").set,R=!o.current;if(g!==i&&C){const k=new Event("click",{bubbles:R});y.indeterminate=Pi(i),C.call(y,Pi(i)?!1:i),y.dispatchEvent(k)}},[m,g,i,o]);const b=c.useRef(Pi(i)?!1:i);return E.jsx(It.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??b.current,required:a,disabled:l,name:u,value:d,form:f,...t,tabIndex:-1,ref:v,style:{...t.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});TA.displayName=_A;function QW(e){return typeof e=="function"}function Pi(e){return e==="indeterminate"}function DA(e){return Pi(e)?"indeterminate":e?"checked":"unchecked"}function LA({ref:e,className:t,color:n="currentColor",size:r=24,...o}){return E.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:E.jsx("path",{d:"M13.4375 8.125L8.85414 12.5L6.5625 10.3125"})})}function jA({ref:e,className:t,color:n="currentColor",size:r=24,...o}){return E.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:[E.jsx("path",{d:"M13.4375 8.125L8.85414 12.5L6.5625 10.3125"}),E.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"})]})}LA.displayName="Check";jA.displayName="CircleCheck";const VA=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const e6=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const t6=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const gk=e=>{const t=t6(e);return t.charAt(0).toUpperCase()+t.slice(1)};var n6={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 r6=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const o6=ae.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>ae.createElement("svg",{ref:l,...n6,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:VA("lucide",o),...!i&&!r6(a)&&{"aria-hidden":"true"},...a},[...s.map(([u,d])=>ae.createElement(u,d)),...Array.isArray(i)?i:[i]]));const bt=(e,t)=>{const n=ae.forwardRef(({className:r,...o},i)=>ae.createElement(o6,{ref:i,iconNode:t,className:VA(`lucide-${e6(gk(e))}`,`lucide-${e}`,r),...o}));return n.displayName=gk(e),n};const i6=[["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"}]],s6=bt("bell-ring",i6);const a6=[["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"}]],l6=bt("book-user",a6);const c6=[["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"}]],u6=bt("briefcase-business",c6);const d6=[["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"}]],f6=bt("building-2",d6);const p6=[["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"}]],m6=bt("calendar-1",p6);const h6=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],g6=bt("chart-line",h6);const v6=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],b6=bt("chevron-down",v6);const y6=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],FA=bt("chevron-left",y6);const x6=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],$A=bt("chevron-right",x6);const w6=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],E6=bt("chevrons-up-down",w6);const C6=[["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"}]],k6=bt("circle-question-mark",C6);const R6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],S6=bt("clock-3",R6);const N6=[["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"}]],zA=bt("ellipsis",N6);const O6=[["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"}]],I6=bt("folder-open",O6);const A6=[["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"}]],M6=bt("funnel",A6);const P6=[["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"}]],_6=bt("layout-grid",P6);const T6=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],D6=bt("list-filter",T6);const L6=[["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"}]],j6=bt("list-todo",L6);const V6=[["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"}]],F6=bt("message-circle",V6);const $6=[["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"}]],z6=bt("palette",$6);const B6=[["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"}]],H6=bt("phone",B6);const G6=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],W6=bt("plus",G6);const U6=[["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"}]],q6=bt("rotate-ccw",U6);const K6=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Y6=bt("search",K6);const X6=[["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"}]],Z6=bt("settings",X6);const J6=[["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"}]],Q6=bt("tag",J6);const eU=[["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"}]],tU=bt("user-cog",eU);const nU=[["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"}]],rU=bt("users",nU);const oU=[["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"}]],iU=bt("wrench",oU);const sU=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ax=bt("x",sU),aU={settings:Z6,plus:W6,wrench:iU,phone:H6,palette:z6,building:f6,close:Ax,done:LA,check:jA,users:rU,"layout-grid":_6,bell:s6,"book-user":l6,"user-gear":tU,folder:I6,"briefcase-business":u6,calendar:m6,"chart-line":g6,message:F6,search:Y6,"list-filter":D6,funnel:M6,dots:zA,"check-list":j6,tag:Q6,chevron:b6,chevrons:E6,"rotate-ccw":q6,question:k6,clock:S6},lU={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"},ol=({type:e,size:t="md",viewBox:n="0 0 24 24",strokeWidth:r=1.5,className:o,...i})=>{const s=aU[e],a=lU[t],l=fe(a,o);return E.jsx("div",{...i,children:E.jsx(s,{viewBox:n,strokeWidth:r,className:l})})},cU=["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(" "),uU="grid place-content-center text-current",Mx=({className:e,ref:t,...n})=>E.jsx(Ix,{ref:t,className:fe(cU,e),...n,children:E.jsx(PA,{className:fe(uU),children:E.jsx(ol,{type:"done",viewBox:"3 3 14 14"})})});Mx.displayName=Ix.displayName;function gg({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=c.useRef(e!==void 0),[i,s]=c.useState(t),a=o?e:i;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||
|
|
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"?_e.createElement("button",{type:"button",...t,key:t.key}):e==="img"?_e.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),De=!(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&&De&&!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?_e.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),De=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=De&&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
|
|
17
|
+
`))},[JSON.stringify(t)])}const l=c.useCallback(u=>{o||s(u)},[]);return[a,l]}const vk={};function Dr(e,t){const n=c.useRef(vk);return n.current===vk&&(n.current=e(t)),n}const vg=c[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],dU=vg&&vg!==c.useLayoutEffect?vg:e=>e();function Ge(e){const t=Dr(fU).current;return t.next=e,dU(t.effect),t.trampoline}function fU(){const e={next:void 0,callback:pU,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function pU(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const mU=()=>{},We=typeof document<"u"?c.useLayoutEffect:mU,Px=c.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(Px.displayName="CompositeListContext");function hU(){return c.useContext(Px)}function BA(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=Ge(o),s=c.useRef(0),a=Dr(vU).current,l=Dr(gU).current,[u,d]=c.useState(0),f=c.useRef(u),m=Ge((b,y)=>{l.set(b,y??null),f.current+=1,d(f.current)}),p=Ge(b=>{l.delete(b),f.current+=1,d(f.current)}),v=c.useMemo(()=>{const b=new Map;return Array.from(l.keys()).filter(x=>x.isConnected).sort(bU).forEach((x,w)=>{const C=l.get(x)??{};b.set(x,{...C,index:w})}),b},[l,u]);We(()=>{if(typeof MutationObserver!="function"||v.size===0)return;const b=new MutationObserver(y=>{const x=new Set,w=C=>x.has(C)?x.delete(C):x.add(C);y.forEach(C=>{C.removedNodes.forEach(w),C.addedNodes.forEach(w)}),x.size===0&&(f.current+=1,d(f.current))});return v.forEach((y,x)=>{x.parentElement&&b.observe(x.parentElement,{childList:!0})}),()=>{b.disconnect()}},[v]),We(()=>{f.current===u&&(n.current.length!==v.size&&(n.current.length=v.size),r&&r.current.length!==v.size&&(r.current.length=v.size),s.current=v.size),i(v)},[i,v,n,r,u]),We(()=>()=>{n.current=[]},[n]),We(()=>()=>{r&&(r.current=[])},[r]);const g=Ge(b=>(a.add(b),()=>{a.delete(b)}));We(()=>{a.forEach(b=>b(v))},[a,v]);const h=c.useMemo(()=>({register:m,unregister:p,subscribeMapChange:g,elementsRef:n,labelsRef:r,nextIndexRef:s}),[m,p,g,n,r,s]);return E.jsx(Px.Provider,{value:h,children:t})}function gU(){return new Map}function vU(){return new Set}function bU(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 HA=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(HA.displayName="DirectionContext");function GA(){return c.useContext(HA)?.direction??"ltr"}function Yr(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 cc(e,t,n,r){const o=Dr(WA).current;return xU(o,e,t,n,r)&&UA(o,[e,t,n,r]),o.callback}function yU(e){const t=Dr(WA).current;return wU(t,e)&&UA(t,e),t.callback}function WA(){return{callback:null,cleanup:null,refs:[]}}function xU(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function wU(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function UA(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 i=t[o];if(i!=null)switch(typeof i){case"function":{const s=i(n);typeof s=="function"&&(r[o]=s);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=r[o];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}}}}}}}const EU=parseInt(c.version,10);function _x(e){return EU>=e}function bk(e){if(!c.isValidElement(e))return null;const t=e,n=t.props;return(_x(19)?n?.ref:t.ref)??null}function Eb(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function CU(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function kU(e,t){return typeof e=="function"?e(t):e}function RU(e,t){return typeof e=="function"?e(t):e}const Hl={};function qA(e,t,n,r,o){let i={...Cb(e,Hl)};return t&&(i=Kd(i,t)),n&&(i=Kd(i,n)),r&&(i=Kd(i,r)),i}function SU(e){if(e.length===0)return Hl;if(e.length===1)return Cb(e[0],Hl);let t={...Cb(e[0],Hl)};for(let n=1;n<e.length;n+=1)t=Kd(t,e[n]);return t}function Kd(e,t){return KA(t)?t(e):NU(e,t)}function NU(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Eb(e.style,r);break}case"className":{e[n]=YA(e.className,r);break}default:OU(n,r)?e[n]=IU(e[n],r):e[n]=r}}return e}function OU(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 KA(e){return typeof e=="function"}function Cb(e,t){return KA(e)?e(t):e??Hl}function IU(e,t){return t?e?n=>{if(AU(n)){const o=n;kb(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function kb(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function YA(e,t){return t?e?t+" "+e:t:e}function AU(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Xt(){}const pu=Object.freeze([]),Hn=Object.freeze({}),MU={style:{transition:"none"}},PU="data-base-ui-click-trigger",_U={fallbackAxisSide:"none"},TU={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Wn(e,t,n={}){const r=t.render,o=DU(t,n);if(n.enabled===!1)return null;const i=n.state??Hn;return jU(e,r,o,i)}function DU(e,t={}){const{className:n,style:r,render:o}=e,{state:i=Hn,ref:s,props:a,stateAttributesMapping:l,enabled:u=!0}=t,d=u?kU(n,i):void 0,f=u?RU(r,i):void 0,m=u?CU(i,l):Hn,p=u?Eb(m,Array.isArray(a)?SU(a):a)??Hn:Hn;return typeof document<"u"&&(u?Array.isArray(s)?p.ref=yU([p.ref,bk(o),...s]):p.ref=cc(p.ref,bk(o),s):cc(null,null)),u?(d!==void 0&&(p.className=YA(p.className,d)),f!==void 0&&(p.style=Eb(p.style,f)),p):Hn}const LU=Symbol.for("react.lazy");function jU(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=qA(n,t.props);o.ref=n.ref;let i=t;if(i?.$$typeof===LU&&(i=c.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!c.isValidElement(i))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(i,o)}if(e&&typeof e=="string")return VU(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Yr(8))}function VU(e,t){return e==="button"?ae.createElement("button",{type:"button",...t,key:t.key}):e==="img"?ae.createElement("img",{alt:"",...t,key:t.key}):c.createElement(e,t)}const kr="none",Rb="trigger-press",FU="trigger-hover",Tx="outside-press",$U="item-press",yk="clear-press",zU="chip-remove-press",Ta="input-change",Ri="input-clear",BU="input-press",am="focus-out",XA="escape-key",Gl="list-navigation";function Je(e,t,n,r){let o=!1,i=!1;const s=Hn;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...s}}function Sl(e,t,n){const r=n??Hn;return{reason:e,event:t??new Event("base-ui"),...r}}const Sb={...c};let xk=0;function HU(e,t="mui"){const[n,r]=c.useState(e),o=e||n;return c.useEffect(()=>{n==null&&(xk+=1,r(`${t}-${xk}`))},[n,t]),o}const wk=Sb.useId;function Dx(e,t){if(wk!==void 0){const n=wk();return e??(t?`${t}-${n}`:n)}return HU(e,t)}function Lx(e){return Dx(e,"base-ui")}const GU=[];function ZA(e){c.useEffect(e,GU)}const mu=null;let Ek=globalThis.requestAnimationFrame;class WU{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"&&Ek!==requestAnimationFrame&&(Ek=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 hu=new WU;class no{static create(){return new no}static request(t){return hu.request(t)}static cancel(t){return hu.cancel(t)}currentId=mu;request(t){this.cancel(),this.currentId=hu.request(()=>{this.currentId=mu,t()})}cancel=()=>{this.currentId!==mu&&(hu.cancel(this.currentId),this.currentId=mu)};disposeEffect=()=>this.cancel}function jx(){const e=Dr(no.create).current;return ZA(e.disposeEffect),e}function Uo(e){return e==null?e:"current"in e?e.current:e}let uc=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const UU={[uc.startingStyle]:""},qU={[uc.endingStyle]:""},JA={transitionStatus(e){return e==="starting"?UU:e==="ending"?qU:null}};function KU(e,t=!1,n=!0){const r=jx();return Ge((o,i=null)=>{r.cancel();function s(){dt.flushSync(o)}const a=Uo(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=uc.startingStyle;if(!l.hasAttribute(f)){r.request(d);return}const m=new MutationObserver(()=>{l.hasAttribute(f)||(m.disconnect(),d())});m.observe(l,{attributes:!0,attributeFilter:[f]}),i?.addEventListener("abort",()=>m.disconnect(),{once:!0})},d=function(){Promise.all(l.getAnimations().map(f=>f.finished)).then(()=>{i?.aborted||s()}).catch(()=>{const f=l.getAnimations();if(n){if(i?.aborted)return;s()}else f.length>0&&f.some(m=>m.pending||m.playState!=="finished")&&d()})};if(t){u();return}r.request(d)}})}function QA(e,t=!1,n=!1){const[r,o]=c.useState(e&&t?"idle":void 0),[i,s]=c.useState(e);return e&&!i&&(s(!0),o("starting")),!e&&i&&r!=="ending"&&!n&&o("ending"),!e&&!i&&r==="ending"&&o(void 0),We(()=>{if(!e&&i&&r!=="ending"&&n){const a=no.request(()=>{o("ending")});return()=>{no.cancel(a)}}},[e,i,r,n]),We(()=>{if(!e||t)return;const a=no.request(()=>{o(void 0)});return()=>{no.cancel(a)}},[t,e]),We(()=>{if(!e||!t)return;e&&i&&r!=="idle"&&o("starting");const a=no.request(()=>{o("idle")});return()=>{no.cancel(a)}},[t,e,i,o,r]),c.useMemo(()=>({mounted:i,setMounted:s,transitionStatus:r}),[i,r])}let eM=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function tM(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:s,unregister:a,subscribeMapChange:l,elementsRef:u,labelsRef:d,nextIndexRef:f}=hU(),m=c.useRef(-1),[p,v]=c.useState(i??(o===eM.GuessFromOrder?()=>{if(m.current===-1){const b=f.current;f.current+=1,m.current=b}return m.current}:-1)),g=c.useRef(null),h=c.useCallback(b=>{if(g.current=b,p!==-1&&b!==null&&(u.current[p]=b,d)){const y=t!==void 0;d.current[p]=y?t:r?.current?.textContent??b.textContent}},[p,u,d,t,r]);return We(()=>{if(i!=null)return;const b=g.current;if(b)return s(b,n),()=>{a(b)}},[i,s,a,n]),We(()=>{if(i==null)return l(b=>{const y=g.current?b.get(g.current)?.index:null;y!=null&&v(y)})},[i,l,v]),c.useMemo(()=>({ref:h,index:p}),[p,h])}function lm(){return typeof window<"u"}function ns(e){return Vx(e)?(e.nodeName||"").toLowerCase():"#document"}function Dn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Oo(e){var t;return(t=(Vx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vx(e){return lm()?e instanceof Node||e instanceof Dn(e).Node:!1}function zt(e){return lm()?e instanceof Element||e instanceof Dn(e).Element:!1}function cn(e){return lm()?e instanceof HTMLElement||e instanceof Dn(e).HTMLElement:!1}function Nb(e){return!lm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Dn(e).ShadowRoot}function rs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=xr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function YU(e){return/^(table|td|th)$/.test(ns(e))}function cm(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const XU=/transform|translate|scale|rotate|perspective|filter/,ZU=/paint|layout|strict|content/,Rs=e=>!!e&&e!=="none";let bg;function Fx(e){const t=zt(e)?xr(e):e;return Rs(t.transform)||Rs(t.translate)||Rs(t.scale)||Rs(t.rotate)||Rs(t.perspective)||!um()&&(Rs(t.backdropFilter)||Rs(t.filter))||XU.test(t.willChange||"")||ZU.test(t.contain||"")}function JU(e){let t=ti(e);for(;cn(t)&&!ei(t);){if(Fx(t))return t;if(cm(t))return null;t=ti(t)}return null}function um(){return bg==null&&(bg=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),bg}function ei(e){return/^(html|body|#document)$/.test(ns(e))}function xr(e){return Dn(e).getComputedStyle(e)}function dm(e){return zt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ti(e){if(ns(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Nb(e)&&e.host||Oo(e);return Nb(t)?t.host:t}function nM(e){const t=ti(e);return ei(t)?e.ownerDocument?e.ownerDocument.body:e.body:cn(t)&&rs(t)?t:nM(t)}function _i(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=nM(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Dn(o);if(i){const a=Ob(s);return t.concat(s,s.visualViewport||[],rs(o)?o:[],a&&n?_i(a):[])}else return t.concat(o,_i(o,[],n))}function Ob(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}let Ib;process.env.NODE_ENV!=="production"&&(Ib=new Set);function Ck(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Ib.has(t)||(Ib.add(t),console.error(`Base UI: ${t}`))}}const rM=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(rM.displayName="CompositeRootContext");function QU(e=!1){const t=c.useContext(rM);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>.":Yr(16));return t}function eq(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,s=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,!i&&n&&(u.tabIndex=t?o:-1)),(i&&(t||s)||!i&&n)&&(u["aria-disabled"]=n),i&&(!t||a)&&(u.disabled=n),u},[r,n,t,s,a,i,o])}}function fm(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=c.useRef(null),s=QU(!0)!==void 0,a=Ge(()=>{const m=i.current;return!!(m?.tagName==="A"&&m?.href)}),{props:l}=eq({focusableWhenDisabled:n,disabled:t,composite:s,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&c.useEffect(()=>{if(!i.current)return;const m=i.current.tagName==="BUTTON";if(o){if(!m){const p=Sb.captureOwnerStack?.()||"";Ck(`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(m){const p=Sb.captureOwnerStack?.()||"";Ck(`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 m=i.current;tq(m)&&s&&t&&l.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,l.disabled,s]);We(u,[u]);const d=c.useCallback((m={})=>{const{onClick:p,onMouseDown:v,onKeyUp:g,onKeyDown:h,onPointerDown:b,...y}=m;return qA({type:o?"button":void 0,onClick(w){if(t){w.preventDefault();return}p?.(w)},onMouseDown(w){t||v?.(w)},onKeyDown(w){if(t||(kb(w),h?.(w)),w.baseUIHandlerPrevented)return;const C=w.target===w.currentTarget&&!o&&!a()&&!t,R=w.key==="Enter",k=w.key===" ";C&&((k||R)&&w.preventDefault(),R&&p?.(w))},onKeyUp(w){t||(kb(w),g?.(w)),!w.baseUIHandlerPrevented&&w.target===w.currentTarget&&!o&&!t&&w.key===" "&&p?.(w)},onPointerDown(w){if(t){w.preventDefault();return}b?.(w)}},o?void 0:{role:"button"},l,y)},[t,l,o,a]),f=Ge(m=>{i.current=m,u()});return{getButtonProps:d,buttonRef:f}}function tq(e){return cn(e)&&e.tagName==="BUTTON"}const oa=typeof navigator<"u",yg=oq(),oM=sq(),$x=iq(),iM=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),sM=yg.platform==="MacIntel"&&yg.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(yg.platform),kk=oa&&/firefox/i.test($x),nq=oa&&/apple/i.test(navigator.vendor),Cf=oa&&/android/i.test(oM)||/android/i.test($x);oa&&oM.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const rq=$x.includes("jsdom/");function oq(){if(!oa)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 iq(){if(!oa)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function sq(){if(!oa)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const Ab="data-base-ui-focusable",aM="active",lM="selected",aq="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Ti="ArrowLeft",Di="ArrowRight",zx="ArrowUp",Dc="ArrowDown";function Jo(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function ht(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Nb(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Jn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function qr(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 lq(e){return e.matches("html,body")}function Bx(e){return cn(e)&&e.matches(aq)}function Mb(e){return e?e.getAttribute("role")==="combobox"&&Bx(e):!1}function Pb(e){return e?e.hasAttribute(Ab)?e:e.querySelector(`[${Ab}]`)||e:null}function ja(e,t,n=!0){return e.filter(o=>o.parentId===t&&(!n||o.context?.open)).flatMap(o=>[o,...ja(e,o.id,n)])}function Rk(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(i=>i.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}function $t(e){e.preventDefault(),e.stopPropagation()}function cq(e){return"nativeEvent"in e}function cM(e){return e.pointerType===""&&e.isTrusted?!0:Cf&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function uM(e){return rq?!1:!Cf&&e.width===0&&e.height===0||Cf&&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 Sk(e,t){return["mouse","pen"].includes(e)}function dM(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const uq=["top","right","bottom","left"],zi=Math.min,sr=Math.max,kf=Math.round,Da=Math.floor,po=e=>({x:e,y:e}),dq={left:"right",right:"left",bottom:"top",top:"bottom"};function Rf(e,t,n){return sr(e,zi(t,n))}function bo(e,t){return typeof e=="function"?e(t):e}function hr(e){return e.split("-")[0]}function ri(e){return e.split("-")[1]}function Hx(e){return e==="x"?"y":"x"}function pm(e){return e==="y"?"height":"width"}function Sr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function mm(e){return Hx(Sr(e))}function fq(e,t,n){n===void 0&&(n=!1);const r=ri(e),o=mm(e),i=pm(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Sf(s)),[s,Sf(s)]}function pq(e){const t=Sf(e);return[_b(e),t,_b(t)]}function _b(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Nk=["left","right"],Ok=["right","left"],mq=["top","bottom"],hq=["bottom","top"];function gq(e,t,n){switch(e){case"top":case"bottom":return n?t?Ok:Nk:t?Nk:Ok;case"left":case"right":return t?mq:hq;default:return[]}}function vq(e,t,n,r){const o=ri(e);let i=gq(hr(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(_b)))),i}function Sf(e){const t=hr(e);return dq[t]+e.slice(t.length)}function bq(e){return{top:0,right:0,bottom:0,left:0,...e}}function Gx(e){return typeof e!="number"?bq(e):{top:e,right:e,bottom:e,left:e}}function Nf(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 gu(e,t,n){return Math.floor(e/t)!==n}function Wl(e,t){return t<0||t>=e.current.length}function xg(e,t){return Bn(e,{disabledIndices:t})}function Ik(e,t){return Bn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Bn(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let i=t;do i+=n?-o:o;while(i>=0&&i<=e.current.length-1&&Ul(e,i,r));return i}function yq(e,{event:t,orientation:n,loopFocus:r,rtl:o,cols:i,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u;const m=[],p={};let v=!1;{let b=null,y=-1;e.current.forEach((x,w)=>{if(x==null)return;const C=x.closest('[role="row"]');C&&(v=!0),(C!==b||y===-1)&&(b=C,y+=1,m[y]=[]),m[y].push(w),p[w]=y})}const g=v&&m.length>0&&m.some(b=>b.length!==i);function h(b){if(!g||u===-1)return;const y=p[u];if(y==null)return;const x=m[y].indexOf(u);let w=b==="up"?y-1:y+1;r&&(w<0?w=m.length-1:w>=m.length&&(w=0));const C=new Set;for(;w>=0&&w<m.length&&!C.has(w);){C.add(w);const R=m[w];if(R.length===0){w=b==="up"?w-1:w+1;continue}const k=Math.min(x,R.length-1);for(let S=k;S>=0;S-=1){const P=R[S];if(!Ul(e,P,s))return P}w=b==="up"?w-1:w+1,r&&(w<0?w=m.length-1:w>=m.length&&(w=0))}}if(t.key===zx){const b=h("up");if(b!==void 0)d&&$t(t),f=b;else{if(d&&$t(t),u===-1)f=l;else if(f=Bn(e,{startingIndex:f,amount:i,decrement:!0,disabledIndices:s}),r&&(u-i<a||f<0)){const y=u%i,x=l%i,w=l-(x-y);x===y?f=l:f=x>y?w:w-i}Wl(e,f)&&(f=u)}}if(t.key===Dc){const b=h("down");b!==void 0?(d&&$t(t),f=b):(d&&$t(t),u===-1?f=a:(f=Bn(e,{startingIndex:u,amount:i,disabledIndices:s}),r&&u+i>l&&(f=Bn(e,{startingIndex:u%i-i,amount:i,disabledIndices:s}))),Wl(e,f)&&(f=u))}if(n==="both"){const b=Da(u/i);t.key===(o?Ti:Di)&&(d&&$t(t),u%i!==i-1?(f=Bn(e,{startingIndex:u,disabledIndices:s}),r&&gu(f,i,b)&&(f=Bn(e,{startingIndex:u-u%i-1,disabledIndices:s}))):r&&(f=Bn(e,{startingIndex:u-u%i-1,disabledIndices:s})),gu(f,i,b)&&(f=u)),t.key===(o?Di:Ti)&&(d&&$t(t),u%i!==0?(f=Bn(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&gu(f,i,b)&&(f=Bn(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:s}))):r&&(f=Bn(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:s})),gu(f,i,b)&&(f=u));const y=Da(l/i)===b;Wl(e,f)&&(r&&y?f=t.key===(o?Di:Ti)?l:Bn(e,{startingIndex:u-u%i-1,disabledIndices:s}):f=u)}return f}function xq(e,t,n){const r=[];let o=0;return e.forEach(({width:i,height:s},a)=>{if(i>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<i;d+=1)for(let f=0;f<s;f+=1)u.push(o+d+f*t);o%t+i<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),l=!0):o+=1}}),[...r]}function wq(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e);default:return-1}}function Eq(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Ul(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 Cq=["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] *)"],Of=Cq.join(","),fM=typeof Element>"u",il=fM?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,If=!fM&&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},Af=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"),i=o===""||o==="true",s=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Af(t.parentNode));return s},kq=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},pM=function(t,n,r){if(Af(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Of));return n&&il.call(t,Of)&&o.unshift(t),o=o.filter(r),o},Mf=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!Af(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,u=Mf(l,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:s,candidates:u})}else{var d=il.call(s,Of);d&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var f=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),m=!Af(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(f&&m){var p=Mf(f===!0?s.children:f.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:s,candidates:p})}else i.unshift.apply(i,s.children)}}return o},mM=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},hM=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||kq(t))&&!mM(t)?0:t.tabIndex},Rq=function(t,n){var r=hM(t);return r<0&&n&&!mM(t)?0:r},Sq=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},gM=function(t){return t.tagName==="INPUT"},Nq=function(t){return gM(t)&&t.type==="hidden"},Oq=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Iq=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Aq=function(t){if(!t.name)return!0;var n=t.form||If(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(s){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",s.message),!1}var i=Iq(o,t.form);return!i||i===t},Mq=function(t){return gM(t)&&t.type==="radio"},Pq=function(t){return Mq(t)&&!Aq(t)},_q=function(t){var n,r=t&&If(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var u,d,f;r=If(o),o=(u=r)===null||u===void 0?void 0:u.host,i=!!((d=o)!==null&&d!==void 0&&(f=d.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},Ak=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},Tq=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var s=il.call(t,"details>summary:first-of-type"),a=s?t.parentElement:t;if(il.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=If(t);if(u&&!u.shadowRoot&&o(u)===!0)return Ak(t);t.assignedSlot?t=t.assignedSlot:!u&&d!==t.ownerDocument?t=d.host:t=u}t=l}if(_q(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ak(t);return!1},Dq=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 il.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Tb=function(t,n){return!(n.disabled||Nq(n)||Tq(n,t)||Oq(n)||Dq(n))},Db=function(t,n){return!(Pq(n)||hM(n)<0||!Tb(t,n))},Lq=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},vM=function(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=Rq(a,s),u=s?vM(o.candidates):a;l===0?s?n.push.apply(n,u):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:u})}),r.sort(Sq).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},hm=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Mf([t],n.includeContainer,{filter:Db.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Lq}):r=pM(t,n.includeContainer,Db.bind(null,n)),vM(r)},jq=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Mf([t],n.includeContainer,{filter:Tb.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=pM(t,n.includeContainer,Tb.bind(null,n)),r},bM=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return il.call(t,Of)===!1?!1:Db(n,t)};function nn(e){return e?.ownerDocument||document}const Lc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function yM(e,t){const n=hm(e,Lc()),r=n.length;if(r===0)return;const o=Jo(nn(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function xM(e){return yM(nn(e).body,1)||e}function wM(e){return yM(nn(e).body,-1)||e}function ql(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ht(n,r)}function Vq(e){hm(e,Lc()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Mk(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 Wx(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=Ge(o),s=KU(r,n,!1);c.useEffect(()=>{if(!t)return;const a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,n,i,s])}const Nl=0;class sl{static create(){return new sl}currentId=Nl;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Nl,n()},t)}isStarted(){return this.currentId!==Nl}clear=()=>{this.currentId!==Nl&&(clearTimeout(this.currentId),this.currentId=Nl)};disposeEffect=()=>this.clear}function Fs(){const e=Dr(sl.create).current;return ZA(e.disposeEffect),e}let Pk={},_k={},Tk="";function Fq(e){if(typeof document>"u")return!1;const t=nn(e);return Dn(t).innerWidth-t.documentElement.clientWidth>0}function $q(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=nn(e),r=n.documentElement,o=n.body,i=rs(r)?r:o,s=i.style.overflowY,a=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",i.style.overflowY="scroll";const l=i.offsetWidth;i.style.overflowY="hidden";const u=i.offsetWidth;return i.style.overflowY=s,r.style.scrollbarGutter=a,l===u}function zq(e){const t=nn(e),n=t.documentElement,r=t.body,o=rs(n)?n:r,i={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,i)}}function Bq(e){const t=nn(e),n=t.documentElement,r=t.body,o=Dn(n);let i=0,s=0,a=!1;const l=no.create();if(iM&&(o.visualViewport?.scale??1)!==1)return()=>{};function u(){const m=o.getComputedStyle(n),p=o.getComputedStyle(r),h=(m.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,s=n.scrollLeft,Pk={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Tk=n.style.scrollBehavior,_k={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 b=n.scrollHeight>n.clientHeight,y=n.scrollWidth>n.clientWidth,x=m.overflowY==="scroll"||p.overflowY==="scroll",w=m.overflowX==="scroll"||p.overflowX==="scroll",C=Math.max(0,o.innerWidth-r.clientWidth),R=Math.max(0,o.innerHeight-r.clientHeight),k=parseFloat(p.marginTop)+parseFloat(p.marginBottom),S=parseFloat(p.marginLeft)+parseFloat(p.marginRight),P=rs(n)?n:r;if(a=$q(e),a){n.style.scrollbarGutter=h,P.style.overflowY="hidden",P.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:h,overflowY:"hidden",overflowX:"hidden"}),(b||x)&&(n.style.overflowY="scroll"),(y||w)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:k||R?`calc(100dvh - ${k+R}px)`:"100dvh",width:S||C?`calc(100vw - ${S+C}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=s,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function d(){Object.assign(n.style,Pk),Object.assign(r.style,_k),a||(n.scrollTop=i,n.scrollLeft=s,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=Tk)}function f(){d(),l.request(u)}return u(),o.addEventListener("resize",f),()=>{l.cancel(),d(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",f)}}class Hq{lockCount=0;restore=null;timeoutLock=sl.create();timeoutUnlock=sl.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=nn(t).documentElement,o=Dn(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=Xt;return}const i=sM||!Fq(t);this.restore=i?zq(t):Bq(t)}}const Gq=new Hq;function Wq(e=!0,t=null){We(()=>{if(e)return Gq.acquire(t)},[e,t])}function Rr(e){const t=Dr(Uq,e).current;return t.next=e,We(t.effect),t}function Uq(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function qq(){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 EM=c.createContext(null);process.env.NODE_ENV!=="production"&&(EM.displayName="FloatingNodeContext");const CM=c.createContext(null);process.env.NODE_ENV!=="production"&&(CM.displayName="FloatingTreeContext");const kM=()=>c.useContext(EM)?.id||null,gm=e=>{const t=c.useContext(CM);return e??t};function Pf(e){return`data-base-ui-${e}`}const RM={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Ux={...RM,position:"fixed",top:0,left:0},Kq={...RM,position:"absolute"},dc=c.forwardRef(function(t,n){const[r,o]=c.useState();We(()=>{nq&&o("button")},[]);const i={tabIndex:0,role:r};return E.jsx("span",{...t,ref:n,style:Ux,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(dc.displayName="FocusGuard");let Dk=0;function Kl(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Dk);const i=()=>e?.focus({preventScroll:n});o?i():Dk=requestAnimationFrame(i)}const Va={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Lk(e){return e==="inert"?Va.inert:e==="aria-hidden"?Va["aria-hidden"]:Va.none}let vu=new WeakSet,bu={},wg=0;const SM=e=>e&&(e.host||SM(e.parentNode)),Yq=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=SM(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Xq(e,t,n,r){const o="data-base-ui-inert",i=r?"inert":n?"aria-hidden":null,s=Yq(t,e),a=new Set,l=new Set(s),u=[];bu[o]||(bu[o]=new WeakMap);const d=bu[o];s.forEach(f),m(t),a.clear();function f(p){!p||a.has(p)||(a.add(p),p.parentNode&&f(p.parentNode))}function m(p){!p||l.has(p)||[].forEach.call(p.children,v=>{if(ns(v)!=="script")if(a.has(v))m(v);else{const g=i?v.getAttribute(i):null,h=g!==null&&g!=="false",b=Lk(i),y=(b.get(v)||0)+1,x=(d.get(v)||0)+1;b.set(v,y),d.set(v,x),u.push(v),y===1&&h&&vu.add(v),x===1&&v.setAttribute(o,""),!h&&i&&v.setAttribute(i,i==="inert"?"":"true")}})}return wg+=1,()=>{u.forEach(p=>{const v=Lk(i),h=(v.get(p)||0)-1,b=(d.get(p)||0)-1;v.set(p,h),d.set(p,b),h||(!vu.has(p)&&i&&p.removeAttribute(i),vu.delete(p)),b||p.removeAttribute(o)}),wg-=1,wg||(Va.inert=new WeakMap,Va["aria-hidden"]=new WeakMap,Va.none=new WeakMap,vu=new WeakSet,bu={})}}function Zq(e,t=!1,n=!1){const r=nn(e[0]).body;return Xq(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const qx=c.createContext(null);process.env.NODE_ENV!=="production"&&(qx.displayName="PortalContext");const NM=()=>c.useContext(qx),Jq=Pf("portal");function Qq(e={}){const{ref:t,container:n,componentProps:r=Hn,elementProps:o}=e,i=Dx(),a=NM()?.portalNode,[l,u]=c.useState(null),[d,f]=c.useState(null),m=Ge(h=>{h!==null&&f(h)}),p=c.useRef(null);We(()=>{if(n===null){p.current&&(p.current=null,f(null),u(null));return}if(i==null)return;const h=(n&&(Vx(n)?n:n.current))??a??document.body;if(h==null){p.current&&(p.current=null,f(null),u(null));return}p.current!==h&&(p.current=h,f(null),u(h))},[n,a,i]);const v=Wn("div",r,{ref:[t,m],props:[{id:i,[Jq]:""},o]});return{portalNode:d,portalSubtree:l&&v?dt.createPortal(v,l):null}}const OM=c.forwardRef(function(t,n){const{children:r,container:o,className:i,render:s,renderGuards:a,...l}=t,{portalNode:u,portalSubtree:d}=Qq({container:o,ref:n,componentProps:t,elementProps:l}),f=c.useRef(null),m=c.useRef(null),p=c.useRef(null),v=c.useRef(null),[g,h]=c.useState(null),b=g?.modal,y=g?.open,x=typeof a=="boolean"?a:!!g&&!g.modal&&g.open&&!!u;c.useEffect(()=>{if(!u||b)return;function C(R){u&&R.relatedTarget&&ql(R)&&(R.type==="focusin"?Mk:Vq)(u)}return u.addEventListener("focusin",C,!0),u.addEventListener("focusout",C,!0),()=>{u.removeEventListener("focusin",C,!0),u.removeEventListener("focusout",C,!0)}},[u,b]),c.useEffect(()=>{!u||y||Mk(u)},[y,u]);const w=c.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:m,beforeInsideRef:p,afterInsideRef:v,portalNode:u,setFocusManagerState:h}),[u]);return E.jsxs(c.Fragment,{children:[d,E.jsxs(qx.Provider,{value:w,children:[x&&u&&E.jsx(dc,{"data-type":"outside",ref:f,onFocus:C=>{if(ql(C,u))p.current?.focus();else{const R=g?g.domReference:null;wM(R)?.focus()}}}),x&&u&&E.jsx("span",{"aria-owns":u.id,style:TU}),u&&dt.createPortal(r,u),x&&u&&E.jsx(dc,{"data-type":"outside",ref:m,onFocus:C=>{if(ql(C,u))v.current?.focus();else{const R=g?g.domReference:null;xM(R)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,Je(am,C.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(OM.displayName="FloatingPortal");function e8(e,t){const n=Dn(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 jk=20;let Si=[];function Kx(){Si=Si.filter(e=>e.deref()?.isConnected)}function t8(e){Kx(),e&&ns(e)!=="body"&&(Si.push(new WeakRef(e)),Si.length>jk&&(Si=Si.slice(-jk)))}function Eg(){return Kx(),Si[Si.length-1]?.deref()}function n8(e){if(!e)return null;const t=Lc();return bM(e,t)?e:hm(e,t)[0]||e}function r8(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():xr(e).display!=="none"}function Vk(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=Lc(),o=jq(e,n).filter(s=>{const a=s.getAttribute("data-tabindex")||"";return bM(s,n)||s.hasAttribute("data-tabindex")&&!a.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||o.length===0?i!=="0"&&e.setAttribute("tabindex","0"):(i!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function o8(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:i=!0,restoreFocus:s=!1,modal:a=!0,closeOnFocusOut:l=!0,openInteractionType:u="",nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:m,externalTree:p}=e,v="rootStore"in t?t.rootStore:t,g=v.useState("open"),h=v.useState("domReferenceElement"),b=v.useState("floatingElement"),{events:y,dataRef:x}=v.context,w=Ge(()=>x.current.floatingContext?.nodeId),C=o===!1,R=Mb(h)&&C,k=c.useRef(["content"]),S=Rr(o),P=Rr(i),L=Rr(u),_=gm(p),O=NM(),B=c.useRef(null),I=c.useRef(null),V=c.useRef(!1),F=c.useRef(!1),D=c.useRef(!1),T=c.useRef(-1),q=c.useRef(""),A=c.useRef(""),ee=c.useRef(null),ie=c.useRef(null),Y=cc(ee,m,O?.beforeInsideRef),Q=cc(ie,O?.afterInsideRef),X=Fs(),J=Fs(),te=jx(),le=O!=null,z=Pb(b),re=Ge((N=z)=>N?hm(N,Lc()):[]),oe=Ge(N=>{const j=re(N);return k.current.map(()=>j).filter(Boolean).flat()});c.useEffect(()=>{if(r||!a)return;function N(K){K.key==="Tab"&&ht(z,Jo(nn(z)))&&re().length===0&&!R&&$t(K)}const j=nn(z);return j.addEventListener("keydown",N),()=>{j.removeEventListener("keydown",N)}},[r,h,z,a,k,R,re,oe]),c.useEffect(()=>{if(r||!g)return;const N=nn(z);function j(){D.current=!1}function K(U){const $=Jn(U),W=ht(b,$)||ht(h,$)||ht(O?.portalNode,$);D.current=!W,A.current=U.pointerType||"keyboard",$?.closest(`[${PU}]`)&&(F.current=!0)}function H(){A.current="keyboard"}return N.addEventListener("pointerdown",K,!0),N.addEventListener("pointerup",j,!0),N.addEventListener("pointercancel",j,!0),N.addEventListener("keydown",H,!0),()=>{N.removeEventListener("pointerdown",K,!0),N.removeEventListener("pointerup",j,!0),N.removeEventListener("pointercancel",j,!0),N.removeEventListener("keydown",H,!0)}},[r,b,h,z,g,O]),c.useEffect(()=>{if(r||!l)return;const N=nn(z);function j(){F.current=!0,J.start(0,()=>{F.current=!1})}function K(Z){const G=Jn(Z),we=re().indexOf(G);we!==-1&&(T.current=we)}function H(Z){const G=Z.relatedTarget,ne=Z.currentTarget,we=Jn(Z);queueMicrotask(()=>{const Ve=w(),Ye=v.context.triggerElements,ft=G?.hasAttribute(Pf("focus-guard"))&&[ee.current,ie.current,O?.beforeInsideRef.current,O?.afterInsideRef.current,O?.beforeOutsideRef.current,O?.afterOutsideRef.current,Uo(f),Uo(d)].includes(G),qe=!(ht(h,G)||ht(b,G)||ht(G,b)||ht(O?.portalNode,G)||G!=null&&Ye.hasElement(G)||Ye.hasMatchingElement(ce=>ht(ce,G))||ft||_&&(ja(_.nodesRef.current,Ve).find(ce=>ht(ce.context?.elements.floating,G)||ht(ce.context?.elements.domReference,G))||Rk(_.nodesRef.current,Ve).find(ce=>[ce.context?.elements.floating,Pb(ce.context?.elements.floating)].includes(G)||ce.context?.elements.domReference===G)));if(ne===h&&z&&Vk(z,k),s&&ne!==h&&!r8(we)&&Jo(N)===N.body){if(cn(z)&&(z.focus(),s==="popup")){te.request(()=>{z.focus()});return}const ce=T.current,Ke=re(),ot=Ke[ce]||Ke[Ke.length-1]||z;cn(ot)&&ot.focus()}if(x.current.insideReactTree){x.current.insideReactTree=!1;return}(R||!a)&&G&&qe&&!F.current&&(R||G!==Eg())&&(V.current=!0,v.setOpen(!1,Je(am,Z)))})}function U(){D.current||(x.current.insideReactTree=!0,X.start(0,()=>{x.current.insideReactTree=!1}))}const $=cn(h)?h:null,W=[];if(!(!b&&!$))return $&&($.addEventListener("focusout",H),$.addEventListener("pointerdown",j),W.push(()=>{$.removeEventListener("focusout",H),$.removeEventListener("pointerdown",j)})),b&&(b.addEventListener("focusin",K),b.addEventListener("focusout",H),O&&(b.addEventListener("focusout",U,!0),W.push(()=>{b.removeEventListener("focusout",U,!0)})),W.push(()=>{b.removeEventListener("focusin",K),b.removeEventListener("focusout",H)})),()=>{W.forEach(Z=>{Z()})}},[r,h,b,z,a,_,O,v,l,s,re,R,w,k,x,X,J,te,d,f]),c.useEffect(()=>{if(r||!b||!g)return;const N=Array.from(O?.portalNode?.querySelectorAll(`[${Pf("portal")}]`)||[]),K=(_?Rk(_.nodesRef.current,w()):[]).find(U=>Mb(U.context?.elements.domReference||null))?.context?.elements.domReference,H=[b,K,...N,B.current,I.current,ee.current,ie.current,O?.beforeOutsideRef.current,O?.afterOutsideRef.current,Uo(f),Uo(d),R?h:null].filter(U=>U!=null);return Zq(H,a||R)},[g,r,h,b,a,k,O,R,_,w,d,f]),We(()=>{if(!g||r||!cn(z))return;const N=nn(z),j=Jo(N);queueMicrotask(()=>{const K=oe(z),H=S.current,U=typeof H=="function"?H(L.current||""):H;if(U===void 0||U===!1)return;let $;U===!0||U===null?$=K[0]||z:$=Uo(U),$=$||K[0]||z,!ht(z,j)&&Kl($,{preventScroll:$===z})})},[r,g,z,C,oe,S,L]),We(()=>{if(r||!z)return;const N=nn(z),j=Jo(N);t8(j);function K($){if($.open||(q.current=e8($.nativeEvent,A.current)),$.reason===FU&&$.nativeEvent.type==="mouseleave"&&(V.current=!0),$.reason===Tx)if($.nested)V.current=!1;else if(cM($.nativeEvent)||uM($.nativeEvent))V.current=!1;else{let W=!1;document.createElement("div").focus({get preventScroll(){return W=!0,!1}}),W?V.current=!1:V.current=!0}}y.on("openchange",K);const H=N.createElement("span");H.setAttribute("tabindex","-1"),H.setAttribute("aria-hidden","true"),Object.assign(H.style,Ux),le&&h&&h.insertAdjacentElement("afterend",H);function U(){const $=P.current;let W=typeof $=="function"?$(q.current):$;if(W===void 0||W===!1)return null;if(W===null&&(W=!0),typeof W=="boolean"){const G=h||Eg();return G&&G.isConnected?G:H}const Z=h||Eg()||H;return Uo(W)||Z}return()=>{y.off("openchange",K);const $=Jo(N),W=ht(b,$)||_&&ja(_.nodesRef.current,w(),!1).some(G=>ht(G.context?.elements.floating,$)),Z=U();queueMicrotask(()=>{const G=n8(Z),ne=typeof P.current!="boolean";P.current&&!V.current&&cn(G)&&(!(!ne&&G!==$&&$!==N.body)||W)&&G.focus({preventScroll:!0}),H.remove(),V.current=!1})}},[r,b,z,P,x,y,_,le,h,w]),We(()=>{if(!iM||g||!b)return;const N=Jo(nn(b));!cn(N)||!Bx(N)||ht(b,N)&&N.blur()},[g,b]),We(()=>{if(!(r||!O))return O.setFocusManagerState({modal:a,closeOnFocusOut:l,open:g,onOpenChange:v.setOpen,domReference:h}),()=>{O.setFocusManagerState(null)}},[r,O,a,g,v,l,h]),We(()=>{if(!(r||!z))return Vk(z,k),()=>{queueMicrotask(Kx)}},[r,z,k]);const M=!r&&(a?!R:!0)&&(le||a);return E.jsxs(c.Fragment,{children:[M&&E.jsx(dc,{"data-type":"inside",ref:Y,onFocus:N=>{if(a){const j=oe();Kl(j[j.length-1])}else O?.portalNode&&(V.current=!1,ql(N,O.portalNode)?xM(h)?.focus():Uo(f??O.beforeOutsideRef)?.focus())}}),n,M&&E.jsx(dc,{"data-type":"inside",ref:Q,onFocus:N=>{a?Kl(oe()[0]):O?.portalNode&&(l&&(V.current=!0),ql(N,O.portalNode)?wM(h)?.focus():Uo(d??O.afterOutsideRef)?.focus())}})]})}function IM(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:i="click",toggle:s=!0,ignoreMouse:a=!1,stickIfOpen:l=!0,touchOpenDelay:u=0,reason:d=Rb}=t,f=c.useRef(void 0),m=jx(),p=Fs(),v=c.useMemo(()=>({onPointerDown(g){f.current=g.pointerType},onMouseDown(g){const h=f.current,b=g.nativeEvent,y=n.select("open");if(g.button!==0||i==="click"||Sk(h)&&a)return;const x=r.current.openEvent,w=x?.type,C=n.select("domReferenceElement")!==g.currentTarget,R=y&&C||!(y&&s&&(!(x&&l)||w==="click"||w==="mousedown"));if(Bx(b.target)){const S=Je(d,b,b.target);R&&h==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,S)}):n.setOpen(R,S);return}const k=g.currentTarget;m.request(()=>{const S=Je(d,b,k);R&&h==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,S)}):n.setOpen(R,S)})},onClick(g){if(i==="mousedown-only")return;const h=f.current;if(i==="mousedown"&&h){f.current=void 0;return}if(Sk(h)&&a)return;const b=n.select("open"),y=r.current.openEvent,x=n.select("domReferenceElement")!==g.currentTarget,w=b&&x||!(b&&s&&(!(y&&l)||dM(y))),C=Je(d,g.nativeEvent,g.currentTarget);w&&h==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,C)}):n.setOpen(w,C)},onKeyDown(){f.current=void 0}}),[r,i,a,n,l,s,m,p,u,d]);return c.useMemo(()=>o?{reference:v}:Hn,[o,v])}function Fk(e,t,n){let{reference:r,floating:o}=e;const i=Sr(t),s=mm(t),a=pm(s),l=hr(t),u=i==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,m=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(ri(t)){case"start":p[s]-=m*(n&&u?-1:1);break;case"end":p[s]+=m*(n&&u?-1:1);break}return p}async function i8(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:p=0}=bo(t,e),v=Gx(p),h=a[m?f==="floating"?"reference":"floating":f],b=Nf(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),y=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),w=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},C=Nf(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:x,strategy:l}):y);return{top:(b.top-C.top+v.top)/w.y,bottom:(C.bottom-b.bottom+v.bottom)/w.y,left:(b.left-C.left+v.left)/w.x,right:(C.right-b.right+v.right)/w.x}}const s8=50,a8=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:i8},l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=Fk(u,r,l),m=r,p=0;const v={};for(let g=0;g<i.length;g++){const h=i[g];if(!h)continue;const{name:b,fn:y}=h,{x,y:w,data:C,reset:R}=await y({x:d,y:f,initialPlacement:r,placement:m,strategy:o,middlewareData:v,rects:u,platform:a,elements:{reference:e,floating:t}});d=x??d,f=w??f,v[b]={...v[b],...C},R&&p<s8&&(p++,typeof R=="object"&&(R.placement&&(m=R.placement),R.rects&&(u=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:d,y:f}=Fk(u,m,l)),g=-1)}return{x:d,y:f,placement:m,strategy:o,middlewareData:v}},l8=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=bo(e,t)||{};if(u==null)return{};const f=Gx(d),m={x:n,y:r},p=mm(o),v=pm(p),g=await s.getDimensions(u),h=p==="y",b=h?"top":"left",y=h?"bottom":"right",x=h?"clientHeight":"clientWidth",w=i.reference[v]+i.reference[p]-m[p]-i.floating[v],C=m[p]-i.reference[p],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let k=R?R[x]:0;(!k||!await(s.isElement==null?void 0:s.isElement(R)))&&(k=a.floating[x]||i.floating[v]);const S=w/2-C/2,P=k/2-g[v]/2-1,L=zi(f[b],P),_=zi(f[y],P),O=L,B=k-g[v]-_,I=k/2-g[v]/2+S,V=Rf(O,I,B),F=!l.arrow&&ri(o)!=null&&I!==V&&i.reference[v]/2-(I<O?L:_)-g[v]/2<0,D=F?I<O?I-O:I-B:0;return{[p]:m[p]+D,data:{[p]:V,centerOffset:I-V-D,...F&&{alignmentOffset:D}},reset:F}}}),c8=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...h}=bo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=hr(o),y=Sr(a),x=hr(a)===a,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=m||(x||!g?[Sf(a)]:pq(a)),R=v!=="none";!m&&R&&C.push(...vq(a,g,v,w));const k=[a,...C],S=await l.detectOverflow(t,h),P=[];let L=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&P.push(S[b]),f){const I=fq(o,s,w);P.push(S[I[0]],S[I[1]])}if(L=[...L,{placement:o,overflows:P}],!P.every(I=>I<=0)){var _,O;const I=(((_=i.flip)==null?void 0:_.index)||0)+1,V=k[I];if(V&&(!(f==="alignment"?y!==Sr(V):!1)||L.every(T=>Sr(T.placement)===y?T.overflows[0]>0:!0)))return{data:{index:I,overflows:L},reset:{placement:V}};let F=(O=L.filter(D=>D.overflows[0]<=0).sort((D,T)=>D.overflows[1]-T.overflows[1])[0])==null?void 0:O.placement;if(!F)switch(p){case"bestFit":{var B;const D=(B=L.filter(T=>{if(R){const q=Sr(T.placement);return q===y||q==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(q=>q>0).reduce((q,A)=>q+A,0)]).sort((T,q)=>T[1]-q[1])[0])==null?void 0:B[0];D&&(F=D);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function $k(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zk(e){return uq.some(t=>e[t]>=0)}const u8=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=bo(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=$k(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:zk(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=$k(s,n.floating);return{data:{escapedOffsets:a,escaped:zk(a)}}}default:return{}}}}},AM=new Set(["left","top"]);async function d8(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=hr(n),a=ri(n),l=Sr(n)==="y",u=AM.has(s)?-1:1,d=i&&l?-1:1,f=bo(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof v=="number"&&(p=a==="end"?v*-1:v),l?{x:p*d,y:m*u}:{x:m*u,y:p*d}}const f8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await d8(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},p8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:y,y:x}=b;return{x:y,y:x}}},...u}=bo(e,t),d={x:n,y:r},f=await i.detectOverflow(t,u),m=Sr(hr(o)),p=Hx(m);let v=d[p],g=d[m];if(s){const b=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=v+f[b],w=v-f[y];v=Rf(x,v,w)}if(a){const b=m==="y"?"top":"left",y=m==="y"?"bottom":"right",x=g+f[b],w=g-f[y];g=Rf(x,g,w)}const h=l.fn({...t,[p]:v,[m]:g});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:s,[m]:a}}}}}},m8=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=bo(e,t),d={x:n,y:r},f=Sr(o),m=Hx(f);let p=d[m],v=d[f];const g=bo(a,t),h=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const x=m==="y"?"height":"width",w=i.reference[m]-i.floating[x]+h.mainAxis,C=i.reference[m]+i.reference[x]-h.mainAxis;p<w?p=w:p>C&&(p=C)}if(u){var b,y;const x=m==="y"?"width":"height",w=AM.has(hr(o)),C=i.reference[f]-i.floating[x]+(w&&((b=s.offset)==null?void 0:b[f])||0)+(w?0:h.crossAxis),R=i.reference[f]+i.reference[x]+(w?0:((y=s.offset)==null?void 0:y[f])||0)-(w?h.crossAxis:0);v<C?v=C:v>R&&(v=R)}return{[m]:p,[f]:v}}}},h8=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=bo(e,t),d=await s.detectOverflow(t,u),f=hr(o),m=ri(o),p=Sr(o)==="y",{width:v,height:g}=i.floating;let h,b;f==="top"||f==="bottom"?(h=f,b=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=f,h=m==="end"?"top":"bottom");const y=g-d.top-d.bottom,x=v-d.left-d.right,w=zi(g-d[h],y),C=zi(v-d[b],x),R=!t.middlewareData.shift;let k=w,S=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=y),R&&!m){const L=sr(d.left,0),_=sr(d.right,0),O=sr(d.top,0),B=sr(d.bottom,0);p?S=v-2*(L!==0||_!==0?L+_:sr(d.left,d.right)):k=g-2*(O!==0||B!==0?O+B:sr(d.top,d.bottom))}await l({...t,availableWidth:S,availableHeight:k});const P=await s.getDimensions(a.floating);return v!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function MM(e){const t=xr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=cn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=kf(n)!==i||kf(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Yx(e){return zt(e)?e:e.contextElement}function Fa(e){const t=Yx(e);if(!cn(t))return po(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=MM(t);let s=(i?kf(n.width):n.width)/r,a=(i?kf(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const g8=po(0);function PM(e){const t=Dn(e);return!um()||!t.visualViewport?g8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function v8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Dn(e)?!1:t}function $s(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Yx(e);let s=po(1);t&&(r?zt(r)&&(s=Fa(r)):s=Fa(e));const a=v8(i,n,r)?PM(i):po(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,d=o.width/s.x,f=o.height/s.y;if(i){const m=Dn(i),p=r&&zt(r)?Dn(r):r;let v=m,g=Ob(v);for(;g&&r&&p!==v;){const h=Fa(g),b=g.getBoundingClientRect(),y=xr(g),x=b.left+(g.clientLeft+parseFloat(y.paddingLeft))*h.x,w=b.top+(g.clientTop+parseFloat(y.paddingTop))*h.y;l*=h.x,u*=h.y,d*=h.x,f*=h.y,l+=x,u+=w,v=Dn(g),g=Ob(v)}}return Nf({width:d,height:f,x:l,y:u})}function vm(e,t){const n=dm(e).scrollLeft;return t?t.left+n:$s(Oo(e)).left+n}function _M(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-vm(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function b8(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Oo(r),a=t?cm(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=po(1);const d=po(0),f=cn(r);if((f||!f&&!i)&&((ns(r)!=="body"||rs(s))&&(l=dm(r)),f)){const p=$s(r);u=Fa(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const m=s&&!f&&!i?_M(s,l):po(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+m.x,y:n.y*u.y-l.scrollTop*u.y+d.y+m.y}}function y8(e){return Array.from(e.getClientRects())}function x8(e){const t=Oo(e),n=dm(e),r=e.ownerDocument.body,o=sr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=sr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+vm(e);const a=-n.scrollTop;return xr(r).direction==="rtl"&&(s+=sr(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Bk=25;function w8(e,t){const n=Dn(e),r=Oo(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const d=um();(!d||d&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const u=vm(r);if(u<=0){const d=r.ownerDocument,f=d.body,m=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,v=Math.abs(r.clientWidth-f.clientWidth-p);v<=Bk&&(i-=v)}else u<=Bk&&(i+=u);return{width:i,height:s,x:a,y:l}}function E8(e,t){const n=$s(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=cn(e)?Fa(e):po(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function Hk(e,t,n){let r;if(t==="viewport")r=w8(e,n);else if(t==="document")r=x8(Oo(e));else if(zt(t))r=E8(t,n);else{const o=PM(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Nf(r)}function TM(e,t){const n=ti(e);return n===t||!zt(n)||ei(n)?!1:xr(n).position==="fixed"||TM(n,t)}function C8(e,t){const n=t.get(e);if(n)return n;let r=_i(e,[],!1).filter(a=>zt(a)&&ns(a)!=="body"),o=null;const i=xr(e).position==="fixed";let s=i?ti(e):e;for(;zt(s)&&!ei(s);){const a=xr(s),l=Fx(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||rs(s)&&!l&&TM(e,s))?r=r.filter(d=>d!==s):o=a,s=ti(s)}return t.set(e,r),r}function k8(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?cm(t)?[]:C8(t,this._c):[].concat(n),r],a=Hk(t,s[0],o);let l=a.top,u=a.right,d=a.bottom,f=a.left;for(let m=1;m<s.length;m++){const p=Hk(t,s[m],o);l=sr(p.top,l),u=zi(p.right,u),d=zi(p.bottom,d),f=sr(p.left,f)}return{width:u-f,height:d-l,x:f,y:l}}function R8(e){const{width:t,height:n}=MM(e);return{width:t,height:n}}function S8(e,t,n){const r=cn(t),o=Oo(t),i=n==="fixed",s=$s(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=po(0);function u(){l.x=vm(o)}if(r||!r&&!i)if((ns(t)!=="body"||rs(o))&&(a=dm(t)),r){const p=$s(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&u();i&&!r&&o&&u();const d=o&&!r&&!i?_M(o,a):po(0),f=s.left+a.scrollLeft-l.x-d.x,m=s.top+a.scrollTop-l.y-d.y;return{x:f,y:m,width:s.width,height:s.height}}function Cg(e){return xr(e).position==="static"}function Gk(e,t){if(!cn(e)||xr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Oo(e)===n&&(n=n.ownerDocument.body),n}function DM(e,t){const n=Dn(e);if(cm(e))return n;if(!cn(e)){let o=ti(e);for(;o&&!ei(o);){if(zt(o)&&!Cg(o))return o;o=ti(o)}return n}let r=Gk(e,t);for(;r&&YU(r)&&Cg(r);)r=Gk(r,t);return r&&ei(r)&&Cg(r)&&!Fx(r)?n:r||JU(e)||n}const N8=async function(e){const t=this.getOffsetParent||DM,n=this.getDimensions,r=await n(e.floating);return{reference:S8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function O8(e){return xr(e).direction==="rtl"}const I8={convertOffsetParentRelativeRectToViewportRelativeRect:b8,getDocumentElement:Oo,getClippingRect:k8,getOffsetParent:DM,getElementRects:N8,getClientRects:y8,getDimensions:R8,getScale:Fa,isElement:zt,isRTL:O8};function LM(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function A8(e,t){let n=null,r;const o=Oo(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:d,top:f,width:m,height:p}=u;if(a||t(),!m||!p)return;const v=Da(f),g=Da(o.clientWidth-(d+m)),h=Da(o.clientHeight-(f+p)),b=Da(d),x={rootMargin:-v+"px "+-g+"px "+-h+"px "+-b+"px",threshold:sr(0,zi(1,l))||1};let w=!0;function C(R){const k=R[0].intersectionRatio;if(k!==l){if(!w)return s();k?s(!1,k):r=setTimeout(()=>{s(!1,1e-7)},1e3)}k===1&&!LM(u,e.getBoundingClientRect())&&s(),w=!1}try{n=new IntersectionObserver(C,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,x)}n.observe(e)}return s(!0),i}function Lb(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Yx(e),d=o||i?[...u?_i(u):[],...t?_i(t):[]]:[];d.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const f=u&&a?A8(u,n):null;let m=-1,p=null;s&&(p=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),u&&!l&&p.observe(u),t&&p.observe(t));let v,g=l?$s(e):null;l&&h();function h(){const b=$s(e);g&&!LM(g,b)&&n(),g=b,v=requestAnimationFrame(h)}return n(),()=>{var b;d.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f?.(),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(v)}}const M8=f8,P8=p8,_8=c8,T8=h8,D8=u8,Wk=l8,L8=m8,j8=(e,t,n)=>{const r=new Map,o={platform:I8,...n},i={...o.platform,_c:r};return a8(e,t,{...o,platform:i})};var V8=typeof document<"u",F8=function(){},Yd=V8?ae.useLayoutEffect:F8;function _f(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(!_f(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 i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!_f(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function jM(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Uk(e,t){const n=jM(e);return Math.round(t*n)/n}function kg(e){const t=c.useRef(e);return Yd(()=>{t.current=e}),t}function VM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,f]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=c.useState(r);_f(m,r)||p(r);const[v,g]=c.useState(null),[h,b]=c.useState(null),y=c.useCallback(T=>{T!==R.current&&(R.current=T,g(T))},[]),x=c.useCallback(T=>{T!==k.current&&(k.current=T,b(T))},[]),w=i||v,C=s||h,R=c.useRef(null),k=c.useRef(null),S=c.useRef(d),P=l!=null,L=kg(l),_=kg(o),O=kg(u),B=c.useCallback(()=>{if(!R.current||!k.current)return;const T={placement:t,strategy:n,middleware:m};_.current&&(T.platform=_.current),j8(R.current,k.current,T).then(q=>{const A={...q,isPositioned:O.current!==!1};I.current&&!_f(S.current,A)&&(S.current=A,dt.flushSync(()=>{f(A)}))})},[m,t,n,_,O]);Yd(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,f(T=>({...T,isPositioned:!1})))},[u]);const I=c.useRef(!1);Yd(()=>(I.current=!0,()=>{I.current=!1}),[]),Yd(()=>{if(w&&(R.current=w),C&&(k.current=C),w&&C){if(L.current)return L.current(w,C,B);B()}},[w,C,B,L,P]);const V=c.useMemo(()=>({reference:R,floating:k,setReference:y,setFloating:x}),[y,x]),F=c.useMemo(()=>({reference:w,floating:C}),[w,C]),D=c.useMemo(()=>{const T={position:n,left:0,top:0};if(!F.floating)return T;const q=Uk(F.floating,d.x),A=Uk(F.floating,d.y);return a?{...T,transform:"translate("+q+"px, "+A+"px)",...jM(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:A}},[n,a,F.floating,d.x,d.y]);return c.useMemo(()=>({...d,update:B,refs:V,elements:F,floatingStyles:D}),[d,B,V,F,D])}const $8=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?Wk({element:r.current,padding:o}).fn(n):{}:r?Wk({element:r,padding:o}).fn(n):{}}}},FM=(e,t)=>{const n=M8(e);return{name:n.name,fn:n.fn,options:[e,t]}},$M=(e,t)=>{const n=P8(e);return{name:n.name,fn:n.fn,options:[e,t]}},zM=(e,t)=>({fn:L8(e).fn,options:[e,t]}),BM=(e,t)=>{const n=_8(e);return{name:n.name,fn:n.fn,options:[e,t]}},HM=(e,t)=>{const n=T8(e);return{name:n.name,fn:n.fn,options:[e,t]}},GM=(e,t)=>{const n=D8(e);return{name:n.name,fn:n.fn,options:[e,t]}},z8=(e,t)=>{const n=$8(e);return{name:n.name,fn:n.fn,options:[e,t]}},B8={intentional:"onClick",sloppy:"onPointerDown"};function H8(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function G8(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("referenceElement"),s=n.useState("domReferenceElement"),{onOpenChange:a,dataRef:l}=n.context,{enabled:u=!0,escapeKey:d=!0,outsidePress:f=!0,outsidePressEvent:m="sloppy",referencePress:p=!1,referencePressEvent:v="sloppy",ancestorScroll:g=!1,bubbles:h,externalTree:b}=t,y=gm(b),x=Ge(typeof f=="function"?f:()=>!1),w=typeof f=="function"?x:f,C=c.useRef(!1),{escapeKey:R,outsidePress:k}=H8(h),S=c.useRef(null),P=Fs(),L=Fs(),_=Ge(()=>{L.clear(),l.current.insideReactTree=!1}),O=c.useRef(!1),B=c.useRef(""),I=Ge(M=>{B.current=M.pointerType}),V=Ge(()=>{const M=B.current,N=M==="pen"||!M?"mouse":M,j=typeof m=="function"?m():m;return typeof j=="string"?j:j[N]}),F=Ge(M=>{if(!r||!u||!d||M.key!=="Escape"||O.current)return;const N=l.current.floatingContext?.nodeId,j=y?ja(y.nodesRef.current,N):[];if(!R&&j.length>0){let U=!0;if(j.forEach($=>{$.context?.open&&!$.context.dataRef.current.__escapeKeyBubbles&&(U=!1)}),!U)return}const K=cq(M)?M.nativeEvent:M,H=Je(XA,K);n.setOpen(!1,H),!R&&!H.isPropagationAllowed&&M.stopPropagation()}),D=Ge(M=>{const N=V();return N==="intentional"&&M.type!=="click"||N==="sloppy"&&M.type==="click"}),T=Ge(()=>{l.current.insideReactTree=!0,L.start(0,_)}),q=Ge((M,N=!1)=>{if(D(M)){_();return}if(l.current.insideReactTree){_();return}if(V()==="intentional"&&N||typeof w=="function"&&!w(M))return;const j=Jn(M),K=`[${Pf("inert")}]`,H=nn(n.select("floatingElement")).querySelectorAll(K),U=n.context.triggerElements;if(j&&(U.hasElement(j)||U.hasMatchingElement(ne=>ht(ne,j))))return;let $=zt(j)?j:null;for(;$&&!ei($);){const ne=ti($);if(ei(ne)||!zt(ne))break;$=ne}if(H.length&&zt(j)&&!lq(j)&&!ht(j,n.select("floatingElement"))&&Array.from(H).every(ne=>!ht($,ne)))return;if(cn(j)&&!("touches"in M)){const ne=ei(j),we=xr(j),Ve=/auto|scroll/,Ye=ne||Ve.test(we.overflowX),ft=ne||Ve.test(we.overflowY),qe=Ye&&j.clientWidth>0&&j.scrollWidth>j.clientWidth,ce=ft&&j.clientHeight>0&&j.scrollHeight>j.clientHeight,Ke=we.direction==="rtl",ot=ce&&(Ke?M.offsetX<=j.offsetWidth-j.clientWidth:M.offsetX>j.clientWidth),Lt=qe&&M.offsetY>j.clientHeight;if(ot||Lt)return}const W=l.current.floatingContext?.nodeId,Z=y&&ja(y.nodesRef.current,W).some(ne=>qr(M,ne.context?.elements.floating));if(qr(M,n.select("floatingElement"))||qr(M,n.select("domReferenceElement"))||Z)return;const G=y?ja(y.nodesRef.current,W):[];if(G.length>0){let ne=!0;if(G.forEach(we=>{we.context?.open&&!we.context.dataRef.current.__outsidePressBubbles&&(ne=!1)}),!ne)return}n.setOpen(!1,Je(Tx,M)),_()}),A=Ge(M=>{V()!=="sloppy"||M.pointerType==="touch"||!n.select("open")||!u||qr(M,n.select("floatingElement"))||qr(M,n.select("domReferenceElement"))||q(M)}),ee=Ge(M=>{if(V()!=="sloppy"||!n.select("open")||!u||qr(M,n.select("floatingElement"))||qr(M,n.select("domReferenceElement")))return;const N=M.touches[0];N&&(S.current={startTime:Date.now(),startX:N.clientX,startY:N.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},P.start(1e3,()=>{S.current&&(S.current.dismissOnTouchEnd=!1,S.current.dismissOnMouseDown=!1)}))}),ie=Ge(M=>{const N=Jn(M);function j(){ee(M),N?.removeEventListener(M.type,j)}N?.addEventListener(M.type,j)}),Y=Ge(M=>{const N=C.current;if(C.current=!1,P.clear(),M.type==="mousedown"&&S.current&&!S.current.dismissOnMouseDown)return;const j=Jn(M);function K(){M.type==="pointerdown"?A(M):q(M,N),j?.removeEventListener(M.type,K)}j?.addEventListener(M.type,K)}),Q=Ge(M=>{if(V()!=="sloppy"||!S.current||qr(M,n.select("floatingElement"))||qr(M,n.select("domReferenceElement")))return;const N=M.touches[0];if(!N)return;const j=Math.abs(N.clientX-S.current.startX),K=Math.abs(N.clientY-S.current.startY),H=Math.sqrt(j*j+K*K);H>5&&(S.current.dismissOnTouchEnd=!0),H>10&&(q(M),P.clear(),S.current=null)}),X=Ge(M=>{const N=Jn(M);function j(){Q(M),N?.removeEventListener(M.type,j)}N?.addEventListener(M.type,j)}),J=Ge(M=>{V()!=="sloppy"||!S.current||qr(M,n.select("floatingElement"))||qr(M,n.select("domReferenceElement"))||(S.current.dismissOnTouchEnd&&q(M),P.clear(),S.current=null)}),te=Ge(M=>{const N=Jn(M);function j(){J(M),N?.removeEventListener(M.type,j)}N?.addEventListener(M.type,j)});c.useEffect(()=>{if(!r||!u)return;l.current.__escapeKeyBubbles=R,l.current.__outsidePressBubbles=k;const M=new sl;function N($){n.setOpen(!1,Je(kr,$))}function j(){M.clear(),O.current=!0}function K(){M.start(um()?5:0,()=>{O.current=!1})}const H=nn(o);H.addEventListener("pointerdown",I,!0),d&&(H.addEventListener("keydown",F),H.addEventListener("compositionstart",j),H.addEventListener("compositionend",K)),w&&(H.addEventListener("click",Y,!0),H.addEventListener("pointerdown",Y,!0),H.addEventListener("touchstart",ie,!0),H.addEventListener("touchmove",X,!0),H.addEventListener("touchend",te,!0),H.addEventListener("mousedown",Y,!0));let U=[];return g&&(zt(s)&&(U=_i(s)),zt(o)&&(U=U.concat(_i(o))),!zt(i)&&i&&i.contextElement&&(U=U.concat(_i(i.contextElement)))),U=U.filter($=>$!==H.defaultView?.visualViewport),U.forEach($=>{$.addEventListener("scroll",N,{passive:!0})}),()=>{H.removeEventListener("pointerdown",I,!0),d&&(H.removeEventListener("keydown",F),H.removeEventListener("compositionstart",j),H.removeEventListener("compositionend",K)),w&&(H.removeEventListener("click",Y,!0),H.removeEventListener("pointerdown",Y,!0),H.removeEventListener("touchstart",ie,!0),H.removeEventListener("touchmove",X,!0),H.removeEventListener("touchend",te,!0),H.removeEventListener("mousedown",Y,!0)),U.forEach($=>{$.removeEventListener("scroll",N)}),M.clear(),C.current=!1}},[l,o,i,s,d,w,r,a,g,u,R,k,F,q,Y,A,ie,X,te,I,n]),c.useEffect(_,[w,_]);const le=c.useMemo(()=>({onKeyDown:F,...p&&{[B8[v]]:M=>{n.setOpen(!1,Je(Rb,M.nativeEvent))},...v!=="intentional"&&{onClick(M){n.setOpen(!1,Je(Rb,M.nativeEvent))}}}}),[F,n,p,v]),z=Ge(M=>{const N=Jn(M.nativeEvent);!ht(n.select("floatingElement"),N)||M.button!==0||(C.current=!0)}),re=Ge(M=>{!r||!u||M.button!==0||(C.current=!0)}),oe=c.useMemo(()=>({onKeyDown:F,onPointerDown:z,onMouseDown:z,onMouseUp:z,onClickCapture:T,onMouseDownCapture(M){T(),re(M)},onPointerDownCapture(M){T(),re(M)},onMouseUpCapture:T,onTouchEndCapture:T,onTouchMoveCapture:T}),[F,z,T,re]);return c.useMemo(()=>u?{reference:le,floating:oe,trigger:le}:{},[u,le,oe])}var W8=(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(i){({stack:o}=i)}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})}}},U8=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:i,inputSelectorResultsCopy:s}=e,a=r(()=>({}),...o);if(!(a.apply(null,i)===a.apply(null,s))){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})}},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=_e;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=_e,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=_e,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=_e,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),De=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(De!=null&&(B.current=De,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 De=Or(D.key,A());j.current=b&&De?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(
|
|
24
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:i,secondInputs:s,stack:u})}},q8={inputStabilityCheck:"once",identityFunctionCheck:"once"},Tf=Symbol("NOT_FOUND");function K8(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Y8(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function X8(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 qk=e=>Array.isArray(e)?e:[e];function Z8(e){const t=Array.isArray(e[0])?e[0]:e;return X8(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Kk(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var J8=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...q8,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:W8},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:U8}}};function Q8(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Tf},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function e9(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 Tf}function o(a,l){r(a)===Tf&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var t9=(e,t)=>e===t;function n9(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;i<o;i++)if(!e(n[i],r[i]))return!1;return!0}}function r9(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=t9,maxSize:o=1,resultEqualityCheck:i}=n,s=n9(r);let a=0;const l=o<=1?Q8(s):e9(o,s);function u(){let d=l.get(arguments);if(d===Tf){if(d=e.apply(null,arguments),a++,i){const m=l.getEntries().find(p=>i(p.value,d));m&&(d=m.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 o9=class{constructor(e){this.value=e}deref(){return this.value}},i9=typeof WeakRef<"u"?WeakRef:o9,s9=0,Yk=1;function yu(){return{s:s9,v:void 0,o:null,p:null}}function WM(e,t={}){let n=yu();const{resultEqualityCheck:r}=t;let o,i=0;function s(){let a=n;const{length:l}=arguments;for(let f=0,m=l;f<m;f++){const p=arguments[f];if(typeof p=="function"||typeof p=="object"&&p!==null){let v=a.o;v===null&&(a.o=v=new WeakMap);const g=v.get(p);g===void 0?(a=yu(),v.set(p,a)):a=g}else{let v=a.p;v===null&&(a.p=v=new Map);const g=v.get(p);g===void 0?(a=yu(),v.set(p,a)):a=g}}const u=a;let d;if(a.s===Yk)d=a.v;else if(d=e.apply(null,arguments),i++,r){const f=o?.deref?.()??o;f!=null&&r(f,d)&&(d=f,i!==0&&i--),o=typeof d=="object"&&d!==null||typeof d=="function"?new i9(d):d}return u.s=Yk,u.v=d,d}return s.clearCache=()=>{n=yu(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function UM(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,s=0,a,l={},u=o.pop();typeof u=="object"&&(l=u,u=o.pop()),K8(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const d={...n,...l},{memoize:f,memoizeOptions:m=[],argsMemoize:p=WM,argsMemoizeOptions:v=[],devModeChecks:g={}}=d,h=qk(m),b=qk(v),y=Z8(o),x=f(function(){return i++,u.apply(null,arguments)},...h);let w=!0;const C=p(function(){s++;const k=Kk(y,arguments);if(a=x.apply(null,k),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:S,inputStabilityCheck:P}=J8(w,g);if(S.shouldRun&&S.run(u,k,a),P.shouldRun){const L=Kk(y,arguments);P.run({inputSelectorResults:k,inputSelectorResultsCopy:L},{memoize:f,memoizeOptions:h},arguments)}w&&(w=!1)}return a},...b);return Object.assign(C,{resultFunc:u,memoizedResultFunc:x,dependencies:y,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:f,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var a9=UM(WM),l9=Object.assign((e,t=a9)=>{Y8(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(i=>e[i]);return t(r,(...i)=>i.reduce((s,a,l)=>(s[n[l]]=a,s),{}))},{withTypes:()=>l9});UM({memoize:r9,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const Fe=(e,t,n,r,o,i,...s)=>{if(s.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":Yr(1));let a;if(e)a=e;else throw new Error("Missing arguments");return a};var xu={exports:{}},Rg={};var Xk;function c9(){if(Xk)return Rg;Xk=1;var e=ae;function t(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(f,m){var p=m(),v=r({inst:{value:p,getSnapshot:m}}),g=v[0].inst,h=v[1];return i(function(){g.value=p,g.getSnapshot=m,l(g)&&h({inst:g})},[f,p,m]),o(function(){return l(g)&&h({inst:g}),f(function(){l(g)&&h({inst:g})})},[f]),s(p),p}function l(f){var m=f.getSnapshot;f=f.value;try{var p=m();return!n(f,p)}catch{return!0}}function u(f,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return Rg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Rg}var Sg={};var Zk;function u9(){return Zk||(Zk=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}function t(p,v){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=v();if(!f){var h=v();i(g,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}h=s({inst:{value:g,getSnapshot:v}});var b=h[0].inst,y=h[1];return l(function(){b.value=g,b.getSnapshot=v,n(b)&&y({inst:b})},[p,g,v]),a(function(){return n(b)&&y({inst:b}),p(function(){n(b)&&y({inst:b})})},[p]),u(g),g}function n(p){var v=p.getSnapshot;p=p.value;try{var g=v();return!i(p,g)}catch{return!0}}function r(p,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=ae,i=typeof Object.is=="function"?Object.is:e,s=o.useState,a=o.useEffect,l=o.useLayoutEffect,u=o.useDebugValue,d=!1,f=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Sg.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Sg}var Jk;function Xx(){return Jk||(Jk=1,process.env.NODE_ENV==="production"?xu.exports=c9():xu.exports=u9()),xu.exports}var d9=Xx(),wu={exports:{}},Ng={};var Qk;function f9(){if(Qk)return Ng;Qk=1;var e=ae,t=Xx();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,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return Ng.useSyncExternalStoreWithSelector=function(u,d,f,m,p){var v=i(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=a(function(){function b(R){if(!y){if(y=!0,x=R,R=m(R),p!==void 0&&g.hasValue){var k=g.value;if(p(k,R))return w=k}return w=R}if(k=w,r(x,R))return k;var S=m(R);return p!==void 0&&p(k,S)?(x=R,k):(x=R,w=S)}var y=!1,x,w,C=f===void 0?null:f;return[function(){return b(d())},C===null?void 0:function(){return b(C())}]},[d,f,m,p]);var h=o(u,v[0],v[1]);return s(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},Ng}var Og={};var eR;function p9(){return eR||(eR=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=ae,n=Xx(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;Og.useSyncExternalStoreWithSelector=function(u,d,f,m,p){var v=i(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=a(function(){function b(R){if(!y){if(y=!0,x=R,R=m(R),p!==void 0&&g.hasValue){var k=g.value;if(p(k,R))return w=k}return w=R}if(k=w,r(x,R))return k;var S=m(R);return p!==void 0&&p(k,S)?(x=R,k):(x=R,w=S)}var y=!1,x,w,C=f===void 0?null:f;return[function(){return b(d())},C===null?void 0:function(){return b(C())}]},[d,f,m,p]);var h=o(u,v[0],v[1]);return s(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Og}var tR;function m9(){return tR||(tR=1,process.env.NODE_ENV==="production"?wu.exports=f9():wu.exports=p9()),wu.exports}var h9=m9();const g9=_x(19),v9=g9?y9:x9;function ue(e,t,n,r,o){return v9(e,t,n,r,o)}function b9(e,t,n,r,o){const i=c.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return d9.useSyncExternalStore(e.subscribe,i,i)}function y9(e,t,n,r,o){return b9(e,t,n,r,o)}function x9(e,t,n,r,o){return h9.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,r,o))}class qM{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 ue(this,t,n,r,o)}}class w9 extends qM{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){c.useDebugValue(t),We(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;We(()=>(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,s=>Object.keys(s));const o=c.useRef(Object.keys(t)).current,i=Object.keys(t);(o.length!==i.length||o.some((s,a)=>s!==i[a]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);We(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){c.useDebugValue(t);const r=n!==void 0;if(We(()=>{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 i=o.get(t);i!==void 0&&i!==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 i=this.selectors[t];return i(this.state,n,r,o)}useState(t,n,r,o){return c.useDebugValue(t),ue(this,this.selectors[t],n,r,o)}useContextCallback(t,n){c.useDebugValue(t);const r=Ge(n??Xt);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(i=>{const s=r(i);if(!Object.is(o,s)){const a=o;o=s,n(s,a,this)}})}}const E9={open:Fe(e=>e.open),domReferenceElement:Fe(e=>e.domReferenceElement),referenceElement:Fe(e=>e.positionReference??e.referenceElement),floatingElement:Fe(e=>e.floatingElement),floatingId:Fe(e=>e.floatingId)};class C9 extends w9{constructor(t){const{nested:n,noEmit:r,onOpenChange:o,triggerElements:i,...s}=t;super({...s,positionReference:s.referenceElement,domReferenceElement:s.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:qq(),nested:n,noEmit:r,triggerElements:i},E9)}setOpen=(t,n)=>{if((!t||!this.state.open||dM(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 k9{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 KM(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=Dx(),i=kM()!=null;if(process.env.NODE_ENV!=="production"){const a=r.reference;a&&!zt(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 s=Dr(()=>new C9({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new k9,floatingId:o,nested:i,noEmit:!1})).current;return We(()=>{const a={open:t,floatingId:o};r.reference!==void 0&&(a.referenceElement=r.reference,a.domReferenceElement=zt(r.reference)?r.reference:null),r.floating!==void 0&&(a.floatingElement=r.floating),s.update(a)},[t,o,r.reference,r.floating,s]),s.context.onOpenChange=n,s.context.nested=i,s.context.noEmit=!1,s}function R9(e={}){const{nodeId:t,externalTree:n}=e,r=KM(e),o=e.rootContext||r,i={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[s,a]=c.useState(null),l=c.useRef(null),u=gm(n);We(()=>{i.domReference&&(l.current=i.domReference)},[i.domReference]);const d=VM({...e,elements:{...i,...s&&{reference:s}}}),f=c.useCallback(k=>{const S=zt(k)?{getBoundingClientRect:()=>k.getBoundingClientRect(),getClientRects:()=>k.getClientRects(),contextElement:k}:k;a(S),d.refs.setReference(S)},[d.refs]),[m,p]=c.useState(null),[v,g]=c.useState(null);o.useSyncedValue("referenceElement",m),o.useSyncedValue("domReferenceElement",zt(m)?m:null),o.useSyncedValue("floatingElement",v);const h=c.useCallback(k=>{(zt(k)||k===null)&&(l.current=k,p(k)),(zt(d.refs.reference.current)||d.refs.reference.current===null||k!==null&&!zt(k))&&d.refs.setReference(k)},[d.refs,p]),b=c.useCallback(k=>{g(k),d.refs.setFloating(k)},[d.refs]),y=c.useMemo(()=>({...d.refs,setReference:h,setFloating:b,setPositionReference:f,domReference:l}),[d.refs,h,b,f]),x=c.useMemo(()=>({...d.elements,domReference:i.domReference}),[d.elements,i.domReference]),w=o.useState("open"),C=o.useState("floatingId"),R=c.useMemo(()=>({...d,dataRef:o.context.dataRef,open:w,onOpenChange:o.setOpen,events:o.context.events,floatingId:C,refs:y,elements:x,nodeId:t,rootStore:o}),[d,y,x,t,o,w,C]);return We(()=>{o.context.dataRef.current.floatingContext=R;const k=u?.nodesRef.current.find(S=>S.id===t);k&&(k.context=R)}),c.useMemo(()=>({...d,context:R,refs:y,elements:x,rootStore:o}),[d,y,x,R,o])}function S9(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),i=c.useCallback(u=>Eu(u,e,"reference"),t),s=c.useCallback(u=>Eu(u,e,"floating"),n),a=c.useCallback(u=>Eu(u,e,"item"),r),l=c.useCallback(u=>Eu(u,e,"trigger"),o);return c.useMemo(()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:a,getTriggerProps:l}),[i,s,a,l])}function Eu(e,t,n){const r=new Map,o=n==="item",i={};n==="floating"&&(i.tabIndex=-1,i[Ab]="");for(const s in e)o&&e&&(s===aM||s===lM)||(i[s]=e[s]);for(let s=0;s<t.length;s+=1){let a;const l=t[s]?.[n];typeof l=="function"?a=e?l(e):null:a=l,a&&nR(i,a,o,r)}return nR(i,e,o,r),i}function nR(e,t,n,r){for(const o in t){const i=t[o];n&&(o===aM||o===lM)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof i=="function"&&(r.get(o)?.push(i),e[o]=(...s)=>r.get(o)?.map(a=>a(...s)).find(a=>a!==void 0))):e[o]=i)}}const N9="Escape";function bm(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Cu(e,t){return bm(t,e===zx||e===Dc,e===Ti||e===Di)}function Ig(e,t,n){return bm(t,e===Dc,n?e===Ti:e===Di)||e==="Enter"||e===" "||e===""}function O9(e,t,n){return bm(t,n?e===Ti:e===Di,e===Dc)}function I9(e,t,n,r){const o=n?e===Di:e===Ti,i=e===zx;return t==="both"||t==="horizontal"&&r&&r>1?e===N9:bm(t,o,i)}function A9(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("domReferenceElement"),s=n.context.dataRef,{listRef:a,activeIndex:l,onNavigate:u=()=>{},enabled:d=!0,selectedIndex:f=null,allowEscape:m=!1,loopFocus:p=!1,nested:v=!1,rtl:g=!1,virtual:h=!1,focusItemOnOpen:b="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:x=!0,disabledIndices:w=void 0,orientation:C="vertical",parentOrientation:R,cols:k=1,id:S,resetOnPointerLeave:P=!0,externalTree:L}=t;process.env.NODE_ENV!=="production"&&(m&&(p||console.warn("`useListNavigation` looping must be enabled to allow escaping."),h||console.warn("`useListNavigation` must be virtual to allow escaping.")),C==="vertical"&&k>1&&console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const _=Pb(o),O=Rr(_),B=kM(),I=gm(L);We(()=>{s.current.orientation=C},[s,C]);const V=Mb(i),F=c.useRef(b),D=c.useRef(f??-1),T=c.useRef(null),q=c.useRef(!0),A=Ge(W=>{u(D.current===-1?null:D.current,W)}),ee=c.useRef(A),ie=c.useRef(!!o),Y=c.useRef(r),Q=c.useRef(!1),X=c.useRef(!1),J=Rr(w),te=Rr(r),le=Rr(f),z=Rr(P),re=Ge(()=>{function W(we){h?I?.events.emit("virtualfocus",we):Kl(we,{sync:Q.current,preventScroll:!0})}const Z=a.current[D.current],G=X.current;Z&&W(Z),(Q.current?we=>we():requestAnimationFrame)(()=>{const we=a.current[D.current]||Z;if(!we)return;Z||W(we),M&&(G||!q.current)&&we.scrollIntoView?.({block:"nearest",inline:"nearest"})})});We(()=>{d&&(r&&o?(D.current=f??-1,F.current&&f!=null&&(X.current=!0,A())):ie.current&&(D.current=-1,ee.current()))},[d,r,o,f,A]),We(()=>{if(d){if(!r){Q.current=!1;return}if(o)if(l==null){if(Q.current=!1,le.current!=null)return;if(ie.current&&(D.current=-1,re()),(!Y.current||!ie.current)&&F.current&&(T.current!=null||F.current===!0&&T.current==null)){let W=0;const Z=()=>{a.current[0]==null?(W<2&&(W?requestAnimationFrame:queueMicrotask)(Z),W+=1):(D.current=T.current==null||Ig(T.current,C,g)||v?xg(a):Ik(a),T.current=null,A())};Z()}}else Wl(a,l)||(D.current=l,re(),X.current=!1)}},[d,r,o,l,le,v,a,C,g,A,re,J]),We(()=>{if(!d||o||!I||h||!ie.current)return;const W=I.nodesRef.current,Z=W.find(we=>we.id===B)?.context?.elements.floating,G=Jo(nn(o)),ne=W.some(we=>we.context&&ht(we.context.elements.floating,G));Z&&!ne&&q.current&&Z.focus({preventScroll:!0})},[d,o,I,B,h]),We(()=>{ee.current=A,Y.current=r,ie.current=!!o}),We(()=>{r||(T.current=null,F.current=b)},[r,b]);const oe=l!=null,M=c.useMemo(()=>{function W(G){if(!te.current)return;const ne=a.current.indexOf(G.currentTarget);ne!==-1&&D.current!==ne&&(D.current=ne,A(G))}return{onFocus(G){Q.current=!0,W(G)},onClick:({currentTarget:G})=>G.focus({preventScroll:!0}),onMouseMove(G){Q.current=!0,X.current=!1,y&&W(G)},onPointerLeave(G){if(!te.current||!q.current||G.pointerType==="touch")return;Q.current=!0;const ne=G.relatedTarget;!y||a.current.includes(ne)||z.current&&(Kl(null,{sync:!0}),D.current=-1,A(G),h||O.current?.focus({preventScroll:!0}))}}},[te,O,y,a,A,z,h]),N=c.useCallback(()=>R??I?.nodesRef.current.find(W=>W.id===B)?.context?.dataRef?.current.orientation,[B,I,R]),j=Ge(W=>{if(q.current=!1,Q.current=!0,W.which===229||!te.current&&W.currentTarget===O.current)return;if(v&&I9(W.key,C,g,k)){Cu(W.key,N())||$t(W),n.setOpen(!1,Je(Gl,W.nativeEvent)),cn(i)&&(h?I?.events.emit("virtualfocus",i):i.focus());return}const Z=D.current,G=xg(a,w),ne=Ik(a,w);if(V||(W.key==="Home"&&($t(W),D.current=G,A(W)),W.key==="End"&&($t(W),D.current=ne,A(W))),k>1){const we=Array.from({length:a.current.length},()=>({width:1,height:1})),Ve=xq(we,k),Ye=Ve.findIndex(ce=>ce!=null&&!Ul(a,ce,w)),ft=Ve.reduce((ce,Ke,ot)=>Ke!=null&&!Ul(a,Ke,w)?ot:ce,-1),qe=Ve[yq({current:Ve.map(ce=>ce!=null?a.current[ce]:null)},{event:W,orientation:C,loopFocus:p,rtl:g,cols:k,disabledIndices:Eq([...(typeof w!="function"?w:null)||a.current.map((ce,Ke)=>Ul(a,Ke,w)?Ke:void 0),void 0],Ve),minIndex:Ye,maxIndex:ft,prevIndex:wq(D.current>ne?G:D.current,we,Ve,k,W.key===Dc?"bl":W.key===(g?Ti:Di)?"tr":"tl"),stopEvent:!0})];if(qe!=null&&(D.current=qe,A(W)),C==="both")return}if(Cu(W.key,C)){if($t(W),r&&!h&&Jo(W.currentTarget.ownerDocument)===W.currentTarget){D.current=Ig(W.key,C,g)?G:ne,A(W);return}Ig(W.key,C,g)?p?Z>=ne?m&&Z!==a.current.length?D.current=-1:(Q.current=!1,D.current=G):D.current=Bn(a,{startingIndex:Z,disabledIndices:w}):D.current=Math.min(ne,Bn(a,{startingIndex:Z,disabledIndices:w})):p?Z<=G?m&&Z!==-1?D.current=a.current.length:(Q.current=!1,D.current=ne):D.current=Bn(a,{startingIndex:Z,decrement:!0,disabledIndices:w}):D.current=Math.max(G,Bn(a,{startingIndex:Z,decrement:!0,disabledIndices:w})),Wl(a,D.current)&&(D.current=-1),A(W)}}),K=c.useMemo(()=>h&&r&&oe&&{"aria-activedescendant":`${S}-${l}`},[h,r,oe,S,l]),H=c.useMemo(()=>({"aria-orientation":C==="both"?void 0:C,...V?{}:K,onKeyDown(W){if(W.key==="Tab"&&W.shiftKey&&r&&!h){const Z=Jn(W.nativeEvent);if(Z&&!ht(O.current,Z))return;$t(W),n.setOpen(!1,Je(am,W.nativeEvent)),cn(i)&&i.focus();return}j(W)},onPointerMove(){q.current=!0}}),[K,j,O,C,V,n,r,h,i]),U=c.useMemo(()=>{function W(G){b==="auto"&&cM(G.nativeEvent)&&(F.current=!h)}function Z(G){F.current=b,b==="auto"&&uM(G.nativeEvent)&&(F.current=!0)}return{onKeyDown(G){const ne=n.select("open");q.current=!1;const we=G.key.startsWith("Arrow"),Ve=O9(G.key,N(),g),Ye=Cu(G.key,C),ft=(v?Ve:Ye)||G.key==="Enter"||G.key.trim()==="";if(h&&ne)return j(G);if(!(!ne&&!x&&we)){if(ft){const qe=Cu(G.key,N());T.current=v&&qe?null:G.key}if(v){Ve&&($t(G),ne?(D.current=xg(a,J.current),A(G)):n.setOpen(!0,Je(Gl,G.nativeEvent,G.currentTarget)));return}Ye&&(le.current!=null&&(D.current=le.current),$t(G),!ne&&x?n.setOpen(!0,Je(Gl,G.nativeEvent,G.currentTarget)):j(G),ne&&A(G))}},onFocus(G){n.select("open")&&!h&&(D.current=-1,A(G))},onPointerDown:Z,onPointerEnter:Z,onMouseDown:W,onClick:W}},[j,J,b,a,v,A,n,x,C,N,g,le,h]),$=c.useMemo(()=>({...K,...U}),[K,U]);return c.useMemo(()=>d?{reference:$,floating:H,item:M,trigger:U}:{},[d,$,H,U,M])}function M9(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,o=n.useState("open"),{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:u=!0,resetMs:d=750,selectedIndex:f=null}=t,m=Fs(),p=c.useRef(""),v=c.useRef(f??s??-1),g=c.useRef(null);We(()=>{!o&&f!==null||(m.clear(),g.current=null,p.current!==""&&(p.current=""))},[o,f,m]),We(()=>{o&&p.current===""&&(v.current=f??s??-1)},[o,f,s]);const h=Ge(C=>{C?r.current.typing||(r.current.typing=C,l?.(C)):r.current.typing&&(r.current.typing=C,l?.(C))}),b=Ge(C=>{function R(O,B,I){const V=B.find(F=>F?.toLocaleLowerCase().indexOf(I.toLocaleLowerCase())===0);return V?O.indexOf(V):-1}const k=i.current;if(p.current.length>0&&p.current[0]!==" "&&(R(k,k,p.current)===-1?h(!1):C.key===" "&&$t(C)),k==null||C.key.length!==1||C.ctrlKey||C.metaKey||C.altKey)return;o&&C.key!==" "&&($t(C),h(!0));const S=p.current==="";S&&(v.current=f??s??-1),k.every(O=>O?O[0]?.toLocaleLowerCase()!==O[1]?.toLocaleLowerCase():!0)&&p.current===C.key&&(p.current="",v.current=g.current),p.current+=C.key,m.start(d,()=>{p.current="",v.current=g.current,h(!1)});const L=S?f??s??-1:v.current,_=R(k,[...k.slice((L||0)+1),...k.slice(0,(L||0)+1)],p.current);_!==-1?(a?.(_),g.current=_):C.key!==" "&&(p.current="",h(!1))}),y=Ge(C=>{const R=C.relatedTarget,k=n.select("domReferenceElement"),S=n.select("floatingElement"),P=ht(k,R),L=ht(S,R);P||L||(m.clear(),p.current="",v.current=g.current,h(!1))}),x=c.useMemo(()=>({onKeyDown:b,onBlur:y}),[b,y]),w=c.useMemo(()=>({onKeyDown:b,onKeyUp(C){C.key===" "&&h(!1)},onBlur:y}),[b,y,h]);return c.useMemo(()=>u?{reference:x,floating:w}:{},[u,x,w])}function P9(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 _9(e){const[t,n]=c.useState(null),r=Ge((a,l)=>{e||n(l||(sM?"touch":""))}),o=c.useCallback(()=>{n(null)},[]),{onClick:i,onPointerDown:s}=P9(r);return c.useMemo(()=>({openMethod:t,reset:o,triggerProps:{onClick:i,onPointerDown:s}}),[t,o,i,s])}let Zx=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=uc.startingStyle]="startingStyle",e[e.endingStyle=uc.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),jb=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const T9={[jb.popupOpen]:""},D9={[jb.popupOpen]:"",[jb.pressed]:""},L9={[Zx.open]:""},j9={[Zx.closed]:""},V9={[Zx.anchorHidden]:""},F9={open(e){return e?T9:null}},$9={open(e){return e?D9:null}},YM={open(e){return e?L9:j9},anchorHidden(e){return e?V9:null}};function z9(e){return _x(19)?e:e?"true":void 0}const XM=c.forwardRef(function(t,n){const{cutout:r,...o}=t;let i;if(r){const s=r?.getBoundingClientRect();i=`polygon(
|
|
25
25
|
0% 0%,
|
|
26
26
|
100% 0%,
|
|
27
27
|
100% 100%,
|
|
28
28
|
0% 100%,
|
|
29
29
|
0% 0%,
|
|
30
|
-
${
|
|
31
|
-
${
|
|
32
|
-
${
|
|
33
|
-
${
|
|
34
|
-
${
|
|
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),De=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"}),[Le,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:Le,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(Le),{openMethod:Yi,triggerProps:Vo,reset:kp}=Yy(Le);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)De.current!==mn&&(De.current=mn,_o(void 0,Bn(se,void 0,{index:-1})));else{const he=Ve.current[Z.activeIndex];De.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(Le!==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:Le,ref:Op,onComplete(){Le||$o()}}),c.useImperativeHandle(e.actionsRef,()=>({unmount:$o}),[$o]),oe(function(){if(Le||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})}},[Le,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),!Le&&!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}De.current!==mn&&(De.current=mn,ve.state.onItemHighlighted(void 0,Bn(ht,void 0,{index:-1})));return}if(Fe>=he.length){De.current!==mn&&(De.current=mn,ve.state.onItemHighlighted(void 0,Bn(ht,void 0,{index:-1}))),ve.set("activeIndex",null);return}const Ue=he[Fe],Ke=De.current.value,un=Ke!==gu&&bn(Ue,Ke,ve.state.isItemEqualToValue);(De.current.index!==Fe||!un)&&(De.current={value:Ue,index:Fe},ve.state.onItemHighlighted(Ue,Bn(ht,void 0,{index:Fe})))},[cr,Ie,Pe,yt,ut,Ct,Le,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,()=>{!Le||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:Le,onOpenChange:$n,elements:{reference:Wt?Fn:Lo,floating:lr}});let zo,Bo;Ct||(zo=g?"grid":"listbox",Bo=Le?"true":"false");const Pp=c.useMemo(()=>{const Z=Lo?.tagName==="INPUT",se=Z||Le,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"]=Le?Ki?.id:void 0,he["aria-autocomplete"]=N),{reference:he,floating:{role:"presentation"}}},[Lo,Le,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&&!Le||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:Le,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,Le,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),Le=ce.current,Mo=le.arrow?.x||0,xt=le.arrow?.y||0,Ze=Le?.clientWidth||0,Vn=Le?.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:De}=K.adaptiveOrigin||Ix,ke=be?n:"fixed",Ve=c.useMemo(()=>{const Pe=v?{position:ke,[nt]:U,[De]:M}:{position:ke,...Ge};return be||(Pe.opacity=0),Pe},[v,ke,nt,U,De,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"}}),
|
|
30
|
+
${s.left}px ${s.top}px,
|
|
31
|
+
${s.left}px ${s.bottom}px,
|
|
32
|
+
${s.right}px ${s.bottom}px,
|
|
33
|
+
${s.right}px ${s.top}px,
|
|
34
|
+
${s.left}px ${s.top}px
|
|
35
|
+
)`}return E.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})});process.env.NODE_ENV!=="production"&&(XM.displayName="InternalBackdrop");function B9(e){const t=c.useRef(!0);t.current&&(t.current=!1,e())}const Jx=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(Jx.displayName="ComboboxRootContext");const Qx=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(Qx.displayName="ComboboxFloatingContext");const ew=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(ew.displayName="ComboboxDerivedItemsContext");const tw=c.createContext("");process.env.NODE_ENV!=="production"&&(tw.displayName="ComboboxInputValueContext");function Er(){const e=c.useContext(Jx);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.":Yr(22));return e}function ym(){const e=c.useContext(Qx);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.":Yr(23));return e}function os(){const e=c.useContext(ew);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.":Yr(24));return e}function nw(){return c.useContext(tw)}const H9=(e,t)=>Object.is(e,t);function zs(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function G9(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:zs(t,r,n))}function Df(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:zs(r,t,n))}function W9(e,t,n){return e.filter(r=>!zs(t,r,n))}function Vb(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function rw(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function U9(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(rw(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 Zn(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 Vb(e)}function Ol(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Vb(e.value):Vb(e)}function ZM(e,t,n){function r(){return Zn(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=rw(t)?t.flatMap(i=>i.items):t;if(e==null||typeof e!="object"){const i=o.find(s=>s.value===e);return i&&i.label!=null?i.label:r()}if("value"in e){const i=o.find(s=>s&&s.value===e.value);if(i&&i.label!=null)return i.label}}return r()}function q9(e,t,n){return e.reduce((r,o,i)=>(i>0&&r.push(", "),r.push(E.jsx(c.Fragment,{children:ZM(o,t,n)},i)),r),[])}const de={id:Fe(e=>e.id),query:Fe(e=>e.query),items:Fe(e=>e.items),selectedValue:Fe(e=>e.selectedValue),hasSelectionChips:Fe(e=>{const t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:Fe(e=>{const{selectedValue:t,selectionMode:n}=e;return t==null?!1:n==="multiple"&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:Fe((e,t)=>t?U9(e.items):!1),open:Fe(e=>e.open),mounted:Fe(e=>e.mounted),forceMounted:Fe(e=>e.forceMounted),inline:Fe(e=>e.inline),activeIndex:Fe(e=>e.activeIndex),selectedIndex:Fe(e=>e.selectedIndex),isActive:Fe((e,t)=>e.activeIndex===t),isSelected:Fe((e,t)=>{const n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(o=>zs(t,o,n)):zs(t,r,n)}),transitionStatus:Fe(e=>e.transitionStatus),popupProps:Fe(e=>e.popupProps),inputProps:Fe(e=>e.inputProps),triggerProps:Fe(e=>e.triggerProps),getItemProps:Fe(e=>e.getItemProps),positionerElement:Fe(e=>e.positionerElement),listElement:Fe(e=>e.listElement),triggerElement:Fe(e=>e.triggerElement),inputElement:Fe(e=>e.inputElement),popupSide:Fe(e=>e.popupSide),openMethod:Fe(e=>e.openMethod),inputInsidePopup:Fe(e=>e.inputInsidePopup),selectionMode:Fe(e=>e.selectionMode),listRef:Fe(e=>e.listRef),labelsRef:Fe(e=>e.labelsRef),popupRef:Fe(e=>e.popupRef),emptyRef:Fe(e=>e.emptyRef),inputRef:Fe(e=>e.inputRef),keyboardActiveRef:Fe(e=>e.keyboardActiveRef),chipsContainerRef:Fe(e=>e.chipsContainerRef),clearRef:Fe(e=>e.clearRef),valuesRef:Fe(e=>e.valuesRef),allValuesRef:Fe(e=>e.allValuesRef),name:Fe(e=>e.name),disabled:Fe(e=>e.disabled),readOnly:Fe(e=>e.readOnly),required:Fe(e=>e.required),grid:Fe(e=>e.grid),isGrouped:Fe(e=>e.isGrouped),virtualized:Fe(e=>e.virtualized),onOpenChangeComplete:Fe(e=>e.onOpenChangeComplete),openOnInputClick:Fe(e=>e.openOnInputClick),itemToStringLabel:Fe(e=>e.itemToStringLabel),isItemEqualToValue:Fe(e=>e.isItemEqualToValue),modal:Fe(e=>e.modal),autoHighlight:Fe(e=>e.autoHighlight),submitOnItemClick:Fe(e=>e.submitOnItemClick)};let rR=(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 K9={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Y9={valid(e){return e===null?null:e?{[rR.valid]:""}:{[rR.invalid]:""}}},JM=c.createContext({invalid:void 0,name:void 0,validityData:{state:K9,errors:[],error:"",value:"",initialValue:null},setValidityData:Xt,disabled:void 0,touched:!1,setTouched:Xt,dirty:!1,setDirty:Xt,filled:!1,setFilled:Xt,focused:!1,setFocused:Xt,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=Hn)=>e,getInputValidationProps:(e=Hn)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(JM.displayName="FieldRootContext");function jc(e=!0){const t=c.useContext(JM);if(t.setValidityData===Xt&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Yr(28));return t}function X9(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const QM=c.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Xt,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(QM.displayName="FormContext");function eP(){return c.useContext(QM)}function Z9(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:s}=e,{formRef:a}=eP(),{invalid:l,markedDirtyRef:u,validityData:d,setValidityData:f}=jc(),m=Ge(e.getValue);We(()=>{if(!t)return;let p=n;p===void 0&&(p=m()),d.initialValue===null&&p!==null&&f(v=>({...v,initialValue:p}))},[t,f,n,d.initialValue,m]),We(()=>{!t||!r||a.current.fields.set(r,{getValue:m,name:o,controlRef:i,validityData:X9(d,l),validate(p=!0){let v=n;v===void 0&&(v=m()),u.current=!0,p?dt.flushSync(()=>s(v)):s(v)}})},[s,i,t,a,m,r,l,u,o,d,n]),We(()=>{const p=a.current.fields;return()=>{r&&p.delete(r)}},[a,r])}const tP=c.createContext({controlId:void 0,registerControlId:Xt,labelId:void 0,setLabelId:Xt,messageIds:[],setMessageIds:Xt,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(tP.displayName="LabelableContext");function ow(){return c.useContext(tP)}function nP(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:i}=ow(),s=Lx(t),a=n?o:void 0,l=Dr(()=>Symbol("labelable-control")),u=c.useRef(!1),d=c.useRef(t!=null),f=Ge(()=>{!u.current||i===Xt||(u.current=!1,i(l.current,void 0))});return We(()=>{if(i===Xt)return;let m;if(n){const p=r?.current;zt(p)&&p.closest("label")!=null?m=t??null:m=a??s}else if(t!=null)d.current=!0,m=t;else if(d.current)m=s;else{f();return}if(m===void 0){f();return}u.current=!0,i(l.current,m)},[t,r,a,i,n,s,l,f]),c.useEffect(()=>f,[f]),o??s}function J9(e,t){return(n,r)=>{if(n==null)return!1;const o=Zn(n,t);return e.contains(o,r)}}function Q9(e,t,n){return(r,o)=>{if(r==null)return!1;if(!o)return!0;const i=Zn(r,t),s=n!=null?Zn(n,t):"";return s&&e.contains(s,o)&&s.length===o.length?!0:e.contains(i,o)}}const oR=new Map;function rP(e){return Array.isArray(e)?e.map(t=>rP(t)).join(","):e==null?"":String(e)}function eK(e={}){const t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${rP(e.locale)}|${JSON.stringify(t)}`,r=oR.get(n);if(r)return r;const o=new Intl.Collator(e.locale,t),i={contains(s,a,l){if(!a)return!0;const u=Zn(s,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(s,a,l){if(!a)return!0;const u=Zn(s,l);return o.compare(u.slice(0,a.length),a)===0},endsWith(s,a,l){if(!a)return!0;const u=Zn(s,l),d=a.length;return u.length>=d&&o.compare(u.slice(u.length-d),a)===0}};return oR.set(n,i),i}const tK=eK;function ku(e,t){const n=c.useRef(e),r=Ge(t);We(()=>{n.current!==e&&r(n.current)},[e,r]),We(()=>{n.current=e},[e])}const oP=Symbol("none"),Ss={value:oP,index:-1};function nK(e){const{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:o,onSelectedValueChange:i,defaultInputValue:s,inputValue:a,selectionMode:l="none",onItemHighlighted:u,name:d,disabled:f=!1,readOnly:m=!1,required:p=!1,inputRef:v,grid:g=!1,items:h,filteredItems:b,filter:y,openOnInputClick:x=!0,autoHighlight:w=!1,keepHighlight:C=!1,highlightItemOnHover:R=!0,loopFocus:k=!0,itemToStringLabel:S,itemToStringValue:P,isItemEqualToValue:L=H9,virtualized:_=!1,inline:O=!1,fillInputOnItemPress:B=!0,modal:I=!1,limit:V=-1,autoComplete:F="list",formAutoComplete:D,locale:T,submitOnItemClick:q=!1}=e,{clearErrors:A}=eP(),{setDirty:ee,validityData:ie,shouldValidateOnChange:Y,setFilled:Q,name:X,disabled:J,setTouched:te,setFocused:le,validationMode:z,validation:re}=jc(),oe=nP({id:t}),M=tK({locale:T}),[N,j]=c.useState(!1),[K,H]=c.useState(null),U=c.useRef([]),$=c.useRef([]),W=c.useRef(null),Z=c.useRef(null),G=c.useRef(null),ne=c.useRef(!0),we=c.useRef(!1),Ve=c.useRef(null),Ye=c.useRef(null),ft=c.useRef(null),qe=c.useRef(Ss),ce=c.useRef(null),Ke=c.useRef([]),ot=c.useRef([]),Lt=J||f,Ft=X??d,Tt=l==="multiple",se=l==="single",Ee=a!==void 0||s!==void 0,Se=h!==void 0,Pe=b!==void 0;let Ce;w==="always"?Ce="always":Ce=w?"input-change":!1;const[ke,pt]=gg({controlled:o,default:Tt?r??pu:r,name:"Combobox",state:"selectedValue"}),gt=c.useMemo(()=>y===null?()=>!0:y!==void 0?y:se&&!N?Q9(M,S,ke):J9(M,S),[y,se,ke,N,M,S]),un=Dr(()=>Ee?s??"":se?Zn(ke,S):"").current,[Vt,rr]=gg({controlled:a,default:un,name:"Combobox",state:"inputValue"}),[vt,Gr]=gg({controlled:e.open,default:e.defaultOpen,name:"Combobox",state:"open"}),jt=rw(h),Dt=K??(Vt===""?"":String(Vt).trim()),or=se?Zn(ke,S):"",Xn=se&&!N&&Dt!==""&&or!==""&&or.length===Dt.length&&M.contains(or,Dt),mt=Xn?"":Dt,Cr=Se&&Pe&&Xn,$n=c.useMemo(()=>h?jt?h.flatMap(Re=>Re.items):h:pu,[h,jt]),dn=c.useMemo(()=>{if(b&&!Cr)return b;if(!h)return pu;if(jt){const Ue=h,it=[];let tn=0;for(const En of Ue){if(V>-1&&tn>=V)break;const Cn=mt===""?En.items:En.items.filter(au=>gt(au,mt,S));if(Cn.length===0)continue;const Es=V>-1?V-tn:1/0,Cs=Cn.slice(0,Es);if(Cs.length>0){const au={...En,items:Cs};it.push(au),tn+=Cs.length}}return it}if(mt==="")return V>-1?$n.slice(0,V):$n;const Re=[];for(const Ue of $n){if(V>-1&&Re.length>=V)break;gt(Ue,mt,S)&&Re.push(Ue)}return Re},[b,Cr,h,jt,mt,V,gt,S,$n]),ir=c.useMemo(()=>jt?dn.flatMap(Ue=>Ue.items):dn,[dn,jt]),ut=Dr(()=>new qM({id:oe,selectedValue:ke,open:vt,filter:gt,query:Dt,items:h,selectionMode:l,listRef:U,labelsRef:$,popupRef:W,emptyRef:G,inputRef:Z,keyboardActiveRef:ne,chipsContainerRef:Ve,clearRef:Ye,valuesRef:Ke,allValuesRef:ot,selectionEventRef:ft,name:Ft,disabled:Lt,readOnly:m,required:p,grid:g,isGrouped:jt,virtualized:_,openOnInputClick:x,itemToStringLabel:S,isItemEqualToValue:L,modal:I,autoHighlight:Ce,submitOnItemClick:q,hasInputValue:Ee,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:O,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},positionerElement:null,listElement:null,triggerElement:null,inputElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,onOpenChangeComplete:n||Xt,setOpen:Xt,setInputValue:Xt,setSelectedValue:Xt,setIndices:Xt,onItemHighlighted:Xt,handleSelection:Xt,getItemProps:()=>Hn,forceMount:Xt,requestSubmit:Xt})).current,li=l==="none"?Vt:ke,cG=c.useMemo(()=>l==="none"?li:Array.isArray(ke)?ke.map(Re=>Ol(Re,P)):Ol(ke,P),[li,P,l,ke]),ng=Ge(u),rg=Ge(n),nu=ue(ut,de.activeIndex),uG=ue(ut,de.selectedIndex),ru=ue(ut,de.positionerElement),nk=ue(ut,de.listElement),Cl=ue(ut,de.triggerElement),og=ue(ut,de.inputElement),Wr=ue(ut,de.inline),ci=ue(ut,de.inputInsidePopup),dG=Rr(Cl),{mounted:rk,setMounted:fG,transitionStatus:ig}=QA(vt),{openMethod:ok,triggerProps:sg,reset:pG}=_9(vt);Z9({id:oe,name:Ft,commit:re.commit,value:li,controlRef:ci?dG:Z,getValue:()=>cG});const ou=Ge(()=>{h?$.current=ir.map(Re=>Zn(Re,S)):ut.set("forceMounted",!0)}),mG=c.useRef(ke);We(()=>{ke!==mG.current&&ou()},[ou,ke]);const Ur=Ge(Re=>{ut.update(Re);const Ue=Re.type||"none";if(Re.activeIndex!==void 0)if(Re.activeIndex===null)qe.current!==Ss&&(qe.current=Ss,ng(void 0,Sl(Ue,void 0,{index:-1})));else{const it=Ke.current[Re.activeIndex];qe.current={value:it,index:Re.activeIndex},ng(it,Sl(Ue,void 0,{index:Re.activeIndex}))}}),to=Ge((Re,Ue)=>{if(we.current=Ue.reason===Ri,e.onInputValueChange?.(Re,Ue),!Ue.isCanceled){if(Ue.reason===Ta){const it=Ue.event,tn=it.inputType;if(it.type==="compositionend"||tn!=null&&tn!==""&&tn!=="insertReplacementText"){const Cn=Re.trim()!=="";Cn&&j(!0),ce.current={hasQuery:Cn},Cn&&Ce&&ut.state.activeIndex==null&&ut.set("activeIndex",0)}}rr(Re)}}),kl=Ge((Re,Ue)=>{if(vt!==Re&&(Ue.reason==="escape-key"&&Se&&ir.length===0&&!ut.state.emptyRef.current&&Ue.allowPropagation(),e.onOpenChange?.(Re,Ue),!Ue.isCanceled&&(!Re&&N&&(se?(Wr||H(Dt),Dt===""&&j(!1)):Tt&&(Wr||ci?Ur({activeIndex:null}):H(Dt),to("",Je(Ri,Ue.event)))),Gr(Re),!Re&&ci&&(Ue.reason===am||Ue.reason===Tx)&&(te(!0),le(!1),z==="onBlur")))){const it=l==="none"?Vt:ke;re.commit(it)}}),iu=Ge((Re,Ue)=>{if(i?.(Re,Ue),Ue.isCanceled)return;pt(Re),(l==="none"&&W.current&&B||se&&!ut.state.inputInsidePopup)&&to(Zn(Re,S),Je(Ue.reason,Ue.event)),se&&Re!=null&&Ue.reason!==Ta&&N&&!Wr&&H(Dt)}),hG=Ge((Re,Ue)=>{let it=Ue;if(it===void 0){if(nu===null)return;it=Ke.current[nu]}const tn=Jn(Re),En=ft.current??Re;ft.current=null;const Cn=Je($U,En),Es=tn?.closest("a")?.getAttribute("href");if(Es){Es.startsWith("#")&&kl(!1,Cn);return}if(Tt){const Cs=Array.isArray(ke)?ke:[],NG=G9(Cs,it,ut.state.isItemEqualToValue)?W9(Cs,it,ut.state.isItemEqualToValue):[...Cs,it];if(iu(NG,Cn),!(Z.current?Z.current.value.trim()!=="":!1))return;ut.state.inputInsidePopup?to("",Je(Ri,Cn.event)):kl(!1,Cn)}else iu(it,Cn),kl(!1,Cn)}),ag=Ge(()=>{if(!ut.state.submitOnItemClick)return;const Re=ut.state.inputElement?.form;Re&&typeof Re.requestSubmit=="function"&&Re.requestSubmit()}),lg=Ge(()=>{if(fG(!1),rg?.(!1),j(!1),pG(),H(null),Ur(l==="none"?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Tt&&Z.current&&Z.current.value!==""&&!we.current&&to("",Je(Ri)),se)if(ut.state.inputInsidePopup)Z.current&&Z.current.value!==""&&to("",Je(Ri));else{const Re=Zn(ke,S);Z.current&&Z.current.value!==Re&&to(Re,Je(Re===""?Ri:kr))}}),gG=c.useMemo(()=>Wr&&ru?{current:ru.closest('[role="dialog"]')}:W,[Wr,ru]);Wx({enabled:!e.actionsRef,open:vt,ref:gG,onComplete(){vt||lg()}}),c.useImperativeHandle(e.actionsRef,()=>({unmount:lg}),[lg]),We(function(){if(vt||l==="none")return;const Ue=h?$n:ot.current;if(Tt){const it=Array.isArray(ke)?ke:[],tn=it[it.length-1],En=Df(Ue,tn,L);Ur({selectedIndex:En===-1?null:En})}else{const it=Df(Ue,ke,L);Ur({selectedIndex:it===-1?null:it})}},[vt,ke,h,l,$n,Tt,L,Ur]),We(()=>{h&&(Ke.current=ir,U.current.length=ir.length)},[h,ir]),We(()=>{const Re=ce.current;if(Re&&(Re.hasQuery?Ce&&ut.set("activeIndex",0):Ce==="always"&&ut.set("activeIndex",0),ce.current=null),!vt&&!Wr)return;const it=Se||Pe?ir:Ke.current,tn=ut.state.activeIndex;if(tn==null){if(Ce==="always"&&it.length>0){ut.set("activeIndex",0);return}qe.current!==Ss&&(qe.current=Ss,ut.state.onItemHighlighted(void 0,Sl(kr,void 0,{index:-1})));return}if(tn>=it.length){qe.current!==Ss&&(qe.current=Ss,ut.state.onItemHighlighted(void 0,Sl(kr,void 0,{index:-1}))),ut.set("activeIndex",null);return}const En=it[tn],Cn=qe.current.value,Es=Cn!==oP&&zs(En,Cn,ut.state.isItemEqualToValue);(qe.current.index!==tn||!Es)&&(qe.current={value:En,index:tn},ut.state.onItemHighlighted(En,Sl(kr,void 0,{index:tn})))},[nu,Ce,Pe,Se,ir,Wr,vt,ut]),We(()=>{if(l==="none"){Q(String(Vt)!=="");return}Q(Tt?Array.isArray(ke)&&ke.length>0:ke!=null)},[Q,l,Vt,ke,Tt]),c.useEffect(()=>{Se&&Ce&&ir.length===0&&Ur({activeIndex:null})},[Se,Ce,ir.length,Ur]),ku(Dt,()=>{!vt||Dt===""||Dt===String(un)||j(!0)}),ku(ke,()=>{if(l!=="none"&&(A(Ft),ee(ke!==ie.initialValue),Y()?re.commit(ke):re.commit(ke,!0),se&&!Ee&&!ci)){const Re=Zn(ke,S);Vt!==Re&&to(Re,Je(kr))}}),ku(Vt,()=>{l==="none"&&(A(Ft),ee(Vt!==ie.initialValue),Y()?re.commit(Vt):re.commit(Vt,!0))}),ku(h,()=>{if(!se||Ee||ci||N)return;const Re=Zn(ke,S);Vt!==Re&&to(Re,Je(kr))});const su=KM({open:Wr?!0:vt,onOpenChange:kl,elements:{reference:ci?Cl:og,floating:ru}});let cg,ug;Wr||(cg=g?"grid":"listbox",ug=vt?"true":"false");const vG=c.useMemo(()=>{const Re=og?.tagName==="INPUT",Ue=Re||vt,it=Re?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return Ue&&(it.role="combobox",it["aria-expanded"]=ug,it["aria-haspopup"]=cg,it["aria-controls"]=vt?nk?.id:void 0,it["aria-autocomplete"]=F),{reference:it,floating:{role:"presentation"}}},[og,vt,ug,cg,nk?.id,F]),bG=IM(su,{enabled:!m&&!Lt&&x,event:"mousedown-only",toggle:!1,touchOpenDelay:ci?0:50,reason:BU}),yG=G8(su,{enabled:!m&&!Lt&&!Wr,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:Wr?!0:void 0,outsidePress(Re){const Ue=Jn(Re);return!ht(Cl,Ue)&&!ht(Ye.current,Ue)&&!ht(Ve.current,Ue)}}),xG=A9(su,{enabled:!m&&!Lt,id:oe,listRef:U,activeIndex:nu,selectedIndex:uG,virtual:!0,loopFocus:k,allowEscape:k&&!Ce,focusItemOnOpen:N||l==="none"&&!Ce?!1:"auto",focusItemOnHover:R,resetOnPointerLeave:!C,cols:g?2:1,orientation:g?"horizontal":void 0,disabledIndices:pu,onNavigate(Re,Ue){!Ue&&!vt||ig==="ending"||Ur(Ue?{activeIndex:Re,type:ne.current?"keyboard":"pointer"}:{activeIndex:Re})}}),{getReferenceProps:dg,getFloatingProps:fg,getItemProps:pg}=S9([vG,bG,yG,xG]);B9(()=>{ut.update({inline:O,popupProps:fg(),inputProps:dg(),triggerProps:sg,getItemProps:pg,setOpen:kl,setInputValue:to,setSelectedValue:iu,setIndices:Ur,onItemHighlighted:ng,handleSelection:hG,forceMount:ou,requestSubmit:ag})}),We(()=>{ut.update({id:oe,selectedValue:ke,open:vt,mounted:rk,transitionStatus:ig,items:h,inline:O,popupProps:fg(),inputProps:dg(),triggerProps:sg,openMethod:ok,getItemProps:pg,selectionMode:l,name:Ft,disabled:Lt,readOnly:m,required:p,grid:g,isGrouped:jt,virtualized:_,onOpenChangeComplete:rg,openOnInputClick:x,itemToStringLabel:S,modal:I,autoHighlight:Ce,isItemEqualToValue:L,submitOnItemClick:q,hasInputValue:Ee,requestSubmit:ag})},[ut,oe,ke,vt,rk,ig,h,fg,dg,pg,ok,sg,l,Ft,Lt,m,p,re,g,jt,_,rg,x,S,I,L,q,Ee,O,ag,Ce]);const wG=cc(v,re.inputRef),EG=c.useMemo(()=>({query:Dt,hasItems:Se,filteredItems:dn,flatFilteredItems:ir}),[Dt,Se,dn,ir]),CG=c.useMemo(()=>Array.isArray(li)?"":Ol(li,P),[li,P]),kG=Tt&&Array.isArray(ke)&&ke.length>0,mg=Tt||l==="none"?void 0:Ft,RG=c.useMemo(()=>!Tt||!Array.isArray(ke)||!Ft?null:ke.map(Re=>{const Ue=Ol(Re,P);return E.jsx("input",{type:"hidden",name:Ft,value:Ue},Ue)}),[Tt,ke,Ft,P]),SG=E.jsxs(c.Fragment,{children:[e.children,E.jsx("input",{...re.getInputValidationProps({onFocus(){if(ci){Cl?.focus();return}(Z.current||Cl)?.focus()},onChange(Re){if(Re.nativeEvent.defaultPrevented)return;const Ue=Re.target.value,it=Je(kr,Re.nativeEvent);function tn(){if(Tt)return;if(l==="none"){ee(Ue!==ie.initialValue),to(Ue,it),Y()&&re.commit(Ue);return}const En=Ke.current.find(Cn=>Ol(Cn,P).toLowerCase()===Ue.toLowerCase());En!=null&&(ee(En!==ie.initialValue),iu?.(En,it),Y()&&re.commit(En))}h?tn():(ou(),queueMicrotask(tn))}}),id:oe&&mg==null?`${oe}-hidden-input`:void 0,name:mg,autoComplete:D,disabled:Lt,required:p&&!kG,readOnly:m,value:CG,ref:wG,style:mg?Kq:Ux,tabIndex:-1,"aria-hidden":!0}),RG]});return E.jsx(Jx.Provider,{value:ut,children:E.jsx(Qx.Provider,{value:su,children:E.jsx(ew.Provider,{value:EG,children:E.jsx(tw.Provider,{value:Vt,children:SG})})})})}const iP={...$9,...Y9,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null};function rK(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 i=parseFloat(n.width)||0,s=parseFloat(n.height)||0,a=parseFloat(r.width)||0,l=parseFloat(r.height)||0,u=Math.max(t.width,i,a),d=Math.max(t.height,s,l),f=u-t.width,m=d-t.height;return{left:t.left-f/2,right:t.right+f/2,top:t.top-m/2,bottom:t.bottom+m/2}}const Ru=2,sP=c.forwardRef(function(t,n){const{render:r,className:o,nativeButton:i=!0,disabled:s=!1,id:a,...l}=t,{state:u,disabled:d,setTouched:f,setFocused:m,validationMode:p,validation:v}=jc(),{labelId:g}=ow(),h=Er(),{filteredItems:b}=os(),y=ue(h,de.selectionMode),x=ue(h,de.disabled),w=ue(h,de.readOnly),C=ue(h,de.required),R=ue(h,de.mounted),k=ue(h,de.popupSide),S=ue(h,de.positionerElement),P=ue(h,de.listElement),L=ue(h,de.triggerProps),_=ue(h,de.triggerElement),O=ue(h,de.inputInsidePopup),B=ue(h,de.id),I=ue(h,de.open),V=ue(h,de.selectedValue),F=ue(h,de.activeIndex),D=ue(h,de.selectedIndex),T=ue(h,de.hasSelectedValue),q=ym(),A=nw(),ee=Fs(),ie=d||x||s,Y=b.length===0,Q=R&&S?k:null;nP({id:O?a:void 0});const X=O?a??B:a,J=c.useRef("");function te(H){J.current=H.pointerType}const le=q.useState("domReferenceElement");c.useEffect(()=>{O&&_&&_!==le&&q.set("domReferenceElement",_)},[_,le,q,O]);const{reference:z}=M9(q,{enabled:!I&&!w&&!x&&y==="single",listRef:h.state.labelsRef,activeIndex:F,selectedIndex:D,onMatch(H){const U=h.state.valuesRef.current[H];U!==void 0&&h.state.setSelectedValue(U,Je("none"))}}),{reference:re}=IM(q,{enabled:!w&&!x,event:"mousedown"}),{buttonRef:oe,getButtonProps:M}=fm({native:i,disabled:ie}),N={...u,open:I,disabled:ie,popupSide:Q,listEmpty:Y,placeholder:!T},j=Ge(H=>{h.set("triggerElement",H)});return Wn("button",t,{ref:[n,oe,j],state:N,props:[L,re,z,{id:X,tabIndex:O?0:-1,role:O?"combobox":void 0,"aria-expanded":I?"true":"false","aria-haspopup":O?"dialog":"listbox","aria-controls":I?P?.id:void 0,"aria-required":O&&C||void 0,"aria-labelledby":g,onPointerDown:te,onPointerEnter:te,onFocus(){m(!0),!(ie||w)&&ee.start(0,h.state.forceMount)},onBlur(H){if(!ht(S,H.relatedTarget)&&(f(!0),m(!1),p==="onBlur")){const U=y==="none"?A:V;v.commit(U)}},onMouseDown(H){if(ie||w||(O||q.set("domReferenceElement",H.currentTarget),h.state.forceMount(),J.current!=="touch"&&(h.state.inputRef.current?.focus(),O||H.preventDefault()),I))return;const U=nn(H.currentTarget);function $(W){if(!_)return;const Z=Jn(W),G=h.state.positionerElement,ne=h.state.listElement;if(ht(_,Z)||ht(G,Z)||ht(ne,Z)||Z===_)return;const we=rK(_),Ve=W.clientX>=we.left-Ru&&W.clientX<=we.right+Ru,Ye=W.clientY>=we.top-Ru&&W.clientY<=we.bottom+Ru;Ve&&Ye||h.state.setOpen(!1,Je("cancel-open",W))}O&&U.addEventListener("mouseup",$,{once:!0})},onKeyDown(H){ie||w||(H.key==="ArrowDown"||H.key==="ArrowUp")&&($t(H),h.state.setOpen(!0,Je(Gl,H.nativeEvent)),h.state.inputRef.current?.focus())}},v?v.getValidationProps(l):l,M],stateAttributesMapping:iP})});process.env.NODE_ENV!=="production"&&(sP.displayName="ComboboxTrigger");const iw=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(iw.displayName="ComboboxChipsContext");function aP(){return c.useContext(iw)}const sw=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(sw.displayName="ComboboxPositionerContext");function aw(e){const t=c.useContext(sw);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":Yr(21));return t}const lw=c.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,id:s,...a}=t,{state:l,disabled:u,setTouched:d,setFocused:f,validationMode:m,validation:p}=jc(),{labelId:v}=ow(),g=aP(),b=!!aw(!0),y=Er(),{filteredItems:x}=os(),w=nw(),C=GA(),R=ue(y,de.required),k=ue(y,de.disabled),S=ue(y,de.readOnly),P=ue(y,de.name),L=ue(y,de.selectionMode),_=ue(y,de.autoHighlight),O=ue(y,de.inputProps),B=ue(y,de.triggerProps),I=ue(y,de.open),V=ue(y,de.mounted),F=ue(y,de.selectedValue),D=ue(y,de.popupSide),T=ue(y,de.positionerElement),q=ue(y,de.id),A=ue(y,de.inline),ee=!!_,ie=V&&T?D:null,Y=u||k||i,Q=x.length===0,J=Lx(s??(b||A?void 0:q)),[te,le]=c.useState(null),z=c.useRef(!1),re=c.useRef(null),oe=c.useRef(!1),M=Ge(H=>{const U=b||y.state.inline;U&&!y.state.hasInputValue&&y.state.setInputValue("",Je(kr)),y.update({inputElement:H,inputInsidePopup:U})}),N={...l,open:I,disabled:Y,readOnly:S,popupSide:ie,listEmpty:Q};function j(H){if(!g)return;let U;const{highlightedChipIndex:$}=g;if($!==void 0){if(H.key==="ArrowLeft")H.preventDefault(),$>0?U=$-1:U=void 0;else if(H.key==="ArrowRight")H.preventDefault(),$<F.length-1?U=$+1:U=void 0;else if(H.key==="Backspace"||H.key==="Delete"){H.preventDefault();const W=$>=F.length-1?F.length-2:$;U=W>=0?W:void 0,y.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return U}return H.key==="ArrowLeft"&&(H.currentTarget.selectionStart??0)===0&&F.length>0?(H.preventDefault(),U=Math.max(F.length-1,0)):H.key==="Backspace"&&H.currentTarget.value===""&&F.length>0&&(y.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),H.preventDefault()),U}return Wn("input",t,{state:N,ref:[n,y.state.inputRef,M],props:[O,B,{type:"text",value:t.value??te??w,"aria-readonly":S||void 0,"aria-required":R||void 0,"aria-labelledby":v,disabled:Y,readOnly:S,required:L==="none"?R:void 0,...L==="none"&&P&&{name:P},id:J,onFocus(){if(f(!0),!A||!oe.current)return;oe.current=!1;const H=re.current;H==null||!Object.hasOwn(y.state.valuesRef.current,H)||y.state.setIndices({activeIndex:H})},onBlur(){d(!0),f(!1);const H=y.state.activeIndex;if(A&&H!==null&&_!=="always"&&(re.current=H,oe.current=!0,y.state.setIndices({activeIndex:null})),m==="onBlur"){const U=L==="none"?w:F;p.commit(U)}},onCompositionStart(H){Cf||(z.current=!0,le(H.currentTarget.value))},onCompositionEnd(H){z.current=!1;const U=H.currentTarget.value;le(null),y.state.setInputValue(U,Je(Ta,H.nativeEvent))},onChange(H){const U=H.nativeEvent.inputType,$=!U||U==="insertReplacementText",W=z.current||!$;if(z.current){const we=H.currentTarget.value;le(we),we===""&&!y.state.openOnInputClick&&!y.state.inputInsidePopup&&y.state.setOpen(!1,Je(Ri,H.nativeEvent));const Ve=we.trim(),Ye=ee&&Ve!=="";!S&&!Y&&Ve&&W&&(y.state.setOpen(!0,Je(Ta,H.nativeEvent)),ee||y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?"keyboard":"pointer"})),I&&y.state.activeIndex!==null&&!Ye&&y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?"keyboard":"pointer"});return}y.state.setInputValue(H.currentTarget.value,Je(Ta,H.nativeEvent));const Z=H.currentTarget.value==="",G=Je(Ri,H.nativeEvent);Z&&!y.state.inputInsidePopup&&(L==="single"&&y.state.setSelectedValue(null,G),y.state.openOnInputClick||y.state.setOpen(!1,G));const ne=H.currentTarget.value.trim();!S&&!Y&&ne&&W&&(y.state.setOpen(!0,Je(Ta,H.nativeEvent)),ee||y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?"keyboard":"pointer"})),I&&y.state.activeIndex!==null&&!ee&&y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(H){if(Y||S||H.ctrlKey||H.shiftKey||H.altKey||H.metaKey)return;y.state.keyboardActiveRef.current=!0;const U=H.currentTarget,$=U.scrollWidth-U.clientWidth,W=C==="rtl";if(H.key==="Home"){$t(H);const ne=kk&&W?U.value.length:0;U.setSelectionRange(ne,ne),U.scrollLeft=0;return}if(H.key==="End"){$t(H);const ne=kk&&W?0:U.value.length;U.setSelectionRange(ne,ne),U.scrollLeft=W?-$:$;return}if(!V&&H.key==="Escape"){const ne=L==="multiple"&&Array.isArray(F)?F.length===0:F===null,we=Je(XA,H.nativeEvent),Ve=L==="multiple"?[]:null;y.state.setInputValue("",we),y.state.setSelectedValue(Ve,we),!ne&&!y.state.inline&&!we.isPropagationAllowed&&H.stopPropagation();return}if(g&&H.key==="Backspace"&&U.value===""&&g.highlightedChipIndex===void 0&&Array.isArray(F)&&F.length>0){const ne=F.slice(0,-1);y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?"keyboard":"pointer"}),y.state.setSelectedValue(ne,Je(kr,H.nativeEvent));return}const Z=g?.highlightedChipIndex!==void 0,G=j(H);if(g?.setHighlightedChipIndex(G),G!==void 0?g?.chipsRef.current[G]?.focus():Z&&y.state.inputRef.current?.focus(),H.which!==229&&H.key==="Enter"&&I){const ne=y.state.activeIndex,we=H.nativeEvent;if(ne===null){y.state.setOpen(!1,Je(kr,we));return}$t(H);const Ve=y.state.listRef.current[ne];Ve&&(y.state.selectionEventRef.current=we,Ve.click(),y.state.selectionEventRef.current=null)}},onPointerMove(){y.state.keyboardActiveRef.current=!1},onPointerDown(){y.state.keyboardActiveRef.current=!1}},p?p.getValidationProps(a):a],stateAttributesMapping:iP})});process.env.NODE_ENV!=="production"&&(lw.displayName="ComboboxInput");const oK={...JA,...F9},lP=c.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:s=!0,keepMounted:a=!1,...l}=t,{disabled:u}=jc(),d=Er(),f=ue(d,de.selectionMode),m=ue(d,de.disabled),p=ue(d,de.readOnly),v=ue(d,de.open),g=ue(d,de.selectedValue),h=ue(d,de.hasSelectionChips),b=nw();let y=!1;f==="none"?y=b!=="":f==="single"?y=g!=null:y=h;const x=u||m||i,{buttonRef:w,getButtonProps:C}=fm({native:s,disabled:x}),{mounted:R,transitionStatus:k,setMounted:S}=QA(y),P={disabled:x,open:v,transitionStatus:k};Wx({open:y,ref:d.state.clearRef,onComplete(){y||S(!1)}});const L=Wn("button",t,{state:P,ref:[n,w,d.state.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(O){O.preventDefault()},onClick(O){if(x||p)return;const B=d.state.keyboardActiveRef;d.state.setInputValue("",Je(yk,O.nativeEvent)),f!=="none"?(d.state.setSelectedValue(Array.isArray(g)?[]:null,Je(yk,O.nativeEvent)),d.state.setIndices({activeIndex:null,selectedIndex:null,type:B.current?"keyboard":"pointer"})):d.state.setIndices({activeIndex:null,type:B.current?"keyboard":"pointer"}),d.state.inputRef.current?.focus()}},l,C],stateAttributesMapping:oK});return a||R?L:null});process.env.NODE_ENV!=="production"&&(lP.displayName="ComboboxClear");const cw=c.createContext(null);process.env.NODE_ENV!=="production"&&(cw.displayName="GroupCollectionContext");function iK(){return c.useContext(cw)}function sK(e){const{children:t,items:n}=e,r=c.useMemo(()=>({items:n}),[n]);return E.jsx(cw.Provider,{value:r,children:t})}function cP(e){const{children:t}=e,{filteredItems:n}=os(),r=iK(),o=r?r.items:n;return o?E.jsx(c.Fragment,{children:o.map(t)}):null}const uP=c.forwardRef(function(t,n){var r;const{render:o,className:i,children:s,...a}=t,l=Er(),u=ym(),d=!!aw(!0),{filteredItems:f}=os(),m=ue(l,de.items),p=ue(l,de.labelsRef),v=ue(l,de.listRef),g=ue(l,de.selectionMode),h=ue(l,de.grid),b=ue(l,de.popupProps),y=ue(l,de.disabled),x=ue(l,de.readOnly),w=ue(l,de.virtualized),C=g==="multiple",R=f.length===0,k=Ge(B=>{l.set("positionerElement",B)}),S=Ge(B=>{l.set("listElement",B)}),P=c.useMemo(()=>typeof s=="function"?r||(r=E.jsx(cP,{children:s})):s,[s]),L={empty:R},_=u.useState("floatingId"),O=Wn("div",t,{state:L,ref:[n,S,d?null:k],props:[b,{children:P,tabIndex:-1,id:_,role:h?"grid":"listbox","aria-multiselectable":C?"true":void 0,onKeyDown(B){if(!(y||x)&&B.key==="Enter"){const I=l.state.activeIndex;if(I==null)return;$t(B);const V=B.nativeEvent,F=l.state.listRef.current[I];F&&(l.state.selectionEventRef.current=V,F.click(),l.state.selectionEventRef.current=null)}},onKeyDownCapture(){l.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){l.state.keyboardActiveRef.current=!1}},a]});return w?O:E.jsx(BA,{elementsRef:v,labelsRef:m?void 0:p,children:O})});process.env.NODE_ENV!=="production"&&(uP.displayName="ComboboxList");const uw=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(uw.displayName="ComboboxPortalContext");function aK(){const e=c.useContext(uw);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Portal> is missing.":Yr(20));return e}const dP=c.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,i=Er(),s=ue(i,de.mounted),a=ue(i,de.forceMounted);return s||r||a?E.jsx(uw.Provider,{value:r,children:E.jsx(OM,{ref:n,...o})}):null});process.env.NODE_ENV!=="production"&&(dP.displayName="ComboboxPortal");const lK=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:d=0,offsetParent:f="real"}=bo(e,t)||{};if(u==null)return{};const m=Gx(d),p={x:n,y:r},v=mm(o),g=pm(v),h=await s.getDimensions(u),b=v==="y",y=b?"top":"left",x=b?"bottom":"right",w=b?"clientHeight":"clientWidth",C=i.reference[g]+i.reference[v]-p[v]-i.floating[g],R=p[v]-i.reference[v],k=f==="real"?await s.getOffsetParent?.(u):a.floating;let S=a.floating[w]||i.floating[g];(!S||!await s.isElement?.(k))&&(S=a.floating[w]||i.floating[g]);const P=C/2-R/2,L=S/2-h[g]/2-1,_=Math.min(m[y],L),O=Math.min(m[x],L),B=_,I=S-h[g]-O,V=S/2-h[g]/2+P,F=Rf(B,V,I),D=!l.arrow&&ri(o)!=null&&V!==F&&i.reference[g]/2-(V<B?_:O)-h[g]/2<0,T=D?V<B?V-B:V-I:0;return{[v]:p[v]+T,data:{[v]:F,centerOffset:V-F-T,...D&&{alignmentOffset:T}},reset:D}}}),cK=(e,t)=>({...lK(e),options:[e,t]}),uK={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,i=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:(await GM().fn(e)).data?.referenceHidden||i}}}},dK={sideX:"left",sideY:"top"};function fP(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 iR(e,t,n){const{rects:r,placement:o}=e;return{side:fP(t,hr(o),n),align:ri(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function fK(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,collisionBoundary:a,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,keepMounted:m=!1,floatingRootContext:p,mounted:v,collisionAvoidance:g,shiftCrossAxis:h=!1,nodeId:b,adaptiveOrigin:y,lazyFlip:x=!1,externalTree:w}=e,[C,R]=c.useState(null);!v&&C!==null&&R(null);const k=g.side||"flip",S=g.align||"flip",P=g.fallbackAxisSide||"end",L=typeof t=="function"?t:void 0,_=Ge(L),O=L?_:t,B=Rr(t),V=GA()==="rtl",F=C||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":V?"left":"right","inline-start":V?"right":"left"}[r],D=i==="center"?F:`${F}-${i}`;let T=l;const q=1,A=r==="bottom"?q:0,ee=r==="top"?q:0,ie=r==="right"?q:0,Y=r==="left"?q:0;typeof T=="number"?T={top:T+A,right:T+Y,bottom:T+ee,left:T+ie}:T&&(T={top:(T.top||0)+A,right:(T.right||0)+Y,bottom:(T.bottom||0)+ee,left:(T.left||0)+ie});const Q={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:T},X=c.useRef(null),J=Rr(o),te=Rr(s),re=[FM(Pe=>{const Ce=iR(Pe,r,V),ke=typeof J.current=="function"?J.current(Ce):J.current,pt=typeof te.current=="function"?te.current(Ce):te.current;return{mainAxis:ke,crossAxis:pt,alignmentAxis:pt}},[typeof o!="function"?o:0,typeof s!="function"?s:0,V,r])],oe=S==="none"&&k!=="shift",M=!oe&&(u||h||k==="shift"),N=k==="none"?null:BM({...Q,padding:{top:T.top+q,right:T.right+q,bottom:T.bottom+q,left:T.left+q},mainAxis:!h&&k==="flip",crossAxis:S==="flip"?"alignment":!1,fallbackAxisSideDirection:P}),j=oe?null:$M(Pe=>{const Ce=nn(Pe.elements.floating).documentElement;return{...Q,rootBoundary:h?{x:0,y:0,width:Ce.clientWidth,height:Ce.clientHeight}:void 0,mainAxis:S!=="none",crossAxis:M,limiter:u||h?void 0:zM(ke=>{if(!X.current)return{};const{width:pt,height:gt}=X.current.getBoundingClientRect(),un=Sr(hr(ke.placement)),Vt=un==="y"?pt:gt,rr=un==="y"?T.left+T.right:T.top+T.bottom;return{offset:Vt/2+rr/2}})}},[Q,u,h,T,S]);k==="shift"||S==="shift"||i==="center"?re.push(j,N):re.push(N,j),re.push(HM({...Q,apply({elements:{floating:Pe},rects:{reference:Ce},availableWidth:ke,availableHeight:pt}){const gt=Pe.style;gt.setProperty("--available-width",`${ke}px`),gt.setProperty("--available-height",`${pt}px`),gt.setProperty("--anchor-width",`${Ce.width}px`),gt.setProperty("--anchor-height",`${Ce.height}px`)}}),cK(()=>({element:X.current||document.createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(Pe){const{elements:Ce,middlewareData:ke,placement:pt,rects:gt,y:un}=Pe,Vt=hr(pt),rr=Sr(Vt),vt=X.current,Gr=ke.arrow?.x||0,jt=ke.arrow?.y||0,Dt=vt?.clientWidth||0,or=vt?.clientHeight||0,Xn=Gr+Dt/2,mt=jt+or/2,Cr=Math.abs(ke.shift?.y||0),$n=gt.reference.height/2,dn=typeof o=="function"?o(iR(Pe,r,V)):o,ir=Cr>dn,ut={top:`${Xn}px calc(100% + ${dn}px)`,bottom:`${Xn}px ${-dn}px`,left:`calc(100% + ${dn}px) ${mt}px`,right:`${-dn}px ${mt}px`}[Vt],li=`${Xn}px ${gt.reference.y+$n-un}px`;return Ce.floating.style.setProperty("--transform-origin",M&&rr==="y"&&ir?li:ut),{}}},uK,y),We(()=>{!v&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[v,p]);const K=c.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:H,elements:U,x:$,y:W,middlewareData:Z,update:G,placement:ne,context:we,isPositioned:Ve,floatingStyles:Ye}=R9({rootContext:p,placement:D,middleware:re,strategy:n,whileElementsMounted:m?void 0:(...Pe)=>Lb(...Pe,K),nodeId:b,externalTree:w}),{sideX:ft,sideY:qe}=Z.adaptiveOrigin||dK,ce=Ve?n:"fixed",Ke=c.useMemo(()=>{const Pe=y?{position:ce,[ft]:$,[qe]:W}:{position:ce,...Ye};return Ve||(Pe.opacity=0),Pe},[y,ce,ft,$,qe,W,Ye,Ve]),ot=c.useRef(null);We(()=>{if(!v)return;const Pe=B.current,Ce=typeof Pe=="function"?Pe():Pe,pt=(sR(Ce)?Ce.current:Ce)||null||null;pt!==ot.current&&(H.setPositionReference(pt),ot.current=pt)},[v,H,O,B]),c.useEffect(()=>{if(!v)return;const Pe=B.current;typeof Pe!="function"&&sR(Pe)&&Pe.current!==ot.current&&(H.setPositionReference(Pe.current),ot.current=Pe.current)},[v,H,O,B]),c.useEffect(()=>{if(m&&v&&U.domReference&&U.floating)return Lb(U.domReference,U.floating,G,K)},[m,v,U,G,K]);const Lt=hr(ne),Ft=fP(r,Lt,V),Tt=ri(ne)||"center",se=!!Z.hide?.referenceHidden;We(()=>{x&&v&&Ve&&R(Lt)},[x,v,Ve,Lt]);const Ee=c.useMemo(()=>({position:"absolute",top:Z.arrow?.y,left:Z.arrow?.x}),[Z.arrow]),Se=Z.arrow?.centerOffset!==0;return c.useMemo(()=>({positionerStyles:Ke,arrowStyles:Ee,arrowRef:X,arrowUncentered:Se,side:Ft,align:Tt,physicalSide:Lt,anchorHidden:se,refs:H,context:we,isPositioned:Ve,update:G}),[Ke,Ee,X,Se,Ft,Tt,Lt,se,H,we,Ve,G])}function sR(e){return e!=null&&"current"in e}function pP(e){return e==="starting"?MU:Hn}const mP=c.forwardRef(function(t,n){const{render:r,className:o,anchor:i,positionMethod:s="absolute",side:a="bottom",align:l="center",sideOffset:u=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:m=5,arrowPadding:p=5,sticky:v=!1,disableAnchorTracking:g=!1,collisionAvoidance:h=_U,...b}=t,y=Er(),{filteredItems:x}=os(),w=ym(),C=aK(),R=ue(y,de.modal),k=ue(y,de.open),S=ue(y,de.mounted),P=ue(y,de.openMethod),L=ue(y,de.triggerElement),_=ue(y,de.inputElement),O=ue(y,de.inputInsidePopup),B=ue(y,de.transitionStatus),I=x.length===0,F=fK({anchor:i??(O?L:_),floatingRootContext:w,positionMethod:s,mounted:S,side:a,sideOffset:u,align:l,alignOffset:d,arrowPadding:p,collisionBoundary:f,collisionPadding:m,sticky:v,disableAnchorTracking:g,keepMounted:C,collisionAvoidance:h,lazyFlip:!0});Wq(k&&R&&P!=="touch",L);const D=c.useMemo(()=>{const ie={...F.positionerStyles};return k||(ie.pointerEvents="none"),{role:"presentation",hidden:!S,style:ie}},[k,S,F.positionerStyles]),T={open:k,side:F.side,align:F.align,anchorHidden:F.anchorHidden,empty:I};We(()=>{y.set("popupSide",F.side)},[y,F.side]);const q=c.useMemo(()=>({side:F.side,align:F.align,arrowRef:F.arrowRef,arrowUncentered:F.arrowUncentered,arrowStyles:F.arrowStyles,anchorHidden:F.anchorHidden,isPositioned:F.isPositioned}),[F.side,F.align,F.arrowRef,F.arrowUncentered,F.arrowStyles,F.anchorHidden,F.isPositioned]),A=Ge(ie=>{y.set("positionerElement",ie)}),ee=Wn("div",t,{state:T,ref:[n,A],props:[D,pP(B),b],stateAttributesMapping:YM});return E.jsxs(sw.Provider,{value:q,children:[S&&R&&E.jsx(XM,{inert:z9(!k),cutout:_??L}),ee]})});process.env.NODE_ENV!=="production"&&(mP.displayName="ComboboxPositioner");const pK={...YM,...JA},hP=c.forwardRef(function(t,n){const{render:r,className:o,initialFocus:i,finalFocus:s,...a}=t,l=Er(),u=aw(),d=ym(),{filteredItems:f}=os(),m=ue(l,de.mounted),p=ue(l,de.open),v=ue(l,de.openMethod),g=ue(l,de.transitionStatus),h=ue(l,de.inputInsidePopup),b=ue(l,de.inputElement),y=f.length===0;Wx({open:p,ref:l.state.popupRef,onComplete(){p&&l.state.onOpenChangeComplete(!0)}});const x={open:p,side:u.side,align:u.align,anchorHidden:u.anchorHidden,transitionStatus:g,empty:y},w=Wn("div",t,{state:x,ref:[n,l.state.popupRef],props:[{role:h?"dialog":"presentation",tabIndex:-1,onFocus(S){const P=Jn(S.nativeEvent);v!=="touch"&&(ht(l.state.listElement,P)||P===S.currentTarget)&&l.state.inputRef.current?.focus()}},pP(g),a],stateAttributesMapping:pK}),R=i===void 0?h?S=>S==="touch"?l.state.popupRef.current:b:!1:i;let k;return s!=null?k=s:k=h?void 0:!1,E.jsx(o8,{context:d,disabled:!m,modal:!h,openInteractionType:v,initialFocus:R,returnFocus:k,children:w})});process.env.NODE_ENV!=="production"&&(hP.displayName="ComboboxPopup");const dw=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(dw.displayName="ComboboxGroupContext");function mK(){const e=c.useContext(dw);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>.":Yr(18));return e}const gP=c.forwardRef(function(t,n){const{render:r,className:o,items:i,...s}=t,[a,l]=c.useState(),u=c.useMemo(()=>({labelId:a,setLabelId:l,items:i}),[a,l,i]),d=Wn("div",t,{ref:n,props:[{role:"group","aria-labelledby":a},s]}),f=E.jsx(dw.Provider,{value:u,children:d});return i?E.jsx(sK,{items:i,children:f}):f});process.env.NODE_ENV!=="production"&&(gP.displayName="ComboboxGroup");const vP=c.forwardRef(function(t,n){const{render:r,className:o,id:i,...s}=t,{setLabelId:a}=mK(),l=Lx(i);return We(()=>(a(l),()=>{a(void 0)}),[l,a]),Wn("div",t,{ref:n,props:[{id:l},s]})});process.env.NODE_ENV!=="production"&&(vP.displayName="ComboboxGroupLabel");const bP=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(bP.displayName="ComboboxItemContext");const yP=c.createContext(!1);process.env.NODE_ENV!=="production"&&(yP.displayName="ComboboxRowContext");function hK(){return c.useContext(yP)}const xP=c.memo(c.forwardRef(function(t,n){const{render:r,className:o,value:i=null,index:s,disabled:a=!1,nativeButton:l=!1,...u}=t,d=c.useRef(!1),f=c.useRef(null),m=tM({index:s,textRef:f,indexGuessBehavior:eM.GuessFromOrder}),p=Er(),v=hK(),{flatFilteredItems:g,hasItems:h}=os(),b=ue(p,de.open),y=ue(p,de.selectionMode),x=ue(p,de.readOnly),w=ue(p,de.virtualized),C=ue(p,de.isItemEqualToValue),R=y!=="none",k=s??(w?Df(g,i,C):m.index),S=m.index!==-1,P=ue(p,de.id),L=ue(p,de.isActive,k),_=ue(p,de.isSelected,i),O=ue(p,de.getItemProps),B=c.useRef(null),I=P!=null&&S?`${P}-${k}`:void 0,V=_&&R;We(()=>{if(!(S&&(w||s!=null)))return;const X=p.state.listRef.current;return X[k]=B.current,()=>{delete X[k]}},[S,w,k,s,p]),We(()=>{if(!S||h)return;const Q=p.state.valuesRef.current;return Q[k]=i,y!=="none"&&p.state.allValuesRef.current.push(i),()=>{delete Q[k]}},[S,h,k,i,p,y]),We(()=>{if(!b){d.current=!1;return}if(!S||h)return;const Q=p.state.selectedValue,X=Array.isArray(Q)?Q[Q.length-1]:Q;zs(i,X,C)&&p.set("selectedIndex",k)},[S,h,b,p,k,i,C]);const F={disabled:a,selected:V,highlighted:L},D=O({active:L,selected:V});D.id=void 0,D.onFocus=void 0;const{getButtonProps:T,buttonRef:q}=fm({disabled:a,focusableWhenDisabled:!0,native:l});function A(Q){function X(){p.state.handleSelection(Q,i)}p.state.submitOnItemClick?(dt.flushSync(X),p.state.requestSubmit()):X()}const ee={id:I,role:v?"gridcell":"option","aria-selected":R?V:void 0,tabIndex:void 0,onPointerDownCapture(Q){d.current=!0,Q.preventDefault()},onClick(Q){a||x||A(Q.nativeEvent)},onMouseUp(Q){const X=d.current;d.current=!1,!(a||x||Q.button!==0||X||!L)&&A(Q.nativeEvent)}},ie=Wn("div",t,{ref:[q,n,m.ref,B],state:F,props:[D,ee,u,T]}),Y=c.useMemo(()=>({selected:V,textRef:f}),[V,f]);return E.jsx(bP.Provider,{value:Y,children:ie})}));process.env.NODE_ENV!=="production"&&(xP.displayName="ComboboxItem");const wP=c.forwardRef(function(t,n){const{render:r,className:o,children:i,...s}=t,{filteredItems:a}=os(),l=Er(),u=a.length===0?i:null;return Wn("div",t,{ref:[n,l.state.emptyRef],props:[{children:u,role:"status","aria-live":"polite","aria-atomic":!0},s]})});process.env.NODE_ENV!=="production"&&(wP.displayName="ComboboxEmpty");const EP=c.forwardRef(function(t,n){const{className:r,render:o,orientation:i="horizontal",...s}=t;return Wn("div",t,{state:{orientation:i},ref:n,props:[{role:"separator","aria-orientation":i},s]})});process.env.NODE_ENV!=="production"&&(EP.displayName="Separator");function gK(e){const{multiple:t=!1,defaultValue:n,value:r,onValueChange:o,autoComplete:i,...s}=e;return E.jsx(nK,{...s,selectionMode:t?"multiple":"single",selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:o,formAutoComplete:i})}function vK(e){const{children:t,placeholder:n}=e,r=Er(),o=ue(r,de.itemToStringLabel),i=ue(r,de.selectedValue),s=ue(r,de.items),a=ue(r,de.selectionMode)==="multiple",l=ue(r,de.hasSelectedValue),u=!l&&n!=null&&t==null,d=ue(r,de.hasNullItemLabel,u);let f=null;return typeof t=="function"?f=t(i):t!=null?f=t:!l&&n!=null&&!d?f=n:a&&Array.isArray(i)?f=q9(i,s,o):f=ZM(i,s,o),E.jsx(c.Fragment,{children:f})}const CP=c.forwardRef(function(t,n){const{render:r,className:o,...i}=t,s=Er(),a=ue(s,de.open),l=ue(s,de.hasSelectionChips),[u,d]=c.useState(void 0);a&&u!==void 0&&d(void 0);const f=c.useRef([]),m=Wn("div",t,{ref:[n,s.state.chipsContainerRef],props:[l?{role:"toolbar"}:Hn,i]}),p=c.useMemo(()=>({highlightedChipIndex:u,setHighlightedChipIndex:d,chipsRef:f}),[u,d,f]);return E.jsx(iw.Provider,{value:p,children:E.jsx(BA,{elementsRef:f,children:m})})});process.env.NODE_ENV!=="production"&&(CP.displayName="ComboboxChips");const fw=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(fw.displayName="ComboboxChipContext");function bK(){const e=c.useContext(fw);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"useComboboxChipContext must be used within a ComboboxChip":Yr(17));return e}const kP=c.forwardRef(function(t,n){const{render:r,className:o,...i}=t,s=Er(),{setHighlightedChipIndex:a,chipsRef:l}=aP(),u=ue(s,de.disabled),d=ue(s,de.readOnly),f=ue(s,de.selectedValue),{ref:m,index:p}=tM();function v(y){let x=p;if(y.key==="ArrowLeft")y.preventDefault(),p>0?x=p-1:x=void 0;else if(y.key==="ArrowRight")y.preventDefault(),p<f.length-1?x=p+1:x=void 0;else if(y.key==="Backspace"||y.key==="Delete"){const w=p>=f.length-1?f.length-2:p;x=w>=0?w:void 0,$t(y),s.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),s.state.setSelectedValue(f.filter((C,R)=>R!==p),Je(kr,y.nativeEvent))}else y.key==="Enter"||y.key===" "?($t(y),x=void 0):y.key==="ArrowDown"||y.key==="ArrowUp"?($t(y),s.state.setOpen(!0,Je(Gl,y.nativeEvent)),x=void 0):y.key.length===1&&!y.ctrlKey&&!y.metaKey&&!y.altKey&&(x=void 0);return x}const h=Wn("div",t,{ref:[n,m],state:{disabled:u},props:[{tabIndex:-1,"aria-disabled":u||void 0,"aria-readonly":d||void 0,onKeyDown(y){if(u||d)return;const x=v(y);dt.flushSync(()=>{a(x)}),x===void 0?s.state.inputRef.current?.focus():l.current[x]?.focus()},onMouseDown(y){d||(y.preventDefault(),!u&&s.state.inputRef.current?.focus())}},i]}),b=c.useMemo(()=>({index:p}),[p]);return E.jsx(fw.Provider,{value:b,children:h})});process.env.NODE_ENV!=="production"&&(kP.displayName="ComboboxChip");const RP=c.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:s=!0,...a}=t,l=Er(),{index:u}=bK(),d=ue(l,de.disabled),f=ue(l,de.readOnly),m=ue(l,de.selectedValue),p=ue(l,de.isItemEqualToValue),v=d||i,{buttonRef:g,getButtonProps:h}=fm({native:s,disabled:v||f,focusableWhenDisabled:!0}),b={disabled:v};function y(C){const R=l.state.activeIndex;if(R==null)return;const k=Df(l.state.valuesRef.current,C,p);k!==-1&&R===k&&l.state.setIndices({activeIndex:null,type:l.state.keyboardActiveRef.current?"keyboard":"pointer"})}function x(C){const R=Je(zU,C.nativeEvent),k=m[u];return y(k),l.state.setSelectedValue(m.filter((S,P)=>P!==u),R),l.state.inputRef.current?.focus(),R}return Wn("button",t,{ref:[n,g],state:b,props:[{tabIndex:-1,onClick(C){if(v||f)return;x(C).isPropagationAllowed||C.stopPropagation()},onKeyDown(C){v||f||(C.key==="Enter"||C.key===" ")&&(x(C).isPropagationAllowed||$t(C))}},a,h]})});process.env.NODE_ENV!=="production"&&(RP.displayName="ComboboxChipRemove");var yK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],xm=yK.reduce((e,t)=>{const n=wA(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),xK="Label",SP=c.forwardRef((e,t)=>E.jsx(xm.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));SP.displayName=xK;var NP=SP;const wK=Ot(vn("body-sm-regular")),fc=({className:e,ref:t,...n})=>E.jsx(NP,{ref:t,className:fe(wK(),e),...n});fc.displayName=NP.displayName;var EK="Separator",aR="horizontal",CK=["horizontal","vertical"],OP=c.forwardRef((e,t)=>{const{decorative:n,orientation:r=aR,...o}=e,i=kK(r)?r:aR,a=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return E.jsx(xm.div,{"data-orientation":i,...a,...o,ref:t})});OP.displayName=EK;function kK(e){return CK.includes(e)}var IP=OP;const pw=({className:e,orientation:t="horizontal",decorative:n=!0,ref:r,...o})=>E.jsx(IP,{ref:r,decorative:n,orientation:t,className:fe("bg-delicate-border shrink-0",t==="horizontal"?"h-px w-full":"h-full w-px",e),...o});pw.displayName=IP.displayName;const RK=Ot("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"}}),SK="flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",NK="mb-3 font-medium data-[variant=legend]:text-base data-[variant=label]:text-sm",OK="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",IK="group/field-content flex flex-1 flex-col gap-2",AK=[`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`,
|
|
41
|
+
dark:has-data-[state=checked]:bg-primary/10`].join(" "),MK=[`text-primary-text flex w-fit items-center gap-2
|
|
42
|
+
group-data-[disabled=true]/field:opacity-50`,vn("body-sm-regular")].join(" "),PK=["text-sub-label-text group-has-data-[orientation=horizontal]/field:text-balance",vn("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(" "),_K="relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",TK="absolute inset-0 top-1/2",DK="bg-background text-muted-foreground relative mx-auto block w-fit px-2",LK="ml-4 flex list-disc flex-col gap-1",jK="text-error-text text-xs leading-[140%] font-normal tracking-normal";function wm({className:e,...t}){return E.jsx("fieldset",{"data-slot":"field-set",className:fe(SK,e),...t})}function VK({className:e,variant:t="legend",...n}){return E.jsx("legend",{"data-slot":"field-legend","data-variant":t,className:fe(NK,e),...n})}function Vc({className:e,...t}){return E.jsx("div",{"data-slot":"field-group",className:fe(OK,e),...t})}function Fc({className:e,orientation:t="vertical",...n}){return E.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:fe(RK({orientation:t}),e),...n})}function FK({className:e,...t}){return E.jsx("div",{"data-slot":"field-content",className:fe(IK,e),...t})}function $c({className:e,...t}){return E.jsx(fc,{"data-slot":"field-label",className:fe(AK,e),...t})}function $K({className:e,...t}){return E.jsx("div",{"data-slot":"field-label",className:fe(MK,e),...t})}function Em({className:e,...t}){return E.jsx("p",{"data-slot":"field-description",className:fe(PK,e),...t})}function zK({children:e,className:t,...n}){return E.jsxs("div",{"data-slot":"field-separator","data-content":!!e,className:fe(_K,t),...n,children:[E.jsx(pw,{className:TK}),e&&E.jsx("span",{className:DK,"data-slot":"field-separator-content",children:e})]})}function AP({className:e,children:t,errors:n,...r}){const o=ae.useMemo(()=>t||(n?n.length===1&&n[0]?.message?n[0].message:E.jsx("ul",{className:LK,children:n.map(i=>i?.message?E.jsx("li",{children:i.message},i.message):null)}):null),[t,n]);return o?E.jsx("div",{role:"alert","data-slot":"field-error",className:fe(jK,e),...r,children:o}):null}const BK=Ot(`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"}}),mw=({className:e,type:t="text",variant:n,sizeInput:r,ref:o,...i})=>E.jsx("input",{"data-slot":"input",type:t,className:fe(BK({variant:n,sizeInput:r}),e),ref:o,...i}),HK=[`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(" "),Cm=({className:e,ref:t,...n})=>E.jsx("textarea",{className:fe(HK,e),ref:t,...n});Cm.displayName="Textarea";const GK=Ot(`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"}}),WK=Ot("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 hw({className:e,...t}){return E.jsx("div",{"data-slot":"input-group",role:"group",className:fe(`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 gw({className:e,align:t="inline-start",...n}){return E.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:fe(GK({align:t}),e),onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}function MP({className:e,type:t="button",variant:n="primary",size:r="xs",...o}){return E.jsx(Qo,{type:t,"data-size":r,variant:n,className:fe(WK({size:r}),e),...o})}function UK({className:e,...t}){return E.jsx("span",{className:fe(`text-secondary-text flex items-center gap-2 text-sm [&_svg]:pointer-events-none
|
|
64
|
+
[&_svg:not([class*='size-'])]:size-4`,e),...t})}function vw({className:e,...t}){return E.jsx(mw,{"data-slot":"input-group-control",className:fe(`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 qK({className:e,...t}){return E.jsx(Cm,{"data-slot":"input-group-control",className:fe(`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 KK=`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`,YK=Ot("text-primary-text pointer-events-none transition-colors",{variants:{disabled:{true:"text-disabled-text",false:""}},defaultVariants:{disabled:!1}}),PP=`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`,XK="pointer-events-none",ZK=`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`,JK="cursor-pointer",QK="isolate z-50",e7=`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`,t7=`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`,n7="text-secondary-text px-4 py-2 text-xs",r7=`text-secondary-text hidden w-full justify-center py-2
|
|
89
|
+
text-center text-sm group-data-empty/combobox-content:flex`,o7="bg-delicate-border -mx-1 my-1 h-px",i7=Ot(`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,69 +94,387 @@ text-center text-sm group-data-empty/combobox-content:flex`,Cw="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}}),s7=`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}}),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=_e.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(
|
|
100
|
+
has-data-[slot=combobox-chip-remove]:pr-0`,a7=Ot(`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}}),km=c.createContext(null);function _P({children:e,...t}){const[n,r]=c.useState(null),o=c.useMemo(()=>({anchorElement:n,setAnchorElement:r}),[n]);return E.jsx(km,{value:o,children:E.jsx(gK,{...t,children:e})})}function TP({className:e,label:t,description:n,error:r,children:o,...i}){return E.jsxs(Fc,{className:e,...i,children:[t&&E.jsx($c,{children:t}),o,n&&E.jsx(Em,{children:n}),r&&E.jsx(AP,{children:r})]})}function Fb({...e}){return E.jsx(vK,{"data-slot":"combobox-value",...e})}function Lf({className:e,children:t,...n}){return E.jsxs(sP,{"data-slot":"combobox-trigger",className:fe(KK,e),...n,children:[t,E.jsx(ol,{type:"chevron",className:fe(YK({disabled:n.disabled})),size:"md"})]})}function l7({className:e,...t}){return E.jsx(lP,{"data-slot":"combobox-clear",className:fe(e),...t,render:E.jsx(MP,{variant:"link",size:"icon-xs",className:PP,children:E.jsx(Ax,{className:XK})})})}function c7({className:e,children:t,disabled:n=!1,showTrigger:r=!0,showClear:o=!1,...i}){const s=c.use(km),a=c.useCallback(l=>{s&&s.setAnchorElement(u=>u===l?u:l)},[s]);return E.jsxs(hw,{ref:a,className:fe(ZK,e),children:[E.jsx(lw,{render:E.jsx(vw,{disabled:n}),...i}),E.jsxs(gw,{align:"inline-end",className:JK,children:[r&&E.jsx(Lf,{}),o&&E.jsx(l7,{disabled:n})]}),t]})}function DP({className:e,side:t="bottom",sideOffset:n=8,align:r="start",alignOffset:o=0,anchor:i,...s}){const a=c.use(km),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 E.jsx(dP,{children:E.jsx(mP,{side:t,sideOffset:n,align:r,alignOffset:o,anchor:i??a?.anchorElement??l,className:QK,children:E.jsx(hP,{"data-slot":"combobox-content","data-chips":!!i,className:fe(e7,e),...s})})})}function LP({className:e,...t}){return E.jsx(uP,{"data-slot":"combobox-list",className:fe(e),...t})}function jP({className:e,children:t,...n}){return E.jsx(xP,{"data-slot":"combobox-item",className:fe(t7,e),...n,children:t})}function u7({className:e,...t}){return E.jsx(gP,{"data-slot":"combobox-group",className:fe(e),...t})}function d7({className:e,...t}){return E.jsx(vP,{"data-slot":"combobox-label",className:fe(n7,e),...t})}function f7({...e}){return E.jsx(cP,{"data-slot":"combobox-collection",...e})}function VP({className:e,...t}){return E.jsx(wP,{"data-slot":"combobox-empty",className:fe(r7,e),...t})}function p7({className:e,...t}){return E.jsx(EP,{"data-slot":"combobox-separator",className:fe(o7,e),...t})}function $b({className:e,disabled:t=!1,...n}){const r=c.use(km),o=c.useCallback(i=>{r&&r.setAnchorElement(s=>s===i?s:i)},[r]);return E.jsx(CP,{ref:o,"data-slot":"combobox-chips",className:fe(i7({disabled:t}),e),...n})}function zb({className:e,children:t,showRemove:n=!0,...r}){return E.jsxs(kP,{"data-slot":"combobox-chip",className:fe(s7,e),...r,children:[t,n&&E.jsx(RP,{render:E.jsx(Qo,{className:PP,variant:"ghost",children:E.jsx(Ax,{className:"text-secondary-text"})})})]})}function Bb({className:e,...t}){return E.jsx(lw,{"data-slot":"combobox-chip-input",className:fe(a7({disabled:t.disabled}),e),...t})}var m7=c[" useId ".trim().toString()]||(()=>{}),h7=0;function $a(e){const[t,n]=c.useState(m7());return $i(()=>{n(r=>r??String(h7++))},[e]),t?`radix-${t}`:""}function Bs(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}function g7(e,t=globalThis?.document){const n=Bs(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 v7="DismissableLayer",Hb="dismissableLayer.update",b7="dismissableLayer.pointerDownOutside",y7="dismissableLayer.focusOutside",lR,FP=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bw=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,u=c.useContext(FP),[d,f]=c.useState(null),m=d?.ownerDocument??globalThis?.document,[,p]=c.useState({}),v=rn(t,k=>f(k)),g=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(h),y=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,w=y>=b,C=E7(k=>{const S=k.target,P=[...u.branches].some(L=>L.contains(S));!w||P||(o?.(k),s?.(k),k.defaultPrevented||a?.())},m),R=C7(k=>{const S=k.target;[...u.branches].some(L=>L.contains(S))||(i?.(k),s?.(k),k.defaultPrevented||a?.())},m);return g7(k=>{y===u.layers.size-1&&(r?.(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},m),c.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(lR=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),cR(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=lR)}},[d,m,n,u]),c.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),cR())},[d,u]),c.useEffect(()=>{const k=()=>p({});return document.addEventListener(Hb,k),()=>document.removeEventListener(Hb,k)},[]),E.jsx(It.div,{...l,ref:v,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:Ct(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Ct(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Ct(e.onPointerDownCapture,C.onPointerDownCapture)})});bw.displayName=v7;var x7="DismissableLayerBranch",w7=c.forwardRef((e,t)=>{const n=c.useContext(FP),r=c.useRef(null),o=rn(t,r);return c.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),E.jsx(It.div,{...e,ref:o})});w7.displayName=x7;function E7(e,t=globalThis?.document){const n=Bs(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){$P(b7,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},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function C7(e,t=globalThis?.document){const n=Bs(e),r=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!r.current&&$P(y7,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function cR(){const e=new CustomEvent(Hb);document.dispatchEvent(e)}function $P(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?YW(o,i):o.dispatchEvent(i)}var Ag="focusScope.autoFocusOnMount",Mg="focusScope.autoFocusOnUnmount",uR={bubbles:!1,cancelable:!0},k7="FocusScope",zP=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=c.useState(null),u=Bs(o),d=Bs(i),f=c.useRef(null),m=rn(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(x){if(p.paused||!a)return;const w=x.target;a.contains(w)?f.current=w:xi(f.current,{select:!0})},h=function(x){if(p.paused||!a)return;const w=x.relatedTarget;w!==null&&(a.contains(w)||xi(f.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const C of x)C.removedNodes.length>0&&xi(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",h);const y=new MutationObserver(b);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",h),y.disconnect()}}},[r,a,p.paused]),c.useEffect(()=>{if(a){fR.add(p);const g=document.activeElement;if(!a.contains(g)){const b=new CustomEvent(Ag,uR);a.addEventListener(Ag,u),a.dispatchEvent(b),b.defaultPrevented||(R7(A7(BP(a)),{select:!0}),document.activeElement===g&&xi(a))}return()=>{a.removeEventListener(Ag,u),setTimeout(()=>{const b=new CustomEvent(Mg,uR);a.addEventListener(Mg,d),a.dispatchEvent(b),b.defaultPrevented||xi(g??document.body,{select:!0}),a.removeEventListener(Mg,d),fR.remove(p)},0)}}},[a,u,d,p]);const v=c.useCallback(g=>{if(!n&&!r||p.paused)return;const h=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(h&&b){const y=g.currentTarget,[x,w]=S7(y);x&&w?!g.shiftKey&&b===w?(g.preventDefault(),n&&xi(x,{select:!0})):g.shiftKey&&b===x&&(g.preventDefault(),n&&xi(w,{select:!0})):b===y&&g.preventDefault()}},[n,r,p.paused]);return E.jsx(It.div,{tabIndex:-1,...s,ref:m,onKeyDown:v})});zP.displayName=k7;function R7(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(xi(r,{select:t}),document.activeElement!==n)return}function S7(e){const t=BP(e),n=dR(t,e),r=dR(t.reverse(),e);return[n,r]}function BP(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 dR(e,t){for(const n of e)if(!N7(n,{upTo:t}))return n}function N7(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 O7(e){return e instanceof HTMLInputElement&&"select"in e}function xi(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&O7(e)&&t&&e.select()}}var fR=I7();function I7(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=pR(e,t),e.unshift(t)},remove(t){e=pR(e,t),e[0]?.resume()}}}function pR(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function A7(e){return e.filter(t=>t.tagName!=="A")}var M7="Portal",yw=c.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=c.useState(!1);$i(()=>i(!0),[]);const s=n||o&&globalThis?.document?.body;return s?xl.createPortal(E.jsx(It.div,{...r,ref:t}),s):null});yw.displayName=M7;var Pg=0;function P7(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??mR()),document.body.insertAdjacentElement("beforeend",e[1]??mR()),Pg++,()=>{Pg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Pg--}},[])}function mR(){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 ao=function(){return ao=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ao.apply(this,arguments)};function HP(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 _7(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Xd="right-scroll-bar-position",Zd="width-before-scroll-bar",T7="with-scroll-bars-hidden",D7="--removed-body-scroll-bar-size";function _g(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function L7(e,t){var n=ae.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 j7=typeof window<"u"?c.useLayoutEffect:c.useEffect,hR=new WeakMap;function V7(e,t){var n=L7(null,function(r){return e.forEach(function(o){return _g(o,r)})});return j7(function(){var r=hR.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||_g(a,null)}),i.forEach(function(a){o.has(a)||_g(a,s)})}hR.set(n,e)},[e]),n}function F7(e){return e}function $7(e,t){t===void 0&&(t=F7);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(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var l=function(){var d=s;s=[],d.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),n}}}};return o}function z7(e){e===void 0&&(e={});var t=$7(null);return t.options=ao({async:!0,ssr:!1},e),t}var GP=function(e){var t=e.sideCar,n=HP(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,ao({},n))};GP.isSideCarExport=!0;function B7(e,t){return e.useMedium(t),GP}var WP=z7(),Tg=function(){},Rm=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Tg,onWheelCapture:Tg,onTouchMoveCapture:Tg}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,p=e.noRelative,v=e.noIsolation,g=e.inert,h=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,x=e.gapMode,w=HP(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,R=V7([n,t]),k=ao(ao({},w),o);return c.createElement(c.Fragment,null,d&&c.createElement(C,{sideCar:WP,removeScrollBar:u,shards:f,noRelative:p,noIsolation:v,inert:g,setCallbacks:i,allowPinchZoom:!!h,lockRef:n,gapMode:x}),s?c.cloneElement(c.Children.only(a),ao(ao({},k),{ref:R})):c.createElement(y,ao({},k,{className:l,ref:R}),a))});Rm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Rm.classNames={fullWidth:Zd,zeroRight:Xd};var H7=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function G7(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=H7();return t&&e.setAttribute("nonce",t),e}function W7(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function U7(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var q7=function(){var e=0,t=null;return{add:function(n){e==0&&(t=G7())&&(W7(t,n),U7(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},K7=function(){var e=q7();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},UP=function(){var e=K7(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Y7={left:0,top:0,right:0,gap:0},Dg=function(e){return parseInt(e||"",10)||0},X7=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[Dg(n),Dg(r),Dg(o)]},Z7=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Y7;var t=X7(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])}},J7=UP(),za="data-scroll-locked",Q7=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
102
|
+
.`.concat(T7,` {
|
|
103
103
|
overflow: hidden `).concat(r,`;
|
|
104
104
|
padding-right: `).concat(a,"px ").concat(r,`;
|
|
105
105
|
}
|
|
106
|
-
body[`).concat(
|
|
106
|
+
body[`).concat(za,`] {
|
|
107
107
|
overflow: hidden `).concat(r,`;
|
|
108
108
|
overscroll-behavior: contain;
|
|
109
109
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
110
110
|
padding-left: `.concat(o,`px;
|
|
111
|
-
padding-top: `).concat(
|
|
112
|
-
padding-right: `).concat(
|
|
111
|
+
padding-top: `).concat(i,`px;
|
|
112
|
+
padding-right: `).concat(s,`px;
|
|
113
113
|
margin-left:0;
|
|
114
114
|
margin-top:0;
|
|
115
115
|
margin-right: `).concat(a,"px ").concat(r,`;
|
|
116
116
|
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
.`).concat(
|
|
119
|
+
.`).concat(Xd,` {
|
|
120
120
|
right: `).concat(a,"px ").concat(r,`;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
.`).concat(
|
|
123
|
+
.`).concat(Zd,` {
|
|
124
124
|
margin-right: `).concat(a,"px ").concat(r,`;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
.`).concat(
|
|
127
|
+
.`).concat(Xd," .").concat(Xd,` {
|
|
128
128
|
right: 0 `).concat(r,`;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
.`).concat(
|
|
131
|
+
.`).concat(Zd," .").concat(Zd,` {
|
|
132
132
|
margin-right: 0 `).concat(r,`;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
body[`).concat(
|
|
136
|
-
`).concat(
|
|
135
|
+
body[`).concat(za,`] {
|
|
136
|
+
`).concat(D7,": ").concat(a,`px;
|
|
137
137
|
}
|
|
138
|
-
`)},
|
|
138
|
+
`)},gR=function(){var e=parseInt(document.body.getAttribute(za)||"0",10);return isFinite(e)?e:0},eY=function(){c.useEffect(function(){return document.body.setAttribute(za,(gR()+1).toString()),function(){var e=gR()-1;e<=0?document.body.removeAttribute(za):document.body.setAttribute(za,e.toString())}},[])},tY=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;eY();var i=c.useMemo(function(){return Z7(o)},[o]);return c.createElement(J7,{styles:Q7(i,!t,o,n?"":"!important")})},Gb=!1;if(typeof window<"u")try{var Su=Object.defineProperty({},"passive",{get:function(){return Gb=!0,!0}});window.addEventListener("test",Su,Su),window.removeEventListener("test",Su,Su)}catch{Gb=!1}var ya=Gb?{passive:!1}:!1,nY=function(e){return e.tagName==="TEXTAREA"},qP=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!nY(e)&&n[t]==="visible")},rY=function(e){return qP(e,"overflowY")},oY=function(e){return qP(e,"overflowX")},vR=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=KP(e,r);if(o){var i=YP(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},iY=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},sY=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},KP=function(e,t){return e==="v"?rY(t):oY(t)},YP=function(e,t){return e==="v"?iY(t):sY(t)},aY=function(e,t){return e==="h"&&t==="rtl"?-1:1},lY=function(e,t,n,r,o){var i=aY(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),u=!1,d=s>0,f=0,m=0;do{if(!a)break;var p=YP(e,a),v=p[0],g=p[1],h=p[2],b=g-h-i*v;(v||b)&&KP(e,a)&&(f+=b,m+=v);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&Math.abs(f)<1||!d&&Math.abs(m)<1)&&(u=!0),u},Nu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},bR=function(e){return[e.deltaX,e.deltaY]},yR=function(e){return e&&"current"in e?e.current:e},cY=function(e,t){return e[0]===t[0]&&e[1]===t[1]},uY=function(e){return`
|
|
139
139
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
140
140
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
141
|
-
`)},
|
|
141
|
+
`)},dY=0,xa=[];function fY(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(dY++)[0],i=c.useState(UP)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=_7([e.lockRef.current],(e.shards||[]).map(yR),!0).filter(Boolean);return g.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(g,h){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var b=Nu(g),y=n.current,x="deltaX"in g?g.deltaX:y[0]-b[0],w="deltaY"in g?g.deltaY:y[1]-b[1],C,R=g.target,k=Math.abs(x)>Math.abs(w)?"h":"v";if("touches"in g&&k==="h"&&R.type==="range")return!1;var S=window.getSelection(),P=S&&S.anchorNode,L=P?P===R||P.contains(R):!1;if(L)return!1;var _=vR(k,R);if(!_)return!0;if(_?C=k:(C=k==="v"?"h":"v",_=vR(k,R)),!_)return!1;if(!r.current&&"changedTouches"in g&&(x||w)&&(r.current=C),!C)return!0;var O=r.current||C;return lY(O,h,g,O==="h"?x:w)},[]),l=c.useCallback(function(g){var h=g;if(!(!xa.length||xa[xa.length-1]!==i)){var b="deltaY"in h?bR(h):Nu(h),y=t.current.filter(function(C){return C.name===h.type&&(C.target===h.target||h.target===C.shadowParent)&&cY(C.delta,b)})[0];if(y&&y.should){h.cancelable&&h.preventDefault();return}if(!y){var x=(s.current.shards||[]).map(yR).filter(Boolean).filter(function(C){return C.contains(h.target)}),w=x.length>0?a(h,x[0]):!s.current.noIsolation;w&&h.cancelable&&h.preventDefault()}}},[]),u=c.useCallback(function(g,h,b,y){var x={name:g,delta:h,target:b,should:y,shadowParent:pY(b)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(w){return w!==x})},1)},[]),d=c.useCallback(function(g){n.current=Nu(g),r.current=void 0},[]),f=c.useCallback(function(g){u(g.type,bR(g),g.target,a(g,e.lockRef.current))},[]),m=c.useCallback(function(g){u(g.type,Nu(g),g.target,a(g,e.lockRef.current))},[]);c.useEffect(function(){return xa.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,ya),document.addEventListener("touchmove",l,ya),document.addEventListener("touchstart",d,ya),function(){xa=xa.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,ya),document.removeEventListener("touchmove",l,ya),document.removeEventListener("touchstart",d,ya)}},[]);var p=e.removeScrollBar,v=e.inert;return c.createElement(c.Fragment,null,v?c.createElement(i,{styles:uY(o)}):null,p?c.createElement(tY,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pY(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const mY=B7(WP,fY);var XP=c.forwardRef(function(e,t){return c.createElement(Rm,ao({},e,{ref:t,sideCar:mY}))});XP.classNames=Rm.classNames;var hY=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wa=new WeakMap,Ou=new WeakMap,Iu={},Lg=0,ZP=function(e){return e&&(e.host||ZP(e.parentNode))},gY=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ZP(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})},vY=function(e,t,n,r){var o=gY(t,Array.isArray(e)?e:[e]);Iu[n]||(Iu[n]=new WeakMap);var i=Iu[n],s=[],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(m){if(a.has(m))d(m);else try{var p=m.getAttribute(r),v=p!==null&&p!=="false",g=(wa.get(m)||0)+1,h=(i.get(m)||0)+1;wa.set(m,g),i.set(m,h),s.push(m),g===1&&v&&Ou.set(m,!0),h===1&&m.setAttribute(n,"true"),v||m.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return d(t),a.clear(),Lg++,function(){s.forEach(function(f){var m=wa.get(f)-1,p=i.get(f)-1;wa.set(f,m),i.set(f,p),m||(Ou.has(f)||f.removeAttribute(r),Ou.delete(f)),p||f.removeAttribute(n)}),Lg--,Lg||(wa=new WeakMap,wa=new WeakMap,Ou=new WeakMap,Iu={})}},bY=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=hY(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),vY(r,o,n,"aria-hidden")):function(){return null}},Sm="Dialog",[JP]=No(Sm),[yY,Xr]=JP(Sm),QP=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=c.useRef(null),l=c.useRef(null),[u,d]=ra({prop:r,defaultProp:o??!1,onChange:i,caller:Sm});return E.jsx(yY,{scope:t,triggerRef:a,contentRef:l,contentId:$a(),titleId:$a(),descriptionId:$a(),open:u,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(f=>!f),[d]),modal:s,children:n})};QP.displayName=Sm;var e_="DialogTrigger",t_=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Xr(e_,n),i=rn(t,o.triggerRef);return E.jsx(It.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ew(o.open),...r,ref:i,onClick:Ct(e.onClick,o.onOpenToggle)})});t_.displayName=e_;var xw="DialogPortal",[xY,n_]=JP(xw,{forceMount:void 0}),r_=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Xr(xw,t);return E.jsx(xY,{scope:t,forceMount:n,children:c.Children.map(r,s=>E.jsx(ni,{present:n||i.open,children:E.jsx(yw,{asChild:!0,container:o,children:s})}))})};r_.displayName=xw;var jf="DialogOverlay",o_=c.forwardRef((e,t)=>{const n=n_(jf,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Xr(jf,e.__scopeDialog);return i.modal?E.jsx(ni,{present:r||i.open,children:E.jsx(EY,{...o,ref:t})}):null});o_.displayName=jf;var wY=Ef("DialogOverlay.RemoveScroll"),EY=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Xr(jf,n);return E.jsx(XP,{as:wY,allowPinchZoom:!0,shards:[o.contentRef],children:E.jsx(It.div,{"data-state":Ew(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Hs="DialogContent",i_=c.forwardRef((e,t)=>{const n=n_(Hs,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Xr(Hs,e.__scopeDialog);return E.jsx(ni,{present:r||i.open,children:i.modal?E.jsx(CY,{...o,ref:t}):E.jsx(kY,{...o,ref:t})})});i_.displayName=Hs;var CY=c.forwardRef((e,t)=>{const n=Xr(Hs,e.__scopeDialog),r=c.useRef(null),o=rn(t,n.contentRef,r);return c.useEffect(()=>{const i=r.current;if(i)return bY(i)},[]),E.jsx(s_,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ct(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ct(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:Ct(e.onFocusOutside,i=>i.preventDefault())})}),kY=c.forwardRef((e,t)=>{const n=Xr(Hs,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return E.jsx(s_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;n.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),s_=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=Xr(Hs,n),l=c.useRef(null),u=rn(t,l);return P7(),E.jsxs(E.Fragment,{children:[E.jsx(zP,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:E.jsx(bw,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Ew(a.open),...s,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),E.jsxs(E.Fragment,{children:[E.jsx(RY,{titleId:a.titleId}),E.jsx(NY,{contentRef:l,descriptionId:a.descriptionId})]})]})}),ww="DialogTitle",a_=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Xr(ww,n);return E.jsx(It.h2,{id:o.titleId,...r,ref:t})});a_.displayName=ww;var l_="DialogDescription",c_=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Xr(l_,n);return E.jsx(It.p,{id:o.descriptionId,...r,ref:t})});c_.displayName=l_;var u_="DialogClose",d_=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Xr(u_,n);return E.jsx(It.button,{type:"button",...r,ref:t,onClick:Ct(e.onClick,()=>o.onOpenChange(!1))})});d_.displayName=u_;function Ew(e){return e?"open":"closed"}var f_="DialogTitleWarning",[FPe,p_]=DW(f_,{contentName:Hs,titleName:ww,docsSlug:"dialog"}),RY=({titleId:e})=>{const t=p_(f_),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},SY="DialogDescriptionWarning",NY=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${p_(SY).contentName}}.`;return c.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},OY=QP,IY=t_,AY=r_,m_=o_,h_=i_,g_=a_,v_=c_,b_=d_;const MY=["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"],PY=["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%]"],_Y=["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"],TY=["flex flex-col gap-1.5 pr-10 text-left"],DY=["flex flex-col-reverse sm:flex-row sm:justify-end gap-4 [&>*]:flex-1"],LY=["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"],jY=["tracking-normal text-sm font-normal text-secondary-text"],y_=OY,VY=IY,x_=AY,FY=b_,Cw=({className:e,...t})=>E.jsx(m_,{className:fe(...MY,e),...t});Cw.displayName=m_.displayName;const kw=({className:e,children:t,showCloseButton:n=!0,...r})=>E.jsxs(x_,{children:[E.jsx(Cw,{}),E.jsxs(h_,{className:fe(...PY,e),...r,children:[t,n&&E.jsxs(b_,{className:fe(..._Y),children:[E.jsx(ol,{type:"close",viewBox:"3.2 3.2 17.1 17.1"}),E.jsx("span",{className:"sr-only",children:"Close"})]})]})]});kw.displayName=h_.displayName;const Rw=({className:e,...t})=>E.jsx("div",{className:fe(...TY,e),...t});Rw.displayName="DialogHeader";const Sw=({className:e,...t})=>E.jsx("div",{className:fe(...DY,e),...t});Sw.displayName="DialogFooter";const Nw=({className:e,...t})=>E.jsx(g_,{className:fe(...LY,e),...t});Nw.displayName=g_.displayName;const w_=({className:e,...t})=>E.jsx(v_,{className:fe(...jY,e),...t});w_.displayName=v_.displayName;const $Y=Ot(["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}}),zY=vn("body-sm-medium"),E_=({icon:e,label:t,badge:n,active:r=!1,collapsed:o=!1,disabled:i=!1,onAction:s,className:a,...l})=>{const u=fe($Y({active:r,collapsed:o}),i&&"pointer-events-none opacity-50",a),d=E.jsxs(E.Fragment,{children:[E.jsx("span",{className:"shrink-0 text-inherit [&_svg]:size-5 [&_svg]:shrink-0",children:e}),!o&&t&&E.jsx("span",{className:zY,children:t}),!o&&n&&E.jsx("span",{className:"ml-auto shrink-0",children:n})]});if("href"in l&&typeof l.href=="string"){const{href:p,rel:v,target:g,...h}=l,b=g==="_blank"?[v,"noopener","noreferrer"].filter(Boolean).join(" "):v;return E.jsx("a",{href:p,target:g,rel:b,"aria-disabled":i||void 0,tabIndex:i?-1:void 0,className:u,onClick:y=>{if(i){y.preventDefault();return}s?.()},...h,children:d})}const{type:f="button",...m}=l;return E.jsx("button",{type:f,disabled:i,className:u,onClick:()=>s?.(),...m,children:d})},BY=Ot("px-2.5 py-3",{variants:{divider:{true:"",false:""}},defaultVariants:{divider:!1}}),HY=[vn("body-xs-medium"),"mb-1 px-2 text-secondary-text uppercase"].join(" "),C_=({title:e,divider:t=!1,collapsed:n=!1,className:r,children:o,...i})=>E.jsxs("section",{className:fe(BY({divider:t}),r),...i,children:[!n&&e&&E.jsx("p",{className:HY,children:e}),E.jsx("div",{className:"space-y-1",children:o})]}),Ow=({className:e,...t})=>E.jsx("nav",{role:"navigation","aria-label":"pagination",className:fe("mx-auto flex w-full justify-center",e),...t});Ow.displayName="Pagination";const Iw=({className:e,ref:t,...n})=>E.jsx("ul",{ref:t,className:fe("flex flex-row items-center gap-1",e),...n});Iw.displayName="PaginationContent";const La=({className:e,ref:t,...n})=>E.jsx("li",{ref:t,className:fe("",e),...n});La.displayName="PaginationItem";const zc=({className:e,isActive:t,size:n=null,...r})=>E.jsx("a",{"aria-current":t?"page":void 0,className:fe(Sx({size:n}),e),...r});zc.displayName="PaginationLink";const k_=({className:e,...t})=>E.jsxs(zc,{"aria-label":"Go to previous page",size:"md",className:fe("gap-1 pl-2.5",e),...t,children:[E.jsx(FA,{className:"h-4 w-4"}),E.jsx("span",{children:"Previous"})]});k_.displayName="PaginationPrevious";const R_=({className:e,...t})=>E.jsxs(zc,{"aria-label":"Go to next page",size:"md",className:fe("gap-1 pr-2.5",e),...t,children:[E.jsx("span",{children:"Next"}),E.jsx($A,{className:"h-4 w-4"})]});R_.displayName="PaginationNext";const S_=({className:e,...t})=>E.jsxs("span",{"aria-hidden":!0,className:fe("flex h-9 w-9 items-center justify-center",e),...t,children:[E.jsx(zA,{className:"h-4 w-4"}),E.jsx("span",{className:"sr-only",children:"More pages"})]});S_.displayName="PaginationEllipsis";function GY(e,t=[]){let n=[];function r(i,s){const a=c.createContext(s);a.displayName=i+"Context";const l=n.length;n=[...n,s];const u=f=>{const{scope:m,children:p,...v}=f,g=m?.[e]?.[l]||a,h=c.useMemo(()=>v,Object.values(v));return E.jsx(g.Provider,{value:h,children:p})};u.displayName=i+"Provider";function d(f,m){const p=m?.[e]?.[l]||a,v=c.useContext(p);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(s=>c.createContext(s));return function(a){const l=a?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,WY(o,...t)]}function WY(...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(i){const s=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(i)[`__scope${u}`];return{...a,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var Aw="Progress",Mw=100,[UY]=GY(Aw),[qY,KY]=UY(Aw),N_=c.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=YY,...s}=e;(o||o===0)&&!xR(o)&&console.error(XY(`${o}`,"Progress"));const a=xR(o)?o:Mw;r!==null&&!wR(r,a)&&console.error(ZY(`${r}`,"Progress"));const l=wR(r,a)?r:null,u=Vf(l)?i(l,a):void 0;return E.jsx(qY,{scope:n,value:l,max:a,children:E.jsx(xm.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Vf(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":A_(l,a),"data-value":l??void 0,"data-max":a,...s,ref:t})})});N_.displayName=Aw;var O_="ProgressIndicator",I_=c.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=KY(O_,n);return E.jsx(xm.div,{"data-state":A_(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});I_.displayName=O_;function YY(e,t){return`${Math.round(e/t*100)}%`}function A_(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Vf(e){return typeof e=="number"}function xR(e){return Vf(e)&&!isNaN(e)&&e>0}function wR(e,t){return Vf(e)&&!isNaN(e)&&e<=t&&e>=0}function XY(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Mw}\`.`}function ZY(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 ${Mw} if no \`max\` prop is set)
|
|
149
149
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
150
150
|
|
|
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=_e.useRef(null),C=_e.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=_e.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=_e.forwardRef((g,m)=>{const{scope:y,children:v,...C}=g,w=_e.useRef(null),R=ze(m,w),k=s(d,y);return _e.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 _e.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});
|
|
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});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
|
|
151
|
+
Defaulting to \`null\`.`}var M_=N_,JY=I_;const P_=({className:e,value:t=0,max:n=100,ref:r,...o})=>{const i=Math.min(n,Math.max(0,Number(t))),s=i/n*100,a=s>=100,l=`${Math.round(s)}%`;return E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsx(M_,{ref:r,value:i,max:n,className:fe("bg-primary-inverse-bg/20 relative h-1.5 w-full overflow-hidden rounded-full",e),...o,children:E.jsx(JY,{className:fe("h-full w-full flex-1 rounded-[0.75rem] transition-all",a?"bg-success-text":"bg-primary-inverse-bg"),style:{transform:`translateX(-${n-s}%)`}})}),E.jsx("p",{className:fe("text-center",vn("body-xs-regular"),a?"text-success-text":"text-primary-text"),children:l})]})};P_.displayName=M_.displayName;function QY(e){const t=e+"CollectionProvider",[n,r]=No(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:h,children:b}=g,y=ae.useRef(null),x=ae.useRef(new Map).current;return E.jsx(o,{scope:h,itemMap:x,collectionRef:y,children:b})};s.displayName=t;const a=e+"CollectionSlot",l=Ef(a),u=ae.forwardRef((g,h)=>{const{scope:b,children:y}=g,x=i(a,b),w=rn(h,x.collectionRef);return E.jsx(l,{ref:w,children:y})});u.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",m=Ef(d),p=ae.forwardRef((g,h)=>{const{scope:b,children:y,...x}=g,w=ae.useRef(null),C=rn(h,w),R=i(d,b);return ae.useEffect(()=>(R.itemMap.set(w,{ref:w,...x}),()=>{R.itemMap.delete(w)})),E.jsx(m,{[f]:"",ref:C,children:y})});p.displayName=d;function v(g){const h=i(e+"CollectionConsumer",g);return ae.useCallback(()=>{const y=h.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((R,k)=>x.indexOf(R.ref.current)-x.indexOf(k.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},v,r]}var eX=c.createContext(void 0);function Pw(e){const t=c.useContext(eX);return e||t||"ltr"}var jg="rovingFocusGroup.onEntryFocus",tX={bubbles:!1,cancelable:!0},Bc="RovingFocusGroup",[Wb,__,nX]=QY(Bc),[rX,Nm]=No(Bc,[nX]),[oX,iX]=rX(Bc),T_=c.forwardRef((e,t)=>E.jsx(Wb.Provider,{scope:e.__scopeRovingFocusGroup,children:E.jsx(Wb.Slot,{scope:e.__scopeRovingFocusGroup,children:E.jsx(sX,{...e,ref:t})})}));T_.displayName=Bc;var sX=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,m=c.useRef(null),p=rn(t,m),v=Pw(i),[g,h]=ra({prop:s,defaultProp:a??null,onChange:l,caller:Bc}),[b,y]=c.useState(!1),x=Bs(u),w=__(n),C=c.useRef(!1),[R,k]=c.useState(0);return c.useEffect(()=>{const S=m.current;if(S)return S.addEventListener(jg,x),()=>S.removeEventListener(jg,x)},[x]),E.jsx(oX,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:g,onItemFocus:c.useCallback(S=>h(S),[h]),onItemShiftTab:c.useCallback(()=>y(!0),[]),onFocusableItemAdd:c.useCallback(()=>k(S=>S+1),[]),onFocusableItemRemove:c.useCallback(()=>k(S=>S-1),[]),children:E.jsx(It.div,{tabIndex:b||R===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:Ct(e.onMouseDown,()=>{C.current=!0}),onFocus:Ct(e.onFocus,S=>{const P=!C.current;if(S.target===S.currentTarget&&P&&!b){const L=new CustomEvent(jg,tX);if(S.currentTarget.dispatchEvent(L),!L.defaultPrevented){const _=w().filter(F=>F.focusable),O=_.find(F=>F.active),B=_.find(F=>F.id===g),V=[O,B,..._].filter(Boolean).map(F=>F.ref.current);j_(V,d)}}C.current=!1}),onBlur:Ct(e.onBlur,()=>y(!1))})})}),D_="RovingFocusGroupItem",L_=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:s,...a}=e,l=$a(),u=i||l,d=iX(D_,n),f=d.currentTabStopId===u,m=__(n),{onFocusableItemAdd:p,onFocusableItemRemove:v,currentTabStopId:g}=d;return c.useEffect(()=>{if(r)return p(),()=>v()},[r,p,v]),E.jsx(Wb.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:E.jsx(It.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:Ct(e.onMouseDown,h=>{r?d.onItemFocus(u):h.preventDefault()}),onFocus:Ct(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:Ct(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){d.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const b=cX(h,d.orientation,d.dir);if(b!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let x=m().filter(w=>w.focusable).map(w=>w.ref.current);if(b==="last")x.reverse();else if(b==="prev"||b==="next"){b==="prev"&&x.reverse();const w=x.indexOf(h.currentTarget);x=d.loop?uX(x,w+1):x.slice(w+1)}setTimeout(()=>j_(x))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:g!=null}):s})})});L_.displayName=D_;var aX={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function lX(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function cX(e,t,n){const r=lX(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return aX[r]}function j_(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function uX(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var V_=T_,F_=L_,_w="Radio",[dX,$_]=No(_w),[fX,pX]=dX(_w),z_=c.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:s,value:a="on",onCheck:l,form:u,...d}=e,[f,m]=c.useState(null),p=rn(t,h=>m(h)),v=c.useRef(!1),g=f?u||!!f.closest("form"):!0;return E.jsxs(fX,{scope:n,checked:o,disabled:s,children:[E.jsx(It.button,{type:"button",role:"radio","aria-checked":o,"data-state":W_(o),"data-disabled":s?"":void 0,disabled:s,value:a,...d,ref:p,onClick:Ct(e.onClick,h=>{o||l?.(),g&&(v.current=h.isPropagationStopped(),v.current||h.stopPropagation())})}),g&&E.jsx(G_,{control:f,bubbles:!v.current,name:r,value:a,checked:o,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});z_.displayName=_w;var B_="RadioIndicator",H_=c.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=pX(B_,n);return E.jsx(ni,{present:r||i.checked,children:E.jsx(It.span,{"data-state":W_(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});H_.displayName=B_;var mX="RadioBubbleInput",G_=c.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const s=c.useRef(null),a=rn(s,i),l=Nx(n),u=im(t);return c.useEffect(()=>{const d=s.current;if(!d)return;const f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&p){const v=new Event("click",{bubbles:r});p.call(d,n),d.dispatchEvent(v)}},[l,n,r]),E.jsx(It.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}})});G_.displayName=mX;function W_(e){return e?"checked":"unchecked"}var hX=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Om="RadioGroup",[gX]=No(Om,[Nm,$_]),U_=Nm(),q_=$_(),[vX,bX]=gX(Om),K_=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:s=!1,disabled:a=!1,orientation:l,dir:u,loop:d=!0,onValueChange:f,...m}=e,p=U_(n),v=Pw(u),[g,h]=ra({prop:i,defaultProp:o??null,onChange:f,caller:Om});return E.jsx(vX,{scope:n,name:r,required:s,disabled:a,value:g,onValueChange:h,children:E.jsx(V_,{asChild:!0,...p,orientation:l,dir:v,loop:d,children:E.jsx(It.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":a?"":void 0,dir:v,...m,ref:t})})})});K_.displayName=Om;var Y_="RadioGroupItem",X_=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=bX(Y_,n),s=i.disabled||r,a=U_(n),l=q_(n),u=c.useRef(null),d=rn(t,u),f=i.value===o.value,m=c.useRef(!1);return c.useEffect(()=>{const p=g=>{hX.includes(g.key)&&(m.current=!0)},v=()=>m.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",v)}},[]),E.jsx(F_,{asChild:!0,...a,focusable:!s,active:f,children:E.jsx(z_,{disabled:s,required:i.required,checked:f,...l,...o,name:i.name,ref:d,onCheck:()=>i.onValueChange(o.value),onKeyDown:Ct(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:Ct(o.onFocus,()=>{m.current&&u.current?.click()})})})});X_.displayName=Y_;var yX="RadioGroupIndicator",Z_=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=q_(n);return E.jsx(H_,{...o,...r,ref:t})});Z_.displayName=yX;var J_=K_,Q_=X_,xX=Z_;const wX=["grid gap-2"],EX=["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"],CX=["flex items-center justify-center"],kX=["size-2.5 rounded-full bg-primary-text transition-colors duration-200","group-hover:bg-secondary-text","group-disabled:bg-disabled-text"],Tw=({className:e,ref:t,...n})=>E.jsx(J_,{className:fe(wX,e),...n,ref:t});Tw.displayName=J_.displayName;const Ff=({className:e,ref:t,...n})=>E.jsx(Q_,{ref:t,className:fe(EX,e),...n,children:E.jsx(xX,{className:fe(CX),children:E.jsx("span",{className:fe(kX)})})});Ff.displayName=Q_.displayName;var Im="Switch",[RX]=No(Im),[SX,NX]=RX(Im),e2=c.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:s,disabled:a,value:l="on",onCheckedChange:u,form:d,...f}=e,[m,p]=c.useState(null),v=rn(t,x=>p(x)),g=c.useRef(!1),h=m?d||!!m.closest("form"):!0,[b,y]=ra({prop:o,defaultProp:i??!1,onChange:u,caller:Im});return E.jsxs(SX,{scope:n,checked:b,disabled:a,children:[E.jsx(It.button,{type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":o2(b),"data-disabled":a?"":void 0,disabled:a,value:l,...f,ref:v,onClick:Ct(e.onClick,x=>{y(w=>!w),h&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),h&&E.jsx(r2,{control:m,bubbles:!g.current,name:r,value:l,checked:b,required:s,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});e2.displayName=Im;var t2="SwitchThumb",n2=c.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=NX(t2,n);return E.jsx(It.span,{"data-state":o2(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});n2.displayName=t2;var OX="SwitchBubbleInput",r2=c.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const s=c.useRef(null),a=rn(s,i),l=Nx(n),u=im(t);return c.useEffect(()=>{const d=s.current;if(!d)return;const f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&p){const v=new Event("click",{bubbles:r});p.call(d,n),d.dispatchEvent(v)}},[l,n,r]),E.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}})});r2.displayName=OX;function o2(e){return e?"checked":"unchecked"}var i2=e2,IX=n2;const AX=["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"],MX=["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"],s2=({className:e,ref:t,...n})=>E.jsx(i2,{className:fe(AX,e),...n,ref:t,children:E.jsx(IX,{className:fe(MX)})});s2.displayName=i2.displayName;const Dw=({ref:e,className:t,...n})=>E.jsx("div",{className:"relative w-full overflow-auto",children:E.jsx("table",{ref:e,className:fe("w-full caption-bottom text-sm",t),...n})});Dw.displayName="Table";const Lw=({ref:e,className:t,...n})=>E.jsx("thead",{ref:e,className:fe("text-primary-text [&_tr]:border-b",t),...n});Lw.displayName="TableHeader";const jw=({ref:e,className:t,...n})=>E.jsx("tbody",{ref:e,className:fe(t),...n});jw.displayName="TableBody";const a2=({ref:e,className:t,...n})=>E.jsx("tfoot",{ref:e,className:fe("bg-muted/50 border-t font-medium",t),...n});a2.displayName="TableFooter";const Yl=({ref:e,className:t,...n})=>E.jsx("tr",{ref:e,className:fe(`hover:bg-muted/50 data-[state=selected]:bg-muted border-delicate-border border-b
|
|
152
|
+
transition-colors`,t),...n});Yl.displayName="TableRow";const Vw=({ref:e,className:t,...n})=>E.jsx("th",{ref:e,className:fe(`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});Vw.displayName="TableHead";const $f=({ref:e,className:t,...n})=>E.jsx("td",{ref:e,className:fe(`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 l2=({ref:e,className:t,...n})=>E.jsx("caption",{ref:e,className:fe("text-muted-foreground mt-4 text-sm",t),...n});l2.displayName="TableCaption";var Am="Tabs",[PX]=No(Am,[Nm]),c2=Nm(),[_X,Fw]=PX(Am),u2=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:s="horizontal",dir:a,activationMode:l="automatic",...u}=e,d=Pw(a),[f,m]=ra({prop:r,onChange:o,defaultProp:i??"",caller:Am});return E.jsx(_X,{scope:n,baseId:$a(),value:f,onValueChange:m,orientation:s,dir:d,activationMode:l,children:E.jsx(It.div,{dir:d,"data-orientation":s,...u,ref:t})})});u2.displayName=Am;var d2="TabsList",f2=c.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=Fw(d2,n),s=c2(n);return E.jsx(V_,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:r,children:E.jsx(It.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});f2.displayName=d2;var p2="TabsTrigger",m2=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,s=Fw(p2,n),a=c2(n),l=v2(s.baseId,r),u=b2(s.baseId,r),d=r===s.value;return E.jsx(F_,{asChild:!0,...a,focusable:!o,active:d,children:E.jsx(It.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,...i,ref:t,onMouseDown:Ct(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?s.onValueChange(r):f.preventDefault()}),onKeyDown:Ct(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&s.onValueChange(r)}),onFocus:Ct(e.onFocus,()=>{const f=s.activationMode!=="manual";!d&&!o&&f&&s.onValueChange(r)})})})});m2.displayName=p2;var h2="TabsContent",g2=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...s}=e,a=Fw(h2,n),l=v2(a.baseId,r),u=b2(a.baseId,r),d=r===a.value,f=c.useRef(d);return c.useEffect(()=>{const m=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(m)},[]),E.jsx(ni,{present:o||d,children:({present:m})=>E.jsx(It.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!m,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:m&&i})})});g2.displayName=h2;function v2(e,t){return`${e}-trigger-${t}`}function b2(e,t){return`${e}-content-${t}`}var TX=u2,y2=f2,x2=m2,w2=g2;const DX=Ot(["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"}}),LX=Ot(["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:[vn("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:[vn("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"}}),E2=c.createContext("default"),jX=TX,C2=({ref:e,className:t,variant:n="default",...r})=>E.jsx(E2,{value:n,children:E.jsx(y2,{ref:e,className:fe(DX({variant:n}),t),...r})});C2.displayName=y2.displayName;const k2=({ref:e,className:t,variant:n,...r})=>{const o=c.use(E2),i=n??o;return E.jsx(x2,{ref:e,className:fe(LX({variant:i}),t),...r})};k2.displayName=x2.displayName;const R2=({ref:e,className:t,...n})=>E.jsx(w2,{ref:e,className:fe(`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});R2.displayName=w2.displayName;var VX="Arrow",S2=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return E.jsx(It.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});S2.displayName=VX;var FX=S2,$w="Popper",[N2,O2]=No($w),[$X,I2]=N2($w),A2=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return E.jsx($X,{scope:t,anchor:r,onAnchorChange:o,children:n})};A2.displayName=$w;var M2="PopperAnchor",P2=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=I2(M2,n),s=c.useRef(null),a=rn(t,s),l=c.useRef(null);return c.useEffect(()=>{const u=l.current;l.current=r?.current||s.current,u!==l.current&&i.onAnchorChange(l.current)}),r?null:E.jsx(It.div,{...o,ref:a})});P2.displayName=M2;var zw="PopperContent",[zX,BX]=N2(zw),_2=c.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:v,...g}=e,h=I2(zw,n),[b,y]=c.useState(null),x=rn(t,te=>y(te)),[w,C]=c.useState(null),R=im(w),k=R?.width??0,S=R?.height??0,P=r+(i!=="center"?"-"+i:""),L=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},_=Array.isArray(u)?u:[u],O=_.length>0,B={padding:L,boundary:_.filter(GX),altBoundary:O},{refs:I,floatingStyles:V,placement:F,isPositioned:D,middlewareData:T}=VM({strategy:"fixed",placement:P,whileElementsMounted:(...te)=>Lb(...te,{animationFrame:p==="always"}),elements:{reference:h.anchor},middleware:[FM({mainAxis:o+S,alignmentAxis:s}),l&&$M({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?zM():void 0,...B}),l&&BM({...B}),HM({...B,apply:({elements:te,rects:le,availableWidth:z,availableHeight:re})=>{const{width:oe,height:M}=le.reference,N=te.floating.style;N.setProperty("--radix-popper-available-width",`${z}px`),N.setProperty("--radix-popper-available-height",`${re}px`),N.setProperty("--radix-popper-anchor-width",`${oe}px`),N.setProperty("--radix-popper-anchor-height",`${M}px`)}}),w&&z8({element:w,padding:a}),WX({arrowWidth:k,arrowHeight:S}),m&&GM({strategy:"referenceHidden",...B})]}),[q,A]=L2(F),ee=Bs(v);$i(()=>{D&&ee?.()},[D,ee]);const ie=T.arrow?.x,Y=T.arrow?.y,Q=T.arrow?.centerOffset!==0,[X,J]=c.useState();return $i(()=>{b&&J(window.getComputedStyle(b).zIndex)},[b]),E.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:D?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[T.transformOrigin?.x,T.transformOrigin?.y].join(" "),...T.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(zX,{scope:n,placedSide:q,onArrowChange:C,arrowX:ie,arrowY:Y,shouldHideArrow:Q,children:E.jsx(It.div,{"data-side":q,"data-align":A,...g,ref:x,style:{...g.style,animation:D?void 0:"none"}})})})});_2.displayName=zw;var T2="PopperArrow",HX={top:"bottom",right:"left",bottom:"top",left:"right"},D2=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=BX(T2,r),s=HX[i.placedSide];return E.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:E.jsx(FX,{...o,ref:n,style:{...o.style,display:"block"}})})});D2.displayName=T2;function GX(e){return e!==null}var WX=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,s=o.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,d]=L2(n),f={start:"0%",center:"50%",end:"100%"}[d],m=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+l/2;let v="",g="";return u==="bottom"?(v=s?f:`${m}px`,g=`${-l}px`):u==="top"?(v=s?f:`${m}px`,g=`${r.floating.height+l}px`):u==="right"?(v=`${-l}px`,g=s?f:`${p}px`):u==="left"&&(v=`${r.floating.width+l}px`,g=s?f:`${p}px`),{data:{x:v,y:g}}}});function L2(e){const[t,n="center"]=e.split("-");return[t,n]}var UX=A2,qX=P2,KX=_2,YX=D2,XX=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"}),ZX="VisuallyHidden",j2=c.forwardRef((e,t)=>E.jsx(It.span,{...e,ref:t,style:{...XX,...e.style}}));j2.displayName=ZX;var JX=j2,[Mm]=No("Tooltip",[O2]),Pm=O2(),V2="TooltipProvider",QX=700,Ub="tooltip.open",[eZ,Bw]=Mm(V2),F2=e=>{const{__scopeTooltip:t,delayDuration:n=QX,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=c.useRef(!0),a=c.useRef(!1),l=c.useRef(0);return c.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),E.jsx(eZ,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:c.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:i})};F2.displayName=V2;var pc="Tooltip",[tZ,Hc]=Mm(pc),$2=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,l=Bw(pc,e.__scopeTooltip),u=Pm(t),[d,f]=c.useState(null),m=$a(),p=c.useRef(0),v=s??l.disableHoverableContent,g=a??l.delayDuration,h=c.useRef(!1),[b,y]=ra({prop:r,defaultProp:o??!1,onChange:k=>{k?(l.onOpen(),document.dispatchEvent(new CustomEvent(Ub))):l.onClose(),i?.(k)},caller:pc}),x=c.useMemo(()=>b?h.current?"delayed-open":"instant-open":"closed",[b]),w=c.useCallback(()=>{window.clearTimeout(p.current),p.current=0,h.current=!1,y(!0)},[y]),C=c.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y(!1)},[y]),R=c.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{h.current=!0,y(!0),p.current=0},g)},[g,y]);return c.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),E.jsx(UX,{...u,children:E.jsx(tZ,{scope:t,contentId:m,open:b,stateAttribute:x,trigger:d,onTriggerChange:f,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?R():w()},[l.isOpenDelayedRef,R,w]),onTriggerLeave:c.useCallback(()=>{v?C():(window.clearTimeout(p.current),p.current=0)},[C,v]),onOpen:w,onClose:C,disableHoverableContent:v,children:n})})};$2.displayName=pc;var qb="TooltipTrigger",z2=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Hc(qb,n),i=Bw(qb,n),s=Pm(n),a=c.useRef(null),l=rn(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]),E.jsx(qX,{asChild:!0,...s,children:E.jsx(It.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:Ct(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:Ct(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:Ct(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ct(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Ct(e.onBlur,o.onClose),onClick:Ct(e.onClick,o.onClose)})})});z2.displayName=qb;var Hw="TooltipPortal",[nZ,rZ]=Mm(Hw,{forceMount:void 0}),B2=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=Hc(Hw,t);return E.jsx(nZ,{scope:t,forceMount:n,children:E.jsx(ni,{present:n||i.open,children:E.jsx(yw,{asChild:!0,container:o,children:r})})})};B2.displayName=Hw;var al="TooltipContent",H2=c.forwardRef((e,t)=>{const n=rZ(al,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=Hc(al,e.__scopeTooltip);return E.jsx(ni,{present:r||s.open,children:s.disableHoverableContent?E.jsx(G2,{side:o,...i,ref:t}):E.jsx(oZ,{side:o,...i,ref:t})})}),oZ=c.forwardRef((e,t)=>{const n=Hc(al,e.__scopeTooltip),r=Bw(al,e.__scopeTooltip),o=c.useRef(null),i=rn(t,o),[s,a]=c.useState(null),{trigger:l,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,m=c.useCallback(()=>{a(null),f(!1)},[f]),p=c.useCallback((v,g)=>{const h=v.currentTarget,b={x:v.clientX,y:v.clientY},y=lZ(b,h.getBoundingClientRect()),x=cZ(b,y),w=uZ(g.getBoundingClientRect()),C=fZ([...x,...w]);a(C),f(!0)},[f]);return c.useEffect(()=>()=>m(),[m]),c.useEffect(()=>{if(l&&d){const v=h=>p(h,d),g=h=>p(h,l);return l.addEventListener("pointerleave",v),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",g)}}},[l,d,p,m]),c.useEffect(()=>{if(s){const v=g=>{const h=g.target,b={x:g.clientX,y:g.clientY},y=l?.contains(h)||d?.contains(h),x=!dZ(b,s);y?m():x&&(m(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,d,s,u,m]),E.jsx(G2,{...e,ref:i})}),[iZ,sZ]=Mm(pc,{isInside:!1}),aZ=GW("TooltipContent"),G2=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=Hc(al,n),u=Pm(n),{onClose:d}=l;return c.useEffect(()=>(document.addEventListener(Ub,d),()=>document.removeEventListener(Ub,d)),[d]),c.useEffect(()=>{if(l.trigger){const f=m=>{m.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),E.jsx(bw,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:E.jsxs(KX,{"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:[E.jsx(aZ,{children:r}),E.jsx(iZ,{scope:n,isInside:!0,children:E.jsx(JX,{id:l.contentId,role:"tooltip",children:o||r})})]})})});H2.displayName=al;var W2="TooltipArrow",U2=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Pm(n);return sZ(W2,n).isInside?null:E.jsx(YX,{...o,...r,ref:t})});U2.displayName=W2;function lZ(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function cZ(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 uZ(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 dZ(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],l=t[s],u=a.x,d=a.y,f=l.x,m=l.y;d>r!=m>r&&n<(f-u)*(r-d)/(m-d)+u&&(o=!o)}return o}function fZ(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),pZ(t)}function pZ(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 i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.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 i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.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 mZ=F2,hZ=$2,gZ=z2,vZ=B2,q2=H2,bZ=U2;const yZ=`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`,
|
|
161
|
+
py-1.5 text-xs`,xZ=mZ,wZ=hZ,EZ=gZ,CZ=bZ,K2=({className:e,sideOffset:t=4,ref:n,...r})=>E.jsx(vZ,{children:E.jsx(q2,{ref:n,sideOffset:t,className:fe(yZ,e),...r})});K2.displayName=q2.displayName;const kZ=(e=!1)=>{const[t,n]=ae.useState(e);return{isOpened:t,openPopup:()=>n(!0),closePopup:()=>n(!1),togglePopup:()=>n(s=>!s)}},RZ=(e,t,n)=>{if(n<=e)return Array.from({length:n},(u,d)=>d+1);const r=Math.floor((e-2)/2);let o=Math.max(t-r,2),i=Math.min(t+r,n-1);const s=i-o+1,a=e-2;s<a&&(o===2?i=Math.min(i+(a-s),n-1):i===n-1&&(o=Math.max(o-(a-s),2)));const l=[];l.push(1),o>2&&l.push("ellipsis-start");for(let u=o;u<=i;u++)l.push(u);return i<n-1&&l.push("ellipsis-end"),n>1&&l.push(n),l},SZ=Ot("flex items-center",{variants:{size:{sm:"gap-1",default:"gap-1",lg:"gap-2"}},defaultVariants:{size:"default"}}),ER=Ot(["bg-tertiary-bg text-primary-text cursor-pointer rounded-[0.25rem] p-0","hover:bg-primary-hover-bg"].join(" "),{variants:{size:{sm:"size-7 [&_svg]:size-3",default:"size-8 [&_svg]:size-3.5",lg:"size-9 [&_svg]:size-4"},side:{prev:"mr-3",next:"ml-3"}},defaultVariants:{size:"default"}}),CR=Ot(["text-primary-text cursor-pointer rounded-[0.75rem] bg-transparent","hover:bg-tertiary-bg",vn("body-xs-medium")].join(" "),{variants:{size:{sm:"h-7 min-w-7 px-2",default:"h-8 min-w-8 px-3",lg:"h-9 min-w-9 px-3.5"},active:{true:`bg-primary-inverse-bg text-primary-inverse-text
|
|
162
|
+
hover:bg-primary-inverse-bg`,false:""}},compoundVariants:[{size:"sm",active:!0,className:"size-7 px-0"},{size:"default",active:!0,className:"size-8 px-0"},{size:"lg",active:!0,className:"size-9 px-0"}],defaultVariants:{size:"default",active:!1}}),NZ=5,OZ=5,IZ=({currentPage:e,totalPages:t,maxVisiblePages:n=NZ,className:r,showNavigation:o=!0,prevLabel:i,nextLabel:s,size:a="default",ellipsisStep:l=OZ,onPageChange:u})=>{if(t<=1)return null;const d=RZ(n,e,t),f=p=>{p>=1&&p<=t&&u(p)},m=p=>{if(p==="ellipsis-start"){const v=Math.max(1,e-l);f(v)}else{const v=Math.min(t,e+l);f(v)}};return E.jsx(Ow,{children:E.jsxs(Iw,{className:fe(SZ({size:a}),r),children:[o&&E.jsx(La,{children:E.jsx(Qo,{variant:"ghost",disabled:e===1,onClick:()=>f(e-1),className:ER({size:a,side:"prev"}),"aria-label":"Предыдущая страница",children:i||E.jsx(FA,{})})}),d.map(p=>p==="ellipsis-start"||p==="ellipsis-end"?E.jsx(La,{children:E.jsx(Qo,{variant:"ghost",onClick:()=>m(p),className:CR({size:a}),"aria-label":p==="ellipsis-start"?`Перейти на ${l} страниц назад`:`Перейти на ${l} страниц вперед`,title:p==="ellipsis-start"?`Нажать чтобы перейти на ${l} страниц назад`:`Нажать чтобы перейти на ${l} страниц вперед`,children:"..."})},p):E.jsx(La,{children:E.jsx(zc,{isActive:e===p,onClick:()=>f(p),className:CR({size:a,active:e===p}),"aria-label":`Страница ${p}`,"aria-current":e===p?"page":void 0,children:p})},p)),o&&E.jsx(La,{children:E.jsx(Qo,{variant:"ghost",disabled:e===t,onClick:()=>f(e+1),className:ER({size:a,side:"next"}),"aria-label":"Следующая страница",children:s||E.jsx($A,{})})})]})})},AZ=Ot(["border-delicate-border bg-secondary-bg flex h-full shrink-0 flex-col border-r","transition-[width] duration-200 ease-out"].join(" "),{variants:{state:{expanded:"w-[15.5rem]",collapsed:"w-16"}},defaultVariants:{state:"expanded"}}),MZ=Ot("border-delicate-border flex h-[4.5rem] items-center border-b",{variants:{state:{expanded:"justify-between px-7",collapsed:"justify-center px-[1.125rem]"}},defaultVariants:{state:"expanded"}}),PZ=Ot("flex items-center gap-3",{variants:{state:{expanded:"opacity-100",collapsed:"hidden opacity-0"}},defaultVariants:{state:"expanded"}}),_Z=vn("body-xl-medium"),TZ=Ot(["text-sub-label-text inline-flex size-7 cursor-pointer items-center justify-center rounded-sm","hover:bg-tertiary-bg hover:text-primary-text transition-colors","disabled:text-disabled-text disabled:pointer-events-none"].join(" ")),DZ=({groups:e,title:t="CRM",brandMark:n,state:r="expanded",activeItemId:o,showToggle:i=!0,onStateChange:s,onItemSelect:a,className:l,...u})=>{const d=r==="collapsed",f=e.filter(h=>h.placement!=="bottom"),m=e.filter(h=>h.placement==="bottom"),p=d?"expanded":"collapsed",v=()=>{s?.(p)},g=h=>h.map(b=>E.jsx(C_,{title:b.title,collapsed:d,className:fe(b.divider&&"border-delicate-border border-b"),children:b.items.map(y=>{const x=o?o===y.id:!!y.active;return E.jsx(E_,{icon:E.jsx(ol,{type:y.icon}),label:y.label,badge:y.badge,active:x,collapsed:d,disabled:y.disabled,href:y.href,target:y.target,rel:y.rel,onAction:()=>{a?.(y),y.onClick?.(y)},"aria-current":x?"page":void 0},y.id)})},b.id));return E.jsxs("aside",{className:fe(AZ({state:r}),l),"aria-label":"Боковая навигация",...u,children:[E.jsxs("header",{className:MZ({state:r}),children:[E.jsxs("div",{className:PZ({state:r}),children:[n,E.jsx("p",{className:_Z,children:t})]}),i&&E.jsx("button",{type:"button",className:TZ(),onClick:v,"aria-label":d?"Развернуть боковую навигацию":"Свернуть боковую навигацию",disabled:!s,children:E.jsx(ol,{type:"chevrons",strokeWidth:1.5,className:fe("transition-transform duration-200",d?"-rotate-90":"rotate-90")})})]}),E.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[E.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:g(f)}),m.length>0&&E.jsx("div",{className:"mt-auto",children:g(m)})]})]})},LZ=({name:e,orientation:t="horizontal",label:n,disabled:r,classNames:o,...i})=>E.jsx(Vc,{className:o?.classNameGroup,children:E.jsxs(Fc,{orientation:t,children:[E.jsx(Mx,{...i,id:e,name:e,disabled:r,className:o?.classNameCheckbox}),n&&E.jsx($c,{htmlFor:e,className:fe("text-[14px]",o?.classNameLabel,r&&"cursor-not-allowed"),children:n})]})}),jZ=({open:e,onOpenChange:t,title:n,cancelLabel:r="Отмена",confirmLabel:o="Ок",onConfirm:i,children:s,classes:a,footer:l,showCloseButton:u=!1,ariaDescribedby:d=void 0})=>{const f=()=>{t(!1)},m=()=>{i?.(),t(!1)},p=l===void 0?E.jsxs(Sw,{className:a?.footer,children:[E.jsx(Qo,{variant:"secondary",onClick:f,children:r}),E.jsx(Qo,{onClick:m,children:o})]}):l;return E.jsx(y_,{open:e,onOpenChange:t,children:E.jsxs(kw,{"aria-describedby":d,showCloseButton:u,children:[n&&E.jsx(Rw,{className:a?.header,children:E.jsx(Nw,{className:a?.title,children:n})}),E.jsx("div",{className:a?.body,children:s}),p]})})};function Ni(e,t){return typeof e=="function"?e(t):e}function wr(e,t){return n=>{t.setState(r=>({...r,[e]:Ni(n,r[e])}))}}function _m(e){return e instanceof Function}function VZ(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function FZ(e,t){const n=[],r=o=>{o.forEach(i=>{n.push(i);const s=t(i);s!=null&&s.length&&r(s)})};return r(e),n}function Xe(e,t,n){let r=[],o;return i=>{let s;n.key&&n.debug&&(s=Date.now());const a=e(i);if(!(a.length!==r.length||a.some((d,f)=>r[f]!==d)))return o;r=a;let u;if(n.key&&n.debug&&(u=Date.now()),o=t(...a),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-s)*100)/100,f=Math.round((Date.now()-u)*100)/100,m=f/16,p=(v,g)=>{for(v=String(v);v.length<g;)v=" "+v;return v};console.info(`%c⏱ ${p(f,5)} /${p(d,5)} ms`,`
|
|
163
|
+
font-size: .6rem;
|
|
164
|
+
font-weight: bold;
|
|
165
|
+
color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,n?.key)}return o}}function Ze(e,t,n,r){return{debug:()=>{var o;return(o=e?.debugAll)!=null?o:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function $Z(e,t,n,r){const o=()=>{var s;return(s=i.getValue())!=null?s:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:Xe(()=>[e,n,t,i],(s,a,l,u)=>({table:s,column:a,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),Ze(e.options,"debugCells","cell.getContext"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(i,n,t,e)},{}),i}function zZ(e,t,n,r){var o,i;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let u=(o=(i=a.id)!=null?i:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?o:typeof a.header=="string"?a.header:void 0,d;if(a.accessorFn?d=a.accessorFn:l&&(l.includes(".")?d=m=>{let p=m;for(const g of l.split(".")){var v;p=(v=p)==null?void 0:v[g],process.env.NODE_ENV!=="production"&&p===void 0&&console.warn(`"${g}" in deeply nested key "${l}" returned undefined.`)}return p}:d=m=>m[a.accessorKey]),!u)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let f={id:`${String(u)}`,accessorFn:d,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:Xe(()=>[!0],()=>{var m;return[f,...(m=f.columns)==null?void 0:m.flatMap(p=>p.getFlatColumns())]},Ze(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:Xe(()=>[e._getOrderColumnsFn()],m=>{var p;if((p=f.columns)!=null&&p.length){let v=f.columns.flatMap(g=>g.getLeafColumns());return m(v)}return[f]},Ze(e.options,"debugColumns","column.getLeafColumns"))};for(const m of e._features)m.createColumn==null||m.createColumn(f,e);return f}const zn="debugHeaders";function kR(e,t,n){var r;let i={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const s=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),s.push(l)};return a(i),s},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(i,e)}),i}const BZ={createTable:e=>{e.getHeaderGroups=Xe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var i,s;const a=(i=r?.map(f=>n.find(m=>m.id===f)).filter(Boolean))!=null?i:[],l=(s=o?.map(f=>n.find(m=>m.id===f)).filter(Boolean))!=null?s:[],u=n.filter(f=>!(r!=null&&r.includes(f.id))&&!(o!=null&&o.includes(f.id)));return Au(t,[...a,...u,...l],e)},Ze(e.options,zn,"getHeaderGroups")),e.getCenterHeaderGroups=Xe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(i=>!(r!=null&&r.includes(i.id))&&!(o!=null&&o.includes(i.id))),Au(t,n,e,"center")),Ze(e.options,zn,"getCenterHeaderGroups")),e.getLeftHeaderGroups=Xe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const i=(o=r?.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?o:[];return Au(t,i,e,"left")},Ze(e.options,zn,"getLeftHeaderGroups")),e.getRightHeaderGroups=Xe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const i=(o=r?.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?o:[];return Au(t,i,e,"right")},Ze(e.options,zn,"getRightHeaderGroups")),e.getFooterGroups=Xe(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ze(e.options,zn,"getFooterGroups")),e.getLeftFooterGroups=Xe(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ze(e.options,zn,"getLeftFooterGroups")),e.getCenterFooterGroups=Xe(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ze(e.options,zn,"getCenterFooterGroups")),e.getRightFooterGroups=Xe(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ze(e.options,zn,"getRightFooterGroups")),e.getFlatHeaders=Xe(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ze(e.options,zn,"getFlatHeaders")),e.getLeftFlatHeaders=Xe(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ze(e.options,zn,"getLeftFlatHeaders")),e.getCenterFlatHeaders=Xe(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ze(e.options,zn,"getCenterFlatHeaders")),e.getRightFlatHeaders=Xe(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ze(e.options,zn,"getRightFlatHeaders")),e.getCenterLeafHeaders=Xe(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ze(e.options,zn,"getCenterLeafHeaders")),e.getLeftLeafHeaders=Xe(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ze(e.options,zn,"getLeftLeafHeaders")),e.getRightLeafHeaders=Xe(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ze(e.options,zn,"getRightLeafHeaders")),e.getLeafHeaders=Xe(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,i,s,a,l,u;return[...(o=(i=t[0])==null?void 0:i.headers)!=null?o:[],...(s=(a=n[0])==null?void 0:a.headers)!=null?s:[],...(l=(u=r[0])==null?void 0:u.headers)!=null?l:[]].map(d=>d.getLeafHeaders()).flat()},Ze(e.options,zn,"getLeafHeaders"))}};function Au(e,t,n,r){var o,i;let s=0;const a=function(m,p){p===void 0&&(p=1),s=Math.max(s,p),m.filter(v=>v.getIsVisible()).forEach(v=>{var g;(g=v.columns)!=null&&g.length&&a(v.columns,p+1)},0)};a(e);let l=[];const u=(m,p)=>{const v={depth:p,id:[r,`${p}`].filter(Boolean).join("_"),headers:[]},g=[];m.forEach(h=>{const b=[...g].reverse()[0],y=h.column.depth===v.depth;let x,w=!1;if(y&&h.column.parent?x=h.column.parent:(x=h.column,w=!0),b&&b?.column===x)b.subHeaders.push(h);else{const C=kR(n,x,{id:[r,p,x.id,h?.id].filter(Boolean).join("_"),isPlaceholder:w,placeholderId:w?`${g.filter(R=>R.column===x).length}`:void 0,depth:p,index:g.length});C.subHeaders.push(h),g.push(C)}v.headers.push(h),h.headerGroup=v}),l.push(v),p>0&&u(g,p-1)},d=t.map((m,p)=>kR(n,m,{depth:s,index:p}));u(d,s-1),l.reverse();const f=m=>m.filter(v=>v.column.getIsVisible()).map(v=>{let g=0,h=0,b=[0];v.subHeaders&&v.subHeaders.length?(b=[],f(v.subHeaders).forEach(x=>{let{colSpan:w,rowSpan:C}=x;g+=w,b.push(C)})):g=1;const y=Math.min(...b);return h=h+y,v.colSpan=g,v.rowSpan=h,{colSpan:g,rowSpan:h}});return f((o=(i=l[0])==null?void 0:i.headers)!=null?o:[]),l}const HZ=(e,t,n,r,o,i,s)=>{let a={id:t,index:r,original:n,depth:o,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return a._valuesCache[l]=u.accessorFn(a.original,r),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=u.columnDef.getUniqueValues(a.original,r),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=a.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>FZ(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],u=a;for(;;){const d=u.getParentRow();if(!d)break;l.push(d),u=d}return l.reverse()},getAllCells:Xe(()=>[e.getAllLeafColumns()],l=>l.map(u=>$Z(e,a,u,u.id)),Ze(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:Xe(()=>[a.getAllCells()],l=>l.reduce((u,d)=>(u[d.column.id]=d,u),{}),Ze(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const u=e._features[l];u==null||u.createRow==null||u.createRow(a,e)}return a},GZ={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Y2=(e,t,n)=>{var r,o;const i=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};Y2.autoRemove=e=>Kr(e);const X2=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};X2.autoRemove=e=>Kr(e);const Z2=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};Z2.autoRemove=e=>Kr(e);const J2=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};J2.autoRemove=e=>Kr(e);const Q2=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});Q2.autoRemove=e=>Kr(e)||!(e!=null&&e.length);const eT=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});eT.autoRemove=e=>Kr(e)||!(e!=null&&e.length);const tT=(e,t,n)=>e.getValue(t)===n;tT.autoRemove=e=>Kr(e);const nT=(e,t,n)=>e.getValue(t)==n;nT.autoRemove=e=>Kr(e);const Gw=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};Gw.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(r)?-1/0:r,s=n===null||Number.isNaN(o)?1/0:o;if(i>s){const a=i;i=s,s=a}return[i,s]};Gw.autoRemove=e=>Kr(e)||Kr(e[0])&&Kr(e[1]);const Zo={includesString:Y2,includesStringSensitive:X2,equalsString:Z2,arrIncludes:J2,arrIncludesAll:Q2,arrIncludesSome:eT,equals:tT,weakEquals:nT,inNumberRange:Gw};function Kr(e){return e==null||e===""}const WZ={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:wr("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?Zo.includesString:typeof r=="number"?Zo.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Zo.equals:Array.isArray(r)?Zo.arrIncludes:Zo.weakEquals},e.getFilterFn=()=>{var n,r;return _m(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Zo[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),i=r?.find(d=>d.id===e.id),s=Ni(n,i?i.value:void 0);if(RR(o,s,e)){var a;return(a=r?.filter(d=>d.id!==e.id))!=null?a:[]}const l={id:e.id,value:s};if(i){var u;return(u=r?.map(d=>d.id===e.id?l:d))!=null?u:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var i;return(i=Ni(t,o))==null?void 0:i.filter(s=>{const a=n.find(l=>l.id===s.id);if(a){const l=a.getFilterFn();if(RR(l,s.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function RR(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const UZ=(e,t,n)=>n.reduce((r,o)=>{const i=o.getValue(e);return r+(typeof i=="number"?i:0)},0),qZ=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}),r},KZ=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}),r},YZ=(e,t,n)=>{let r,o;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r===void 0?s>=s&&(r=o=s):(r>s&&(r=s),o<s&&(o=s)))}),[r,o]},XZ=(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let i=o.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},ZZ=(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!VZ(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((i,s)=>i-s);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},JZ=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),QZ=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,eJ=(e,t)=>t.length,Vg={sum:UZ,min:qZ,max:KZ,extent:YZ,mean:XZ,median:ZZ,unique:JZ,uniqueCount:QZ,count:eJ},tJ={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:wr("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return Vg.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Vg.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return _m(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:Vg[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function nJ(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(i=>!t.includes(i.id));return n==="remove"?r:[...t.map(i=>e.find(s=>s.id===i)).filter(Boolean),...r]}const rJ={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:wr("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Xe(n=>[Xl(t,n)],n=>n.findIndex(r=>r.id===e.id),Ze(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=Xl(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=Xl(t,n);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=Xe(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let i=[];if(!(t!=null&&t.length))i=o;else{const s=[...t],a=[...o];for(;a.length&&s.length;){const l=s.shift(),u=a.findIndex(d=>d.id===l);u>-1&&i.push(a.splice(u,1)[0])}i=[...i,...a]}return nJ(i,n,r)},Ze(e.options,"debugTable","_getOrderColumnsFn"))}},Fg=()=>({left:[],right:[]}),oJ={getInitialState:e=>({columnPinning:Fg(),...e}),getDefaultOptions:e=>({onColumnPinningChange:wr("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var i,s;if(n==="right"){var a,l;return{left:((a=o?.left)!=null?a:[]).filter(f=>!(r!=null&&r.includes(f))),right:[...((l=o?.right)!=null?l:[]).filter(f=>!(r!=null&&r.includes(f))),...r]}}if(n==="left"){var u,d;return{left:[...((u=o?.left)!=null?u:[]).filter(f=>!(r!=null&&r.includes(f))),...r],right:((d=o?.right)!=null?d:[]).filter(f=>!(r!=null&&r.includes(f)))}}return{left:((i=o?.left)!=null?i:[]).filter(f=>!(r!=null&&r.includes(f))),right:((s=o?.right)!=null?s:[]).filter(f=>!(r!=null&&r.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,i,s;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((i=(s=t.options.enableColumnPinning)!=null?s:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:r,right:o}=t.getState().columnPinning,i=n.some(a=>r?.includes(a)),s=n.some(a=>o?.includes(a));return i?"left":s?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Xe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const i=[...r??[],...o??[]];return n.filter(s=>!i.includes(s.column.id))},Ze(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=Xe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(i=>n.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),Ze(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=Xe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(i=>n.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),Ze(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?Fg():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:Fg())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,i;return!!((o=r.left)!=null&&o.length||(i=r.right)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Xe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),Ze(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=Xe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),Ze(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=Xe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(i=>!o.includes(i.id))},Ze(e.options,"debugColumns","getCenterLeafColumns"))}};function iJ(e){return e||(typeof document<"u"?document:null)}const Mu={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},$g=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),sJ={getDefaultColumnDef:()=>Mu,getInitialState:e=>({columnSizing:{},columnSizingInfo:$g(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:wr("columnSizing",e),onColumnSizingInfoChange:wr("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Mu.minSize,(r=i??e.columnDef.size)!=null?r:Mu.size),(o=e.columnDef.maxSize)!=null?o:Mu.maxSize)},e.getStart=Xe(n=>[n,Xl(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,i)=>o+i.getSize(),0),Ze(t.options,"debugColumns","getStart")),e.getAfter=Xe(n=>[n,Xl(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,i)=>o+i.getSize(),0),Ze(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var i;n+=(i=o.column.getSize())!=null?i:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=r?.getCanResize();return i=>{if(!r||!o||(i.persist==null||i.persist(),zg(i)&&i.touches&&i.touches.length>1))return;const s=e.getSize(),a=e?e.getLeafHeaders().map(b=>[b.column.id,b.column.getSize()]):[[r.id,r.getSize()]],l=zg(i)?Math.round(i.touches[0].clientX):i.clientX,u={},d=(b,y)=>{typeof y=="number"&&(t.setColumnSizingInfo(x=>{var w,C;const R=t.options.columnResizeDirection==="rtl"?-1:1,k=(y-((w=x?.startOffset)!=null?w:0))*R,S=Math.max(k/((C=x?.startSize)!=null?C:0),-.999999);return x.columnSizingStart.forEach(P=>{let[L,_]=P;u[L]=Math.round(Math.max(_+_*S,0)*100)/100}),{...x,deltaOffset:k,deltaPercentage:S}}),(t.options.columnResizeMode==="onChange"||b==="end")&&t.setColumnSizing(x=>({...x,...u})))},f=b=>d("move",b),m=b=>{d("end",b),t.setColumnSizingInfo(y=>({...y,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=iJ(n),v={moveHandler:b=>f(b.clientX),upHandler:b=>{p?.removeEventListener("mousemove",v.moveHandler),p?.removeEventListener("mouseup",v.upHandler),m(b.clientX)}},g={moveHandler:b=>(b.cancelable&&(b.preventDefault(),b.stopPropagation()),f(b.touches[0].clientX),!1),upHandler:b=>{var y;p?.removeEventListener("touchmove",g.moveHandler),p?.removeEventListener("touchend",g.upHandler),b.cancelable&&(b.preventDefault(),b.stopPropagation()),m((y=b.touches[0])==null?void 0:y.clientX)}},h=aJ()?{passive:!1}:!1;zg(i)?(p?.addEventListener("touchmove",g.moveHandler,h),p?.addEventListener("touchend",g.upHandler,h)):(p?.addEventListener("mousemove",v.moveHandler,h),p?.addEventListener("mouseup",v.upHandler,h)),t.setColumnSizingInfo(b=>({...b,startOffset:l,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?$g():(n=e.initialState.columnSizingInfo)!=null?n:$g())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let Pu=null;function aJ(){if(typeof Pu=="boolean")return Pu;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Pu=e,Pu}function zg(e){return e.type==="touchstart"}const lJ={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:wr("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const o=e.columns;return(n=o.length?o.some(i=>i.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Xe(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Ze(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=Xe(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],Ze(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>Xe(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),Ze(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,i)=>({...o,[i.id]:n||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Xl(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const cJ={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},uJ={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:wr("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Zo.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return _m(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Zo[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},dJ={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:wr("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,i;e.setExpanded(r?{}:(o=(i=e.initialState)==null?void 0:i.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const s=i.split(".");r=Math.max(r,s.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const i=r===!0?!0:!!(r!=null&&r[e.id]);let s={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{s[a]=!0}):s=r,n=(o=n)!=null?o:!i,!i&&n)return{...s,[e.id]:!0};if(i&&!n){const{[e.id]:a,...l}=s;return l}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},Kb=0,Yb=10,Bg=()=>({pageIndex:Kb,pageSize:Yb}),fJ={getInitialState:e=>({...e,pagination:{...Bg(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:wr("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=i=>Ni(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?Bg():(o=e.initialState.pagination)!=null?o:Bg())},e.setPageIndex=r=>{e.setPagination(o=>{let i=Ni(r,o.pageIndex);const s=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,s)),{...o,pageIndex:i}})},e.resetPageIndex=r=>{var o,i;e.setPageIndex(r?Kb:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:Kb)},e.resetPageSize=r=>{var o,i;e.setPageSize(r?Yb:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:Yb)},e.setPageSize=r=>{e.setPagination(o=>{const i=Math.max(1,Ni(r,o.pageSize)),s=o.pageSize*o.pageIndex,a=Math.floor(s/i);return{...o,pageIndex:a,pageSize:i}})},e.setPageCount=r=>e.setPagination(o=>{var i;let s=Ni(r,(i=e.options.pageCount)!=null?i:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...o,pageCount:s}}),e.getPageOptions=Xe(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((i,s)=>s)),o},Ze(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},Hg=()=>({top:[],bottom:[]}),pJ={getInitialState:e=>({rowPinning:Hg(),...e}),getDefaultOptions:e=>({onRowPinningChange:wr("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],s=o?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],a=new Set([...s,e.id,...i]);t.setRowPinning(l=>{var u,d;if(n==="bottom"){var f,m;return{top:((f=l?.top)!=null?f:[]).filter(g=>!(a!=null&&a.has(g))),bottom:[...((m=l?.bottom)!=null?m:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)]}}if(n==="top"){var p,v;return{top:[...((p=l?.top)!=null?p:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)],bottom:((v=l?.bottom)!=null?v:[]).filter(g=>!(a!=null&&a.has(g)))}}return{top:((u=l?.top)!=null?u:[]).filter(g=>!(a!=null&&a.has(g))),bottom:((d=l?.bottom)!=null?d:[]).filter(g=>!(a!=null&&a.has(g)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some(a=>r?.includes(a)),s=n.some(a=>o?.includes(a));return i?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(s=>{let{id:a}=s;return a});return(r=i?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?Hg():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:Hg())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,i;return!!((o=r.top)!=null&&o.length||(i=r.bottom)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(s=>{const a=e.getRow(s,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(s=>t.find(a=>a.id===s))).filter(Boolean).map(s=>({...s,position:r}))},e.getTopRows=Xe(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Ze(e.options,"debugRows","getTopRows")),e.getBottomRows=Xe(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Ze(e.options,"debugRows","getBottomRows")),e.getCenterRows=Xe(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(i=>!o.has(i.id))},Ze(e.options,"debugRows","getCenterRows"))}},mJ={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:wr("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(i=>{i.getCanSelect()&&(r[i.id]=!0)}):o.forEach(i=>{delete r[i.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(i=>{Xb(o,i.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Xe(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Gg(e,n):{rows:[],flatRows:[],rowsById:{}},Ze(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=Xe(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Gg(e,n):{rows:[],flatRows:[],rowsById:{}},Ze(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=Xe(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Gg(e,n):{rows:[],flatRows:[],rowsById:{}},Ze(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(i=>{var s;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return i;const a={...i};return Xb(a,e.id,n,(s=r?.selectChildren)!=null?s:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Ww(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Zb(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Zb(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},Xb=(e,t,n,r,o)=>{var i;const s=o.getRow(t,!0);n?(s.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),s.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(i=s.subRows)!=null&&i.length&&s.getCanSelectSubRows()&&s.subRows.forEach(a=>Xb(e,a.id,n,r,o))};function Gg(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(s,a){return s.map(l=>{var u;const d=Ww(l,n);if(d&&(r.push(l),o[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:i(l.subRows)}),d)return l}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function Ww(e,t){var n;return(n=t[e.id])!=null?n:!1}function Zb(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,i=!1;return e.subRows.forEach(s=>{if(!(i&&!o)&&(s.getCanSelect()&&(Ww(s,t)?i=!0:o=!1),s.subRows&&s.subRows.length)){const a=Zb(s,t);a==="all"?i=!0:(a==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const Jb=/([0-9]+)/gm,hJ=(e,t,n)=>rT(Bi(e.getValue(n)).toLowerCase(),Bi(t.getValue(n)).toLowerCase()),gJ=(e,t,n)=>rT(Bi(e.getValue(n)),Bi(t.getValue(n))),vJ=(e,t,n)=>Uw(Bi(e.getValue(n)).toLowerCase(),Bi(t.getValue(n)).toLowerCase()),bJ=(e,t,n)=>Uw(Bi(e.getValue(n)),Bi(t.getValue(n))),yJ=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},xJ=(e,t,n)=>Uw(e.getValue(n),t.getValue(n));function Uw(e,t){return e===t?0:e>t?1:-1}function Bi(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function rT(e,t){const n=e.split(Jb).filter(Boolean),r=t.split(Jb).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),i=r.shift(),s=parseInt(o,10),a=parseInt(i,10),l=[s,a].sort();if(isNaN(l[0])){if(o>i)return 1;if(i>o)return-1;continue}if(isNaN(l[1]))return isNaN(s)?-1:1;if(s>a)return 1;if(a>s)return-1}return n.length-r.length}const Il={alphanumeric:hJ,alphanumericCaseSensitive:gJ,text:vJ,textCaseSensitive:bJ,datetime:yJ,basic:xJ},wJ={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:wr("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const i=o?.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return Il.datetime;if(typeof i=="string"&&(r=!0,i.split(Jb).length>1))return Il.alphanumeric}return r?Il.text:Il.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return _m(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Il[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(s=>{const a=s?.find(p=>p.id===e.id),l=s?.findIndex(p=>p.id===e.id);let u=[],d,f=i?n:o==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&r?a?d="toggle":d="add":s!=null&&s.length&&l!==s.length-1?d="replace":a?d="toggle":d="replace",d==="toggle"&&(i||o||(d="remove")),d==="add"){var m;u=[...s,{id:e.id,desc:f}],u.splice(0,u.length-((m=t.options.maxMultiSortColCount)!=null?m:Number.MAX_SAFE_INTEGER))}else d==="toggle"?u=s.map(p=>p.id===e.id?{...p,desc:f}:p):d==="remove"?u=s.filter(p=>p.id!==e.id):u=[{id:e.id,desc:f}];return u})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==i&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:s==="desc"?"asc":"desc":i},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},EJ=[BZ,lJ,rJ,oJ,GZ,WZ,cJ,uJ,wJ,tJ,dJ,fJ,pJ,mJ,sJ];function CJ(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...EJ,...(t=e._features)!=null?t:[]];let o={_features:r};const i=o._features.reduce((m,p)=>Object.assign(m,p.getDefaultOptions==null?void 0:p.getDefaultOptions(o)),{}),s=m=>o.options.mergeOptions?o.options.mergeOptions(i,m):{...i,...m};let l={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(m=>{var p;l=(p=m.getInitialState==null?void 0:m.getInitialState(l))!=null?p:l});const u=[];let d=!1;const f={_features:r,options:{...i,...e},initialState:l,_queue:m=>{u.push(m),d||(d=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();d=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{o.setState(o.initialState)},setOptions:m=>{const p=Ni(m,o.options);o.options=s(p)},getState:()=>o.options.state,setState:m=>{o.options.onStateChange==null||o.options.onStateChange(m)},_getRowId:(m,p,v)=>{var g;return(g=o.options.getRowId==null?void 0:o.options.getRowId(m,p,v))!=null?g:`${v?[v.id,p].join("."):p}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(m,p)=>{let v=(p?o.getPrePaginationRowModel():o.getRowModel()).rowsById[m];if(!v&&(v=o.getCoreRowModel().rowsById[m],!v))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${m}`):new Error;return v},_getDefaultColumnDef:Xe(()=>[o.options.defaultColumn],m=>{var p;return m=(p=m)!=null?p:{},{header:v=>{const g=v.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:v=>{var g,h;return(g=(h=v.renderValue())==null||h.toString==null?void 0:h.toString())!=null?g:null},...o._features.reduce((v,g)=>Object.assign(v,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...m}},Ze(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:Xe(()=>[o._getColumnDefs()],m=>{const p=function(v,g,h){return h===void 0&&(h=0),v.map(b=>{const y=zZ(o,b,h,g),x=b;return y.columns=x.columns?p(x.columns,y,h+1):[],y})};return p(m)},Ze(e,"debugColumns","getAllColumns")),getAllFlatColumns:Xe(()=>[o.getAllColumns()],m=>m.flatMap(p=>p.getFlatColumns()),Ze(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:Xe(()=>[o.getAllFlatColumns()],m=>m.reduce((p,v)=>(p[v.id]=v,p),{}),Ze(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:Xe(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(m,p)=>{let v=m.flatMap(g=>g.getLeafColumns());return p(v)},Ze(e,"debugColumns","getAllLeafColumns")),getColumn:m=>{const p=o._getAllFlatColumnsById()[m];return process.env.NODE_ENV!=="production"&&!p&&console.error(`[Table] Column with id '${m}' does not exist.`),p}};Object.assign(o,f);for(let m=0;m<o._features.length;m++){const p=o._features[m];p==null||p.createTable==null||p.createTable(o)}return o}function kJ(){return e=>Xe(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,i,s){i===void 0&&(i=0);const a=[];for(let u=0;u<o.length;u++){const d=HZ(e,e._getRowId(o[u],u,s),o[u],u,i,void 0,s?.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,a.push(d),e.options.getSubRows){var l;d.originalSubRows=e.options.getSubRows(o[u],u),(l=d.originalSubRows)!=null&&l.length&&(d.subRows=r(d.originalSubRows,i+1,d))}}return a};return n.rows=r(t),n},Ze(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function SR(e,t){return e?RJ(e)?c.createElement(e,t):e:null}function RJ(e){return SJ(e)||typeof e=="function"||NJ(e)}function SJ(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function NJ(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function OJ(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=c.useState(()=>({current:CJ(t)})),[r,o]=c.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...r,...e.state},onStateChange:s=>{o(s),e.onStateChange==null||e.onStateChange(s)}})),n.current}function IJ({columns:e,data:t}){const n=OJ({data:t,columns:e,getCoreRowModel:kJ()});return E.jsx("div",{className:"w-full overflow-hidden",children:E.jsxs(Dw,{children:[E.jsx(Lw,{children:n.getHeaderGroups().map(r=>E.jsx(Yl,{children:r.headers.map(o=>E.jsx(Vw,{children:o.isPlaceholder?null:SR(o.column.columnDef.header,o.getContext())},o.id))},r.id))}),E.jsx(jw,{children:n.getRowModel().rows?.length?n.getRowModel().rows.map(r=>E.jsx(Yl,{"data-state":r.getIsSelected()&&"selected",children:r.getVisibleCells().map(o=>E.jsx($f,{children:SR(o.column.columnDef.cell,o.getContext())},o.id))},r.id)):E.jsx(Yl,{children:E.jsx($f,{colSpan:e.length,className:"h-24 text-center",children:"No results."})})})]})})}function oT(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=oT(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function iT(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=oT(e))&&(r&&(r+=" "),r+=t);return r}const AJ=(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},MJ=(e,t)=>({classGroupId:e,validator:t}),sT=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),zf="-",NR=[],PJ="arbitrary..",_J=e=>{const t=DJ(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return TJ(o);const i=o.split(zf),s=i[0]===""&&i.length>1?1:0;return aT(i,s,t)},getConflictingClassGroupIds:(o,i)=>{if(i){const s=r[o],a=n[o];return s?a?AJ(a,s):s:a||NR}return n[o]||NR}}},aT=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const l=aT(e,t+1,o);if(l)return l}const i=n.validators;if(i===null)return;const s=t===0?e.join(zf):e.slice(t).join(zf),a=i.length;for(let l=0;l<a;l++){const u=i[l];if(u.validator(s))return u.classGroupId}},TJ=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?PJ+r:void 0})(),DJ=e=>{const{theme:t,classGroups:n}=e;return LJ(n,t)},LJ=(e,t)=>{const n=sT();for(const r in e){const o=e[r];qw(o,n,r,t)}return n},qw=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];jJ(s,t,n,r)}},jJ=(e,t,n,r)=>{if(typeof e=="string"){VJ(e,t,n);return}if(typeof e=="function"){FJ(e,t,n,r);return}$J(e,t,n,r)},VJ=(e,t,n)=>{const r=e===""?t:lT(t,e);r.classGroupId=n},FJ=(e,t,n,r)=>{if(zJ(e)){qw(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(MJ(n,e))},$J=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];qw(l,lT(t,a),n,r)}},lT=(e,t)=>{let n=e;const r=t.split(zf),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=sT(),n.nextPart.set(s,a)),n=a}return n},zJ=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,BJ=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},Qb="!",OR=":",HJ=[],IR=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),GJ=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,u;const d=o.length;for(let g=0;g<d;g++){const h=o[g];if(s===0&&a===0){if(h===OR){i.push(o.slice(l,g)),l=g+1;continue}if(h==="/"){u=g;continue}}h==="["?s++:h==="]"?s--:h==="("?a++:h===")"&&a--}const f=i.length===0?o:o.slice(l);let m=f,p=!1;f.endsWith(Qb)?(m=f.slice(0,-1),p=!0):f.startsWith(Qb)&&(m=f.slice(1),p=!0);const v=u&&u>l?u-l:void 0;return IR(i,p,m,v)};if(t){const o=t+OR,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):IR(HJ,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},WJ=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},UJ=e=>({cache:BJ(e.cacheSize),parseClassName:GJ(e),sortModifiers:WJ(e),..._J(e)}),qJ=/\s+/,KJ=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(qJ);let l="";for(let u=a.length-1;u>=0;u-=1){const d=a[u],{isExternal:f,modifiers:m,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:g}=n(d);if(f){l=d+(l.length>0?" "+l:l);continue}let h=!!g,b=r(h?v.substring(0,g):v);if(!b){if(!h){l=d+(l.length>0?" "+l:l);continue}if(b=r(v),!b){l=d+(l.length>0?" "+l:l);continue}h=!1}const y=m.length===0?"":m.length===1?m[0]:i(m).join(":"),x=p?y+Qb:y,w=x+b;if(s.indexOf(w)>-1)continue;s.push(w);const C=o(b,h);for(let R=0;R<C.length;++R){const k=C[R];s.push(x+k)}l=d+(l.length>0?" "+l:l)}return l},YJ=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=cT(n))&&(o&&(o+=" "),o+=r);return o},cT=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=cT(e[r]))&&(n&&(n+=" "),n+=t);return n},AR=(e,...t)=>{let n,r,o,i;const s=l=>{const u=t.reduce((d,f)=>f(d),e());return n=UJ(u),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const u=r(l);if(u)return u;const d=KJ(l,n);return o(l,d),d};return i=s,(...l)=>i(YJ(...l))},XJ=[],pn=e=>{const t=n=>n[e]||XJ;return t.isThemeGetter=!0,t},uT=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,dT=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ZJ=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,JJ=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,QJ=/\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$/,eQ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,tQ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nQ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fi=e=>ZJ.test(e),et=e=>!!e&&!Number.isNaN(Number(e)),pi=e=>!!e&&Number.isInteger(Number(e)),Wg=e=>e.endsWith("%")&&et(e.slice(0,-1)),Bo=e=>JJ.test(e),fT=()=>!0,rQ=e=>QJ.test(e)&&!eQ.test(e),Kw=()=>!1,oQ=e=>tQ.test(e),iQ=e=>nQ.test(e),sQ=e=>!Oe(e)&&!Te(e),aQ=e=>is(e,hT,Kw),Oe=e=>uT.test(e),Ns=e=>is(e,gT,rQ),MR=e=>is(e,hQ,et),lQ=e=>is(e,bT,fT),cQ=e=>is(e,vT,Kw),PR=e=>is(e,pT,Kw),uQ=e=>is(e,mT,iQ),_u=e=>is(e,yT,oQ),Te=e=>dT.test(e),Al=e=>ia(e,gT),dQ=e=>ia(e,vT),_R=e=>ia(e,pT),fQ=e=>ia(e,hT),pQ=e=>ia(e,mT),Tu=e=>ia(e,yT,!0),mQ=e=>ia(e,bT,!0),is=(e,t,n)=>{const r=uT.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ia=(e,t,n=!1)=>{const r=dT.exec(e);return r?r[1]?t(r[1]):n:!1},pT=e=>e==="position"||e==="percentage",mT=e=>e==="image"||e==="url",hT=e=>e==="length"||e==="size"||e==="bg-size",gT=e=>e==="length",hQ=e=>e==="number",vT=e=>e==="family-name",bT=e=>e==="number"||e==="weight",yT=e=>e==="shadow",TR=()=>{const e=pn("color"),t=pn("font"),n=pn("text"),r=pn("font-weight"),o=pn("tracking"),i=pn("leading"),s=pn("breakpoint"),a=pn("container"),l=pn("spacing"),u=pn("radius"),d=pn("shadow"),f=pn("inset-shadow"),m=pn("text-shadow"),p=pn("drop-shadow"),v=pn("blur"),g=pn("perspective"),h=pn("aspect"),b=pn("ease"),y=pn("animate"),x=()=>["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"],C=()=>[...w(),Te,Oe],R=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],S=()=>[Te,Oe,l],P=()=>[fi,"full","auto",...S()],L=()=>[pi,"none","subgrid",Te,Oe],_=()=>["auto",{span:["full",pi,Te,Oe]},pi,Te,Oe],O=()=>[pi,"auto",Te,Oe],B=()=>["auto","min","max","fr",Te,Oe],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...S()],D=()=>[fi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],T=()=>[fi,"screen","full","dvw","lvw","svw","min","max","fit",...S()],q=()=>[fi,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],A=()=>[e,Te,Oe],ee=()=>[...w(),_R,PR,{position:[Te,Oe]}],ie=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Y=()=>["auto","cover","contain",fQ,aQ,{size:[Te,Oe]}],Q=()=>[Wg,Al,Ns],X=()=>["","none","full",u,Te,Oe],J=()=>["",et,Al,Ns],te=()=>["solid","dashed","dotted","double"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[et,Wg,_R,PR],re=()=>["","none",v,Te,Oe],oe=()=>["none",et,Te,Oe],M=()=>["none",et,Te,Oe],N=()=>[et,Te,Oe],j=()=>[fi,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Bo],breakpoint:[Bo],color:[fT],container:[Bo],"drop-shadow":[Bo],ease:["in","out","in-out"],font:[sQ],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Bo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Bo],shadow:[Bo],spacing:["px",et],text:[Bo],"text-shadow":[Bo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fi,Oe,Te,h]}],container:["container"],columns:[{columns:[et,Oe,Te,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:C()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[pi,"auto",Te,Oe]}],basis:[{basis:[fi,"full","auto",a,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[et,fi,"auto","initial","none",Oe]}],grow:[{grow:["",et,Te,Oe]}],shrink:[{shrink:["",et,Te,Oe]}],order:[{order:[pi,"first","last","none",Te,Oe]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],"inline-size":[{inline:["auto",...T()]}],"min-inline-size":[{"min-inline":["auto",...T()]}],"max-inline-size":[{"max-inline":["none",...T()]}],"block-size":[{block:["auto",...q()]}],"min-block-size":[{"min-block":["auto",...q()]}],"max-block-size":[{"max-block":["none",...q()]}],w:[{w:[a,"screen",...D()]}],"min-w":[{"min-w":[a,"screen","none",...D()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",n,Al,Ns]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,mQ,lQ]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Wg,Oe]}],"font-family":[{font:[dQ,cQ,t]}],"font-features":[{"font-features":[Oe]}],"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,Te,Oe]}],"line-clamp":[{"line-clamp":[et,"none",Te,MR]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",Te,Oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Te,Oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[et,"from-font","auto",Te,Ns]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[et,"auto",Te,Oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Te,Oe]}],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",Te,Oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:Y()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pi,Te,Oe],radial:["",Te,Oe],conic:[pi,Te,Oe]},pQ,uQ]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[et,Te,Oe]}],"outline-w":[{outline:["",et,Al,Ns]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",d,Tu,_u]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",f,Tu,_u]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[et,Ns]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",m,Tu,_u]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[et,Te,Oe]}],"mix-blend":[{"mix-blend":[...le(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":le()}],"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":[et]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[Te,Oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"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":[et]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:Y()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Te,Oe]}],filter:[{filter:["","none",Te,Oe]}],blur:[{blur:re()}],brightness:[{brightness:[et,Te,Oe]}],contrast:[{contrast:[et,Te,Oe]}],"drop-shadow":[{"drop-shadow":["","none",p,Tu,_u]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",et,Te,Oe]}],"hue-rotate":[{"hue-rotate":[et,Te,Oe]}],invert:[{invert:["",et,Te,Oe]}],saturate:[{saturate:[et,Te,Oe]}],sepia:[{sepia:["",et,Te,Oe]}],"backdrop-filter":[{"backdrop-filter":["","none",Te,Oe]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[et,Te,Oe]}],"backdrop-contrast":[{"backdrop-contrast":[et,Te,Oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",et,Te,Oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[et,Te,Oe]}],"backdrop-invert":[{"backdrop-invert":["",et,Te,Oe]}],"backdrop-opacity":[{"backdrop-opacity":[et,Te,Oe]}],"backdrop-saturate":[{"backdrop-saturate":[et,Te,Oe]}],"backdrop-sepia":[{"backdrop-sepia":["",et,Te,Oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Te,Oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[et,"initial",Te,Oe]}],ease:[{ease:["linear","initial",b,Te,Oe]}],delay:[{delay:[et,Te,Oe]}],animate:[{animate:["none",y,Te,Oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,Te,Oe]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:M()}],"scale-x":[{"scale-x":M()}],"scale-y":[{"scale-y":M()}],"scale-z":[{"scale-z":M()}],"scale-3d":["scale-3d"],skew:[{skew:N()}],"skew-x":[{"skew-x":N()}],"skew-y":[{"skew-y":N()}],transform:[{transform:[Te,Oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:j()}],"translate-x":[{"translate-x":j()}],"translate-y":[{"translate-y":j()}],"translate-z":[{"translate-z":j()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Te,Oe]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",Te,Oe]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[et,Al,Ns,MR]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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"]}},gQ=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:o={},override:i={}})=>(Fl(e,"cacheSize",t),Fl(e,"prefix",n),Fl(e,"experimentalParseClassName",r),Du(e.theme,i.theme),Du(e.classGroups,i.classGroups),Du(e.conflictingClassGroups,i.conflictingClassGroups),Du(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Fl(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),Lu(e.theme,o.theme),Lu(e.classGroups,o.classGroups),Lu(e.conflictingClassGroups,o.conflictingClassGroups),Lu(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),xT(e,o,"orderSensitiveModifiers"),e),Fl=(e,t,n)=>{n!==void 0&&(e[t]=n)},Du=(e,t)=>{if(t)for(const n in t)Fl(e,n,t[n])},Lu=(e,t)=>{if(t)for(const n in t)xT(e,t,n)},xT=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},vQ=(e,...t)=>typeof e=="function"?AR(TR,e,...t):AR(()=>gQ(TR(),e),...t),bQ=vQ({extend:{theme:{text:["h1","h2","h3"]}}});function wT(...e){return bQ(iT(e))}const DR=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,LR=iT,sa=(e,t)=>n=>{var r;if(t?.variants==null)return LR(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const d=n?.[u],f=i?.[u];if(d===null)return null;const m=DR(d)||DR(f);return o[u][m]}),a=n&&Object.entries(n).reduce((u,d)=>{let[f,m]=d;return m===void 0||(u[f]=m),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:m,...p}=d;return Object.entries(p).every(v=>{let[g,h]=v;return Array.isArray(h)?h.includes({...i,...a}[g]):{...i,...a}[g]===h})?[...u,f,m]:u},[]);return LR(e,s,l,n?.class,n?.className)},yQ=sa("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"}}),Pn=(e="body-md-regular")=>yQ({variant:e});sa("tracking-normal whitespace-nowrap",{variants:{kind:{status:Pn("body-xs-medium"),priority:Pn("body-sm-regular")}},defaultVariants:{kind:"status"}});function jR(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Yw(...e){return t=>{let n=!1;const r=e.map(o=>{const i=jR(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():jR(e[o],null)}}}}function on(...e){return c.useCallback(Yw(...e),e)}var xQ=Symbol.for("react.lazy"),Bf=c[" use ".trim().toString()];function wQ(e){return typeof e=="object"&&e!==null&&"then"in e}function ET(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===xQ&&"_payload"in e&&wQ(e._payload)}function EQ(e){const t=CQ(e),n=c.forwardRef((r,o)=>{let{children:i,...s}=r;ET(i)&&typeof Bf=="function"&&(i=Bf(i._payload));const a=c.Children.toArray(i),l=a.find(RQ);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 E.jsx(t,{...s,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return E.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function CQ(e){const t=c.forwardRef((n,r)=>{let{children:o,...i}=n;if(ET(o)&&typeof Bf=="function"&&(o=Bf(o._payload)),c.isValidElement(o)){const s=NQ(o),a=SQ(i,o.props);return o.type!==c.Fragment&&(a.ref=r?Yw(r,s):s),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var kQ=Symbol("radix.slottable");function RQ(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kQ}function SQ(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const a=i(...s);return o(...s),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function NQ(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)}sa(["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
|
|
166
|
+
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
|
|
167
|
+
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
|
|
168
|
+
aria-expanded:text-primary-text`},size:{lg:`${Pn("body-lg-medium")} w-fit gap-2 px-4.5 py-3
|
|
169
|
+
[&_svg]:size-[18px]`,md:`${Pn("body-md-medium")} w-fit gap-2 px-4.5 py-2
|
|
170
|
+
[&_svg]:size-4`,sm:`${Pn("body-sm-medium")} w-fit gap-2 px-3 py-2
|
|
171
|
+
[&_svg]:size-4`,xs:`${Pn("body-xs-medium")} w-fit gap-1 px-3 py-2
|
|
172
|
+
[&_svg]:size-[14px]`,default:`${Pn("body-sm-medium")} size-9 [&_svg]:size-4`}},compoundVariants:[{variant:"link",size:"lg",className:"[&_svg]:size-5"}],defaultVariants:{variant:"primary",size:"md"}});sa(`${Pn("body-sm-regular")} text-muted-foreground
|
|
173
|
+
group-data-[disabled=true]/card:text-disabled-text`);function OQ(e,t){const n=c.createContext(t),r=i=>{const{children:s,...a}=i,l=c.useMemo(()=>a,Object.values(a));return E.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(i){const s=c.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function Io(e,t=[]){let n=[];function r(i,s){const a=c.createContext(s),l=n.length;n=[...n,s];const u=f=>{const{scope:m,children:p,...v}=f,g=m?.[e]?.[l]||a,h=c.useMemo(()=>v,Object.values(v));return E.jsx(g.Provider,{value:h,children:p})};u.displayName=i+"Provider";function d(f,m){const p=m?.[e]?.[l]||a,v=c.useContext(p);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(s=>c.createContext(s));return function(s){const a=s?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:a}}),[s,a])}};return o.scopeName=e,[r,IQ(o,...t)]}function IQ(...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(o){const i=r.reduce((s,{useScope:a,scopeName:l})=>{const u=a(o)[`__scope${l}`];return{...s,...u}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function kt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var Hi=globalThis?.document?c.useLayoutEffect:()=>{},AQ=c[" useInsertionEffect ".trim().toString()]||Hi;function wl({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=MQ({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=PQ(d)?d(e):d;f!==e&&s.current?.(f)}else i(d)},[a,e,i,s]);return[l,u]}function MQ({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),i=c.useRef(t);return AQ(()=>{i.current=t},[t]),c.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function PQ(e){return typeof e=="function"}function Xw(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 Tm(e){const[t,n]=c.useState(void 0);return Hi(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,a=u.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function _Q(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var ss=e=>{const{present:t,children:n}=e,r=TQ(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),i=on(r.ref,DQ(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:i}):null};ss.displayName="Presence";function TQ(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),i=c.useRef("none"),s=e?"mounted":"unmounted",[a,l]=_Q(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=ju(r.current);i.current=a==="mounted"?u:"none"},[a]),Hi(()=>{const u=r.current,d=o.current;if(d!==e){const f=i.current,m=ju(u);e?l("MOUNT"):m==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&f!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Hi(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=p=>{const v=ju(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&v&&(l("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=p=>{p.target===t&&(i.current=ju(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),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 ju(e){return e?.animationName||"none"}function DQ(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 Hf(e){const t=LQ(e),n=c.forwardRef((r,o)=>{const{children:i,...s}=r,a=c.Children.toArray(i),l=a.find(VQ);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 E.jsx(t,{...s,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return E.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function LQ(e){const t=c.forwardRef((n,r)=>{const{children:o,...i}=n;if(c.isValidElement(o)){const s=$Q(o),a=FQ(i,o.props);return o.type!==c.Fragment&&(a.ref=r?Yw(r,s):s),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var CT=Symbol("radix.slottable");function jQ(e){const t=({children:n})=>E.jsx(E.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=CT,t}function VQ(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===CT}function FQ(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const a=i(...s);return o(...s),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function $Q(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 zQ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],At=zQ.reduce((e,t)=>{const n=Hf(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function BQ(e,t){e&&dt.flushSync(()=>e.dispatchEvent(t))}var Dm="Checkbox",[HQ]=Io(Dm),[GQ,Zw]=HQ(Dm);function WQ(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:i,form:s,name:a,onCheckedChange:l,required:u,value:d="on",internal_do_not_use_render:f}=e,[m,p]=wl({prop:n,defaultProp:o??!1,onChange:l,caller:Dm}),[v,g]=c.useState(null),[h,b]=c.useState(null),y=c.useRef(!1),x=v?!!s||!!v.closest("form"):!0,w={checked:m,disabled:i,setChecked:p,control:v,setControl:g,name:a,form:s,value:d,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:Li(o)?!1:o,isFormControl:x,bubbleInput:h,setBubbleInput:b};return E.jsx(GQ,{scope:t,...w,children:qQ(f)?f(w):r})}var kT="CheckboxTrigger",RT=c.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:i,value:s,disabled:a,checked:l,required:u,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:m,isFormControl:p,bubbleInput:v}=Zw(kT,e),g=on(o,d),h=c.useRef(l);return c.useEffect(()=>{const b=i?.form;if(b){const y=()=>f(h.current);return b.addEventListener("reset",y),()=>b.removeEventListener("reset",y)}},[i,f]),E.jsx(At.button,{type:"button",role:"checkbox","aria-checked":Li(l)?"mixed":l,"aria-required":u,"data-state":AT(l),"data-disabled":a?"":void 0,disabled:a,value:s,...r,ref:g,onKeyDown:kt(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:kt(n,b=>{f(y=>Li(y)?!0:!y),v&&p&&(m.current=b.isPropagationStopped(),m.current||b.stopPropagation())})})});RT.displayName=kT;var ST=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:s,disabled:a,value:l,onCheckedChange:u,form:d,...f}=e;return E.jsx(WQ,{__scopeCheckbox:n,checked:o,defaultChecked:i,disabled:a,required:s,onCheckedChange:u,name:r,form:d,value:l,internal_do_not_use_render:({isFormControl:m})=>E.jsxs(E.Fragment,{children:[E.jsx(RT,{...f,ref:t,__scopeCheckbox:n}),m&&E.jsx(IT,{__scopeCheckbox:n})]})})});ST.displayName=Dm;var NT="CheckboxIndicator",UQ=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=Zw(NT,n);return E.jsx(ss,{present:r||Li(i.checked)||i.checked===!0,children:E.jsx(At.span,{"data-state":AT(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});UQ.displayName=NT;var OT="CheckboxBubbleInput",IT=c.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:i,defaultChecked:s,required:a,disabled:l,name:u,value:d,form:f,bubbleInput:m,setBubbleInput:p}=Zw(OT,e),v=on(n,p),g=Xw(i),h=Tm(r);c.useEffect(()=>{const y=m;if(!y)return;const x=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(x,"checked").set,C=!o.current;if(g!==i&&w){const R=new Event("click",{bubbles:C});y.indeterminate=Li(i),w.call(y,Li(i)?!1:i),y.dispatchEvent(R)}},[m,g,i,o]);const b=c.useRef(Li(i)?!1:i);return E.jsx(At.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??b.current,required:a,disabled:l,name:u,value:d,form:f,...t,tabIndex:-1,ref:v,style:{...t.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});IT.displayName=OT;function qQ(e){return typeof e=="function"}function Li(e){return e==="indeterminate"}function AT(e){return Li(e)?"indeterminate":e?"checked":"unchecked"}const MT=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),KQ=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),YQ=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),VR=e=>{const t=YQ(e);return t.charAt(0).toUpperCase()+t.slice(1)};var XQ={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 ZQ=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},JQ=ae.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>ae.createElement("svg",{ref:l,...XQ,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:MT("lucide",o),...!i&&!ZQ(a)&&{"aria-hidden":"true"},...a},[...s.map(([u,d])=>ae.createElement(u,d)),...Array.isArray(i)?i:[i]])),yt=(e,t)=>{const n=ae.forwardRef(({className:r,...o},i)=>ae.createElement(JQ,{ref:i,iconNode:t,className:MT(`lucide-${KQ(VR(e))}`,`lucide-${e}`,r),...o}));return n.displayName=VR(e),n},QQ=[["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"}]];yt("bell-ring",QQ);const eee=[["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"}]];yt("book-user",eee);const tee=[["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"}]];yt("briefcase-business",tee);const nee=[["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"}]];yt("building-2",nee);const ree=[["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"}]];yt("calendar-1",ree);const oee=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]];yt("chart-line",oee);const iee=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]];yt("chevron-down",iee);const see=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]];yt("chevron-left",see);const aee=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]];yt("chevron-right",aee);const lee=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]];yt("chevrons-up-down",lee);const cee=[["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"}]];yt("circle-question-mark",cee);const uee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]];yt("clock-3",uee);const dee=[["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"}]];yt("ellipsis",dee);const fee=[["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"}]];yt("folder-open",fee);const pee=[["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"}]];yt("funnel",pee);const mee=[["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"}]];yt("layout-grid",mee);const hee=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]];yt("list-filter",hee);const gee=[["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"}]];yt("list-todo",gee);const vee=[["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"}]];yt("message-circle",vee);const bee=[["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"}]];yt("palette",bee);const yee=[["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"}]];yt("phone",yee);const xee=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]];yt("plus",xee);const wee=[["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"}]];yt("rotate-ccw",wee);const Eee=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]];yt("search",Eee);const Cee=[["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"}]];yt("settings",Cee);const kee=[["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"}]];yt("tag",kee);const Ree=[["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"}]];yt("user-cog",Ree);const See=[["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"}]];yt("users",See);const Nee=[["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"}]];yt("wrench",Nee);const Oee=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]];yt("x",Oee);ST.displayName;const FR={};function yo(e,t){const n=c.useRef(FR);return n.current===FR&&(n.current=e(t)),n}const Ug=c[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Iee=Ug&&Ug!==c.useLayoutEffect?Ug:e=>e();function Zt(e){const t=yo(Aee).current;return t.next=e,Iee(t.effect),t.trampoline}function Aee(){const e={next:void 0,callback:Mee,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Mee(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const Pee=()=>{},st=typeof document<"u"?c.useLayoutEffect:Pee,Jw=c.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(Jw.displayName="CompositeListContext");function _ee(){return c.useContext(Jw)}function PT(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=Zt(o),s=c.useRef(0),a=yo(Dee).current,l=yo(Tee).current,[u,d]=c.useState(0),f=c.useRef(u),m=Zt((b,y)=>{l.set(b,y??null),f.current+=1,d(f.current)}),p=Zt(b=>{l.delete(b),f.current+=1,d(f.current)}),v=c.useMemo(()=>{const b=new Map;return Array.from(l.keys()).filter(y=>y.isConnected).sort(Lee).forEach((y,x)=>{const w=l.get(y)??{};b.set(y,{...w,index:x})}),b},[l,u]);st(()=>{if(typeof MutationObserver!="function"||v.size===0)return;const b=new MutationObserver(y=>{const x=new Set,w=C=>x.has(C)?x.delete(C):x.add(C);y.forEach(C=>{C.removedNodes.forEach(w),C.addedNodes.forEach(w)}),x.size===0&&(f.current+=1,d(f.current))});return v.forEach((y,x)=>{x.parentElement&&b.observe(x.parentElement,{childList:!0})}),()=>{b.disconnect()}},[v]),st(()=>{f.current===u&&(n.current.length!==v.size&&(n.current.length=v.size),r&&r.current.length!==v.size&&(r.current.length=v.size),s.current=v.size),i(v)},[i,v,n,r,u]),st(()=>()=>{n.current=[]},[n]),st(()=>()=>{r&&(r.current=[])},[r]);const g=Zt(b=>(a.add(b),()=>{a.delete(b)}));st(()=>{a.forEach(b=>b(v))},[a,v]);const h=c.useMemo(()=>({register:m,unregister:p,subscribeMapChange:g,elementsRef:n,labelsRef:r,nextIndexRef:s}),[m,p,g,n,r,s]);return E.jsx(Jw.Provider,{value:h,children:t})}function Tee(){return new Map}function Dee(){return new Set}function Lee(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 _T=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(_T.displayName="DirectionContext");function TT(){return c.useContext(_T)?.direction??"ltr"}function Zr(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 Gf(e,t,n,r){const o=yo(DT).current;return Vee(o,e,t,n,r)&<(o,[e,t,n,r]),o.callback}function jee(e){const t=yo(DT).current;return Fee(t,e)&<(t,e),t.callback}function DT(){return{callback:null,cleanup:null,refs:[]}}function Vee(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function Fee(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function LT(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 i=t[o];if(i!=null)switch(typeof i){case"function":{const s=i(n);typeof s=="function"&&(r[o]=s);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=r[o];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}}}}}}}const $ee=parseInt(c.version,10);function Qw(e){return $ee>=e}function $R(e){if(!c.isValidElement(e))return null;const t=e,n=t.props;return(Qw(19)?n?.ref:t.ref)??null}function ey(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function zee(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function Bee(e,t){return typeof e=="function"?e(t):e}function Hee(e,t){return typeof e=="function"?e(t):e}const Zl={};function jT(e,t,n,r,o){let i={...ty(e,Zl)};return t&&(i=Jd(i,t)),n&&(i=Jd(i,n)),r&&(i=Jd(i,r)),i}function Gee(e){if(e.length===0)return Zl;if(e.length===1)return ty(e[0],Zl);let t={...ty(e[0],Zl)};for(let n=1;n<e.length;n+=1)t=Jd(t,e[n]);return t}function Jd(e,t){return VT(t)?t(e):Wee(e,t)}function Wee(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=ey(e.style,r);break}case"className":{e[n]=FT(e.className,r);break}default:Uee(n,r)?e[n]=qee(e[n],r):e[n]=r}}return e}function Uee(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 VT(e){return typeof e=="function"}function ty(e,t){return VT(e)?e(t):e??Zl}function qee(e,t){return t?e?n=>{if(Kee(n)){const o=n;ny(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function ny(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function FT(e,t){return t?e?t+" "+e:t:e}function Kee(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Qn(){}const dr=Object.freeze({}),Yee={style:{transition:"none"}},Xee="data-base-ui-click-trigger",Zee={fallbackAxisSide:"none"},Jee={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Un(e,t,n={}){const r=t.render,o=Qee(t,n);if(n.enabled===!1)return null;const i=n.state??dr;return tte(e,r,o,i)}function Qee(e,t={}){const{className:n,style:r,render:o}=e,{state:i=dr,ref:s,props:a,stateAttributesMapping:l,enabled:u=!0}=t,d=u?Bee(n,i):void 0,f=u?Hee(r,i):void 0,m=u?zee(i,l):dr,p=u?ey(m,Array.isArray(a)?Gee(a):a)??dr:dr;return typeof document<"u"&&(u?Array.isArray(s)?p.ref=jee([p.ref,$R(o),...s]):p.ref=Gf(p.ref,$R(o),s):Gf(null,null)),u?(d!==void 0&&(p.className=FT(p.className,d)),f!==void 0&&(p.style=ey(p.style,f)),p):dr}const ete=Symbol.for("react.lazy");function tte(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=jT(n,t.props);o.ref=n.ref;let i=t;if(i?.$$typeof===ete&&(i=c.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!c.isValidElement(i))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(`
|
|
174
|
+
`));return c.cloneElement(i,o)}if(e&&typeof e=="string")return nte(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Zr(8))}function nte(e,t){return e==="button"?ae.createElement("button",{type:"button",...t,key:t.key}):e==="img"?ae.createElement("img",{alt:"",...t,key:t.key}):c.createElement(e,t)}const Qd="none",rte="trigger-press",ote="trigger-hover",ite="outside-press",zR="clear-press",ste="chip-remove-press",Vu="input-change",BR="input-clear",$T="focus-out",ate="escape-key",zT="list-navigation";function Ut(e,t,n,r){let o=!1,i=!1;const s=dr;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...s}}const ry={...c};let HR=0;function lte(e,t="mui"){const[n,r]=c.useState(e),o=e||n;return c.useEffect(()=>{n==null&&(HR+=1,r(`${t}-${HR}`))},[n,t]),o}const GR=ry.useId;function e0(e,t){if(GR!==void 0){const n=GR();return e??(t?`${t}-${n}`:n)}return lte(e,t)}function t0(e){return e0(e,"base-ui")}const cte=[];function BT(e){c.useEffect(e,cte)}const Fu=null;let WR=globalThis.requestAnimationFrame;class ute{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"&&WR!==requestAnimationFrame&&(WR=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 $u=new ute;class ro{static create(){return new ro}static request(t){return $u.request(t)}static cancel(t){return $u.cancel(t)}currentId=Fu;request(t){this.cancel(),this.currentId=$u.request(()=>{this.currentId=Fu,t()})}cancel=()=>{this.currentId!==Fu&&($u.cancel(this.currentId),this.currentId=Fu)};disposeEffect=()=>this.cancel}function n0(){const e=yo(ro.create).current;return BT(e.disposeEffect),e}function qo(e){return e==null?e:"current"in e?e.current:e}let mc=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const dte={[mc.startingStyle]:""},fte={[mc.endingStyle]:""},HT={transitionStatus(e){return e==="starting"?dte:e==="ending"?fte:null}};function pte(e,t=!1,n=!0){const r=n0();return Zt((o,i=null)=>{r.cancel();function s(){dt.flushSync(o)}const a=qo(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=mc.startingStyle;if(!l.hasAttribute(f)){r.request(d);return}const m=new MutationObserver(()=>{l.hasAttribute(f)||(m.disconnect(),d())});m.observe(l,{attributes:!0,attributeFilter:[f]}),i?.addEventListener("abort",()=>m.disconnect(),{once:!0})},d=function(){Promise.all(l.getAnimations().map(f=>f.finished)).then(()=>{i?.aborted||s()}).catch(()=>{const f=l.getAnimations();if(n){if(i?.aborted)return;s()}else f.length>0&&f.some(m=>m.pending||m.playState!=="finished")&&d()})};if(t){u();return}r.request(d)}})}function mte(e,t=!1,n=!1){const[r,o]=c.useState(e&&t?"idle":void 0),[i,s]=c.useState(e);return e&&!i&&(s(!0),o("starting")),!e&&i&&r!=="ending"&&!n&&o("ending"),!e&&!i&&r==="ending"&&o(void 0),st(()=>{if(!e&&i&&r!=="ending"&&n){const a=ro.request(()=>{o("ending")});return()=>{ro.cancel(a)}}},[e,i,r,n]),st(()=>{if(!e||t)return;const a=ro.request(()=>{o(void 0)});return()=>{ro.cancel(a)}},[t,e]),st(()=>{if(!e||!t)return;e&&i&&r!=="idle"&&o("starting");const a=ro.request(()=>{o("idle")});return()=>{ro.cancel(a)}},[t,e,i,o,r]),c.useMemo(()=>({mounted:i,setMounted:s,transitionStatus:r}),[i,r])}let GT=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function WT(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:s,unregister:a,subscribeMapChange:l,elementsRef:u,labelsRef:d,nextIndexRef:f}=_ee(),m=c.useRef(-1),[p,v]=c.useState(i??(o===GT.GuessFromOrder?()=>{if(m.current===-1){const b=f.current;f.current+=1,m.current=b}return m.current}:-1)),g=c.useRef(null),h=c.useCallback(b=>{if(g.current=b,p!==-1&&b!==null&&(u.current[p]=b,d)){const y=t!==void 0;d.current[p]=y?t:r?.current?.textContent??b.textContent}},[p,u,d,t,r]);return st(()=>{if(i!=null)return;const b=g.current;if(b)return s(b,n),()=>{a(b)}},[i,s,a,n]),st(()=>{if(i==null)return l(b=>{const y=g.current?b.get(g.current)?.index:null;y!=null&&v(y)})},[i,l,v]),c.useMemo(()=>({ref:h,index:p}),[p,h])}function Lm(){return typeof window<"u"}function as(e){return r0(e)?(e.nodeName||"").toLowerCase():"#document"}function Ln(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ao(e){var t;return(t=(r0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function r0(e){return Lm()?e instanceof Node||e instanceof Ln(e).Node:!1}function bn(e){return Lm()?e instanceof Element||e instanceof Ln(e).Element:!1}function On(e){return Lm()?e instanceof HTMLElement||e instanceof Ln(e).HTMLElement:!1}function oy(e){return!Lm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ln(e).ShadowRoot}function ls(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Lr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function hte(e){return/^(table|td|th)$/.test(as(e))}function jm(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const gte=/transform|translate|scale|rotate|perspective|filter/,vte=/paint|layout|strict|content/,Os=e=>!!e&&e!=="none";let qg;function o0(e){const t=bn(e)?Lr(e):e;return Os(t.transform)||Os(t.translate)||Os(t.scale)||Os(t.rotate)||Os(t.perspective)||!i0()&&(Os(t.backdropFilter)||Os(t.filter))||gte.test(t.willChange||"")||vte.test(t.contain||"")}function bte(e){let t=Gi(e);for(;On(t)&&!ll(t);){if(o0(t))return t;if(jm(t))return null;t=Gi(t)}return null}function i0(){return qg==null&&(qg=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),qg}function ll(e){return/^(html|body|#document)$/.test(as(e))}function Lr(e){return Ln(e).getComputedStyle(e)}function Vm(e){return bn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Gi(e){if(as(e)==="html")return e;const t=e.assignedSlot||e.parentNode||oy(e)&&e.host||Ao(e);return oy(t)?t.host:t}function UT(e){const t=Gi(e);return ll(t)?e.ownerDocument?e.ownerDocument.body:e.body:On(t)&&ls(t)?t:UT(t)}function hc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=UT(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ln(o);if(i){const a=iy(s);return t.concat(s,s.visualViewport||[],ls(o)?o:[],a&&n?hc(a):[])}else return t.concat(o,hc(o,[],n))}function iy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}let sy;process.env.NODE_ENV!=="production"&&(sy=new Set);function UR(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");sy.has(t)||(sy.add(t),console.error(`Base UI: ${t}`))}}const qT=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(qT.displayName="CompositeRootContext");function yte(e=!1){const t=c.useContext(qT);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>.":Zr(16));return t}function xte(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,s=r&&t!==!1,a=r&&t===!1;return{props:c.useMemo(()=>{const l={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(l.tabIndex=o,!i&&n&&(l.tabIndex=t?o:-1)),(i&&(t||s)||!i&&n)&&(l["aria-disabled"]=n),i&&(!t||a)&&(l.disabled=n),l},[r,n,t,s,a,i,o])}}function Fm(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=c.useRef(null),s=yte(!0)!==void 0,a=Zt(()=>{const m=i.current;return!!(m?.tagName==="A"&&m?.href)}),{props:l}=xte({focusableWhenDisabled:n,disabled:t,composite:s,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&c.useEffect(()=>{if(!i.current)return;const m=i.current.tagName==="BUTTON";if(o){if(!m){const p=ry.captureOwnerStack?.()||"";UR(`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(m){const p=ry.captureOwnerStack?.()||"";UR(`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 m=i.current;wte(m)&&s&&t&&l.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,l.disabled,s]);st(u,[u]);const d=c.useCallback((m={})=>{const{onClick:p,onMouseDown:v,onKeyUp:g,onKeyDown:h,onPointerDown:b,...y}=m;return jT({type:o?"button":void 0,onClick(x){if(t){x.preventDefault();return}p?.(x)},onMouseDown(x){t||v?.(x)},onKeyDown(x){if(t||(ny(x),h?.(x)),x.baseUIHandlerPrevented)return;const w=x.target===x.currentTarget&&!o&&!a()&&!t,C=x.key==="Enter",R=x.key===" ";w&&((R||C)&&x.preventDefault(),C&&p?.(x))},onKeyUp(x){t||(ny(x),g?.(x)),!x.baseUIHandlerPrevented&&x.target===x.currentTarget&&!o&&!t&&x.key===" "&&p?.(x)},onPointerDown(x){if(t){x.preventDefault();return}b?.(x)}},o?void 0:{role:"button"},l,y)},[t,l,o,a]),f=Zt(m=>{i.current=m,u()});return{getButtonProps:d,buttonRef:f}}function wte(e){return On(e)&&e.tagName==="BUTTON"}const aa=typeof navigator<"u",Kg=Rte(),KT=Nte(),s0=Ste(),YT=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Ete=Kg.platform==="MacIntel"&&Kg.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Kg.platform),qR=aa&&/firefox/i.test(s0),Cte=aa&&/apple/i.test(navigator.vendor),Wf=aa&&/android/i.test(KT)||/android/i.test(s0);aa&&KT.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const kte=s0.includes("jsdom/");function Rte(){if(!aa)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 Ste(){if(!aa)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Nte(){if(!aa)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const KR="data-base-ui-focusable",Ote="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Ds(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Bt(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&oy(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Jl(e){return"composedPath"in e?e.composedPath()[0]:e.target}function a0(e){return On(e)&&e.matches(Ote)}function YR(e){return e?e.getAttribute("role")==="combobox"&&a0(e):!1}function XR(e){return e?e.hasAttribute(KR)?e:e.querySelector(`[${KR}]`)||e:null}function ay(e,t,n=!0){return e.filter(r=>r.parentId===t&&(!n||r.context?.open)).flatMap(r=>[r,...ay(e,r.id,n)])}function ZR(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(i=>i.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}function Mr(e){e.preventDefault(),e.stopPropagation()}function Ite(e){return e.pointerType===""&&e.isTrusted?!0:Wf&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Ate(e){return kte?!1:!Wf&&e.width===0&&e.height===0||Wf&&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 JR(e,t){return["mouse","pen"].includes(e)}function XT(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Mte=["top","right","bottom","left"],Wi=Math.min,ar=Math.max,Uf=Math.round,zu=Math.floor,mo=e=>({x:e,y:e}),Pte={left:"right",right:"left",bottom:"top",top:"bottom"};function qf(e,t,n){return ar(e,Wi(t,n))}function xo(e,t){return typeof e=="function"?e(t):e}function gr(e){return e.split("-")[0]}function oi(e){return e.split("-")[1]}function l0(e){return e==="x"?"y":"x"}function $m(e){return e==="y"?"height":"width"}function Nr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function zm(e){return l0(Nr(e))}function _te(e,t,n){n===void 0&&(n=!1);const r=oi(e),o=zm(e),i=$m(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Kf(s)),[s,Kf(s)]}function Tte(e){const t=Kf(e);return[ly(e),t,ly(t)]}function ly(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const QR=["left","right"],e1=["right","left"],Dte=["top","bottom"],Lte=["bottom","top"];function jte(e,t,n){switch(e){case"top":case"bottom":return n?t?e1:QR:t?QR:e1;case"left":case"right":return t?Dte:Lte;default:return[]}}function Vte(e,t,n,r){const o=oi(e);let i=jte(gr(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(ly)))),i}function Kf(e){const t=gr(e);return Pte[t]+e.slice(t.length)}function Fte(e){return{top:0,right:0,bottom:0,left:0,...e}}function c0(e){return typeof e!="number"?Fte(e):{top:e,right:e,bottom:e,left:e}}function Yf(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}}var $te=["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] *)"],Xf=$te.join(","),ZT=typeof Element>"u",cl=ZT?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Zf=!ZT&&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},Jf=function(e,t){var n;t===void 0&&(t=!0);var r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),o=r===""||r==="true",i=o||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):Jf(e.parentNode));return i},zte=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},JT=function(e,t,n){if(Jf(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Xf));return t&&cl.call(e,Xf)&&r.unshift(e),r=r.filter(n),r},Qf=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var i=o.shift();if(!Jf(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),a=s.length?s:i.children,l=Qf(a,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:i,candidates:l})}else{var u=cl.call(i,Xf);u&&n.filter(i)&&(t||!e.includes(i))&&r.push(i);var d=i.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(i),f=!Jf(d,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(d&&f){var m=Qf(d===!0?i.children:d.children,!0,n);n.flatten?r.push.apply(r,m):r.push({scopeParent:i,candidates:m})}else o.unshift.apply(o,i.children)}}return r},QT=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},eD=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||zte(e))&&!QT(e)?0:e.tabIndex},Bte=function(e,t){var n=eD(e);return n<0&&t&&!QT(e)?0:n},Hte=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},tD=function(e){return e.tagName==="INPUT"},Gte=function(e){return tD(e)&&e.type==="hidden"},Wte=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},Ute=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},qte=function(e){if(!e.name)return!0;var t=e.form||Zf(e),n=function(i){return t.querySelectorAll('input[type="radio"][name="'+i+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=n(window.CSS.escape(e.name));else try{r=n(e.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 o=Ute(r,e.form);return!o||o===e},Kte=function(e){return tD(e)&&e.type==="radio"},Yte=function(e){return Kte(e)&&!qte(e)},Xte=function(e){var t,n=e&&Zf(e),r=(t=n)===null||t===void 0?void 0:t.host,o=!1;if(n&&n!==e){var i,s,a;for(o=!!((i=r)!==null&&i!==void 0&&(s=i.ownerDocument)!==null&&s!==void 0&&s.contains(r)||e!=null&&(a=e.ownerDocument)!==null&&a!==void 0&&a.contains(e));!o&&r;){var l,u,d;n=Zf(r),r=(l=n)===null||l===void 0?void 0:l.host,o=!!((u=r)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(r))}}return o},t1=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},Zte=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e){var o=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(e).visibility==="hidden")return!0;var i=cl.call(e,"details>summary:first-of-type"),s=i?e.parentElement:e;if(cl.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof r=="function"){for(var a=e;e;){var l=e.parentElement,u=Zf(e);if(l&&!l.shadowRoot&&r(l)===!0)return t1(e);e.assignedSlot?e=e.assignedSlot:!l&&u!==e.ownerDocument?e=u.host:e=l}e=a}if(Xte(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return t1(e);return!1},Jte=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName==="LEGEND")return cl.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},cy=function(e,t){return!(t.disabled||Gte(t)||Zte(t,e)||Wte(t)||Jte(t))},uy=function(e,t){return!(Yte(t)||eD(t)<0||!cy(e,t))},Qte=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},nD=function(e){var t=[],n=[];return e.forEach(function(r,o){var i=!!r.scopeParent,s=i?r.scopeParent:r,a=Bte(s,i),l=i?nD(r.candidates):s;a===0?i?t.push.apply(t,l):t.push(s):n.push({documentOrder:o,tabIndex:a,item:r,isScope:i,content:l})}),n.sort(Hte).reduce(function(r,o){return o.isScope?r.push.apply(r,o.content):r.push(o.content),r},[]).concat(t)},Bm=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Qf([e],t.includeContainer,{filter:uy.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Qte}):n=JT(e,t.includeContainer,uy.bind(null,t)),nD(n)},ene=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Qf([e],t.includeContainer,{filter:cy.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=JT(e,t.includeContainer,cy.bind(null,t)),n},rD=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return cl.call(e,Xf)===!1?!1:uy(t,e)};function kn(e){return e?.ownerDocument||document}const Gc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function oD(e,t){const n=Bm(e,Gc()),r=n.length;if(r===0)return;const o=Ds(kn(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function iD(e){return oD(kn(e).body,1)||e}function sD(e){return oD(kn(e).body,-1)||e}function Ql(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Bt(n,r)}function tne(e){Bm(e,Gc()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function n1(e){e.querySelectorAll("[data-tabindex]").forEach(t=>{const n=t.dataset.tabindex;delete t.dataset.tabindex,n?t.setAttribute("tabindex",n):t.removeAttribute("tabindex")})}function aD(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=Zt(o),s=pte(r,n,!1);c.useEffect(()=>{if(!t)return;const a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,n,i,s])}const Ml=0;class gc{static create(){return new gc}currentId=Ml;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Ml,n()},t)}isStarted(){return this.currentId!==Ml}clear=()=>{this.currentId!==Ml&&(clearTimeout(this.currentId),this.currentId=Ml)};disposeEffect=()=>this.clear}function vc(){const e=yo(gc.create).current;return BT(e.disposeEffect),e}let r1={},o1={},i1="";function nne(e){if(typeof document>"u")return!1;const t=kn(e);return Ln(t).innerWidth-t.documentElement.clientWidth>0}function rne(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const t=kn(e),n=t.documentElement,r=t.body,o=ls(n)?n:r,i=o.style.overflowY,s=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",o.style.overflowY="scroll";const a=o.offsetWidth;o.style.overflowY="hidden";const l=o.offsetWidth;return o.style.overflowY=i,n.style.scrollbarGutter=s,a===l}function one(e){const t=kn(e),n=t.documentElement,r=t.body,o=ls(n)?n:r,i={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,i)}}function ine(e){const t=kn(e),n=t.documentElement,r=t.body,o=Ln(n);let i=0,s=0,a=!1;const l=ro.create();if(YT&&(o.visualViewport?.scale??1)!==1)return()=>{};function u(){const m=o.getComputedStyle(n),p=o.getComputedStyle(r),v=(m.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,s=n.scrollLeft,r1={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},i1=n.style.scrollBehavior,o1={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 g=n.scrollHeight>n.clientHeight,h=n.scrollWidth>n.clientWidth,b=m.overflowY==="scroll"||p.overflowY==="scroll",y=m.overflowX==="scroll"||p.overflowX==="scroll",x=Math.max(0,o.innerWidth-r.clientWidth),w=Math.max(0,o.innerHeight-r.clientHeight),C=parseFloat(p.marginTop)+parseFloat(p.marginBottom),R=parseFloat(p.marginLeft)+parseFloat(p.marginRight),k=ls(n)?n:r;if(a=rne(e),a){n.style.scrollbarGutter=v,k.style.overflowY="hidden",k.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:v,overflowY:"hidden",overflowX:"hidden"}),(g||b)&&(n.style.overflowY="scroll"),(h||y)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:C||w?`calc(100dvh - ${C+w}px)`:"100dvh",width:R||x?`calc(100vw - ${R+x}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=s,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function d(){Object.assign(n.style,r1),Object.assign(r.style,o1),a||(n.scrollTop=i,n.scrollLeft=s,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=i1)}function f(){d(),l.request(u)}return u(),o.addEventListener("resize",f),()=>{l.cancel(),d(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",f)}}class sne{lockCount=0;restore=null;timeoutLock=gc.create();timeoutUnlock=gc.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 n=kn(t).documentElement,r=Ln(n).getComputedStyle(n).overflowY;if(r==="hidden"||r==="clip"){this.restore=Qn;return}const o=Ete||!nne(t);this.restore=o?one(t):ine(t)}}const ane=new sne;function lne(e=!0,t=null){st(()=>{if(e)return ane.acquire(t)},[e,t])}function Ba(e){const t=yo(cne,e).current;return t.next=e,st(t.effect),t}function cne(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function une(){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 lD=c.createContext(null);process.env.NODE_ENV!=="production"&&(lD.displayName="FloatingNodeContext");const cD=c.createContext(null);process.env.NODE_ENV!=="production"&&(cD.displayName="FloatingTreeContext");const dne=()=>c.useContext(lD)?.id||null,uD=e=>{const t=c.useContext(cD);return e??t};function dy(e){return`data-base-ui-${e}`}const fne={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},dD={...fne,position:"fixed",top:0,left:0},bc=c.forwardRef(function(e,t){const[n,r]=c.useState();return st(()=>{Cte&&r("button")},[]),E.jsx("span",{...e,ref:t,style:dD,"aria-hidden":n?void 0:!0,tabIndex:0,role:n,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(bc.displayName="FocusGuard");let s1=0;function Yg(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(s1);const i=()=>e?.focus({preventScroll:n});o?i():s1=requestAnimationFrame(i)}const Ha={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function a1(e){return e==="inert"?Ha.inert:e==="aria-hidden"?Ha["aria-hidden"]:Ha.none}let Bu=new WeakSet,Hu={},Xg=0;const fD=e=>e&&(e.host||fD(e.parentNode)),pne=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=fD(n);return e.contains(r)?r:null}).filter(n=>n!=null);function mne(e,t,n,r){const o="data-base-ui-inert",i=r?"inert":n?"aria-hidden":null,s=pne(t,e),a=new Set,l=new Set(s),u=[];Hu[o]||(Hu[o]=new WeakMap);const d=Hu[o];s.forEach(f),m(t),a.clear();function f(p){!p||a.has(p)||(a.add(p),p.parentNode&&f(p.parentNode))}function m(p){!p||l.has(p)||[].forEach.call(p.children,v=>{if(as(v)!=="script")if(a.has(v))m(v);else{const g=i?v.getAttribute(i):null,h=g!==null&&g!=="false",b=a1(i),y=(b.get(v)||0)+1,x=(d.get(v)||0)+1;b.set(v,y),d.set(v,x),u.push(v),y===1&&h&&Bu.add(v),x===1&&v.setAttribute(o,""),!h&&i&&v.setAttribute(i,i==="inert"?"":"true")}})}return Xg+=1,()=>{u.forEach(p=>{const v=a1(i),g=(v.get(p)||0)-1,h=(d.get(p)||0)-1;v.set(p,g),d.set(p,h),g||(!Bu.has(p)&&i&&p.removeAttribute(i),Bu.delete(p)),h||p.removeAttribute(o)}),Xg-=1,Xg||(Ha.inert=new WeakMap,Ha["aria-hidden"]=new WeakMap,Ha.none=new WeakMap,Bu=new WeakSet,Hu={})}}function hne(e,t=!1,n=!1){const r=kn(e[0]).body;return mne(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const u0=c.createContext(null);process.env.NODE_ENV!=="production"&&(u0.displayName="PortalContext");const pD=()=>c.useContext(u0),gne=dy("portal");function vne(e={}){const{ref:t,container:n,componentProps:r=dr,elementProps:o}=e,i=e0(),s=pD()?.portalNode,[a,l]=c.useState(null),[u,d]=c.useState(null),f=Zt(v=>{v!==null&&d(v)}),m=c.useRef(null);st(()=>{if(n===null){m.current&&(m.current=null,d(null),l(null));return}if(i==null)return;const v=(n&&(r0(n)?n:n.current))??s??document.body;if(v==null){m.current&&(m.current=null,d(null),l(null));return}m.current!==v&&(m.current=v,d(null),l(v))},[n,s,i]);const p=Un("div",r,{ref:[t,f],props:[{id:i,[gne]:""},o]});return{portalNode:u,portalSubtree:a&&p?dt.createPortal(p,a):null}}const mD=c.forwardRef(function(e,t){const{children:n,container:r,className:o,render:i,renderGuards:s,...a}=e,{portalNode:l,portalSubtree:u}=vne({container:r,ref:t,componentProps:e,elementProps:a}),d=c.useRef(null),f=c.useRef(null),m=c.useRef(null),p=c.useRef(null),[v,g]=c.useState(null),h=v?.modal,b=v?.open,y=typeof s=="boolean"?s:!!v&&!v.modal&&v.open&&!!l;c.useEffect(()=>{if(!l||h)return;function w(C){l&&C.relatedTarget&&Ql(C)&&(C.type==="focusin"?n1:tne)(l)}return l.addEventListener("focusin",w,!0),l.addEventListener("focusout",w,!0),()=>{l.removeEventListener("focusin",w,!0),l.removeEventListener("focusout",w,!0)}},[l,h]),c.useEffect(()=>{!l||b||n1(l)},[b,l]);const x=c.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:m,afterInsideRef:p,portalNode:l,setFocusManagerState:g}),[l]);return E.jsxs(c.Fragment,{children:[u,E.jsxs(u0.Provider,{value:x,children:[y&&l&&E.jsx(bc,{"data-type":"outside",ref:d,onFocus:w=>{if(Ql(w,l))m.current?.focus();else{const C=v?v.domReference:null;sD(C)?.focus()}}}),y&&l&&E.jsx("span",{"aria-owns":l.id,style:Jee}),l&&dt.createPortal(n,l),y&&l&&E.jsx(bc,{"data-type":"outside",ref:f,onFocus:w=>{if(Ql(w,l))p.current?.focus();else{const C=v?v.domReference:null;iD(C)?.focus(),v?.closeOnFocusOut&&v?.onOpenChange(!1,Ut($T,w.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(mD.displayName="FloatingPortal");function bne(e,t){const n=Ln(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 l1=20;let Oi=[];function d0(){Oi=Oi.filter(e=>e.deref()?.isConnected)}function yne(e){d0(),e&&as(e)!=="body"&&(Oi.push(new WeakRef(e)),Oi.length>l1&&(Oi=Oi.slice(-l1)))}function Zg(){return d0(),Oi[Oi.length-1]?.deref()}function xne(e){if(!e)return null;const t=Gc();return rD(e,t)?e:Bm(e,t)[0]||e}function wne(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Lr(e).display!=="none"}function c1(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=Gc(),r=ene(e,n).filter(i=>{const s=i.getAttribute("data-tabindex")||"";return rD(i,n)||i.hasAttribute("data-tabindex")&&!s.startsWith("-")}),o=e.getAttribute("tabindex");t.current.includes("floating")||r.length===0?o!=="0"&&e.setAttribute("tabindex","0"):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Ene(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:i=!0,restoreFocus:s=!1,modal:a=!0,closeOnFocusOut:l=!0,openInteractionType:u="",nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:m,externalTree:p}=e,v="rootStore"in t?t.rootStore:t,g=v.useState("open"),h=v.useState("domReferenceElement"),b=v.useState("floatingElement"),{events:y,dataRef:x}=v.context,w=Zt(()=>x.current.floatingContext?.nodeId),C=o===!1,R=YR(h)&&C,k=c.useRef(["content"]),S=Ba(o),P=Ba(i),L=Ba(u),_=uD(p),O=pD(),B=c.useRef(null),I=c.useRef(null),V=c.useRef(!1),F=c.useRef(!1),D=c.useRef(!1),T=c.useRef(-1),q=c.useRef(""),A=c.useRef(""),ee=c.useRef(null),ie=c.useRef(null),Y=Gf(ee,m,O?.beforeInsideRef),Q=Gf(ie,O?.afterInsideRef),X=vc(),J=vc(),te=n0(),le=O!=null,z=XR(b),re=Zt((N=z)=>N?Bm(N,Gc()):[]),oe=Zt(N=>{const j=re(N);return k.current.map(()=>j).filter(Boolean).flat()});c.useEffect(()=>{if(r||!a)return;function N(K){K.key==="Tab"&&Bt(z,Ds(kn(z)))&&re().length===0&&!R&&Mr(K)}const j=kn(z);return j.addEventListener("keydown",N),()=>{j.removeEventListener("keydown",N)}},[r,h,z,a,k,R,re,oe]),c.useEffect(()=>{if(r||!g)return;const N=kn(z);function j(){D.current=!1}function K(U){const $=Jl(U),W=Bt(b,$)||Bt(h,$)||Bt(O?.portalNode,$);D.current=!W,A.current=U.pointerType||"keyboard",$?.closest(`[${Xee}]`)&&(F.current=!0)}function H(){A.current="keyboard"}return N.addEventListener("pointerdown",K,!0),N.addEventListener("pointerup",j,!0),N.addEventListener("pointercancel",j,!0),N.addEventListener("keydown",H,!0),()=>{N.removeEventListener("pointerdown",K,!0),N.removeEventListener("pointerup",j,!0),N.removeEventListener("pointercancel",j,!0),N.removeEventListener("keydown",H,!0)}},[r,b,h,z,g,O]),c.useEffect(()=>{if(r||!l)return;const N=kn(z);function j(){F.current=!0,J.start(0,()=>{F.current=!1})}function K(Z){const G=Jl(Z),ne=re().indexOf(G);ne!==-1&&(T.current=ne)}function H(Z){const G=Z.relatedTarget,ne=Z.currentTarget,we=Jl(Z);queueMicrotask(()=>{const Ve=w(),Ye=v.context.triggerElements,ft=G?.hasAttribute(dy("focus-guard"))&&[ee.current,ie.current,O?.beforeInsideRef.current,O?.afterInsideRef.current,O?.beforeOutsideRef.current,O?.afterOutsideRef.current,qo(f),qo(d)].includes(G),qe=!(Bt(h,G)||Bt(b,G)||Bt(G,b)||Bt(O?.portalNode,G)||G!=null&&Ye.hasElement(G)||Ye.hasMatchingElement(ce=>Bt(ce,G))||ft||_&&(ay(_.nodesRef.current,Ve).find(ce=>Bt(ce.context?.elements.floating,G)||Bt(ce.context?.elements.domReference,G))||ZR(_.nodesRef.current,Ve).find(ce=>[ce.context?.elements.floating,XR(ce.context?.elements.floating)].includes(G)||ce.context?.elements.domReference===G)));if(ne===h&&z&&c1(z,k),s&&ne!==h&&!wne(we)&&Ds(N)===N.body){if(On(z)&&(z.focus(),s==="popup")){te.request(()=>{z.focus()});return}const ce=T.current,Ke=re(),ot=Ke[ce]||Ke[Ke.length-1]||z;On(ot)&&ot.focus()}if(x.current.insideReactTree){x.current.insideReactTree=!1;return}(R||!a)&&G&&qe&&!F.current&&(R||G!==Zg())&&(V.current=!0,v.setOpen(!1,Ut($T,Z)))})}function U(){D.current||(x.current.insideReactTree=!0,X.start(0,()=>{x.current.insideReactTree=!1}))}const $=On(h)?h:null,W=[];if(!(!b&&!$))return $&&($.addEventListener("focusout",H),$.addEventListener("pointerdown",j),W.push(()=>{$.removeEventListener("focusout",H),$.removeEventListener("pointerdown",j)})),b&&(b.addEventListener("focusin",K),b.addEventListener("focusout",H),O&&(b.addEventListener("focusout",U,!0),W.push(()=>{b.removeEventListener("focusout",U,!0)})),W.push(()=>{b.removeEventListener("focusin",K),b.removeEventListener("focusout",H)})),()=>{W.forEach(Z=>{Z()})}},[r,h,b,z,a,_,O,v,l,s,re,R,w,k,x,X,J,te,d,f]),c.useEffect(()=>{if(r||!b||!g)return;const N=Array.from(O?.portalNode?.querySelectorAll(`[${dy("portal")}]`)||[]),j=(_?ZR(_.nodesRef.current,w()):[]).find(H=>YR(H.context?.elements.domReference||null))?.context?.elements.domReference,K=[b,j,...N,B.current,I.current,ee.current,ie.current,O?.beforeOutsideRef.current,O?.afterOutsideRef.current,qo(f),qo(d),R?h:null].filter(H=>H!=null);return hne(K,a||R)},[g,r,h,b,a,k,O,R,_,w,d,f]),st(()=>{if(!g||r||!On(z))return;const N=kn(z),j=Ds(N);queueMicrotask(()=>{const K=oe(z),H=S.current,U=typeof H=="function"?H(L.current||""):H;if(U===void 0||U===!1)return;let $;U===!0||U===null?$=K[0]||z:$=qo(U),$=$||K[0]||z,!Bt(z,j)&&Yg($,{preventScroll:$===z})})},[r,g,z,C,oe,S,L]),st(()=>{if(r||!z)return;const N=kn(z),j=Ds(N);yne(j);function K($){if($.open||(q.current=bne($.nativeEvent,A.current)),$.reason===ote&&$.nativeEvent.type==="mouseleave"&&(V.current=!0),$.reason===ite)if($.nested)V.current=!1;else if(Ite($.nativeEvent)||Ate($.nativeEvent))V.current=!1;else{let W=!1;document.createElement("div").focus({get preventScroll(){return W=!0,!1}}),W?V.current=!1:V.current=!0}}y.on("openchange",K);const H=N.createElement("span");H.setAttribute("tabindex","-1"),H.setAttribute("aria-hidden","true"),Object.assign(H.style,dD),le&&h&&h.insertAdjacentElement("afterend",H);function U(){const $=P.current;let W=typeof $=="function"?$(q.current):$;if(W===void 0||W===!1)return null;if(W===null&&(W=!0),typeof W=="boolean"){const G=h||Zg();return G&&G.isConnected?G:H}const Z=h||Zg()||H;return qo(W)||Z}return()=>{y.off("openchange",K);const $=Ds(N),W=Bt(b,$)||_&&ay(_.nodesRef.current,w(),!1).some(G=>Bt(G.context?.elements.floating,$)),Z=U();queueMicrotask(()=>{const G=xne(Z),ne=typeof P.current!="boolean";P.current&&!V.current&&On(G)&&(!(!ne&&G!==$&&$!==N.body)||W)&&G.focus({preventScroll:!0}),H.remove(),V.current=!1})}},[r,b,z,P,x,y,_,le,h,w]),st(()=>{if(!YT||g||!b)return;const N=Ds(kn(b));!On(N)||!a0(N)||Bt(b,N)&&N.blur()},[g,b]),st(()=>{if(!(r||!O))return O.setFocusManagerState({modal:a,closeOnFocusOut:l,open:g,onOpenChange:v.setOpen,domReference:h}),()=>{O.setFocusManagerState(null)}},[r,O,a,g,v,l,h]),st(()=>{if(!(r||!z))return c1(z,k),()=>{queueMicrotask(d0)}},[r,z,k]);const M=!r&&(a?!R:!0)&&(le||a);return E.jsxs(c.Fragment,{children:[M&&E.jsx(bc,{"data-type":"inside",ref:Y,onFocus:N=>{if(a){const j=oe();Yg(j[j.length-1])}else O?.portalNode&&(V.current=!1,Ql(N,O.portalNode)?iD(h)?.focus():qo(f??O.beforeOutsideRef)?.focus())}}),n,M&&E.jsx(bc,{"data-type":"inside",ref:Q,onFocus:N=>{a?Yg(oe()[0]):O?.portalNode&&(l&&(V.current=!0),Ql(N,O.portalNode)?sD(h)?.focus():qo(d??O.afterOutsideRef)?.focus())}})]})}function Cne(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:i="click",toggle:s=!0,ignoreMouse:a=!1,stickIfOpen:l=!0,touchOpenDelay:u=0,reason:d=rte}=t,f=c.useRef(void 0),m=n0(),p=vc(),v=c.useMemo(()=>({onPointerDown(g){f.current=g.pointerType},onMouseDown(g){const h=f.current,b=g.nativeEvent,y=n.select("open");if(g.button!==0||i==="click"||JR(h)&&a)return;const x=r.current.openEvent,w=x?.type,C=n.select("domReferenceElement")!==g.currentTarget,R=y&&C||!(y&&s&&(!(x&&l)||w==="click"||w==="mousedown"));if(a0(b.target)){const S=Ut(d,b,b.target);R&&h==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,S)}):n.setOpen(R,S);return}const k=g.currentTarget;m.request(()=>{const S=Ut(d,b,k);R&&h==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,S)}):n.setOpen(R,S)})},onClick(g){if(i==="mousedown-only")return;const h=f.current;if(i==="mousedown"&&h){f.current=void 0;return}if(JR(h)&&a)return;const b=n.select("open"),y=r.current.openEvent,x=n.select("domReferenceElement")!==g.currentTarget,w=b&&x||!(b&&s&&(!(y&&l)||XT(y))),C=Ut(d,g.nativeEvent,g.currentTarget);w&&h==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,C)}):n.setOpen(w,C)},onKeyDown(){f.current=void 0}}),[r,i,a,n,l,s,m,p,u,d]);return c.useMemo(()=>o?{reference:v}:dr,[o,v])}function u1(e,t,n){let{reference:r,floating:o}=e;const i=Nr(t),s=zm(t),a=$m(s),l=gr(t),u=i==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,m=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(oi(t)){case"start":p[s]-=m*(n&&u?-1:1);break;case"end":p[s]+=m*(n&&u?-1:1);break}return p}async function kne(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:p=0}=xo(t,e),v=c0(p),g=a[m?f==="floating"?"reference":"floating":f],h=Yf(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),b=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},w=Yf(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:y,strategy:l}):b);return{top:(h.top-w.top+v.top)/x.y,bottom:(w.bottom-h.bottom+v.bottom)/x.y,left:(h.left-w.left+v.left)/x.x,right:(w.right-h.right+v.right)/x.x}}const Rne=50,Sne=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:kne},l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=u1(u,r,l),m=r,p=0;const v={};for(let g=0;g<i.length;g++){const h=i[g];if(!h)continue;const{name:b,fn:y}=h,{x,y:w,data:C,reset:R}=await y({x:d,y:f,initialPlacement:r,placement:m,strategy:o,middlewareData:v,rects:u,platform:a,elements:{reference:e,floating:t}});d=x??d,f=w??f,v[b]={...v[b],...C},R&&p<Rne&&(p++,typeof R=="object"&&(R.placement&&(m=R.placement),R.rects&&(u=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:d,y:f}=u1(u,m,l)),g=-1)}return{x:d,y:f,placement:m,strategy:o,middlewareData:v}},Nne=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=xo(e,t)||{};if(u==null)return{};const f=c0(d),m={x:n,y:r},p=zm(o),v=$m(p),g=await s.getDimensions(u),h=p==="y",b=h?"top":"left",y=h?"bottom":"right",x=h?"clientHeight":"clientWidth",w=i.reference[v]+i.reference[p]-m[p]-i.floating[v],C=m[p]-i.reference[p],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let k=R?R[x]:0;(!k||!await(s.isElement==null?void 0:s.isElement(R)))&&(k=a.floating[x]||i.floating[v]);const S=w/2-C/2,P=k/2-g[v]/2-1,L=Wi(f[b],P),_=Wi(f[y],P),O=L,B=k-g[v]-_,I=k/2-g[v]/2+S,V=qf(O,I,B),F=!l.arrow&&oi(o)!=null&&I!==V&&i.reference[v]/2-(I<O?L:_)-g[v]/2<0,D=F?I<O?I-O:I-B:0;return{[p]:m[p]+D,data:{[p]:V,centerOffset:I-V-D,...F&&{alignmentOffset:D}},reset:F}}}),One=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...h}=xo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=gr(o),y=Nr(a),x=gr(a)===a,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=m||(x||!g?[Kf(a)]:Tte(a)),R=v!=="none";!m&&R&&C.push(...Vte(a,g,v,w));const k=[a,...C],S=await l.detectOverflow(t,h),P=[];let L=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&P.push(S[b]),f){const I=_te(o,s,w);P.push(S[I[0]],S[I[1]])}if(L=[...L,{placement:o,overflows:P}],!P.every(I=>I<=0)){var _,O;const I=(((_=i.flip)==null?void 0:_.index)||0)+1,V=k[I];if(V&&(!(f==="alignment"&&y!==Nr(V))||L.every(D=>Nr(D.placement)===y?D.overflows[0]>0:!0)))return{data:{index:I,overflows:L},reset:{placement:V}};let F=(O=L.filter(D=>D.overflows[0]<=0).sort((D,T)=>D.overflows[1]-T.overflows[1])[0])==null?void 0:O.placement;if(!F)switch(p){case"bestFit":{var B;const D=(B=L.filter(T=>{if(R){const q=Nr(T.placement);return q===y||q==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(q=>q>0).reduce((q,A)=>q+A,0)]).sort((T,q)=>T[1]-q[1])[0])==null?void 0:B[0];D&&(F=D);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function d1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function f1(e){return Mte.some(t=>e[t]>=0)}const Ine=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=xo(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=d1(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:f1(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=d1(s,n.floating);return{data:{escapedOffsets:a,escaped:f1(a)}}}default:return{}}}}},hD=new Set(["left","top"]);async function Ane(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=gr(n),a=oi(n),l=Nr(n)==="y",u=hD.has(s)?-1:1,d=i&&l?-1:1,f=xo(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof v=="number"&&(p=a==="end"?v*-1:v),l?{x:p*d,y:m*u}:{x:m*u,y:p*d}}const Mne=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await Ane(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Pne=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:y,y:x}=b;return{x:y,y:x}}},...u}=xo(e,t),d={x:n,y:r},f=await i.detectOverflow(t,u),m=Nr(gr(o)),p=l0(m);let v=d[p],g=d[m];if(s){const b=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=v+f[b],w=v-f[y];v=qf(x,v,w)}if(a){const b=m==="y"?"top":"left",y=m==="y"?"bottom":"right",x=g+f[b],w=g-f[y];g=qf(x,g,w)}const h=l.fn({...t,[p]:v,[m]:g});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:s,[m]:a}}}}}},_ne=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=xo(e,t),d={x:n,y:r},f=Nr(o),m=l0(f);let p=d[m],v=d[f];const g=xo(a,t),h=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const x=m==="y"?"height":"width",w=i.reference[m]-i.floating[x]+h.mainAxis,C=i.reference[m]+i.reference[x]-h.mainAxis;p<w?p=w:p>C&&(p=C)}if(u){var b,y;const x=m==="y"?"width":"height",w=hD.has(gr(o)),C=i.reference[f]-i.floating[x]+(w&&((b=s.offset)==null?void 0:b[f])||0)+(w?0:h.crossAxis),R=i.reference[f]+i.reference[x]+(w?0:((y=s.offset)==null?void 0:y[f])||0)-(w?h.crossAxis:0);v<C?v=C:v>R&&(v=R)}return{[m]:p,[f]:v}}}},Tne=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=xo(e,t),d=await s.detectOverflow(t,u),f=gr(o),m=oi(o),p=Nr(o)==="y",{width:v,height:g}=i.floating;let h,b;f==="top"||f==="bottom"?(h=f,b=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=f,h=m==="end"?"top":"bottom");const y=g-d.top-d.bottom,x=v-d.left-d.right,w=Wi(g-d[h],y),C=Wi(v-d[b],x),R=!t.middlewareData.shift;let k=w,S=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=y),R&&!m){const L=ar(d.left,0),_=ar(d.right,0),O=ar(d.top,0),B=ar(d.bottom,0);p?S=v-2*(L!==0||_!==0?L+_:ar(d.left,d.right)):k=g-2*(O!==0||B!==0?O+B:ar(d.top,d.bottom))}await l({...t,availableWidth:S,availableHeight:k});const P=await s.getDimensions(a.floating);return v!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function gD(e){const t=Lr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=On(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Uf(n)!==i||Uf(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function f0(e){return bn(e)?e:e.contextElement}function Ga(e){const t=f0(e);if(!On(t))return mo(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=gD(t);let s=(i?Uf(n.width):n.width)/r,a=(i?Uf(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Dne=mo(0);function vD(e){const t=Ln(e);return!i0()||!t.visualViewport?Dne:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Lne(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ln(e)?!1:t}function Gs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=f0(e);let s=mo(1);t&&(r?bn(r)&&(s=Ga(r)):s=Ga(e));const a=Lne(i,n,r)?vD(i):mo(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,d=o.width/s.x,f=o.height/s.y;if(i){const m=Ln(i),p=r&&bn(r)?Ln(r):r;let v=m,g=iy(v);for(;g&&r&&p!==v;){const h=Ga(g),b=g.getBoundingClientRect(),y=Lr(g),x=b.left+(g.clientLeft+parseFloat(y.paddingLeft))*h.x,w=b.top+(g.clientTop+parseFloat(y.paddingTop))*h.y;l*=h.x,u*=h.y,d*=h.x,f*=h.y,l+=x,u+=w,v=Ln(g),g=iy(v)}}return Yf({width:d,height:f,x:l,y:u})}function Hm(e,t){const n=Vm(e).scrollLeft;return t?t.left+n:Gs(Ao(e)).left+n}function bD(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Hm(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function jne(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Ao(r),a=t?jm(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=mo(1);const d=mo(0),f=On(r);if((f||!f&&!i)&&((as(r)!=="body"||ls(s))&&(l=Vm(r)),f)){const p=Gs(r);u=Ga(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const m=s&&!f&&!i?bD(s,l):mo(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+m.x,y:n.y*u.y-l.scrollTop*u.y+d.y+m.y}}function Vne(e){return Array.from(e.getClientRects())}function Fne(e){const t=Ao(e),n=Vm(e),r=e.ownerDocument.body,o=ar(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ar(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Hm(e);const a=-n.scrollTop;return Lr(r).direction==="rtl"&&(s+=ar(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const p1=25;function $ne(e,t){const n=Ln(e),r=Ao(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const d=i0();(!d||d&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const u=Hm(r);if(u<=0){const d=r.ownerDocument,f=d.body,m=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,v=Math.abs(r.clientWidth-f.clientWidth-p);v<=p1&&(i-=v)}else u<=p1&&(i+=u);return{width:i,height:s,x:a,y:l}}function zne(e,t){const n=Gs(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=On(e)?Ga(e):mo(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function m1(e,t,n){let r;if(t==="viewport")r=$ne(e,n);else if(t==="document")r=Fne(Ao(e));else if(bn(t))r=zne(t,n);else{const o=vD(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Yf(r)}function yD(e,t){const n=Gi(e);return n===t||!bn(n)||ll(n)?!1:Lr(n).position==="fixed"||yD(n,t)}function Bne(e,t){const n=t.get(e);if(n)return n;let r=hc(e,[],!1).filter(a=>bn(a)&&as(a)!=="body"),o=null;const i=Lr(e).position==="fixed";let s=i?Gi(e):e;for(;bn(s)&&!ll(s);){const a=Lr(s),l=o0(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&o&&(o.position==="absolute"||o.position==="fixed")||ls(s)&&!l&&yD(e,s))?r=r.filter(u=>u!==s):o=a,s=Gi(s)}return t.set(e,r),r}function Hne(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?jm(t)?[]:Bne(t,this._c):[].concat(n),r],s=m1(t,i[0],o);let a=s.top,l=s.right,u=s.bottom,d=s.left;for(let f=1;f<i.length;f++){const m=m1(t,i[f],o);a=ar(m.top,a),l=Wi(m.right,l),u=Wi(m.bottom,u),d=ar(m.left,d)}return{width:l-d,height:u-a,x:d,y:a}}function Gne(e){const{width:t,height:n}=gD(e);return{width:t,height:n}}function Wne(e,t,n){const r=On(t),o=Ao(t),i=n==="fixed",s=Gs(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=mo(0);function u(){l.x=Hm(o)}if(r||!r&&!i)if((as(t)!=="body"||ls(o))&&(a=Vm(t)),r){const p=Gs(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&u();i&&!r&&o&&u();const d=o&&!r&&!i?bD(o,a):mo(0),f=s.left+a.scrollLeft-l.x-d.x,m=s.top+a.scrollTop-l.y-d.y;return{x:f,y:m,width:s.width,height:s.height}}function Jg(e){return Lr(e).position==="static"}function h1(e,t){if(!On(e)||Lr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ao(e)===n&&(n=n.ownerDocument.body),n}function xD(e,t){const n=Ln(e);if(jm(e))return n;if(!On(e)){let o=Gi(e);for(;o&&!ll(o);){if(bn(o)&&!Jg(o))return o;o=Gi(o)}return n}let r=h1(e,t);for(;r&&hte(r)&&Jg(r);)r=h1(r,t);return r&&ll(r)&&Jg(r)&&!o0(r)?n:r||bte(e)||n}const Une=async function(e){const t=this.getOffsetParent||xD,n=this.getDimensions,r=await n(e.floating);return{reference:Wne(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function qne(e){return Lr(e).direction==="rtl"}const Kne={convertOffsetParentRelativeRectToViewportRelativeRect:jne,getDocumentElement:Ao,getClippingRect:Hne,getOffsetParent:xD,getElementRects:Une,getClientRects:Vne,getDimensions:Gne,getScale:Ga,isElement:bn,isRTL:qne};function wD(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Yne(e,t){let n=null,r;const o=Ao(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:d,top:f,width:m,height:p}=u;if(a||t(),!m||!p)return;const v=zu(f),g=zu(o.clientWidth-(d+m)),h=zu(o.clientHeight-(f+p)),b=zu(d),y={rootMargin:-v+"px "+-g+"px "+-h+"px "+-b+"px",threshold:ar(0,Wi(1,l))||1};let x=!0;function w(C){const R=C[0].intersectionRatio;if(R!==l){if(!x)return s();R?s(!1,R):r=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!wD(u,e.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(w,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(w,y)}n.observe(e)}return s(!0),i}function fy(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=f0(e),d=o||i?[...u?hc(u):[],...t?hc(t):[]]:[];d.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const f=u&&a?Yne(u,n):null;let m=-1,p=null;s&&(p=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),u&&!l&&p.observe(u),t&&p.observe(t));let v,g=l?Gs(e):null;l&&h();function h(){const b=Gs(e);g&&!wD(g,b)&&n(),g=b,v=requestAnimationFrame(h)}return n(),()=>{var b;d.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f?.(),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(v)}}const Xne=Mne,Zne=Pne,Jne=One,Qne=Tne,ere=Ine,g1=Nne,tre=_ne,nre=(e,t,n)=>{const r=new Map,o={platform:Kne,...n},i={...o.platform,_c:r};return Sne(e,t,{...o,platform:i})};var rre=typeof document<"u",ore=function(){},ef=rre?ae.useLayoutEffect:ore;function ep(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(!ep(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 i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!ep(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ED(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function v1(e,t){const n=ED(e);return Math.round(t*n)/n}function Qg(e){const t=c.useRef(e);return ef(()=>{t.current=e}),t}function CD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,f]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=c.useState(r);ep(m,r)||p(r);const[v,g]=c.useState(null),[h,b]=c.useState(null),y=c.useCallback(T=>{T!==R.current&&(R.current=T,g(T))},[]),x=c.useCallback(T=>{T!==k.current&&(k.current=T,b(T))},[]),w=i||v,C=s||h,R=c.useRef(null),k=c.useRef(null),S=c.useRef(d),P=l!=null,L=Qg(l),_=Qg(o),O=Qg(u),B=c.useCallback(()=>{if(!R.current||!k.current)return;const T={placement:t,strategy:n,middleware:m};_.current&&(T.platform=_.current),nre(R.current,k.current,T).then(q=>{const A={...q,isPositioned:O.current!==!1};I.current&&!ep(S.current,A)&&(S.current=A,dt.flushSync(()=>{f(A)}))})},[m,t,n,_,O]);ef(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,f(T=>({...T,isPositioned:!1})))},[u]);const I=c.useRef(!1);ef(()=>(I.current=!0,()=>{I.current=!1}),[]),ef(()=>{if(w&&(R.current=w),C&&(k.current=C),w&&C){if(L.current)return L.current(w,C,B);B()}},[w,C,B,L,P]);const V=c.useMemo(()=>({reference:R,floating:k,setReference:y,setFloating:x}),[y,x]),F=c.useMemo(()=>({reference:w,floating:C}),[w,C]),D=c.useMemo(()=>{const T={position:n,left:0,top:0};if(!F.floating)return T;const q=v1(F.floating,d.x),A=v1(F.floating,d.y);return a?{...T,transform:"translate("+q+"px, "+A+"px)",...ED(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:A}},[n,a,F.floating,d.x,d.y]);return c.useMemo(()=>({...d,update:B,refs:V,elements:F,floatingStyles:D}),[d,B,V,F,D])}const ire=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?g1({element:r.current,padding:o}).fn(n):{}:r?g1({element:r,padding:o}).fn(n):{}}}},kD=(e,t)=>{const n=Xne(e);return{name:n.name,fn:n.fn,options:[e,t]}},RD=(e,t)=>{const n=Zne(e);return{name:n.name,fn:n.fn,options:[e,t]}},SD=(e,t)=>({fn:tre(e).fn,options:[e,t]}),ND=(e,t)=>{const n=Jne(e);return{name:n.name,fn:n.fn,options:[e,t]}},OD=(e,t)=>{const n=Qne(e);return{name:n.name,fn:n.fn,options:[e,t]}},ID=(e,t)=>{const n=ere(e);return{name:n.name,fn:n.fn,options:[e,t]}},sre=(e,t)=>{const n=ire(e);return{name:n.name,fn:n.fn,options:[e,t]}};var are=(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(i){({stack:o}=i)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
175
|
+
\`createSelector([state => state.todos], todos => todos)\`
|
|
176
|
+
This could lead to inefficient memoization and unnecessary re-renders.
|
|
177
|
+
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},lre=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:i,inputSelectorResultsCopy:s}=e,a=r(()=>({}),...o);if(a.apply(null,i)!==a.apply(null,s)){let l;try{throw new Error}catch(u){({stack:l}=u)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
178
|
+
This means your output selector will likely run more frequently than intended.
|
|
179
|
+
Avoid returning a new reference inside your input selector, e.g.
|
|
180
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:i,secondInputs:s,stack:l})}},cre={inputStabilityCheck:"once",identityFunctionCheck:"once"},tp=Symbol("NOT_FOUND");function ure(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function dre(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function fre(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 b1=e=>Array.isArray(e)?e:[e];function pre(e){const t=Array.isArray(e[0])?e[0]:e;return fre(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function y1(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var mre=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...cre,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:are},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:lre}}};function hre(e){let t;return{get(n){return t&&e(t.key,n)?t.value:tp},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function gre(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 tp}function o(a,l){r(a)===tp&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var vre=(e,t)=>e===t;function bre(e){return function(t,n){if(t===null||n===null||t.length!==n.length)return!1;const{length:r}=t;for(let o=0;o<r;o++)if(!e(t[o],n[o]))return!1;return!0}}function yre(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=vre,maxSize:o=1,resultEqualityCheck:i}=n,s=bre(r);let a=0;const l=o<=1?hre(s):gre(o,s);function u(){let d=l.get(arguments);if(d===tp){if(d=e.apply(null,arguments),a++,i){const f=l.getEntries().find(m=>i(m.value,d));f&&(d=f.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 xre=class{constructor(e){this.value=e}deref(){return this.value}},wre=typeof WeakRef<"u"?WeakRef:xre,Ere=0,x1=1;function Gu(){return{s:Ere,v:void 0,o:null,p:null}}function AD(e,t={}){let n=Gu();const{resultEqualityCheck:r}=t;let o,i=0;function s(){let a=n;const{length:l}=arguments;for(let f=0,m=l;f<m;f++){const p=arguments[f];if(typeof p=="function"||typeof p=="object"&&p!==null){let v=a.o;v===null&&(a.o=v=new WeakMap);const g=v.get(p);g===void 0?(a=Gu(),v.set(p,a)):a=g}else{let v=a.p;v===null&&(a.p=v=new Map);const g=v.get(p);g===void 0?(a=Gu(),v.set(p,a)):a=g}}const u=a;let d;if(a.s===x1)d=a.v;else if(d=e.apply(null,arguments),i++,r){const f=o?.deref?.()??o;f!=null&&r(f,d)&&(d=f,i!==0&&i--),o=typeof d=="object"&&d!==null||typeof d=="function"?new wre(d):d}return u.s=x1,u.v=d,d}return s.clearCache=()=>{n=Gu(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function MD(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,s=0,a,l={},u=o.pop();typeof u=="object"&&(l=u,u=o.pop()),ure(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const d={...n,...l},{memoize:f,memoizeOptions:m=[],argsMemoize:p=AD,argsMemoizeOptions:v=[],devModeChecks:g={}}=d,h=b1(m),b=b1(v),y=pre(o),x=f(function(){return i++,u.apply(null,arguments)},...h);let w=!0;const C=p(function(){s++;const R=y1(y,arguments);if(a=x.apply(null,R),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:k,inputStabilityCheck:S}=mre(w,g);if(k.shouldRun&&k.run(u,R,a),S.shouldRun){const P=y1(y,arguments);S.run({inputSelectorResults:R,inputSelectorResultsCopy:P},{memoize:f,memoizeOptions:h},arguments)}w&&(w=!1)}return a},...b);return Object.assign(C,{resultFunc:u,memoizedResultFunc:x,dependencies:y,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:f,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var Cre=MD(AD),kre=Object.assign((e,t=Cre)=>{dre(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(o=>e[o]);return t(r,(...o)=>o.reduce((i,s,a)=>(i[n[a]]=s,i),{}))},{withTypes:()=>kre});MD({memoize:yre,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const $e=(e,t,n,r,o,i,...s)=>{if(s.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":Zr(1));let a;if(e)a=e;else throw new Error("Missing arguments");return a};var ev={exports:{}},tv={},w1;function Rre(){if(w1)return tv;w1=1;var e=ae;function t(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(f,m){var p=m(),v=r({inst:{value:p,getSnapshot:m}}),g=v[0].inst,h=v[1];return i(function(){g.value=p,g.getSnapshot=m,l(g)&&h({inst:g})},[f,p,m]),o(function(){return l(g)&&h({inst:g}),f(function(){l(g)&&h({inst:g})})},[f]),s(p),p}function l(f){var m=f.getSnapshot;f=f.value;try{var p=m();return!n(f,p)}catch{return!0}}function u(f,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return tv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,tv}var E1={},C1;function Sre(){return C1||(C1=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}function t(p,v){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=v();if(!f){var h=v();i(g,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}h=s({inst:{value:g,getSnapshot:v}});var b=h[0].inst,y=h[1];return l(function(){b.value=g,b.getSnapshot=v,n(b)&&y({inst:b})},[p,g,v]),a(function(){return n(b)&&y({inst:b}),p(function(){n(b)&&y({inst:b})})},[p]),u(g),g}function n(p){var v=p.getSnapshot;p=p.value;try{var g=v();return!i(p,g)}catch{return!0}}function r(p,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=ae,i=typeof Object.is=="function"?Object.is:e,s=o.useState,a=o.useEffect,l=o.useLayoutEffect,u=o.useDebugValue,d=!1,f=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;E1.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),E1}var k1;function p0(){return k1||(k1=1,process.env.NODE_ENV==="production"?ev.exports=Rre():ev.exports=Sre()),ev.exports}var Nre=p0(),nv={exports:{}},rv={},R1;function Ore(){if(R1)return rv;R1=1;var e=ae,t=p0();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,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return rv.useSyncExternalStoreWithSelector=function(u,d,f,m,p){var v=i(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=a(function(){function b(R){if(!y){if(y=!0,x=R,R=m(R),p!==void 0&&g.hasValue){var k=g.value;if(p(k,R))return w=k}return w=R}if(k=w,r(x,R))return k;var S=m(R);return p!==void 0&&p(k,S)?(x=R,k):(x=R,w=S)}var y=!1,x,w,C=f===void 0?null:f;return[function(){return b(d())},C===null?void 0:function(){return b(C())}]},[d,f,m,p]);var h=o(u,v[0],v[1]);return s(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},rv}var S1={},N1;function Ire(){return N1||(N1=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=ae,n=p0(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;S1.useSyncExternalStoreWithSelector=function(u,d,f,m,p){var v=i(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=a(function(){function b(R){if(!y){if(y=!0,x=R,R=m(R),p!==void 0&&g.hasValue){var k=g.value;if(p(k,R))return w=k}return w=R}if(k=w,r(x,R))return k;var S=m(R);return p!==void 0&&p(k,S)?(x=R,k):(x=R,w=S)}var y=!1,x,w,C=f===void 0?null:f;return[function(){return b(d())},C===null?void 0:function(){return b(C())}]},[d,f,m,p]);var h=o(u,v[0],v[1]);return s(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),S1}var O1;function Are(){return O1||(O1=1,process.env.NODE_ENV==="production"?nv.exports=Ore():nv.exports=Ire()),nv.exports}var Mre=Are();const Pre=Qw(19),_re=Pre?Dre:Lre;function pe(e,t,n,r,o){return _re(e,t,n,r,o)}function Tre(e,t,n,r,o){const i=c.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return Nre.useSyncExternalStore(e.subscribe,i,i)}function Dre(e,t,n,r,o){return Tre(e,t,n,r,o)}function Lre(e,t,n,r,o){return Mre.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,r,o))}class jre{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 pe(this,t,n,r,o)}}class Vre extends jre{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){c.useDebugValue(t),st(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;st(()=>(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,s=>Object.keys(s));const o=c.useRef(Object.keys(t)).current,i=Object.keys(t);(o.length!==i.length||o.some((s,a)=>s!==i[a]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);st(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){c.useDebugValue(t);const r=n!==void 0;if(st(()=>{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 i=o.get(t);i!==void 0&&i!==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 i=this.selectors[t];return i(this.state,n,r,o)}useState(t,n,r,o){return c.useDebugValue(t),pe(this,this.selectors[t],n,r,o)}useContextCallback(t,n){c.useDebugValue(t);const r=Zt(n??Qn);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(i=>{const s=r(i);if(!Object.is(o,s)){const a=o;o=s,n(s,a,this)}})}}const Fre={open:$e(e=>e.open),domReferenceElement:$e(e=>e.domReferenceElement),referenceElement:$e(e=>e.positionReference??e.referenceElement),floatingElement:$e(e=>e.floatingElement),floatingId:$e(e=>e.floatingId)};class $re extends Vre{constructor(t){const{nested:n,noEmit:r,onOpenChange:o,triggerElements:i,...s}=t;super({...s,positionReference:s.referenceElement,domReferenceElement:s.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:une(),nested:n,noEmit:r,triggerElements:i},Fre)}setOpen=(t,n)=>{if((!t||!this.state.open||XT(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 zre{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 Bre(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=e0(),i=dne()!=null;if(process.env.NODE_ENV!=="production"){const a=r.reference;a&&!bn(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 s=yo(()=>new $re({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new zre,floatingId:o,nested:i,noEmit:!1})).current;return st(()=>{const a={open:t,floatingId:o};r.reference!==void 0&&(a.referenceElement=r.reference,a.domReferenceElement=bn(r.reference)?r.reference:null),r.floating!==void 0&&(a.floatingElement=r.floating),s.update(a)},[t,o,r.reference,r.floating,s]),s.context.onOpenChange=n,s.context.nested=i,s.context.noEmit=!1,s}function Hre(e={}){const{nodeId:t,externalTree:n}=e,r=Bre(e),o=e.rootContext||r,i={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[s,a]=c.useState(null),l=c.useRef(null),u=uD(n);st(()=>{i.domReference&&(l.current=i.domReference)},[i.domReference]);const d=CD({...e,elements:{...i,...s&&{reference:s}}}),f=c.useCallback(k=>{const S=bn(k)?{getBoundingClientRect:()=>k.getBoundingClientRect(),getClientRects:()=>k.getClientRects(),contextElement:k}:k;a(S),d.refs.setReference(S)},[d.refs]),[m,p]=c.useState(null),[v,g]=c.useState(null);o.useSyncedValue("referenceElement",m),o.useSyncedValue("domReferenceElement",bn(m)?m:null),o.useSyncedValue("floatingElement",v);const h=c.useCallback(k=>{(bn(k)||k===null)&&(l.current=k,p(k)),(bn(d.refs.reference.current)||d.refs.reference.current===null||k!==null&&!bn(k))&&d.refs.setReference(k)},[d.refs,p]),b=c.useCallback(k=>{g(k),d.refs.setFloating(k)},[d.refs]),y=c.useMemo(()=>({...d.refs,setReference:h,setFloating:b,setPositionReference:f,domReference:l}),[d.refs,h,b,f]),x=c.useMemo(()=>({...d.elements,domReference:i.domReference}),[d.elements,i.domReference]),w=o.useState("open"),C=o.useState("floatingId"),R=c.useMemo(()=>({...d,dataRef:o.context.dataRef,open:w,onOpenChange:o.setOpen,events:o.context.events,floatingId:C,refs:y,elements:x,nodeId:t,rootStore:o}),[d,y,x,t,o,w,C]);return st(()=>{o.context.dataRef.current.floatingContext=R;const k=u?.nodesRef.current.find(S=>S.id===t);k&&(k.context=R)}),c.useMemo(()=>({...d,context:R,refs:y,elements:x,rootStore:o}),[d,y,x,R,o])}function Gre(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,o=n.useState("open"),{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:u=!0,resetMs:d=750,selectedIndex:f=null}=t,m=vc(),p=c.useRef(""),v=c.useRef(f??s??-1),g=c.useRef(null);st(()=>{!o&&f!==null||(m.clear(),g.current=null,p.current!==""&&(p.current=""))},[o,f,m]),st(()=>{o&&p.current===""&&(v.current=f??s??-1)},[o,f,s]);const h=Zt(C=>{C?r.current.typing||(r.current.typing=C,l?.(C)):r.current.typing&&(r.current.typing=C,l?.(C))}),b=Zt(C=>{function R(_,O,B){const I=O.find(V=>V?.toLocaleLowerCase().indexOf(B.toLocaleLowerCase())===0);return I?_.indexOf(I):-1}const k=i.current;if(p.current.length>0&&p.current[0]!==" "&&(R(k,k,p.current)===-1?h(!1):C.key===" "&&Mr(C)),k==null||C.key.length!==1||C.ctrlKey||C.metaKey||C.altKey)return;o&&C.key!==" "&&(Mr(C),h(!0));const S=p.current==="";S&&(v.current=f??s??-1),k.every(_=>_?_[0]?.toLocaleLowerCase()!==_[1]?.toLocaleLowerCase():!0)&&p.current===C.key&&(p.current="",v.current=g.current),p.current+=C.key,m.start(d,()=>{p.current="",v.current=g.current,h(!1)});const P=S?f??s??-1:v.current,L=R(k,[...k.slice((P||0)+1),...k.slice(0,(P||0)+1)],p.current);L!==-1?(a?.(L),g.current=L):C.key!==" "&&(p.current="",h(!1))}),y=Zt(C=>{const R=C.relatedTarget,k=n.select("domReferenceElement"),S=n.select("floatingElement"),P=Bt(k,R),L=Bt(S,R);P||L||(m.clear(),p.current="",v.current=g.current,h(!1))}),x=c.useMemo(()=>({onKeyDown:b,onBlur:y}),[b,y]),w=c.useMemo(()=>({onKeyDown:b,onKeyUp(C){C.key===" "&&h(!1)},onBlur:y}),[b,y,h]);return c.useMemo(()=>u?{reference:x,floating:w}:{},[u,x,w])}let m0=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=mc.startingStyle]="startingStyle",e[e.endingStyle=mc.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),py=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Wre={[py.popupOpen]:""},Ure={[py.popupOpen]:"",[py.pressed]:""},qre={[m0.open]:""},Kre={[m0.closed]:""},Yre={[m0.anchorHidden]:""},Xre={open(e){return e?Wre:null}},Zre={open(e){return e?Ure:null}},PD={open(e){return e?qre:Kre},anchorHidden(e){return e?Yre:null}};function Jre(e){return Qw(19)?e:e?"true":void 0}const _D=c.forwardRef(function(e,t){const{cutout:n,...r}=e;let o;if(n){const i=n?.getBoundingClientRect();o=`polygon(
|
|
181
|
+
0% 0%,
|
|
182
|
+
100% 0%,
|
|
183
|
+
100% 100%,
|
|
184
|
+
0% 100%,
|
|
185
|
+
0% 0%,
|
|
186
|
+
${i.left}px ${i.top}px,
|
|
187
|
+
${i.left}px ${i.bottom}px,
|
|
188
|
+
${i.right}px ${i.bottom}px,
|
|
189
|
+
${i.right}px ${i.top}px,
|
|
190
|
+
${i.left}px ${i.top}px
|
|
191
|
+
)`}return E.jsx("div",{ref:t,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})});process.env.NODE_ENV!=="production"&&(_D.displayName="InternalBackdrop");const TD=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(TD.displayName="ComboboxRootContext");const DD=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(DD.displayName="ComboboxFloatingContext");const LD=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(LD.displayName="ComboboxDerivedItemsContext");const jD=c.createContext("");process.env.NODE_ENV!=="production"&&(jD.displayName="ComboboxInputValueContext");function $r(){const e=c.useContext(TD);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.":Zr(22));return e}function Gm(){const e=c.useContext(DD);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.":Zr(23));return e}function cs(){const e=c.useContext(LD);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.":Zr(24));return e}function h0(){return c.useContext(jD)}function np(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function VD(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:np(r,t,n))}function Qre(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function eoe(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(Qre(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}const ve={id:$e(e=>e.id),query:$e(e=>e.query),items:$e(e=>e.items),selectedValue:$e(e=>e.selectedValue),hasSelectionChips:$e(e=>{const t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:$e(e=>{const{selectedValue:t,selectionMode:n}=e;return t==null?!1:n==="multiple"&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:$e((e,t)=>t?eoe(e.items):!1),open:$e(e=>e.open),mounted:$e(e=>e.mounted),forceMounted:$e(e=>e.forceMounted),inline:$e(e=>e.inline),activeIndex:$e(e=>e.activeIndex),selectedIndex:$e(e=>e.selectedIndex),isActive:$e((e,t)=>e.activeIndex===t),isSelected:$e((e,t)=>{const n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(o=>np(t,o,n)):np(t,r,n)}),transitionStatus:$e(e=>e.transitionStatus),popupProps:$e(e=>e.popupProps),inputProps:$e(e=>e.inputProps),triggerProps:$e(e=>e.triggerProps),getItemProps:$e(e=>e.getItemProps),positionerElement:$e(e=>e.positionerElement),listElement:$e(e=>e.listElement),triggerElement:$e(e=>e.triggerElement),inputElement:$e(e=>e.inputElement),popupSide:$e(e=>e.popupSide),openMethod:$e(e=>e.openMethod),inputInsidePopup:$e(e=>e.inputInsidePopup),selectionMode:$e(e=>e.selectionMode),listRef:$e(e=>e.listRef),labelsRef:$e(e=>e.labelsRef),popupRef:$e(e=>e.popupRef),emptyRef:$e(e=>e.emptyRef),inputRef:$e(e=>e.inputRef),keyboardActiveRef:$e(e=>e.keyboardActiveRef),chipsContainerRef:$e(e=>e.chipsContainerRef),clearRef:$e(e=>e.clearRef),valuesRef:$e(e=>e.valuesRef),allValuesRef:$e(e=>e.allValuesRef),name:$e(e=>e.name),disabled:$e(e=>e.disabled),readOnly:$e(e=>e.readOnly),required:$e(e=>e.required),grid:$e(e=>e.grid),isGrouped:$e(e=>e.isGrouped),virtualized:$e(e=>e.virtualized),onOpenChangeComplete:$e(e=>e.onOpenChangeComplete),openOnInputClick:$e(e=>e.openOnInputClick),itemToStringLabel:$e(e=>e.itemToStringLabel),isItemEqualToValue:$e(e=>e.isItemEqualToValue),modal:$e(e=>e.modal),autoHighlight:$e(e=>e.autoHighlight),submitOnItemClick:$e(e=>e.submitOnItemClick)};let I1=(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 toe={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},noe={valid(e){return e===null?null:e?{[I1.valid]:""}:{[I1.invalid]:""}}},FD=c.createContext({invalid:void 0,name:void 0,validityData:{state:toe,errors:[],error:"",value:"",initialValue:null},setValidityData:Qn,disabled:void 0,touched:!1,setTouched:Qn,dirty:!1,setDirty:Qn,filled:!1,setFilled:Qn,focused:!1,setFocused:Qn,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=dr)=>e,getInputValidationProps:(e=dr)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(FD.displayName="FieldRootContext");function g0(e=!0){const t=c.useContext(FD);if(t.setValidityData===Qn&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Zr(28));return t}const roe=c.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Qn,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(roe.displayName="FormContext");const $D=c.createContext({controlId:void 0,registerControlId:Qn,labelId:void 0,setLabelId:Qn,messageIds:[],setMessageIds:Qn,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&($D.displayName="LabelableContext");function v0(){return c.useContext($D)}function ooe(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:i}=v0(),s=t0(t),a=n?o:void 0,l=yo(()=>Symbol("labelable-control")),u=c.useRef(!1),d=c.useRef(t!=null),f=Zt(()=>{!u.current||i===Qn||(u.current=!1,i(l.current,void 0))});return st(()=>{if(i===Qn)return;let m;if(n){const p=r?.current;bn(p)&&p.closest("label")!=null?m=t??null:m=a??s}else if(t!=null)d.current=!0,m=t;else if(d.current)m=s;else{f();return}if(m===void 0){f();return}u.current=!0,i(l.current,m)},[t,r,a,i,n,s,l,f]),c.useEffect(()=>f,[f]),o??s}const zD={...Zre,...noe,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null};function ioe(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 o=parseFloat(n.width)||0,i=parseFloat(n.height)||0,s=parseFloat(r.width)||0,a=parseFloat(r.height)||0,l=Math.max(t.width,o,s),u=Math.max(t.height,i,a),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}const Wu=2,soe=c.forwardRef(function(e,t){const{render:n,className:r,nativeButton:o=!0,disabled:i=!1,id:s,...a}=e,{state:l,disabled:u,setTouched:d,setFocused:f,validationMode:m,validation:p}=g0(),{labelId:v}=v0(),g=$r(),{filteredItems:h}=cs(),b=pe(g,ve.selectionMode),y=pe(g,ve.disabled),x=pe(g,ve.readOnly),w=pe(g,ve.required),C=pe(g,ve.mounted),R=pe(g,ve.popupSide),k=pe(g,ve.positionerElement),S=pe(g,ve.listElement),P=pe(g,ve.triggerProps),L=pe(g,ve.triggerElement),_=pe(g,ve.inputInsidePopup),O=pe(g,ve.id),B=pe(g,ve.open),I=pe(g,ve.selectedValue),V=pe(g,ve.activeIndex),F=pe(g,ve.selectedIndex),D=pe(g,ve.hasSelectedValue),T=Gm(),q=h0(),A=vc(),ee=u||y||i,ie=h.length===0,Y=C&&k?R:null;ooe({id:_?s:void 0});const Q=_?s??O:s,X=c.useRef("");function J(j){X.current=j.pointerType}const te=T.useState("domReferenceElement");c.useEffect(()=>{_&&L&&L!==te&&T.set("domReferenceElement",L)},[L,te,T,_]);const{reference:le}=Gre(T,{enabled:!B&&!x&&!y&&b==="single",listRef:g.state.labelsRef,activeIndex:V,selectedIndex:F,onMatch(j){const K=g.state.valuesRef.current[j];K!==void 0&&g.state.setSelectedValue(K,Ut("none"))}}),{reference:z}=Cne(T,{enabled:!x&&!y,event:"mousedown"}),{buttonRef:re,getButtonProps:oe}=Fm({native:o,disabled:ee}),M={...l,open:B,disabled:ee,popupSide:Y,listEmpty:ie,placeholder:!D},N=Zt(j=>{g.set("triggerElement",j)});return Un("button",e,{ref:[t,re,N],state:M,props:[P,z,le,{id:Q,tabIndex:_?0:-1,role:_?"combobox":void 0,"aria-expanded":B?"true":"false","aria-haspopup":_?"dialog":"listbox","aria-controls":B?S?.id:void 0,"aria-required":_&&w||void 0,"aria-labelledby":v,onPointerDown:J,onPointerEnter:J,onFocus(){f(!0),!(ee||x)&&A.start(0,g.state.forceMount)},onBlur(j){if(!Bt(k,j.relatedTarget)&&(d(!0),f(!1),m==="onBlur")){const K=b==="none"?q:I;p.commit(K)}},onMouseDown(j){if(ee||x||(_||T.set("domReferenceElement",j.currentTarget),g.state.forceMount(),X.current!=="touch"&&(g.state.inputRef.current?.focus(),_||j.preventDefault()),B))return;const K=kn(j.currentTarget);function H(U){if(!L)return;const $=Jl(U),W=g.state.positionerElement,Z=g.state.listElement;if(Bt(L,$)||Bt(W,$)||Bt(Z,$)||$===L)return;const G=ioe(L),ne=U.clientX>=G.left-Wu&&U.clientX<=G.right+Wu,we=U.clientY>=G.top-Wu&&U.clientY<=G.bottom+Wu;ne&&we||g.state.setOpen(!1,Ut("cancel-open",U))}_&&K.addEventListener("mouseup",H,{once:!0})},onKeyDown(j){ee||x||(j.key==="ArrowDown"||j.key==="ArrowUp")&&(Mr(j),g.state.setOpen(!0,Ut(zT,j.nativeEvent)),g.state.inputRef.current?.focus())}},p?p.getValidationProps(a):a,oe],stateAttributesMapping:zD})});process.env.NODE_ENV!=="production"&&(soe.displayName="ComboboxTrigger");const b0=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(b0.displayName="ComboboxChipsContext");function BD(){return c.useContext(b0)}const y0=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(y0.displayName="ComboboxPositionerContext");function x0(e){const t=c.useContext(y0);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":Zr(21));return t}const aoe=c.forwardRef(function(e,t){const{render:n,className:r,disabled:o=!1,id:i,...s}=e,{state:a,disabled:l,setTouched:u,setFocused:d,validationMode:f,validation:m}=g0(),{labelId:p}=v0(),v=BD(),g=!!x0(!0),h=$r(),{filteredItems:b}=cs(),y=h0(),x=TT(),w=pe(h,ve.required),C=pe(h,ve.disabled),R=pe(h,ve.readOnly),k=pe(h,ve.name),S=pe(h,ve.selectionMode),P=pe(h,ve.autoHighlight),L=pe(h,ve.inputProps),_=pe(h,ve.triggerProps),O=pe(h,ve.open),B=pe(h,ve.mounted),I=pe(h,ve.selectedValue),V=pe(h,ve.popupSide),F=pe(h,ve.positionerElement),D=pe(h,ve.id),T=pe(h,ve.inline),q=!!P,A=B&&F?V:null,ee=l||C||o,ie=b.length===0,Y=t0(i??(g||T?void 0:D)),[Q,X]=c.useState(null),J=c.useRef(!1),te=c.useRef(null),le=c.useRef(!1),z=Zt(M=>{const N=g||h.state.inline;N&&!h.state.hasInputValue&&h.state.setInputValue("",Ut(Qd)),h.update({inputElement:M,inputInsidePopup:N})}),re={...a,open:O,disabled:ee,readOnly:R,popupSide:A,listEmpty:ie};function oe(M){if(!v)return;let N;const{highlightedChipIndex:j}=v;if(j!==void 0){if(M.key==="ArrowLeft")M.preventDefault(),j>0?N=j-1:N=void 0;else if(M.key==="ArrowRight")M.preventDefault(),j<I.length-1?N=j+1:N=void 0;else if(M.key==="Backspace"||M.key==="Delete"){M.preventDefault();const K=j>=I.length-1?I.length-2:j;N=K>=0?K:void 0,h.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return N}return M.key==="ArrowLeft"&&(M.currentTarget.selectionStart??0)===0&&I.length>0?(M.preventDefault(),N=Math.max(I.length-1,0)):M.key==="Backspace"&&M.currentTarget.value===""&&I.length>0&&(h.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),M.preventDefault()),N}return Un("input",e,{state:re,ref:[t,h.state.inputRef,z],props:[L,_,{type:"text",value:e.value??Q??y,"aria-readonly":R||void 0,"aria-required":w||void 0,"aria-labelledby":p,disabled:ee,readOnly:R,required:S==="none"?w:void 0,...S==="none"&&k&&{name:k},id:Y,onFocus(){if(d(!0),!T||!le.current)return;le.current=!1;const M=te.current;M==null||!Object.hasOwn(h.state.valuesRef.current,M)||h.state.setIndices({activeIndex:M})},onBlur(){u(!0),d(!1);const M=h.state.activeIndex;if(T&&M!==null&&P!=="always"&&(te.current=M,le.current=!0,h.state.setIndices({activeIndex:null})),f==="onBlur"){const N=S==="none"?y:I;m.commit(N)}},onCompositionStart(M){Wf||(J.current=!0,X(M.currentTarget.value))},onCompositionEnd(M){J.current=!1;const N=M.currentTarget.value;X(null),h.state.setInputValue(N,Ut(Vu,M.nativeEvent))},onChange(M){const N=M.nativeEvent.inputType,j=!N||N==="insertReplacementText",K=J.current||!j;if(J.current){const W=M.currentTarget.value;X(W),W===""&&!h.state.openOnInputClick&&!h.state.inputInsidePopup&&h.state.setOpen(!1,Ut(BR,M.nativeEvent));const Z=W.trim(),G=q&&Z!=="";!R&&!ee&&Z&&K&&(h.state.setOpen(!0,Ut(Vu,M.nativeEvent)),q||h.state.setIndices({activeIndex:null,selectedIndex:null,type:h.state.keyboardActiveRef.current?"keyboard":"pointer"})),O&&h.state.activeIndex!==null&&!G&&h.state.setIndices({activeIndex:null,selectedIndex:null,type:h.state.keyboardActiveRef.current?"keyboard":"pointer"});return}h.state.setInputValue(M.currentTarget.value,Ut(Vu,M.nativeEvent));const H=M.currentTarget.value==="",U=Ut(BR,M.nativeEvent);H&&!h.state.inputInsidePopup&&(S==="single"&&h.state.setSelectedValue(null,U),h.state.openOnInputClick||h.state.setOpen(!1,U));const $=M.currentTarget.value.trim();!R&&!ee&&$&&K&&(h.state.setOpen(!0,Ut(Vu,M.nativeEvent)),q||h.state.setIndices({activeIndex:null,selectedIndex:null,type:h.state.keyboardActiveRef.current?"keyboard":"pointer"})),O&&h.state.activeIndex!==null&&!q&&h.state.setIndices({activeIndex:null,selectedIndex:null,type:h.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(M){if(ee||R||M.ctrlKey||M.shiftKey||M.altKey||M.metaKey)return;h.state.keyboardActiveRef.current=!0;const N=M.currentTarget,j=N.scrollWidth-N.clientWidth,K=x==="rtl";if(M.key==="Home"){Mr(M);const $=qR&&K?N.value.length:0;N.setSelectionRange($,$),N.scrollLeft=0;return}if(M.key==="End"){Mr(M);const $=qR&&K?0:N.value.length;N.setSelectionRange($,$),N.scrollLeft=K?-j:j;return}if(!B&&M.key==="Escape"){const $=S==="multiple"&&Array.isArray(I)?I.length===0:I===null,W=Ut(ate,M.nativeEvent),Z=S==="multiple"?[]:null;h.state.setInputValue("",W),h.state.setSelectedValue(Z,W),!$&&!h.state.inline&&!W.isPropagationAllowed&&M.stopPropagation();return}if(v&&M.key==="Backspace"&&N.value===""&&v.highlightedChipIndex===void 0&&Array.isArray(I)&&I.length>0){const $=I.slice(0,-1);h.state.setIndices({activeIndex:null,selectedIndex:null,type:h.state.keyboardActiveRef.current?"keyboard":"pointer"}),h.state.setSelectedValue($,Ut(Qd,M.nativeEvent));return}const H=v?.highlightedChipIndex!==void 0,U=oe(M);if(v?.setHighlightedChipIndex(U),U!==void 0?v?.chipsRef.current[U]?.focus():H&&h.state.inputRef.current?.focus(),M.which!==229&&M.key==="Enter"&&O){const $=h.state.activeIndex,W=M.nativeEvent;if($===null){h.state.setOpen(!1,Ut(Qd,W));return}Mr(M);const Z=h.state.listRef.current[$];Z&&(h.state.selectionEventRef.current=W,Z.click(),h.state.selectionEventRef.current=null)}},onPointerMove(){h.state.keyboardActiveRef.current=!1},onPointerDown(){h.state.keyboardActiveRef.current=!1}},m?m.getValidationProps(s):s],stateAttributesMapping:zD})});process.env.NODE_ENV!=="production"&&(aoe.displayName="ComboboxInput");const loe={...HT,...Xre},coe=c.forwardRef(function(e,t){const{render:n,className:r,disabled:o=!1,nativeButton:i=!0,keepMounted:s=!1,...a}=e,{disabled:l}=g0(),u=$r(),d=pe(u,ve.selectionMode),f=pe(u,ve.disabled),m=pe(u,ve.readOnly),p=pe(u,ve.open),v=pe(u,ve.selectedValue),g=pe(u,ve.hasSelectionChips),h=h0();let b=!1;d==="none"?b=h!=="":d==="single"?b=v!=null:b=g;const y=l||f||o,{buttonRef:x,getButtonProps:w}=Fm({native:i,disabled:y}),{mounted:C,transitionStatus:R,setMounted:k}=mte(b),S={disabled:y,open:p,transitionStatus:R};aD({open:b,ref:u.state.clearRef,onComplete(){b||k(!1)}});const P=Un("button",e,{state:S,ref:[t,x,u.state.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(L){L.preventDefault()},onClick(L){if(y||m)return;const _=u.state.keyboardActiveRef;u.state.setInputValue("",Ut(zR,L.nativeEvent)),d!=="none"?(u.state.setSelectedValue(Array.isArray(v)?[]:null,Ut(zR,L.nativeEvent)),u.state.setIndices({activeIndex:null,selectedIndex:null,type:_.current?"keyboard":"pointer"})):u.state.setIndices({activeIndex:null,type:_.current?"keyboard":"pointer"}),u.state.inputRef.current?.focus()}},a,w],stateAttributesMapping:loe});return s||C?P:null});process.env.NODE_ENV!=="production"&&(coe.displayName="ComboboxClear");const w0=c.createContext(null);process.env.NODE_ENV!=="production"&&(w0.displayName="GroupCollectionContext");function uoe(){return c.useContext(w0)}function doe(e){const{children:t,items:n}=e,r=c.useMemo(()=>({items:n}),[n]);return E.jsx(w0.Provider,{value:r,children:t})}function foe(e){const{children:t}=e,{filteredItems:n}=cs(),r=uoe(),o=r?r.items:n;return o?E.jsx(c.Fragment,{children:o.map(t)}):null}const poe=c.forwardRef(function(e,t){var n;const{render:r,className:o,children:i,...s}=e,a=$r(),l=Gm(),u=!!x0(!0),{filteredItems:d}=cs(),f=pe(a,ve.items),m=pe(a,ve.labelsRef),p=pe(a,ve.listRef),v=pe(a,ve.selectionMode),g=pe(a,ve.grid),h=pe(a,ve.popupProps),b=pe(a,ve.disabled),y=pe(a,ve.readOnly),x=pe(a,ve.virtualized),w=v==="multiple",C=d.length===0,R=Zt(O=>{a.set("positionerElement",O)}),k=Zt(O=>{a.set("listElement",O)}),S=c.useMemo(()=>typeof i=="function"?n||(n=E.jsx(foe,{children:i})):i,[i]),P={empty:C},L=l.useState("floatingId"),_=Un("div",e,{state:P,ref:[t,k,u?null:R],props:[h,{children:S,tabIndex:-1,id:L,role:g?"grid":"listbox","aria-multiselectable":w?"true":void 0,onKeyDown(O){if(!(b||y)&&O.key==="Enter"){const B=a.state.activeIndex;if(B==null)return;Mr(O);const I=O.nativeEvent,V=a.state.listRef.current[B];V&&(a.state.selectionEventRef.current=I,V.click(),a.state.selectionEventRef.current=null)}},onKeyDownCapture(){a.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){a.state.keyboardActiveRef.current=!1}},s]});return x?_:E.jsx(PT,{elementsRef:p,labelsRef:f?void 0:m,children:_})});process.env.NODE_ENV!=="production"&&(poe.displayName="ComboboxList");const E0=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(E0.displayName="ComboboxPortalContext");function moe(){const e=c.useContext(E0);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Portal> is missing.":Zr(20));return e}const hoe=c.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,o=$r(),i=pe(o,ve.mounted),s=pe(o,ve.forceMounted);return i||n||s?E.jsx(E0.Provider,{value:n,children:E.jsx(mD,{ref:t,...r})}):null});process.env.NODE_ENV!=="production"&&(hoe.displayName="ComboboxPortal");const goe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:d=0,offsetParent:f="real"}=xo(e,t)||{};if(u==null)return{};const m=c0(d),p={x:n,y:r},v=zm(o),g=$m(v),h=await s.getDimensions(u),b=v==="y",y=b?"top":"left",x=b?"bottom":"right",w=b?"clientHeight":"clientWidth",C=i.reference[g]+i.reference[v]-p[v]-i.floating[g],R=p[v]-i.reference[v],k=f==="real"?await s.getOffsetParent?.(u):a.floating;let S=a.floating[w]||i.floating[g];(!S||!await s.isElement?.(k))&&(S=a.floating[w]||i.floating[g]);const P=C/2-R/2,L=S/2-h[g]/2-1,_=Math.min(m[y],L),O=Math.min(m[x],L),B=_,I=S-h[g]-O,V=S/2-h[g]/2+P,F=qf(B,V,I),D=!l.arrow&&oi(o)!=null&&V!==F&&i.reference[g]/2-(V<B?_:O)-h[g]/2<0,T=D?V<B?V-B:V-I:0;return{[v]:p[v]+T,data:{[v]:F,centerOffset:V-F-T,...D&&{alignmentOffset:T}},reset:D}}}),voe=(e,t)=>({...goe(e),options:[e,t]}),boe={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,i=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:(await ID().fn(e)).data?.referenceHidden||i}}}},yoe={sideX:"left",sideY:"top"};function HD(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 A1(e,t,n){const{rects:r,placement:o}=e;return{side:HD(t,gr(o),n),align:oi(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function xoe(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,collisionBoundary:a,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,keepMounted:m=!1,floatingRootContext:p,mounted:v,collisionAvoidance:g,shiftCrossAxis:h=!1,nodeId:b,adaptiveOrigin:y,lazyFlip:x=!1,externalTree:w}=e,[C,R]=c.useState(null);!v&&C!==null&&R(null);const k=g.side||"flip",S=g.align||"flip",P=g.fallbackAxisSide||"end",L=typeof t=="function"?t:void 0,_=Zt(L),O=L?_:t,B=Ba(t),I=TT()==="rtl",V=C||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":I?"left":"right","inline-start":I?"right":"left"}[r],F=i==="center"?V:`${V}-${i}`;let D=l;const T=1,q=r==="bottom"?T:0,A=r==="top"?T:0,ee=r==="right"?T:0,ie=r==="left"?T:0;typeof D=="number"?D={top:D+q,right:D+ie,bottom:D+A,left:D+ee}:D&&(D={top:(D.top||0)+q,right:(D.right||0)+ie,bottom:(D.bottom||0)+A,left:(D.left||0)+ee});const Y={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:D},Q=c.useRef(null),X=Ba(o),J=Ba(s),te=[kD(se=>{const Ee=A1(se,r,I),Se=typeof X.current=="function"?X.current(Ee):X.current,Pe=typeof J.current=="function"?J.current(Ee):J.current;return{mainAxis:Se,crossAxis:Pe,alignmentAxis:Pe}},[typeof o!="function"?o:0,typeof s!="function"?s:0,I,r])],le=S==="none"&&k!=="shift",z=!le&&(u||h||k==="shift"),re=k==="none"?null:ND({...Y,padding:{top:D.top+T,right:D.right+T,bottom:D.bottom+T,left:D.left+T},mainAxis:!h&&k==="flip",crossAxis:S==="flip"?"alignment":!1,fallbackAxisSideDirection:P}),oe=le?null:RD(se=>{const Ee=kn(se.elements.floating).documentElement;return{...Y,rootBoundary:h?{x:0,y:0,width:Ee.clientWidth,height:Ee.clientHeight}:void 0,mainAxis:S!=="none",crossAxis:z,limiter:u||h?void 0:SD(Se=>{if(!Q.current)return{};const{width:Pe,height:Ce}=Q.current.getBoundingClientRect(),ke=Nr(gr(Se.placement)),pt=ke==="y"?Pe:Ce,gt=ke==="y"?D.left+D.right:D.top+D.bottom;return{offset:pt/2+gt/2}})}},[Y,u,h,D,S]);k==="shift"||S==="shift"||i==="center"?te.push(oe,re):te.push(re,oe),te.push(OD({...Y,apply({elements:{floating:se},rects:{reference:Ee},availableWidth:Se,availableHeight:Pe}){const Ce=se.style;Ce.setProperty("--available-width",`${Se}px`),Ce.setProperty("--available-height",`${Pe}px`),Ce.setProperty("--anchor-width",`${Ee.width}px`),Ce.setProperty("--anchor-height",`${Ee.height}px`)}}),voe(()=>({element:Q.current||document.createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(se){const{elements:Ee,middlewareData:Se,placement:Pe,rects:Ce,y:ke}=se,pt=gr(Pe),gt=Nr(pt),un=Q.current,Vt=Se.arrow?.x||0,rr=Se.arrow?.y||0,vt=un?.clientWidth||0,Gr=un?.clientHeight||0,jt=Vt+vt/2,Dt=rr+Gr/2,or=Math.abs(Se.shift?.y||0),Xn=Ce.reference.height/2,mt=typeof o=="function"?o(A1(se,r,I)):o,Cr=or>mt,$n={top:`${jt}px calc(100% + ${mt}px)`,bottom:`${jt}px ${-mt}px`,left:`calc(100% + ${mt}px) ${Dt}px`,right:`${-mt}px ${Dt}px`}[pt],dn=`${jt}px ${Ce.reference.y+Xn-ke}px`;return Ee.floating.style.setProperty("--transform-origin",z&>==="y"&&Cr?dn:$n),{}}},boe,y),st(()=>{!v&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[v,p]);const M=c.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:N,elements:j,x:K,y:H,middlewareData:U,update:$,placement:W,context:Z,isPositioned:G,floatingStyles:ne}=Hre({rootContext:p,placement:F,middleware:te,strategy:n,whileElementsMounted:m?void 0:(...se)=>fy(...se,M),nodeId:b,externalTree:w}),{sideX:we,sideY:Ve}=U.adaptiveOrigin||yoe,Ye=G?n:"fixed",ft=c.useMemo(()=>{const se=y?{position:Ye,[we]:K,[Ve]:H}:{position:Ye,...ne};return G||(se.opacity=0),se},[y,Ye,we,K,Ve,H,ne,G]),qe=c.useRef(null);st(()=>{if(!v)return;const se=B.current,Ee=typeof se=="function"?se():se,Se=(M1(Ee)?Ee.current:Ee)||null||null;Se!==qe.current&&(N.setPositionReference(Se),qe.current=Se)},[v,N,O,B]),c.useEffect(()=>{if(!v)return;const se=B.current;typeof se!="function"&&M1(se)&&se.current!==qe.current&&(N.setPositionReference(se.current),qe.current=se.current)},[v,N,O,B]),c.useEffect(()=>{if(m&&v&&j.domReference&&j.floating)return fy(j.domReference,j.floating,$,M)},[m,v,j,$,M]);const ce=gr(W),Ke=HD(r,ce,I),ot=oi(W)||"center",Lt=!!U.hide?.referenceHidden;st(()=>{x&&v&&G&&R(ce)},[x,v,G,ce]);const Ft=c.useMemo(()=>({position:"absolute",top:U.arrow?.y,left:U.arrow?.x}),[U.arrow]),Tt=U.arrow?.centerOffset!==0;return c.useMemo(()=>({positionerStyles:ft,arrowStyles:Ft,arrowRef:Q,arrowUncentered:Tt,side:Ke,align:ot,physicalSide:ce,anchorHidden:Lt,refs:N,context:Z,isPositioned:G,update:$}),[ft,Ft,Q,Tt,Ke,ot,ce,Lt,N,Z,G,$])}function M1(e){return e!=null&&"current"in e}function GD(e){return e==="starting"?Yee:dr}const woe=c.forwardRef(function(e,t){const{render:n,className:r,anchor:o,positionMethod:i="absolute",side:s="bottom",align:a="center",sideOffset:l=0,alignOffset:u=0,collisionBoundary:d="clipping-ancestors",collisionPadding:f=5,arrowPadding:m=5,sticky:p=!1,disableAnchorTracking:v=!1,collisionAvoidance:g=Zee,...h}=e,b=$r(),{filteredItems:y}=cs(),x=Gm(),w=moe(),C=pe(b,ve.modal),R=pe(b,ve.open),k=pe(b,ve.mounted),S=pe(b,ve.openMethod),P=pe(b,ve.triggerElement),L=pe(b,ve.inputElement),_=pe(b,ve.inputInsidePopup),O=pe(b,ve.transitionStatus),B=y.length===0,I=xoe({anchor:o??(_?P:L),floatingRootContext:x,positionMethod:i,mounted:k,side:s,sideOffset:l,align:a,alignOffset:u,arrowPadding:m,collisionBoundary:d,collisionPadding:f,sticky:p,disableAnchorTracking:v,keepMounted:w,collisionAvoidance:g,lazyFlip:!0});lne(R&&C&&S!=="touch",P);const V=c.useMemo(()=>{const A={...I.positionerStyles};return R||(A.pointerEvents="none"),{role:"presentation",hidden:!k,style:A}},[R,k,I.positionerStyles]),F={open:R,side:I.side,align:I.align,anchorHidden:I.anchorHidden,empty:B};st(()=>{b.set("popupSide",I.side)},[b,I.side]);const D=c.useMemo(()=>({side:I.side,align:I.align,arrowRef:I.arrowRef,arrowUncentered:I.arrowUncentered,arrowStyles:I.arrowStyles,anchorHidden:I.anchorHidden,isPositioned:I.isPositioned}),[I.side,I.align,I.arrowRef,I.arrowUncentered,I.arrowStyles,I.anchorHidden,I.isPositioned]),T=Zt(A=>{b.set("positionerElement",A)}),q=Un("div",e,{state:F,ref:[t,T],props:[V,GD(O),h],stateAttributesMapping:PD});return E.jsxs(y0.Provider,{value:D,children:[k&&C&&E.jsx(_D,{inert:Jre(!R),cutout:L??P}),q]})});process.env.NODE_ENV!=="production"&&(woe.displayName="ComboboxPositioner");const Eoe={...PD,...HT},Coe=c.forwardRef(function(e,t){const{render:n,className:r,initialFocus:o,finalFocus:i,...s}=e,a=$r(),l=x0(),u=Gm(),{filteredItems:d}=cs(),f=pe(a,ve.mounted),m=pe(a,ve.open),p=pe(a,ve.openMethod),v=pe(a,ve.transitionStatus),g=pe(a,ve.inputInsidePopup),h=pe(a,ve.inputElement),b=d.length===0;aD({open:m,ref:a.state.popupRef,onComplete(){m&&a.state.onOpenChangeComplete(!0)}});const y={open:m,side:l.side,align:l.align,anchorHidden:l.anchorHidden,transitionStatus:v,empty:b},x=Un("div",e,{state:y,ref:[t,a.state.popupRef],props:[{role:g?"dialog":"presentation",tabIndex:-1,onFocus(R){const k=Jl(R.nativeEvent);p!=="touch"&&(Bt(a.state.listElement,k)||k===R.currentTarget)&&a.state.inputRef.current?.focus()}},GD(v),s],stateAttributesMapping:Eoe}),w=o===void 0?g?R=>R==="touch"?a.state.popupRef.current:h:!1:o;let C;return i!=null?C=i:C=g?void 0:!1,E.jsx(Ene,{context:u,disabled:!f,modal:!g,openInteractionType:p,initialFocus:w,returnFocus:C,children:x})});process.env.NODE_ENV!=="production"&&(Coe.displayName="ComboboxPopup");const C0=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(C0.displayName="ComboboxGroupContext");function koe(){const e=c.useContext(C0);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>.":Zr(18));return e}const Roe=c.forwardRef(function(e,t){const{render:n,className:r,items:o,...i}=e,[s,a]=c.useState(),l=c.useMemo(()=>({labelId:s,setLabelId:a,items:o}),[s,a,o]),u=Un("div",e,{ref:t,props:[{role:"group","aria-labelledby":s},i]}),d=E.jsx(C0.Provider,{value:l,children:u});return o?E.jsx(doe,{items:o,children:d}):d});process.env.NODE_ENV!=="production"&&(Roe.displayName="ComboboxGroup");const Soe=c.forwardRef(function(e,t){const{render:n,className:r,id:o,...i}=e,{setLabelId:s}=koe(),a=t0(o);return st(()=>(s(a),()=>{s(void 0)}),[a,s]),Un("div",e,{ref:t,props:[{id:a},i]})});process.env.NODE_ENV!=="production"&&(Soe.displayName="ComboboxGroupLabel");const WD=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(WD.displayName="ComboboxItemContext");const UD=c.createContext(!1);process.env.NODE_ENV!=="production"&&(UD.displayName="ComboboxRowContext");function Noe(){return c.useContext(UD)}const Ooe=c.memo(c.forwardRef(function(e,t){const{render:n,className:r,value:o=null,index:i,disabled:s=!1,nativeButton:a=!1,...l}=e,u=c.useRef(!1),d=c.useRef(null),f=WT({index:i,textRef:d,indexGuessBehavior:GT.GuessFromOrder}),m=$r(),p=Noe(),{flatFilteredItems:v,hasItems:g}=cs(),h=pe(m,ve.open),b=pe(m,ve.selectionMode),y=pe(m,ve.readOnly),x=pe(m,ve.virtualized),w=pe(m,ve.isItemEqualToValue),C=b!=="none",R=i??(x?VD(v,o,w):f.index),k=f.index!==-1,S=pe(m,ve.id),P=pe(m,ve.isActive,R),L=pe(m,ve.isSelected,o),_=pe(m,ve.getItemProps),O=c.useRef(null),B=S!=null&&k?`${S}-${R}`:void 0,I=L&&C;st(()=>{if(!(k&&(x||i!=null)))return;const Y=m.state.listRef.current;return Y[R]=O.current,()=>{delete Y[R]}},[k,x,R,i,m]),st(()=>{if(!k||g)return;const Y=m.state.valuesRef.current;return Y[R]=o,b!=="none"&&m.state.allValuesRef.current.push(o),()=>{delete Y[R]}},[k,g,R,o,m,b]),st(()=>{if(!h){u.current=!1;return}if(!k||g)return;const Y=m.state.selectedValue,Q=Array.isArray(Y)?Y[Y.length-1]:Y;np(o,Q,w)&&m.set("selectedIndex",R)},[k,g,h,m,R,o,w]);const V={disabled:s,selected:I,highlighted:P},F=_({active:P,selected:I});F.id=void 0,F.onFocus=void 0;const{getButtonProps:D,buttonRef:T}=Fm({disabled:s,focusableWhenDisabled:!0,native:a});function q(Y){function Q(){m.state.handleSelection(Y,o)}m.state.submitOnItemClick?(dt.flushSync(Q),m.state.requestSubmit()):Q()}const A={id:B,role:p?"gridcell":"option","aria-selected":C?I:void 0,tabIndex:void 0,onPointerDownCapture(Y){u.current=!0,Y.preventDefault()},onClick(Y){s||y||q(Y.nativeEvent)},onMouseUp(Y){const Q=u.current;u.current=!1,!(s||y||Y.button!==0||Q||!P)&&q(Y.nativeEvent)}},ee=Un("div",e,{ref:[T,t,f.ref,O],state:V,props:[F,A,l,D]}),ie=c.useMemo(()=>({selected:I,textRef:d}),[I,d]);return E.jsx(WD.Provider,{value:ie,children:ee})}));process.env.NODE_ENV!=="production"&&(Ooe.displayName="ComboboxItem");const Ioe=c.forwardRef(function(e,t){const{render:n,className:r,children:o,...i}=e,{filteredItems:s}=cs(),a=$r(),l=s.length===0?o:null;return Un("div",e,{ref:[t,a.state.emptyRef],props:[{children:l,role:"status","aria-live":"polite","aria-atomic":!0},i]})});process.env.NODE_ENV!=="production"&&(Ioe.displayName="ComboboxEmpty");const Aoe=c.forwardRef(function(e,t){const{className:n,render:r,orientation:o="horizontal",...i}=e;return Un("div",e,{state:{orientation:o},ref:t,props:[{role:"separator","aria-orientation":o},i]})});process.env.NODE_ENV!=="production"&&(Aoe.displayName="Separator");const Moe=c.forwardRef(function(e,t){const{render:n,className:r,...o}=e,i=$r(),s=pe(i,ve.open),a=pe(i,ve.hasSelectionChips),[l,u]=c.useState(void 0);s&&l!==void 0&&u(void 0);const d=c.useRef([]),f=Un("div",e,{ref:[t,i.state.chipsContainerRef],props:[a?{role:"toolbar"}:dr,o]}),m=c.useMemo(()=>({highlightedChipIndex:l,setHighlightedChipIndex:u,chipsRef:d}),[l,u,d]);return E.jsx(b0.Provider,{value:m,children:E.jsx(PT,{elementsRef:d,children:f})})});process.env.NODE_ENV!=="production"&&(Moe.displayName="ComboboxChips");const k0=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(k0.displayName="ComboboxChipContext");function Poe(){const e=c.useContext(k0);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"useComboboxChipContext must be used within a ComboboxChip":Zr(17));return e}const _oe=c.forwardRef(function(e,t){const{render:n,className:r,...o}=e,i=$r(),{setHighlightedChipIndex:s,chipsRef:a}=BD(),l=pe(i,ve.disabled),u=pe(i,ve.readOnly),d=pe(i,ve.selectedValue),{ref:f,index:m}=WT();function p(h){let b=m;if(h.key==="ArrowLeft")h.preventDefault(),m>0?b=m-1:b=void 0;else if(h.key==="ArrowRight")h.preventDefault(),m<d.length-1?b=m+1:b=void 0;else if(h.key==="Backspace"||h.key==="Delete"){const y=m>=d.length-1?d.length-2:m;b=y>=0?y:void 0,Mr(h),i.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),i.state.setSelectedValue(d.filter((x,w)=>w!==m),Ut(Qd,h.nativeEvent))}else h.key==="Enter"||h.key===" "?(Mr(h),b=void 0):h.key==="ArrowDown"||h.key==="ArrowUp"?(Mr(h),i.state.setOpen(!0,Ut(zT,h.nativeEvent)),b=void 0):h.key.length===1&&!h.ctrlKey&&!h.metaKey&&!h.altKey&&(b=void 0);return b}const v=Un("div",e,{ref:[t,f],state:{disabled:l},props:[{tabIndex:-1,"aria-disabled":l||void 0,"aria-readonly":u||void 0,onKeyDown(h){if(l||u)return;const b=p(h);dt.flushSync(()=>{s(b)}),b===void 0?i.state.inputRef.current?.focus():a.current[b]?.focus()},onMouseDown(h){u||(h.preventDefault(),!l&&i.state.inputRef.current?.focus())}},o]}),g=c.useMemo(()=>({index:m}),[m]);return E.jsx(k0.Provider,{value:g,children:v})});process.env.NODE_ENV!=="production"&&(_oe.displayName="ComboboxChip");const Toe=c.forwardRef(function(e,t){const{render:n,className:r,disabled:o=!1,nativeButton:i=!0,...s}=e,a=$r(),{index:l}=Poe(),u=pe(a,ve.disabled),d=pe(a,ve.readOnly),f=pe(a,ve.selectedValue),m=pe(a,ve.isItemEqualToValue),p=u||o,{buttonRef:v,getButtonProps:g}=Fm({native:i,disabled:p||d,focusableWhenDisabled:!0}),h={disabled:p};function b(x){const w=a.state.activeIndex;if(w==null)return;const C=VD(a.state.valuesRef.current,x,m);C!==-1&&w===C&&a.state.setIndices({activeIndex:null,type:a.state.keyboardActiveRef.current?"keyboard":"pointer"})}function y(x){const w=Ut(ste,x.nativeEvent),C=f[l];return b(C),a.state.setSelectedValue(f.filter((R,k)=>k!==l),w),a.state.inputRef.current?.focus(),w}return Un("button",e,{ref:[t,v],state:h,props:[{tabIndex:-1,onClick(x){p||d||y(x).isPropagationAllowed||x.stopPropagation()},onKeyDown(x){p||d||(x.key==="Enter"||x.key===" ")&&(y(x).isPropagationAllowed||Mr(x))}},s,g]})});process.env.NODE_ENV!=="production"&&(Toe.displayName="ComboboxChipRemove");var Doe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Wm=Doe.reduce((e,t)=>{const n=EQ(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Loe="Label",qD=c.forwardRef((e,t)=>E.jsx(Wm.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));qD.displayName=Loe;var joe=qD;sa(Pn("body-sm-regular"));joe.displayName;var Voe="Separator",P1="horizontal",Foe=["horizontal","vertical"],KD=c.forwardRef((e,t)=>{const{decorative:n,orientation:r=P1,...o}=e,i=$oe(r)?r:P1,s=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return E.jsx(Wm.div,{"data-orientation":i,...s,...o,ref:t})});KD.displayName=Voe;function $oe(e){return Foe.includes(e)}var zoe=KD;zoe.displayName;[`text-primary-text flex w-fit items-center gap-2
|
|
192
|
+
group-data-[disabled=true]/field:opacity-50`,Pn("body-sm-regular")].join(" ");["text-sub-label-text group-has-data-[orientation=horizontal]/field:text-balance",Pn("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(" ");c.createContext(null);var Boe=c[" useId ".trim().toString()]||(()=>{}),Hoe=0;function R0(e){const[t,n]=c.useState(Boe());return Hi(()=>{n(r=>r??String(Hoe++))},[e]),t?`radix-${t}`:""}function Ws(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}function Goe(e,t=globalThis?.document){const n=Ws(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 Woe="DismissableLayer",my="dismissableLayer.update",Uoe="dismissableLayer.pointerDownOutside",qoe="dismissableLayer.focusOutside",_1,YD=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),S0=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,u=c.useContext(YD),[d,f]=c.useState(null),m=d?.ownerDocument??globalThis?.document,[,p]=c.useState({}),v=on(t,k=>f(k)),g=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(h),y=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,w=y>=b,C=Xoe(k=>{const S=k.target,P=[...u.branches].some(L=>L.contains(S));!w||P||(o?.(k),s?.(k),k.defaultPrevented||a?.())},m),R=Zoe(k=>{const S=k.target;[...u.branches].some(P=>P.contains(S))||(i?.(k),s?.(k),k.defaultPrevented||a?.())},m);return Goe(k=>{y===u.layers.size-1&&(r?.(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},m),c.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(_1=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),T1(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=_1)}},[d,m,n,u]),c.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),T1())},[d,u]),c.useEffect(()=>{const k=()=>p({});return document.addEventListener(my,k),()=>document.removeEventListener(my,k)},[]),E.jsx(At.div,{...l,ref:v,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:kt(e.onFocusCapture,R.onFocusCapture),onBlurCapture:kt(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:kt(e.onPointerDownCapture,C.onPointerDownCapture)})});S0.displayName=Woe;var Koe="DismissableLayerBranch",Yoe=c.forwardRef((e,t)=>{const n=c.useContext(YD),r=c.useRef(null),o=on(t,r);return c.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),E.jsx(At.div,{...e,ref:o})});Yoe.displayName=Koe;function Xoe(e,t=globalThis?.document){const n=Ws(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){XD(Uoe,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},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Zoe(e,t=globalThis?.document){const n=Ws(e),r=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!r.current&&XD(qoe,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function T1(){const e=new CustomEvent(my);document.dispatchEvent(e)}function XD(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?BQ(o,i):o.dispatchEvent(i)}var ov="focusScope.autoFocusOnMount",iv="focusScope.autoFocusOnUnmount",D1={bubbles:!1,cancelable:!0},Joe="FocusScope",ZD=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=c.useState(null),u=Ws(o),d=Ws(i),f=c.useRef(null),m=on(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(x){if(p.paused||!a)return;const w=x.target;a.contains(w)?f.current=w:wi(f.current,{select:!0})},h=function(x){if(p.paused||!a)return;const w=x.relatedTarget;w!==null&&(a.contains(w)||wi(f.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const w of x)w.removedNodes.length>0&&wi(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",h);const y=new MutationObserver(b);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",h),y.disconnect()}}},[r,a,p.paused]),c.useEffect(()=>{if(a){j1.add(p);const g=document.activeElement;if(!a.contains(g)){const h=new CustomEvent(ov,D1);a.addEventListener(ov,u),a.dispatchEvent(h),h.defaultPrevented||(Qoe(oie(JD(a)),{select:!0}),document.activeElement===g&&wi(a))}return()=>{a.removeEventListener(ov,u),setTimeout(()=>{const h=new CustomEvent(iv,D1);a.addEventListener(iv,d),a.dispatchEvent(h),h.defaultPrevented||wi(g??document.body,{select:!0}),a.removeEventListener(iv,d),j1.remove(p)},0)}}},[a,u,d,p]);const v=c.useCallback(g=>{if(!n&&!r||p.paused)return;const h=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(h&&b){const y=g.currentTarget,[x,w]=eie(y);x&&w?!g.shiftKey&&b===w?(g.preventDefault(),n&&wi(x,{select:!0})):g.shiftKey&&b===x&&(g.preventDefault(),n&&wi(w,{select:!0})):b===y&&g.preventDefault()}},[n,r,p.paused]);return E.jsx(At.div,{tabIndex:-1,...s,ref:m,onKeyDown:v})});ZD.displayName=Joe;function Qoe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(wi(r,{select:t}),document.activeElement!==n)return}function eie(e){const t=JD(e),n=L1(t,e),r=L1(t.reverse(),e);return[n,r]}function JD(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 L1(e,t){for(const n of e)if(!tie(n,{upTo:t}))return n}function tie(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 nie(e){return e instanceof HTMLInputElement&&"select"in e}function wi(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&nie(e)&&t&&e.select()}}var j1=rie();function rie(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=V1(e,t),e.unshift(t)},remove(t){e=V1(e,t),e[0]?.resume()}}}function V1(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function oie(e){return e.filter(t=>t.tagName!=="A")}var iie="Portal",QD=c.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=c.useState(!1);Hi(()=>i(!0),[]);const s=n||o&&globalThis?.document?.body;return s?xl.createPortal(E.jsx(At.div,{...r,ref:t}),s):null});QD.displayName=iie;var sv=0;function sie(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??F1()),document.body.insertAdjacentElement("beforeend",e[1]??F1()),sv++,()=>{sv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),sv--}},[])}function F1(){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 lo=function(){return lo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},lo.apply(this,arguments)};function eL(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 aie(e,t,n){for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var tf="right-scroll-bar-position",nf="width-before-scroll-bar",lie="with-scroll-bars-hidden",cie="--removed-body-scroll-bar-size";function av(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function uie(e,t){var n=ae.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 die=typeof window<"u"?c.useLayoutEffect:c.useEffect,$1=new WeakMap;function fie(e,t){var n=uie(null,function(r){return e.forEach(function(o){return av(o,r)})});return die(function(){var r=$1.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||av(a,null)}),i.forEach(function(a){o.has(a)||av(a,s)})}$1.set(n,e)},[e]),n}function pie(e){return e}function mie(e,t){t===void 0&&(t=pie);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(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var l=function(){var d=s;s=[],d.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),n}}}};return o}function hie(e){e===void 0&&(e={});var t=mie(null);return t.options=lo({async:!0,ssr:!1},e),t}var tL=function(e){var t=e.sideCar,n=eL(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,lo({},n))};tL.isSideCarExport=!0;function gie(e,t){return e.useMedium(t),tL}var nL=hie(),lv=function(){},Um=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:lv,onWheelCapture:lv,onTouchMoveCapture:lv}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,p=e.noRelative,v=e.noIsolation,g=e.inert,h=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,x=e.gapMode,w=eL(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,R=fie([n,t]),k=lo(lo({},w),o);return c.createElement(c.Fragment,null,d&&c.createElement(C,{sideCar:nL,removeScrollBar:u,shards:f,noRelative:p,noIsolation:v,inert:g,setCallbacks:i,allowPinchZoom:!!h,lockRef:n,gapMode:x}),s?c.cloneElement(c.Children.only(a),lo(lo({},k),{ref:R})):c.createElement(y,lo({},k,{className:l,ref:R}),a))});Um.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Um.classNames={fullWidth:nf,zeroRight:tf};var vie=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function bie(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=vie();return t&&e.setAttribute("nonce",t),e}function yie(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xie(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var wie=function(){var e=0,t=null;return{add:function(n){e==0&&(t=bie())&&(yie(t,n),xie(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Eie=function(){var e=wie();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rL=function(){var e=Eie(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Cie={left:0,top:0,right:0,gap:0},cv=function(e){return parseInt(e||"",10)||0},kie=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[cv(n),cv(r),cv(o)]},Rie=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Cie;var t=kie(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])}},Sie=rL(),Wa="data-scroll-locked",Nie=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
193
|
+
.`.concat(lie,` {
|
|
194
|
+
overflow: hidden `).concat(r,`;
|
|
195
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
196
|
+
}
|
|
197
|
+
body[`).concat(Wa,`] {
|
|
198
|
+
overflow: hidden `).concat(r,`;
|
|
199
|
+
overscroll-behavior: contain;
|
|
200
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
201
|
+
padding-left: `.concat(o,`px;
|
|
202
|
+
padding-top: `).concat(i,`px;
|
|
203
|
+
padding-right: `).concat(s,`px;
|
|
204
|
+
margin-left:0;
|
|
205
|
+
margin-top:0;
|
|
206
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
207
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.`).concat(tf,` {
|
|
211
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.`).concat(nf,` {
|
|
215
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.`).concat(tf," .").concat(tf,` {
|
|
219
|
+
right: 0 `).concat(r,`;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.`).concat(nf," .").concat(nf,` {
|
|
223
|
+
margin-right: 0 `).concat(r,`;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
body[`).concat(Wa,`] {
|
|
227
|
+
`).concat(cie,": ").concat(a,`px;
|
|
228
|
+
}
|
|
229
|
+
`)},z1=function(){var e=parseInt(document.body.getAttribute(Wa)||"0",10);return isFinite(e)?e:0},Oie=function(){c.useEffect(function(){return document.body.setAttribute(Wa,(z1()+1).toString()),function(){var e=z1()-1;e<=0?document.body.removeAttribute(Wa):document.body.setAttribute(Wa,e.toString())}},[])},Iie=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Oie();var i=c.useMemo(function(){return Rie(o)},[o]);return c.createElement(Sie,{styles:Nie(i,!t,o,n?"":"!important")})},hy=!1;if(typeof window<"u")try{var Uu=Object.defineProperty({},"passive",{get:function(){return hy=!0,!0}});window.addEventListener("test",Uu,Uu),window.removeEventListener("test",Uu,Uu)}catch{hy=!1}var Ea=hy?{passive:!1}:!1,Aie=function(e){return e.tagName==="TEXTAREA"},oL=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Aie(e)&&n[t]==="visible")},Mie=function(e){return oL(e,"overflowY")},Pie=function(e){return oL(e,"overflowX")},B1=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=iL(e,r);if(o){var i=sL(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},_ie=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Tie=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},iL=function(e,t){return e==="v"?Mie(t):Pie(t)},sL=function(e,t){return e==="v"?_ie(t):Tie(t)},Die=function(e,t){return e==="h"&&t==="rtl"?-1:1},Lie=function(e,t,n,r,o){var i=Die(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),u=!1,d=s>0,f=0,m=0;do{if(!a)break;var p=sL(e,a),v=p[0],g=p[1],h=p[2],b=g-h-i*v;(v||b)&&iL(e,a)&&(f+=b,m+=v);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&Math.abs(f)<1||!d&&Math.abs(m)<1)&&(u=!0),u},qu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},H1=function(e){return[e.deltaX,e.deltaY]},G1=function(e){return e&&"current"in e?e.current:e},jie=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Vie=function(e){return`
|
|
230
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
231
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
232
|
+
`)},Fie=0,Ca=[];function $ie(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(Fie++)[0],i=c.useState(rL)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=aie([e.lockRef.current],(e.shards||[]).map(G1)).filter(Boolean);return g.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(g,h){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var b=qu(g),y=n.current,x="deltaX"in g?g.deltaX:y[0]-b[0],w="deltaY"in g?g.deltaY:y[1]-b[1],C,R=g.target,k=Math.abs(x)>Math.abs(w)?"h":"v";if("touches"in g&&k==="h"&&R.type==="range")return!1;var S=window.getSelection(),P=S&&S.anchorNode,L=P?P===R||P.contains(R):!1;if(L)return!1;var _=B1(k,R);if(!_)return!0;if(_?C=k:(C=k==="v"?"h":"v",_=B1(k,R)),!_)return!1;if(!r.current&&"changedTouches"in g&&(x||w)&&(r.current=C),!C)return!0;var O=r.current||C;return Lie(O,h,g,O==="h"?x:w)},[]),l=c.useCallback(function(g){var h=g;if(!(!Ca.length||Ca[Ca.length-1]!==i)){var b="deltaY"in h?H1(h):qu(h),y=t.current.filter(function(C){return C.name===h.type&&(C.target===h.target||h.target===C.shadowParent)&&jie(C.delta,b)})[0];if(y&&y.should){h.cancelable&&h.preventDefault();return}if(!y){var x=(s.current.shards||[]).map(G1).filter(Boolean).filter(function(C){return C.contains(h.target)}),w=x.length>0?a(h,x[0]):!s.current.noIsolation;w&&h.cancelable&&h.preventDefault()}}},[]),u=c.useCallback(function(g,h,b,y){var x={name:g,delta:h,target:b,should:y,shadowParent:zie(b)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(w){return w!==x})},1)},[]),d=c.useCallback(function(g){n.current=qu(g),r.current=void 0},[]),f=c.useCallback(function(g){u(g.type,H1(g),g.target,a(g,e.lockRef.current))},[]),m=c.useCallback(function(g){u(g.type,qu(g),g.target,a(g,e.lockRef.current))},[]);c.useEffect(function(){return Ca.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Ea),document.addEventListener("touchmove",l,Ea),document.addEventListener("touchstart",d,Ea),function(){Ca=Ca.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,Ea),document.removeEventListener("touchmove",l,Ea),document.removeEventListener("touchstart",d,Ea)}},[]);var p=e.removeScrollBar,v=e.inert;return c.createElement(c.Fragment,null,v?c.createElement(i,{styles:Vie(o)}):null,p?c.createElement(Iie,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function zie(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Bie=gie(nL,$ie);var aL=c.forwardRef(function(e,t){return c.createElement(Um,lo({},e,{ref:t,sideCar:Bie}))});aL.classNames=Um.classNames;var Hie=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ka=new WeakMap,Ku=new WeakMap,Yu={},uv=0,lL=function(e){return e&&(e.host||lL(e.parentNode))},Gie=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=lL(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})},Wie=function(e,t,n,r){var o=Gie(t,Array.isArray(e)?e:[e]);Yu[n]||(Yu[n]=new WeakMap);var i=Yu[n],s=[],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(m){if(a.has(m))d(m);else try{var p=m.getAttribute(r),v=p!==null&&p!=="false",g=(ka.get(m)||0)+1,h=(i.get(m)||0)+1;ka.set(m,g),i.set(m,h),s.push(m),g===1&&v&&Ku.set(m,!0),h===1&&m.setAttribute(n,"true"),v||m.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return d(t),a.clear(),uv++,function(){s.forEach(function(f){var m=ka.get(f)-1,p=i.get(f)-1;ka.set(f,m),i.set(f,p),m||(Ku.has(f)||f.removeAttribute(r),Ku.delete(f)),p||f.removeAttribute(n)}),uv--,uv||(ka=new WeakMap,ka=new WeakMap,Ku=new WeakMap,Yu={})}},Uie=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Hie(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Wie(r,o,n,"aria-hidden")):function(){return null}},cL="Dialog",[uL]=Io(cL),[$Pe,Mo]=uL(cL),dL="DialogTrigger",qie=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mo(dL,n),i=on(t,o.triggerRef);return E.jsx(At.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":O0(o.open),...r,ref:i,onClick:kt(e.onClick,o.onOpenToggle)})});qie.displayName=dL;var Kie="DialogPortal",[zPe,fL]=uL(Kie,{forceMount:void 0}),rp="DialogOverlay",pL=c.forwardRef((e,t)=>{const n=fL(rp,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Mo(rp,e.__scopeDialog);return i.modal?E.jsx(ss,{present:r||i.open,children:E.jsx(Xie,{...o,ref:t})}):null});pL.displayName=rp;var Yie=Hf("DialogOverlay.RemoveScroll"),Xie=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mo(rp,n);return E.jsx(aL,{as:Yie,allowPinchZoom:!0,shards:[o.contentRef],children:E.jsx(At.div,{"data-state":O0(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Us="DialogContent",mL=c.forwardRef((e,t)=>{const n=fL(Us,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Mo(Us,e.__scopeDialog);return E.jsx(ss,{present:r||i.open,children:i.modal?E.jsx(Zie,{...o,ref:t}):E.jsx(Jie,{...o,ref:t})})});mL.displayName=Us;var Zie=c.forwardRef((e,t)=>{const n=Mo(Us,e.__scopeDialog),r=c.useRef(null),o=on(t,n.contentRef,r);return c.useEffect(()=>{const i=r.current;if(i)return Uie(i)},[]),E.jsx(hL,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:kt(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:kt(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:kt(e.onFocusOutside,i=>i.preventDefault())})}),Jie=c.forwardRef((e,t)=>{const n=Mo(Us,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return E.jsx(hL,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;n.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),hL=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=Mo(Us,n),l=c.useRef(null),u=on(t,l);return sie(),E.jsxs(E.Fragment,{children:[E.jsx(ZD,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:E.jsx(S0,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":O0(a.open),...s,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),E.jsxs(E.Fragment,{children:[E.jsx(ese,{titleId:a.titleId}),E.jsx(nse,{contentRef:l,descriptionId:a.descriptionId})]})]})}),N0="DialogTitle",gL=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mo(N0,n);return E.jsx(At.h2,{id:o.titleId,...r,ref:t})});gL.displayName=N0;var vL="DialogDescription",bL=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mo(vL,n);return E.jsx(At.p,{id:o.descriptionId,...r,ref:t})});bL.displayName=vL;var yL="DialogClose",Qie=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mo(yL,n);return E.jsx(At.button,{type:"button",...r,ref:t,onClick:kt(e.onClick,()=>o.onOpenChange(!1))})});Qie.displayName=yL;function O0(e){return e?"open":"closed"}var xL="DialogTitleWarning",[BPe,wL]=OQ(xL,{contentName:Us,titleName:N0,docsSlug:"dialog"}),ese=({titleId:e})=>{const t=wL(xL),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
233
|
+
|
|
234
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
235
|
+
|
|
236
|
+
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},tse="DialogDescriptionWarning",nse=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${wL(tse).contentName}}.`;return c.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},rse=pL,ose=mL,ise=gL,sse=bL;rse.displayName;ose.displayName;ise.displayName;sse.displayName;Pn("body-sm-medium");[Pn("body-xs-medium"),"mb-1 px-2 text-secondary-text uppercase"].join(" ");function ase(e,t=[]){let n=[];function r(i,s){const a=c.createContext(s);a.displayName=i+"Context";const l=n.length;n=[...n,s];const u=f=>{const{scope:m,children:p,...v}=f,g=m?.[e]?.[l]||a,h=c.useMemo(()=>v,Object.values(v));return E.jsx(g.Provider,{value:h,children:p})};u.displayName=i+"Provider";function d(f,m){const p=m?.[e]?.[l]||a,v=c.useContext(p);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(s=>c.createContext(s));return function(s){const a=s?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:a}}),[s,a])}};return o.scopeName=e,[r,lse(o,...t)]}function lse(...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(o){const i=r.reduce((s,{useScope:a,scopeName:l})=>{const u=a(o)[`__scope${l}`];return{...s,...u}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var I0="Progress",A0=100,[cse]=ase(I0),[use,dse]=cse(I0),EL=c.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=pse,...s}=e;(o||o===0)&&!W1(o)&&console.error(mse(`${o}`,"Progress"));const a=W1(o)?o:A0;r!==null&&!U1(r,a)&&console.error(hse(`${r}`,"Progress"));const l=U1(r,a)?r:null,u=op(l)?i(l,a):void 0;return E.jsx(use,{scope:n,value:l,max:a,children:E.jsx(Wm.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":op(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":kL(l,a),"data-value":l??void 0,"data-max":a,...s,ref:t})})});EL.displayName=I0;var CL="ProgressIndicator",fse=c.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=dse(CL,n);return E.jsx(Wm.div,{"data-state":kL(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});fse.displayName=CL;function pse(e,t){return`${Math.round(e/t*100)}%`}function kL(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function op(e){return typeof e=="number"}function W1(e){return op(e)&&!isNaN(e)&&e>0}function U1(e,t){return op(e)&&!isNaN(e)&&e<=t&&e>=0}function mse(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${A0}\`.`}function hse(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
237
|
+
- a positive number
|
|
238
|
+
- less than the value passed to \`max\` (or ${A0} if no \`max\` prop is set)
|
|
239
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
240
|
+
|
|
241
|
+
Defaulting to \`null\`.`}var gse=EL;gse.displayName;function vse(e){const t=e+"CollectionProvider",[n,r]=Io(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:h,children:b}=g,y=ae.useRef(null),x=ae.useRef(new Map).current;return E.jsx(o,{scope:h,itemMap:x,collectionRef:y,children:b})};s.displayName=t;const a=e+"CollectionSlot",l=Hf(a),u=ae.forwardRef((g,h)=>{const{scope:b,children:y}=g,x=i(a,b),w=on(h,x.collectionRef);return E.jsx(l,{ref:w,children:y})});u.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",m=Hf(d),p=ae.forwardRef((g,h)=>{const{scope:b,children:y,...x}=g,w=ae.useRef(null),C=on(h,w),R=i(d,b);return ae.useEffect(()=>(R.itemMap.set(w,{ref:w,...x}),()=>{R.itemMap.delete(w)})),E.jsx(m,{[f]:"",ref:C,children:y})});p.displayName=d;function v(g){const h=i(e+"CollectionConsumer",g);return ae.useCallback(()=>{const b=h.collectionRef.current;if(!b)return[];const y=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((x,w)=>y.indexOf(x.ref.current)-y.indexOf(w.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},v,r]}var bse=c.createContext(void 0);function M0(e){const t=c.useContext(bse);return e||t||"ltr"}var dv="rovingFocusGroup.onEntryFocus",yse={bubbles:!1,cancelable:!0},Wc="RovingFocusGroup",[gy,RL,xse]=vse(Wc),[wse,qm]=Io(Wc,[xse]),[Ese,Cse]=wse(Wc),SL=c.forwardRef((e,t)=>E.jsx(gy.Provider,{scope:e.__scopeRovingFocusGroup,children:E.jsx(gy.Slot,{scope:e.__scopeRovingFocusGroup,children:E.jsx(kse,{...e,ref:t})})}));SL.displayName=Wc;var kse=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,m=c.useRef(null),p=on(t,m),v=M0(i),[g,h]=wl({prop:s,defaultProp:a??null,onChange:l,caller:Wc}),[b,y]=c.useState(!1),x=Ws(u),w=RL(n),C=c.useRef(!1),[R,k]=c.useState(0);return c.useEffect(()=>{const S=m.current;if(S)return S.addEventListener(dv,x),()=>S.removeEventListener(dv,x)},[x]),E.jsx(Ese,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:g,onItemFocus:c.useCallback(S=>h(S),[h]),onItemShiftTab:c.useCallback(()=>y(!0),[]),onFocusableItemAdd:c.useCallback(()=>k(S=>S+1),[]),onFocusableItemRemove:c.useCallback(()=>k(S=>S-1),[]),children:E.jsx(At.div,{tabIndex:b||R===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:kt(e.onMouseDown,()=>{C.current=!0}),onFocus:kt(e.onFocus,S=>{const P=!C.current;if(S.target===S.currentTarget&&P&&!b){const L=new CustomEvent(dv,yse);if(S.currentTarget.dispatchEvent(L),!L.defaultPrevented){const _=w().filter(V=>V.focusable),O=_.find(V=>V.active),B=_.find(V=>V.id===g),I=[O,B,..._].filter(Boolean).map(V=>V.ref.current);IL(I,d)}}C.current=!1}),onBlur:kt(e.onBlur,()=>y(!1))})})}),NL="RovingFocusGroupItem",OL=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:s,...a}=e,l=R0(),u=i||l,d=Cse(NL,n),f=d.currentTabStopId===u,m=RL(n),{onFocusableItemAdd:p,onFocusableItemRemove:v,currentTabStopId:g}=d;return c.useEffect(()=>{if(r)return p(),()=>v()},[r,p,v]),E.jsx(gy.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:E.jsx(At.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:kt(e.onMouseDown,h=>{r?d.onItemFocus(u):h.preventDefault()}),onFocus:kt(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:kt(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){d.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const b=Nse(h,d.orientation,d.dir);if(b!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let y=m().filter(x=>x.focusable).map(x=>x.ref.current);if(b==="last")y.reverse();else if(b==="prev"||b==="next"){b==="prev"&&y.reverse();const x=y.indexOf(h.currentTarget);y=d.loop?Ose(y,x+1):y.slice(x+1)}setTimeout(()=>IL(y))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:g!=null}):s})})});OL.displayName=NL;var Rse={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Sse(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Nse(e,t,n){const r=Sse(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Rse[r]}function IL(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Ose(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var AL=SL,ML=OL,P0="Radio",[Ise,PL]=Io(P0),[Ase,Mse]=Ise(P0),_L=c.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:s,value:a="on",onCheck:l,form:u,...d}=e,[f,m]=c.useState(null),p=on(t,h=>m(h)),v=c.useRef(!1),g=f?u||!!f.closest("form"):!0;return E.jsxs(Ase,{scope:n,checked:o,disabled:s,children:[E.jsx(At.button,{type:"button",role:"radio","aria-checked":o,"data-state":jL(o),"data-disabled":s?"":void 0,disabled:s,value:a,...d,ref:p,onClick:kt(e.onClick,h=>{o||l?.(),g&&(v.current=h.isPropagationStopped(),v.current||h.stopPropagation())})}),g&&E.jsx(LL,{control:f,bubbles:!v.current,name:r,value:a,checked:o,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});_L.displayName=P0;var TL="RadioIndicator",DL=c.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=Mse(TL,n);return E.jsx(ss,{present:r||i.checked,children:E.jsx(At.span,{"data-state":jL(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});DL.displayName=TL;var Pse="RadioBubbleInput",LL=c.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const s=c.useRef(null),a=on(s,i),l=Xw(n),u=Tm(t);return c.useEffect(()=>{const d=s.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&m){const p=new Event("click",{bubbles:r});m.call(d,n),d.dispatchEvent(p)}},[l,n,r]),E.jsx(At.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}})});LL.displayName=Pse;function jL(e){return e?"checked":"unchecked"}var _se=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Km="RadioGroup",[Tse]=Io(Km,[qm,PL]),VL=qm(),FL=PL(),[Dse,Lse]=Tse(Km),$L=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:s=!1,disabled:a=!1,orientation:l,dir:u,loop:d=!0,onValueChange:f,...m}=e,p=VL(n),v=M0(u),[g,h]=wl({prop:i,defaultProp:o??null,onChange:f,caller:Km});return E.jsx(Dse,{scope:n,name:r,required:s,disabled:a,value:g,onValueChange:h,children:E.jsx(AL,{asChild:!0,...p,orientation:l,dir:v,loop:d,children:E.jsx(At.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":a?"":void 0,dir:v,...m,ref:t})})})});$L.displayName=Km;var zL="RadioGroupItem",BL=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=Lse(zL,n),s=i.disabled||r,a=VL(n),l=FL(n),u=c.useRef(null),d=on(t,u),f=i.value===o.value,m=c.useRef(!1);return c.useEffect(()=>{const p=g=>{_se.includes(g.key)&&(m.current=!0)},v=()=>m.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",v)}},[]),E.jsx(ML,{asChild:!0,...a,focusable:!s,active:f,children:E.jsx(_L,{disabled:s,required:i.required,checked:f,...l,...o,name:i.name,ref:d,onCheck:()=>i.onValueChange(o.value),onKeyDown:kt(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:kt(o.onFocus,()=>{m.current&&u.current?.click()})})})});BL.displayName=zL;var jse="RadioGroupIndicator",Vse=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=FL(n);return E.jsx(DL,{...o,...r,ref:t})});Vse.displayName=jse;var Fse=$L,$se=BL;Fse.displayName;$se.displayName;var Ym="Switch",[zse]=Io(Ym),[Bse,Hse]=zse(Ym),HL=c.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:s,disabled:a,value:l="on",onCheckedChange:u,form:d,...f}=e,[m,p]=c.useState(null),v=on(t,x=>p(x)),g=c.useRef(!1),h=m?d||!!m.closest("form"):!0,[b,y]=wl({prop:o,defaultProp:i??!1,onChange:u,caller:Ym});return E.jsxs(Bse,{scope:n,checked:b,disabled:a,children:[E.jsx(At.button,{type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":UL(b),"data-disabled":a?"":void 0,disabled:a,value:l,...f,ref:v,onClick:kt(e.onClick,x=>{y(w=>!w),h&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),h&&E.jsx(WL,{control:m,bubbles:!g.current,name:r,value:l,checked:b,required:s,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});HL.displayName=Ym;var GL="SwitchThumb",Gse=c.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=Hse(GL,n);return E.jsx(At.span,{"data-state":UL(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Gse.displayName=GL;var Wse="SwitchBubbleInput",WL=c.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const s=c.useRef(null),a=on(s,i),l=Xw(n),u=Tm(t);return c.useEffect(()=>{const d=s.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&m){const p=new Event("click",{bubbles:r});m.call(d,n),d.dispatchEvent(p)}},[l,n,r]),E.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}})});WL.displayName=Wse;function UL(e){return e?"checked":"unchecked"}var Use=HL;Use.displayName;var Xm="Tabs",[qse]=Io(Xm,[qm]),qL=qm(),[Kse,_0]=qse(Xm),Yse=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:s="horizontal",dir:a,activationMode:l="automatic",...u}=e,d=M0(a),[f,m]=wl({prop:r,onChange:o,defaultProp:i??"",caller:Xm});return E.jsx(Kse,{scope:n,baseId:R0(),value:f,onValueChange:m,orientation:s,dir:d,activationMode:l,children:E.jsx(At.div,{dir:d,"data-orientation":s,...u,ref:t})})});Yse.displayName=Xm;var KL="TabsList",YL=c.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=_0(KL,n),s=qL(n);return E.jsx(AL,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:r,children:E.jsx(At.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});YL.displayName=KL;var XL="TabsTrigger",ZL=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,s=_0(XL,n),a=qL(n),l=ej(s.baseId,r),u=tj(s.baseId,r),d=r===s.value;return E.jsx(ML,{asChild:!0,...a,focusable:!o,active:d,children:E.jsx(At.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,...i,ref:t,onMouseDown:kt(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?s.onValueChange(r):f.preventDefault()}),onKeyDown:kt(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&s.onValueChange(r)}),onFocus:kt(e.onFocus,()=>{const f=s.activationMode!=="manual";!d&&!o&&f&&s.onValueChange(r)})})})});ZL.displayName=XL;var JL="TabsContent",QL=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...s}=e,a=_0(JL,n),l=ej(a.baseId,r),u=tj(a.baseId,r),d=r===a.value,f=c.useRef(d);return c.useEffect(()=>{const m=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(m)},[]),E.jsx(ss,{present:o||d,children:({present:m})=>E.jsx(At.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!m,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:m&&i})})});QL.displayName=JL;function ej(e,t){return`${e}-trigger-${t}`}function tj(e,t){return`${e}-content-${t}`}var Xse=YL,Zse=ZL,Jse=QL;sa(["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:[Pn("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:[Pn("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"}});c.createContext("default");Xse.displayName;Zse.displayName;Jse.displayName;var Qse="Arrow",nj=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return E.jsx(At.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});nj.displayName=Qse;var eae=nj,T0="Popper",[rj,oj]=Io(T0),[tae,ij]=rj(T0),sj=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return E.jsx(tae,{scope:t,anchor:r,onAnchorChange:o,children:n})};sj.displayName=T0;var aj="PopperAnchor",lj=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=ij(aj,n),s=c.useRef(null),a=on(t,s),l=c.useRef(null);return c.useEffect(()=>{const u=l.current;l.current=r?.current||s.current,u!==l.current&&i.onAnchorChange(l.current)}),r?null:E.jsx(At.div,{...o,ref:a})});lj.displayName=aj;var D0="PopperContent",[nae,rae]=rj(D0),cj=c.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:v,...g}=e,h=ij(D0,n),[b,y]=c.useState(null),x=on(t,te=>y(te)),[w,C]=c.useState(null),R=Tm(w),k=R?.width??0,S=R?.height??0,P=r+(i!=="center"?"-"+i:""),L=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},_=Array.isArray(u)?u:[u],O=_.length>0,B={padding:L,boundary:_.filter(iae),altBoundary:O},{refs:I,floatingStyles:V,placement:F,isPositioned:D,middlewareData:T}=CD({strategy:"fixed",placement:P,whileElementsMounted:(...te)=>fy(...te,{animationFrame:p==="always"}),elements:{reference:h.anchor},middleware:[kD({mainAxis:o+S,alignmentAxis:s}),l&&RD({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?SD():void 0,...B}),l&&ND({...B}),OD({...B,apply:({elements:te,rects:le,availableWidth:z,availableHeight:re})=>{const{width:oe,height:M}=le.reference,N=te.floating.style;N.setProperty("--radix-popper-available-width",`${z}px`),N.setProperty("--radix-popper-available-height",`${re}px`),N.setProperty("--radix-popper-anchor-width",`${oe}px`),N.setProperty("--radix-popper-anchor-height",`${M}px`)}}),w&&sre({element:w,padding:a}),sae({arrowWidth:k,arrowHeight:S}),m&&ID({strategy:"referenceHidden",...B})]}),[q,A]=fj(F),ee=Ws(v);Hi(()=>{D&&ee?.()},[D,ee]);const ie=T.arrow?.x,Y=T.arrow?.y,Q=T.arrow?.centerOffset!==0,[X,J]=c.useState();return Hi(()=>{b&&J(window.getComputedStyle(b).zIndex)},[b]),E.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:D?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[T.transformOrigin?.x,T.transformOrigin?.y].join(" "),...T.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(nae,{scope:n,placedSide:q,onArrowChange:C,arrowX:ie,arrowY:Y,shouldHideArrow:Q,children:E.jsx(At.div,{"data-side":q,"data-align":A,...g,ref:x,style:{...g.style,animation:D?void 0:"none"}})})})});cj.displayName=D0;var uj="PopperArrow",oae={top:"bottom",right:"left",bottom:"top",left:"right"},dj=c.forwardRef(function(e,t){const{__scopePopper:n,...r}=e,o=rae(uj,n),i=oae[o.placedSide];return E.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:E.jsx(eae,{...r,ref:t,style:{...r.style,display:"block"}})})});dj.displayName=uj;function iae(e){return e!==null}var sae=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,s=i?0:e.arrowWidth,a=i?0:e.arrowHeight,[l,u]=fj(n),d={start:"0%",center:"50%",end:"100%"}[u],f=(o.arrow?.x??0)+s/2,m=(o.arrow?.y??0)+a/2;let p="",v="";return l==="bottom"?(p=i?d:`${f}px`,v=`${-a}px`):l==="top"?(p=i?d:`${f}px`,v=`${r.floating.height+a}px`):l==="right"?(p=`${-a}px`,v=i?d:`${m}px`):l==="left"&&(p=`${r.floating.width+a}px`,v=i?d:`${m}px`),{data:{x:p,y:v}}}});function fj(e){const[t,n="center"]=e.split("-");return[t,n]}var aae=sj,lae=lj,cae=cj,uae=dj,dae=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"}),fae="VisuallyHidden",pj=c.forwardRef((e,t)=>E.jsx(At.span,{...e,ref:t,style:{...dae,...e.style}}));pj.displayName=fae;var pae=pj,[Zm]=Io("Tooltip",[oj]),Jm=oj(),mae="TooltipProvider",vy="tooltip.open",[HPe,L0]=Zm(mae),yc="Tooltip",[hae,Uc]=Zm(yc),mj=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,l=L0(yc,e.__scopeTooltip),u=Jm(t),[d,f]=c.useState(null),m=R0(),p=c.useRef(0),v=s??l.disableHoverableContent,g=a??l.delayDuration,h=c.useRef(!1),[b,y]=wl({prop:r,defaultProp:o??!1,onChange:k=>{k?(l.onOpen(),document.dispatchEvent(new CustomEvent(vy))):l.onClose(),i?.(k)},caller:yc}),x=c.useMemo(()=>b?h.current?"delayed-open":"instant-open":"closed",[b]),w=c.useCallback(()=>{window.clearTimeout(p.current),p.current=0,h.current=!1,y(!0)},[y]),C=c.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y(!1)},[y]),R=c.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{h.current=!0,y(!0),p.current=0},g)},[g,y]);return c.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),E.jsx(aae,{...u,children:E.jsx(hae,{scope:t,contentId:m,open:b,stateAttribute:x,trigger:d,onTriggerChange:f,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?R():w()},[l.isOpenDelayedRef,R,w]),onTriggerLeave:c.useCallback(()=>{v?C():(window.clearTimeout(p.current),p.current=0)},[C,v]),onOpen:w,onClose:C,disableHoverableContent:v,children:n})})};mj.displayName=yc;var by="TooltipTrigger",hj=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Uc(by,n),i=L0(by,n),s=Jm(n),a=c.useRef(null),l=on(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]),E.jsx(lae,{asChild:!0,...s,children:E.jsx(At.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:kt(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:kt(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:kt(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:kt(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:kt(e.onBlur,o.onClose),onClick:kt(e.onClick,o.onClose)})})});hj.displayName=by;var j0="TooltipPortal",[gae,vae]=Zm(j0,{forceMount:void 0}),gj=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=Uc(j0,t);return E.jsx(gae,{scope:t,forceMount:n,children:E.jsx(ss,{present:n||i.open,children:E.jsx(QD,{asChild:!0,container:o,children:r})})})};gj.displayName=j0;var ul="TooltipContent",vj=c.forwardRef((e,t)=>{const n=vae(ul,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=Uc(ul,e.__scopeTooltip);return E.jsx(ss,{present:r||s.open,children:s.disableHoverableContent?E.jsx(bj,{side:o,...i,ref:t}):E.jsx(bae,{side:o,...i,ref:t})})}),bae=c.forwardRef((e,t)=>{const n=Uc(ul,e.__scopeTooltip),r=L0(ul,e.__scopeTooltip),o=c.useRef(null),i=on(t,o),[s,a]=c.useState(null),{trigger:l,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,m=c.useCallback(()=>{a(null),f(!1)},[f]),p=c.useCallback((v,g)=>{const h=v.currentTarget,b={x:v.clientX,y:v.clientY},y=Eae(b,h.getBoundingClientRect()),x=Cae(b,y),w=kae(g.getBoundingClientRect()),C=Sae([...x,...w]);a(C),f(!0)},[f]);return c.useEffect(()=>()=>m(),[m]),c.useEffect(()=>{if(l&&d){const v=h=>p(h,d),g=h=>p(h,l);return l.addEventListener("pointerleave",v),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",g)}}},[l,d,p,m]),c.useEffect(()=>{if(s){const v=g=>{const h=g.target,b={x:g.clientX,y:g.clientY},y=l?.contains(h)||d?.contains(h),x=!Rae(b,s);y?m():x&&(m(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,d,s,u,m]),E.jsx(bj,{...e,ref:i})}),[yae,xae]=Zm(yc,{isInside:!1}),wae=jQ("TooltipContent"),bj=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=Uc(ul,n),u=Jm(n),{onClose:d}=l;return c.useEffect(()=>(document.addEventListener(vy,d),()=>document.removeEventListener(vy,d)),[d]),c.useEffect(()=>{if(l.trigger){const f=m=>{m.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),E.jsx(S0,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:E.jsxs(cae,{"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:[E.jsx(wae,{children:r}),E.jsx(yae,{scope:n,isInside:!0,children:E.jsx(pae,{id:l.contentId,role:"tooltip",children:o||r})})]})})});vj.displayName=ul;var yj="TooltipArrow",xj=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Jm(n);return xae(yj,n).isInside?null:E.jsx(uae,{...o,...r,ref:t})});xj.displayName=yj;function Eae(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Cae(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 kae(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 Rae(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],l=t[s],u=a.x,d=a.y,f=l.x,m=l.y;d>r!=m>r&&n<(f-u)*(r-d)/(m-d)+u&&(o=!o)}return o}function Sae(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),Nae(t)}function Nae(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 i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.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 i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.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 Oae=mj,Iae=hj,Aae=gj,wj=vj,Mae=xj;const Pae=`bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95
|
|
242
|
+
data-[state=closed]:animate-out data-[state=closed]:fade-out-0
|
|
243
|
+
data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2
|
|
244
|
+
data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2
|
|
245
|
+
data-[side=top]:slide-in-from-bottom-2 z-50
|
|
246
|
+
origin-[--radix-tooltip-content-transform-origin] overflow-hidden rounded-md px-3
|
|
247
|
+
py-1.5 text-xs`,_ae=Oae,Tae=Iae,Dae=Mae,Ej=({className:e,sideOffset:t=4,ref:n,...r})=>E.jsx(Aae,{children:E.jsx(wj,{ref:n,sideOffset:t,className:wT(Pae,e),...r})});Ej.displayName=wj.displayName;const Lae=(e=!1)=>{const[t,n]=ae.useState(e);return{isOpened:t,openPopup:()=>n(!0),closePopup:()=>n(!1),togglePopup:()=>n(r=>!r)}};sa(["text-primary-text cursor-pointer rounded-[0.75rem] bg-transparent","hover:bg-tertiary-bg",Pn("body-xs-medium")].join(" "),{variants:{size:{sm:"h-7 min-w-7 px-2",default:"h-8 min-w-8 px-3",lg:"h-9 min-w-9 px-3.5"},active:{true:`bg-primary-inverse-bg text-primary-inverse-text
|
|
248
|
+
hover:bg-primary-inverse-bg`,false:""}},compoundVariants:[{size:"sm",active:!0,className:"size-7 px-0"},{size:"default",active:!0,className:"size-8 px-0"},{size:"lg",active:!0,className:"size-9 px-0"}],defaultVariants:{size:"default",active:!1}});Pn("body-xl-medium");function Cj(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=Cj(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function jae(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Cj(e))&&(r&&(r+=" "),r+=t);return r}const Vae=(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},Fae=(e,t)=>({classGroupId:e,validator:t}),kj=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ip="-",q1=[],$ae="arbitrary..",zae=e=>{const t=Hae(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Bae(o);const i=o.split(ip),s=i[0]===""&&i.length>1?1:0;return Rj(i,s,t)},getConflictingClassGroupIds:(o,i)=>{if(i){const s=r[o],a=n[o];return s?a?Vae(a,s):s:a||q1}return n[o]||q1}}},Rj=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const l=Rj(e,t+1,o);if(l)return l}const i=n.validators;if(i===null)return;const s=t===0?e.join(ip):e.slice(t).join(ip),a=i.length;for(let l=0;l<a;l++){const u=i[l];if(u.validator(s))return u.classGroupId}},Bae=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?$ae+r:void 0})(),Hae=e=>{const{theme:t,classGroups:n}=e;return Gae(n,t)},Gae=(e,t)=>{const n=kj();for(const r in e){const o=e[r];V0(o,n,r,t)}return n},V0=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Wae(s,t,n,r)}},Wae=(e,t,n,r)=>{if(typeof e=="string"){Uae(e,t,n);return}if(typeof e=="function"){qae(e,t,n,r);return}Kae(e,t,n,r)},Uae=(e,t,n)=>{const r=e===""?t:Sj(t,e);r.classGroupId=n},qae=(e,t,n,r)=>{if(Yae(e)){V0(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Fae(n,e))},Kae=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];V0(l,Sj(t,a),n,r)}},Sj=(e,t)=>{let n=e;const r=t.split(ip),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=kj(),n.nextPart.set(s,a)),n=a}return n},Yae=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Xae=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},yy="!",K1=":",Zae=[],Y1=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Jae=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,u;const d=o.length;for(let g=0;g<d;g++){const h=o[g];if(s===0&&a===0){if(h===K1){i.push(o.slice(l,g)),l=g+1;continue}if(h==="/"){u=g;continue}}h==="["?s++:h==="]"?s--:h==="("?a++:h===")"&&a--}const f=i.length===0?o:o.slice(l);let m=f,p=!1;f.endsWith(yy)?(m=f.slice(0,-1),p=!0):f.startsWith(yy)&&(m=f.slice(1),p=!0);const v=u&&u>l?u-l:void 0;return Y1(i,p,m,v)};if(t){const o=t+K1,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):Y1(Zae,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Qae=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},ele=e=>({cache:Xae(e.cacheSize),parseClassName:Jae(e),sortModifiers:Qae(e),...zae(e)}),tle=/\s+/,nle=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(tle);let l="";for(let u=a.length-1;u>=0;u-=1){const d=a[u],{isExternal:f,modifiers:m,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:g}=n(d);if(f){l=d+(l.length>0?" "+l:l);continue}let h=!!g,b=r(h?v.substring(0,g):v);if(!b){if(!h){l=d+(l.length>0?" "+l:l);continue}if(b=r(v),!b){l=d+(l.length>0?" "+l:l);continue}h=!1}const y=m.length===0?"":m.length===1?m[0]:i(m).join(":"),x=p?y+yy:y,w=x+b;if(s.indexOf(w)>-1)continue;s.push(w);const C=o(b,h);for(let R=0;R<C.length;++R){const k=C[R];s.push(x+k)}l=d+(l.length>0?" "+l:l)}return l},rle=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Nj(n))&&(o&&(o+=" "),o+=r);return o},Nj=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Nj(e[r]))&&(n&&(n+=" "),n+=t);return n},X1=(e,...t)=>{let n,r,o,i;const s=l=>{const u=t.reduce((d,f)=>f(d),e());return n=ele(u),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const u=r(l);if(u)return u;const d=nle(l,n);return o(l,d),d};return i=s,(...l)=>i(rle(...l))},ole=[],mn=e=>{const t=n=>n[e]||ole;return t.isThemeGetter=!0,t},Oj=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ij=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ile=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,sle=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ale=/\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$/,lle=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,cle=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ule=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mi=e=>ile.test(e),tt=e=>!!e&&!Number.isNaN(Number(e)),hi=e=>!!e&&Number.isInteger(Number(e)),fv=e=>e.endsWith("%")&&tt(e.slice(0,-1)),Ho=e=>sle.test(e),Aj=()=>!0,dle=e=>ale.test(e)&&!lle.test(e),F0=()=>!1,fle=e=>cle.test(e),ple=e=>ule.test(e),mle=e=>!Ie(e)&&!De(e),hle=e=>us(e,_j,F0),Ie=e=>Oj.test(e),Is=e=>us(e,Tj,dle),Z1=e=>us(e,Cle,tt),gle=e=>us(e,Lj,Aj),vle=e=>us(e,Dj,F0),J1=e=>us(e,Mj,F0),ble=e=>us(e,Pj,ple),Xu=e=>us(e,jj,fle),De=e=>Ij.test(e),Pl=e=>la(e,Tj),yle=e=>la(e,Dj),Q1=e=>la(e,Mj),xle=e=>la(e,_j),wle=e=>la(e,Pj),Zu=e=>la(e,jj,!0),Ele=e=>la(e,Lj,!0),us=(e,t,n)=>{const r=Oj.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},la=(e,t,n=!1)=>{const r=Ij.exec(e);return r?r[1]?t(r[1]):n:!1},Mj=e=>e==="position"||e==="percentage",Pj=e=>e==="image"||e==="url",_j=e=>e==="length"||e==="size"||e==="bg-size",Tj=e=>e==="length",Cle=e=>e==="number",Dj=e=>e==="family-name",Lj=e=>e==="number"||e==="weight",jj=e=>e==="shadow",eS=()=>{const e=mn("color"),t=mn("font"),n=mn("text"),r=mn("font-weight"),o=mn("tracking"),i=mn("leading"),s=mn("breakpoint"),a=mn("container"),l=mn("spacing"),u=mn("radius"),d=mn("shadow"),f=mn("inset-shadow"),m=mn("text-shadow"),p=mn("drop-shadow"),v=mn("blur"),g=mn("perspective"),h=mn("aspect"),b=mn("ease"),y=mn("animate"),x=()=>["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"],C=()=>[...w(),De,Ie],R=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],S=()=>[De,Ie,l],P=()=>[mi,"full","auto",...S()],L=()=>[hi,"none","subgrid",De,Ie],_=()=>["auto",{span:["full",hi,De,Ie]},hi,De,Ie],O=()=>[hi,"auto",De,Ie],B=()=>["auto","min","max","fr",De,Ie],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...S()],D=()=>[mi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],T=()=>[mi,"screen","full","dvw","lvw","svw","min","max","fit",...S()],q=()=>[mi,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],A=()=>[e,De,Ie],ee=()=>[...w(),Q1,J1,{position:[De,Ie]}],ie=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Y=()=>["auto","cover","contain",xle,hle,{size:[De,Ie]}],Q=()=>[fv,Pl,Is],X=()=>["","none","full",u,De,Ie],J=()=>["",tt,Pl,Is],te=()=>["solid","dashed","dotted","double"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[tt,fv,Q1,J1],re=()=>["","none",v,De,Ie],oe=()=>["none",tt,De,Ie],M=()=>["none",tt,De,Ie],N=()=>[tt,De,Ie],j=()=>[mi,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ho],breakpoint:[Ho],color:[Aj],container:[Ho],"drop-shadow":[Ho],ease:["in","out","in-out"],font:[mle],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ho],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ho],shadow:[Ho],spacing:["px",tt],text:[Ho],"text-shadow":[Ho],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",mi,Ie,De,h]}],container:["container"],columns:[{columns:[tt,Ie,De,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:C()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[hi,"auto",De,Ie]}],basis:[{basis:[mi,"full","auto",a,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[tt,mi,"auto","initial","none",Ie]}],grow:[{grow:["",tt,De,Ie]}],shrink:[{shrink:["",tt,De,Ie]}],order:[{order:[hi,"first","last","none",De,Ie]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],"inline-size":[{inline:["auto",...T()]}],"min-inline-size":[{"min-inline":["auto",...T()]}],"max-inline-size":[{"max-inline":["none",...T()]}],"block-size":[{block:["auto",...q()]}],"min-block-size":[{"min-block":["auto",...q()]}],"max-block-size":[{"max-block":["none",...q()]}],w:[{w:[a,"screen",...D()]}],"min-w":[{"min-w":[a,"screen","none",...D()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",n,Pl,Is]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Ele,gle]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",fv,Ie]}],"font-family":[{font:[yle,vle,t]}],"font-features":[{"font-features":[Ie]}],"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,De,Ie]}],"line-clamp":[{"line-clamp":[tt,"none",De,Z1]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",De,Ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",De,Ie]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[tt,"from-font","auto",De,Is]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[tt,"auto",De,Ie]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",De,Ie]}],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",De,Ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:Y()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},hi,De,Ie],radial:["",De,Ie],conic:[hi,De,Ie]},wle,ble]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[tt,De,Ie]}],"outline-w":[{outline:["",tt,Pl,Is]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",d,Zu,Xu]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",f,Zu,Xu]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[tt,Is]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",m,Zu,Xu]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[tt,De,Ie]}],"mix-blend":[{"mix-blend":[...le(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":le()}],"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":[tt]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[De,Ie]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"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":[tt]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:Y()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",De,Ie]}],filter:[{filter:["","none",De,Ie]}],blur:[{blur:re()}],brightness:[{brightness:[tt,De,Ie]}],contrast:[{contrast:[tt,De,Ie]}],"drop-shadow":[{"drop-shadow":["","none",p,Zu,Xu]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",tt,De,Ie]}],"hue-rotate":[{"hue-rotate":[tt,De,Ie]}],invert:[{invert:["",tt,De,Ie]}],saturate:[{saturate:[tt,De,Ie]}],sepia:[{sepia:["",tt,De,Ie]}],"backdrop-filter":[{"backdrop-filter":["","none",De,Ie]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[tt,De,Ie]}],"backdrop-contrast":[{"backdrop-contrast":[tt,De,Ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",tt,De,Ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[tt,De,Ie]}],"backdrop-invert":[{"backdrop-invert":["",tt,De,Ie]}],"backdrop-opacity":[{"backdrop-opacity":[tt,De,Ie]}],"backdrop-saturate":[{"backdrop-saturate":[tt,De,Ie]}],"backdrop-sepia":[{"backdrop-sepia":["",tt,De,Ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",De,Ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[tt,"initial",De,Ie]}],ease:[{ease:["linear","initial",b,De,Ie]}],delay:[{delay:[tt,De,Ie]}],animate:[{animate:["none",y,De,Ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,De,Ie]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:M()}],"scale-x":[{"scale-x":M()}],"scale-y":[{"scale-y":M()}],"scale-z":[{"scale-z":M()}],"scale-3d":["scale-3d"],skew:[{skew:N()}],"skew-x":[{"skew-x":N()}],"skew-y":[{"skew-y":N()}],transform:[{transform:[De,Ie,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:j()}],"translate-x":[{"translate-x":j()}],"translate-y":[{"translate-y":j()}],"translate-z":[{"translate-z":j()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",De,Ie]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",De,Ie]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[tt,Pl,Is,Z1]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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"]}},kle=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:o={},override:i={}})=>($l(e,"cacheSize",t),$l(e,"prefix",n),$l(e,"experimentalParseClassName",r),Ju(e.theme,i.theme),Ju(e.classGroups,i.classGroups),Ju(e.conflictingClassGroups,i.conflictingClassGroups),Ju(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),$l(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),Qu(e.theme,o.theme),Qu(e.classGroups,o.classGroups),Qu(e.conflictingClassGroups,o.conflictingClassGroups),Qu(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),Vj(e,o,"orderSensitiveModifiers"),e),$l=(e,t,n)=>{n!==void 0&&(e[t]=n)},Ju=(e,t)=>{if(t)for(const n in t)$l(e,n,t[n])},Qu=(e,t)=>{if(t)for(const n in t)Vj(e,t,n)},Vj=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},Rle=(e,...t)=>typeof e=="function"?X1(eS,e,...t):X1(()=>kle(eS(),e),...t);Rle({extend:{theme:{text:["h1","h2","h3"]}}});const tS=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,nS=jae,ca=(e,t)=>n=>{var r;if(t?.variants==null)return nS(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const d=n?.[u],f=i?.[u];if(d===null)return null;const m=tS(d)||tS(f);return o[u][m]}),a=n&&Object.entries(n).reduce((u,d)=>{let[f,m]=d;return m===void 0||(u[f]=m),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:m,...p}=d;return Object.entries(p).every(v=>{let[g,h]=v;return Array.isArray(h)?h.includes({...i,...a}[g]):{...i,...a}[g]===h})?[...u,f,m]:u},[]);return nS(e,s,l,n?.class,n?.className)},Sle=ca("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"}}),_n=(e="body-md-regular")=>Sle({variant:e});ca("tracking-normal whitespace-nowrap",{variants:{kind:{status:_n("body-xs-medium"),priority:_n("body-sm-regular")}},defaultVariants:{kind:"status"}});function rS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function $0(...e){return t=>{let n=!1;const r=e.map(o=>{const i=rS(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():rS(e[o],null)}}}}function sn(...e){return c.useCallback($0(...e),e)}var Nle=Symbol.for("react.lazy"),sp=c[" use ".trim().toString()];function Ole(e){return typeof e=="object"&&e!==null&&"then"in e}function Fj(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Nle&&"_payload"in e&&Ole(e._payload)}function Ile(e){const t=Ale(e),n=c.forwardRef((r,o)=>{let{children:i,...s}=r;Fj(i)&&typeof sp=="function"&&(i=sp(i._payload));const a=c.Children.toArray(i),l=a.find(Ple);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 E.jsx(t,{...s,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return E.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Ale(e){const t=c.forwardRef((n,r)=>{let{children:o,...i}=n;if(Fj(o)&&typeof sp=="function"&&(o=sp(o._payload)),c.isValidElement(o)){const s=Tle(o),a=_le(i,o.props);return o.type!==c.Fragment&&(a.ref=r?$0(r,s):s),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Mle=Symbol("radix.slottable");function Ple(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Mle}function _le(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const a=i(...s);return o(...s),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Tle(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)}ca(["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
|
|
249
|
+
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
|
|
250
|
+
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
|
|
251
|
+
aria-expanded:text-primary-text`},size:{lg:`${_n("body-lg-medium")} w-fit gap-2 px-4.5 py-3
|
|
252
|
+
[&_svg]:size-[18px]`,md:`${_n("body-md-medium")} w-fit gap-2 px-4.5 py-2
|
|
253
|
+
[&_svg]:size-4`,sm:`${_n("body-sm-medium")} w-fit gap-2 px-3 py-2
|
|
254
|
+
[&_svg]:size-4`,xs:`${_n("body-xs-medium")} w-fit gap-1 px-3 py-2
|
|
255
|
+
[&_svg]:size-[14px]`,default:`${_n("body-sm-medium")} size-9 [&_svg]:size-4`}},compoundVariants:[{variant:"link",size:"lg",className:"[&_svg]:size-5"}],defaultVariants:{variant:"primary",size:"md"}});ca(`${_n("body-sm-regular")} text-muted-foreground
|
|
256
|
+
group-data-[disabled=true]/card:text-disabled-text`);function Dle(e,t){const n=c.createContext(t),r=i=>{const{children:s,...a}=i,l=c.useMemo(()=>a,Object.values(a));return E.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(i){const s=c.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function Po(e,t=[]){let n=[];function r(i,s){const a=c.createContext(s),l=n.length;n=[...n,s];const u=f=>{const{scope:m,children:p,...v}=f,g=m?.[e]?.[l]||a,h=c.useMemo(()=>v,Object.values(v));return E.jsx(g.Provider,{value:h,children:p})};u.displayName=i+"Provider";function d(f,m){const p=m?.[e]?.[l]||a,v=c.useContext(p);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(s=>c.createContext(s));return function(s){const a=s?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:a}}),[s,a])}};return o.scopeName=e,[r,Lle(o,...t)]}function Lle(...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(o){const i=r.reduce((s,{useScope:a,scopeName:l})=>{const u=a(o)[`__scope${l}`];return{...s,...u}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Rt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var Ui=globalThis?.document?c.useLayoutEffect:()=>{},jle=c[" useInsertionEffect ".trim().toString()]||Ui;function qc({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=Vle({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=Fle(d)?d(e):d;f!==e&&s.current?.(f)}else i(d)},[a,e,i,s]);return[l,u]}function Vle({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),i=c.useRef(t);return jle(()=>{i.current=t},[t]),c.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function Fle(e){return typeof e=="function"}function z0(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 Qm(e){const[t,n]=c.useState(void 0);return Ui(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,a=u.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function $le(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var ua=e=>{const{present:t,children:n}=e,r=zle(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),i=sn(r.ref,Ble(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:i}):null};ua.displayName="Presence";function zle(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),i=c.useRef("none"),s=e?"mounted":"unmounted",[a,l]=$le(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=ed(r.current);i.current=a==="mounted"?u:"none"},[a]),Ui(()=>{const u=r.current,d=o.current;if(d!==e){const f=i.current,m=ed(u);e?l("MOUNT"):m==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&f!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ui(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=p=>{const v=ed(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&v&&(l("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=p=>{p.target===t&&(i.current=ed(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),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 ed(e){return e?.animationName||"none"}function Ble(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 ap(e){const t=Hle(e),n=c.forwardRef((r,o)=>{const{children:i,...s}=r,a=c.Children.toArray(i),l=a.find(Wle);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 E.jsx(t,{...s,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return E.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Hle(e){const t=c.forwardRef((n,r)=>{const{children:o,...i}=n;if(c.isValidElement(o)){const s=qle(o),a=Ule(i,o.props);return o.type!==c.Fragment&&(a.ref=r?$0(r,s):s),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $j=Symbol("radix.slottable");function Gle(e){const t=({children:n})=>E.jsx(E.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=$j,t}function Wle(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$j}function Ule(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const a=i(...s);return o(...s),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function qle(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 Kle=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Mt=Kle.reduce((e,t)=>{const n=ap(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Yle(e,t){e&&dt.flushSync(()=>e.dispatchEvent(t))}var eh="Checkbox",[Xle]=Po(eh),[Zle,B0]=Xle(eh);function Jle(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:i,form:s,name:a,onCheckedChange:l,required:u,value:d="on",internal_do_not_use_render:f}=e,[m,p]=qc({prop:n,defaultProp:o??!1,onChange:l,caller:eh}),[v,g]=c.useState(null),[h,b]=c.useState(null),y=c.useRef(!1),x=v?!!s||!!v.closest("form"):!0,w={checked:m,disabled:i,setChecked:p,control:v,setControl:g,name:a,form:s,value:d,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:ji(o)?!1:o,isFormControl:x,bubbleInput:h,setBubbleInput:b};return E.jsx(Zle,{scope:t,...w,children:ece(f)?f(w):r})}var zj="CheckboxTrigger",Bj=c.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:i,value:s,disabled:a,checked:l,required:u,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:m,isFormControl:p,bubbleInput:v}=B0(zj,e),g=sn(o,d),h=c.useRef(l);return c.useEffect(()=>{const b=i?.form;if(b){const y=()=>f(h.current);return b.addEventListener("reset",y),()=>b.removeEventListener("reset",y)}},[i,f]),E.jsx(Mt.button,{type:"button",role:"checkbox","aria-checked":ji(l)?"mixed":l,"aria-required":u,"data-state":qj(l),"data-disabled":a?"":void 0,disabled:a,value:s,...r,ref:g,onKeyDown:Rt(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:Rt(n,b=>{f(y=>ji(y)?!0:!y),v&&p&&(m.current=b.isPropagationStopped(),m.current||b.stopPropagation())})})});Bj.displayName=zj;var Hj=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:s,disabled:a,value:l,onCheckedChange:u,form:d,...f}=e;return E.jsx(Jle,{__scopeCheckbox:n,checked:o,defaultChecked:i,disabled:a,required:s,onCheckedChange:u,name:r,form:d,value:l,internal_do_not_use_render:({isFormControl:m})=>E.jsxs(E.Fragment,{children:[E.jsx(Bj,{...f,ref:t,__scopeCheckbox:n}),m&&E.jsx(Uj,{__scopeCheckbox:n})]})})});Hj.displayName=eh;var Gj="CheckboxIndicator",Qle=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=B0(Gj,n);return E.jsx(ua,{present:r||ji(i.checked)||i.checked===!0,children:E.jsx(Mt.span,{"data-state":qj(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Qle.displayName=Gj;var Wj="CheckboxBubbleInput",Uj=c.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:i,defaultChecked:s,required:a,disabled:l,name:u,value:d,form:f,bubbleInput:m,setBubbleInput:p}=B0(Wj,e),v=sn(n,p),g=z0(i),h=Qm(r);c.useEffect(()=>{const y=m;if(!y)return;const x=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(x,"checked").set,C=!o.current;if(g!==i&&w){const R=new Event("click",{bubbles:C});y.indeterminate=ji(i),w.call(y,ji(i)?!1:i),y.dispatchEvent(R)}},[m,g,i,o]);const b=c.useRef(ji(i)?!1:i);return E.jsx(Mt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??b.current,required:a,disabled:l,name:u,value:d,form:f,...t,tabIndex:-1,ref:v,style:{...t.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Uj.displayName=Wj;function ece(e){return typeof e=="function"}function ji(e){return e==="indeterminate"}function qj(e){return ji(e)?"indeterminate":e?"checked":"unchecked"}const Kj=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),tce=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),nce=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),oS=e=>{const t=nce(e);return t.charAt(0).toUpperCase()+t.slice(1)};var rce={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 oce=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},ice=ae.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>ae.createElement("svg",{ref:l,...rce,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Kj("lucide",o),...!i&&!oce(a)&&{"aria-hidden":"true"},...a},[...s.map(([u,d])=>ae.createElement(u,d)),...Array.isArray(i)?i:[i]])),xt=(e,t)=>{const n=ae.forwardRef(({className:r,...o},i)=>ae.createElement(ice,{ref:i,iconNode:t,className:Kj(`lucide-${tce(oS(e))}`,`lucide-${e}`,r),...o}));return n.displayName=oS(e),n},sce=[["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"}]];xt("bell-ring",sce);const ace=[["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"}]];xt("book-user",ace);const lce=[["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"}]];xt("briefcase-business",lce);const cce=[["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"}]];xt("building-2",cce);const uce=[["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"}]];xt("calendar-1",uce);const dce=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]];xt("chart-line",dce);const fce=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]];xt("chevron-down",fce);const pce=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]];xt("chevron-left",pce);const mce=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]];xt("chevron-right",mce);const hce=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]];xt("chevrons-up-down",hce);const gce=[["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"}]];xt("circle-question-mark",gce);const vce=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]];xt("clock-3",vce);const bce=[["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"}]];xt("ellipsis",bce);const yce=[["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"}]];xt("folder-open",yce);const xce=[["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"}]];xt("funnel",xce);const wce=[["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"}]];xt("layout-grid",wce);const Ece=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]];xt("list-filter",Ece);const Cce=[["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"}]];xt("list-todo",Cce);const kce=[["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"}]];xt("message-circle",kce);const Rce=[["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"}]];xt("palette",Rce);const Sce=[["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"}]];xt("phone",Sce);const Nce=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]];xt("plus",Nce);const Oce=[["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"}]];xt("rotate-ccw",Oce);const Ice=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]];xt("search",Ice);const Ace=[["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"}]];xt("settings",Ace);const Mce=[["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"}]];xt("tag",Mce);const Pce=[["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"}]];xt("user-cog",Pce);const _ce=[["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"}]];xt("users",_ce);const Tce=[["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"}]];xt("wrench",Tce);const Dce=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]];xt("x",Dce);Hj.displayName;const iS={};function wo(e,t){const n=c.useRef(iS);return n.current===iS&&(n.current=e(t)),n}const pv=c[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Lce=pv&&pv!==c.useLayoutEffect?pv:e=>e();function Jt(e){const t=wo(jce).current;return t.next=e,Lce(t.effect),t.trampoline}function jce(){const e={next:void 0,callback:Vce,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Vce(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const Fce=()=>{},at=typeof document<"u"?c.useLayoutEffect:Fce,H0=c.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(H0.displayName="CompositeListContext");function $ce(){return c.useContext(H0)}function Yj(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=Jt(o),s=c.useRef(0),a=wo(Bce).current,l=wo(zce).current,[u,d]=c.useState(0),f=c.useRef(u),m=Jt((b,y)=>{l.set(b,y??null),f.current+=1,d(f.current)}),p=Jt(b=>{l.delete(b),f.current+=1,d(f.current)}),v=c.useMemo(()=>{const b=new Map;return Array.from(l.keys()).filter(y=>y.isConnected).sort(Hce).forEach((y,x)=>{const w=l.get(y)??{};b.set(y,{...w,index:x})}),b},[l,u]);at(()=>{if(typeof MutationObserver!="function"||v.size===0)return;const b=new MutationObserver(y=>{const x=new Set,w=C=>x.has(C)?x.delete(C):x.add(C);y.forEach(C=>{C.removedNodes.forEach(w),C.addedNodes.forEach(w)}),x.size===0&&(f.current+=1,d(f.current))});return v.forEach((y,x)=>{x.parentElement&&b.observe(x.parentElement,{childList:!0})}),()=>{b.disconnect()}},[v]),at(()=>{f.current===u&&(n.current.length!==v.size&&(n.current.length=v.size),r&&r.current.length!==v.size&&(r.current.length=v.size),s.current=v.size),i(v)},[i,v,n,r,u]),at(()=>()=>{n.current=[]},[n]),at(()=>()=>{r&&(r.current=[])},[r]);const g=Jt(b=>(a.add(b),()=>{a.delete(b)}));at(()=>{a.forEach(b=>b(v))},[a,v]);const h=c.useMemo(()=>({register:m,unregister:p,subscribeMapChange:g,elementsRef:n,labelsRef:r,nextIndexRef:s}),[m,p,g,n,r,s]);return E.jsx(H0.Provider,{value:h,children:t})}function zce(){return new Map}function Bce(){return new Set}function Hce(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 Xj=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(Xj.displayName="DirectionContext");function Zj(){return c.useContext(Xj)?.direction??"ltr"}function Jr(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 lp(e,t,n,r){const o=wo(Jj).current;return Wce(o,e,t,n,r)&&Qj(o,[e,t,n,r]),o.callback}function Gce(e){const t=wo(Jj).current;return Uce(t,e)&&Qj(t,e),t.callback}function Jj(){return{callback:null,cleanup:null,refs:[]}}function Wce(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function Uce(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function Qj(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 i=t[o];if(i!=null)switch(typeof i){case"function":{const s=i(n);typeof s=="function"&&(r[o]=s);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=r[o];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}}}}}}}const qce=parseInt(c.version,10);function G0(e){return qce>=e}function sS(e){if(!c.isValidElement(e))return null;const t=e,n=t.props;return(G0(19)?n?.ref:t.ref)??null}function xy(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Kce(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function Yce(e,t){return typeof e=="function"?e(t):e}function Xce(e,t){return typeof e=="function"?e(t):e}const ec={};function eV(e,t,n,r,o){let i={...wy(e,ec)};return t&&(i=rf(i,t)),n&&(i=rf(i,n)),r&&(i=rf(i,r)),i}function Zce(e){if(e.length===0)return ec;if(e.length===1)return wy(e[0],ec);let t={...wy(e[0],ec)};for(let n=1;n<e.length;n+=1)t=rf(t,e[n]);return t}function rf(e,t){return tV(t)?t(e):Jce(e,t)}function Jce(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=xy(e.style,r);break}case"className":{e[n]=nV(e.className,r);break}default:Qce(n,r)?e[n]=eue(e[n],r):e[n]=r}}return e}function Qce(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 tV(e){return typeof e=="function"}function wy(e,t){return tV(e)?e(t):e??ec}function eue(e,t){return t?e?n=>{if(tue(n)){const o=n;Ey(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function Ey(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function nV(e,t){return t?e?t+" "+e:t:e}function tue(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function er(){}const fr=Object.freeze({}),nue={style:{transition:"none"}},rue="data-base-ui-click-trigger",oue={fallbackAxisSide:"none"},iue={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function qn(e,t,n={}){const r=t.render,o=sue(t,n);if(n.enabled===!1)return null;const i=n.state??fr;return lue(e,r,o,i)}function sue(e,t={}){const{className:n,style:r,render:o}=e,{state:i=fr,ref:s,props:a,stateAttributesMapping:l,enabled:u=!0}=t,d=u?Yce(n,i):void 0,f=u?Xce(r,i):void 0,m=u?Kce(i,l):fr,p=u?xy(m,Array.isArray(a)?Zce(a):a)??fr:fr;return typeof document<"u"&&(u?Array.isArray(s)?p.ref=Gce([p.ref,sS(o),...s]):p.ref=lp(p.ref,sS(o),s):lp(null,null)),u?(d!==void 0&&(p.className=nV(p.className,d)),f!==void 0&&(p.style=xy(p.style,f)),p):fr}const aue=Symbol.for("react.lazy");function lue(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=eV(n,t.props);o.ref=n.ref;let i=t;if(i?.$$typeof===aue&&(i=c.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!c.isValidElement(i))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(`
|
|
257
|
+
`));return c.cloneElement(i,o)}if(e&&typeof e=="string")return cue(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Jr(8))}function cue(e,t){return e==="button"?ae.createElement("button",{type:"button",...t,key:t.key}):e==="img"?ae.createElement("img",{alt:"",...t,key:t.key}):c.createElement(e,t)}const of="none",uue="trigger-press",due="trigger-hover",fue="outside-press",aS="clear-press",pue="chip-remove-press",td="input-change",lS="input-clear",rV="focus-out",mue="escape-key",oV="list-navigation";function qt(e,t,n,r){let o=!1,i=!1;const s=fr;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...s}}const Cy={...c};let cS=0;function hue(e,t="mui"){const[n,r]=c.useState(e),o=e||n;return c.useEffect(()=>{n==null&&(cS+=1,r(`${t}-${cS}`))},[n,t]),o}const uS=Cy.useId;function W0(e,t){if(uS!==void 0){const n=uS();return e??(t?`${t}-${n}`:n)}return hue(e,t)}function U0(e){return W0(e,"base-ui")}const gue=[];function iV(e){c.useEffect(e,gue)}const nd=null;let dS=globalThis.requestAnimationFrame;class vue{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"&&dS!==requestAnimationFrame&&(dS=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 rd=new vue;class oo{static create(){return new oo}static request(t){return rd.request(t)}static cancel(t){return rd.cancel(t)}currentId=nd;request(t){this.cancel(),this.currentId=rd.request(()=>{this.currentId=nd,t()})}cancel=()=>{this.currentId!==nd&&(rd.cancel(this.currentId),this.currentId=nd)};disposeEffect=()=>this.cancel}function q0(){const e=wo(oo.create).current;return iV(e.disposeEffect),e}function Ko(e){return e==null?e:"current"in e?e.current:e}let xc=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const bue={[xc.startingStyle]:""},yue={[xc.endingStyle]:""},sV={transitionStatus(e){return e==="starting"?bue:e==="ending"?yue:null}};function xue(e,t=!1,n=!0){const r=q0();return Jt((o,i=null)=>{r.cancel();function s(){dt.flushSync(o)}const a=Ko(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=xc.startingStyle;if(!l.hasAttribute(f)){r.request(d);return}const m=new MutationObserver(()=>{l.hasAttribute(f)||(m.disconnect(),d())});m.observe(l,{attributes:!0,attributeFilter:[f]}),i?.addEventListener("abort",()=>m.disconnect(),{once:!0})},d=function(){Promise.all(l.getAnimations().map(f=>f.finished)).then(()=>{i?.aborted||s()}).catch(()=>{const f=l.getAnimations();if(n){if(i?.aborted)return;s()}else f.length>0&&f.some(m=>m.pending||m.playState!=="finished")&&d()})};if(t){u();return}r.request(d)}})}function wue(e,t=!1,n=!1){const[r,o]=c.useState(e&&t?"idle":void 0),[i,s]=c.useState(e);return e&&!i&&(s(!0),o("starting")),!e&&i&&r!=="ending"&&!n&&o("ending"),!e&&!i&&r==="ending"&&o(void 0),at(()=>{if(!e&&i&&r!=="ending"&&n){const a=oo.request(()=>{o("ending")});return()=>{oo.cancel(a)}}},[e,i,r,n]),at(()=>{if(!e||t)return;const a=oo.request(()=>{o(void 0)});return()=>{oo.cancel(a)}},[t,e]),at(()=>{if(!e||!t)return;e&&i&&r!=="idle"&&o("starting");const a=oo.request(()=>{o("idle")});return()=>{oo.cancel(a)}},[t,e,i,o,r]),c.useMemo(()=>({mounted:i,setMounted:s,transitionStatus:r}),[i,r])}let aV=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function lV(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:s,unregister:a,subscribeMapChange:l,elementsRef:u,labelsRef:d,nextIndexRef:f}=$ce(),m=c.useRef(-1),[p,v]=c.useState(i??(o===aV.GuessFromOrder?()=>{if(m.current===-1){const b=f.current;f.current+=1,m.current=b}return m.current}:-1)),g=c.useRef(null),h=c.useCallback(b=>{if(g.current=b,p!==-1&&b!==null&&(u.current[p]=b,d)){const y=t!==void 0;d.current[p]=y?t:r?.current?.textContent??b.textContent}},[p,u,d,t,r]);return at(()=>{if(i!=null)return;const b=g.current;if(b)return s(b,n),()=>{a(b)}},[i,s,a,n]),at(()=>{if(i==null)return l(b=>{const y=g.current?b.get(g.current)?.index:null;y!=null&&v(y)})},[i,l,v]),c.useMemo(()=>({ref:h,index:p}),[p,h])}function th(){return typeof window<"u"}function ds(e){return K0(e)?(e.nodeName||"").toLowerCase():"#document"}function jn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _o(e){var t;return(t=(K0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function K0(e){return th()?e instanceof Node||e instanceof jn(e).Node:!1}function yn(e){return th()?e instanceof Element||e instanceof jn(e).Element:!1}function In(e){return th()?e instanceof HTMLElement||e instanceof jn(e).HTMLElement:!1}function ky(e){return!th()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof jn(e).ShadowRoot}function fs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=jr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Eue(e){return/^(table|td|th)$/.test(ds(e))}function nh(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Cue=/transform|translate|scale|rotate|perspective|filter/,kue=/paint|layout|strict|content/,As=e=>!!e&&e!=="none";let mv;function Y0(e){const t=yn(e)?jr(e):e;return As(t.transform)||As(t.translate)||As(t.scale)||As(t.rotate)||As(t.perspective)||!X0()&&(As(t.backdropFilter)||As(t.filter))||Cue.test(t.willChange||"")||kue.test(t.contain||"")}function Rue(e){let t=qi(e);for(;In(t)&&!dl(t);){if(Y0(t))return t;if(nh(t))return null;t=qi(t)}return null}function X0(){return mv==null&&(mv=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),mv}function dl(e){return/^(html|body|#document)$/.test(ds(e))}function jr(e){return jn(e).getComputedStyle(e)}function rh(e){return yn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qi(e){if(ds(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ky(e)&&e.host||_o(e);return ky(t)?t.host:t}function cV(e){const t=qi(e);return dl(t)?e.ownerDocument?e.ownerDocument.body:e.body:In(t)&&fs(t)?t:cV(t)}function wc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=cV(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=jn(o);if(i){const a=Ry(s);return t.concat(s,s.visualViewport||[],fs(o)?o:[],a&&n?wc(a):[])}else return t.concat(o,wc(o,[],n))}function Ry(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}let Sy;process.env.NODE_ENV!=="production"&&(Sy=new Set);function fS(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Sy.has(t)||(Sy.add(t),console.error(`Base UI: ${t}`))}}const uV=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(uV.displayName="CompositeRootContext");function Sue(e=!1){const t=c.useContext(uV);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>.":Jr(16));return t}function Nue(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,s=r&&t!==!1,a=r&&t===!1;return{props:c.useMemo(()=>{const l={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(l.tabIndex=o,!i&&n&&(l.tabIndex=t?o:-1)),(i&&(t||s)||!i&&n)&&(l["aria-disabled"]=n),i&&(!t||a)&&(l.disabled=n),l},[r,n,t,s,a,i,o])}}function oh(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=c.useRef(null),s=Sue(!0)!==void 0,a=Jt(()=>{const m=i.current;return!!(m?.tagName==="A"&&m?.href)}),{props:l}=Nue({focusableWhenDisabled:n,disabled:t,composite:s,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&c.useEffect(()=>{if(!i.current)return;const m=i.current.tagName==="BUTTON";if(o){if(!m){const p=Cy.captureOwnerStack?.()||"";fS(`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(m){const p=Cy.captureOwnerStack?.()||"";fS(`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 m=i.current;Oue(m)&&s&&t&&l.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,l.disabled,s]);at(u,[u]);const d=c.useCallback((m={})=>{const{onClick:p,onMouseDown:v,onKeyUp:g,onKeyDown:h,onPointerDown:b,...y}=m;return eV({type:o?"button":void 0,onClick(x){if(t){x.preventDefault();return}p?.(x)},onMouseDown(x){t||v?.(x)},onKeyDown(x){if(t||(Ey(x),h?.(x)),x.baseUIHandlerPrevented)return;const w=x.target===x.currentTarget&&!o&&!a()&&!t,C=x.key==="Enter",R=x.key===" ";w&&((R||C)&&x.preventDefault(),C&&p?.(x))},onKeyUp(x){t||(Ey(x),g?.(x)),!x.baseUIHandlerPrevented&&x.target===x.currentTarget&&!o&&!t&&x.key===" "&&p?.(x)},onPointerDown(x){if(t){x.preventDefault();return}b?.(x)}},o?void 0:{role:"button"},l,y)},[t,l,o,a]),f=Jt(m=>{i.current=m,u()});return{getButtonProps:d,buttonRef:f}}function Oue(e){return In(e)&&e.tagName==="BUTTON"}const da=typeof navigator<"u",hv=Pue(),dV=Tue(),Z0=_ue(),fV=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Iue=hv.platform==="MacIntel"&&hv.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(hv.platform),pS=da&&/firefox/i.test(Z0),Aue=da&&/apple/i.test(navigator.vendor),cp=da&&/android/i.test(dV)||/android/i.test(Z0);da&&dV.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const Mue=Z0.includes("jsdom/");function Pue(){if(!da)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 _ue(){if(!da)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Tue(){if(!da)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const mS="data-base-ui-focusable",Due="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Ls(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Ht(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&ky(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function tc(e){return"composedPath"in e?e.composedPath()[0]:e.target}function J0(e){return In(e)&&e.matches(Due)}function hS(e){return e?e.getAttribute("role")==="combobox"&&J0(e):!1}function gS(e){return e?e.hasAttribute(mS)?e:e.querySelector(`[${mS}]`)||e:null}function Ny(e,t,n=!0){return e.filter(r=>r.parentId===t&&(!n||r.context?.open)).flatMap(r=>[r,...Ny(e,r.id,n)])}function vS(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(i=>i.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}function Pr(e){e.preventDefault(),e.stopPropagation()}function Lue(e){return e.pointerType===""&&e.isTrusted?!0:cp&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function jue(e){return Mue?!1:!cp&&e.width===0&&e.height===0||cp&&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 bS(e,t){return["mouse","pen"].includes(e)}function pV(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Vue=["top","right","bottom","left"],Ki=Math.min,lr=Math.max,up=Math.round,od=Math.floor,ho=e=>({x:e,y:e}),Fue={left:"right",right:"left",bottom:"top",top:"bottom"};function dp(e,t,n){return lr(e,Ki(t,n))}function Eo(e,t){return typeof e=="function"?e(t):e}function vr(e){return e.split("-")[0]}function ii(e){return e.split("-")[1]}function Q0(e){return e==="x"?"y":"x"}function ih(e){return e==="y"?"height":"width"}function Or(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function sh(e){return Q0(Or(e))}function $ue(e,t,n){n===void 0&&(n=!1);const r=ii(e),o=sh(e),i=ih(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=fp(s)),[s,fp(s)]}function zue(e){const t=fp(e);return[Oy(e),t,Oy(t)]}function Oy(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const yS=["left","right"],xS=["right","left"],Bue=["top","bottom"],Hue=["bottom","top"];function Gue(e,t,n){switch(e){case"top":case"bottom":return n?t?xS:yS:t?yS:xS;case"left":case"right":return t?Bue:Hue;default:return[]}}function Wue(e,t,n,r){const o=ii(e);let i=Gue(vr(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Oy)))),i}function fp(e){const t=vr(e);return Fue[t]+e.slice(t.length)}function Uue(e){return{top:0,right:0,bottom:0,left:0,...e}}function eE(e){return typeof e!="number"?Uue(e):{top:e,right:e,bottom:e,left:e}}function pp(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}}var que=["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] *)"],mp=que.join(","),mV=typeof Element>"u",fl=mV?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,hp=!mV&&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},gp=function(e,t){var n;t===void 0&&(t=!0);var r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),o=r===""||r==="true",i=o||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):gp(e.parentNode));return i},Kue=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},hV=function(e,t,n){if(gp(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(mp));return t&&fl.call(e,mp)&&r.unshift(e),r=r.filter(n),r},vp=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var i=o.shift();if(!gp(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),a=s.length?s:i.children,l=vp(a,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:i,candidates:l})}else{var u=fl.call(i,mp);u&&n.filter(i)&&(t||!e.includes(i))&&r.push(i);var d=i.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(i),f=!gp(d,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(d&&f){var m=vp(d===!0?i.children:d.children,!0,n);n.flatten?r.push.apply(r,m):r.push({scopeParent:i,candidates:m})}else o.unshift.apply(o,i.children)}}return r},gV=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},vV=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Kue(e))&&!gV(e)?0:e.tabIndex},Yue=function(e,t){var n=vV(e);return n<0&&t&&!gV(e)?0:n},Xue=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},bV=function(e){return e.tagName==="INPUT"},Zue=function(e){return bV(e)&&e.type==="hidden"},Jue=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},Que=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},ede=function(e){if(!e.name)return!0;var t=e.form||hp(e),n=function(i){return t.querySelectorAll('input[type="radio"][name="'+i+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=n(window.CSS.escape(e.name));else try{r=n(e.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 o=Que(r,e.form);return!o||o===e},tde=function(e){return bV(e)&&e.type==="radio"},nde=function(e){return tde(e)&&!ede(e)},rde=function(e){var t,n=e&&hp(e),r=(t=n)===null||t===void 0?void 0:t.host,o=!1;if(n&&n!==e){var i,s,a;for(o=!!((i=r)!==null&&i!==void 0&&(s=i.ownerDocument)!==null&&s!==void 0&&s.contains(r)||e!=null&&(a=e.ownerDocument)!==null&&a!==void 0&&a.contains(e));!o&&r;){var l,u,d;n=hp(r),r=(l=n)===null||l===void 0?void 0:l.host,o=!!((u=r)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(r))}}return o},wS=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},ode=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e){var o=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(e).visibility==="hidden")return!0;var i=fl.call(e,"details>summary:first-of-type"),s=i?e.parentElement:e;if(fl.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof r=="function"){for(var a=e;e;){var l=e.parentElement,u=hp(e);if(l&&!l.shadowRoot&&r(l)===!0)return wS(e);e.assignedSlot?e=e.assignedSlot:!l&&u!==e.ownerDocument?e=u.host:e=l}e=a}if(rde(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return wS(e);return!1},ide=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName==="LEGEND")return fl.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},Iy=function(e,t){return!(t.disabled||Zue(t)||ode(t,e)||Jue(t)||ide(t))},Ay=function(e,t){return!(nde(t)||vV(t)<0||!Iy(e,t))},sde=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},yV=function(e){var t=[],n=[];return e.forEach(function(r,o){var i=!!r.scopeParent,s=i?r.scopeParent:r,a=Yue(s,i),l=i?yV(r.candidates):s;a===0?i?t.push.apply(t,l):t.push(s):n.push({documentOrder:o,tabIndex:a,item:r,isScope:i,content:l})}),n.sort(Xue).reduce(function(r,o){return o.isScope?r.push.apply(r,o.content):r.push(o.content),r},[]).concat(t)},ah=function(e,t){t=t||{};var n;return t.getShadowRoot?n=vp([e],t.includeContainer,{filter:Ay.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:sde}):n=hV(e,t.includeContainer,Ay.bind(null,t)),yV(n)},ade=function(e,t){t=t||{};var n;return t.getShadowRoot?n=vp([e],t.includeContainer,{filter:Iy.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=hV(e,t.includeContainer,Iy.bind(null,t)),n},xV=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return fl.call(e,mp)===!1?!1:Ay(t,e)};function Rn(e){return e?.ownerDocument||document}const Kc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function wV(e,t){const n=ah(e,Kc()),r=n.length;if(r===0)return;const o=Ls(Rn(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function EV(e){return wV(Rn(e).body,1)||e}function CV(e){return wV(Rn(e).body,-1)||e}function nc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ht(n,r)}function lde(e){ah(e,Kc()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function ES(e){e.querySelectorAll("[data-tabindex]").forEach(t=>{const n=t.dataset.tabindex;delete t.dataset.tabindex,n?t.setAttribute("tabindex",n):t.removeAttribute("tabindex")})}function kV(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=Jt(o),s=xue(r,n,!1);c.useEffect(()=>{if(!t)return;const a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,n,i,s])}const _l=0;class Ec{static create(){return new Ec}currentId=_l;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=_l,n()},t)}isStarted(){return this.currentId!==_l}clear=()=>{this.currentId!==_l&&(clearTimeout(this.currentId),this.currentId=_l)};disposeEffect=()=>this.clear}function Cc(){const e=wo(Ec.create).current;return iV(e.disposeEffect),e}let CS={},kS={},RS="";function cde(e){if(typeof document>"u")return!1;const t=Rn(e);return jn(t).innerWidth-t.documentElement.clientWidth>0}function ude(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const t=Rn(e),n=t.documentElement,r=t.body,o=fs(n)?n:r,i=o.style.overflowY,s=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",o.style.overflowY="scroll";const a=o.offsetWidth;o.style.overflowY="hidden";const l=o.offsetWidth;return o.style.overflowY=i,n.style.scrollbarGutter=s,a===l}function dde(e){const t=Rn(e),n=t.documentElement,r=t.body,o=fs(n)?n:r,i={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,i)}}function fde(e){const t=Rn(e),n=t.documentElement,r=t.body,o=jn(n);let i=0,s=0,a=!1;const l=oo.create();if(fV&&(o.visualViewport?.scale??1)!==1)return()=>{};function u(){const m=o.getComputedStyle(n),p=o.getComputedStyle(r),v=(m.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,s=n.scrollLeft,CS={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},RS=n.style.scrollBehavior,kS={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 g=n.scrollHeight>n.clientHeight,h=n.scrollWidth>n.clientWidth,b=m.overflowY==="scroll"||p.overflowY==="scroll",y=m.overflowX==="scroll"||p.overflowX==="scroll",x=Math.max(0,o.innerWidth-r.clientWidth),w=Math.max(0,o.innerHeight-r.clientHeight),C=parseFloat(p.marginTop)+parseFloat(p.marginBottom),R=parseFloat(p.marginLeft)+parseFloat(p.marginRight),k=fs(n)?n:r;if(a=ude(e),a){n.style.scrollbarGutter=v,k.style.overflowY="hidden",k.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:v,overflowY:"hidden",overflowX:"hidden"}),(g||b)&&(n.style.overflowY="scroll"),(h||y)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:C||w?`calc(100dvh - ${C+w}px)`:"100dvh",width:R||x?`calc(100vw - ${R+x}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=s,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function d(){Object.assign(n.style,CS),Object.assign(r.style,kS),a||(n.scrollTop=i,n.scrollLeft=s,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=RS)}function f(){d(),l.request(u)}return u(),o.addEventListener("resize",f),()=>{l.cancel(),d(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",f)}}class pde{lockCount=0;restore=null;timeoutLock=Ec.create();timeoutUnlock=Ec.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 n=Rn(t).documentElement,r=jn(n).getComputedStyle(n).overflowY;if(r==="hidden"||r==="clip"){this.restore=er;return}const o=Iue||!cde(t);this.restore=o?dde(t):fde(t)}}const mde=new pde;function hde(e=!0,t=null){at(()=>{if(e)return mde.acquire(t)},[e,t])}function Ua(e){const t=wo(gde,e).current;return t.next=e,at(t.effect),t}function gde(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function vde(){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 RV=c.createContext(null);process.env.NODE_ENV!=="production"&&(RV.displayName="FloatingNodeContext");const SV=c.createContext(null);process.env.NODE_ENV!=="production"&&(SV.displayName="FloatingTreeContext");const bde=()=>c.useContext(RV)?.id||null,NV=e=>{const t=c.useContext(SV);return e??t};function My(e){return`data-base-ui-${e}`}const yde={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},OV={...yde,position:"fixed",top:0,left:0},kc=c.forwardRef(function(e,t){const[n,r]=c.useState();return at(()=>{Aue&&r("button")},[]),E.jsx("span",{...e,ref:t,style:OV,"aria-hidden":n?void 0:!0,tabIndex:0,role:n,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(kc.displayName="FocusGuard");let SS=0;function gv(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(SS);const i=()=>e?.focus({preventScroll:n});o?i():SS=requestAnimationFrame(i)}const qa={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function NS(e){return e==="inert"?qa.inert:e==="aria-hidden"?qa["aria-hidden"]:qa.none}let id=new WeakSet,sd={},vv=0;const IV=e=>e&&(e.host||IV(e.parentNode)),xde=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=IV(n);return e.contains(r)?r:null}).filter(n=>n!=null);function wde(e,t,n,r){const o="data-base-ui-inert",i=r?"inert":n?"aria-hidden":null,s=xde(t,e),a=new Set,l=new Set(s),u=[];sd[o]||(sd[o]=new WeakMap);const d=sd[o];s.forEach(f),m(t),a.clear();function f(p){!p||a.has(p)||(a.add(p),p.parentNode&&f(p.parentNode))}function m(p){!p||l.has(p)||[].forEach.call(p.children,v=>{if(ds(v)!=="script")if(a.has(v))m(v);else{const g=i?v.getAttribute(i):null,h=g!==null&&g!=="false",b=NS(i),y=(b.get(v)||0)+1,x=(d.get(v)||0)+1;b.set(v,y),d.set(v,x),u.push(v),y===1&&h&&id.add(v),x===1&&v.setAttribute(o,""),!h&&i&&v.setAttribute(i,i==="inert"?"":"true")}})}return vv+=1,()=>{u.forEach(p=>{const v=NS(i),g=(v.get(p)||0)-1,h=(d.get(p)||0)-1;v.set(p,g),d.set(p,h),g||(!id.has(p)&&i&&p.removeAttribute(i),id.delete(p)),h||p.removeAttribute(o)}),vv-=1,vv||(qa.inert=new WeakMap,qa["aria-hidden"]=new WeakMap,qa.none=new WeakMap,id=new WeakSet,sd={})}}function Ede(e,t=!1,n=!1){const r=Rn(e[0]).body;return wde(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const tE=c.createContext(null);process.env.NODE_ENV!=="production"&&(tE.displayName="PortalContext");const AV=()=>c.useContext(tE),Cde=My("portal");function kde(e={}){const{ref:t,container:n,componentProps:r=fr,elementProps:o}=e,i=W0(),s=AV()?.portalNode,[a,l]=c.useState(null),[u,d]=c.useState(null),f=Jt(v=>{v!==null&&d(v)}),m=c.useRef(null);at(()=>{if(n===null){m.current&&(m.current=null,d(null),l(null));return}if(i==null)return;const v=(n&&(K0(n)?n:n.current))??s??document.body;if(v==null){m.current&&(m.current=null,d(null),l(null));return}m.current!==v&&(m.current=v,d(null),l(v))},[n,s,i]);const p=qn("div",r,{ref:[t,f],props:[{id:i,[Cde]:""},o]});return{portalNode:u,portalSubtree:a&&p?dt.createPortal(p,a):null}}const MV=c.forwardRef(function(e,t){const{children:n,container:r,className:o,render:i,renderGuards:s,...a}=e,{portalNode:l,portalSubtree:u}=kde({container:r,ref:t,componentProps:e,elementProps:a}),d=c.useRef(null),f=c.useRef(null),m=c.useRef(null),p=c.useRef(null),[v,g]=c.useState(null),h=v?.modal,b=v?.open,y=typeof s=="boolean"?s:!!v&&!v.modal&&v.open&&!!l;c.useEffect(()=>{if(!l||h)return;function w(C){l&&C.relatedTarget&&nc(C)&&(C.type==="focusin"?ES:lde)(l)}return l.addEventListener("focusin",w,!0),l.addEventListener("focusout",w,!0),()=>{l.removeEventListener("focusin",w,!0),l.removeEventListener("focusout",w,!0)}},[l,h]),c.useEffect(()=>{!l||b||ES(l)},[b,l]);const x=c.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:m,afterInsideRef:p,portalNode:l,setFocusManagerState:g}),[l]);return E.jsxs(c.Fragment,{children:[u,E.jsxs(tE.Provider,{value:x,children:[y&&l&&E.jsx(kc,{"data-type":"outside",ref:d,onFocus:w=>{if(nc(w,l))m.current?.focus();else{const C=v?v.domReference:null;CV(C)?.focus()}}}),y&&l&&E.jsx("span",{"aria-owns":l.id,style:iue}),l&&dt.createPortal(n,l),y&&l&&E.jsx(kc,{"data-type":"outside",ref:f,onFocus:w=>{if(nc(w,l))p.current?.focus();else{const C=v?v.domReference:null;EV(C)?.focus(),v?.closeOnFocusOut&&v?.onOpenChange(!1,qt(rV,w.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(MV.displayName="FloatingPortal");function Rde(e,t){const n=jn(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 OS=20;let Ii=[];function nE(){Ii=Ii.filter(e=>e.deref()?.isConnected)}function Sde(e){nE(),e&&ds(e)!=="body"&&(Ii.push(new WeakRef(e)),Ii.length>OS&&(Ii=Ii.slice(-OS)))}function bv(){return nE(),Ii[Ii.length-1]?.deref()}function Nde(e){if(!e)return null;const t=Kc();return xV(e,t)?e:ah(e,t)[0]||e}function Ode(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():jr(e).display!=="none"}function IS(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=Kc(),r=ade(e,n).filter(i=>{const s=i.getAttribute("data-tabindex")||"";return xV(i,n)||i.hasAttribute("data-tabindex")&&!s.startsWith("-")}),o=e.getAttribute("tabindex");t.current.includes("floating")||r.length===0?o!=="0"&&e.setAttribute("tabindex","0"):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Ide(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:i=!0,restoreFocus:s=!1,modal:a=!0,closeOnFocusOut:l=!0,openInteractionType:u="",nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:m,externalTree:p}=e,v="rootStore"in t?t.rootStore:t,g=v.useState("open"),h=v.useState("domReferenceElement"),b=v.useState("floatingElement"),{events:y,dataRef:x}=v.context,w=Jt(()=>x.current.floatingContext?.nodeId),C=o===!1,R=hS(h)&&C,k=c.useRef(["content"]),S=Ua(o),P=Ua(i),L=Ua(u),_=NV(p),O=AV(),B=c.useRef(null),I=c.useRef(null),V=c.useRef(!1),F=c.useRef(!1),D=c.useRef(!1),T=c.useRef(-1),q=c.useRef(""),A=c.useRef(""),ee=c.useRef(null),ie=c.useRef(null),Y=lp(ee,m,O?.beforeInsideRef),Q=lp(ie,O?.afterInsideRef),X=Cc(),J=Cc(),te=q0(),le=O!=null,z=gS(b),re=Jt((N=z)=>N?ah(N,Kc()):[]),oe=Jt(N=>{const j=re(N);return k.current.map(()=>j).filter(Boolean).flat()});c.useEffect(()=>{if(r||!a)return;function N(K){K.key==="Tab"&&Ht(z,Ls(Rn(z)))&&re().length===0&&!R&&Pr(K)}const j=Rn(z);return j.addEventListener("keydown",N),()=>{j.removeEventListener("keydown",N)}},[r,h,z,a,k,R,re,oe]),c.useEffect(()=>{if(r||!g)return;const N=Rn(z);function j(){D.current=!1}function K(U){const $=tc(U),W=Ht(b,$)||Ht(h,$)||Ht(O?.portalNode,$);D.current=!W,A.current=U.pointerType||"keyboard",$?.closest(`[${rue}]`)&&(F.current=!0)}function H(){A.current="keyboard"}return N.addEventListener("pointerdown",K,!0),N.addEventListener("pointerup",j,!0),N.addEventListener("pointercancel",j,!0),N.addEventListener("keydown",H,!0),()=>{N.removeEventListener("pointerdown",K,!0),N.removeEventListener("pointerup",j,!0),N.removeEventListener("pointercancel",j,!0),N.removeEventListener("keydown",H,!0)}},[r,b,h,z,g,O]),c.useEffect(()=>{if(r||!l)return;const N=Rn(z);function j(){F.current=!0,J.start(0,()=>{F.current=!1})}function K(Z){const G=tc(Z),ne=re().indexOf(G);ne!==-1&&(T.current=ne)}function H(Z){const G=Z.relatedTarget,ne=Z.currentTarget,we=tc(Z);queueMicrotask(()=>{const Ve=w(),Ye=v.context.triggerElements,ft=G?.hasAttribute(My("focus-guard"))&&[ee.current,ie.current,O?.beforeInsideRef.current,O?.afterInsideRef.current,O?.beforeOutsideRef.current,O?.afterOutsideRef.current,Ko(f),Ko(d)].includes(G),qe=!(Ht(h,G)||Ht(b,G)||Ht(G,b)||Ht(O?.portalNode,G)||G!=null&&Ye.hasElement(G)||Ye.hasMatchingElement(ce=>Ht(ce,G))||ft||_&&(Ny(_.nodesRef.current,Ve).find(ce=>Ht(ce.context?.elements.floating,G)||Ht(ce.context?.elements.domReference,G))||vS(_.nodesRef.current,Ve).find(ce=>[ce.context?.elements.floating,gS(ce.context?.elements.floating)].includes(G)||ce.context?.elements.domReference===G)));if(ne===h&&z&&IS(z,k),s&&ne!==h&&!Ode(we)&&Ls(N)===N.body){if(In(z)&&(z.focus(),s==="popup")){te.request(()=>{z.focus()});return}const ce=T.current,Ke=re(),ot=Ke[ce]||Ke[Ke.length-1]||z;In(ot)&&ot.focus()}if(x.current.insideReactTree){x.current.insideReactTree=!1;return}(R||!a)&&G&&qe&&!F.current&&(R||G!==bv())&&(V.current=!0,v.setOpen(!1,qt(rV,Z)))})}function U(){D.current||(x.current.insideReactTree=!0,X.start(0,()=>{x.current.insideReactTree=!1}))}const $=In(h)?h:null,W=[];if(!(!b&&!$))return $&&($.addEventListener("focusout",H),$.addEventListener("pointerdown",j),W.push(()=>{$.removeEventListener("focusout",H),$.removeEventListener("pointerdown",j)})),b&&(b.addEventListener("focusin",K),b.addEventListener("focusout",H),O&&(b.addEventListener("focusout",U,!0),W.push(()=>{b.removeEventListener("focusout",U,!0)})),W.push(()=>{b.removeEventListener("focusin",K),b.removeEventListener("focusout",H)})),()=>{W.forEach(Z=>{Z()})}},[r,h,b,z,a,_,O,v,l,s,re,R,w,k,x,X,J,te,d,f]),c.useEffect(()=>{if(r||!b||!g)return;const N=Array.from(O?.portalNode?.querySelectorAll(`[${My("portal")}]`)||[]),j=(_?vS(_.nodesRef.current,w()):[]).find(H=>hS(H.context?.elements.domReference||null))?.context?.elements.domReference,K=[b,j,...N,B.current,I.current,ee.current,ie.current,O?.beforeOutsideRef.current,O?.afterOutsideRef.current,Ko(f),Ko(d),R?h:null].filter(H=>H!=null);return Ede(K,a||R)},[g,r,h,b,a,k,O,R,_,w,d,f]),at(()=>{if(!g||r||!In(z))return;const N=Rn(z),j=Ls(N);queueMicrotask(()=>{const K=oe(z),H=S.current,U=typeof H=="function"?H(L.current||""):H;if(U===void 0||U===!1)return;let $;U===!0||U===null?$=K[0]||z:$=Ko(U),$=$||K[0]||z,!Ht(z,j)&&gv($,{preventScroll:$===z})})},[r,g,z,C,oe,S,L]),at(()=>{if(r||!z)return;const N=Rn(z),j=Ls(N);Sde(j);function K($){if($.open||(q.current=Rde($.nativeEvent,A.current)),$.reason===due&&$.nativeEvent.type==="mouseleave"&&(V.current=!0),$.reason===fue)if($.nested)V.current=!1;else if(Lue($.nativeEvent)||jue($.nativeEvent))V.current=!1;else{let W=!1;document.createElement("div").focus({get preventScroll(){return W=!0,!1}}),W?V.current=!1:V.current=!0}}y.on("openchange",K);const H=N.createElement("span");H.setAttribute("tabindex","-1"),H.setAttribute("aria-hidden","true"),Object.assign(H.style,OV),le&&h&&h.insertAdjacentElement("afterend",H);function U(){const $=P.current;let W=typeof $=="function"?$(q.current):$;if(W===void 0||W===!1)return null;if(W===null&&(W=!0),typeof W=="boolean"){const G=h||bv();return G&&G.isConnected?G:H}const Z=h||bv()||H;return Ko(W)||Z}return()=>{y.off("openchange",K);const $=Ls(N),W=Ht(b,$)||_&&Ny(_.nodesRef.current,w(),!1).some(G=>Ht(G.context?.elements.floating,$)),Z=U();queueMicrotask(()=>{const G=Nde(Z),ne=typeof P.current!="boolean";P.current&&!V.current&&In(G)&&(!(!ne&&G!==$&&$!==N.body)||W)&&G.focus({preventScroll:!0}),H.remove(),V.current=!1})}},[r,b,z,P,x,y,_,le,h,w]),at(()=>{if(!fV||g||!b)return;const N=Ls(Rn(b));!In(N)||!J0(N)||Ht(b,N)&&N.blur()},[g,b]),at(()=>{if(!(r||!O))return O.setFocusManagerState({modal:a,closeOnFocusOut:l,open:g,onOpenChange:v.setOpen,domReference:h}),()=>{O.setFocusManagerState(null)}},[r,O,a,g,v,l,h]),at(()=>{if(!(r||!z))return IS(z,k),()=>{queueMicrotask(nE)}},[r,z,k]);const M=!r&&(a?!R:!0)&&(le||a);return E.jsxs(c.Fragment,{children:[M&&E.jsx(kc,{"data-type":"inside",ref:Y,onFocus:N=>{if(a){const j=oe();gv(j[j.length-1])}else O?.portalNode&&(V.current=!1,nc(N,O.portalNode)?EV(h)?.focus():Ko(f??O.beforeOutsideRef)?.focus())}}),n,M&&E.jsx(kc,{"data-type":"inside",ref:Q,onFocus:N=>{a?gv(oe()[0]):O?.portalNode&&(l&&(V.current=!0),nc(N,O.portalNode)?CV(h)?.focus():Ko(d??O.afterOutsideRef)?.focus())}})]})}function Ade(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:i="click",toggle:s=!0,ignoreMouse:a=!1,stickIfOpen:l=!0,touchOpenDelay:u=0,reason:d=uue}=t,f=c.useRef(void 0),m=q0(),p=Cc(),v=c.useMemo(()=>({onPointerDown(g){f.current=g.pointerType},onMouseDown(g){const h=f.current,b=g.nativeEvent,y=n.select("open");if(g.button!==0||i==="click"||bS(h)&&a)return;const x=r.current.openEvent,w=x?.type,C=n.select("domReferenceElement")!==g.currentTarget,R=y&&C||!(y&&s&&(!(x&&l)||w==="click"||w==="mousedown"));if(J0(b.target)){const S=qt(d,b,b.target);R&&h==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,S)}):n.setOpen(R,S);return}const k=g.currentTarget;m.request(()=>{const S=qt(d,b,k);R&&h==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,S)}):n.setOpen(R,S)})},onClick(g){if(i==="mousedown-only")return;const h=f.current;if(i==="mousedown"&&h){f.current=void 0;return}if(bS(h)&&a)return;const b=n.select("open"),y=r.current.openEvent,x=n.select("domReferenceElement")!==g.currentTarget,w=b&&x||!(b&&s&&(!(y&&l)||pV(y))),C=qt(d,g.nativeEvent,g.currentTarget);w&&h==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,C)}):n.setOpen(w,C)},onKeyDown(){f.current=void 0}}),[r,i,a,n,l,s,m,p,u,d]);return c.useMemo(()=>o?{reference:v}:fr,[o,v])}function AS(e,t,n){let{reference:r,floating:o}=e;const i=Or(t),s=sh(t),a=ih(s),l=vr(t),u=i==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,m=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(ii(t)){case"start":p[s]-=m*(n&&u?-1:1);break;case"end":p[s]+=m*(n&&u?-1:1);break}return p}async function Mde(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:p=0}=Eo(t,e),v=eE(p),g=a[m?f==="floating"?"reference":"floating":f],h=pp(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),b=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},w=pp(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:y,strategy:l}):b);return{top:(h.top-w.top+v.top)/x.y,bottom:(w.bottom-h.bottom+v.bottom)/x.y,left:(h.left-w.left+v.left)/x.x,right:(w.right-h.right+v.right)/x.x}}const Pde=50,_de=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:Mde},l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=AS(u,r,l),m=r,p=0;const v={};for(let g=0;g<i.length;g++){const h=i[g];if(!h)continue;const{name:b,fn:y}=h,{x,y:w,data:C,reset:R}=await y({x:d,y:f,initialPlacement:r,placement:m,strategy:o,middlewareData:v,rects:u,platform:a,elements:{reference:e,floating:t}});d=x??d,f=w??f,v[b]={...v[b],...C},R&&p<Pde&&(p++,typeof R=="object"&&(R.placement&&(m=R.placement),R.rects&&(u=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:d,y:f}=AS(u,m,l)),g=-1)}return{x:d,y:f,placement:m,strategy:o,middlewareData:v}},Tde=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=Eo(e,t)||{};if(u==null)return{};const f=eE(d),m={x:n,y:r},p=sh(o),v=ih(p),g=await s.getDimensions(u),h=p==="y",b=h?"top":"left",y=h?"bottom":"right",x=h?"clientHeight":"clientWidth",w=i.reference[v]+i.reference[p]-m[p]-i.floating[v],C=m[p]-i.reference[p],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let k=R?R[x]:0;(!k||!await(s.isElement==null?void 0:s.isElement(R)))&&(k=a.floating[x]||i.floating[v]);const S=w/2-C/2,P=k/2-g[v]/2-1,L=Ki(f[b],P),_=Ki(f[y],P),O=L,B=k-g[v]-_,I=k/2-g[v]/2+S,V=dp(O,I,B),F=!l.arrow&&ii(o)!=null&&I!==V&&i.reference[v]/2-(I<O?L:_)-g[v]/2<0,D=F?I<O?I-O:I-B:0;return{[p]:m[p]+D,data:{[p]:V,centerOffset:I-V-D,...F&&{alignmentOffset:D}},reset:F}}}),Dde=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...h}=Eo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=vr(o),y=Or(a),x=vr(a)===a,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=m||(x||!g?[fp(a)]:zue(a)),R=v!=="none";!m&&R&&C.push(...Wue(a,g,v,w));const k=[a,...C],S=await l.detectOverflow(t,h),P=[];let L=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&P.push(S[b]),f){const I=$ue(o,s,w);P.push(S[I[0]],S[I[1]])}if(L=[...L,{placement:o,overflows:P}],!P.every(I=>I<=0)){var _,O;const I=(((_=i.flip)==null?void 0:_.index)||0)+1,V=k[I];if(V&&(!(f==="alignment"&&y!==Or(V))||L.every(D=>Or(D.placement)===y?D.overflows[0]>0:!0)))return{data:{index:I,overflows:L},reset:{placement:V}};let F=(O=L.filter(D=>D.overflows[0]<=0).sort((D,T)=>D.overflows[1]-T.overflows[1])[0])==null?void 0:O.placement;if(!F)switch(p){case"bestFit":{var B;const D=(B=L.filter(T=>{if(R){const q=Or(T.placement);return q===y||q==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(q=>q>0).reduce((q,A)=>q+A,0)]).sort((T,q)=>T[1]-q[1])[0])==null?void 0:B[0];D&&(F=D);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function MS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function PS(e){return Vue.some(t=>e[t]>=0)}const Lde=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=Eo(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=MS(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:PS(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=MS(s,n.floating);return{data:{escapedOffsets:a,escaped:PS(a)}}}default:return{}}}}},PV=new Set(["left","top"]);async function jde(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=vr(n),a=ii(n),l=Or(n)==="y",u=PV.has(s)?-1:1,d=i&&l?-1:1,f=Eo(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof v=="number"&&(p=a==="end"?v*-1:v),l?{x:p*d,y:m*u}:{x:m*u,y:p*d}}const Vde=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await jde(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Fde=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:y,y:x}=b;return{x:y,y:x}}},...u}=Eo(e,t),d={x:n,y:r},f=await i.detectOverflow(t,u),m=Or(vr(o)),p=Q0(m);let v=d[p],g=d[m];if(s){const b=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=v+f[b],w=v-f[y];v=dp(x,v,w)}if(a){const b=m==="y"?"top":"left",y=m==="y"?"bottom":"right",x=g+f[b],w=g-f[y];g=dp(x,g,w)}const h=l.fn({...t,[p]:v,[m]:g});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:s,[m]:a}}}}}},$de=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Eo(e,t),d={x:n,y:r},f=Or(o),m=Q0(f);let p=d[m],v=d[f];const g=Eo(a,t),h=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const x=m==="y"?"height":"width",w=i.reference[m]-i.floating[x]+h.mainAxis,C=i.reference[m]+i.reference[x]-h.mainAxis;p<w?p=w:p>C&&(p=C)}if(u){var b,y;const x=m==="y"?"width":"height",w=PV.has(vr(o)),C=i.reference[f]-i.floating[x]+(w&&((b=s.offset)==null?void 0:b[f])||0)+(w?0:h.crossAxis),R=i.reference[f]+i.reference[x]+(w?0:((y=s.offset)==null?void 0:y[f])||0)-(w?h.crossAxis:0);v<C?v=C:v>R&&(v=R)}return{[m]:p,[f]:v}}}},zde=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=Eo(e,t),d=await s.detectOverflow(t,u),f=vr(o),m=ii(o),p=Or(o)==="y",{width:v,height:g}=i.floating;let h,b;f==="top"||f==="bottom"?(h=f,b=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=f,h=m==="end"?"top":"bottom");const y=g-d.top-d.bottom,x=v-d.left-d.right,w=Ki(g-d[h],y),C=Ki(v-d[b],x),R=!t.middlewareData.shift;let k=w,S=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=y),R&&!m){const L=lr(d.left,0),_=lr(d.right,0),O=lr(d.top,0),B=lr(d.bottom,0);p?S=v-2*(L!==0||_!==0?L+_:lr(d.left,d.right)):k=g-2*(O!==0||B!==0?O+B:lr(d.top,d.bottom))}await l({...t,availableWidth:S,availableHeight:k});const P=await s.getDimensions(a.floating);return v!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function _V(e){const t=jr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=In(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=up(n)!==i||up(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function rE(e){return yn(e)?e:e.contextElement}function Ka(e){const t=rE(e);if(!In(t))return ho(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=_V(t);let s=(i?up(n.width):n.width)/r,a=(i?up(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Bde=ho(0);function TV(e){const t=jn(e);return!X0()||!t.visualViewport?Bde:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Hde(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==jn(e)?!1:t}function qs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=rE(e);let s=ho(1);t&&(r?yn(r)&&(s=Ka(r)):s=Ka(e));const a=Hde(i,n,r)?TV(i):ho(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,d=o.width/s.x,f=o.height/s.y;if(i){const m=jn(i),p=r&&yn(r)?jn(r):r;let v=m,g=Ry(v);for(;g&&r&&p!==v;){const h=Ka(g),b=g.getBoundingClientRect(),y=jr(g),x=b.left+(g.clientLeft+parseFloat(y.paddingLeft))*h.x,w=b.top+(g.clientTop+parseFloat(y.paddingTop))*h.y;l*=h.x,u*=h.y,d*=h.x,f*=h.y,l+=x,u+=w,v=jn(g),g=Ry(v)}}return pp({width:d,height:f,x:l,y:u})}function lh(e,t){const n=rh(e).scrollLeft;return t?t.left+n:qs(_o(e)).left+n}function DV(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-lh(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Gde(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=_o(r),a=t?nh(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=ho(1);const d=ho(0),f=In(r);if((f||!f&&!i)&&((ds(r)!=="body"||fs(s))&&(l=rh(r)),f)){const p=qs(r);u=Ka(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const m=s&&!f&&!i?DV(s,l):ho(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+m.x,y:n.y*u.y-l.scrollTop*u.y+d.y+m.y}}function Wde(e){return Array.from(e.getClientRects())}function Ude(e){const t=_o(e),n=rh(e),r=e.ownerDocument.body,o=lr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=lr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+lh(e);const a=-n.scrollTop;return jr(r).direction==="rtl"&&(s+=lr(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const _S=25;function qde(e,t){const n=jn(e),r=_o(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const d=X0();(!d||d&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const u=lh(r);if(u<=0){const d=r.ownerDocument,f=d.body,m=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,v=Math.abs(r.clientWidth-f.clientWidth-p);v<=_S&&(i-=v)}else u<=_S&&(i+=u);return{width:i,height:s,x:a,y:l}}function Kde(e,t){const n=qs(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=In(e)?Ka(e):ho(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function TS(e,t,n){let r;if(t==="viewport")r=qde(e,n);else if(t==="document")r=Ude(_o(e));else if(yn(t))r=Kde(t,n);else{const o=TV(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return pp(r)}function LV(e,t){const n=qi(e);return n===t||!yn(n)||dl(n)?!1:jr(n).position==="fixed"||LV(n,t)}function Yde(e,t){const n=t.get(e);if(n)return n;let r=wc(e,[],!1).filter(a=>yn(a)&&ds(a)!=="body"),o=null;const i=jr(e).position==="fixed";let s=i?qi(e):e;for(;yn(s)&&!dl(s);){const a=jr(s),l=Y0(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&o&&(o.position==="absolute"||o.position==="fixed")||fs(s)&&!l&&LV(e,s))?r=r.filter(u=>u!==s):o=a,s=qi(s)}return t.set(e,r),r}function Xde(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?nh(t)?[]:Yde(t,this._c):[].concat(n),r],s=TS(t,i[0],o);let a=s.top,l=s.right,u=s.bottom,d=s.left;for(let f=1;f<i.length;f++){const m=TS(t,i[f],o);a=lr(m.top,a),l=Ki(m.right,l),u=Ki(m.bottom,u),d=lr(m.left,d)}return{width:l-d,height:u-a,x:d,y:a}}function Zde(e){const{width:t,height:n}=_V(e);return{width:t,height:n}}function Jde(e,t,n){const r=In(t),o=_o(t),i=n==="fixed",s=qs(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=ho(0);function u(){l.x=lh(o)}if(r||!r&&!i)if((ds(t)!=="body"||fs(o))&&(a=rh(t)),r){const p=qs(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&u();i&&!r&&o&&u();const d=o&&!r&&!i?DV(o,a):ho(0),f=s.left+a.scrollLeft-l.x-d.x,m=s.top+a.scrollTop-l.y-d.y;return{x:f,y:m,width:s.width,height:s.height}}function yv(e){return jr(e).position==="static"}function DS(e,t){if(!In(e)||jr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return _o(e)===n&&(n=n.ownerDocument.body),n}function jV(e,t){const n=jn(e);if(nh(e))return n;if(!In(e)){let o=qi(e);for(;o&&!dl(o);){if(yn(o)&&!yv(o))return o;o=qi(o)}return n}let r=DS(e,t);for(;r&&Eue(r)&&yv(r);)r=DS(r,t);return r&&dl(r)&&yv(r)&&!Y0(r)?n:r||Rue(e)||n}const Qde=async function(e){const t=this.getOffsetParent||jV,n=this.getDimensions,r=await n(e.floating);return{reference:Jde(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function efe(e){return jr(e).direction==="rtl"}const tfe={convertOffsetParentRelativeRectToViewportRelativeRect:Gde,getDocumentElement:_o,getClippingRect:Xde,getOffsetParent:jV,getElementRects:Qde,getClientRects:Wde,getDimensions:Zde,getScale:Ka,isElement:yn,isRTL:efe};function VV(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function nfe(e,t){let n=null,r;const o=_o(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:d,top:f,width:m,height:p}=u;if(a||t(),!m||!p)return;const v=od(f),g=od(o.clientWidth-(d+m)),h=od(o.clientHeight-(f+p)),b=od(d),y={rootMargin:-v+"px "+-g+"px "+-h+"px "+-b+"px",threshold:lr(0,Ki(1,l))||1};let x=!0;function w(C){const R=C[0].intersectionRatio;if(R!==l){if(!x)return s();R?s(!1,R):r=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!VV(u,e.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(w,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(w,y)}n.observe(e)}return s(!0),i}function Py(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=rE(e),d=o||i?[...u?wc(u):[],...t?wc(t):[]]:[];d.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const f=u&&a?nfe(u,n):null;let m=-1,p=null;s&&(p=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),u&&!l&&p.observe(u),t&&p.observe(t));let v,g=l?qs(e):null;l&&h();function h(){const b=qs(e);g&&!VV(g,b)&&n(),g=b,v=requestAnimationFrame(h)}return n(),()=>{var b;d.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f?.(),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(v)}}const rfe=Vde,ofe=Fde,ife=Dde,sfe=zde,afe=Lde,LS=Tde,lfe=$de,cfe=(e,t,n)=>{const r=new Map,o={platform:tfe,...n},i={...o.platform,_c:r};return _de(e,t,{...o,platform:i})};var ufe=typeof document<"u",dfe=function(){},sf=ufe?ae.useLayoutEffect:dfe;function bp(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(!bp(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 i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!bp(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function FV(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jS(e,t){const n=FV(e);return Math.round(t*n)/n}function xv(e){const t=c.useRef(e);return sf(()=>{t.current=e}),t}function $V(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,f]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=c.useState(r);bp(m,r)||p(r);const[v,g]=c.useState(null),[h,b]=c.useState(null),y=c.useCallback(T=>{T!==R.current&&(R.current=T,g(T))},[]),x=c.useCallback(T=>{T!==k.current&&(k.current=T,b(T))},[]),w=i||v,C=s||h,R=c.useRef(null),k=c.useRef(null),S=c.useRef(d),P=l!=null,L=xv(l),_=xv(o),O=xv(u),B=c.useCallback(()=>{if(!R.current||!k.current)return;const T={placement:t,strategy:n,middleware:m};_.current&&(T.platform=_.current),cfe(R.current,k.current,T).then(q=>{const A={...q,isPositioned:O.current!==!1};I.current&&!bp(S.current,A)&&(S.current=A,dt.flushSync(()=>{f(A)}))})},[m,t,n,_,O]);sf(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,f(T=>({...T,isPositioned:!1})))},[u]);const I=c.useRef(!1);sf(()=>(I.current=!0,()=>{I.current=!1}),[]),sf(()=>{if(w&&(R.current=w),C&&(k.current=C),w&&C){if(L.current)return L.current(w,C,B);B()}},[w,C,B,L,P]);const V=c.useMemo(()=>({reference:R,floating:k,setReference:y,setFloating:x}),[y,x]),F=c.useMemo(()=>({reference:w,floating:C}),[w,C]),D=c.useMemo(()=>{const T={position:n,left:0,top:0};if(!F.floating)return T;const q=jS(F.floating,d.x),A=jS(F.floating,d.y);return a?{...T,transform:"translate("+q+"px, "+A+"px)",...FV(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:A}},[n,a,F.floating,d.x,d.y]);return c.useMemo(()=>({...d,update:B,refs:V,elements:F,floatingStyles:D}),[d,B,V,F,D])}const ffe=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?LS({element:r.current,padding:o}).fn(n):{}:r?LS({element:r,padding:o}).fn(n):{}}}},zV=(e,t)=>{const n=rfe(e);return{name:n.name,fn:n.fn,options:[e,t]}},BV=(e,t)=>{const n=ofe(e);return{name:n.name,fn:n.fn,options:[e,t]}},HV=(e,t)=>({fn:lfe(e).fn,options:[e,t]}),GV=(e,t)=>{const n=ife(e);return{name:n.name,fn:n.fn,options:[e,t]}},WV=(e,t)=>{const n=sfe(e);return{name:n.name,fn:n.fn,options:[e,t]}},UV=(e,t)=>{const n=afe(e);return{name:n.name,fn:n.fn,options:[e,t]}},pfe=(e,t)=>{const n=ffe(e);return{name:n.name,fn:n.fn,options:[e,t]}};var mfe=(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(i){({stack:o}=i)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
258
|
+
\`createSelector([state => state.todos], todos => todos)\`
|
|
259
|
+
This could lead to inefficient memoization and unnecessary re-renders.
|
|
260
|
+
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},hfe=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:i,inputSelectorResultsCopy:s}=e,a=r(()=>({}),...o);if(a.apply(null,i)!==a.apply(null,s)){let l;try{throw new Error}catch(u){({stack:l}=u)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
261
|
+
This means your output selector will likely run more frequently than intended.
|
|
262
|
+
Avoid returning a new reference inside your input selector, e.g.
|
|
263
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:i,secondInputs:s,stack:l})}},gfe={inputStabilityCheck:"once",identityFunctionCheck:"once"},yp=Symbol("NOT_FOUND");function vfe(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function bfe(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function yfe(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 VS=e=>Array.isArray(e)?e:[e];function xfe(e){const t=Array.isArray(e[0])?e[0]:e;return yfe(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function FS(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var wfe=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...gfe,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:mfe},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:hfe}}};function Efe(e){let t;return{get(n){return t&&e(t.key,n)?t.value:yp},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Cfe(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 yp}function o(a,l){r(a)===yp&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var kfe=(e,t)=>e===t;function Rfe(e){return function(t,n){if(t===null||n===null||t.length!==n.length)return!1;const{length:r}=t;for(let o=0;o<r;o++)if(!e(t[o],n[o]))return!1;return!0}}function Sfe(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=kfe,maxSize:o=1,resultEqualityCheck:i}=n,s=Rfe(r);let a=0;const l=o<=1?Efe(s):Cfe(o,s);function u(){let d=l.get(arguments);if(d===yp){if(d=e.apply(null,arguments),a++,i){const f=l.getEntries().find(m=>i(m.value,d));f&&(d=f.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 Nfe=class{constructor(e){this.value=e}deref(){return this.value}},Ofe=typeof WeakRef<"u"?WeakRef:Nfe,Ife=0,$S=1;function ad(){return{s:Ife,v:void 0,o:null,p:null}}function qV(e,t={}){let n=ad();const{resultEqualityCheck:r}=t;let o,i=0;function s(){let a=n;const{length:l}=arguments;for(let f=0,m=l;f<m;f++){const p=arguments[f];if(typeof p=="function"||typeof p=="object"&&p!==null){let v=a.o;v===null&&(a.o=v=new WeakMap);const g=v.get(p);g===void 0?(a=ad(),v.set(p,a)):a=g}else{let v=a.p;v===null&&(a.p=v=new Map);const g=v.get(p);g===void 0?(a=ad(),v.set(p,a)):a=g}}const u=a;let d;if(a.s===$S)d=a.v;else if(d=e.apply(null,arguments),i++,r){const f=o?.deref?.()??o;f!=null&&r(f,d)&&(d=f,i!==0&&i--),o=typeof d=="object"&&d!==null||typeof d=="function"?new Ofe(d):d}return u.s=$S,u.v=d,d}return s.clearCache=()=>{n=ad(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function KV(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,s=0,a,l={},u=o.pop();typeof u=="object"&&(l=u,u=o.pop()),vfe(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const d={...n,...l},{memoize:f,memoizeOptions:m=[],argsMemoize:p=qV,argsMemoizeOptions:v=[],devModeChecks:g={}}=d,h=VS(m),b=VS(v),y=xfe(o),x=f(function(){return i++,u.apply(null,arguments)},...h);let w=!0;const C=p(function(){s++;const R=FS(y,arguments);if(a=x.apply(null,R),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:k,inputStabilityCheck:S}=wfe(w,g);if(k.shouldRun&&k.run(u,R,a),S.shouldRun){const P=FS(y,arguments);S.run({inputSelectorResults:R,inputSelectorResultsCopy:P},{memoize:f,memoizeOptions:h},arguments)}w&&(w=!1)}return a},...b);return Object.assign(C,{resultFunc:u,memoizedResultFunc:x,dependencies:y,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:f,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var Afe=KV(qV),Mfe=Object.assign((e,t=Afe)=>{bfe(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(o=>e[o]);return t(r,(...o)=>o.reduce((i,s,a)=>(i[n[a]]=s,i),{}))},{withTypes:()=>Mfe});KV({memoize:Sfe,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const ze=(e,t,n,r,o,i,...s)=>{if(s.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":Jr(1));let a;if(e)a=e;else throw new Error("Missing arguments");return a};var wv={exports:{}},Ev={},zS;function Pfe(){if(zS)return Ev;zS=1;var e=ae;function t(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(f,m){var p=m(),v=r({inst:{value:p,getSnapshot:m}}),g=v[0].inst,h=v[1];return i(function(){g.value=p,g.getSnapshot=m,l(g)&&h({inst:g})},[f,p,m]),o(function(){return l(g)&&h({inst:g}),f(function(){l(g)&&h({inst:g})})},[f]),s(p),p}function l(f){var m=f.getSnapshot;f=f.value;try{var p=m();return!n(f,p)}catch{return!0}}function u(f,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return Ev.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Ev}var BS={},HS;function _fe(){return HS||(HS=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}function t(p,v){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=v();if(!f){var h=v();i(g,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}h=s({inst:{value:g,getSnapshot:v}});var b=h[0].inst,y=h[1];return l(function(){b.value=g,b.getSnapshot=v,n(b)&&y({inst:b})},[p,g,v]),a(function(){return n(b)&&y({inst:b}),p(function(){n(b)&&y({inst:b})})},[p]),u(g),g}function n(p){var v=p.getSnapshot;p=p.value;try{var g=v();return!i(p,g)}catch{return!0}}function r(p,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=ae,i=typeof Object.is=="function"?Object.is:e,s=o.useState,a=o.useEffect,l=o.useLayoutEffect,u=o.useDebugValue,d=!1,f=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;BS.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),BS}var GS;function oE(){return GS||(GS=1,process.env.NODE_ENV==="production"?wv.exports=Pfe():wv.exports=_fe()),wv.exports}var Tfe=oE(),Cv={exports:{}},kv={},WS;function Dfe(){if(WS)return kv;WS=1;var e=ae,t=oE();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,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return kv.useSyncExternalStoreWithSelector=function(u,d,f,m,p){var v=i(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=a(function(){function b(R){if(!y){if(y=!0,x=R,R=m(R),p!==void 0&&g.hasValue){var k=g.value;if(p(k,R))return w=k}return w=R}if(k=w,r(x,R))return k;var S=m(R);return p!==void 0&&p(k,S)?(x=R,k):(x=R,w=S)}var y=!1,x,w,C=f===void 0?null:f;return[function(){return b(d())},C===null?void 0:function(){return b(C())}]},[d,f,m,p]);var h=o(u,v[0],v[1]);return s(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},kv}var US={},qS;function Lfe(){return qS||(qS=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=ae,n=oE(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;US.useSyncExternalStoreWithSelector=function(u,d,f,m,p){var v=i(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=a(function(){function b(R){if(!y){if(y=!0,x=R,R=m(R),p!==void 0&&g.hasValue){var k=g.value;if(p(k,R))return w=k}return w=R}if(k=w,r(x,R))return k;var S=m(R);return p!==void 0&&p(k,S)?(x=R,k):(x=R,w=S)}var y=!1,x,w,C=f===void 0?null:f;return[function(){return b(d())},C===null?void 0:function(){return b(C())}]},[d,f,m,p]);var h=o(u,v[0],v[1]);return s(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),US}var KS;function jfe(){return KS||(KS=1,process.env.NODE_ENV==="production"?Cv.exports=Dfe():Cv.exports=Lfe()),Cv.exports}var Vfe=jfe();const Ffe=G0(19),$fe=Ffe?Bfe:Hfe;function me(e,t,n,r,o){return $fe(e,t,n,r,o)}function zfe(e,t,n,r,o){const i=c.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return Tfe.useSyncExternalStore(e.subscribe,i,i)}function Bfe(e,t,n,r,o){return zfe(e,t,n,r,o)}function Hfe(e,t,n,r,o){return Vfe.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,r,o))}class Gfe{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 me(this,t,n,r,o)}}class Wfe extends Gfe{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){c.useDebugValue(t),at(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;at(()=>(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,s=>Object.keys(s));const o=c.useRef(Object.keys(t)).current,i=Object.keys(t);(o.length!==i.length||o.some((s,a)=>s!==i[a]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);at(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){c.useDebugValue(t);const r=n!==void 0;if(at(()=>{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 i=o.get(t);i!==void 0&&i!==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 i=this.selectors[t];return i(this.state,n,r,o)}useState(t,n,r,o){return c.useDebugValue(t),me(this,this.selectors[t],n,r,o)}useContextCallback(t,n){c.useDebugValue(t);const r=Jt(n??er);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(i=>{const s=r(i);if(!Object.is(o,s)){const a=o;o=s,n(s,a,this)}})}}const Ufe={open:ze(e=>e.open),domReferenceElement:ze(e=>e.domReferenceElement),referenceElement:ze(e=>e.positionReference??e.referenceElement),floatingElement:ze(e=>e.floatingElement),floatingId:ze(e=>e.floatingId)};class qfe extends Wfe{constructor(t){const{nested:n,noEmit:r,onOpenChange:o,triggerElements:i,...s}=t;super({...s,positionReference:s.referenceElement,domReferenceElement:s.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:vde(),nested:n,noEmit:r,triggerElements:i},Ufe)}setOpen=(t,n)=>{if((!t||!this.state.open||pV(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 Kfe{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 Yfe(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=W0(),i=bde()!=null;if(process.env.NODE_ENV!=="production"){const a=r.reference;a&&!yn(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 s=wo(()=>new qfe({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Kfe,floatingId:o,nested:i,noEmit:!1})).current;return at(()=>{const a={open:t,floatingId:o};r.reference!==void 0&&(a.referenceElement=r.reference,a.domReferenceElement=yn(r.reference)?r.reference:null),r.floating!==void 0&&(a.floatingElement=r.floating),s.update(a)},[t,o,r.reference,r.floating,s]),s.context.onOpenChange=n,s.context.nested=i,s.context.noEmit=!1,s}function Xfe(e={}){const{nodeId:t,externalTree:n}=e,r=Yfe(e),o=e.rootContext||r,i={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[s,a]=c.useState(null),l=c.useRef(null),u=NV(n);at(()=>{i.domReference&&(l.current=i.domReference)},[i.domReference]);const d=$V({...e,elements:{...i,...s&&{reference:s}}}),f=c.useCallback(k=>{const S=yn(k)?{getBoundingClientRect:()=>k.getBoundingClientRect(),getClientRects:()=>k.getClientRects(),contextElement:k}:k;a(S),d.refs.setReference(S)},[d.refs]),[m,p]=c.useState(null),[v,g]=c.useState(null);o.useSyncedValue("referenceElement",m),o.useSyncedValue("domReferenceElement",yn(m)?m:null),o.useSyncedValue("floatingElement",v);const h=c.useCallback(k=>{(yn(k)||k===null)&&(l.current=k,p(k)),(yn(d.refs.reference.current)||d.refs.reference.current===null||k!==null&&!yn(k))&&d.refs.setReference(k)},[d.refs,p]),b=c.useCallback(k=>{g(k),d.refs.setFloating(k)},[d.refs]),y=c.useMemo(()=>({...d.refs,setReference:h,setFloating:b,setPositionReference:f,domReference:l}),[d.refs,h,b,f]),x=c.useMemo(()=>({...d.elements,domReference:i.domReference}),[d.elements,i.domReference]),w=o.useState("open"),C=o.useState("floatingId"),R=c.useMemo(()=>({...d,dataRef:o.context.dataRef,open:w,onOpenChange:o.setOpen,events:o.context.events,floatingId:C,refs:y,elements:x,nodeId:t,rootStore:o}),[d,y,x,t,o,w,C]);return at(()=>{o.context.dataRef.current.floatingContext=R;const k=u?.nodesRef.current.find(S=>S.id===t);k&&(k.context=R)}),c.useMemo(()=>({...d,context:R,refs:y,elements:x,rootStore:o}),[d,y,x,R,o])}function Zfe(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,o=n.useState("open"),{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:u=!0,resetMs:d=750,selectedIndex:f=null}=t,m=Cc(),p=c.useRef(""),v=c.useRef(f??s??-1),g=c.useRef(null);at(()=>{!o&&f!==null||(m.clear(),g.current=null,p.current!==""&&(p.current=""))},[o,f,m]),at(()=>{o&&p.current===""&&(v.current=f??s??-1)},[o,f,s]);const h=Jt(C=>{C?r.current.typing||(r.current.typing=C,l?.(C)):r.current.typing&&(r.current.typing=C,l?.(C))}),b=Jt(C=>{function R(_,O,B){const I=O.find(V=>V?.toLocaleLowerCase().indexOf(B.toLocaleLowerCase())===0);return I?_.indexOf(I):-1}const k=i.current;if(p.current.length>0&&p.current[0]!==" "&&(R(k,k,p.current)===-1?h(!1):C.key===" "&&Pr(C)),k==null||C.key.length!==1||C.ctrlKey||C.metaKey||C.altKey)return;o&&C.key!==" "&&(Pr(C),h(!0));const S=p.current==="";S&&(v.current=f??s??-1),k.every(_=>_?_[0]?.toLocaleLowerCase()!==_[1]?.toLocaleLowerCase():!0)&&p.current===C.key&&(p.current="",v.current=g.current),p.current+=C.key,m.start(d,()=>{p.current="",v.current=g.current,h(!1)});const P=S?f??s??-1:v.current,L=R(k,[...k.slice((P||0)+1),...k.slice(0,(P||0)+1)],p.current);L!==-1?(a?.(L),g.current=L):C.key!==" "&&(p.current="",h(!1))}),y=Jt(C=>{const R=C.relatedTarget,k=n.select("domReferenceElement"),S=n.select("floatingElement"),P=Ht(k,R),L=Ht(S,R);P||L||(m.clear(),p.current="",v.current=g.current,h(!1))}),x=c.useMemo(()=>({onKeyDown:b,onBlur:y}),[b,y]),w=c.useMemo(()=>({onKeyDown:b,onKeyUp(C){C.key===" "&&h(!1)},onBlur:y}),[b,y,h]);return c.useMemo(()=>u?{reference:x,floating:w}:{},[u,x,w])}let iE=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=xc.startingStyle]="startingStyle",e[e.endingStyle=xc.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),_y=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Jfe={[_y.popupOpen]:""},Qfe={[_y.popupOpen]:"",[_y.pressed]:""},epe={[iE.open]:""},tpe={[iE.closed]:""},npe={[iE.anchorHidden]:""},rpe={open(e){return e?Jfe:null}},ope={open(e){return e?Qfe:null}},YV={open(e){return e?epe:tpe},anchorHidden(e){return e?npe:null}};function ipe(e){return G0(19)?e:e?"true":void 0}const XV=c.forwardRef(function(e,t){const{cutout:n,...r}=e;let o;if(n){const i=n?.getBoundingClientRect();o=`polygon(
|
|
264
|
+
0% 0%,
|
|
265
|
+
100% 0%,
|
|
266
|
+
100% 100%,
|
|
267
|
+
0% 100%,
|
|
268
|
+
0% 0%,
|
|
269
|
+
${i.left}px ${i.top}px,
|
|
270
|
+
${i.left}px ${i.bottom}px,
|
|
271
|
+
${i.right}px ${i.bottom}px,
|
|
272
|
+
${i.right}px ${i.top}px,
|
|
273
|
+
${i.left}px ${i.top}px
|
|
274
|
+
)`}return E.jsx("div",{ref:t,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})});process.env.NODE_ENV!=="production"&&(XV.displayName="InternalBackdrop");const ZV=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(ZV.displayName="ComboboxRootContext");const JV=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(JV.displayName="ComboboxFloatingContext");const QV=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(QV.displayName="ComboboxDerivedItemsContext");const eF=c.createContext("");process.env.NODE_ENV!=="production"&&(eF.displayName="ComboboxInputValueContext");function zr(){const e=c.useContext(ZV);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.":Jr(22));return e}function ch(){const e=c.useContext(JV);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.":Jr(23));return e}function ps(){const e=c.useContext(QV);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.":Jr(24));return e}function sE(){return c.useContext(eF)}function xp(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function tF(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:xp(r,t,n))}function spe(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function ape(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(spe(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}const be={id:ze(e=>e.id),query:ze(e=>e.query),items:ze(e=>e.items),selectedValue:ze(e=>e.selectedValue),hasSelectionChips:ze(e=>{const t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:ze(e=>{const{selectedValue:t,selectionMode:n}=e;return t==null?!1:n==="multiple"&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:ze((e,t)=>t?ape(e.items):!1),open:ze(e=>e.open),mounted:ze(e=>e.mounted),forceMounted:ze(e=>e.forceMounted),inline:ze(e=>e.inline),activeIndex:ze(e=>e.activeIndex),selectedIndex:ze(e=>e.selectedIndex),isActive:ze((e,t)=>e.activeIndex===t),isSelected:ze((e,t)=>{const n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(o=>xp(t,o,n)):xp(t,r,n)}),transitionStatus:ze(e=>e.transitionStatus),popupProps:ze(e=>e.popupProps),inputProps:ze(e=>e.inputProps),triggerProps:ze(e=>e.triggerProps),getItemProps:ze(e=>e.getItemProps),positionerElement:ze(e=>e.positionerElement),listElement:ze(e=>e.listElement),triggerElement:ze(e=>e.triggerElement),inputElement:ze(e=>e.inputElement),popupSide:ze(e=>e.popupSide),openMethod:ze(e=>e.openMethod),inputInsidePopup:ze(e=>e.inputInsidePopup),selectionMode:ze(e=>e.selectionMode),listRef:ze(e=>e.listRef),labelsRef:ze(e=>e.labelsRef),popupRef:ze(e=>e.popupRef),emptyRef:ze(e=>e.emptyRef),inputRef:ze(e=>e.inputRef),keyboardActiveRef:ze(e=>e.keyboardActiveRef),chipsContainerRef:ze(e=>e.chipsContainerRef),clearRef:ze(e=>e.clearRef),valuesRef:ze(e=>e.valuesRef),allValuesRef:ze(e=>e.allValuesRef),name:ze(e=>e.name),disabled:ze(e=>e.disabled),readOnly:ze(e=>e.readOnly),required:ze(e=>e.required),grid:ze(e=>e.grid),isGrouped:ze(e=>e.isGrouped),virtualized:ze(e=>e.virtualized),onOpenChangeComplete:ze(e=>e.onOpenChangeComplete),openOnInputClick:ze(e=>e.openOnInputClick),itemToStringLabel:ze(e=>e.itemToStringLabel),isItemEqualToValue:ze(e=>e.isItemEqualToValue),modal:ze(e=>e.modal),autoHighlight:ze(e=>e.autoHighlight),submitOnItemClick:ze(e=>e.submitOnItemClick)};let YS=(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 lpe={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},cpe={valid(e){return e===null?null:e?{[YS.valid]:""}:{[YS.invalid]:""}}},nF=c.createContext({invalid:void 0,name:void 0,validityData:{state:lpe,errors:[],error:"",value:"",initialValue:null},setValidityData:er,disabled:void 0,touched:!1,setTouched:er,dirty:!1,setDirty:er,filled:!1,setFilled:er,focused:!1,setFocused:er,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=fr)=>e,getInputValidationProps:(e=fr)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(nF.displayName="FieldRootContext");function aE(e=!0){const t=c.useContext(nF);if(t.setValidityData===er&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Jr(28));return t}const upe=c.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:er,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(upe.displayName="FormContext");const rF=c.createContext({controlId:void 0,registerControlId:er,labelId:void 0,setLabelId:er,messageIds:[],setMessageIds:er,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(rF.displayName="LabelableContext");function lE(){return c.useContext(rF)}function dpe(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:i}=lE(),s=U0(t),a=n?o:void 0,l=wo(()=>Symbol("labelable-control")),u=c.useRef(!1),d=c.useRef(t!=null),f=Jt(()=>{!u.current||i===er||(u.current=!1,i(l.current,void 0))});return at(()=>{if(i===er)return;let m;if(n){const p=r?.current;yn(p)&&p.closest("label")!=null?m=t??null:m=a??s}else if(t!=null)d.current=!0,m=t;else if(d.current)m=s;else{f();return}if(m===void 0){f();return}u.current=!0,i(l.current,m)},[t,r,a,i,n,s,l,f]),c.useEffect(()=>f,[f]),o??s}const oF={...ope,...cpe,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null};function fpe(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 o=parseFloat(n.width)||0,i=parseFloat(n.height)||0,s=parseFloat(r.width)||0,a=parseFloat(r.height)||0,l=Math.max(t.width,o,s),u=Math.max(t.height,i,a),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}const ld=2,ppe=c.forwardRef(function(e,t){const{render:n,className:r,nativeButton:o=!0,disabled:i=!1,id:s,...a}=e,{state:l,disabled:u,setTouched:d,setFocused:f,validationMode:m,validation:p}=aE(),{labelId:v}=lE(),g=zr(),{filteredItems:h}=ps(),b=me(g,be.selectionMode),y=me(g,be.disabled),x=me(g,be.readOnly),w=me(g,be.required),C=me(g,be.mounted),R=me(g,be.popupSide),k=me(g,be.positionerElement),S=me(g,be.listElement),P=me(g,be.triggerProps),L=me(g,be.triggerElement),_=me(g,be.inputInsidePopup),O=me(g,be.id),B=me(g,be.open),I=me(g,be.selectedValue),V=me(g,be.activeIndex),F=me(g,be.selectedIndex),D=me(g,be.hasSelectedValue),T=ch(),q=sE(),A=Cc(),ee=u||y||i,ie=h.length===0,Y=C&&k?R:null;dpe({id:_?s:void 0});const Q=_?s??O:s,X=c.useRef("");function J(j){X.current=j.pointerType}const te=T.useState("domReferenceElement");c.useEffect(()=>{_&&L&&L!==te&&T.set("domReferenceElement",L)},[L,te,T,_]);const{reference:le}=Zfe(T,{enabled:!B&&!x&&!y&&b==="single",listRef:g.state.labelsRef,activeIndex:V,selectedIndex:F,onMatch(j){const K=g.state.valuesRef.current[j];K!==void 0&&g.state.setSelectedValue(K,qt("none"))}}),{reference:z}=Ade(T,{enabled:!x&&!y,event:"mousedown"}),{buttonRef:re,getButtonProps:oe}=oh({native:o,disabled:ee}),M={...l,open:B,disabled:ee,popupSide:Y,listEmpty:ie,placeholder:!D},N=Jt(j=>{g.set("triggerElement",j)});return qn("button",e,{ref:[t,re,N],state:M,props:[P,z,le,{id:Q,tabIndex:_?0:-1,role:_?"combobox":void 0,"aria-expanded":B?"true":"false","aria-haspopup":_?"dialog":"listbox","aria-controls":B?S?.id:void 0,"aria-required":_&&w||void 0,"aria-labelledby":v,onPointerDown:J,onPointerEnter:J,onFocus(){f(!0),!(ee||x)&&A.start(0,g.state.forceMount)},onBlur(j){if(!Ht(k,j.relatedTarget)&&(d(!0),f(!1),m==="onBlur")){const K=b==="none"?q:I;p.commit(K)}},onMouseDown(j){if(ee||x||(_||T.set("domReferenceElement",j.currentTarget),g.state.forceMount(),X.current!=="touch"&&(g.state.inputRef.current?.focus(),_||j.preventDefault()),B))return;const K=Rn(j.currentTarget);function H(U){if(!L)return;const $=tc(U),W=g.state.positionerElement,Z=g.state.listElement;if(Ht(L,$)||Ht(W,$)||Ht(Z,$)||$===L)return;const G=fpe(L),ne=U.clientX>=G.left-ld&&U.clientX<=G.right+ld,we=U.clientY>=G.top-ld&&U.clientY<=G.bottom+ld;ne&&we||g.state.setOpen(!1,qt("cancel-open",U))}_&&K.addEventListener("mouseup",H,{once:!0})},onKeyDown(j){ee||x||(j.key==="ArrowDown"||j.key==="ArrowUp")&&(Pr(j),g.state.setOpen(!0,qt(oV,j.nativeEvent)),g.state.inputRef.current?.focus())}},p?p.getValidationProps(a):a,oe],stateAttributesMapping:oF})});process.env.NODE_ENV!=="production"&&(ppe.displayName="ComboboxTrigger");const cE=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(cE.displayName="ComboboxChipsContext");function iF(){return c.useContext(cE)}const uE=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(uE.displayName="ComboboxPositionerContext");function dE(e){const t=c.useContext(uE);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":Jr(21));return t}const mpe=c.forwardRef(function(e,t){const{render:n,className:r,disabled:o=!1,id:i,...s}=e,{state:a,disabled:l,setTouched:u,setFocused:d,validationMode:f,validation:m}=aE(),{labelId:p}=lE(),v=iF(),g=!!dE(!0),h=zr(),{filteredItems:b}=ps(),y=sE(),x=Zj(),w=me(h,be.required),C=me(h,be.disabled),R=me(h,be.readOnly),k=me(h,be.name),S=me(h,be.selectionMode),P=me(h,be.autoHighlight),L=me(h,be.inputProps),_=me(h,be.triggerProps),O=me(h,be.open),B=me(h,be.mounted),I=me(h,be.selectedValue),V=me(h,be.popupSide),F=me(h,be.positionerElement),D=me(h,be.id),T=me(h,be.inline),q=!!P,A=B&&F?V:null,ee=l||C||o,ie=b.length===0,Y=U0(i??(g||T?void 0:D)),[Q,X]=c.useState(null),J=c.useRef(!1),te=c.useRef(null),le=c.useRef(!1),z=Jt(M=>{const N=g||h.state.inline;N&&!h.state.hasInputValue&&h.state.setInputValue("",qt(of)),h.update({inputElement:M,inputInsidePopup:N})}),re={...a,open:O,disabled:ee,readOnly:R,popupSide:A,listEmpty:ie};function oe(M){if(!v)return;let N;const{highlightedChipIndex:j}=v;if(j!==void 0){if(M.key==="ArrowLeft")M.preventDefault(),j>0?N=j-1:N=void 0;else if(M.key==="ArrowRight")M.preventDefault(),j<I.length-1?N=j+1:N=void 0;else if(M.key==="Backspace"||M.key==="Delete"){M.preventDefault();const K=j>=I.length-1?I.length-2:j;N=K>=0?K:void 0,h.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return N}return M.key==="ArrowLeft"&&(M.currentTarget.selectionStart??0)===0&&I.length>0?(M.preventDefault(),N=Math.max(I.length-1,0)):M.key==="Backspace"&&M.currentTarget.value===""&&I.length>0&&(h.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),M.preventDefault()),N}return qn("input",e,{state:re,ref:[t,h.state.inputRef,z],props:[L,_,{type:"text",value:e.value??Q??y,"aria-readonly":R||void 0,"aria-required":w||void 0,"aria-labelledby":p,disabled:ee,readOnly:R,required:S==="none"?w:void 0,...S==="none"&&k&&{name:k},id:Y,onFocus(){if(d(!0),!T||!le.current)return;le.current=!1;const M=te.current;M==null||!Object.hasOwn(h.state.valuesRef.current,M)||h.state.setIndices({activeIndex:M})},onBlur(){u(!0),d(!1);const M=h.state.activeIndex;if(T&&M!==null&&P!=="always"&&(te.current=M,le.current=!0,h.state.setIndices({activeIndex:null})),f==="onBlur"){const N=S==="none"?y:I;m.commit(N)}},onCompositionStart(M){cp||(J.current=!0,X(M.currentTarget.value))},onCompositionEnd(M){J.current=!1;const N=M.currentTarget.value;X(null),h.state.setInputValue(N,qt(td,M.nativeEvent))},onChange(M){const N=M.nativeEvent.inputType,j=!N||N==="insertReplacementText",K=J.current||!j;if(J.current){const W=M.currentTarget.value;X(W),W===""&&!h.state.openOnInputClick&&!h.state.inputInsidePopup&&h.state.setOpen(!1,qt(lS,M.nativeEvent));const Z=W.trim(),G=q&&Z!=="";!R&&!ee&&Z&&K&&(h.state.setOpen(!0,qt(td,M.nativeEvent)),q||h.state.setIndices({activeIndex:null,selectedIndex:null,type:h.state.keyboardActiveRef.current?"keyboard":"pointer"})),O&&h.state.activeIndex!==null&&!G&&h.state.setIndices({activeIndex:null,selectedIndex:null,type:h.state.keyboardActiveRef.current?"keyboard":"pointer"});return}h.state.setInputValue(M.currentTarget.value,qt(td,M.nativeEvent));const H=M.currentTarget.value==="",U=qt(lS,M.nativeEvent);H&&!h.state.inputInsidePopup&&(S==="single"&&h.state.setSelectedValue(null,U),h.state.openOnInputClick||h.state.setOpen(!1,U));const $=M.currentTarget.value.trim();!R&&!ee&&$&&K&&(h.state.setOpen(!0,qt(td,M.nativeEvent)),q||h.state.setIndices({activeIndex:null,selectedIndex:null,type:h.state.keyboardActiveRef.current?"keyboard":"pointer"})),O&&h.state.activeIndex!==null&&!q&&h.state.setIndices({activeIndex:null,selectedIndex:null,type:h.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(M){if(ee||R||M.ctrlKey||M.shiftKey||M.altKey||M.metaKey)return;h.state.keyboardActiveRef.current=!0;const N=M.currentTarget,j=N.scrollWidth-N.clientWidth,K=x==="rtl";if(M.key==="Home"){Pr(M);const $=pS&&K?N.value.length:0;N.setSelectionRange($,$),N.scrollLeft=0;return}if(M.key==="End"){Pr(M);const $=pS&&K?0:N.value.length;N.setSelectionRange($,$),N.scrollLeft=K?-j:j;return}if(!B&&M.key==="Escape"){const $=S==="multiple"&&Array.isArray(I)?I.length===0:I===null,W=qt(mue,M.nativeEvent),Z=S==="multiple"?[]:null;h.state.setInputValue("",W),h.state.setSelectedValue(Z,W),!$&&!h.state.inline&&!W.isPropagationAllowed&&M.stopPropagation();return}if(v&&M.key==="Backspace"&&N.value===""&&v.highlightedChipIndex===void 0&&Array.isArray(I)&&I.length>0){const $=I.slice(0,-1);h.state.setIndices({activeIndex:null,selectedIndex:null,type:h.state.keyboardActiveRef.current?"keyboard":"pointer"}),h.state.setSelectedValue($,qt(of,M.nativeEvent));return}const H=v?.highlightedChipIndex!==void 0,U=oe(M);if(v?.setHighlightedChipIndex(U),U!==void 0?v?.chipsRef.current[U]?.focus():H&&h.state.inputRef.current?.focus(),M.which!==229&&M.key==="Enter"&&O){const $=h.state.activeIndex,W=M.nativeEvent;if($===null){h.state.setOpen(!1,qt(of,W));return}Pr(M);const Z=h.state.listRef.current[$];Z&&(h.state.selectionEventRef.current=W,Z.click(),h.state.selectionEventRef.current=null)}},onPointerMove(){h.state.keyboardActiveRef.current=!1},onPointerDown(){h.state.keyboardActiveRef.current=!1}},m?m.getValidationProps(s):s],stateAttributesMapping:oF})});process.env.NODE_ENV!=="production"&&(mpe.displayName="ComboboxInput");const hpe={...sV,...rpe},gpe=c.forwardRef(function(e,t){const{render:n,className:r,disabled:o=!1,nativeButton:i=!0,keepMounted:s=!1,...a}=e,{disabled:l}=aE(),u=zr(),d=me(u,be.selectionMode),f=me(u,be.disabled),m=me(u,be.readOnly),p=me(u,be.open),v=me(u,be.selectedValue),g=me(u,be.hasSelectionChips),h=sE();let b=!1;d==="none"?b=h!=="":d==="single"?b=v!=null:b=g;const y=l||f||o,{buttonRef:x,getButtonProps:w}=oh({native:i,disabled:y}),{mounted:C,transitionStatus:R,setMounted:k}=wue(b),S={disabled:y,open:p,transitionStatus:R};kV({open:b,ref:u.state.clearRef,onComplete(){b||k(!1)}});const P=qn("button",e,{state:S,ref:[t,x,u.state.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(L){L.preventDefault()},onClick(L){if(y||m)return;const _=u.state.keyboardActiveRef;u.state.setInputValue("",qt(aS,L.nativeEvent)),d!=="none"?(u.state.setSelectedValue(Array.isArray(v)?[]:null,qt(aS,L.nativeEvent)),u.state.setIndices({activeIndex:null,selectedIndex:null,type:_.current?"keyboard":"pointer"})):u.state.setIndices({activeIndex:null,type:_.current?"keyboard":"pointer"}),u.state.inputRef.current?.focus()}},a,w],stateAttributesMapping:hpe});return s||C?P:null});process.env.NODE_ENV!=="production"&&(gpe.displayName="ComboboxClear");const fE=c.createContext(null);process.env.NODE_ENV!=="production"&&(fE.displayName="GroupCollectionContext");function vpe(){return c.useContext(fE)}function bpe(e){const{children:t,items:n}=e,r=c.useMemo(()=>({items:n}),[n]);return E.jsx(fE.Provider,{value:r,children:t})}function ype(e){const{children:t}=e,{filteredItems:n}=ps(),r=vpe(),o=r?r.items:n;return o?E.jsx(c.Fragment,{children:o.map(t)}):null}const xpe=c.forwardRef(function(e,t){var n;const{render:r,className:o,children:i,...s}=e,a=zr(),l=ch(),u=!!dE(!0),{filteredItems:d}=ps(),f=me(a,be.items),m=me(a,be.labelsRef),p=me(a,be.listRef),v=me(a,be.selectionMode),g=me(a,be.grid),h=me(a,be.popupProps),b=me(a,be.disabled),y=me(a,be.readOnly),x=me(a,be.virtualized),w=v==="multiple",C=d.length===0,R=Jt(O=>{a.set("positionerElement",O)}),k=Jt(O=>{a.set("listElement",O)}),S=c.useMemo(()=>typeof i=="function"?n||(n=E.jsx(ype,{children:i})):i,[i]),P={empty:C},L=l.useState("floatingId"),_=qn("div",e,{state:P,ref:[t,k,u?null:R],props:[h,{children:S,tabIndex:-1,id:L,role:g?"grid":"listbox","aria-multiselectable":w?"true":void 0,onKeyDown(O){if(!(b||y)&&O.key==="Enter"){const B=a.state.activeIndex;if(B==null)return;Pr(O);const I=O.nativeEvent,V=a.state.listRef.current[B];V&&(a.state.selectionEventRef.current=I,V.click(),a.state.selectionEventRef.current=null)}},onKeyDownCapture(){a.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){a.state.keyboardActiveRef.current=!1}},s]});return x?_:E.jsx(Yj,{elementsRef:p,labelsRef:f?void 0:m,children:_})});process.env.NODE_ENV!=="production"&&(xpe.displayName="ComboboxList");const pE=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(pE.displayName="ComboboxPortalContext");function wpe(){const e=c.useContext(pE);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Portal> is missing.":Jr(20));return e}const Epe=c.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,o=zr(),i=me(o,be.mounted),s=me(o,be.forceMounted);return i||n||s?E.jsx(pE.Provider,{value:n,children:E.jsx(MV,{ref:t,...r})}):null});process.env.NODE_ENV!=="production"&&(Epe.displayName="ComboboxPortal");const Cpe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:d=0,offsetParent:f="real"}=Eo(e,t)||{};if(u==null)return{};const m=eE(d),p={x:n,y:r},v=sh(o),g=ih(v),h=await s.getDimensions(u),b=v==="y",y=b?"top":"left",x=b?"bottom":"right",w=b?"clientHeight":"clientWidth",C=i.reference[g]+i.reference[v]-p[v]-i.floating[g],R=p[v]-i.reference[v],k=f==="real"?await s.getOffsetParent?.(u):a.floating;let S=a.floating[w]||i.floating[g];(!S||!await s.isElement?.(k))&&(S=a.floating[w]||i.floating[g]);const P=C/2-R/2,L=S/2-h[g]/2-1,_=Math.min(m[y],L),O=Math.min(m[x],L),B=_,I=S-h[g]-O,V=S/2-h[g]/2+P,F=dp(B,V,I),D=!l.arrow&&ii(o)!=null&&V!==F&&i.reference[g]/2-(V<B?_:O)-h[g]/2<0,T=D?V<B?V-B:V-I:0;return{[v]:p[v]+T,data:{[v]:F,centerOffset:V-F-T,...D&&{alignmentOffset:T}},reset:D}}}),kpe=(e,t)=>({...Cpe(e),options:[e,t]}),Rpe={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,i=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:(await UV().fn(e)).data?.referenceHidden||i}}}},Spe={sideX:"left",sideY:"top"};function sF(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 XS(e,t,n){const{rects:r,placement:o}=e;return{side:sF(t,vr(o),n),align:ii(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Npe(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,collisionBoundary:a,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,keepMounted:m=!1,floatingRootContext:p,mounted:v,collisionAvoidance:g,shiftCrossAxis:h=!1,nodeId:b,adaptiveOrigin:y,lazyFlip:x=!1,externalTree:w}=e,[C,R]=c.useState(null);!v&&C!==null&&R(null);const k=g.side||"flip",S=g.align||"flip",P=g.fallbackAxisSide||"end",L=typeof t=="function"?t:void 0,_=Jt(L),O=L?_:t,B=Ua(t),I=Zj()==="rtl",V=C||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":I?"left":"right","inline-start":I?"right":"left"}[r],F=i==="center"?V:`${V}-${i}`;let D=l;const T=1,q=r==="bottom"?T:0,A=r==="top"?T:0,ee=r==="right"?T:0,ie=r==="left"?T:0;typeof D=="number"?D={top:D+q,right:D+ie,bottom:D+A,left:D+ee}:D&&(D={top:(D.top||0)+q,right:(D.right||0)+ie,bottom:(D.bottom||0)+A,left:(D.left||0)+ee});const Y={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:D},Q=c.useRef(null),X=Ua(o),J=Ua(s),te=[zV(se=>{const Ee=XS(se,r,I),Se=typeof X.current=="function"?X.current(Ee):X.current,Pe=typeof J.current=="function"?J.current(Ee):J.current;return{mainAxis:Se,crossAxis:Pe,alignmentAxis:Pe}},[typeof o!="function"?o:0,typeof s!="function"?s:0,I,r])],le=S==="none"&&k!=="shift",z=!le&&(u||h||k==="shift"),re=k==="none"?null:GV({...Y,padding:{top:D.top+T,right:D.right+T,bottom:D.bottom+T,left:D.left+T},mainAxis:!h&&k==="flip",crossAxis:S==="flip"?"alignment":!1,fallbackAxisSideDirection:P}),oe=le?null:BV(se=>{const Ee=Rn(se.elements.floating).documentElement;return{...Y,rootBoundary:h?{x:0,y:0,width:Ee.clientWidth,height:Ee.clientHeight}:void 0,mainAxis:S!=="none",crossAxis:z,limiter:u||h?void 0:HV(Se=>{if(!Q.current)return{};const{width:Pe,height:Ce}=Q.current.getBoundingClientRect(),ke=Or(vr(Se.placement)),pt=ke==="y"?Pe:Ce,gt=ke==="y"?D.left+D.right:D.top+D.bottom;return{offset:pt/2+gt/2}})}},[Y,u,h,D,S]);k==="shift"||S==="shift"||i==="center"?te.push(oe,re):te.push(re,oe),te.push(WV({...Y,apply({elements:{floating:se},rects:{reference:Ee},availableWidth:Se,availableHeight:Pe}){const Ce=se.style;Ce.setProperty("--available-width",`${Se}px`),Ce.setProperty("--available-height",`${Pe}px`),Ce.setProperty("--anchor-width",`${Ee.width}px`),Ce.setProperty("--anchor-height",`${Ee.height}px`)}}),kpe(()=>({element:Q.current||document.createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(se){const{elements:Ee,middlewareData:Se,placement:Pe,rects:Ce,y:ke}=se,pt=vr(Pe),gt=Or(pt),un=Q.current,Vt=Se.arrow?.x||0,rr=Se.arrow?.y||0,vt=un?.clientWidth||0,Gr=un?.clientHeight||0,jt=Vt+vt/2,Dt=rr+Gr/2,or=Math.abs(Se.shift?.y||0),Xn=Ce.reference.height/2,mt=typeof o=="function"?o(XS(se,r,I)):o,Cr=or>mt,$n={top:`${jt}px calc(100% + ${mt}px)`,bottom:`${jt}px ${-mt}px`,left:`calc(100% + ${mt}px) ${Dt}px`,right:`${-mt}px ${Dt}px`}[pt],dn=`${jt}px ${Ce.reference.y+Xn-ke}px`;return Ee.floating.style.setProperty("--transform-origin",z&>==="y"&&Cr?dn:$n),{}}},Rpe,y),at(()=>{!v&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[v,p]);const M=c.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:N,elements:j,x:K,y:H,middlewareData:U,update:$,placement:W,context:Z,isPositioned:G,floatingStyles:ne}=Xfe({rootContext:p,placement:F,middleware:te,strategy:n,whileElementsMounted:m?void 0:(...se)=>Py(...se,M),nodeId:b,externalTree:w}),{sideX:we,sideY:Ve}=U.adaptiveOrigin||Spe,Ye=G?n:"fixed",ft=c.useMemo(()=>{const se=y?{position:Ye,[we]:K,[Ve]:H}:{position:Ye,...ne};return G||(se.opacity=0),se},[y,Ye,we,K,Ve,H,ne,G]),qe=c.useRef(null);at(()=>{if(!v)return;const se=B.current,Ee=typeof se=="function"?se():se,Se=(ZS(Ee)?Ee.current:Ee)||null||null;Se!==qe.current&&(N.setPositionReference(Se),qe.current=Se)},[v,N,O,B]),c.useEffect(()=>{if(!v)return;const se=B.current;typeof se!="function"&&ZS(se)&&se.current!==qe.current&&(N.setPositionReference(se.current),qe.current=se.current)},[v,N,O,B]),c.useEffect(()=>{if(m&&v&&j.domReference&&j.floating)return Py(j.domReference,j.floating,$,M)},[m,v,j,$,M]);const ce=vr(W),Ke=sF(r,ce,I),ot=ii(W)||"center",Lt=!!U.hide?.referenceHidden;at(()=>{x&&v&&G&&R(ce)},[x,v,G,ce]);const Ft=c.useMemo(()=>({position:"absolute",top:U.arrow?.y,left:U.arrow?.x}),[U.arrow]),Tt=U.arrow?.centerOffset!==0;return c.useMemo(()=>({positionerStyles:ft,arrowStyles:Ft,arrowRef:Q,arrowUncentered:Tt,side:Ke,align:ot,physicalSide:ce,anchorHidden:Lt,refs:N,context:Z,isPositioned:G,update:$}),[ft,Ft,Q,Tt,Ke,ot,ce,Lt,N,Z,G,$])}function ZS(e){return e!=null&&"current"in e}function aF(e){return e==="starting"?nue:fr}const Ope=c.forwardRef(function(e,t){const{render:n,className:r,anchor:o,positionMethod:i="absolute",side:s="bottom",align:a="center",sideOffset:l=0,alignOffset:u=0,collisionBoundary:d="clipping-ancestors",collisionPadding:f=5,arrowPadding:m=5,sticky:p=!1,disableAnchorTracking:v=!1,collisionAvoidance:g=oue,...h}=e,b=zr(),{filteredItems:y}=ps(),x=ch(),w=wpe(),C=me(b,be.modal),R=me(b,be.open),k=me(b,be.mounted),S=me(b,be.openMethod),P=me(b,be.triggerElement),L=me(b,be.inputElement),_=me(b,be.inputInsidePopup),O=me(b,be.transitionStatus),B=y.length===0,I=Npe({anchor:o??(_?P:L),floatingRootContext:x,positionMethod:i,mounted:k,side:s,sideOffset:l,align:a,alignOffset:u,arrowPadding:m,collisionBoundary:d,collisionPadding:f,sticky:p,disableAnchorTracking:v,keepMounted:w,collisionAvoidance:g,lazyFlip:!0});hde(R&&C&&S!=="touch",P);const V=c.useMemo(()=>{const A={...I.positionerStyles};return R||(A.pointerEvents="none"),{role:"presentation",hidden:!k,style:A}},[R,k,I.positionerStyles]),F={open:R,side:I.side,align:I.align,anchorHidden:I.anchorHidden,empty:B};at(()=>{b.set("popupSide",I.side)},[b,I.side]);const D=c.useMemo(()=>({side:I.side,align:I.align,arrowRef:I.arrowRef,arrowUncentered:I.arrowUncentered,arrowStyles:I.arrowStyles,anchorHidden:I.anchorHidden,isPositioned:I.isPositioned}),[I.side,I.align,I.arrowRef,I.arrowUncentered,I.arrowStyles,I.anchorHidden,I.isPositioned]),T=Jt(A=>{b.set("positionerElement",A)}),q=qn("div",e,{state:F,ref:[t,T],props:[V,aF(O),h],stateAttributesMapping:YV});return E.jsxs(uE.Provider,{value:D,children:[k&&C&&E.jsx(XV,{inert:ipe(!R),cutout:L??P}),q]})});process.env.NODE_ENV!=="production"&&(Ope.displayName="ComboboxPositioner");const Ipe={...YV,...sV},Ape=c.forwardRef(function(e,t){const{render:n,className:r,initialFocus:o,finalFocus:i,...s}=e,a=zr(),l=dE(),u=ch(),{filteredItems:d}=ps(),f=me(a,be.mounted),m=me(a,be.open),p=me(a,be.openMethod),v=me(a,be.transitionStatus),g=me(a,be.inputInsidePopup),h=me(a,be.inputElement),b=d.length===0;kV({open:m,ref:a.state.popupRef,onComplete(){m&&a.state.onOpenChangeComplete(!0)}});const y={open:m,side:l.side,align:l.align,anchorHidden:l.anchorHidden,transitionStatus:v,empty:b},x=qn("div",e,{state:y,ref:[t,a.state.popupRef],props:[{role:g?"dialog":"presentation",tabIndex:-1,onFocus(R){const k=tc(R.nativeEvent);p!=="touch"&&(Ht(a.state.listElement,k)||k===R.currentTarget)&&a.state.inputRef.current?.focus()}},aF(v),s],stateAttributesMapping:Ipe}),w=o===void 0?g?R=>R==="touch"?a.state.popupRef.current:h:!1:o;let C;return i!=null?C=i:C=g?void 0:!1,E.jsx(Ide,{context:u,disabled:!f,modal:!g,openInteractionType:p,initialFocus:w,returnFocus:C,children:x})});process.env.NODE_ENV!=="production"&&(Ape.displayName="ComboboxPopup");const mE=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(mE.displayName="ComboboxGroupContext");function Mpe(){const e=c.useContext(mE);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>.":Jr(18));return e}const Ppe=c.forwardRef(function(e,t){const{render:n,className:r,items:o,...i}=e,[s,a]=c.useState(),l=c.useMemo(()=>({labelId:s,setLabelId:a,items:o}),[s,a,o]),u=qn("div",e,{ref:t,props:[{role:"group","aria-labelledby":s},i]}),d=E.jsx(mE.Provider,{value:l,children:u});return o?E.jsx(bpe,{items:o,children:d}):d});process.env.NODE_ENV!=="production"&&(Ppe.displayName="ComboboxGroup");const _pe=c.forwardRef(function(e,t){const{render:n,className:r,id:o,...i}=e,{setLabelId:s}=Mpe(),a=U0(o);return at(()=>(s(a),()=>{s(void 0)}),[a,s]),qn("div",e,{ref:t,props:[{id:a},i]})});process.env.NODE_ENV!=="production"&&(_pe.displayName="ComboboxGroupLabel");const lF=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(lF.displayName="ComboboxItemContext");const cF=c.createContext(!1);process.env.NODE_ENV!=="production"&&(cF.displayName="ComboboxRowContext");function Tpe(){return c.useContext(cF)}const Dpe=c.memo(c.forwardRef(function(e,t){const{render:n,className:r,value:o=null,index:i,disabled:s=!1,nativeButton:a=!1,...l}=e,u=c.useRef(!1),d=c.useRef(null),f=lV({index:i,textRef:d,indexGuessBehavior:aV.GuessFromOrder}),m=zr(),p=Tpe(),{flatFilteredItems:v,hasItems:g}=ps(),h=me(m,be.open),b=me(m,be.selectionMode),y=me(m,be.readOnly),x=me(m,be.virtualized),w=me(m,be.isItemEqualToValue),C=b!=="none",R=i??(x?tF(v,o,w):f.index),k=f.index!==-1,S=me(m,be.id),P=me(m,be.isActive,R),L=me(m,be.isSelected,o),_=me(m,be.getItemProps),O=c.useRef(null),B=S!=null&&k?`${S}-${R}`:void 0,I=L&&C;at(()=>{if(!(k&&(x||i!=null)))return;const Y=m.state.listRef.current;return Y[R]=O.current,()=>{delete Y[R]}},[k,x,R,i,m]),at(()=>{if(!k||g)return;const Y=m.state.valuesRef.current;return Y[R]=o,b!=="none"&&m.state.allValuesRef.current.push(o),()=>{delete Y[R]}},[k,g,R,o,m,b]),at(()=>{if(!h){u.current=!1;return}if(!k||g)return;const Y=m.state.selectedValue,Q=Array.isArray(Y)?Y[Y.length-1]:Y;xp(o,Q,w)&&m.set("selectedIndex",R)},[k,g,h,m,R,o,w]);const V={disabled:s,selected:I,highlighted:P},F=_({active:P,selected:I});F.id=void 0,F.onFocus=void 0;const{getButtonProps:D,buttonRef:T}=oh({disabled:s,focusableWhenDisabled:!0,native:a});function q(Y){function Q(){m.state.handleSelection(Y,o)}m.state.submitOnItemClick?(dt.flushSync(Q),m.state.requestSubmit()):Q()}const A={id:B,role:p?"gridcell":"option","aria-selected":C?I:void 0,tabIndex:void 0,onPointerDownCapture(Y){u.current=!0,Y.preventDefault()},onClick(Y){s||y||q(Y.nativeEvent)},onMouseUp(Y){const Q=u.current;u.current=!1,!(s||y||Y.button!==0||Q||!P)&&q(Y.nativeEvent)}},ee=qn("div",e,{ref:[T,t,f.ref,O],state:V,props:[F,A,l,D]}),ie=c.useMemo(()=>({selected:I,textRef:d}),[I,d]);return E.jsx(lF.Provider,{value:ie,children:ee})}));process.env.NODE_ENV!=="production"&&(Dpe.displayName="ComboboxItem");const Lpe=c.forwardRef(function(e,t){const{render:n,className:r,children:o,...i}=e,{filteredItems:s}=ps(),a=zr(),l=s.length===0?o:null;return qn("div",e,{ref:[t,a.state.emptyRef],props:[{children:l,role:"status","aria-live":"polite","aria-atomic":!0},i]})});process.env.NODE_ENV!=="production"&&(Lpe.displayName="ComboboxEmpty");const jpe=c.forwardRef(function(e,t){const{className:n,render:r,orientation:o="horizontal",...i}=e;return qn("div",e,{state:{orientation:o},ref:t,props:[{role:"separator","aria-orientation":o},i]})});process.env.NODE_ENV!=="production"&&(jpe.displayName="Separator");const Vpe=c.forwardRef(function(e,t){const{render:n,className:r,...o}=e,i=zr(),s=me(i,be.open),a=me(i,be.hasSelectionChips),[l,u]=c.useState(void 0);s&&l!==void 0&&u(void 0);const d=c.useRef([]),f=qn("div",e,{ref:[t,i.state.chipsContainerRef],props:[a?{role:"toolbar"}:fr,o]}),m=c.useMemo(()=>({highlightedChipIndex:l,setHighlightedChipIndex:u,chipsRef:d}),[l,u,d]);return E.jsx(cE.Provider,{value:m,children:E.jsx(Yj,{elementsRef:d,children:f})})});process.env.NODE_ENV!=="production"&&(Vpe.displayName="ComboboxChips");const hE=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(hE.displayName="ComboboxChipContext");function Fpe(){const e=c.useContext(hE);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"useComboboxChipContext must be used within a ComboboxChip":Jr(17));return e}const $pe=c.forwardRef(function(e,t){const{render:n,className:r,...o}=e,i=zr(),{setHighlightedChipIndex:s,chipsRef:a}=iF(),l=me(i,be.disabled),u=me(i,be.readOnly),d=me(i,be.selectedValue),{ref:f,index:m}=lV();function p(h){let b=m;if(h.key==="ArrowLeft")h.preventDefault(),m>0?b=m-1:b=void 0;else if(h.key==="ArrowRight")h.preventDefault(),m<d.length-1?b=m+1:b=void 0;else if(h.key==="Backspace"||h.key==="Delete"){const y=m>=d.length-1?d.length-2:m;b=y>=0?y:void 0,Pr(h),i.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),i.state.setSelectedValue(d.filter((x,w)=>w!==m),qt(of,h.nativeEvent))}else h.key==="Enter"||h.key===" "?(Pr(h),b=void 0):h.key==="ArrowDown"||h.key==="ArrowUp"?(Pr(h),i.state.setOpen(!0,qt(oV,h.nativeEvent)),b=void 0):h.key.length===1&&!h.ctrlKey&&!h.metaKey&&!h.altKey&&(b=void 0);return b}const v=qn("div",e,{ref:[t,f],state:{disabled:l},props:[{tabIndex:-1,"aria-disabled":l||void 0,"aria-readonly":u||void 0,onKeyDown(h){if(l||u)return;const b=p(h);dt.flushSync(()=>{s(b)}),b===void 0?i.state.inputRef.current?.focus():a.current[b]?.focus()},onMouseDown(h){u||(h.preventDefault(),!l&&i.state.inputRef.current?.focus())}},o]}),g=c.useMemo(()=>({index:m}),[m]);return E.jsx(hE.Provider,{value:g,children:v})});process.env.NODE_ENV!=="production"&&($pe.displayName="ComboboxChip");const zpe=c.forwardRef(function(e,t){const{render:n,className:r,disabled:o=!1,nativeButton:i=!0,...s}=e,a=zr(),{index:l}=Fpe(),u=me(a,be.disabled),d=me(a,be.readOnly),f=me(a,be.selectedValue),m=me(a,be.isItemEqualToValue),p=u||o,{buttonRef:v,getButtonProps:g}=oh({native:i,disabled:p||d,focusableWhenDisabled:!0}),h={disabled:p};function b(x){const w=a.state.activeIndex;if(w==null)return;const C=tF(a.state.valuesRef.current,x,m);C!==-1&&w===C&&a.state.setIndices({activeIndex:null,type:a.state.keyboardActiveRef.current?"keyboard":"pointer"})}function y(x){const w=qt(pue,x.nativeEvent),C=f[l];return b(C),a.state.setSelectedValue(f.filter((R,k)=>k!==l),w),a.state.inputRef.current?.focus(),w}return qn("button",e,{ref:[t,v],state:h,props:[{tabIndex:-1,onClick(x){p||d||y(x).isPropagationAllowed||x.stopPropagation()},onKeyDown(x){p||d||(x.key==="Enter"||x.key===" ")&&(y(x).isPropagationAllowed||Pr(x))}},s,g]})});process.env.NODE_ENV!=="production"&&(zpe.displayName="ComboboxChipRemove");var Bpe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],uh=Bpe.reduce((e,t)=>{const n=Ile(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Hpe="Label",uF=c.forwardRef((e,t)=>E.jsx(uh.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));uF.displayName=Hpe;var Gpe=uF;ca(_n("body-sm-regular"));Gpe.displayName;var Wpe="Separator",JS="horizontal",Upe=["horizontal","vertical"],dF=c.forwardRef((e,t)=>{const{decorative:n,orientation:r=JS,...o}=e,i=qpe(r)?r:JS,s=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return E.jsx(uh.div,{"data-orientation":i,...s,...o,ref:t})});dF.displayName=Wpe;function qpe(e){return Upe.includes(e)}var Kpe=dF;Kpe.displayName;[`text-primary-text flex w-fit items-center gap-2
|
|
275
|
+
group-data-[disabled=true]/field:opacity-50`,_n("body-sm-regular")].join(" ");["text-sub-label-text group-has-data-[orientation=horizontal]/field:text-balance",_n("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(" ");c.createContext(null);var Ype=c[" useId ".trim().toString()]||(()=>{}),Xpe=0;function fF(e){const[t,n]=c.useState(Ype());return Ui(()=>{n(r=>r??String(Xpe++))},[e]),t?`radix-${t}`:""}function Ks(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}function Zpe(e,t=globalThis?.document){const n=Ks(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 Jpe="DismissableLayer",Ty="dismissableLayer.update",Qpe="dismissableLayer.pointerDownOutside",eme="dismissableLayer.focusOutside",QS,pF=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gE=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,u=c.useContext(pF),[d,f]=c.useState(null),m=d?.ownerDocument??globalThis?.document,[,p]=c.useState({}),v=sn(t,k=>f(k)),g=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(h),y=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,w=y>=b,C=rme(k=>{const S=k.target,P=[...u.branches].some(L=>L.contains(S));!w||P||(o?.(k),s?.(k),k.defaultPrevented||a?.())},m),R=ome(k=>{const S=k.target;[...u.branches].some(P=>P.contains(S))||(i?.(k),s?.(k),k.defaultPrevented||a?.())},m);return Zpe(k=>{y===u.layers.size-1&&(r?.(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},m),c.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(QS=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),eN(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=QS)}},[d,m,n,u]),c.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),eN())},[d,u]),c.useEffect(()=>{const k=()=>p({});return document.addEventListener(Ty,k),()=>document.removeEventListener(Ty,k)},[]),E.jsx(Mt.div,{...l,ref:v,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:Rt(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Rt(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Rt(e.onPointerDownCapture,C.onPointerDownCapture)})});gE.displayName=Jpe;var tme="DismissableLayerBranch",nme=c.forwardRef((e,t)=>{const n=c.useContext(pF),r=c.useRef(null),o=sn(t,r);return c.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),E.jsx(Mt.div,{...e,ref:o})});nme.displayName=tme;function rme(e,t=globalThis?.document){const n=Ks(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){mF(Qpe,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},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ome(e,t=globalThis?.document){const n=Ks(e),r=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!r.current&&mF(eme,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function eN(){const e=new CustomEvent(Ty);document.dispatchEvent(e)}function mF(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Yle(o,i):o.dispatchEvent(i)}var Rv="focusScope.autoFocusOnMount",Sv="focusScope.autoFocusOnUnmount",tN={bubbles:!1,cancelable:!0},ime="FocusScope",hF=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=c.useState(null),u=Ks(o),d=Ks(i),f=c.useRef(null),m=sn(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(x){if(p.paused||!a)return;const w=x.target;a.contains(w)?f.current=w:Ei(f.current,{select:!0})},h=function(x){if(p.paused||!a)return;const w=x.relatedTarget;w!==null&&(a.contains(w)||Ei(f.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const w of x)w.removedNodes.length>0&&Ei(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",h);const y=new MutationObserver(b);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",h),y.disconnect()}}},[r,a,p.paused]),c.useEffect(()=>{if(a){rN.add(p);const g=document.activeElement;if(!a.contains(g)){const h=new CustomEvent(Rv,tN);a.addEventListener(Rv,u),a.dispatchEvent(h),h.defaultPrevented||(sme(dme(gF(a)),{select:!0}),document.activeElement===g&&Ei(a))}return()=>{a.removeEventListener(Rv,u),setTimeout(()=>{const h=new CustomEvent(Sv,tN);a.addEventListener(Sv,d),a.dispatchEvent(h),h.defaultPrevented||Ei(g??document.body,{select:!0}),a.removeEventListener(Sv,d),rN.remove(p)},0)}}},[a,u,d,p]);const v=c.useCallback(g=>{if(!n&&!r||p.paused)return;const h=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(h&&b){const y=g.currentTarget,[x,w]=ame(y);x&&w?!g.shiftKey&&b===w?(g.preventDefault(),n&&Ei(x,{select:!0})):g.shiftKey&&b===x&&(g.preventDefault(),n&&Ei(w,{select:!0})):b===y&&g.preventDefault()}},[n,r,p.paused]);return E.jsx(Mt.div,{tabIndex:-1,...s,ref:m,onKeyDown:v})});hF.displayName=ime;function sme(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ei(r,{select:t}),document.activeElement!==n)return}function ame(e){const t=gF(e),n=nN(t,e),r=nN(t.reverse(),e);return[n,r]}function gF(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 nN(e,t){for(const n of e)if(!lme(n,{upTo:t}))return n}function lme(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 cme(e){return e instanceof HTMLInputElement&&"select"in e}function Ei(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&cme(e)&&t&&e.select()}}var rN=ume();function ume(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=oN(e,t),e.unshift(t)},remove(t){e=oN(e,t),e[0]?.resume()}}}function oN(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function dme(e){return e.filter(t=>t.tagName!=="A")}var fme="Portal",pme=c.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=c.useState(!1);Ui(()=>i(!0),[]);const s=n||o&&globalThis?.document?.body;return s?xl.createPortal(E.jsx(Mt.div,{...r,ref:t}),s):null});pme.displayName=fme;var Nv=0;function mme(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??iN()),document.body.insertAdjacentElement("beforeend",e[1]??iN()),Nv++,()=>{Nv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Nv--}},[])}function iN(){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 co=function(){return co=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},co.apply(this,arguments)};function vF(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 hme(e,t,n){for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var af="right-scroll-bar-position",lf="width-before-scroll-bar",gme="with-scroll-bars-hidden",vme="--removed-body-scroll-bar-size";function Ov(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function bme(e,t){var n=ae.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 yme=typeof window<"u"?c.useLayoutEffect:c.useEffect,sN=new WeakMap;function xme(e,t){var n=bme(null,function(r){return e.forEach(function(o){return Ov(o,r)})});return yme(function(){var r=sN.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||Ov(a,null)}),i.forEach(function(a){o.has(a)||Ov(a,s)})}sN.set(n,e)},[e]),n}function wme(e){return e}function Eme(e,t){t===void 0&&(t=wme);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(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var l=function(){var d=s;s=[],d.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),n}}}};return o}function Cme(e){e===void 0&&(e={});var t=Eme(null);return t.options=co({async:!0,ssr:!1},e),t}var bF=function(e){var t=e.sideCar,n=vF(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,co({},n))};bF.isSideCarExport=!0;function kme(e,t){return e.useMedium(t),bF}var yF=Cme(),Iv=function(){},dh=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Iv,onWheelCapture:Iv,onTouchMoveCapture:Iv}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,p=e.noRelative,v=e.noIsolation,g=e.inert,h=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,x=e.gapMode,w=vF(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,R=xme([n,t]),k=co(co({},w),o);return c.createElement(c.Fragment,null,d&&c.createElement(C,{sideCar:yF,removeScrollBar:u,shards:f,noRelative:p,noIsolation:v,inert:g,setCallbacks:i,allowPinchZoom:!!h,lockRef:n,gapMode:x}),s?c.cloneElement(c.Children.only(a),co(co({},k),{ref:R})):c.createElement(y,co({},k,{className:l,ref:R}),a))});dh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};dh.classNames={fullWidth:lf,zeroRight:af};var Rme=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Sme(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Rme();return t&&e.setAttribute("nonce",t),e}function Nme(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ome(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ime=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Sme())&&(Nme(t,n),Ome(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ame=function(){var e=Ime();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},xF=function(){var e=Ame(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Mme={left:0,top:0,right:0,gap:0},Av=function(e){return parseInt(e||"",10)||0},Pme=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[Av(n),Av(r),Av(o)]},_me=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Mme;var t=Pme(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])}},Tme=xF(),Ya="data-scroll-locked",Dme=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
276
|
+
.`.concat(gme,` {
|
|
277
|
+
overflow: hidden `).concat(r,`;
|
|
278
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
279
|
+
}
|
|
280
|
+
body[`).concat(Ya,`] {
|
|
281
|
+
overflow: hidden `).concat(r,`;
|
|
282
|
+
overscroll-behavior: contain;
|
|
283
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
284
|
+
padding-left: `.concat(o,`px;
|
|
285
|
+
padding-top: `).concat(i,`px;
|
|
286
|
+
padding-right: `).concat(s,`px;
|
|
287
|
+
margin-left:0;
|
|
288
|
+
margin-top:0;
|
|
289
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
290
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.`).concat(af,` {
|
|
294
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.`).concat(lf,` {
|
|
298
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.`).concat(af," .").concat(af,` {
|
|
302
|
+
right: 0 `).concat(r,`;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.`).concat(lf," .").concat(lf,` {
|
|
306
|
+
margin-right: 0 `).concat(r,`;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
body[`).concat(Ya,`] {
|
|
310
|
+
`).concat(vme,": ").concat(a,`px;
|
|
311
|
+
}
|
|
312
|
+
`)},aN=function(){var e=parseInt(document.body.getAttribute(Ya)||"0",10);return isFinite(e)?e:0},Lme=function(){c.useEffect(function(){return document.body.setAttribute(Ya,(aN()+1).toString()),function(){var e=aN()-1;e<=0?document.body.removeAttribute(Ya):document.body.setAttribute(Ya,e.toString())}},[])},jme=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Lme();var i=c.useMemo(function(){return _me(o)},[o]);return c.createElement(Tme,{styles:Dme(i,!t,o,n?"":"!important")})},Dy=!1;if(typeof window<"u")try{var cd=Object.defineProperty({},"passive",{get:function(){return Dy=!0,!0}});window.addEventListener("test",cd,cd),window.removeEventListener("test",cd,cd)}catch{Dy=!1}var Ra=Dy?{passive:!1}:!1,Vme=function(e){return e.tagName==="TEXTAREA"},wF=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Vme(e)&&n[t]==="visible")},Fme=function(e){return wF(e,"overflowY")},$me=function(e){return wF(e,"overflowX")},lN=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=EF(e,r);if(o){var i=CF(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},zme=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Bme=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},EF=function(e,t){return e==="v"?Fme(t):$me(t)},CF=function(e,t){return e==="v"?zme(t):Bme(t)},Hme=function(e,t){return e==="h"&&t==="rtl"?-1:1},Gme=function(e,t,n,r,o){var i=Hme(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),u=!1,d=s>0,f=0,m=0;do{if(!a)break;var p=CF(e,a),v=p[0],g=p[1],h=p[2],b=g-h-i*v;(v||b)&&EF(e,a)&&(f+=b,m+=v);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&Math.abs(f)<1||!d&&Math.abs(m)<1)&&(u=!0),u},ud=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},cN=function(e){return[e.deltaX,e.deltaY]},uN=function(e){return e&&"current"in e?e.current:e},Wme=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ume=function(e){return`
|
|
313
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
314
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
315
|
+
`)},qme=0,Sa=[];function Kme(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(qme++)[0],i=c.useState(xF)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=hme([e.lockRef.current],(e.shards||[]).map(uN)).filter(Boolean);return g.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(g,h){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var b=ud(g),y=n.current,x="deltaX"in g?g.deltaX:y[0]-b[0],w="deltaY"in g?g.deltaY:y[1]-b[1],C,R=g.target,k=Math.abs(x)>Math.abs(w)?"h":"v";if("touches"in g&&k==="h"&&R.type==="range")return!1;var S=window.getSelection(),P=S&&S.anchorNode,L=P?P===R||P.contains(R):!1;if(L)return!1;var _=lN(k,R);if(!_)return!0;if(_?C=k:(C=k==="v"?"h":"v",_=lN(k,R)),!_)return!1;if(!r.current&&"changedTouches"in g&&(x||w)&&(r.current=C),!C)return!0;var O=r.current||C;return Gme(O,h,g,O==="h"?x:w)},[]),l=c.useCallback(function(g){var h=g;if(!(!Sa.length||Sa[Sa.length-1]!==i)){var b="deltaY"in h?cN(h):ud(h),y=t.current.filter(function(C){return C.name===h.type&&(C.target===h.target||h.target===C.shadowParent)&&Wme(C.delta,b)})[0];if(y&&y.should){h.cancelable&&h.preventDefault();return}if(!y){var x=(s.current.shards||[]).map(uN).filter(Boolean).filter(function(C){return C.contains(h.target)}),w=x.length>0?a(h,x[0]):!s.current.noIsolation;w&&h.cancelable&&h.preventDefault()}}},[]),u=c.useCallback(function(g,h,b,y){var x={name:g,delta:h,target:b,should:y,shadowParent:Yme(b)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(w){return w!==x})},1)},[]),d=c.useCallback(function(g){n.current=ud(g),r.current=void 0},[]),f=c.useCallback(function(g){u(g.type,cN(g),g.target,a(g,e.lockRef.current))},[]),m=c.useCallback(function(g){u(g.type,ud(g),g.target,a(g,e.lockRef.current))},[]);c.useEffect(function(){return Sa.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Ra),document.addEventListener("touchmove",l,Ra),document.addEventListener("touchstart",d,Ra),function(){Sa=Sa.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,Ra),document.removeEventListener("touchmove",l,Ra),document.removeEventListener("touchstart",d,Ra)}},[]);var p=e.removeScrollBar,v=e.inert;return c.createElement(c.Fragment,null,v?c.createElement(i,{styles:Ume(o)}):null,p?c.createElement(jme,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Yme(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Xme=kme(yF,Kme);var kF=c.forwardRef(function(e,t){return c.createElement(dh,co({},e,{ref:t,sideCar:Xme}))});kF.classNames=dh.classNames;var Zme=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Na=new WeakMap,dd=new WeakMap,fd={},Mv=0,RF=function(e){return e&&(e.host||RF(e.parentNode))},Jme=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=RF(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})},Qme=function(e,t,n,r){var o=Jme(t,Array.isArray(e)?e:[e]);fd[n]||(fd[n]=new WeakMap);var i=fd[n],s=[],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(m){if(a.has(m))d(m);else try{var p=m.getAttribute(r),v=p!==null&&p!=="false",g=(Na.get(m)||0)+1,h=(i.get(m)||0)+1;Na.set(m,g),i.set(m,h),s.push(m),g===1&&v&&dd.set(m,!0),h===1&&m.setAttribute(n,"true"),v||m.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return d(t),a.clear(),Mv++,function(){s.forEach(function(f){var m=Na.get(f)-1,p=i.get(f)-1;Na.set(f,m),i.set(f,p),m||(dd.has(f)||f.removeAttribute(r),dd.delete(f)),p||f.removeAttribute(n)}),Mv--,Mv||(Na=new WeakMap,Na=new WeakMap,dd=new WeakMap,fd={})}},ehe=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Zme(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Qme(r,o,n,"aria-hidden")):function(){return null}},SF="Dialog",[NF]=Po(SF),[GPe,To]=NF(SF),OF="DialogTrigger",the=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=To(OF,n),i=sn(t,o.triggerRef);return E.jsx(Mt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":bE(o.open),...r,ref:i,onClick:Rt(e.onClick,o.onOpenToggle)})});the.displayName=OF;var nhe="DialogPortal",[WPe,IF]=NF(nhe,{forceMount:void 0}),wp="DialogOverlay",AF=c.forwardRef((e,t)=>{const n=IF(wp,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=To(wp,e.__scopeDialog);return i.modal?E.jsx(ua,{present:r||i.open,children:E.jsx(ohe,{...o,ref:t})}):null});AF.displayName=wp;var rhe=ap("DialogOverlay.RemoveScroll"),ohe=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=To(wp,n);return E.jsx(kF,{as:rhe,allowPinchZoom:!0,shards:[o.contentRef],children:E.jsx(Mt.div,{"data-state":bE(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ys="DialogContent",MF=c.forwardRef((e,t)=>{const n=IF(Ys,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=To(Ys,e.__scopeDialog);return E.jsx(ua,{present:r||i.open,children:i.modal?E.jsx(ihe,{...o,ref:t}):E.jsx(she,{...o,ref:t})})});MF.displayName=Ys;var ihe=c.forwardRef((e,t)=>{const n=To(Ys,e.__scopeDialog),r=c.useRef(null),o=sn(t,n.contentRef,r);return c.useEffect(()=>{const i=r.current;if(i)return ehe(i)},[]),E.jsx(PF,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Rt(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Rt(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:Rt(e.onFocusOutside,i=>i.preventDefault())})}),she=c.forwardRef((e,t)=>{const n=To(Ys,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return E.jsx(PF,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;n.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),PF=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=To(Ys,n),l=c.useRef(null),u=sn(t,l);return mme(),E.jsxs(E.Fragment,{children:[E.jsx(hF,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:E.jsx(gE,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":bE(a.open),...s,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),E.jsxs(E.Fragment,{children:[E.jsx(lhe,{titleId:a.titleId}),E.jsx(uhe,{contentRef:l,descriptionId:a.descriptionId})]})]})}),vE="DialogTitle",_F=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=To(vE,n);return E.jsx(Mt.h2,{id:o.titleId,...r,ref:t})});_F.displayName=vE;var TF="DialogDescription",DF=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=To(TF,n);return E.jsx(Mt.p,{id:o.descriptionId,...r,ref:t})});DF.displayName=TF;var LF="DialogClose",ahe=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=To(LF,n);return E.jsx(Mt.button,{type:"button",...r,ref:t,onClick:Rt(e.onClick,()=>o.onOpenChange(!1))})});ahe.displayName=LF;function bE(e){return e?"open":"closed"}var jF="DialogTitleWarning",[UPe,VF]=Dle(jF,{contentName:Ys,titleName:vE,docsSlug:"dialog"}),lhe=({titleId:e})=>{const t=VF(jF),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
316
|
+
|
|
317
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
318
|
+
|
|
319
|
+
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},che="DialogDescriptionWarning",uhe=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${VF(che).contentName}}.`;return c.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},dhe=AF,fhe=MF,phe=_F,mhe=DF;dhe.displayName;fhe.displayName;phe.displayName;mhe.displayName;_n("body-sm-medium");[_n("body-xs-medium"),"mb-1 px-2 text-secondary-text uppercase"].join(" ");function hhe(e,t=[]){let n=[];function r(i,s){const a=c.createContext(s);a.displayName=i+"Context";const l=n.length;n=[...n,s];const u=f=>{const{scope:m,children:p,...v}=f,g=m?.[e]?.[l]||a,h=c.useMemo(()=>v,Object.values(v));return E.jsx(g.Provider,{value:h,children:p})};u.displayName=i+"Provider";function d(f,m){const p=m?.[e]?.[l]||a,v=c.useContext(p);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(s=>c.createContext(s));return function(s){const a=s?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:a}}),[s,a])}};return o.scopeName=e,[r,ghe(o,...t)]}function ghe(...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(o){const i=r.reduce((s,{useScope:a,scopeName:l})=>{const u=a(o)[`__scope${l}`];return{...s,...u}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var yE="Progress",xE=100,[vhe]=hhe(yE),[bhe,yhe]=vhe(yE),FF=c.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=whe,...s}=e;(o||o===0)&&!dN(o)&&console.error(Ehe(`${o}`,"Progress"));const a=dN(o)?o:xE;r!==null&&!fN(r,a)&&console.error(Che(`${r}`,"Progress"));const l=fN(r,a)?r:null,u=Ep(l)?i(l,a):void 0;return E.jsx(bhe,{scope:n,value:l,max:a,children:E.jsx(uh.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Ep(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":zF(l,a),"data-value":l??void 0,"data-max":a,...s,ref:t})})});FF.displayName=yE;var $F="ProgressIndicator",xhe=c.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=yhe($F,n);return E.jsx(uh.div,{"data-state":zF(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});xhe.displayName=$F;function whe(e,t){return`${Math.round(e/t*100)}%`}function zF(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Ep(e){return typeof e=="number"}function dN(e){return Ep(e)&&!isNaN(e)&&e>0}function fN(e,t){return Ep(e)&&!isNaN(e)&&e<=t&&e>=0}function Ehe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${xE}\`.`}function Che(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
320
|
+
- a positive number
|
|
321
|
+
- less than the value passed to \`max\` (or ${xE} if no \`max\` prop is set)
|
|
322
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
323
|
+
|
|
324
|
+
Defaulting to \`null\`.`}var khe=FF;khe.displayName;function Rhe(e){const t=e+"CollectionProvider",[n,r]=Po(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:h,children:b}=g,y=ae.useRef(null),x=ae.useRef(new Map).current;return E.jsx(o,{scope:h,itemMap:x,collectionRef:y,children:b})};s.displayName=t;const a=e+"CollectionSlot",l=ap(a),u=ae.forwardRef((g,h)=>{const{scope:b,children:y}=g,x=i(a,b),w=sn(h,x.collectionRef);return E.jsx(l,{ref:w,children:y})});u.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",m=ap(d),p=ae.forwardRef((g,h)=>{const{scope:b,children:y,...x}=g,w=ae.useRef(null),C=sn(h,w),R=i(d,b);return ae.useEffect(()=>(R.itemMap.set(w,{ref:w,...x}),()=>{R.itemMap.delete(w)})),E.jsx(m,{[f]:"",ref:C,children:y})});p.displayName=d;function v(g){const h=i(e+"CollectionConsumer",g);return ae.useCallback(()=>{const b=h.collectionRef.current;if(!b)return[];const y=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((x,w)=>y.indexOf(x.ref.current)-y.indexOf(w.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},v,r]}var She=c.createContext(void 0);function wE(e){const t=c.useContext(She);return e||t||"ltr"}var Pv="rovingFocusGroup.onEntryFocus",Nhe={bubbles:!1,cancelable:!0},Yc="RovingFocusGroup",[Ly,BF,Ohe]=Rhe(Yc),[Ihe,fh]=Po(Yc,[Ohe]),[Ahe,Mhe]=Ihe(Yc),HF=c.forwardRef((e,t)=>E.jsx(Ly.Provider,{scope:e.__scopeRovingFocusGroup,children:E.jsx(Ly.Slot,{scope:e.__scopeRovingFocusGroup,children:E.jsx(Phe,{...e,ref:t})})}));HF.displayName=Yc;var Phe=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,m=c.useRef(null),p=sn(t,m),v=wE(i),[g,h]=qc({prop:s,defaultProp:a??null,onChange:l,caller:Yc}),[b,y]=c.useState(!1),x=Ks(u),w=BF(n),C=c.useRef(!1),[R,k]=c.useState(0);return c.useEffect(()=>{const S=m.current;if(S)return S.addEventListener(Pv,x),()=>S.removeEventListener(Pv,x)},[x]),E.jsx(Ahe,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:g,onItemFocus:c.useCallback(S=>h(S),[h]),onItemShiftTab:c.useCallback(()=>y(!0),[]),onFocusableItemAdd:c.useCallback(()=>k(S=>S+1),[]),onFocusableItemRemove:c.useCallback(()=>k(S=>S-1),[]),children:E.jsx(Mt.div,{tabIndex:b||R===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:Rt(e.onMouseDown,()=>{C.current=!0}),onFocus:Rt(e.onFocus,S=>{const P=!C.current;if(S.target===S.currentTarget&&P&&!b){const L=new CustomEvent(Pv,Nhe);if(S.currentTarget.dispatchEvent(L),!L.defaultPrevented){const _=w().filter(V=>V.focusable),O=_.find(V=>V.active),B=_.find(V=>V.id===g),I=[O,B,..._].filter(Boolean).map(V=>V.ref.current);UF(I,d)}}C.current=!1}),onBlur:Rt(e.onBlur,()=>y(!1))})})}),GF="RovingFocusGroupItem",WF=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:s,...a}=e,l=fF(),u=i||l,d=Mhe(GF,n),f=d.currentTabStopId===u,m=BF(n),{onFocusableItemAdd:p,onFocusableItemRemove:v,currentTabStopId:g}=d;return c.useEffect(()=>{if(r)return p(),()=>v()},[r,p,v]),E.jsx(Ly.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:E.jsx(Mt.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:Rt(e.onMouseDown,h=>{r?d.onItemFocus(u):h.preventDefault()}),onFocus:Rt(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:Rt(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){d.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const b=Dhe(h,d.orientation,d.dir);if(b!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let y=m().filter(x=>x.focusable).map(x=>x.ref.current);if(b==="last")y.reverse();else if(b==="prev"||b==="next"){b==="prev"&&y.reverse();const x=y.indexOf(h.currentTarget);y=d.loop?Lhe(y,x+1):y.slice(x+1)}setTimeout(()=>UF(y))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:g!=null}):s})})});WF.displayName=GF;var _he={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function The(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Dhe(e,t,n){const r=The(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return _he[r]}function UF(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Lhe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var qF=HF,KF=WF,EE="Radio",[jhe,YF]=Po(EE),[Vhe,Fhe]=jhe(EE),XF=c.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:s,value:a="on",onCheck:l,form:u,...d}=e,[f,m]=c.useState(null),p=sn(t,h=>m(h)),v=c.useRef(!1),g=f?u||!!f.closest("form"):!0;return E.jsxs(Vhe,{scope:n,checked:o,disabled:s,children:[E.jsx(Mt.button,{type:"button",role:"radio","aria-checked":o,"data-state":e$(o),"data-disabled":s?"":void 0,disabled:s,value:a,...d,ref:p,onClick:Rt(e.onClick,h=>{o||l?.(),g&&(v.current=h.isPropagationStopped(),v.current||h.stopPropagation())})}),g&&E.jsx(QF,{control:f,bubbles:!v.current,name:r,value:a,checked:o,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});XF.displayName=EE;var ZF="RadioIndicator",JF=c.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=Fhe(ZF,n);return E.jsx(ua,{present:r||i.checked,children:E.jsx(Mt.span,{"data-state":e$(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});JF.displayName=ZF;var $he="RadioBubbleInput",QF=c.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const s=c.useRef(null),a=sn(s,i),l=z0(n),u=Qm(t);return c.useEffect(()=>{const d=s.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&m){const p=new Event("click",{bubbles:r});m.call(d,n),d.dispatchEvent(p)}},[l,n,r]),E.jsx(Mt.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}})});QF.displayName=$he;function e$(e){return e?"checked":"unchecked"}var zhe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ph="RadioGroup",[Bhe]=Po(ph,[fh,YF]),t$=fh(),n$=YF(),[Hhe,Ghe]=Bhe(ph),r$=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:s=!1,disabled:a=!1,orientation:l,dir:u,loop:d=!0,onValueChange:f,...m}=e,p=t$(n),v=wE(u),[g,h]=qc({prop:i,defaultProp:o??null,onChange:f,caller:ph});return E.jsx(Hhe,{scope:n,name:r,required:s,disabled:a,value:g,onValueChange:h,children:E.jsx(qF,{asChild:!0,...p,orientation:l,dir:v,loop:d,children:E.jsx(Mt.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":a?"":void 0,dir:v,...m,ref:t})})})});r$.displayName=ph;var o$="RadioGroupItem",i$=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=Ghe(o$,n),s=i.disabled||r,a=t$(n),l=n$(n),u=c.useRef(null),d=sn(t,u),f=i.value===o.value,m=c.useRef(!1);return c.useEffect(()=>{const p=g=>{zhe.includes(g.key)&&(m.current=!0)},v=()=>m.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",v)}},[]),E.jsx(KF,{asChild:!0,...a,focusable:!s,active:f,children:E.jsx(XF,{disabled:s,required:i.required,checked:f,...l,...o,name:i.name,ref:d,onCheck:()=>i.onValueChange(o.value),onKeyDown:Rt(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:Rt(o.onFocus,()=>{m.current&&u.current?.click()})})})});i$.displayName=o$;var Whe="RadioGroupIndicator",Uhe=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=n$(n);return E.jsx(JF,{...o,...r,ref:t})});Uhe.displayName=Whe;var qhe=r$,Khe=i$;qhe.displayName;Khe.displayName;var mh="Switch",[Yhe]=Po(mh),[Xhe,Zhe]=Yhe(mh),s$=c.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:s,disabled:a,value:l="on",onCheckedChange:u,form:d,...f}=e,[m,p]=c.useState(null),v=sn(t,x=>p(x)),g=c.useRef(!1),h=m?d||!!m.closest("form"):!0,[b,y]=qc({prop:o,defaultProp:i??!1,onChange:u,caller:mh});return E.jsxs(Xhe,{scope:n,checked:b,disabled:a,children:[E.jsx(Mt.button,{type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":c$(b),"data-disabled":a?"":void 0,disabled:a,value:l,...f,ref:v,onClick:Rt(e.onClick,x=>{y(w=>!w),h&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),h&&E.jsx(l$,{control:m,bubbles:!g.current,name:r,value:l,checked:b,required:s,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});s$.displayName=mh;var a$="SwitchThumb",Jhe=c.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=Zhe(a$,n);return E.jsx(Mt.span,{"data-state":c$(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Jhe.displayName=a$;var Qhe="SwitchBubbleInput",l$=c.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const s=c.useRef(null),a=sn(s,i),l=z0(n),u=Qm(t);return c.useEffect(()=>{const d=s.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&m){const p=new Event("click",{bubbles:r});m.call(d,n),d.dispatchEvent(p)}},[l,n,r]),E.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}})});l$.displayName=Qhe;function c$(e){return e?"checked":"unchecked"}var ege=s$;ege.displayName;var hh="Tabs",[tge]=Po(hh,[fh]),u$=fh(),[nge,CE]=tge(hh),rge=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:s="horizontal",dir:a,activationMode:l="automatic",...u}=e,d=wE(a),[f,m]=qc({prop:r,onChange:o,defaultProp:i??"",caller:hh});return E.jsx(nge,{scope:n,baseId:fF(),value:f,onValueChange:m,orientation:s,dir:d,activationMode:l,children:E.jsx(Mt.div,{dir:d,"data-orientation":s,...u,ref:t})})});rge.displayName=hh;var d$="TabsList",f$=c.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=CE(d$,n),s=u$(n);return E.jsx(qF,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:r,children:E.jsx(Mt.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});f$.displayName=d$;var p$="TabsTrigger",m$=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,s=CE(p$,n),a=u$(n),l=v$(s.baseId,r),u=b$(s.baseId,r),d=r===s.value;return E.jsx(KF,{asChild:!0,...a,focusable:!o,active:d,children:E.jsx(Mt.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,...i,ref:t,onMouseDown:Rt(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?s.onValueChange(r):f.preventDefault()}),onKeyDown:Rt(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&s.onValueChange(r)}),onFocus:Rt(e.onFocus,()=>{const f=s.activationMode!=="manual";!d&&!o&&f&&s.onValueChange(r)})})})});m$.displayName=p$;var h$="TabsContent",g$=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...s}=e,a=CE(h$,n),l=v$(a.baseId,r),u=b$(a.baseId,r),d=r===a.value,f=c.useRef(d);return c.useEffect(()=>{const m=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(m)},[]),E.jsx(ua,{present:o||d,children:({present:m})=>E.jsx(Mt.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!m,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:m&&i})})});g$.displayName=h$;function v$(e,t){return`${e}-trigger-${t}`}function b$(e,t){return`${e}-content-${t}`}var oge=f$,ige=m$,sge=g$;ca(["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:[_n("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:[_n("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"}});c.createContext("default");oge.displayName;ige.displayName;sge.displayName;var age="Arrow",y$=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return E.jsx(Mt.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});y$.displayName=age;var lge=y$,x$="Popper",[w$,E$]=Po(x$),[qPe,C$]=w$(x$),k$="PopperAnchor",R$=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=C$(k$,n),s=c.useRef(null),a=sn(t,s),l=c.useRef(null);return c.useEffect(()=>{const u=l.current;l.current=r?.current||s.current,u!==l.current&&i.onAnchorChange(l.current)}),r?null:E.jsx(Mt.div,{...o,ref:a})});R$.displayName=k$;var kE="PopperContent",[cge,uge]=w$(kE),S$=c.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:v,...g}=e,h=C$(kE,n),[b,y]=c.useState(null),x=sn(t,te=>y(te)),[w,C]=c.useState(null),R=Qm(w),k=R?.width??0,S=R?.height??0,P=r+(i!=="center"?"-"+i:""),L=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},_=Array.isArray(u)?u:[u],O=_.length>0,B={padding:L,boundary:_.filter(fge),altBoundary:O},{refs:I,floatingStyles:V,placement:F,isPositioned:D,middlewareData:T}=$V({strategy:"fixed",placement:P,whileElementsMounted:(...te)=>Py(...te,{animationFrame:p==="always"}),elements:{reference:h.anchor},middleware:[zV({mainAxis:o+S,alignmentAxis:s}),l&&BV({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?HV():void 0,...B}),l&&GV({...B}),WV({...B,apply:({elements:te,rects:le,availableWidth:z,availableHeight:re})=>{const{width:oe,height:M}=le.reference,N=te.floating.style;N.setProperty("--radix-popper-available-width",`${z}px`),N.setProperty("--radix-popper-available-height",`${re}px`),N.setProperty("--radix-popper-anchor-width",`${oe}px`),N.setProperty("--radix-popper-anchor-height",`${M}px`)}}),w&&pfe({element:w,padding:a}),pge({arrowWidth:k,arrowHeight:S}),m&&UV({strategy:"referenceHidden",...B})]}),[q,A]=I$(F),ee=Ks(v);Ui(()=>{D&&ee?.()},[D,ee]);const ie=T.arrow?.x,Y=T.arrow?.y,Q=T.arrow?.centerOffset!==0,[X,J]=c.useState();return Ui(()=>{b&&J(window.getComputedStyle(b).zIndex)},[b]),E.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:D?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[T.transformOrigin?.x,T.transformOrigin?.y].join(" "),...T.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(cge,{scope:n,placedSide:q,onArrowChange:C,arrowX:ie,arrowY:Y,shouldHideArrow:Q,children:E.jsx(Mt.div,{"data-side":q,"data-align":A,...g,ref:x,style:{...g.style,animation:D?void 0:"none"}})})})});S$.displayName=kE;var N$="PopperArrow",dge={top:"bottom",right:"left",bottom:"top",left:"right"},O$=c.forwardRef(function(e,t){const{__scopePopper:n,...r}=e,o=uge(N$,n),i=dge[o.placedSide];return E.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:E.jsx(lge,{...r,ref:t,style:{...r.style,display:"block"}})})});O$.displayName=N$;function fge(e){return e!==null}var pge=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,s=i?0:e.arrowWidth,a=i?0:e.arrowHeight,[l,u]=I$(n),d={start:"0%",center:"50%",end:"100%"}[u],f=(o.arrow?.x??0)+s/2,m=(o.arrow?.y??0)+a/2;let p="",v="";return l==="bottom"?(p=i?d:`${f}px`,v=`${-a}px`):l==="top"?(p=i?d:`${f}px`,v=`${r.floating.height+a}px`):l==="right"?(p=`${-a}px`,v=i?d:`${m}px`):l==="left"&&(p=`${r.floating.width+a}px`,v=i?d:`${m}px`),{data:{x:p,y:v}}}});function I$(e){const[t,n="center"]=e.split("-");return[t,n]}var mge=R$,hge=S$,gge=O$,vge=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"}),bge="VisuallyHidden",A$=c.forwardRef((e,t)=>E.jsx(Mt.span,{...e,ref:t,style:{...vge,...e.style}}));A$.displayName=bge;var yge=A$,[gh]=Po("Tooltip",[E$]),RE=E$(),xge="TooltipProvider",pN="tooltip.open",[KPe,M$]=gh(xge),P$="Tooltip",[YPe,vh]=gh(P$),jy="TooltipTrigger",wge=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=vh(jy,n),i=M$(jy,n),s=RE(n),a=c.useRef(null),l=sn(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]),E.jsx(mge,{asChild:!0,...s,children:E.jsx(Mt.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:Rt(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:Rt(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:Rt(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Rt(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Rt(e.onBlur,o.onClose),onClick:Rt(e.onClick,o.onClose)})})});wge.displayName=jy;var Ege="TooltipPortal",[XPe,Cge]=gh(Ege,{forceMount:void 0}),pl="TooltipContent",_$=c.forwardRef((e,t)=>{const n=Cge(pl,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=vh(pl,e.__scopeTooltip);return E.jsx(ua,{present:r||s.open,children:s.disableHoverableContent?E.jsx(T$,{side:o,...i,ref:t}):E.jsx(kge,{side:o,...i,ref:t})})}),kge=c.forwardRef((e,t)=>{const n=vh(pl,e.__scopeTooltip),r=M$(pl,e.__scopeTooltip),o=c.useRef(null),i=sn(t,o),[s,a]=c.useState(null),{trigger:l,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,m=c.useCallback(()=>{a(null),f(!1)},[f]),p=c.useCallback((v,g)=>{const h=v.currentTarget,b={x:v.clientX,y:v.clientY},y=Ige(b,h.getBoundingClientRect()),x=Age(b,y),w=Mge(g.getBoundingClientRect()),C=_ge([...x,...w]);a(C),f(!0)},[f]);return c.useEffect(()=>()=>m(),[m]),c.useEffect(()=>{if(l&&d){const v=h=>p(h,d),g=h=>p(h,l);return l.addEventListener("pointerleave",v),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",g)}}},[l,d,p,m]),c.useEffect(()=>{if(s){const v=g=>{const h=g.target,b={x:g.clientX,y:g.clientY},y=l?.contains(h)||d?.contains(h),x=!Pge(b,s);y?m():x&&(m(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,d,s,u,m]),E.jsx(T$,{...e,ref:i})}),[Rge,Sge]=gh(P$,{isInside:!1}),Nge=Gle("TooltipContent"),T$=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=vh(pl,n),u=RE(n),{onClose:d}=l;return c.useEffect(()=>(document.addEventListener(pN,d),()=>document.removeEventListener(pN,d)),[d]),c.useEffect(()=>{if(l.trigger){const f=m=>{m.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),E.jsx(gE,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:E.jsxs(hge,{"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:[E.jsx(Nge,{children:r}),E.jsx(Rge,{scope:n,isInside:!0,children:E.jsx(yge,{id:l.contentId,role:"tooltip",children:o||r})})]})})});_$.displayName=pl;var D$="TooltipArrow",Oge=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=RE(n);return Sge(D$,n).isInside?null:E.jsx(gge,{...o,...r,ref:t})});Oge.displayName=D$;function Ige(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Age(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 Mge(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 Pge(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],l=t[s],u=a.x,d=a.y,f=l.x,m=l.y;d>r!=m>r&&n<(f-u)*(r-d)/(m-d)+u&&(o=!o)}return o}function _ge(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),Tge(t)}function Tge(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 i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.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 i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.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 Dge=_$;Dge.displayName;ca(["text-primary-text cursor-pointer rounded-[0.75rem] bg-transparent","hover:bg-tertiary-bg",_n("body-xs-medium")].join(" "),{variants:{size:{sm:"h-7 min-w-7 px-2",default:"h-8 min-w-8 px-3",lg:"h-9 min-w-9 px-3.5"},active:{true:`bg-primary-inverse-bg text-primary-inverse-text
|
|
325
|
+
hover:bg-primary-inverse-bg`,false:""}},compoundVariants:[{size:"sm",active:!0,className:"size-7 px-0"},{size:"default",active:!0,className:"size-8 px-0"},{size:"lg",active:!0,className:"size-9 px-0"}],defaultVariants:{size:"default",active:!1}});_n("body-xl-medium");function L$(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=L$(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Lge(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=L$(e))&&(r&&(r+=" "),r+=t);return r}const jge=(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},Vge=(e,t)=>({classGroupId:e,validator:t}),j$=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Cp="-",mN=[],Fge="arbitrary..",$ge=e=>{const t=Bge(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return zge(o);const i=o.split(Cp),s=i[0]===""&&i.length>1?1:0;return V$(i,s,t)},getConflictingClassGroupIds:(o,i)=>{if(i){const s=r[o],a=n[o];return s?a?jge(a,s):s:a||mN}return n[o]||mN}}},V$=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const l=V$(e,t+1,o);if(l)return l}const i=n.validators;if(i===null)return;const s=t===0?e.join(Cp):e.slice(t).join(Cp),a=i.length;for(let l=0;l<a;l++){const u=i[l];if(u.validator(s))return u.classGroupId}},zge=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?Fge+r:void 0})(),Bge=e=>{const{theme:t,classGroups:n}=e;return Hge(n,t)},Hge=(e,t)=>{const n=j$();for(const r in e){const o=e[r];SE(o,n,r,t)}return n},SE=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Gge(s,t,n,r)}},Gge=(e,t,n,r)=>{if(typeof e=="string"){Wge(e,t,n);return}if(typeof e=="function"){Uge(e,t,n,r);return}qge(e,t,n,r)},Wge=(e,t,n)=>{const r=e===""?t:F$(t,e);r.classGroupId=n},Uge=(e,t,n,r)=>{if(Kge(e)){SE(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Vge(n,e))},qge=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];SE(l,F$(t,a),n,r)}},F$=(e,t)=>{let n=e;const r=t.split(Cp),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=j$(),n.nextPart.set(s,a)),n=a}return n},Kge=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Yge=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},Vy="!",hN=":",Xge=[],gN=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Zge=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,u;const d=o.length;for(let g=0;g<d;g++){const h=o[g];if(s===0&&a===0){if(h===hN){i.push(o.slice(l,g)),l=g+1;continue}if(h==="/"){u=g;continue}}h==="["?s++:h==="]"?s--:h==="("?a++:h===")"&&a--}const f=i.length===0?o:o.slice(l);let m=f,p=!1;f.endsWith(Vy)?(m=f.slice(0,-1),p=!0):f.startsWith(Vy)&&(m=f.slice(1),p=!0);const v=u&&u>l?u-l:void 0;return gN(i,p,m,v)};if(t){const o=t+hN,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):gN(Xge,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Jge=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},Qge=e=>({cache:Yge(e.cacheSize),parseClassName:Zge(e),sortModifiers:Jge(e),...$ge(e)}),eve=/\s+/,tve=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(eve);let l="";for(let u=a.length-1;u>=0;u-=1){const d=a[u],{isExternal:f,modifiers:m,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:g}=n(d);if(f){l=d+(l.length>0?" "+l:l);continue}let h=!!g,b=r(h?v.substring(0,g):v);if(!b){if(!h){l=d+(l.length>0?" "+l:l);continue}if(b=r(v),!b){l=d+(l.length>0?" "+l:l);continue}h=!1}const y=m.length===0?"":m.length===1?m[0]:i(m).join(":"),x=p?y+Vy:y,w=x+b;if(s.indexOf(w)>-1)continue;s.push(w);const C=o(b,h);for(let R=0;R<C.length;++R){const k=C[R];s.push(x+k)}l=d+(l.length>0?" "+l:l)}return l},nve=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=$$(n))&&(o&&(o+=" "),o+=r);return o},$$=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=$$(e[r]))&&(n&&(n+=" "),n+=t);return n},vN=(e,...t)=>{let n,r,o,i;const s=l=>{const u=t.reduce((d,f)=>f(d),e());return n=Qge(u),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const u=r(l);if(u)return u;const d=tve(l,n);return o(l,d),d};return i=s,(...l)=>i(nve(...l))},rve=[],hn=e=>{const t=n=>n[e]||rve;return t.isThemeGetter=!0,t},z$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,B$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ove=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ive=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sve=/\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$/,ave=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,lve=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cve=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gi=e=>ove.test(e),nt=e=>!!e&&!Number.isNaN(Number(e)),vi=e=>!!e&&Number.isInteger(Number(e)),_v=e=>e.endsWith("%")&&nt(e.slice(0,-1)),Go=e=>ive.test(e),H$=()=>!0,uve=e=>sve.test(e)&&!ave.test(e),NE=()=>!1,dve=e=>lve.test(e),fve=e=>cve.test(e),pve=e=>!Ae(e)&&!Le(e),mve=e=>ms(e,U$,NE),Ae=e=>z$.test(e),Ms=e=>ms(e,q$,uve),bN=e=>ms(e,Eve,nt),hve=e=>ms(e,Y$,H$),gve=e=>ms(e,K$,NE),yN=e=>ms(e,G$,NE),vve=e=>ms(e,W$,fve),pd=e=>ms(e,X$,dve),Le=e=>B$.test(e),Tl=e=>fa(e,q$),bve=e=>fa(e,K$),xN=e=>fa(e,G$),yve=e=>fa(e,U$),xve=e=>fa(e,W$),md=e=>fa(e,X$,!0),wve=e=>fa(e,Y$,!0),ms=(e,t,n)=>{const r=z$.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},fa=(e,t,n=!1)=>{const r=B$.exec(e);return r?r[1]?t(r[1]):n:!1},G$=e=>e==="position"||e==="percentage",W$=e=>e==="image"||e==="url",U$=e=>e==="length"||e==="size"||e==="bg-size",q$=e=>e==="length",Eve=e=>e==="number",K$=e=>e==="family-name",Y$=e=>e==="number"||e==="weight",X$=e=>e==="shadow",wN=()=>{const e=hn("color"),t=hn("font"),n=hn("text"),r=hn("font-weight"),o=hn("tracking"),i=hn("leading"),s=hn("breakpoint"),a=hn("container"),l=hn("spacing"),u=hn("radius"),d=hn("shadow"),f=hn("inset-shadow"),m=hn("text-shadow"),p=hn("drop-shadow"),v=hn("blur"),g=hn("perspective"),h=hn("aspect"),b=hn("ease"),y=hn("animate"),x=()=>["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"],C=()=>[...w(),Le,Ae],R=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],S=()=>[Le,Ae,l],P=()=>[gi,"full","auto",...S()],L=()=>[vi,"none","subgrid",Le,Ae],_=()=>["auto",{span:["full",vi,Le,Ae]},vi,Le,Ae],O=()=>[vi,"auto",Le,Ae],B=()=>["auto","min","max","fr",Le,Ae],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...S()],D=()=>[gi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],T=()=>[gi,"screen","full","dvw","lvw","svw","min","max","fit",...S()],q=()=>[gi,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],A=()=>[e,Le,Ae],ee=()=>[...w(),xN,yN,{position:[Le,Ae]}],ie=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Y=()=>["auto","cover","contain",yve,mve,{size:[Le,Ae]}],Q=()=>[_v,Tl,Ms],X=()=>["","none","full",u,Le,Ae],J=()=>["",nt,Tl,Ms],te=()=>["solid","dashed","dotted","double"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[nt,_v,xN,yN],re=()=>["","none",v,Le,Ae],oe=()=>["none",nt,Le,Ae],M=()=>["none",nt,Le,Ae],N=()=>[nt,Le,Ae],j=()=>[gi,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Go],breakpoint:[Go],color:[H$],container:[Go],"drop-shadow":[Go],ease:["in","out","in-out"],font:[pve],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Go],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Go],shadow:[Go],spacing:["px",nt],text:[Go],"text-shadow":[Go],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",gi,Ae,Le,h]}],container:["container"],columns:[{columns:[nt,Ae,Le,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:C()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[vi,"auto",Le,Ae]}],basis:[{basis:[gi,"full","auto",a,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[nt,gi,"auto","initial","none",Ae]}],grow:[{grow:["",nt,Le,Ae]}],shrink:[{shrink:["",nt,Le,Ae]}],order:[{order:[vi,"first","last","none",Le,Ae]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],"inline-size":[{inline:["auto",...T()]}],"min-inline-size":[{"min-inline":["auto",...T()]}],"max-inline-size":[{"max-inline":["none",...T()]}],"block-size":[{block:["auto",...q()]}],"min-block-size":[{"min-block":["auto",...q()]}],"max-block-size":[{"max-block":["none",...q()]}],w:[{w:[a,"screen",...D()]}],"min-w":[{"min-w":[a,"screen","none",...D()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",n,Tl,Ms]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,wve,hve]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",_v,Ae]}],"font-family":[{font:[bve,gve,t]}],"font-features":[{"font-features":[Ae]}],"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,Le,Ae]}],"line-clamp":[{"line-clamp":[nt,"none",Le,bN]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",Le,Ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Le,Ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[nt,"from-font","auto",Le,Ms]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[nt,"auto",Le,Ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Le,Ae]}],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",Le,Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:Y()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},vi,Le,Ae],radial:["",Le,Ae],conic:[vi,Le,Ae]},xve,vve]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[nt,Le,Ae]}],"outline-w":[{outline:["",nt,Tl,Ms]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",d,md,pd]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",f,md,pd]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[nt,Ms]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",m,md,pd]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[nt,Le,Ae]}],"mix-blend":[{"mix-blend":[...le(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":le()}],"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":[nt]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[Le,Ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"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":[nt]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:Y()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Le,Ae]}],filter:[{filter:["","none",Le,Ae]}],blur:[{blur:re()}],brightness:[{brightness:[nt,Le,Ae]}],contrast:[{contrast:[nt,Le,Ae]}],"drop-shadow":[{"drop-shadow":["","none",p,md,pd]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",nt,Le,Ae]}],"hue-rotate":[{"hue-rotate":[nt,Le,Ae]}],invert:[{invert:["",nt,Le,Ae]}],saturate:[{saturate:[nt,Le,Ae]}],sepia:[{sepia:["",nt,Le,Ae]}],"backdrop-filter":[{"backdrop-filter":["","none",Le,Ae]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[nt,Le,Ae]}],"backdrop-contrast":[{"backdrop-contrast":[nt,Le,Ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",nt,Le,Ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[nt,Le,Ae]}],"backdrop-invert":[{"backdrop-invert":["",nt,Le,Ae]}],"backdrop-opacity":[{"backdrop-opacity":[nt,Le,Ae]}],"backdrop-saturate":[{"backdrop-saturate":[nt,Le,Ae]}],"backdrop-sepia":[{"backdrop-sepia":["",nt,Le,Ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Le,Ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[nt,"initial",Le,Ae]}],ease:[{ease:["linear","initial",b,Le,Ae]}],delay:[{delay:[nt,Le,Ae]}],animate:[{animate:["none",y,Le,Ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,Le,Ae]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:M()}],"scale-x":[{"scale-x":M()}],"scale-y":[{"scale-y":M()}],"scale-z":[{"scale-z":M()}],"scale-3d":["scale-3d"],skew:[{skew:N()}],"skew-x":[{"skew-x":N()}],"skew-y":[{"skew-y":N()}],transform:[{transform:[Le,Ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:j()}],"translate-x":[{"translate-x":j()}],"translate-y":[{"translate-y":j()}],"translate-z":[{"translate-z":j()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Le,Ae]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",Le,Ae]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[nt,Tl,Ms,bN]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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"]}},Cve=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:o={},override:i={}})=>(zl(e,"cacheSize",t),zl(e,"prefix",n),zl(e,"experimentalParseClassName",r),hd(e.theme,i.theme),hd(e.classGroups,i.classGroups),hd(e.conflictingClassGroups,i.conflictingClassGroups),hd(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),zl(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),gd(e.theme,o.theme),gd(e.classGroups,o.classGroups),gd(e.conflictingClassGroups,o.conflictingClassGroups),gd(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),Z$(e,o,"orderSensitiveModifiers"),e),zl=(e,t,n)=>{n!==void 0&&(e[t]=n)},hd=(e,t)=>{if(t)for(const n in t)zl(e,n,t[n])},gd=(e,t)=>{if(t)for(const n in t)Z$(e,t,n)},Z$=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},kve=(e,...t)=>typeof e=="function"?vN(wN,e,...t):vN(()=>Cve(wN(),e),...t);kve({extend:{theme:{text:["h1","h2","h3"]}}});const EN=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,CN=Lge,pa=(e,t)=>n=>{var r;if(t?.variants==null)return CN(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const d=n?.[u],f=i?.[u];if(d===null)return null;const m=EN(d)||EN(f);return o[u][m]}),a=n&&Object.entries(n).reduce((u,d)=>{let[f,m]=d;return m===void 0||(u[f]=m),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:m,...p}=d;return Object.entries(p).every(v=>{let[g,h]=v;return Array.isArray(h)?h.includes({...i,...a}[g]):{...i,...a}[g]===h})?[...u,f,m]:u},[]);return CN(e,s,l,n?.class,n?.className)},Rve=pa("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"}}),Tn=(e="body-md-regular")=>Rve({variant:e});pa("tracking-normal whitespace-nowrap",{variants:{kind:{status:Tn("body-xs-medium"),priority:Tn("body-sm-regular")}},defaultVariants:{kind:"status"}});function kN(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function OE(...e){return t=>{let n=!1;const r=e.map(o=>{const i=kN(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():kN(e[o],null)}}}}function an(...e){return c.useCallback(OE(...e),e)}var Sve=Symbol.for("react.lazy"),kp=c[" use ".trim().toString()];function Nve(e){return typeof e=="object"&&e!==null&&"then"in e}function J$(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Sve&&"_payload"in e&&Nve(e._payload)}function Ove(e){const t=Ive(e),n=c.forwardRef((r,o)=>{let{children:i,...s}=r;J$(i)&&typeof kp=="function"&&(i=kp(i._payload));const a=c.Children.toArray(i),l=a.find(Mve);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 E.jsx(t,{...s,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return E.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Ive(e){const t=c.forwardRef((n,r)=>{let{children:o,...i}=n;if(J$(o)&&typeof kp=="function"&&(o=kp(o._payload)),c.isValidElement(o)){const s=_ve(o),a=Pve(i,o.props);return o.type!==c.Fragment&&(a.ref=r?OE(r,s):s),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ave=Symbol("radix.slottable");function Mve(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ave}function Pve(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const a=i(...s);return o(...s),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function _ve(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)}pa(["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
|
|
326
|
+
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
|
|
327
|
+
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
|
|
328
|
+
aria-expanded:text-primary-text`},size:{lg:`${Tn("body-lg-medium")} w-fit gap-2 px-4.5 py-3
|
|
329
|
+
[&_svg]:size-[18px]`,md:`${Tn("body-md-medium")} w-fit gap-2 px-4.5 py-2
|
|
330
|
+
[&_svg]:size-4`,sm:`${Tn("body-sm-medium")} w-fit gap-2 px-3 py-2
|
|
331
|
+
[&_svg]:size-4`,xs:`${Tn("body-xs-medium")} w-fit gap-1 px-3 py-2
|
|
332
|
+
[&_svg]:size-[14px]`,default:`${Tn("body-sm-medium")} size-9 [&_svg]:size-4`}},compoundVariants:[{variant:"link",size:"lg",className:"[&_svg]:size-5"}],defaultVariants:{variant:"primary",size:"md"}});pa(`${Tn("body-sm-regular")} text-muted-foreground
|
|
333
|
+
group-data-[disabled=true]/card:text-disabled-text`);function Tve(e,t){const n=c.createContext(t),r=i=>{const{children:s,...a}=i,l=c.useMemo(()=>a,Object.values(a));return E.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(i){const s=c.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function Do(e,t=[]){let n=[];function r(i,s){const a=c.createContext(s),l=n.length;n=[...n,s];const u=f=>{const{scope:m,children:p,...v}=f,g=m?.[e]?.[l]||a,h=c.useMemo(()=>v,Object.values(v));return E.jsx(g.Provider,{value:h,children:p})};u.displayName=i+"Provider";function d(f,m){const p=m?.[e]?.[l]||a,v=c.useContext(p);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(s=>c.createContext(s));return function(s){const a=s?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:a}}),[s,a])}};return o.scopeName=e,[r,Dve(o,...t)]}function Dve(...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(o){const i=r.reduce((s,{useScope:a,scopeName:l})=>{const u=a(o)[`__scope${l}`];return{...s,...u}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function St(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var Yi=globalThis?.document?c.useLayoutEffect:()=>{},Lve=c[" useInsertionEffect ".trim().toString()]||Yi;function Xc({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=jve({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=Vve(d)?d(e):d;f!==e&&s.current?.(f)}else i(d)},[a,e,i,s]);return[l,u]}function jve({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),i=c.useRef(t);return Lve(()=>{i.current=t},[t]),c.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function Vve(e){return typeof e=="function"}function IE(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 bh(e){const[t,n]=c.useState(void 0);return Yi(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,a=u.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Fve(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var ma=e=>{const{present:t,children:n}=e,r=$ve(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),i=an(r.ref,zve(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:i}):null};ma.displayName="Presence";function $ve(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),i=c.useRef("none"),s=e?"mounted":"unmounted",[a,l]=Fve(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=vd(r.current);i.current=a==="mounted"?u:"none"},[a]),Yi(()=>{const u=r.current,d=o.current;if(d!==e){const f=i.current,m=vd(u);e?l("MOUNT"):m==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&f!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Yi(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=p=>{const v=vd(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&v&&(l("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=p=>{p.target===t&&(i.current=vd(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),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 vd(e){return e?.animationName||"none"}function zve(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 Rp(e){const t=Bve(e),n=c.forwardRef((r,o)=>{const{children:i,...s}=r,a=c.Children.toArray(i),l=a.find(Gve);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 E.jsx(t,{...s,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return E.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Bve(e){const t=c.forwardRef((n,r)=>{const{children:o,...i}=n;if(c.isValidElement(o)){const s=Uve(o),a=Wve(i,o.props);return o.type!==c.Fragment&&(a.ref=r?OE(r,s):s),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Q$=Symbol("radix.slottable");function Hve(e){const t=({children:n})=>E.jsx(E.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Q$,t}function Gve(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Q$}function Wve(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const a=i(...s);return o(...s),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Uve(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 qve=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pt=qve.reduce((e,t)=>{const n=Rp(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Kve(e,t){e&&dt.flushSync(()=>e.dispatchEvent(t))}var yh="Checkbox",[Yve]=Do(yh),[Xve,AE]=Yve(yh);function Zve(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:i,form:s,name:a,onCheckedChange:l,required:u,value:d="on",internal_do_not_use_render:f}=e,[m,p]=Xc({prop:n,defaultProp:o??!1,onChange:l,caller:yh}),[v,g]=c.useState(null),[h,b]=c.useState(null),y=c.useRef(!1),x=v?!!s||!!v.closest("form"):!0,w={checked:m,disabled:i,setChecked:p,control:v,setControl:g,name:a,form:s,value:d,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:Vi(o)?!1:o,isFormControl:x,bubbleInput:h,setBubbleInput:b};return E.jsx(Xve,{scope:t,...w,children:Qve(f)?f(w):r})}var ez="CheckboxTrigger",tz=c.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:i,value:s,disabled:a,checked:l,required:u,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:m,isFormControl:p,bubbleInput:v}=AE(ez,e),g=an(o,d),h=c.useRef(l);return c.useEffect(()=>{const b=i?.form;if(b){const y=()=>f(h.current);return b.addEventListener("reset",y),()=>b.removeEventListener("reset",y)}},[i,f]),E.jsx(Pt.button,{type:"button",role:"checkbox","aria-checked":Vi(l)?"mixed":l,"aria-required":u,"data-state":sz(l),"data-disabled":a?"":void 0,disabled:a,value:s,...r,ref:g,onKeyDown:St(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:St(n,b=>{f(y=>Vi(y)?!0:!y),v&&p&&(m.current=b.isPropagationStopped(),m.current||b.stopPropagation())})})});tz.displayName=ez;var nz=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:s,disabled:a,value:l,onCheckedChange:u,form:d,...f}=e;return E.jsx(Zve,{__scopeCheckbox:n,checked:o,defaultChecked:i,disabled:a,required:s,onCheckedChange:u,name:r,form:d,value:l,internal_do_not_use_render:({isFormControl:m})=>E.jsxs(E.Fragment,{children:[E.jsx(tz,{...f,ref:t,__scopeCheckbox:n}),m&&E.jsx(iz,{__scopeCheckbox:n})]})})});nz.displayName=yh;var rz="CheckboxIndicator",Jve=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=AE(rz,n);return E.jsx(ma,{present:r||Vi(i.checked)||i.checked===!0,children:E.jsx(Pt.span,{"data-state":sz(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Jve.displayName=rz;var oz="CheckboxBubbleInput",iz=c.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:i,defaultChecked:s,required:a,disabled:l,name:u,value:d,form:f,bubbleInput:m,setBubbleInput:p}=AE(oz,e),v=an(n,p),g=IE(i),h=bh(r);c.useEffect(()=>{const y=m;if(!y)return;const x=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(x,"checked").set,C=!o.current;if(g!==i&&w){const R=new Event("click",{bubbles:C});y.indeterminate=Vi(i),w.call(y,Vi(i)?!1:i),y.dispatchEvent(R)}},[m,g,i,o]);const b=c.useRef(Vi(i)?!1:i);return E.jsx(Pt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??b.current,required:a,disabled:l,name:u,value:d,form:f,...t,tabIndex:-1,ref:v,style:{...t.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});iz.displayName=oz;function Qve(e){return typeof e=="function"}function Vi(e){return e==="indeterminate"}function sz(e){return Vi(e)?"indeterminate":e?"checked":"unchecked"}const az=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),ebe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),tbe=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),RN=e=>{const t=tbe(e);return t.charAt(0).toUpperCase()+t.slice(1)};var nbe={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 rbe=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},obe=ae.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>ae.createElement("svg",{ref:l,...nbe,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:az("lucide",o),...!i&&!rbe(a)&&{"aria-hidden":"true"},...a},[...s.map(([u,d])=>ae.createElement(u,d)),...Array.isArray(i)?i:[i]])),wt=(e,t)=>{const n=ae.forwardRef(({className:r,...o},i)=>ae.createElement(obe,{ref:i,iconNode:t,className:az(`lucide-${ebe(RN(e))}`,`lucide-${e}`,r),...o}));return n.displayName=RN(e),n},ibe=[["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"}]];wt("bell-ring",ibe);const sbe=[["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"}]];wt("book-user",sbe);const abe=[["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"}]];wt("briefcase-business",abe);const lbe=[["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"}]];wt("building-2",lbe);const cbe=[["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"}]];wt("calendar-1",cbe);const ube=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]];wt("chart-line",ube);const dbe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]];wt("chevron-down",dbe);const fbe=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]];wt("chevron-left",fbe);const pbe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]];wt("chevron-right",pbe);const mbe=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]];wt("chevrons-up-down",mbe);const hbe=[["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"}]];wt("circle-question-mark",hbe);const gbe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]];wt("clock-3",gbe);const vbe=[["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"}]];wt("ellipsis",vbe);const bbe=[["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"}]];wt("folder-open",bbe);const ybe=[["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"}]];wt("funnel",ybe);const xbe=[["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"}]];wt("layout-grid",xbe);const wbe=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]];wt("list-filter",wbe);const Ebe=[["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"}]];wt("list-todo",Ebe);const Cbe=[["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"}]];wt("message-circle",Cbe);const kbe=[["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"}]];wt("palette",kbe);const Rbe=[["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"}]];wt("phone",Rbe);const Sbe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]];wt("plus",Sbe);const Nbe=[["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"}]];wt("rotate-ccw",Nbe);const Obe=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]];wt("search",Obe);const Ibe=[["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"}]];wt("settings",Ibe);const Abe=[["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"}]];wt("tag",Abe);const Mbe=[["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"}]];wt("user-cog",Mbe);const Pbe=[["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"}]];wt("users",Pbe);const _be=[["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"}]];wt("wrench",_be);const Tbe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]];wt("x",Tbe);nz.displayName;const SN={};function Co(e,t){const n=c.useRef(SN);return n.current===SN&&(n.current=e(t)),n}const Tv=c[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Dbe=Tv&&Tv!==c.useLayoutEffect?Tv:e=>e();function Qt(e){const t=Co(Lbe).current;return t.next=e,Dbe(t.effect),t.trampoline}function Lbe(){const e={next:void 0,callback:jbe,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function jbe(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const Vbe=()=>{},lt=typeof document<"u"?c.useLayoutEffect:Vbe,ME=c.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(ME.displayName="CompositeListContext");function Fbe(){return c.useContext(ME)}function lz(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=Qt(o),s=c.useRef(0),a=Co(zbe).current,l=Co($be).current,[u,d]=c.useState(0),f=c.useRef(u),m=Qt((b,y)=>{l.set(b,y??null),f.current+=1,d(f.current)}),p=Qt(b=>{l.delete(b),f.current+=1,d(f.current)}),v=c.useMemo(()=>{const b=new Map;return Array.from(l.keys()).filter(y=>y.isConnected).sort(Bbe).forEach((y,x)=>{const w=l.get(y)??{};b.set(y,{...w,index:x})}),b},[l,u]);lt(()=>{if(typeof MutationObserver!="function"||v.size===0)return;const b=new MutationObserver(y=>{const x=new Set,w=C=>x.has(C)?x.delete(C):x.add(C);y.forEach(C=>{C.removedNodes.forEach(w),C.addedNodes.forEach(w)}),x.size===0&&(f.current+=1,d(f.current))});return v.forEach((y,x)=>{x.parentElement&&b.observe(x.parentElement,{childList:!0})}),()=>{b.disconnect()}},[v]),lt(()=>{f.current===u&&(n.current.length!==v.size&&(n.current.length=v.size),r&&r.current.length!==v.size&&(r.current.length=v.size),s.current=v.size),i(v)},[i,v,n,r,u]),lt(()=>()=>{n.current=[]},[n]),lt(()=>()=>{r&&(r.current=[])},[r]);const g=Qt(b=>(a.add(b),()=>{a.delete(b)}));lt(()=>{a.forEach(b=>b(v))},[a,v]);const h=c.useMemo(()=>({register:m,unregister:p,subscribeMapChange:g,elementsRef:n,labelsRef:r,nextIndexRef:s}),[m,p,g,n,r,s]);return E.jsx(ME.Provider,{value:h,children:t})}function $be(){return new Map}function zbe(){return new Set}function Bbe(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 cz=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(cz.displayName="DirectionContext");function uz(){return c.useContext(cz)?.direction??"ltr"}function Qr(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 Sp(e,t,n,r){const o=Co(dz).current;return Gbe(o,e,t,n,r)&&fz(o,[e,t,n,r]),o.callback}function Hbe(e){const t=Co(dz).current;return Wbe(t,e)&&fz(t,e),t.callback}function dz(){return{callback:null,cleanup:null,refs:[]}}function Gbe(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function Wbe(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function fz(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 i=t[o];if(i!=null)switch(typeof i){case"function":{const s=i(n);typeof s=="function"&&(r[o]=s);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=r[o];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}}}}}}}const Ube=parseInt(c.version,10);function PE(e){return Ube>=e}function NN(e){if(!c.isValidElement(e))return null;const t=e,n=t.props;return(PE(19)?n?.ref:t.ref)??null}function Fy(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function qbe(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function Kbe(e,t){return typeof e=="function"?e(t):e}function Ybe(e,t){return typeof e=="function"?e(t):e}const rc={};function pz(e,t,n,r,o){let i={...$y(e,rc)};return t&&(i=cf(i,t)),n&&(i=cf(i,n)),r&&(i=cf(i,r)),i}function Xbe(e){if(e.length===0)return rc;if(e.length===1)return $y(e[0],rc);let t={...$y(e[0],rc)};for(let n=1;n<e.length;n+=1)t=cf(t,e[n]);return t}function cf(e,t){return mz(t)?t(e):Zbe(e,t)}function Zbe(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Fy(e.style,r);break}case"className":{e[n]=hz(e.className,r);break}default:Jbe(n,r)?e[n]=Qbe(e[n],r):e[n]=r}}return e}function Jbe(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 mz(e){return typeof e=="function"}function $y(e,t){return mz(e)?e(t):e??rc}function Qbe(e,t){return t?e?n=>{if(eye(n)){const o=n;zy(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function zy(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function hz(e,t){return t?e?t+" "+e:t:e}function eye(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function tr(){}const pr=Object.freeze({}),tye={style:{transition:"none"}},nye="data-base-ui-click-trigger",rye={fallbackAxisSide:"none"},oye={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Kn(e,t,n={}){const r=t.render,o=iye(t,n);if(n.enabled===!1)return null;const i=n.state??pr;return aye(e,r,o,i)}function iye(e,t={}){const{className:n,style:r,render:o}=e,{state:i=pr,ref:s,props:a,stateAttributesMapping:l,enabled:u=!0}=t,d=u?Kbe(n,i):void 0,f=u?Ybe(r,i):void 0,m=u?qbe(i,l):pr,p=u?Fy(m,Array.isArray(a)?Xbe(a):a)??pr:pr;return typeof document<"u"&&(u?Array.isArray(s)?p.ref=Hbe([p.ref,NN(o),...s]):p.ref=Sp(p.ref,NN(o),s):Sp(null,null)),u?(d!==void 0&&(p.className=hz(p.className,d)),f!==void 0&&(p.style=Fy(p.style,f)),p):pr}const sye=Symbol.for("react.lazy");function aye(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=pz(n,t.props);o.ref=n.ref;let i=t;if(i?.$$typeof===sye&&(i=c.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!c.isValidElement(i))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(`
|
|
334
|
+
`));return c.cloneElement(i,o)}if(e&&typeof e=="string")return lye(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Qr(8))}function lye(e,t){return e==="button"?ae.createElement("button",{type:"button",...t,key:t.key}):e==="img"?ae.createElement("img",{alt:"",...t,key:t.key}):c.createElement(e,t)}const uf="none",cye="trigger-press",uye="trigger-hover",dye="outside-press",ON="clear-press",fye="chip-remove-press",bd="input-change",IN="input-clear",gz="focus-out",pye="escape-key",vz="list-navigation";function Kt(e,t,n,r){let o=!1,i=!1;const s=pr;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...s}}const By={...c};let AN=0;function mye(e,t="mui"){const[n,r]=c.useState(e),o=e||n;return c.useEffect(()=>{n==null&&(AN+=1,r(`${t}-${AN}`))},[n,t]),o}const MN=By.useId;function _E(e,t){if(MN!==void 0){const n=MN();return e??(t?`${t}-${n}`:n)}return mye(e,t)}function TE(e){return _E(e,"base-ui")}const hye=[];function bz(e){c.useEffect(e,hye)}const yd=null;let PN=globalThis.requestAnimationFrame;class gye{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"&&PN!==requestAnimationFrame&&(PN=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 xd=new gye;class io{static create(){return new io}static request(t){return xd.request(t)}static cancel(t){return xd.cancel(t)}currentId=yd;request(t){this.cancel(),this.currentId=xd.request(()=>{this.currentId=yd,t()})}cancel=()=>{this.currentId!==yd&&(xd.cancel(this.currentId),this.currentId=yd)};disposeEffect=()=>this.cancel}function DE(){const e=Co(io.create).current;return bz(e.disposeEffect),e}function Yo(e){return e==null?e:"current"in e?e.current:e}let Rc=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const vye={[Rc.startingStyle]:""},bye={[Rc.endingStyle]:""},yz={transitionStatus(e){return e==="starting"?vye:e==="ending"?bye:null}};function yye(e,t=!1,n=!0){const r=DE();return Qt((o,i=null)=>{r.cancel();function s(){dt.flushSync(o)}const a=Yo(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=Rc.startingStyle;if(!l.hasAttribute(f)){r.request(d);return}const m=new MutationObserver(()=>{l.hasAttribute(f)||(m.disconnect(),d())});m.observe(l,{attributes:!0,attributeFilter:[f]}),i?.addEventListener("abort",()=>m.disconnect(),{once:!0})},d=function(){Promise.all(l.getAnimations().map(f=>f.finished)).then(()=>{i?.aborted||s()}).catch(()=>{const f=l.getAnimations();if(n){if(i?.aborted)return;s()}else f.length>0&&f.some(m=>m.pending||m.playState!=="finished")&&d()})};if(t){u();return}r.request(d)}})}function xye(e,t=!1,n=!1){const[r,o]=c.useState(e&&t?"idle":void 0),[i,s]=c.useState(e);return e&&!i&&(s(!0),o("starting")),!e&&i&&r!=="ending"&&!n&&o("ending"),!e&&!i&&r==="ending"&&o(void 0),lt(()=>{if(!e&&i&&r!=="ending"&&n){const a=io.request(()=>{o("ending")});return()=>{io.cancel(a)}}},[e,i,r,n]),lt(()=>{if(!e||t)return;const a=io.request(()=>{o(void 0)});return()=>{io.cancel(a)}},[t,e]),lt(()=>{if(!e||!t)return;e&&i&&r!=="idle"&&o("starting");const a=io.request(()=>{o("idle")});return()=>{io.cancel(a)}},[t,e,i,o,r]),c.useMemo(()=>({mounted:i,setMounted:s,transitionStatus:r}),[i,r])}let xz=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function wz(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:s,unregister:a,subscribeMapChange:l,elementsRef:u,labelsRef:d,nextIndexRef:f}=Fbe(),m=c.useRef(-1),[p,v]=c.useState(i??(o===xz.GuessFromOrder?()=>{if(m.current===-1){const b=f.current;f.current+=1,m.current=b}return m.current}:-1)),g=c.useRef(null),h=c.useCallback(b=>{if(g.current=b,p!==-1&&b!==null&&(u.current[p]=b,d)){const y=t!==void 0;d.current[p]=y?t:r?.current?.textContent??b.textContent}},[p,u,d,t,r]);return lt(()=>{if(i!=null)return;const b=g.current;if(b)return s(b,n),()=>{a(b)}},[i,s,a,n]),lt(()=>{if(i==null)return l(b=>{const y=g.current?b.get(g.current)?.index:null;y!=null&&v(y)})},[i,l,v]),c.useMemo(()=>({ref:h,index:p}),[p,h])}function xh(){return typeof window<"u"}function hs(e){return LE(e)?(e.nodeName||"").toLowerCase():"#document"}function Vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lo(e){var t;return(t=(LE(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function LE(e){return xh()?e instanceof Node||e instanceof Vn(e).Node:!1}function xn(e){return xh()?e instanceof Element||e instanceof Vn(e).Element:!1}function An(e){return xh()?e instanceof HTMLElement||e instanceof Vn(e).HTMLElement:!1}function Hy(e){return!xh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vn(e).ShadowRoot}function gs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Vr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function wye(e){return/^(table|td|th)$/.test(hs(e))}function wh(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Eye=/transform|translate|scale|rotate|perspective|filter/,Cye=/paint|layout|strict|content/,Ps=e=>!!e&&e!=="none";let Dv;function jE(e){const t=xn(e)?Vr(e):e;return Ps(t.transform)||Ps(t.translate)||Ps(t.scale)||Ps(t.rotate)||Ps(t.perspective)||!VE()&&(Ps(t.backdropFilter)||Ps(t.filter))||Eye.test(t.willChange||"")||Cye.test(t.contain||"")}function kye(e){let t=Xi(e);for(;An(t)&&!ml(t);){if(jE(t))return t;if(wh(t))return null;t=Xi(t)}return null}function VE(){return Dv==null&&(Dv=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Dv}function ml(e){return/^(html|body|#document)$/.test(hs(e))}function Vr(e){return Vn(e).getComputedStyle(e)}function Eh(e){return xn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xi(e){if(hs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Hy(e)&&e.host||Lo(e);return Hy(t)?t.host:t}function Ez(e){const t=Xi(e);return ml(t)?e.ownerDocument?e.ownerDocument.body:e.body:An(t)&&gs(t)?t:Ez(t)}function Sc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ez(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Vn(o);if(i){const a=Gy(s);return t.concat(s,s.visualViewport||[],gs(o)?o:[],a&&n?Sc(a):[])}else return t.concat(o,Sc(o,[],n))}function Gy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}let Wy;process.env.NODE_ENV!=="production"&&(Wy=new Set);function _N(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Wy.has(t)||(Wy.add(t),console.error(`Base UI: ${t}`))}}const Cz=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(Cz.displayName="CompositeRootContext");function Rye(e=!1){const t=c.useContext(Cz);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>.":Qr(16));return t}function Sye(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,s=r&&t!==!1,a=r&&t===!1;return{props:c.useMemo(()=>{const l={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(l.tabIndex=o,!i&&n&&(l.tabIndex=t?o:-1)),(i&&(t||s)||!i&&n)&&(l["aria-disabled"]=n),i&&(!t||a)&&(l.disabled=n),l},[r,n,t,s,a,i,o])}}function Ch(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=c.useRef(null),s=Rye(!0)!==void 0,a=Qt(()=>{const m=i.current;return!!(m?.tagName==="A"&&m?.href)}),{props:l}=Sye({focusableWhenDisabled:n,disabled:t,composite:s,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&c.useEffect(()=>{if(!i.current)return;const m=i.current.tagName==="BUTTON";if(o){if(!m){const p=By.captureOwnerStack?.()||"";_N(`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(m){const p=By.captureOwnerStack?.()||"";_N(`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 m=i.current;Nye(m)&&s&&t&&l.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,l.disabled,s]);lt(u,[u]);const d=c.useCallback((m={})=>{const{onClick:p,onMouseDown:v,onKeyUp:g,onKeyDown:h,onPointerDown:b,...y}=m;return pz({type:o?"button":void 0,onClick(x){if(t){x.preventDefault();return}p?.(x)},onMouseDown(x){t||v?.(x)},onKeyDown(x){if(t||(zy(x),h?.(x)),x.baseUIHandlerPrevented)return;const w=x.target===x.currentTarget&&!o&&!a()&&!t,C=x.key==="Enter",R=x.key===" ";w&&((R||C)&&x.preventDefault(),C&&p?.(x))},onKeyUp(x){t||(zy(x),g?.(x)),!x.baseUIHandlerPrevented&&x.target===x.currentTarget&&!o&&!t&&x.key===" "&&p?.(x)},onPointerDown(x){if(t){x.preventDefault();return}b?.(x)}},o?void 0:{role:"button"},l,y)},[t,l,o,a]),f=Qt(m=>{i.current=m,u()});return{getButtonProps:d,buttonRef:f}}function Nye(e){return An(e)&&e.tagName==="BUTTON"}const ha=typeof navigator<"u",Lv=Mye(),kz=_ye(),FE=Pye(),Rz=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Oye=Lv.platform==="MacIntel"&&Lv.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Lv.platform),TN=ha&&/firefox/i.test(FE),Iye=ha&&/apple/i.test(navigator.vendor),Np=ha&&/android/i.test(kz)||/android/i.test(FE);ha&&kz.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const Aye=FE.includes("jsdom/");function Mye(){if(!ha)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 Pye(){if(!ha)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function _ye(){if(!ha)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const DN="data-base-ui-focusable",Tye="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function js(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Gt(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Hy(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function oc(e){return"composedPath"in e?e.composedPath()[0]:e.target}function $E(e){return An(e)&&e.matches(Tye)}function LN(e){return e?e.getAttribute("role")==="combobox"&&$E(e):!1}function jN(e){return e?e.hasAttribute(DN)?e:e.querySelector(`[${DN}]`)||e:null}function Uy(e,t,n=!0){return e.filter(r=>r.parentId===t&&(!n||r.context?.open)).flatMap(r=>[r,...Uy(e,r.id,n)])}function VN(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(i=>i.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}function _r(e){e.preventDefault(),e.stopPropagation()}function Dye(e){return e.pointerType===""&&e.isTrusted?!0:Np&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Lye(e){return Aye?!1:!Np&&e.width===0&&e.height===0||Np&&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 FN(e,t){return["mouse","pen"].includes(e)}function Sz(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const jye=["top","right","bottom","left"],Zi=Math.min,cr=Math.max,Op=Math.round,wd=Math.floor,go=e=>({x:e,y:e}),Vye={left:"right",right:"left",bottom:"top",top:"bottom"};function Ip(e,t,n){return cr(e,Zi(t,n))}function ko(e,t){return typeof e=="function"?e(t):e}function br(e){return e.split("-")[0]}function si(e){return e.split("-")[1]}function zE(e){return e==="x"?"y":"x"}function kh(e){return e==="y"?"height":"width"}function Ir(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Rh(e){return zE(Ir(e))}function Fye(e,t,n){n===void 0&&(n=!1);const r=si(e),o=Rh(e),i=kh(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ap(s)),[s,Ap(s)]}function $ye(e){const t=Ap(e);return[qy(e),t,qy(t)]}function qy(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const $N=["left","right"],zN=["right","left"],zye=["top","bottom"],Bye=["bottom","top"];function Hye(e,t,n){switch(e){case"top":case"bottom":return n?t?zN:$N:t?$N:zN;case"left":case"right":return t?zye:Bye;default:return[]}}function Gye(e,t,n,r){const o=si(e);let i=Hye(br(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(qy)))),i}function Ap(e){const t=br(e);return Vye[t]+e.slice(t.length)}function Wye(e){return{top:0,right:0,bottom:0,left:0,...e}}function BE(e){return typeof e!="number"?Wye(e):{top:e,right:e,bottom:e,left:e}}function Mp(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}}var Uye=["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] *)"],Pp=Uye.join(","),Nz=typeof Element>"u",hl=Nz?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,_p=!Nz&&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},Tp=function(e,t){var n;t===void 0&&(t=!0);var r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),o=r===""||r==="true",i=o||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):Tp(e.parentNode));return i},qye=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},Oz=function(e,t,n){if(Tp(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Pp));return t&&hl.call(e,Pp)&&r.unshift(e),r=r.filter(n),r},Dp=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var i=o.shift();if(!Tp(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),a=s.length?s:i.children,l=Dp(a,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:i,candidates:l})}else{var u=hl.call(i,Pp);u&&n.filter(i)&&(t||!e.includes(i))&&r.push(i);var d=i.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(i),f=!Tp(d,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(d&&f){var m=Dp(d===!0?i.children:d.children,!0,n);n.flatten?r.push.apply(r,m):r.push({scopeParent:i,candidates:m})}else o.unshift.apply(o,i.children)}}return r},Iz=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Az=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||qye(e))&&!Iz(e)?0:e.tabIndex},Kye=function(e,t){var n=Az(e);return n<0&&t&&!Iz(e)?0:n},Yye=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Mz=function(e){return e.tagName==="INPUT"},Xye=function(e){return Mz(e)&&e.type==="hidden"},Zye=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},Jye=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},Qye=function(e){if(!e.name)return!0;var t=e.form||_p(e),n=function(i){return t.querySelectorAll('input[type="radio"][name="'+i+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=n(window.CSS.escape(e.name));else try{r=n(e.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 o=Jye(r,e.form);return!o||o===e},exe=function(e){return Mz(e)&&e.type==="radio"},txe=function(e){return exe(e)&&!Qye(e)},nxe=function(e){var t,n=e&&_p(e),r=(t=n)===null||t===void 0?void 0:t.host,o=!1;if(n&&n!==e){var i,s,a;for(o=!!((i=r)!==null&&i!==void 0&&(s=i.ownerDocument)!==null&&s!==void 0&&s.contains(r)||e!=null&&(a=e.ownerDocument)!==null&&a!==void 0&&a.contains(e));!o&&r;){var l,u,d;n=_p(r),r=(l=n)===null||l===void 0?void 0:l.host,o=!!((u=r)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(r))}}return o},BN=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},rxe=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e){var o=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(e).visibility==="hidden")return!0;var i=hl.call(e,"details>summary:first-of-type"),s=i?e.parentElement:e;if(hl.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof r=="function"){for(var a=e;e;){var l=e.parentElement,u=_p(e);if(l&&!l.shadowRoot&&r(l)===!0)return BN(e);e.assignedSlot?e=e.assignedSlot:!l&&u!==e.ownerDocument?e=u.host:e=l}e=a}if(nxe(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return BN(e);return!1},oxe=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName==="LEGEND")return hl.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},Ky=function(e,t){return!(t.disabled||Xye(t)||rxe(t,e)||Zye(t)||oxe(t))},Yy=function(e,t){return!(txe(t)||Az(t)<0||!Ky(e,t))},ixe=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Pz=function(e){var t=[],n=[];return e.forEach(function(r,o){var i=!!r.scopeParent,s=i?r.scopeParent:r,a=Kye(s,i),l=i?Pz(r.candidates):s;a===0?i?t.push.apply(t,l):t.push(s):n.push({documentOrder:o,tabIndex:a,item:r,isScope:i,content:l})}),n.sort(Yye).reduce(function(r,o){return o.isScope?r.push.apply(r,o.content):r.push(o.content),r},[]).concat(t)},Sh=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Dp([e],t.includeContainer,{filter:Yy.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:ixe}):n=Oz(e,t.includeContainer,Yy.bind(null,t)),Pz(n)},sxe=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Dp([e],t.includeContainer,{filter:Ky.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=Oz(e,t.includeContainer,Ky.bind(null,t)),n},_z=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return hl.call(e,Pp)===!1?!1:Yy(t,e)};function Sn(e){return e?.ownerDocument||document}const Zc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Tz(e,t){const n=Sh(e,Zc()),r=n.length;if(r===0)return;const o=js(Sn(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function Dz(e){return Tz(Sn(e).body,1)||e}function Lz(e){return Tz(Sn(e).body,-1)||e}function ic(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Gt(n,r)}function axe(e){Sh(e,Zc()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function HN(e){e.querySelectorAll("[data-tabindex]").forEach(t=>{const n=t.dataset.tabindex;delete t.dataset.tabindex,n?t.setAttribute("tabindex",n):t.removeAttribute("tabindex")})}function jz(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=Qt(o),s=yye(r,n,!1);c.useEffect(()=>{if(!t)return;const a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,n,i,s])}const Dl=0;class Nc{static create(){return new Nc}currentId=Dl;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Dl,n()},t)}isStarted(){return this.currentId!==Dl}clear=()=>{this.currentId!==Dl&&(clearTimeout(this.currentId),this.currentId=Dl)};disposeEffect=()=>this.clear}function Oc(){const e=Co(Nc.create).current;return bz(e.disposeEffect),e}let GN={},WN={},UN="";function lxe(e){if(typeof document>"u")return!1;const t=Sn(e);return Vn(t).innerWidth-t.documentElement.clientWidth>0}function cxe(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const t=Sn(e),n=t.documentElement,r=t.body,o=gs(n)?n:r,i=o.style.overflowY,s=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",o.style.overflowY="scroll";const a=o.offsetWidth;o.style.overflowY="hidden";const l=o.offsetWidth;return o.style.overflowY=i,n.style.scrollbarGutter=s,a===l}function uxe(e){const t=Sn(e),n=t.documentElement,r=t.body,o=gs(n)?n:r,i={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,i)}}function dxe(e){const t=Sn(e),n=t.documentElement,r=t.body,o=Vn(n);let i=0,s=0,a=!1;const l=io.create();if(Rz&&(o.visualViewport?.scale??1)!==1)return()=>{};function u(){const m=o.getComputedStyle(n),p=o.getComputedStyle(r),v=(m.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,s=n.scrollLeft,GN={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},UN=n.style.scrollBehavior,WN={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 g=n.scrollHeight>n.clientHeight,h=n.scrollWidth>n.clientWidth,b=m.overflowY==="scroll"||p.overflowY==="scroll",y=m.overflowX==="scroll"||p.overflowX==="scroll",x=Math.max(0,o.innerWidth-r.clientWidth),w=Math.max(0,o.innerHeight-r.clientHeight),C=parseFloat(p.marginTop)+parseFloat(p.marginBottom),R=parseFloat(p.marginLeft)+parseFloat(p.marginRight),k=gs(n)?n:r;if(a=cxe(e),a){n.style.scrollbarGutter=v,k.style.overflowY="hidden",k.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:v,overflowY:"hidden",overflowX:"hidden"}),(g||b)&&(n.style.overflowY="scroll"),(h||y)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:C||w?`calc(100dvh - ${C+w}px)`:"100dvh",width:R||x?`calc(100vw - ${R+x}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=s,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function d(){Object.assign(n.style,GN),Object.assign(r.style,WN),a||(n.scrollTop=i,n.scrollLeft=s,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=UN)}function f(){d(),l.request(u)}return u(),o.addEventListener("resize",f),()=>{l.cancel(),d(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",f)}}class fxe{lockCount=0;restore=null;timeoutLock=Nc.create();timeoutUnlock=Nc.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 n=Sn(t).documentElement,r=Vn(n).getComputedStyle(n).overflowY;if(r==="hidden"||r==="clip"){this.restore=tr;return}const o=Oye||!lxe(t);this.restore=o?uxe(t):dxe(t)}}const pxe=new fxe;function mxe(e=!0,t=null){lt(()=>{if(e)return pxe.acquire(t)},[e,t])}function Xa(e){const t=Co(hxe,e).current;return t.next=e,lt(t.effect),t}function hxe(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function gxe(){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 Vz=c.createContext(null);process.env.NODE_ENV!=="production"&&(Vz.displayName="FloatingNodeContext");const Fz=c.createContext(null);process.env.NODE_ENV!=="production"&&(Fz.displayName="FloatingTreeContext");const vxe=()=>c.useContext(Vz)?.id||null,$z=e=>{const t=c.useContext(Fz);return e??t};function Xy(e){return`data-base-ui-${e}`}const bxe={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},zz={...bxe,position:"fixed",top:0,left:0},Ic=c.forwardRef(function(e,t){const[n,r]=c.useState();return lt(()=>{Iye&&r("button")},[]),E.jsx("span",{...e,ref:t,style:zz,"aria-hidden":n?void 0:!0,tabIndex:0,role:n,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(Ic.displayName="FocusGuard");let qN=0;function jv(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(qN);const i=()=>e?.focus({preventScroll:n});o?i():qN=requestAnimationFrame(i)}const Za={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function KN(e){return e==="inert"?Za.inert:e==="aria-hidden"?Za["aria-hidden"]:Za.none}let Ed=new WeakSet,Cd={},Vv=0;const Bz=e=>e&&(e.host||Bz(e.parentNode)),yxe=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Bz(n);return e.contains(r)?r:null}).filter(n=>n!=null);function xxe(e,t,n,r){const o="data-base-ui-inert",i=r?"inert":n?"aria-hidden":null,s=yxe(t,e),a=new Set,l=new Set(s),u=[];Cd[o]||(Cd[o]=new WeakMap);const d=Cd[o];s.forEach(f),m(t),a.clear();function f(p){!p||a.has(p)||(a.add(p),p.parentNode&&f(p.parentNode))}function m(p){!p||l.has(p)||[].forEach.call(p.children,v=>{if(hs(v)!=="script")if(a.has(v))m(v);else{const g=i?v.getAttribute(i):null,h=g!==null&&g!=="false",b=KN(i),y=(b.get(v)||0)+1,x=(d.get(v)||0)+1;b.set(v,y),d.set(v,x),u.push(v),y===1&&h&&Ed.add(v),x===1&&v.setAttribute(o,""),!h&&i&&v.setAttribute(i,i==="inert"?"":"true")}})}return Vv+=1,()=>{u.forEach(p=>{const v=KN(i),g=(v.get(p)||0)-1,h=(d.get(p)||0)-1;v.set(p,g),d.set(p,h),g||(!Ed.has(p)&&i&&p.removeAttribute(i),Ed.delete(p)),h||p.removeAttribute(o)}),Vv-=1,Vv||(Za.inert=new WeakMap,Za["aria-hidden"]=new WeakMap,Za.none=new WeakMap,Ed=new WeakSet,Cd={})}}function wxe(e,t=!1,n=!1){const r=Sn(e[0]).body;return xxe(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const HE=c.createContext(null);process.env.NODE_ENV!=="production"&&(HE.displayName="PortalContext");const Hz=()=>c.useContext(HE),Exe=Xy("portal");function Cxe(e={}){const{ref:t,container:n,componentProps:r=pr,elementProps:o}=e,i=_E(),s=Hz()?.portalNode,[a,l]=c.useState(null),[u,d]=c.useState(null),f=Qt(v=>{v!==null&&d(v)}),m=c.useRef(null);lt(()=>{if(n===null){m.current&&(m.current=null,d(null),l(null));return}if(i==null)return;const v=(n&&(LE(n)?n:n.current))??s??document.body;if(v==null){m.current&&(m.current=null,d(null),l(null));return}m.current!==v&&(m.current=v,d(null),l(v))},[n,s,i]);const p=Kn("div",r,{ref:[t,f],props:[{id:i,[Exe]:""},o]});return{portalNode:u,portalSubtree:a&&p?dt.createPortal(p,a):null}}const Gz=c.forwardRef(function(e,t){const{children:n,container:r,className:o,render:i,renderGuards:s,...a}=e,{portalNode:l,portalSubtree:u}=Cxe({container:r,ref:t,componentProps:e,elementProps:a}),d=c.useRef(null),f=c.useRef(null),m=c.useRef(null),p=c.useRef(null),[v,g]=c.useState(null),h=v?.modal,b=v?.open,y=typeof s=="boolean"?s:!!v&&!v.modal&&v.open&&!!l;c.useEffect(()=>{if(!l||h)return;function w(C){l&&C.relatedTarget&&ic(C)&&(C.type==="focusin"?HN:axe)(l)}return l.addEventListener("focusin",w,!0),l.addEventListener("focusout",w,!0),()=>{l.removeEventListener("focusin",w,!0),l.removeEventListener("focusout",w,!0)}},[l,h]),c.useEffect(()=>{!l||b||HN(l)},[b,l]);const x=c.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:m,afterInsideRef:p,portalNode:l,setFocusManagerState:g}),[l]);return E.jsxs(c.Fragment,{children:[u,E.jsxs(HE.Provider,{value:x,children:[y&&l&&E.jsx(Ic,{"data-type":"outside",ref:d,onFocus:w=>{if(ic(w,l))m.current?.focus();else{const C=v?v.domReference:null;Lz(C)?.focus()}}}),y&&l&&E.jsx("span",{"aria-owns":l.id,style:oye}),l&&dt.createPortal(n,l),y&&l&&E.jsx(Ic,{"data-type":"outside",ref:f,onFocus:w=>{if(ic(w,l))p.current?.focus();else{const C=v?v.domReference:null;Dz(C)?.focus(),v?.closeOnFocusOut&&v?.onOpenChange(!1,Kt(gz,w.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(Gz.displayName="FloatingPortal");function kxe(e,t){const n=Vn(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 YN=20;let Ai=[];function GE(){Ai=Ai.filter(e=>e.deref()?.isConnected)}function Rxe(e){GE(),e&&hs(e)!=="body"&&(Ai.push(new WeakRef(e)),Ai.length>YN&&(Ai=Ai.slice(-YN)))}function Fv(){return GE(),Ai[Ai.length-1]?.deref()}function Sxe(e){if(!e)return null;const t=Zc();return _z(e,t)?e:Sh(e,t)[0]||e}function Nxe(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Vr(e).display!=="none"}function XN(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=Zc(),r=sxe(e,n).filter(i=>{const s=i.getAttribute("data-tabindex")||"";return _z(i,n)||i.hasAttribute("data-tabindex")&&!s.startsWith("-")}),o=e.getAttribute("tabindex");t.current.includes("floating")||r.length===0?o!=="0"&&e.setAttribute("tabindex","0"):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Oxe(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:i=!0,restoreFocus:s=!1,modal:a=!0,closeOnFocusOut:l=!0,openInteractionType:u="",nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:m,externalTree:p}=e,v="rootStore"in t?t.rootStore:t,g=v.useState("open"),h=v.useState("domReferenceElement"),b=v.useState("floatingElement"),{events:y,dataRef:x}=v.context,w=Qt(()=>x.current.floatingContext?.nodeId),C=o===!1,R=LN(h)&&C,k=c.useRef(["content"]),S=Xa(o),P=Xa(i),L=Xa(u),_=$z(p),O=Hz(),B=c.useRef(null),I=c.useRef(null),V=c.useRef(!1),F=c.useRef(!1),D=c.useRef(!1),T=c.useRef(-1),q=c.useRef(""),A=c.useRef(""),ee=c.useRef(null),ie=c.useRef(null),Y=Sp(ee,m,O?.beforeInsideRef),Q=Sp(ie,O?.afterInsideRef),X=Oc(),J=Oc(),te=DE(),le=O!=null,z=jN(b),re=Qt((N=z)=>N?Sh(N,Zc()):[]),oe=Qt(N=>{const j=re(N);return k.current.map(()=>j).filter(Boolean).flat()});c.useEffect(()=>{if(r||!a)return;function N(K){K.key==="Tab"&&Gt(z,js(Sn(z)))&&re().length===0&&!R&&_r(K)}const j=Sn(z);return j.addEventListener("keydown",N),()=>{j.removeEventListener("keydown",N)}},[r,h,z,a,k,R,re,oe]),c.useEffect(()=>{if(r||!g)return;const N=Sn(z);function j(){D.current=!1}function K(U){const $=oc(U),W=Gt(b,$)||Gt(h,$)||Gt(O?.portalNode,$);D.current=!W,A.current=U.pointerType||"keyboard",$?.closest(`[${nye}]`)&&(F.current=!0)}function H(){A.current="keyboard"}return N.addEventListener("pointerdown",K,!0),N.addEventListener("pointerup",j,!0),N.addEventListener("pointercancel",j,!0),N.addEventListener("keydown",H,!0),()=>{N.removeEventListener("pointerdown",K,!0),N.removeEventListener("pointerup",j,!0),N.removeEventListener("pointercancel",j,!0),N.removeEventListener("keydown",H,!0)}},[r,b,h,z,g,O]),c.useEffect(()=>{if(r||!l)return;const N=Sn(z);function j(){F.current=!0,J.start(0,()=>{F.current=!1})}function K(Z){const G=oc(Z),ne=re().indexOf(G);ne!==-1&&(T.current=ne)}function H(Z){const G=Z.relatedTarget,ne=Z.currentTarget,we=oc(Z);queueMicrotask(()=>{const Ve=w(),Ye=v.context.triggerElements,ft=G?.hasAttribute(Xy("focus-guard"))&&[ee.current,ie.current,O?.beforeInsideRef.current,O?.afterInsideRef.current,O?.beforeOutsideRef.current,O?.afterOutsideRef.current,Yo(f),Yo(d)].includes(G),qe=!(Gt(h,G)||Gt(b,G)||Gt(G,b)||Gt(O?.portalNode,G)||G!=null&&Ye.hasElement(G)||Ye.hasMatchingElement(ce=>Gt(ce,G))||ft||_&&(Uy(_.nodesRef.current,Ve).find(ce=>Gt(ce.context?.elements.floating,G)||Gt(ce.context?.elements.domReference,G))||VN(_.nodesRef.current,Ve).find(ce=>[ce.context?.elements.floating,jN(ce.context?.elements.floating)].includes(G)||ce.context?.elements.domReference===G)));if(ne===h&&z&&XN(z,k),s&&ne!==h&&!Nxe(we)&&js(N)===N.body){if(An(z)&&(z.focus(),s==="popup")){te.request(()=>{z.focus()});return}const ce=T.current,Ke=re(),ot=Ke[ce]||Ke[Ke.length-1]||z;An(ot)&&ot.focus()}if(x.current.insideReactTree){x.current.insideReactTree=!1;return}(R||!a)&&G&&qe&&!F.current&&(R||G!==Fv())&&(V.current=!0,v.setOpen(!1,Kt(gz,Z)))})}function U(){D.current||(x.current.insideReactTree=!0,X.start(0,()=>{x.current.insideReactTree=!1}))}const $=An(h)?h:null,W=[];if(!(!b&&!$))return $&&($.addEventListener("focusout",H),$.addEventListener("pointerdown",j),W.push(()=>{$.removeEventListener("focusout",H),$.removeEventListener("pointerdown",j)})),b&&(b.addEventListener("focusin",K),b.addEventListener("focusout",H),O&&(b.addEventListener("focusout",U,!0),W.push(()=>{b.removeEventListener("focusout",U,!0)})),W.push(()=>{b.removeEventListener("focusin",K),b.removeEventListener("focusout",H)})),()=>{W.forEach(Z=>{Z()})}},[r,h,b,z,a,_,O,v,l,s,re,R,w,k,x,X,J,te,d,f]),c.useEffect(()=>{if(r||!b||!g)return;const N=Array.from(O?.portalNode?.querySelectorAll(`[${Xy("portal")}]`)||[]),j=(_?VN(_.nodesRef.current,w()):[]).find(H=>LN(H.context?.elements.domReference||null))?.context?.elements.domReference,K=[b,j,...N,B.current,I.current,ee.current,ie.current,O?.beforeOutsideRef.current,O?.afterOutsideRef.current,Yo(f),Yo(d),R?h:null].filter(H=>H!=null);return wxe(K,a||R)},[g,r,h,b,a,k,O,R,_,w,d,f]),lt(()=>{if(!g||r||!An(z))return;const N=Sn(z),j=js(N);queueMicrotask(()=>{const K=oe(z),H=S.current,U=typeof H=="function"?H(L.current||""):H;if(U===void 0||U===!1)return;let $;U===!0||U===null?$=K[0]||z:$=Yo(U),$=$||K[0]||z,!Gt(z,j)&&jv($,{preventScroll:$===z})})},[r,g,z,C,oe,S,L]),lt(()=>{if(r||!z)return;const N=Sn(z),j=js(N);Rxe(j);function K($){if($.open||(q.current=kxe($.nativeEvent,A.current)),$.reason===uye&&$.nativeEvent.type==="mouseleave"&&(V.current=!0),$.reason===dye)if($.nested)V.current=!1;else if(Dye($.nativeEvent)||Lye($.nativeEvent))V.current=!1;else{let W=!1;document.createElement("div").focus({get preventScroll(){return W=!0,!1}}),W?V.current=!1:V.current=!0}}y.on("openchange",K);const H=N.createElement("span");H.setAttribute("tabindex","-1"),H.setAttribute("aria-hidden","true"),Object.assign(H.style,zz),le&&h&&h.insertAdjacentElement("afterend",H);function U(){const $=P.current;let W=typeof $=="function"?$(q.current):$;if(W===void 0||W===!1)return null;if(W===null&&(W=!0),typeof W=="boolean"){const G=h||Fv();return G&&G.isConnected?G:H}const Z=h||Fv()||H;return Yo(W)||Z}return()=>{y.off("openchange",K);const $=js(N),W=Gt(b,$)||_&&Uy(_.nodesRef.current,w(),!1).some(G=>Gt(G.context?.elements.floating,$)),Z=U();queueMicrotask(()=>{const G=Sxe(Z),ne=typeof P.current!="boolean";P.current&&!V.current&&An(G)&&(!(!ne&&G!==$&&$!==N.body)||W)&&G.focus({preventScroll:!0}),H.remove(),V.current=!1})}},[r,b,z,P,x,y,_,le,h,w]),lt(()=>{if(!Rz||g||!b)return;const N=js(Sn(b));!An(N)||!$E(N)||Gt(b,N)&&N.blur()},[g,b]),lt(()=>{if(!(r||!O))return O.setFocusManagerState({modal:a,closeOnFocusOut:l,open:g,onOpenChange:v.setOpen,domReference:h}),()=>{O.setFocusManagerState(null)}},[r,O,a,g,v,l,h]),lt(()=>{if(!(r||!z))return XN(z,k),()=>{queueMicrotask(GE)}},[r,z,k]);const M=!r&&(a?!R:!0)&&(le||a);return E.jsxs(c.Fragment,{children:[M&&E.jsx(Ic,{"data-type":"inside",ref:Y,onFocus:N=>{if(a){const j=oe();jv(j[j.length-1])}else O?.portalNode&&(V.current=!1,ic(N,O.portalNode)?Dz(h)?.focus():Yo(f??O.beforeOutsideRef)?.focus())}}),n,M&&E.jsx(Ic,{"data-type":"inside",ref:Q,onFocus:N=>{a?jv(oe()[0]):O?.portalNode&&(l&&(V.current=!0),ic(N,O.portalNode)?Lz(h)?.focus():Yo(d??O.afterOutsideRef)?.focus())}})]})}function Ixe(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:i="click",toggle:s=!0,ignoreMouse:a=!1,stickIfOpen:l=!0,touchOpenDelay:u=0,reason:d=cye}=t,f=c.useRef(void 0),m=DE(),p=Oc(),v=c.useMemo(()=>({onPointerDown(g){f.current=g.pointerType},onMouseDown(g){const h=f.current,b=g.nativeEvent,y=n.select("open");if(g.button!==0||i==="click"||FN(h)&&a)return;const x=r.current.openEvent,w=x?.type,C=n.select("domReferenceElement")!==g.currentTarget,R=y&&C||!(y&&s&&(!(x&&l)||w==="click"||w==="mousedown"));if($E(b.target)){const S=Kt(d,b,b.target);R&&h==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,S)}):n.setOpen(R,S);return}const k=g.currentTarget;m.request(()=>{const S=Kt(d,b,k);R&&h==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,S)}):n.setOpen(R,S)})},onClick(g){if(i==="mousedown-only")return;const h=f.current;if(i==="mousedown"&&h){f.current=void 0;return}if(FN(h)&&a)return;const b=n.select("open"),y=r.current.openEvent,x=n.select("domReferenceElement")!==g.currentTarget,w=b&&x||!(b&&s&&(!(y&&l)||Sz(y))),C=Kt(d,g.nativeEvent,g.currentTarget);w&&h==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,C)}):n.setOpen(w,C)},onKeyDown(){f.current=void 0}}),[r,i,a,n,l,s,m,p,u,d]);return c.useMemo(()=>o?{reference:v}:pr,[o,v])}function ZN(e,t,n){let{reference:r,floating:o}=e;const i=Ir(t),s=Rh(t),a=kh(s),l=br(t),u=i==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,m=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(si(t)){case"start":p[s]-=m*(n&&u?-1:1);break;case"end":p[s]+=m*(n&&u?-1:1);break}return p}async function Axe(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:p=0}=ko(t,e),v=BE(p),g=a[m?f==="floating"?"reference":"floating":f],h=Mp(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),b=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},w=Mp(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:y,strategy:l}):b);return{top:(h.top-w.top+v.top)/x.y,bottom:(w.bottom-h.bottom+v.bottom)/x.y,left:(h.left-w.left+v.left)/x.x,right:(w.right-h.right+v.right)/x.x}}const Mxe=50,Pxe=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:Axe},l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=ZN(u,r,l),m=r,p=0;const v={};for(let g=0;g<i.length;g++){const h=i[g];if(!h)continue;const{name:b,fn:y}=h,{x,y:w,data:C,reset:R}=await y({x:d,y:f,initialPlacement:r,placement:m,strategy:o,middlewareData:v,rects:u,platform:a,elements:{reference:e,floating:t}});d=x??d,f=w??f,v[b]={...v[b],...C},R&&p<Mxe&&(p++,typeof R=="object"&&(R.placement&&(m=R.placement),R.rects&&(u=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:d,y:f}=ZN(u,m,l)),g=-1)}return{x:d,y:f,placement:m,strategy:o,middlewareData:v}},_xe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=ko(e,t)||{};if(u==null)return{};const f=BE(d),m={x:n,y:r},p=Rh(o),v=kh(p),g=await s.getDimensions(u),h=p==="y",b=h?"top":"left",y=h?"bottom":"right",x=h?"clientHeight":"clientWidth",w=i.reference[v]+i.reference[p]-m[p]-i.floating[v],C=m[p]-i.reference[p],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let k=R?R[x]:0;(!k||!await(s.isElement==null?void 0:s.isElement(R)))&&(k=a.floating[x]||i.floating[v]);const S=w/2-C/2,P=k/2-g[v]/2-1,L=Zi(f[b],P),_=Zi(f[y],P),O=L,B=k-g[v]-_,I=k/2-g[v]/2+S,V=Ip(O,I,B),F=!l.arrow&&si(o)!=null&&I!==V&&i.reference[v]/2-(I<O?L:_)-g[v]/2<0,D=F?I<O?I-O:I-B:0;return{[p]:m[p]+D,data:{[p]:V,centerOffset:I-V-D,...F&&{alignmentOffset:D}},reset:F}}}),Txe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...h}=ko(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=br(o),y=Ir(a),x=br(a)===a,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=m||(x||!g?[Ap(a)]:$ye(a)),R=v!=="none";!m&&R&&C.push(...Gye(a,g,v,w));const k=[a,...C],S=await l.detectOverflow(t,h),P=[];let L=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&P.push(S[b]),f){const I=Fye(o,s,w);P.push(S[I[0]],S[I[1]])}if(L=[...L,{placement:o,overflows:P}],!P.every(I=>I<=0)){var _,O;const I=(((_=i.flip)==null?void 0:_.index)||0)+1,V=k[I];if(V&&(!(f==="alignment"&&y!==Ir(V))||L.every(D=>Ir(D.placement)===y?D.overflows[0]>0:!0)))return{data:{index:I,overflows:L},reset:{placement:V}};let F=(O=L.filter(D=>D.overflows[0]<=0).sort((D,T)=>D.overflows[1]-T.overflows[1])[0])==null?void 0:O.placement;if(!F)switch(p){case"bestFit":{var B;const D=(B=L.filter(T=>{if(R){const q=Ir(T.placement);return q===y||q==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(q=>q>0).reduce((q,A)=>q+A,0)]).sort((T,q)=>T[1]-q[1])[0])==null?void 0:B[0];D&&(F=D);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function JN(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function QN(e){return jye.some(t=>e[t]>=0)}const Dxe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=ko(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=JN(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:QN(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=JN(s,n.floating);return{data:{escapedOffsets:a,escaped:QN(a)}}}default:return{}}}}},Wz=new Set(["left","top"]);async function Lxe(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=br(n),a=si(n),l=Ir(n)==="y",u=Wz.has(s)?-1:1,d=i&&l?-1:1,f=ko(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof v=="number"&&(p=a==="end"?v*-1:v),l?{x:p*d,y:m*u}:{x:m*u,y:p*d}}const jxe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await Lxe(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Vxe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:y,y:x}=b;return{x:y,y:x}}},...u}=ko(e,t),d={x:n,y:r},f=await i.detectOverflow(t,u),m=Ir(br(o)),p=zE(m);let v=d[p],g=d[m];if(s){const b=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=v+f[b],w=v-f[y];v=Ip(x,v,w)}if(a){const b=m==="y"?"top":"left",y=m==="y"?"bottom":"right",x=g+f[b],w=g-f[y];g=Ip(x,g,w)}const h=l.fn({...t,[p]:v,[m]:g});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:s,[m]:a}}}}}},Fxe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=ko(e,t),d={x:n,y:r},f=Ir(o),m=zE(f);let p=d[m],v=d[f];const g=ko(a,t),h=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const x=m==="y"?"height":"width",w=i.reference[m]-i.floating[x]+h.mainAxis,C=i.reference[m]+i.reference[x]-h.mainAxis;p<w?p=w:p>C&&(p=C)}if(u){var b,y;const x=m==="y"?"width":"height",w=Wz.has(br(o)),C=i.reference[f]-i.floating[x]+(w&&((b=s.offset)==null?void 0:b[f])||0)+(w?0:h.crossAxis),R=i.reference[f]+i.reference[x]+(w?0:((y=s.offset)==null?void 0:y[f])||0)-(w?h.crossAxis:0);v<C?v=C:v>R&&(v=R)}return{[m]:p,[f]:v}}}},$xe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=ko(e,t),d=await s.detectOverflow(t,u),f=br(o),m=si(o),p=Ir(o)==="y",{width:v,height:g}=i.floating;let h,b;f==="top"||f==="bottom"?(h=f,b=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=f,h=m==="end"?"top":"bottom");const y=g-d.top-d.bottom,x=v-d.left-d.right,w=Zi(g-d[h],y),C=Zi(v-d[b],x),R=!t.middlewareData.shift;let k=w,S=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=y),R&&!m){const L=cr(d.left,0),_=cr(d.right,0),O=cr(d.top,0),B=cr(d.bottom,0);p?S=v-2*(L!==0||_!==0?L+_:cr(d.left,d.right)):k=g-2*(O!==0||B!==0?O+B:cr(d.top,d.bottom))}await l({...t,availableWidth:S,availableHeight:k});const P=await s.getDimensions(a.floating);return v!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function Uz(e){const t=Vr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=An(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Op(n)!==i||Op(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function WE(e){return xn(e)?e:e.contextElement}function Ja(e){const t=WE(e);if(!An(t))return go(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Uz(t);let s=(i?Op(n.width):n.width)/r,a=(i?Op(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const zxe=go(0);function qz(e){const t=Vn(e);return!VE()||!t.visualViewport?zxe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Bxe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vn(e)?!1:t}function Xs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=WE(e);let s=go(1);t&&(r?xn(r)&&(s=Ja(r)):s=Ja(e));const a=Bxe(i,n,r)?qz(i):go(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,d=o.width/s.x,f=o.height/s.y;if(i){const m=Vn(i),p=r&&xn(r)?Vn(r):r;let v=m,g=Gy(v);for(;g&&r&&p!==v;){const h=Ja(g),b=g.getBoundingClientRect(),y=Vr(g),x=b.left+(g.clientLeft+parseFloat(y.paddingLeft))*h.x,w=b.top+(g.clientTop+parseFloat(y.paddingTop))*h.y;l*=h.x,u*=h.y,d*=h.x,f*=h.y,l+=x,u+=w,v=Vn(g),g=Gy(v)}}return Mp({width:d,height:f,x:l,y:u})}function Nh(e,t){const n=Eh(e).scrollLeft;return t?t.left+n:Xs(Lo(e)).left+n}function Kz(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Nh(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Hxe(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Lo(r),a=t?wh(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=go(1);const d=go(0),f=An(r);if((f||!f&&!i)&&((hs(r)!=="body"||gs(s))&&(l=Eh(r)),f)){const p=Xs(r);u=Ja(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const m=s&&!f&&!i?Kz(s,l):go(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+m.x,y:n.y*u.y-l.scrollTop*u.y+d.y+m.y}}function Gxe(e){return Array.from(e.getClientRects())}function Wxe(e){const t=Lo(e),n=Eh(e),r=e.ownerDocument.body,o=cr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=cr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Nh(e);const a=-n.scrollTop;return Vr(r).direction==="rtl"&&(s+=cr(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const eO=25;function Uxe(e,t){const n=Vn(e),r=Lo(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const d=VE();(!d||d&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const u=Nh(r);if(u<=0){const d=r.ownerDocument,f=d.body,m=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,v=Math.abs(r.clientWidth-f.clientWidth-p);v<=eO&&(i-=v)}else u<=eO&&(i+=u);return{width:i,height:s,x:a,y:l}}function qxe(e,t){const n=Xs(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=An(e)?Ja(e):go(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function tO(e,t,n){let r;if(t==="viewport")r=Uxe(e,n);else if(t==="document")r=Wxe(Lo(e));else if(xn(t))r=qxe(t,n);else{const o=qz(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Mp(r)}function Yz(e,t){const n=Xi(e);return n===t||!xn(n)||ml(n)?!1:Vr(n).position==="fixed"||Yz(n,t)}function Kxe(e,t){const n=t.get(e);if(n)return n;let r=Sc(e,[],!1).filter(a=>xn(a)&&hs(a)!=="body"),o=null;const i=Vr(e).position==="fixed";let s=i?Xi(e):e;for(;xn(s)&&!ml(s);){const a=Vr(s),l=jE(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&o&&(o.position==="absolute"||o.position==="fixed")||gs(s)&&!l&&Yz(e,s))?r=r.filter(u=>u!==s):o=a,s=Xi(s)}return t.set(e,r),r}function Yxe(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?wh(t)?[]:Kxe(t,this._c):[].concat(n),r],s=tO(t,i[0],o);let a=s.top,l=s.right,u=s.bottom,d=s.left;for(let f=1;f<i.length;f++){const m=tO(t,i[f],o);a=cr(m.top,a),l=Zi(m.right,l),u=Zi(m.bottom,u),d=cr(m.left,d)}return{width:l-d,height:u-a,x:d,y:a}}function Xxe(e){const{width:t,height:n}=Uz(e);return{width:t,height:n}}function Zxe(e,t,n){const r=An(t),o=Lo(t),i=n==="fixed",s=Xs(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=go(0);function u(){l.x=Nh(o)}if(r||!r&&!i)if((hs(t)!=="body"||gs(o))&&(a=Eh(t)),r){const p=Xs(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&u();i&&!r&&o&&u();const d=o&&!r&&!i?Kz(o,a):go(0),f=s.left+a.scrollLeft-l.x-d.x,m=s.top+a.scrollTop-l.y-d.y;return{x:f,y:m,width:s.width,height:s.height}}function $v(e){return Vr(e).position==="static"}function nO(e,t){if(!An(e)||Vr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Lo(e)===n&&(n=n.ownerDocument.body),n}function Xz(e,t){const n=Vn(e);if(wh(e))return n;if(!An(e)){let o=Xi(e);for(;o&&!ml(o);){if(xn(o)&&!$v(o))return o;o=Xi(o)}return n}let r=nO(e,t);for(;r&&wye(r)&&$v(r);)r=nO(r,t);return r&&ml(r)&&$v(r)&&!jE(r)?n:r||kye(e)||n}const Jxe=async function(e){const t=this.getOffsetParent||Xz,n=this.getDimensions,r=await n(e.floating);return{reference:Zxe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Qxe(e){return Vr(e).direction==="rtl"}const ewe={convertOffsetParentRelativeRectToViewportRelativeRect:Hxe,getDocumentElement:Lo,getClippingRect:Yxe,getOffsetParent:Xz,getElementRects:Jxe,getClientRects:Gxe,getDimensions:Xxe,getScale:Ja,isElement:xn,isRTL:Qxe};function Zz(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function twe(e,t){let n=null,r;const o=Lo(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:d,top:f,width:m,height:p}=u;if(a||t(),!m||!p)return;const v=wd(f),g=wd(o.clientWidth-(d+m)),h=wd(o.clientHeight-(f+p)),b=wd(d),y={rootMargin:-v+"px "+-g+"px "+-h+"px "+-b+"px",threshold:cr(0,Zi(1,l))||1};let x=!0;function w(C){const R=C[0].intersectionRatio;if(R!==l){if(!x)return s();R?s(!1,R):r=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!Zz(u,e.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(w,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(w,y)}n.observe(e)}return s(!0),i}function Zy(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=WE(e),d=o||i?[...u?Sc(u):[],...t?Sc(t):[]]:[];d.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const f=u&&a?twe(u,n):null;let m=-1,p=null;s&&(p=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),u&&!l&&p.observe(u),t&&p.observe(t));let v,g=l?Xs(e):null;l&&h();function h(){const b=Xs(e);g&&!Zz(g,b)&&n(),g=b,v=requestAnimationFrame(h)}return n(),()=>{var b;d.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f?.(),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(v)}}const nwe=jxe,rwe=Vxe,owe=Txe,iwe=$xe,swe=Dxe,rO=_xe,awe=Fxe,lwe=(e,t,n)=>{const r=new Map,o={platform:ewe,...n},i={...o.platform,_c:r};return Pxe(e,t,{...o,platform:i})};var cwe=typeof document<"u",uwe=function(){},df=cwe?ae.useLayoutEffect:uwe;function Lp(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(!Lp(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 i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Lp(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Jz(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oO(e,t){const n=Jz(e);return Math.round(t*n)/n}function zv(e){const t=c.useRef(e);return df(()=>{t.current=e}),t}function Qz(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,f]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=c.useState(r);Lp(m,r)||p(r);const[v,g]=c.useState(null),[h,b]=c.useState(null),y=c.useCallback(T=>{T!==R.current&&(R.current=T,g(T))},[]),x=c.useCallback(T=>{T!==k.current&&(k.current=T,b(T))},[]),w=i||v,C=s||h,R=c.useRef(null),k=c.useRef(null),S=c.useRef(d),P=l!=null,L=zv(l),_=zv(o),O=zv(u),B=c.useCallback(()=>{if(!R.current||!k.current)return;const T={placement:t,strategy:n,middleware:m};_.current&&(T.platform=_.current),lwe(R.current,k.current,T).then(q=>{const A={...q,isPositioned:O.current!==!1};I.current&&!Lp(S.current,A)&&(S.current=A,dt.flushSync(()=>{f(A)}))})},[m,t,n,_,O]);df(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,f(T=>({...T,isPositioned:!1})))},[u]);const I=c.useRef(!1);df(()=>(I.current=!0,()=>{I.current=!1}),[]),df(()=>{if(w&&(R.current=w),C&&(k.current=C),w&&C){if(L.current)return L.current(w,C,B);B()}},[w,C,B,L,P]);const V=c.useMemo(()=>({reference:R,floating:k,setReference:y,setFloating:x}),[y,x]),F=c.useMemo(()=>({reference:w,floating:C}),[w,C]),D=c.useMemo(()=>{const T={position:n,left:0,top:0};if(!F.floating)return T;const q=oO(F.floating,d.x),A=oO(F.floating,d.y);return a?{...T,transform:"translate("+q+"px, "+A+"px)",...Jz(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:A}},[n,a,F.floating,d.x,d.y]);return c.useMemo(()=>({...d,update:B,refs:V,elements:F,floatingStyles:D}),[d,B,V,F,D])}const dwe=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?rO({element:r.current,padding:o}).fn(n):{}:r?rO({element:r,padding:o}).fn(n):{}}}},e3=(e,t)=>{const n=nwe(e);return{name:n.name,fn:n.fn,options:[e,t]}},t3=(e,t)=>{const n=rwe(e);return{name:n.name,fn:n.fn,options:[e,t]}},n3=(e,t)=>({fn:awe(e).fn,options:[e,t]}),r3=(e,t)=>{const n=owe(e);return{name:n.name,fn:n.fn,options:[e,t]}},o3=(e,t)=>{const n=iwe(e);return{name:n.name,fn:n.fn,options:[e,t]}},i3=(e,t)=>{const n=swe(e);return{name:n.name,fn:n.fn,options:[e,t]}},fwe=(e,t)=>{const n=dwe(e);return{name:n.name,fn:n.fn,options:[e,t]}};var pwe=(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(i){({stack:o}=i)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
335
|
+
\`createSelector([state => state.todos], todos => todos)\`
|
|
336
|
+
This could lead to inefficient memoization and unnecessary re-renders.
|
|
337
|
+
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},mwe=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:i,inputSelectorResultsCopy:s}=e,a=r(()=>({}),...o);if(a.apply(null,i)!==a.apply(null,s)){let l;try{throw new Error}catch(u){({stack:l}=u)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
338
|
+
This means your output selector will likely run more frequently than intended.
|
|
339
|
+
Avoid returning a new reference inside your input selector, e.g.
|
|
340
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:i,secondInputs:s,stack:l})}},hwe={inputStabilityCheck:"once",identityFunctionCheck:"once"},jp=Symbol("NOT_FOUND");function gwe(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function vwe(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function bwe(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 iO=e=>Array.isArray(e)?e:[e];function ywe(e){const t=Array.isArray(e[0])?e[0]:e;return bwe(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function sO(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var xwe=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...hwe,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:pwe},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:mwe}}};function wwe(e){let t;return{get(n){return t&&e(t.key,n)?t.value:jp},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Ewe(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 jp}function o(a,l){r(a)===jp&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var Cwe=(e,t)=>e===t;function kwe(e){return function(t,n){if(t===null||n===null||t.length!==n.length)return!1;const{length:r}=t;for(let o=0;o<r;o++)if(!e(t[o],n[o]))return!1;return!0}}function Rwe(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=Cwe,maxSize:o=1,resultEqualityCheck:i}=n,s=kwe(r);let a=0;const l=o<=1?wwe(s):Ewe(o,s);function u(){let d=l.get(arguments);if(d===jp){if(d=e.apply(null,arguments),a++,i){const f=l.getEntries().find(m=>i(m.value,d));f&&(d=f.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 Swe=class{constructor(e){this.value=e}deref(){return this.value}},Nwe=typeof WeakRef<"u"?WeakRef:Swe,Owe=0,aO=1;function kd(){return{s:Owe,v:void 0,o:null,p:null}}function s3(e,t={}){let n=kd();const{resultEqualityCheck:r}=t;let o,i=0;function s(){let a=n;const{length:l}=arguments;for(let f=0,m=l;f<m;f++){const p=arguments[f];if(typeof p=="function"||typeof p=="object"&&p!==null){let v=a.o;v===null&&(a.o=v=new WeakMap);const g=v.get(p);g===void 0?(a=kd(),v.set(p,a)):a=g}else{let v=a.p;v===null&&(a.p=v=new Map);const g=v.get(p);g===void 0?(a=kd(),v.set(p,a)):a=g}}const u=a;let d;if(a.s===aO)d=a.v;else if(d=e.apply(null,arguments),i++,r){const f=o?.deref?.()??o;f!=null&&r(f,d)&&(d=f,i!==0&&i--),o=typeof d=="object"&&d!==null||typeof d=="function"?new Nwe(d):d}return u.s=aO,u.v=d,d}return s.clearCache=()=>{n=kd(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function a3(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,s=0,a,l={},u=o.pop();typeof u=="object"&&(l=u,u=o.pop()),gwe(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const d={...n,...l},{memoize:f,memoizeOptions:m=[],argsMemoize:p=s3,argsMemoizeOptions:v=[],devModeChecks:g={}}=d,h=iO(m),b=iO(v),y=ywe(o),x=f(function(){return i++,u.apply(null,arguments)},...h);let w=!0;const C=p(function(){s++;const R=sO(y,arguments);if(a=x.apply(null,R),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:k,inputStabilityCheck:S}=xwe(w,g);if(k.shouldRun&&k.run(u,R,a),S.shouldRun){const P=sO(y,arguments);S.run({inputSelectorResults:R,inputSelectorResultsCopy:P},{memoize:f,memoizeOptions:h},arguments)}w&&(w=!1)}return a},...b);return Object.assign(C,{resultFunc:u,memoizedResultFunc:x,dependencies:y,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:f,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var Iwe=a3(s3),Awe=Object.assign((e,t=Iwe)=>{vwe(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(o=>e[o]);return t(r,(...o)=>o.reduce((i,s,a)=>(i[n[a]]=s,i),{}))},{withTypes:()=>Awe});a3({memoize:Rwe,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const Be=(e,t,n,r,o,i,...s)=>{if(s.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":Qr(1));let a;if(e)a=e;else throw new Error("Missing arguments");return a};var Bv={exports:{}},Hv={},lO;function Mwe(){if(lO)return Hv;lO=1;var e=ae;function t(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(f,m){var p=m(),v=r({inst:{value:p,getSnapshot:m}}),g=v[0].inst,h=v[1];return i(function(){g.value=p,g.getSnapshot=m,l(g)&&h({inst:g})},[f,p,m]),o(function(){return l(g)&&h({inst:g}),f(function(){l(g)&&h({inst:g})})},[f]),s(p),p}function l(f){var m=f.getSnapshot;f=f.value;try{var p=m();return!n(f,p)}catch{return!0}}function u(f,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return Hv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Hv}var cO={},uO;function Pwe(){return uO||(uO=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}function t(p,v){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=v();if(!f){var h=v();i(g,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}h=s({inst:{value:g,getSnapshot:v}});var b=h[0].inst,y=h[1];return l(function(){b.value=g,b.getSnapshot=v,n(b)&&y({inst:b})},[p,g,v]),a(function(){return n(b)&&y({inst:b}),p(function(){n(b)&&y({inst:b})})},[p]),u(g),g}function n(p){var v=p.getSnapshot;p=p.value;try{var g=v();return!i(p,g)}catch{return!0}}function r(p,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=ae,i=typeof Object.is=="function"?Object.is:e,s=o.useState,a=o.useEffect,l=o.useLayoutEffect,u=o.useDebugValue,d=!1,f=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;cO.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),cO}var dO;function UE(){return dO||(dO=1,process.env.NODE_ENV==="production"?Bv.exports=Mwe():Bv.exports=Pwe()),Bv.exports}var _we=UE(),Gv={exports:{}},Wv={},fO;function Twe(){if(fO)return Wv;fO=1;var e=ae,t=UE();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,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return Wv.useSyncExternalStoreWithSelector=function(u,d,f,m,p){var v=i(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=a(function(){function b(R){if(!y){if(y=!0,x=R,R=m(R),p!==void 0&&g.hasValue){var k=g.value;if(p(k,R))return w=k}return w=R}if(k=w,r(x,R))return k;var S=m(R);return p!==void 0&&p(k,S)?(x=R,k):(x=R,w=S)}var y=!1,x,w,C=f===void 0?null:f;return[function(){return b(d())},C===null?void 0:function(){return b(C())}]},[d,f,m,p]);var h=o(u,v[0],v[1]);return s(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},Wv}var pO={},mO;function Dwe(){return mO||(mO=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=ae,n=UE(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;pO.useSyncExternalStoreWithSelector=function(u,d,f,m,p){var v=i(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=a(function(){function b(R){if(!y){if(y=!0,x=R,R=m(R),p!==void 0&&g.hasValue){var k=g.value;if(p(k,R))return w=k}return w=R}if(k=w,r(x,R))return k;var S=m(R);return p!==void 0&&p(k,S)?(x=R,k):(x=R,w=S)}var y=!1,x,w,C=f===void 0?null:f;return[function(){return b(d())},C===null?void 0:function(){return b(C())}]},[d,f,m,p]);var h=o(u,v[0],v[1]);return s(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),pO}var hO;function Lwe(){return hO||(hO=1,process.env.NODE_ENV==="production"?Gv.exports=Twe():Gv.exports=Dwe()),Gv.exports}var jwe=Lwe();const Vwe=PE(19),Fwe=Vwe?zwe:Bwe;function he(e,t,n,r,o){return Fwe(e,t,n,r,o)}function $we(e,t,n,r,o){const i=c.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return _we.useSyncExternalStore(e.subscribe,i,i)}function zwe(e,t,n,r,o){return $we(e,t,n,r,o)}function Bwe(e,t,n,r,o){return jwe.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,r,o))}class Hwe{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 he(this,t,n,r,o)}}class Gwe extends Hwe{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){c.useDebugValue(t),lt(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;lt(()=>(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,s=>Object.keys(s));const o=c.useRef(Object.keys(t)).current,i=Object.keys(t);(o.length!==i.length||o.some((s,a)=>s!==i[a]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);lt(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){c.useDebugValue(t);const r=n!==void 0;if(lt(()=>{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 i=o.get(t);i!==void 0&&i!==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 i=this.selectors[t];return i(this.state,n,r,o)}useState(t,n,r,o){return c.useDebugValue(t),he(this,this.selectors[t],n,r,o)}useContextCallback(t,n){c.useDebugValue(t);const r=Qt(n??tr);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(i=>{const s=r(i);if(!Object.is(o,s)){const a=o;o=s,n(s,a,this)}})}}const Wwe={open:Be(e=>e.open),domReferenceElement:Be(e=>e.domReferenceElement),referenceElement:Be(e=>e.positionReference??e.referenceElement),floatingElement:Be(e=>e.floatingElement),floatingId:Be(e=>e.floatingId)};class Uwe extends Gwe{constructor(t){const{nested:n,noEmit:r,onOpenChange:o,triggerElements:i,...s}=t;super({...s,positionReference:s.referenceElement,domReferenceElement:s.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:gxe(),nested:n,noEmit:r,triggerElements:i},Wwe)}setOpen=(t,n)=>{if((!t||!this.state.open||Sz(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 qwe{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 Kwe(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=_E(),i=vxe()!=null;if(process.env.NODE_ENV!=="production"){const a=r.reference;a&&!xn(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 s=Co(()=>new Uwe({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new qwe,floatingId:o,nested:i,noEmit:!1})).current;return lt(()=>{const a={open:t,floatingId:o};r.reference!==void 0&&(a.referenceElement=r.reference,a.domReferenceElement=xn(r.reference)?r.reference:null),r.floating!==void 0&&(a.floatingElement=r.floating),s.update(a)},[t,o,r.reference,r.floating,s]),s.context.onOpenChange=n,s.context.nested=i,s.context.noEmit=!1,s}function Ywe(e={}){const{nodeId:t,externalTree:n}=e,r=Kwe(e),o=e.rootContext||r,i={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[s,a]=c.useState(null),l=c.useRef(null),u=$z(n);lt(()=>{i.domReference&&(l.current=i.domReference)},[i.domReference]);const d=Qz({...e,elements:{...i,...s&&{reference:s}}}),f=c.useCallback(k=>{const S=xn(k)?{getBoundingClientRect:()=>k.getBoundingClientRect(),getClientRects:()=>k.getClientRects(),contextElement:k}:k;a(S),d.refs.setReference(S)},[d.refs]),[m,p]=c.useState(null),[v,g]=c.useState(null);o.useSyncedValue("referenceElement",m),o.useSyncedValue("domReferenceElement",xn(m)?m:null),o.useSyncedValue("floatingElement",v);const h=c.useCallback(k=>{(xn(k)||k===null)&&(l.current=k,p(k)),(xn(d.refs.reference.current)||d.refs.reference.current===null||k!==null&&!xn(k))&&d.refs.setReference(k)},[d.refs,p]),b=c.useCallback(k=>{g(k),d.refs.setFloating(k)},[d.refs]),y=c.useMemo(()=>({...d.refs,setReference:h,setFloating:b,setPositionReference:f,domReference:l}),[d.refs,h,b,f]),x=c.useMemo(()=>({...d.elements,domReference:i.domReference}),[d.elements,i.domReference]),w=o.useState("open"),C=o.useState("floatingId"),R=c.useMemo(()=>({...d,dataRef:o.context.dataRef,open:w,onOpenChange:o.setOpen,events:o.context.events,floatingId:C,refs:y,elements:x,nodeId:t,rootStore:o}),[d,y,x,t,o,w,C]);return lt(()=>{o.context.dataRef.current.floatingContext=R;const k=u?.nodesRef.current.find(S=>S.id===t);k&&(k.context=R)}),c.useMemo(()=>({...d,context:R,refs:y,elements:x,rootStore:o}),[d,y,x,R,o])}function Xwe(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,o=n.useState("open"),{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:u=!0,resetMs:d=750,selectedIndex:f=null}=t,m=Oc(),p=c.useRef(""),v=c.useRef(f??s??-1),g=c.useRef(null);lt(()=>{!o&&f!==null||(m.clear(),g.current=null,p.current!==""&&(p.current=""))},[o,f,m]),lt(()=>{o&&p.current===""&&(v.current=f??s??-1)},[o,f,s]);const h=Qt(C=>{C?r.current.typing||(r.current.typing=C,l?.(C)):r.current.typing&&(r.current.typing=C,l?.(C))}),b=Qt(C=>{function R(_,O,B){const I=O.find(V=>V?.toLocaleLowerCase().indexOf(B.toLocaleLowerCase())===0);return I?_.indexOf(I):-1}const k=i.current;if(p.current.length>0&&p.current[0]!==" "&&(R(k,k,p.current)===-1?h(!1):C.key===" "&&_r(C)),k==null||C.key.length!==1||C.ctrlKey||C.metaKey||C.altKey)return;o&&C.key!==" "&&(_r(C),h(!0));const S=p.current==="";S&&(v.current=f??s??-1),k.every(_=>_?_[0]?.toLocaleLowerCase()!==_[1]?.toLocaleLowerCase():!0)&&p.current===C.key&&(p.current="",v.current=g.current),p.current+=C.key,m.start(d,()=>{p.current="",v.current=g.current,h(!1)});const P=S?f??s??-1:v.current,L=R(k,[...k.slice((P||0)+1),...k.slice(0,(P||0)+1)],p.current);L!==-1?(a?.(L),g.current=L):C.key!==" "&&(p.current="",h(!1))}),y=Qt(C=>{const R=C.relatedTarget,k=n.select("domReferenceElement"),S=n.select("floatingElement"),P=Gt(k,R),L=Gt(S,R);P||L||(m.clear(),p.current="",v.current=g.current,h(!1))}),x=c.useMemo(()=>({onKeyDown:b,onBlur:y}),[b,y]),w=c.useMemo(()=>({onKeyDown:b,onKeyUp(C){C.key===" "&&h(!1)},onBlur:y}),[b,y,h]);return c.useMemo(()=>u?{reference:x,floating:w}:{},[u,x,w])}let qE=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Rc.startingStyle]="startingStyle",e[e.endingStyle=Rc.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),Jy=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Zwe={[Jy.popupOpen]:""},Jwe={[Jy.popupOpen]:"",[Jy.pressed]:""},Qwe={[qE.open]:""},e0e={[qE.closed]:""},t0e={[qE.anchorHidden]:""},n0e={open(e){return e?Zwe:null}},r0e={open(e){return e?Jwe:null}},l3={open(e){return e?Qwe:e0e},anchorHidden(e){return e?t0e:null}};function o0e(e){return PE(19)?e:e?"true":void 0}const c3=c.forwardRef(function(e,t){const{cutout:n,...r}=e;let o;if(n){const i=n?.getBoundingClientRect();o=`polygon(
|
|
341
|
+
0% 0%,
|
|
342
|
+
100% 0%,
|
|
343
|
+
100% 100%,
|
|
344
|
+
0% 100%,
|
|
345
|
+
0% 0%,
|
|
346
|
+
${i.left}px ${i.top}px,
|
|
347
|
+
${i.left}px ${i.bottom}px,
|
|
348
|
+
${i.right}px ${i.bottom}px,
|
|
349
|
+
${i.right}px ${i.top}px,
|
|
350
|
+
${i.left}px ${i.top}px
|
|
351
|
+
)`}return E.jsx("div",{ref:t,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})});process.env.NODE_ENV!=="production"&&(c3.displayName="InternalBackdrop");const u3=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(u3.displayName="ComboboxRootContext");const d3=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(d3.displayName="ComboboxFloatingContext");const f3=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(f3.displayName="ComboboxDerivedItemsContext");const p3=c.createContext("");process.env.NODE_ENV!=="production"&&(p3.displayName="ComboboxInputValueContext");function Br(){const e=c.useContext(u3);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.":Qr(22));return e}function Oh(){const e=c.useContext(d3);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.":Qr(23));return e}function vs(){const e=c.useContext(f3);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.":Qr(24));return e}function KE(){return c.useContext(p3)}function Vp(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function m3(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:Vp(r,t,n))}function i0e(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function s0e(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(i0e(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}const ye={id:Be(e=>e.id),query:Be(e=>e.query),items:Be(e=>e.items),selectedValue:Be(e=>e.selectedValue),hasSelectionChips:Be(e=>{const t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:Be(e=>{const{selectedValue:t,selectionMode:n}=e;return t==null?!1:n==="multiple"&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:Be((e,t)=>t?s0e(e.items):!1),open:Be(e=>e.open),mounted:Be(e=>e.mounted),forceMounted:Be(e=>e.forceMounted),inline:Be(e=>e.inline),activeIndex:Be(e=>e.activeIndex),selectedIndex:Be(e=>e.selectedIndex),isActive:Be((e,t)=>e.activeIndex===t),isSelected:Be((e,t)=>{const n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(o=>Vp(t,o,n)):Vp(t,r,n)}),transitionStatus:Be(e=>e.transitionStatus),popupProps:Be(e=>e.popupProps),inputProps:Be(e=>e.inputProps),triggerProps:Be(e=>e.triggerProps),getItemProps:Be(e=>e.getItemProps),positionerElement:Be(e=>e.positionerElement),listElement:Be(e=>e.listElement),triggerElement:Be(e=>e.triggerElement),inputElement:Be(e=>e.inputElement),popupSide:Be(e=>e.popupSide),openMethod:Be(e=>e.openMethod),inputInsidePopup:Be(e=>e.inputInsidePopup),selectionMode:Be(e=>e.selectionMode),listRef:Be(e=>e.listRef),labelsRef:Be(e=>e.labelsRef),popupRef:Be(e=>e.popupRef),emptyRef:Be(e=>e.emptyRef),inputRef:Be(e=>e.inputRef),keyboardActiveRef:Be(e=>e.keyboardActiveRef),chipsContainerRef:Be(e=>e.chipsContainerRef),clearRef:Be(e=>e.clearRef),valuesRef:Be(e=>e.valuesRef),allValuesRef:Be(e=>e.allValuesRef),name:Be(e=>e.name),disabled:Be(e=>e.disabled),readOnly:Be(e=>e.readOnly),required:Be(e=>e.required),grid:Be(e=>e.grid),isGrouped:Be(e=>e.isGrouped),virtualized:Be(e=>e.virtualized),onOpenChangeComplete:Be(e=>e.onOpenChangeComplete),openOnInputClick:Be(e=>e.openOnInputClick),itemToStringLabel:Be(e=>e.itemToStringLabel),isItemEqualToValue:Be(e=>e.isItemEqualToValue),modal:Be(e=>e.modal),autoHighlight:Be(e=>e.autoHighlight),submitOnItemClick:Be(e=>e.submitOnItemClick)};let gO=(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 a0e={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},l0e={valid(e){return e===null?null:e?{[gO.valid]:""}:{[gO.invalid]:""}}},h3=c.createContext({invalid:void 0,name:void 0,validityData:{state:a0e,errors:[],error:"",value:"",initialValue:null},setValidityData:tr,disabled:void 0,touched:!1,setTouched:tr,dirty:!1,setDirty:tr,filled:!1,setFilled:tr,focused:!1,setFocused:tr,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=pr)=>e,getInputValidationProps:(e=pr)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(h3.displayName="FieldRootContext");function YE(e=!0){const t=c.useContext(h3);if(t.setValidityData===tr&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Qr(28));return t}const c0e=c.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:tr,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(c0e.displayName="FormContext");const g3=c.createContext({controlId:void 0,registerControlId:tr,labelId:void 0,setLabelId:tr,messageIds:[],setMessageIds:tr,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(g3.displayName="LabelableContext");function XE(){return c.useContext(g3)}function u0e(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:i}=XE(),s=TE(t),a=n?o:void 0,l=Co(()=>Symbol("labelable-control")),u=c.useRef(!1),d=c.useRef(t!=null),f=Qt(()=>{!u.current||i===tr||(u.current=!1,i(l.current,void 0))});return lt(()=>{if(i===tr)return;let m;if(n){const p=r?.current;xn(p)&&p.closest("label")!=null?m=t??null:m=a??s}else if(t!=null)d.current=!0,m=t;else if(d.current)m=s;else{f();return}if(m===void 0){f();return}u.current=!0,i(l.current,m)},[t,r,a,i,n,s,l,f]),c.useEffect(()=>f,[f]),o??s}const v3={...r0e,...l0e,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null};function d0e(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 o=parseFloat(n.width)||0,i=parseFloat(n.height)||0,s=parseFloat(r.width)||0,a=parseFloat(r.height)||0,l=Math.max(t.width,o,s),u=Math.max(t.height,i,a),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}const Rd=2,f0e=c.forwardRef(function(e,t){const{render:n,className:r,nativeButton:o=!0,disabled:i=!1,id:s,...a}=e,{state:l,disabled:u,setTouched:d,setFocused:f,validationMode:m,validation:p}=YE(),{labelId:v}=XE(),g=Br(),{filteredItems:h}=vs(),b=he(g,ye.selectionMode),y=he(g,ye.disabled),x=he(g,ye.readOnly),w=he(g,ye.required),C=he(g,ye.mounted),R=he(g,ye.popupSide),k=he(g,ye.positionerElement),S=he(g,ye.listElement),P=he(g,ye.triggerProps),L=he(g,ye.triggerElement),_=he(g,ye.inputInsidePopup),O=he(g,ye.id),B=he(g,ye.open),I=he(g,ye.selectedValue),V=he(g,ye.activeIndex),F=he(g,ye.selectedIndex),D=he(g,ye.hasSelectedValue),T=Oh(),q=KE(),A=Oc(),ee=u||y||i,ie=h.length===0,Y=C&&k?R:null;u0e({id:_?s:void 0});const Q=_?s??O:s,X=c.useRef("");function J(j){X.current=j.pointerType}const te=T.useState("domReferenceElement");c.useEffect(()=>{_&&L&&L!==te&&T.set("domReferenceElement",L)},[L,te,T,_]);const{reference:le}=Xwe(T,{enabled:!B&&!x&&!y&&b==="single",listRef:g.state.labelsRef,activeIndex:V,selectedIndex:F,onMatch(j){const K=g.state.valuesRef.current[j];K!==void 0&&g.state.setSelectedValue(K,Kt("none"))}}),{reference:z}=Ixe(T,{enabled:!x&&!y,event:"mousedown"}),{buttonRef:re,getButtonProps:oe}=Ch({native:o,disabled:ee}),M={...l,open:B,disabled:ee,popupSide:Y,listEmpty:ie,placeholder:!D},N=Qt(j=>{g.set("triggerElement",j)});return Kn("button",e,{ref:[t,re,N],state:M,props:[P,z,le,{id:Q,tabIndex:_?0:-1,role:_?"combobox":void 0,"aria-expanded":B?"true":"false","aria-haspopup":_?"dialog":"listbox","aria-controls":B?S?.id:void 0,"aria-required":_&&w||void 0,"aria-labelledby":v,onPointerDown:J,onPointerEnter:J,onFocus(){f(!0),!(ee||x)&&A.start(0,g.state.forceMount)},onBlur(j){if(!Gt(k,j.relatedTarget)&&(d(!0),f(!1),m==="onBlur")){const K=b==="none"?q:I;p.commit(K)}},onMouseDown(j){if(ee||x||(_||T.set("domReferenceElement",j.currentTarget),g.state.forceMount(),X.current!=="touch"&&(g.state.inputRef.current?.focus(),_||j.preventDefault()),B))return;const K=Sn(j.currentTarget);function H(U){if(!L)return;const $=oc(U),W=g.state.positionerElement,Z=g.state.listElement;if(Gt(L,$)||Gt(W,$)||Gt(Z,$)||$===L)return;const G=d0e(L),ne=U.clientX>=G.left-Rd&&U.clientX<=G.right+Rd,we=U.clientY>=G.top-Rd&&U.clientY<=G.bottom+Rd;ne&&we||g.state.setOpen(!1,Kt("cancel-open",U))}_&&K.addEventListener("mouseup",H,{once:!0})},onKeyDown(j){ee||x||(j.key==="ArrowDown"||j.key==="ArrowUp")&&(_r(j),g.state.setOpen(!0,Kt(vz,j.nativeEvent)),g.state.inputRef.current?.focus())}},p?p.getValidationProps(a):a,oe],stateAttributesMapping:v3})});process.env.NODE_ENV!=="production"&&(f0e.displayName="ComboboxTrigger");const ZE=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(ZE.displayName="ComboboxChipsContext");function b3(){return c.useContext(ZE)}const JE=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(JE.displayName="ComboboxPositionerContext");function QE(e){const t=c.useContext(JE);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":Qr(21));return t}const p0e=c.forwardRef(function(e,t){const{render:n,className:r,disabled:o=!1,id:i,...s}=e,{state:a,disabled:l,setTouched:u,setFocused:d,validationMode:f,validation:m}=YE(),{labelId:p}=XE(),v=b3(),g=!!QE(!0),h=Br(),{filteredItems:b}=vs(),y=KE(),x=uz(),w=he(h,ye.required),C=he(h,ye.disabled),R=he(h,ye.readOnly),k=he(h,ye.name),S=he(h,ye.selectionMode),P=he(h,ye.autoHighlight),L=he(h,ye.inputProps),_=he(h,ye.triggerProps),O=he(h,ye.open),B=he(h,ye.mounted),I=he(h,ye.selectedValue),V=he(h,ye.popupSide),F=he(h,ye.positionerElement),D=he(h,ye.id),T=he(h,ye.inline),q=!!P,A=B&&F?V:null,ee=l||C||o,ie=b.length===0,Y=TE(i??(g||T?void 0:D)),[Q,X]=c.useState(null),J=c.useRef(!1),te=c.useRef(null),le=c.useRef(!1),z=Qt(M=>{const N=g||h.state.inline;N&&!h.state.hasInputValue&&h.state.setInputValue("",Kt(uf)),h.update({inputElement:M,inputInsidePopup:N})}),re={...a,open:O,disabled:ee,readOnly:R,popupSide:A,listEmpty:ie};function oe(M){if(!v)return;let N;const{highlightedChipIndex:j}=v;if(j!==void 0){if(M.key==="ArrowLeft")M.preventDefault(),j>0?N=j-1:N=void 0;else if(M.key==="ArrowRight")M.preventDefault(),j<I.length-1?N=j+1:N=void 0;else if(M.key==="Backspace"||M.key==="Delete"){M.preventDefault();const K=j>=I.length-1?I.length-2:j;N=K>=0?K:void 0,h.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return N}return M.key==="ArrowLeft"&&(M.currentTarget.selectionStart??0)===0&&I.length>0?(M.preventDefault(),N=Math.max(I.length-1,0)):M.key==="Backspace"&&M.currentTarget.value===""&&I.length>0&&(h.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),M.preventDefault()),N}return Kn("input",e,{state:re,ref:[t,h.state.inputRef,z],props:[L,_,{type:"text",value:e.value??Q??y,"aria-readonly":R||void 0,"aria-required":w||void 0,"aria-labelledby":p,disabled:ee,readOnly:R,required:S==="none"?w:void 0,...S==="none"&&k&&{name:k},id:Y,onFocus(){if(d(!0),!T||!le.current)return;le.current=!1;const M=te.current;M==null||!Object.hasOwn(h.state.valuesRef.current,M)||h.state.setIndices({activeIndex:M})},onBlur(){u(!0),d(!1);const M=h.state.activeIndex;if(T&&M!==null&&P!=="always"&&(te.current=M,le.current=!0,h.state.setIndices({activeIndex:null})),f==="onBlur"){const N=S==="none"?y:I;m.commit(N)}},onCompositionStart(M){Np||(J.current=!0,X(M.currentTarget.value))},onCompositionEnd(M){J.current=!1;const N=M.currentTarget.value;X(null),h.state.setInputValue(N,Kt(bd,M.nativeEvent))},onChange(M){const N=M.nativeEvent.inputType,j=!N||N==="insertReplacementText",K=J.current||!j;if(J.current){const W=M.currentTarget.value;X(W),W===""&&!h.state.openOnInputClick&&!h.state.inputInsidePopup&&h.state.setOpen(!1,Kt(IN,M.nativeEvent));const Z=W.trim(),G=q&&Z!=="";!R&&!ee&&Z&&K&&(h.state.setOpen(!0,Kt(bd,M.nativeEvent)),q||h.state.setIndices({activeIndex:null,selectedIndex:null,type:h.state.keyboardActiveRef.current?"keyboard":"pointer"})),O&&h.state.activeIndex!==null&&!G&&h.state.setIndices({activeIndex:null,selectedIndex:null,type:h.state.keyboardActiveRef.current?"keyboard":"pointer"});return}h.state.setInputValue(M.currentTarget.value,Kt(bd,M.nativeEvent));const H=M.currentTarget.value==="",U=Kt(IN,M.nativeEvent);H&&!h.state.inputInsidePopup&&(S==="single"&&h.state.setSelectedValue(null,U),h.state.openOnInputClick||h.state.setOpen(!1,U));const $=M.currentTarget.value.trim();!R&&!ee&&$&&K&&(h.state.setOpen(!0,Kt(bd,M.nativeEvent)),q||h.state.setIndices({activeIndex:null,selectedIndex:null,type:h.state.keyboardActiveRef.current?"keyboard":"pointer"})),O&&h.state.activeIndex!==null&&!q&&h.state.setIndices({activeIndex:null,selectedIndex:null,type:h.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(M){if(ee||R||M.ctrlKey||M.shiftKey||M.altKey||M.metaKey)return;h.state.keyboardActiveRef.current=!0;const N=M.currentTarget,j=N.scrollWidth-N.clientWidth,K=x==="rtl";if(M.key==="Home"){_r(M);const $=TN&&K?N.value.length:0;N.setSelectionRange($,$),N.scrollLeft=0;return}if(M.key==="End"){_r(M);const $=TN&&K?0:N.value.length;N.setSelectionRange($,$),N.scrollLeft=K?-j:j;return}if(!B&&M.key==="Escape"){const $=S==="multiple"&&Array.isArray(I)?I.length===0:I===null,W=Kt(pye,M.nativeEvent),Z=S==="multiple"?[]:null;h.state.setInputValue("",W),h.state.setSelectedValue(Z,W),!$&&!h.state.inline&&!W.isPropagationAllowed&&M.stopPropagation();return}if(v&&M.key==="Backspace"&&N.value===""&&v.highlightedChipIndex===void 0&&Array.isArray(I)&&I.length>0){const $=I.slice(0,-1);h.state.setIndices({activeIndex:null,selectedIndex:null,type:h.state.keyboardActiveRef.current?"keyboard":"pointer"}),h.state.setSelectedValue($,Kt(uf,M.nativeEvent));return}const H=v?.highlightedChipIndex!==void 0,U=oe(M);if(v?.setHighlightedChipIndex(U),U!==void 0?v?.chipsRef.current[U]?.focus():H&&h.state.inputRef.current?.focus(),M.which!==229&&M.key==="Enter"&&O){const $=h.state.activeIndex,W=M.nativeEvent;if($===null){h.state.setOpen(!1,Kt(uf,W));return}_r(M);const Z=h.state.listRef.current[$];Z&&(h.state.selectionEventRef.current=W,Z.click(),h.state.selectionEventRef.current=null)}},onPointerMove(){h.state.keyboardActiveRef.current=!1},onPointerDown(){h.state.keyboardActiveRef.current=!1}},m?m.getValidationProps(s):s],stateAttributesMapping:v3})});process.env.NODE_ENV!=="production"&&(p0e.displayName="ComboboxInput");const m0e={...yz,...n0e},h0e=c.forwardRef(function(e,t){const{render:n,className:r,disabled:o=!1,nativeButton:i=!0,keepMounted:s=!1,...a}=e,{disabled:l}=YE(),u=Br(),d=he(u,ye.selectionMode),f=he(u,ye.disabled),m=he(u,ye.readOnly),p=he(u,ye.open),v=he(u,ye.selectedValue),g=he(u,ye.hasSelectionChips),h=KE();let b=!1;d==="none"?b=h!=="":d==="single"?b=v!=null:b=g;const y=l||f||o,{buttonRef:x,getButtonProps:w}=Ch({native:i,disabled:y}),{mounted:C,transitionStatus:R,setMounted:k}=xye(b),S={disabled:y,open:p,transitionStatus:R};jz({open:b,ref:u.state.clearRef,onComplete(){b||k(!1)}});const P=Kn("button",e,{state:S,ref:[t,x,u.state.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(L){L.preventDefault()},onClick(L){if(y||m)return;const _=u.state.keyboardActiveRef;u.state.setInputValue("",Kt(ON,L.nativeEvent)),d!=="none"?(u.state.setSelectedValue(Array.isArray(v)?[]:null,Kt(ON,L.nativeEvent)),u.state.setIndices({activeIndex:null,selectedIndex:null,type:_.current?"keyboard":"pointer"})):u.state.setIndices({activeIndex:null,type:_.current?"keyboard":"pointer"}),u.state.inputRef.current?.focus()}},a,w],stateAttributesMapping:m0e});return s||C?P:null});process.env.NODE_ENV!=="production"&&(h0e.displayName="ComboboxClear");const eC=c.createContext(null);process.env.NODE_ENV!=="production"&&(eC.displayName="GroupCollectionContext");function g0e(){return c.useContext(eC)}function v0e(e){const{children:t,items:n}=e,r=c.useMemo(()=>({items:n}),[n]);return E.jsx(eC.Provider,{value:r,children:t})}function b0e(e){const{children:t}=e,{filteredItems:n}=vs(),r=g0e(),o=r?r.items:n;return o?E.jsx(c.Fragment,{children:o.map(t)}):null}const y0e=c.forwardRef(function(e,t){var n;const{render:r,className:o,children:i,...s}=e,a=Br(),l=Oh(),u=!!QE(!0),{filteredItems:d}=vs(),f=he(a,ye.items),m=he(a,ye.labelsRef),p=he(a,ye.listRef),v=he(a,ye.selectionMode),g=he(a,ye.grid),h=he(a,ye.popupProps),b=he(a,ye.disabled),y=he(a,ye.readOnly),x=he(a,ye.virtualized),w=v==="multiple",C=d.length===0,R=Qt(O=>{a.set("positionerElement",O)}),k=Qt(O=>{a.set("listElement",O)}),S=c.useMemo(()=>typeof i=="function"?n||(n=E.jsx(b0e,{children:i})):i,[i]),P={empty:C},L=l.useState("floatingId"),_=Kn("div",e,{state:P,ref:[t,k,u?null:R],props:[h,{children:S,tabIndex:-1,id:L,role:g?"grid":"listbox","aria-multiselectable":w?"true":void 0,onKeyDown(O){if(!(b||y)&&O.key==="Enter"){const B=a.state.activeIndex;if(B==null)return;_r(O);const I=O.nativeEvent,V=a.state.listRef.current[B];V&&(a.state.selectionEventRef.current=I,V.click(),a.state.selectionEventRef.current=null)}},onKeyDownCapture(){a.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){a.state.keyboardActiveRef.current=!1}},s]});return x?_:E.jsx(lz,{elementsRef:p,labelsRef:f?void 0:m,children:_})});process.env.NODE_ENV!=="production"&&(y0e.displayName="ComboboxList");const tC=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(tC.displayName="ComboboxPortalContext");function x0e(){const e=c.useContext(tC);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Portal> is missing.":Qr(20));return e}const w0e=c.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,o=Br(),i=he(o,ye.mounted),s=he(o,ye.forceMounted);return i||n||s?E.jsx(tC.Provider,{value:n,children:E.jsx(Gz,{ref:t,...r})}):null});process.env.NODE_ENV!=="production"&&(w0e.displayName="ComboboxPortal");const E0e=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:d=0,offsetParent:f="real"}=ko(e,t)||{};if(u==null)return{};const m=BE(d),p={x:n,y:r},v=Rh(o),g=kh(v),h=await s.getDimensions(u),b=v==="y",y=b?"top":"left",x=b?"bottom":"right",w=b?"clientHeight":"clientWidth",C=i.reference[g]+i.reference[v]-p[v]-i.floating[g],R=p[v]-i.reference[v],k=f==="real"?await s.getOffsetParent?.(u):a.floating;let S=a.floating[w]||i.floating[g];(!S||!await s.isElement?.(k))&&(S=a.floating[w]||i.floating[g]);const P=C/2-R/2,L=S/2-h[g]/2-1,_=Math.min(m[y],L),O=Math.min(m[x],L),B=_,I=S-h[g]-O,V=S/2-h[g]/2+P,F=Ip(B,V,I),D=!l.arrow&&si(o)!=null&&V!==F&&i.reference[g]/2-(V<B?_:O)-h[g]/2<0,T=D?V<B?V-B:V-I:0;return{[v]:p[v]+T,data:{[v]:F,centerOffset:V-F-T,...D&&{alignmentOffset:T}},reset:D}}}),C0e=(e,t)=>({...E0e(e),options:[e,t]}),k0e={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,i=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:(await i3().fn(e)).data?.referenceHidden||i}}}},R0e={sideX:"left",sideY:"top"};function y3(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 vO(e,t,n){const{rects:r,placement:o}=e;return{side:y3(t,br(o),n),align:si(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function S0e(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,collisionBoundary:a,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,keepMounted:m=!1,floatingRootContext:p,mounted:v,collisionAvoidance:g,shiftCrossAxis:h=!1,nodeId:b,adaptiveOrigin:y,lazyFlip:x=!1,externalTree:w}=e,[C,R]=c.useState(null);!v&&C!==null&&R(null);const k=g.side||"flip",S=g.align||"flip",P=g.fallbackAxisSide||"end",L=typeof t=="function"?t:void 0,_=Qt(L),O=L?_:t,B=Xa(t),I=uz()==="rtl",V=C||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":I?"left":"right","inline-start":I?"right":"left"}[r],F=i==="center"?V:`${V}-${i}`;let D=l;const T=1,q=r==="bottom"?T:0,A=r==="top"?T:0,ee=r==="right"?T:0,ie=r==="left"?T:0;typeof D=="number"?D={top:D+q,right:D+ie,bottom:D+A,left:D+ee}:D&&(D={top:(D.top||0)+q,right:(D.right||0)+ie,bottom:(D.bottom||0)+A,left:(D.left||0)+ee});const Y={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:D},Q=c.useRef(null),X=Xa(o),J=Xa(s),te=[e3(se=>{const Ee=vO(se,r,I),Se=typeof X.current=="function"?X.current(Ee):X.current,Pe=typeof J.current=="function"?J.current(Ee):J.current;return{mainAxis:Se,crossAxis:Pe,alignmentAxis:Pe}},[typeof o!="function"?o:0,typeof s!="function"?s:0,I,r])],le=S==="none"&&k!=="shift",z=!le&&(u||h||k==="shift"),re=k==="none"?null:r3({...Y,padding:{top:D.top+T,right:D.right+T,bottom:D.bottom+T,left:D.left+T},mainAxis:!h&&k==="flip",crossAxis:S==="flip"?"alignment":!1,fallbackAxisSideDirection:P}),oe=le?null:t3(se=>{const Ee=Sn(se.elements.floating).documentElement;return{...Y,rootBoundary:h?{x:0,y:0,width:Ee.clientWidth,height:Ee.clientHeight}:void 0,mainAxis:S!=="none",crossAxis:z,limiter:u||h?void 0:n3(Se=>{if(!Q.current)return{};const{width:Pe,height:Ce}=Q.current.getBoundingClientRect(),ke=Ir(br(Se.placement)),pt=ke==="y"?Pe:Ce,gt=ke==="y"?D.left+D.right:D.top+D.bottom;return{offset:pt/2+gt/2}})}},[Y,u,h,D,S]);k==="shift"||S==="shift"||i==="center"?te.push(oe,re):te.push(re,oe),te.push(o3({...Y,apply({elements:{floating:se},rects:{reference:Ee},availableWidth:Se,availableHeight:Pe}){const Ce=se.style;Ce.setProperty("--available-width",`${Se}px`),Ce.setProperty("--available-height",`${Pe}px`),Ce.setProperty("--anchor-width",`${Ee.width}px`),Ce.setProperty("--anchor-height",`${Ee.height}px`)}}),C0e(()=>({element:Q.current||document.createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(se){const{elements:Ee,middlewareData:Se,placement:Pe,rects:Ce,y:ke}=se,pt=br(Pe),gt=Ir(pt),un=Q.current,Vt=Se.arrow?.x||0,rr=Se.arrow?.y||0,vt=un?.clientWidth||0,Gr=un?.clientHeight||0,jt=Vt+vt/2,Dt=rr+Gr/2,or=Math.abs(Se.shift?.y||0),Xn=Ce.reference.height/2,mt=typeof o=="function"?o(vO(se,r,I)):o,Cr=or>mt,$n={top:`${jt}px calc(100% + ${mt}px)`,bottom:`${jt}px ${-mt}px`,left:`calc(100% + ${mt}px) ${Dt}px`,right:`${-mt}px ${Dt}px`}[pt],dn=`${jt}px ${Ce.reference.y+Xn-ke}px`;return Ee.floating.style.setProperty("--transform-origin",z&>==="y"&&Cr?dn:$n),{}}},k0e,y),lt(()=>{!v&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[v,p]);const M=c.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:N,elements:j,x:K,y:H,middlewareData:U,update:$,placement:W,context:Z,isPositioned:G,floatingStyles:ne}=Ywe({rootContext:p,placement:F,middleware:te,strategy:n,whileElementsMounted:m?void 0:(...se)=>Zy(...se,M),nodeId:b,externalTree:w}),{sideX:we,sideY:Ve}=U.adaptiveOrigin||R0e,Ye=G?n:"fixed",ft=c.useMemo(()=>{const se=y?{position:Ye,[we]:K,[Ve]:H}:{position:Ye,...ne};return G||(se.opacity=0),se},[y,Ye,we,K,Ve,H,ne,G]),qe=c.useRef(null);lt(()=>{if(!v)return;const se=B.current,Ee=typeof se=="function"?se():se,Se=(bO(Ee)?Ee.current:Ee)||null||null;Se!==qe.current&&(N.setPositionReference(Se),qe.current=Se)},[v,N,O,B]),c.useEffect(()=>{if(!v)return;const se=B.current;typeof se!="function"&&bO(se)&&se.current!==qe.current&&(N.setPositionReference(se.current),qe.current=se.current)},[v,N,O,B]),c.useEffect(()=>{if(m&&v&&j.domReference&&j.floating)return Zy(j.domReference,j.floating,$,M)},[m,v,j,$,M]);const ce=br(W),Ke=y3(r,ce,I),ot=si(W)||"center",Lt=!!U.hide?.referenceHidden;lt(()=>{x&&v&&G&&R(ce)},[x,v,G,ce]);const Ft=c.useMemo(()=>({position:"absolute",top:U.arrow?.y,left:U.arrow?.x}),[U.arrow]),Tt=U.arrow?.centerOffset!==0;return c.useMemo(()=>({positionerStyles:ft,arrowStyles:Ft,arrowRef:Q,arrowUncentered:Tt,side:Ke,align:ot,physicalSide:ce,anchorHidden:Lt,refs:N,context:Z,isPositioned:G,update:$}),[ft,Ft,Q,Tt,Ke,ot,ce,Lt,N,Z,G,$])}function bO(e){return e!=null&&"current"in e}function x3(e){return e==="starting"?tye:pr}const N0e=c.forwardRef(function(e,t){const{render:n,className:r,anchor:o,positionMethod:i="absolute",side:s="bottom",align:a="center",sideOffset:l=0,alignOffset:u=0,collisionBoundary:d="clipping-ancestors",collisionPadding:f=5,arrowPadding:m=5,sticky:p=!1,disableAnchorTracking:v=!1,collisionAvoidance:g=rye,...h}=e,b=Br(),{filteredItems:y}=vs(),x=Oh(),w=x0e(),C=he(b,ye.modal),R=he(b,ye.open),k=he(b,ye.mounted),S=he(b,ye.openMethod),P=he(b,ye.triggerElement),L=he(b,ye.inputElement),_=he(b,ye.inputInsidePopup),O=he(b,ye.transitionStatus),B=y.length===0,I=S0e({anchor:o??(_?P:L),floatingRootContext:x,positionMethod:i,mounted:k,side:s,sideOffset:l,align:a,alignOffset:u,arrowPadding:m,collisionBoundary:d,collisionPadding:f,sticky:p,disableAnchorTracking:v,keepMounted:w,collisionAvoidance:g,lazyFlip:!0});mxe(R&&C&&S!=="touch",P);const V=c.useMemo(()=>{const A={...I.positionerStyles};return R||(A.pointerEvents="none"),{role:"presentation",hidden:!k,style:A}},[R,k,I.positionerStyles]),F={open:R,side:I.side,align:I.align,anchorHidden:I.anchorHidden,empty:B};lt(()=>{b.set("popupSide",I.side)},[b,I.side]);const D=c.useMemo(()=>({side:I.side,align:I.align,arrowRef:I.arrowRef,arrowUncentered:I.arrowUncentered,arrowStyles:I.arrowStyles,anchorHidden:I.anchorHidden,isPositioned:I.isPositioned}),[I.side,I.align,I.arrowRef,I.arrowUncentered,I.arrowStyles,I.anchorHidden,I.isPositioned]),T=Qt(A=>{b.set("positionerElement",A)}),q=Kn("div",e,{state:F,ref:[t,T],props:[V,x3(O),h],stateAttributesMapping:l3});return E.jsxs(JE.Provider,{value:D,children:[k&&C&&E.jsx(c3,{inert:o0e(!R),cutout:L??P}),q]})});process.env.NODE_ENV!=="production"&&(N0e.displayName="ComboboxPositioner");const O0e={...l3,...yz},I0e=c.forwardRef(function(e,t){const{render:n,className:r,initialFocus:o,finalFocus:i,...s}=e,a=Br(),l=QE(),u=Oh(),{filteredItems:d}=vs(),f=he(a,ye.mounted),m=he(a,ye.open),p=he(a,ye.openMethod),v=he(a,ye.transitionStatus),g=he(a,ye.inputInsidePopup),h=he(a,ye.inputElement),b=d.length===0;jz({open:m,ref:a.state.popupRef,onComplete(){m&&a.state.onOpenChangeComplete(!0)}});const y={open:m,side:l.side,align:l.align,anchorHidden:l.anchorHidden,transitionStatus:v,empty:b},x=Kn("div",e,{state:y,ref:[t,a.state.popupRef],props:[{role:g?"dialog":"presentation",tabIndex:-1,onFocus(R){const k=oc(R.nativeEvent);p!=="touch"&&(Gt(a.state.listElement,k)||k===R.currentTarget)&&a.state.inputRef.current?.focus()}},x3(v),s],stateAttributesMapping:O0e}),w=o===void 0?g?R=>R==="touch"?a.state.popupRef.current:h:!1:o;let C;return i!=null?C=i:C=g?void 0:!1,E.jsx(Oxe,{context:u,disabled:!f,modal:!g,openInteractionType:p,initialFocus:w,returnFocus:C,children:x})});process.env.NODE_ENV!=="production"&&(I0e.displayName="ComboboxPopup");const nC=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(nC.displayName="ComboboxGroupContext");function A0e(){const e=c.useContext(nC);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>.":Qr(18));return e}const M0e=c.forwardRef(function(e,t){const{render:n,className:r,items:o,...i}=e,[s,a]=c.useState(),l=c.useMemo(()=>({labelId:s,setLabelId:a,items:o}),[s,a,o]),u=Kn("div",e,{ref:t,props:[{role:"group","aria-labelledby":s},i]}),d=E.jsx(nC.Provider,{value:l,children:u});return o?E.jsx(v0e,{items:o,children:d}):d});process.env.NODE_ENV!=="production"&&(M0e.displayName="ComboboxGroup");const P0e=c.forwardRef(function(e,t){const{render:n,className:r,id:o,...i}=e,{setLabelId:s}=A0e(),a=TE(o);return lt(()=>(s(a),()=>{s(void 0)}),[a,s]),Kn("div",e,{ref:t,props:[{id:a},i]})});process.env.NODE_ENV!=="production"&&(P0e.displayName="ComboboxGroupLabel");const w3=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(w3.displayName="ComboboxItemContext");const E3=c.createContext(!1);process.env.NODE_ENV!=="production"&&(E3.displayName="ComboboxRowContext");function _0e(){return c.useContext(E3)}const T0e=c.memo(c.forwardRef(function(e,t){const{render:n,className:r,value:o=null,index:i,disabled:s=!1,nativeButton:a=!1,...l}=e,u=c.useRef(!1),d=c.useRef(null),f=wz({index:i,textRef:d,indexGuessBehavior:xz.GuessFromOrder}),m=Br(),p=_0e(),{flatFilteredItems:v,hasItems:g}=vs(),h=he(m,ye.open),b=he(m,ye.selectionMode),y=he(m,ye.readOnly),x=he(m,ye.virtualized),w=he(m,ye.isItemEqualToValue),C=b!=="none",R=i??(x?m3(v,o,w):f.index),k=f.index!==-1,S=he(m,ye.id),P=he(m,ye.isActive,R),L=he(m,ye.isSelected,o),_=he(m,ye.getItemProps),O=c.useRef(null),B=S!=null&&k?`${S}-${R}`:void 0,I=L&&C;lt(()=>{if(!(k&&(x||i!=null)))return;const Y=m.state.listRef.current;return Y[R]=O.current,()=>{delete Y[R]}},[k,x,R,i,m]),lt(()=>{if(!k||g)return;const Y=m.state.valuesRef.current;return Y[R]=o,b!=="none"&&m.state.allValuesRef.current.push(o),()=>{delete Y[R]}},[k,g,R,o,m,b]),lt(()=>{if(!h){u.current=!1;return}if(!k||g)return;const Y=m.state.selectedValue,Q=Array.isArray(Y)?Y[Y.length-1]:Y;Vp(o,Q,w)&&m.set("selectedIndex",R)},[k,g,h,m,R,o,w]);const V={disabled:s,selected:I,highlighted:P},F=_({active:P,selected:I});F.id=void 0,F.onFocus=void 0;const{getButtonProps:D,buttonRef:T}=Ch({disabled:s,focusableWhenDisabled:!0,native:a});function q(Y){function Q(){m.state.handleSelection(Y,o)}m.state.submitOnItemClick?(dt.flushSync(Q),m.state.requestSubmit()):Q()}const A={id:B,role:p?"gridcell":"option","aria-selected":C?I:void 0,tabIndex:void 0,onPointerDownCapture(Y){u.current=!0,Y.preventDefault()},onClick(Y){s||y||q(Y.nativeEvent)},onMouseUp(Y){const Q=u.current;u.current=!1,!(s||y||Y.button!==0||Q||!P)&&q(Y.nativeEvent)}},ee=Kn("div",e,{ref:[T,t,f.ref,O],state:V,props:[F,A,l,D]}),ie=c.useMemo(()=>({selected:I,textRef:d}),[I,d]);return E.jsx(w3.Provider,{value:ie,children:ee})}));process.env.NODE_ENV!=="production"&&(T0e.displayName="ComboboxItem");const D0e=c.forwardRef(function(e,t){const{render:n,className:r,children:o,...i}=e,{filteredItems:s}=vs(),a=Br(),l=s.length===0?o:null;return Kn("div",e,{ref:[t,a.state.emptyRef],props:[{children:l,role:"status","aria-live":"polite","aria-atomic":!0},i]})});process.env.NODE_ENV!=="production"&&(D0e.displayName="ComboboxEmpty");const L0e=c.forwardRef(function(e,t){const{className:n,render:r,orientation:o="horizontal",...i}=e;return Kn("div",e,{state:{orientation:o},ref:t,props:[{role:"separator","aria-orientation":o},i]})});process.env.NODE_ENV!=="production"&&(L0e.displayName="Separator");const j0e=c.forwardRef(function(e,t){const{render:n,className:r,...o}=e,i=Br(),s=he(i,ye.open),a=he(i,ye.hasSelectionChips),[l,u]=c.useState(void 0);s&&l!==void 0&&u(void 0);const d=c.useRef([]),f=Kn("div",e,{ref:[t,i.state.chipsContainerRef],props:[a?{role:"toolbar"}:pr,o]}),m=c.useMemo(()=>({highlightedChipIndex:l,setHighlightedChipIndex:u,chipsRef:d}),[l,u,d]);return E.jsx(ZE.Provider,{value:m,children:E.jsx(lz,{elementsRef:d,children:f})})});process.env.NODE_ENV!=="production"&&(j0e.displayName="ComboboxChips");const rC=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(rC.displayName="ComboboxChipContext");function V0e(){const e=c.useContext(rC);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"useComboboxChipContext must be used within a ComboboxChip":Qr(17));return e}const F0e=c.forwardRef(function(e,t){const{render:n,className:r,...o}=e,i=Br(),{setHighlightedChipIndex:s,chipsRef:a}=b3(),l=he(i,ye.disabled),u=he(i,ye.readOnly),d=he(i,ye.selectedValue),{ref:f,index:m}=wz();function p(h){let b=m;if(h.key==="ArrowLeft")h.preventDefault(),m>0?b=m-1:b=void 0;else if(h.key==="ArrowRight")h.preventDefault(),m<d.length-1?b=m+1:b=void 0;else if(h.key==="Backspace"||h.key==="Delete"){const y=m>=d.length-1?d.length-2:m;b=y>=0?y:void 0,_r(h),i.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),i.state.setSelectedValue(d.filter((x,w)=>w!==m),Kt(uf,h.nativeEvent))}else h.key==="Enter"||h.key===" "?(_r(h),b=void 0):h.key==="ArrowDown"||h.key==="ArrowUp"?(_r(h),i.state.setOpen(!0,Kt(vz,h.nativeEvent)),b=void 0):h.key.length===1&&!h.ctrlKey&&!h.metaKey&&!h.altKey&&(b=void 0);return b}const v=Kn("div",e,{ref:[t,f],state:{disabled:l},props:[{tabIndex:-1,"aria-disabled":l||void 0,"aria-readonly":u||void 0,onKeyDown(h){if(l||u)return;const b=p(h);dt.flushSync(()=>{s(b)}),b===void 0?i.state.inputRef.current?.focus():a.current[b]?.focus()},onMouseDown(h){u||(h.preventDefault(),!l&&i.state.inputRef.current?.focus())}},o]}),g=c.useMemo(()=>({index:m}),[m]);return E.jsx(rC.Provider,{value:g,children:v})});process.env.NODE_ENV!=="production"&&(F0e.displayName="ComboboxChip");const $0e=c.forwardRef(function(e,t){const{render:n,className:r,disabled:o=!1,nativeButton:i=!0,...s}=e,a=Br(),{index:l}=V0e(),u=he(a,ye.disabled),d=he(a,ye.readOnly),f=he(a,ye.selectedValue),m=he(a,ye.isItemEqualToValue),p=u||o,{buttonRef:v,getButtonProps:g}=Ch({native:i,disabled:p||d,focusableWhenDisabled:!0}),h={disabled:p};function b(x){const w=a.state.activeIndex;if(w==null)return;const C=m3(a.state.valuesRef.current,x,m);C!==-1&&w===C&&a.state.setIndices({activeIndex:null,type:a.state.keyboardActiveRef.current?"keyboard":"pointer"})}function y(x){const w=Kt(fye,x.nativeEvent),C=f[l];return b(C),a.state.setSelectedValue(f.filter((R,k)=>k!==l),w),a.state.inputRef.current?.focus(),w}return Kn("button",e,{ref:[t,v],state:h,props:[{tabIndex:-1,onClick(x){p||d||y(x).isPropagationAllowed||x.stopPropagation()},onKeyDown(x){p||d||(x.key==="Enter"||x.key===" ")&&(y(x).isPropagationAllowed||_r(x))}},s,g]})});process.env.NODE_ENV!=="production"&&($0e.displayName="ComboboxChipRemove");var z0e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ih=z0e.reduce((e,t)=>{const n=Ove(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),B0e="Label",C3=c.forwardRef((e,t)=>E.jsx(Ih.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));C3.displayName=B0e;var H0e=C3;pa(Tn("body-sm-regular"));H0e.displayName;var G0e="Separator",yO="horizontal",W0e=["horizontal","vertical"],k3=c.forwardRef((e,t)=>{const{decorative:n,orientation:r=yO,...o}=e,i=U0e(r)?r:yO,s=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return E.jsx(Ih.div,{"data-orientation":i,...s,...o,ref:t})});k3.displayName=G0e;function U0e(e){return W0e.includes(e)}var q0e=k3;q0e.displayName;[`text-primary-text flex w-fit items-center gap-2
|
|
352
|
+
group-data-[disabled=true]/field:opacity-50`,Tn("body-sm-regular")].join(" ");["text-sub-label-text group-has-data-[orientation=horizontal]/field:text-balance",Tn("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(" ");c.createContext(null);var K0e=c[" useId ".trim().toString()]||(()=>{}),Y0e=0;function R3(e){const[t,n]=c.useState(K0e());return Yi(()=>{n(r=>r??String(Y0e++))},[e]),t?`radix-${t}`:""}function Zs(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}function X0e(e,t=globalThis?.document){const n=Zs(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 Z0e="DismissableLayer",Qy="dismissableLayer.update",J0e="dismissableLayer.pointerDownOutside",Q0e="dismissableLayer.focusOutside",xO,S3=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),oC=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,u=c.useContext(S3),[d,f]=c.useState(null),m=d?.ownerDocument??globalThis?.document,[,p]=c.useState({}),v=an(t,k=>f(k)),g=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(h),y=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,w=y>=b,C=nEe(k=>{const S=k.target,P=[...u.branches].some(L=>L.contains(S));!w||P||(o?.(k),s?.(k),k.defaultPrevented||a?.())},m),R=rEe(k=>{const S=k.target;[...u.branches].some(P=>P.contains(S))||(i?.(k),s?.(k),k.defaultPrevented||a?.())},m);return X0e(k=>{y===u.layers.size-1&&(r?.(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},m),c.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(xO=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),wO(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=xO)}},[d,m,n,u]),c.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),wO())},[d,u]),c.useEffect(()=>{const k=()=>p({});return document.addEventListener(Qy,k),()=>document.removeEventListener(Qy,k)},[]),E.jsx(Pt.div,{...l,ref:v,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:St(e.onFocusCapture,R.onFocusCapture),onBlurCapture:St(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:St(e.onPointerDownCapture,C.onPointerDownCapture)})});oC.displayName=Z0e;var eEe="DismissableLayerBranch",tEe=c.forwardRef((e,t)=>{const n=c.useContext(S3),r=c.useRef(null),o=an(t,r);return c.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),E.jsx(Pt.div,{...e,ref:o})});tEe.displayName=eEe;function nEe(e,t=globalThis?.document){const n=Zs(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){N3(J0e,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},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function rEe(e,t=globalThis?.document){const n=Zs(e),r=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!r.current&&N3(Q0e,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function wO(){const e=new CustomEvent(Qy);document.dispatchEvent(e)}function N3(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Kve(o,i):o.dispatchEvent(i)}var Uv="focusScope.autoFocusOnMount",qv="focusScope.autoFocusOnUnmount",EO={bubbles:!1,cancelable:!0},oEe="FocusScope",O3=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=c.useState(null),u=Zs(o),d=Zs(i),f=c.useRef(null),m=an(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(x){if(p.paused||!a)return;const w=x.target;a.contains(w)?f.current=w:Ci(f.current,{select:!0})},h=function(x){if(p.paused||!a)return;const w=x.relatedTarget;w!==null&&(a.contains(w)||Ci(f.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const w of x)w.removedNodes.length>0&&Ci(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",h);const y=new MutationObserver(b);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",h),y.disconnect()}}},[r,a,p.paused]),c.useEffect(()=>{if(a){kO.add(p);const g=document.activeElement;if(!a.contains(g)){const h=new CustomEvent(Uv,EO);a.addEventListener(Uv,u),a.dispatchEvent(h),h.defaultPrevented||(iEe(uEe(I3(a)),{select:!0}),document.activeElement===g&&Ci(a))}return()=>{a.removeEventListener(Uv,u),setTimeout(()=>{const h=new CustomEvent(qv,EO);a.addEventListener(qv,d),a.dispatchEvent(h),h.defaultPrevented||Ci(g??document.body,{select:!0}),a.removeEventListener(qv,d),kO.remove(p)},0)}}},[a,u,d,p]);const v=c.useCallback(g=>{if(!n&&!r||p.paused)return;const h=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(h&&b){const y=g.currentTarget,[x,w]=sEe(y);x&&w?!g.shiftKey&&b===w?(g.preventDefault(),n&&Ci(x,{select:!0})):g.shiftKey&&b===x&&(g.preventDefault(),n&&Ci(w,{select:!0})):b===y&&g.preventDefault()}},[n,r,p.paused]);return E.jsx(Pt.div,{tabIndex:-1,...s,ref:m,onKeyDown:v})});O3.displayName=oEe;function iEe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ci(r,{select:t}),document.activeElement!==n)return}function sEe(e){const t=I3(e),n=CO(t,e),r=CO(t.reverse(),e);return[n,r]}function I3(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 CO(e,t){for(const n of e)if(!aEe(n,{upTo:t}))return n}function aEe(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 lEe(e){return e instanceof HTMLInputElement&&"select"in e}function Ci(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&lEe(e)&&t&&e.select()}}var kO=cEe();function cEe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=RO(e,t),e.unshift(t)},remove(t){e=RO(e,t),e[0]?.resume()}}}function RO(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function uEe(e){return e.filter(t=>t.tagName!=="A")}var dEe="Portal",fEe=c.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=c.useState(!1);Yi(()=>i(!0),[]);const s=n||o&&globalThis?.document?.body;return s?xl.createPortal(E.jsx(Pt.div,{...r,ref:t}),s):null});fEe.displayName=dEe;var Kv=0;function pEe(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??SO()),document.body.insertAdjacentElement("beforeend",e[1]??SO()),Kv++,()=>{Kv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Kv--}},[])}function SO(){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 uo=function(){return uo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},uo.apply(this,arguments)};function A3(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 mEe(e,t,n){for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var ff="right-scroll-bar-position",pf="width-before-scroll-bar",hEe="with-scroll-bars-hidden",gEe="--removed-body-scroll-bar-size";function Yv(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function vEe(e,t){var n=ae.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 bEe=typeof window<"u"?c.useLayoutEffect:c.useEffect,NO=new WeakMap;function yEe(e,t){var n=vEe(null,function(r){return e.forEach(function(o){return Yv(o,r)})});return bEe(function(){var r=NO.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||Yv(a,null)}),i.forEach(function(a){o.has(a)||Yv(a,s)})}NO.set(n,e)},[e]),n}function xEe(e){return e}function wEe(e,t){t===void 0&&(t=xEe);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(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var l=function(){var d=s;s=[],d.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),n}}}};return o}function EEe(e){e===void 0&&(e={});var t=wEe(null);return t.options=uo({async:!0,ssr:!1},e),t}var M3=function(e){var t=e.sideCar,n=A3(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,uo({},n))};M3.isSideCarExport=!0;function CEe(e,t){return e.useMedium(t),M3}var P3=EEe(),Xv=function(){},Ah=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Xv,onWheelCapture:Xv,onTouchMoveCapture:Xv}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,p=e.noRelative,v=e.noIsolation,g=e.inert,h=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,x=e.gapMode,w=A3(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,R=yEe([n,t]),k=uo(uo({},w),o);return c.createElement(c.Fragment,null,d&&c.createElement(C,{sideCar:P3,removeScrollBar:u,shards:f,noRelative:p,noIsolation:v,inert:g,setCallbacks:i,allowPinchZoom:!!h,lockRef:n,gapMode:x}),s?c.cloneElement(c.Children.only(a),uo(uo({},k),{ref:R})):c.createElement(y,uo({},k,{className:l,ref:R}),a))});Ah.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ah.classNames={fullWidth:pf,zeroRight:ff};var kEe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function REe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kEe();return t&&e.setAttribute("nonce",t),e}function SEe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function NEe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var OEe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=REe())&&(SEe(t,n),NEe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},IEe=function(){var e=OEe();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},_3=function(){var e=IEe(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},AEe={left:0,top:0,right:0,gap:0},Zv=function(e){return parseInt(e||"",10)||0},MEe=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[Zv(n),Zv(r),Zv(o)]},PEe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return AEe;var t=MEe(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])}},_Ee=_3(),Qa="data-scroll-locked",TEe=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
353
|
+
.`.concat(hEe,` {
|
|
354
|
+
overflow: hidden `).concat(r,`;
|
|
355
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
356
|
+
}
|
|
357
|
+
body[`).concat(Qa,`] {
|
|
358
|
+
overflow: hidden `).concat(r,`;
|
|
359
|
+
overscroll-behavior: contain;
|
|
360
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
361
|
+
padding-left: `.concat(o,`px;
|
|
362
|
+
padding-top: `).concat(i,`px;
|
|
363
|
+
padding-right: `).concat(s,`px;
|
|
364
|
+
margin-left:0;
|
|
365
|
+
margin-top:0;
|
|
366
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
367
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.`).concat(ff,` {
|
|
371
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.`).concat(pf,` {
|
|
375
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.`).concat(ff," .").concat(ff,` {
|
|
379
|
+
right: 0 `).concat(r,`;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.`).concat(pf," .").concat(pf,` {
|
|
383
|
+
margin-right: 0 `).concat(r,`;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
body[`).concat(Qa,`] {
|
|
387
|
+
`).concat(gEe,": ").concat(a,`px;
|
|
388
|
+
}
|
|
389
|
+
`)},OO=function(){var e=parseInt(document.body.getAttribute(Qa)||"0",10);return isFinite(e)?e:0},DEe=function(){c.useEffect(function(){return document.body.setAttribute(Qa,(OO()+1).toString()),function(){var e=OO()-1;e<=0?document.body.removeAttribute(Qa):document.body.setAttribute(Qa,e.toString())}},[])},LEe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;DEe();var i=c.useMemo(function(){return PEe(o)},[o]);return c.createElement(_Ee,{styles:TEe(i,!t,o,n?"":"!important")})},ex=!1;if(typeof window<"u")try{var Sd=Object.defineProperty({},"passive",{get:function(){return ex=!0,!0}});window.addEventListener("test",Sd,Sd),window.removeEventListener("test",Sd,Sd)}catch{ex=!1}var Oa=ex?{passive:!1}:!1,jEe=function(e){return e.tagName==="TEXTAREA"},T3=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!jEe(e)&&n[t]==="visible")},VEe=function(e){return T3(e,"overflowY")},FEe=function(e){return T3(e,"overflowX")},IO=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=D3(e,r);if(o){var i=L3(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},$Ee=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},zEe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},D3=function(e,t){return e==="v"?VEe(t):FEe(t)},L3=function(e,t){return e==="v"?$Ee(t):zEe(t)},BEe=function(e,t){return e==="h"&&t==="rtl"?-1:1},HEe=function(e,t,n,r,o){var i=BEe(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),u=!1,d=s>0,f=0,m=0;do{if(!a)break;var p=L3(e,a),v=p[0],g=p[1],h=p[2],b=g-h-i*v;(v||b)&&D3(e,a)&&(f+=b,m+=v);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&Math.abs(f)<1||!d&&Math.abs(m)<1)&&(u=!0),u},Nd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},AO=function(e){return[e.deltaX,e.deltaY]},MO=function(e){return e&&"current"in e?e.current:e},GEe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},WEe=function(e){return`
|
|
390
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
391
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
392
|
+
`)},UEe=0,Ia=[];function qEe(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(UEe++)[0],i=c.useState(_3)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=mEe([e.lockRef.current],(e.shards||[]).map(MO)).filter(Boolean);return g.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(g,h){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var b=Nd(g),y=n.current,x="deltaX"in g?g.deltaX:y[0]-b[0],w="deltaY"in g?g.deltaY:y[1]-b[1],C,R=g.target,k=Math.abs(x)>Math.abs(w)?"h":"v";if("touches"in g&&k==="h"&&R.type==="range")return!1;var S=window.getSelection(),P=S&&S.anchorNode,L=P?P===R||P.contains(R):!1;if(L)return!1;var _=IO(k,R);if(!_)return!0;if(_?C=k:(C=k==="v"?"h":"v",_=IO(k,R)),!_)return!1;if(!r.current&&"changedTouches"in g&&(x||w)&&(r.current=C),!C)return!0;var O=r.current||C;return HEe(O,h,g,O==="h"?x:w)},[]),l=c.useCallback(function(g){var h=g;if(!(!Ia.length||Ia[Ia.length-1]!==i)){var b="deltaY"in h?AO(h):Nd(h),y=t.current.filter(function(C){return C.name===h.type&&(C.target===h.target||h.target===C.shadowParent)&&GEe(C.delta,b)})[0];if(y&&y.should){h.cancelable&&h.preventDefault();return}if(!y){var x=(s.current.shards||[]).map(MO).filter(Boolean).filter(function(C){return C.contains(h.target)}),w=x.length>0?a(h,x[0]):!s.current.noIsolation;w&&h.cancelable&&h.preventDefault()}}},[]),u=c.useCallback(function(g,h,b,y){var x={name:g,delta:h,target:b,should:y,shadowParent:KEe(b)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(w){return w!==x})},1)},[]),d=c.useCallback(function(g){n.current=Nd(g),r.current=void 0},[]),f=c.useCallback(function(g){u(g.type,AO(g),g.target,a(g,e.lockRef.current))},[]),m=c.useCallback(function(g){u(g.type,Nd(g),g.target,a(g,e.lockRef.current))},[]);c.useEffect(function(){return Ia.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Oa),document.addEventListener("touchmove",l,Oa),document.addEventListener("touchstart",d,Oa),function(){Ia=Ia.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,Oa),document.removeEventListener("touchmove",l,Oa),document.removeEventListener("touchstart",d,Oa)}},[]);var p=e.removeScrollBar,v=e.inert;return c.createElement(c.Fragment,null,v?c.createElement(i,{styles:WEe(o)}):null,p?c.createElement(LEe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function KEe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const YEe=CEe(P3,qEe);var j3=c.forwardRef(function(e,t){return c.createElement(Ah,uo({},e,{ref:t,sideCar:YEe}))});j3.classNames=Ah.classNames;var XEe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Aa=new WeakMap,Od=new WeakMap,Id={},Jv=0,V3=function(e){return e&&(e.host||V3(e.parentNode))},ZEe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=V3(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})},JEe=function(e,t,n,r){var o=ZEe(t,Array.isArray(e)?e:[e]);Id[n]||(Id[n]=new WeakMap);var i=Id[n],s=[],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(m){if(a.has(m))d(m);else try{var p=m.getAttribute(r),v=p!==null&&p!=="false",g=(Aa.get(m)||0)+1,h=(i.get(m)||0)+1;Aa.set(m,g),i.set(m,h),s.push(m),g===1&&v&&Od.set(m,!0),h===1&&m.setAttribute(n,"true"),v||m.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return d(t),a.clear(),Jv++,function(){s.forEach(function(f){var m=Aa.get(f)-1,p=i.get(f)-1;Aa.set(f,m),i.set(f,p),m||(Od.has(f)||f.removeAttribute(r),Od.delete(f)),p||f.removeAttribute(n)}),Jv--,Jv||(Aa=new WeakMap,Aa=new WeakMap,Od=new WeakMap,Id={})}},QEe=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=XEe(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),JEe(r,o,n,"aria-hidden")):function(){return null}},F3="Dialog",[$3]=Do(F3),[ZPe,jo]=$3(F3),z3="DialogTrigger",eCe=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=jo(z3,n),i=an(t,o.triggerRef);return E.jsx(Pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":sC(o.open),...r,ref:i,onClick:St(e.onClick,o.onOpenToggle)})});eCe.displayName=z3;var tCe="DialogPortal",[JPe,B3]=$3(tCe,{forceMount:void 0}),Fp="DialogOverlay",H3=c.forwardRef((e,t)=>{const n=B3(Fp,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=jo(Fp,e.__scopeDialog);return i.modal?E.jsx(ma,{present:r||i.open,children:E.jsx(rCe,{...o,ref:t})}):null});H3.displayName=Fp;var nCe=Rp("DialogOverlay.RemoveScroll"),rCe=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=jo(Fp,n);return E.jsx(j3,{as:nCe,allowPinchZoom:!0,shards:[o.contentRef],children:E.jsx(Pt.div,{"data-state":sC(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Js="DialogContent",G3=c.forwardRef((e,t)=>{const n=B3(Js,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=jo(Js,e.__scopeDialog);return E.jsx(ma,{present:r||i.open,children:i.modal?E.jsx(oCe,{...o,ref:t}):E.jsx(iCe,{...o,ref:t})})});G3.displayName=Js;var oCe=c.forwardRef((e,t)=>{const n=jo(Js,e.__scopeDialog),r=c.useRef(null),o=an(t,n.contentRef,r);return c.useEffect(()=>{const i=r.current;if(i)return QEe(i)},[]),E.jsx(W3,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:St(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:St(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:St(e.onFocusOutside,i=>i.preventDefault())})}),iCe=c.forwardRef((e,t)=>{const n=jo(Js,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return E.jsx(W3,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;n.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),W3=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=jo(Js,n),l=c.useRef(null),u=an(t,l);return pEe(),E.jsxs(E.Fragment,{children:[E.jsx(O3,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:E.jsx(oC,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":sC(a.open),...s,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),E.jsxs(E.Fragment,{children:[E.jsx(aCe,{titleId:a.titleId}),E.jsx(cCe,{contentRef:l,descriptionId:a.descriptionId})]})]})}),iC="DialogTitle",U3=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=jo(iC,n);return E.jsx(Pt.h2,{id:o.titleId,...r,ref:t})});U3.displayName=iC;var q3="DialogDescription",K3=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=jo(q3,n);return E.jsx(Pt.p,{id:o.descriptionId,...r,ref:t})});K3.displayName=q3;var Y3="DialogClose",sCe=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=jo(Y3,n);return E.jsx(Pt.button,{type:"button",...r,ref:t,onClick:St(e.onClick,()=>o.onOpenChange(!1))})});sCe.displayName=Y3;function sC(e){return e?"open":"closed"}var X3="DialogTitleWarning",[QPe,Z3]=Tve(X3,{contentName:Js,titleName:iC,docsSlug:"dialog"}),aCe=({titleId:e})=>{const t=Z3(X3),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
393
|
+
|
|
394
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
395
|
+
|
|
396
|
+
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},lCe="DialogDescriptionWarning",cCe=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Z3(lCe).contentName}}.`;return c.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},uCe=H3,dCe=G3,fCe=U3,pCe=K3;uCe.displayName;dCe.displayName;fCe.displayName;pCe.displayName;Tn("body-sm-medium");[Tn("body-xs-medium"),"mb-1 px-2 text-secondary-text uppercase"].join(" ");function mCe(e,t=[]){let n=[];function r(i,s){const a=c.createContext(s);a.displayName=i+"Context";const l=n.length;n=[...n,s];const u=f=>{const{scope:m,children:p,...v}=f,g=m?.[e]?.[l]||a,h=c.useMemo(()=>v,Object.values(v));return E.jsx(g.Provider,{value:h,children:p})};u.displayName=i+"Provider";function d(f,m){const p=m?.[e]?.[l]||a,v=c.useContext(p);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(s=>c.createContext(s));return function(s){const a=s?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:a}}),[s,a])}};return o.scopeName=e,[r,hCe(o,...t)]}function hCe(...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(o){const i=r.reduce((s,{useScope:a,scopeName:l})=>{const u=a(o)[`__scope${l}`];return{...s,...u}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var aC="Progress",lC=100,[gCe]=mCe(aC),[vCe,bCe]=gCe(aC),J3=c.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=xCe,...s}=e;(o||o===0)&&!PO(o)&&console.error(wCe(`${o}`,"Progress"));const a=PO(o)?o:lC;r!==null&&!_O(r,a)&&console.error(ECe(`${r}`,"Progress"));const l=_O(r,a)?r:null,u=$p(l)?i(l,a):void 0;return E.jsx(vCe,{scope:n,value:l,max:a,children:E.jsx(Ih.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":$p(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":eB(l,a),"data-value":l??void 0,"data-max":a,...s,ref:t})})});J3.displayName=aC;var Q3="ProgressIndicator",yCe=c.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=bCe(Q3,n);return E.jsx(Ih.div,{"data-state":eB(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});yCe.displayName=Q3;function xCe(e,t){return`${Math.round(e/t*100)}%`}function eB(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function $p(e){return typeof e=="number"}function PO(e){return $p(e)&&!isNaN(e)&&e>0}function _O(e,t){return $p(e)&&!isNaN(e)&&e<=t&&e>=0}function wCe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${lC}\`.`}function ECe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
397
|
+
- a positive number
|
|
398
|
+
- less than the value passed to \`max\` (or ${lC} if no \`max\` prop is set)
|
|
399
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
400
|
+
|
|
401
|
+
Defaulting to \`null\`.`}var CCe=J3;CCe.displayName;function kCe(e){const t=e+"CollectionProvider",[n,r]=Do(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:h,children:b}=g,y=ae.useRef(null),x=ae.useRef(new Map).current;return E.jsx(o,{scope:h,itemMap:x,collectionRef:y,children:b})};s.displayName=t;const a=e+"CollectionSlot",l=Rp(a),u=ae.forwardRef((g,h)=>{const{scope:b,children:y}=g,x=i(a,b),w=an(h,x.collectionRef);return E.jsx(l,{ref:w,children:y})});u.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",m=Rp(d),p=ae.forwardRef((g,h)=>{const{scope:b,children:y,...x}=g,w=ae.useRef(null),C=an(h,w),R=i(d,b);return ae.useEffect(()=>(R.itemMap.set(w,{ref:w,...x}),()=>{R.itemMap.delete(w)})),E.jsx(m,{[f]:"",ref:C,children:y})});p.displayName=d;function v(g){const h=i(e+"CollectionConsumer",g);return ae.useCallback(()=>{const b=h.collectionRef.current;if(!b)return[];const y=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((x,w)=>y.indexOf(x.ref.current)-y.indexOf(w.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},v,r]}var RCe=c.createContext(void 0);function cC(e){const t=c.useContext(RCe);return e||t||"ltr"}var Qv="rovingFocusGroup.onEntryFocus",SCe={bubbles:!1,cancelable:!0},Jc="RovingFocusGroup",[tx,tB,NCe]=kCe(Jc),[OCe,Mh]=Do(Jc,[NCe]),[ICe,ACe]=OCe(Jc),nB=c.forwardRef((e,t)=>E.jsx(tx.Provider,{scope:e.__scopeRovingFocusGroup,children:E.jsx(tx.Slot,{scope:e.__scopeRovingFocusGroup,children:E.jsx(MCe,{...e,ref:t})})}));nB.displayName=Jc;var MCe=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,m=c.useRef(null),p=an(t,m),v=cC(i),[g,h]=Xc({prop:s,defaultProp:a??null,onChange:l,caller:Jc}),[b,y]=c.useState(!1),x=Zs(u),w=tB(n),C=c.useRef(!1),[R,k]=c.useState(0);return c.useEffect(()=>{const S=m.current;if(S)return S.addEventListener(Qv,x),()=>S.removeEventListener(Qv,x)},[x]),E.jsx(ICe,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:g,onItemFocus:c.useCallback(S=>h(S),[h]),onItemShiftTab:c.useCallback(()=>y(!0),[]),onFocusableItemAdd:c.useCallback(()=>k(S=>S+1),[]),onFocusableItemRemove:c.useCallback(()=>k(S=>S-1),[]),children:E.jsx(Pt.div,{tabIndex:b||R===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:St(e.onMouseDown,()=>{C.current=!0}),onFocus:St(e.onFocus,S=>{const P=!C.current;if(S.target===S.currentTarget&&P&&!b){const L=new CustomEvent(Qv,SCe);if(S.currentTarget.dispatchEvent(L),!L.defaultPrevented){const _=w().filter(V=>V.focusable),O=_.find(V=>V.active),B=_.find(V=>V.id===g),I=[O,B,..._].filter(Boolean).map(V=>V.ref.current);iB(I,d)}}C.current=!1}),onBlur:St(e.onBlur,()=>y(!1))})})}),rB="RovingFocusGroupItem",oB=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:s,...a}=e,l=R3(),u=i||l,d=ACe(rB,n),f=d.currentTabStopId===u,m=tB(n),{onFocusableItemAdd:p,onFocusableItemRemove:v,currentTabStopId:g}=d;return c.useEffect(()=>{if(r)return p(),()=>v()},[r,p,v]),E.jsx(tx.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:E.jsx(Pt.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:St(e.onMouseDown,h=>{r?d.onItemFocus(u):h.preventDefault()}),onFocus:St(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:St(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){d.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const b=TCe(h,d.orientation,d.dir);if(b!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let y=m().filter(x=>x.focusable).map(x=>x.ref.current);if(b==="last")y.reverse();else if(b==="prev"||b==="next"){b==="prev"&&y.reverse();const x=y.indexOf(h.currentTarget);y=d.loop?DCe(y,x+1):y.slice(x+1)}setTimeout(()=>iB(y))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:g!=null}):s})})});oB.displayName=rB;var PCe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _Ce(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function TCe(e,t,n){const r=_Ce(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return PCe[r]}function iB(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function DCe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var sB=nB,aB=oB,uC="Radio",[LCe,lB]=Do(uC),[jCe,VCe]=LCe(uC),cB=c.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:s,value:a="on",onCheck:l,form:u,...d}=e,[f,m]=c.useState(null),p=an(t,h=>m(h)),v=c.useRef(!1),g=f?u||!!f.closest("form"):!0;return E.jsxs(jCe,{scope:n,checked:o,disabled:s,children:[E.jsx(Pt.button,{type:"button",role:"radio","aria-checked":o,"data-state":pB(o),"data-disabled":s?"":void 0,disabled:s,value:a,...d,ref:p,onClick:St(e.onClick,h=>{o||l?.(),g&&(v.current=h.isPropagationStopped(),v.current||h.stopPropagation())})}),g&&E.jsx(fB,{control:f,bubbles:!v.current,name:r,value:a,checked:o,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});cB.displayName=uC;var uB="RadioIndicator",dB=c.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=VCe(uB,n);return E.jsx(ma,{present:r||i.checked,children:E.jsx(Pt.span,{"data-state":pB(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});dB.displayName=uB;var FCe="RadioBubbleInput",fB=c.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const s=c.useRef(null),a=an(s,i),l=IE(n),u=bh(t);return c.useEffect(()=>{const d=s.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&m){const p=new Event("click",{bubbles:r});m.call(d,n),d.dispatchEvent(p)}},[l,n,r]),E.jsx(Pt.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}})});fB.displayName=FCe;function pB(e){return e?"checked":"unchecked"}var $Ce=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ph="RadioGroup",[zCe]=Do(Ph,[Mh,lB]),mB=Mh(),hB=lB(),[BCe,HCe]=zCe(Ph),gB=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:s=!1,disabled:a=!1,orientation:l,dir:u,loop:d=!0,onValueChange:f,...m}=e,p=mB(n),v=cC(u),[g,h]=Xc({prop:i,defaultProp:o??null,onChange:f,caller:Ph});return E.jsx(BCe,{scope:n,name:r,required:s,disabled:a,value:g,onValueChange:h,children:E.jsx(sB,{asChild:!0,...p,orientation:l,dir:v,loop:d,children:E.jsx(Pt.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":a?"":void 0,dir:v,...m,ref:t})})})});gB.displayName=Ph;var vB="RadioGroupItem",bB=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=HCe(vB,n),s=i.disabled||r,a=mB(n),l=hB(n),u=c.useRef(null),d=an(t,u),f=i.value===o.value,m=c.useRef(!1);return c.useEffect(()=>{const p=g=>{$Ce.includes(g.key)&&(m.current=!0)},v=()=>m.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",v)}},[]),E.jsx(aB,{asChild:!0,...a,focusable:!s,active:f,children:E.jsx(cB,{disabled:s,required:i.required,checked:f,...l,...o,name:i.name,ref:d,onCheck:()=>i.onValueChange(o.value),onKeyDown:St(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:St(o.onFocus,()=>{m.current&&u.current?.click()})})})});bB.displayName=vB;var GCe="RadioGroupIndicator",WCe=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=hB(n);return E.jsx(dB,{...o,...r,ref:t})});WCe.displayName=GCe;var UCe=gB,qCe=bB;UCe.displayName;qCe.displayName;var _h="Switch",[KCe]=Do(_h),[YCe,XCe]=KCe(_h),yB=c.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:s,disabled:a,value:l="on",onCheckedChange:u,form:d,...f}=e,[m,p]=c.useState(null),v=an(t,x=>p(x)),g=c.useRef(!1),h=m?d||!!m.closest("form"):!0,[b,y]=Xc({prop:o,defaultProp:i??!1,onChange:u,caller:_h});return E.jsxs(YCe,{scope:n,checked:b,disabled:a,children:[E.jsx(Pt.button,{type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":EB(b),"data-disabled":a?"":void 0,disabled:a,value:l,...f,ref:v,onClick:St(e.onClick,x=>{y(w=>!w),h&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),h&&E.jsx(wB,{control:m,bubbles:!g.current,name:r,value:l,checked:b,required:s,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});yB.displayName=_h;var xB="SwitchThumb",ZCe=c.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=XCe(xB,n);return E.jsx(Pt.span,{"data-state":EB(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});ZCe.displayName=xB;var JCe="SwitchBubbleInput",wB=c.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const s=c.useRef(null),a=an(s,i),l=IE(n),u=bh(t);return c.useEffect(()=>{const d=s.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&m){const p=new Event("click",{bubbles:r});m.call(d,n),d.dispatchEvent(p)}},[l,n,r]),E.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}})});wB.displayName=JCe;function EB(e){return e?"checked":"unchecked"}var QCe=yB;QCe.displayName;var Th="Tabs",[eke]=Do(Th,[Mh]),CB=Mh(),[tke,dC]=eke(Th),nke=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:s="horizontal",dir:a,activationMode:l="automatic",...u}=e,d=cC(a),[f,m]=Xc({prop:r,onChange:o,defaultProp:i??"",caller:Th});return E.jsx(tke,{scope:n,baseId:R3(),value:f,onValueChange:m,orientation:s,dir:d,activationMode:l,children:E.jsx(Pt.div,{dir:d,"data-orientation":s,...u,ref:t})})});nke.displayName=Th;var kB="TabsList",RB=c.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=dC(kB,n),s=CB(n);return E.jsx(sB,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:r,children:E.jsx(Pt.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});RB.displayName=kB;var SB="TabsTrigger",NB=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,s=dC(SB,n),a=CB(n),l=AB(s.baseId,r),u=MB(s.baseId,r),d=r===s.value;return E.jsx(aB,{asChild:!0,...a,focusable:!o,active:d,children:E.jsx(Pt.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,...i,ref:t,onMouseDown:St(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?s.onValueChange(r):f.preventDefault()}),onKeyDown:St(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&s.onValueChange(r)}),onFocus:St(e.onFocus,()=>{const f=s.activationMode!=="manual";!d&&!o&&f&&s.onValueChange(r)})})})});NB.displayName=SB;var OB="TabsContent",IB=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...s}=e,a=dC(OB,n),l=AB(a.baseId,r),u=MB(a.baseId,r),d=r===a.value,f=c.useRef(d);return c.useEffect(()=>{const m=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(m)},[]),E.jsx(ma,{present:o||d,children:({present:m})=>E.jsx(Pt.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!m,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:m&&i})})});IB.displayName=OB;function AB(e,t){return`${e}-trigger-${t}`}function MB(e,t){return`${e}-content-${t}`}var rke=RB,oke=NB,ike=IB;pa(["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:[Tn("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:[Tn("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"}});c.createContext("default");rke.displayName;oke.displayName;ike.displayName;var ske="Arrow",PB=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return E.jsx(Pt.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});PB.displayName=ske;var ake=PB,_B="Popper",[TB,DB]=Do(_B),[e_e,LB]=TB(_B),jB="PopperAnchor",VB=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=LB(jB,n),s=c.useRef(null),a=an(t,s),l=c.useRef(null);return c.useEffect(()=>{const u=l.current;l.current=r?.current||s.current,u!==l.current&&i.onAnchorChange(l.current)}),r?null:E.jsx(Pt.div,{...o,ref:a})});VB.displayName=jB;var fC="PopperContent",[lke,cke]=TB(fC),FB=c.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:v,...g}=e,h=LB(fC,n),[b,y]=c.useState(null),x=an(t,te=>y(te)),[w,C]=c.useState(null),R=bh(w),k=R?.width??0,S=R?.height??0,P=r+(i!=="center"?"-"+i:""),L=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},_=Array.isArray(u)?u:[u],O=_.length>0,B={padding:L,boundary:_.filter(dke),altBoundary:O},{refs:I,floatingStyles:V,placement:F,isPositioned:D,middlewareData:T}=Qz({strategy:"fixed",placement:P,whileElementsMounted:(...te)=>Zy(...te,{animationFrame:p==="always"}),elements:{reference:h.anchor},middleware:[e3({mainAxis:o+S,alignmentAxis:s}),l&&t3({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?n3():void 0,...B}),l&&r3({...B}),o3({...B,apply:({elements:te,rects:le,availableWidth:z,availableHeight:re})=>{const{width:oe,height:M}=le.reference,N=te.floating.style;N.setProperty("--radix-popper-available-width",`${z}px`),N.setProperty("--radix-popper-available-height",`${re}px`),N.setProperty("--radix-popper-anchor-width",`${oe}px`),N.setProperty("--radix-popper-anchor-height",`${M}px`)}}),w&&fwe({element:w,padding:a}),fke({arrowWidth:k,arrowHeight:S}),m&&i3({strategy:"referenceHidden",...B})]}),[q,A]=BB(F),ee=Zs(v);Yi(()=>{D&&ee?.()},[D,ee]);const ie=T.arrow?.x,Y=T.arrow?.y,Q=T.arrow?.centerOffset!==0,[X,J]=c.useState();return Yi(()=>{b&&J(window.getComputedStyle(b).zIndex)},[b]),E.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:D?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[T.transformOrigin?.x,T.transformOrigin?.y].join(" "),...T.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(lke,{scope:n,placedSide:q,onArrowChange:C,arrowX:ie,arrowY:Y,shouldHideArrow:Q,children:E.jsx(Pt.div,{"data-side":q,"data-align":A,...g,ref:x,style:{...g.style,animation:D?void 0:"none"}})})})});FB.displayName=fC;var $B="PopperArrow",uke={top:"bottom",right:"left",bottom:"top",left:"right"},zB=c.forwardRef(function(e,t){const{__scopePopper:n,...r}=e,o=cke($B,n),i=uke[o.placedSide];return E.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:E.jsx(ake,{...r,ref:t,style:{...r.style,display:"block"}})})});zB.displayName=$B;function dke(e){return e!==null}var fke=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,s=i?0:e.arrowWidth,a=i?0:e.arrowHeight,[l,u]=BB(n),d={start:"0%",center:"50%",end:"100%"}[u],f=(o.arrow?.x??0)+s/2,m=(o.arrow?.y??0)+a/2;let p="",v="";return l==="bottom"?(p=i?d:`${f}px`,v=`${-a}px`):l==="top"?(p=i?d:`${f}px`,v=`${r.floating.height+a}px`):l==="right"?(p=`${-a}px`,v=i?d:`${m}px`):l==="left"&&(p=`${r.floating.width+a}px`,v=i?d:`${m}px`),{data:{x:p,y:v}}}});function BB(e){const[t,n="center"]=e.split("-");return[t,n]}var pke=VB,mke=FB,hke=zB,gke=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"}),vke="VisuallyHidden",HB=c.forwardRef((e,t)=>E.jsx(Pt.span,{...e,ref:t,style:{...gke,...e.style}}));HB.displayName=vke;var bke=HB,[Dh]=Do("Tooltip",[DB]),pC=DB(),yke="TooltipProvider",TO="tooltip.open",[t_e,GB]=Dh(yke),WB="Tooltip",[n_e,Lh]=Dh(WB),nx="TooltipTrigger",xke=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Lh(nx,n),i=GB(nx,n),s=pC(n),a=c.useRef(null),l=an(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]),E.jsx(pke,{asChild:!0,...s,children:E.jsx(Pt.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:St(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:St(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:St(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:St(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:St(e.onBlur,o.onClose),onClick:St(e.onClick,o.onClose)})})});xke.displayName=nx;var wke="TooltipPortal",[r_e,Eke]=Dh(wke,{forceMount:void 0}),gl="TooltipContent",UB=c.forwardRef((e,t)=>{const n=Eke(gl,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=Lh(gl,e.__scopeTooltip);return E.jsx(ma,{present:r||s.open,children:s.disableHoverableContent?E.jsx(qB,{side:o,...i,ref:t}):E.jsx(Cke,{side:o,...i,ref:t})})}),Cke=c.forwardRef((e,t)=>{const n=Lh(gl,e.__scopeTooltip),r=GB(gl,e.__scopeTooltip),o=c.useRef(null),i=an(t,o),[s,a]=c.useState(null),{trigger:l,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,m=c.useCallback(()=>{a(null),f(!1)},[f]),p=c.useCallback((v,g)=>{const h=v.currentTarget,b={x:v.clientX,y:v.clientY},y=Oke(b,h.getBoundingClientRect()),x=Ike(b,y),w=Ake(g.getBoundingClientRect()),C=Pke([...x,...w]);a(C),f(!0)},[f]);return c.useEffect(()=>()=>m(),[m]),c.useEffect(()=>{if(l&&d){const v=h=>p(h,d),g=h=>p(h,l);return l.addEventListener("pointerleave",v),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",g)}}},[l,d,p,m]),c.useEffect(()=>{if(s){const v=g=>{const h=g.target,b={x:g.clientX,y:g.clientY},y=l?.contains(h)||d?.contains(h),x=!Mke(b,s);y?m():x&&(m(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,d,s,u,m]),E.jsx(qB,{...e,ref:i})}),[kke,Rke]=Dh(WB,{isInside:!1}),Ske=Hve("TooltipContent"),qB=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=Lh(gl,n),u=pC(n),{onClose:d}=l;return c.useEffect(()=>(document.addEventListener(TO,d),()=>document.removeEventListener(TO,d)),[d]),c.useEffect(()=>{if(l.trigger){const f=m=>{m.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),E.jsx(oC,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:E.jsxs(mke,{"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:[E.jsx(Ske,{children:r}),E.jsx(kke,{scope:n,isInside:!0,children:E.jsx(bke,{id:l.contentId,role:"tooltip",children:o||r})})]})})});UB.displayName=gl;var KB="TooltipArrow",Nke=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=pC(n);return Rke(KB,n).isInside?null:E.jsx(hke,{...o,...r,ref:t})});Nke.displayName=KB;function Oke(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ike(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 Ake(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 Mke(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],l=t[s],u=a.x,d=a.y,f=l.x,m=l.y;d>r!=m>r&&n<(f-u)*(r-d)/(m-d)+u&&(o=!o)}return o}function Pke(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),_ke(t)}function _ke(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 i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.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 i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.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 Tke=UB;Tke.displayName;pa(["text-primary-text cursor-pointer rounded-[0.75rem] bg-transparent","hover:bg-tertiary-bg",Tn("body-xs-medium")].join(" "),{variants:{size:{sm:"h-7 min-w-7 px-2",default:"h-8 min-w-8 px-3",lg:"h-9 min-w-9 px-3.5"},active:{true:`bg-primary-inverse-bg text-primary-inverse-text
|
|
402
|
+
hover:bg-primary-inverse-bg`,false:""}},compoundVariants:[{size:"sm",active:!0,className:"size-7 px-0"},{size:"default",active:!0,className:"size-8 px-0"},{size:"lg",active:!0,className:"size-9 px-0"}],defaultVariants:{size:"default",active:!1}});Tn("body-xl-medium");function YB(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=YB(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Dke(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=YB(e))&&(r&&(r+=" "),r+=t);return r}const Lke=(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},jke=(e,t)=>({classGroupId:e,validator:t}),XB=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),zp="-",DO=[],Vke="arbitrary..",Fke=e=>{const t=zke(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return $ke(o);const i=o.split(zp),s=i[0]===""&&i.length>1?1:0;return ZB(i,s,t)},getConflictingClassGroupIds:(o,i)=>{if(i){const s=r[o],a=n[o];return s?a?Lke(a,s):s:a||DO}return n[o]||DO}}},ZB=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const l=ZB(e,t+1,o);if(l)return l}const i=n.validators;if(i===null)return;const s=t===0?e.join(zp):e.slice(t).join(zp),a=i.length;for(let l=0;l<a;l++){const u=i[l];if(u.validator(s))return u.classGroupId}},$ke=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?Vke+r:void 0})(),zke=e=>{const{theme:t,classGroups:n}=e;return Bke(n,t)},Bke=(e,t)=>{const n=XB();for(const r in e){const o=e[r];mC(o,n,r,t)}return n},mC=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Hke(s,t,n,r)}},Hke=(e,t,n,r)=>{if(typeof e=="string"){Gke(e,t,n);return}if(typeof e=="function"){Wke(e,t,n,r);return}Uke(e,t,n,r)},Gke=(e,t,n)=>{const r=e===""?t:JB(t,e);r.classGroupId=n},Wke=(e,t,n,r)=>{if(qke(e)){mC(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(jke(n,e))},Uke=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];mC(l,JB(t,a),n,r)}},JB=(e,t)=>{let n=e;const r=t.split(zp),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=XB(),n.nextPart.set(s,a)),n=a}return n},qke=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Kke=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},rx="!",LO=":",Yke=[],jO=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Xke=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,u;const d=o.length;for(let g=0;g<d;g++){const h=o[g];if(s===0&&a===0){if(h===LO){i.push(o.slice(l,g)),l=g+1;continue}if(h==="/"){u=g;continue}}h==="["?s++:h==="]"?s--:h==="("?a++:h===")"&&a--}const f=i.length===0?o:o.slice(l);let m=f,p=!1;f.endsWith(rx)?(m=f.slice(0,-1),p=!0):f.startsWith(rx)&&(m=f.slice(1),p=!0);const v=u&&u>l?u-l:void 0;return jO(i,p,m,v)};if(t){const o=t+LO,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):jO(Yke,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Zke=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},Jke=e=>({cache:Kke(e.cacheSize),parseClassName:Xke(e),sortModifiers:Zke(e),...Fke(e)}),Qke=/\s+/,eRe=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(Qke);let l="";for(let u=a.length-1;u>=0;u-=1){const d=a[u],{isExternal:f,modifiers:m,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:g}=n(d);if(f){l=d+(l.length>0?" "+l:l);continue}let h=!!g,b=r(h?v.substring(0,g):v);if(!b){if(!h){l=d+(l.length>0?" "+l:l);continue}if(b=r(v),!b){l=d+(l.length>0?" "+l:l);continue}h=!1}const y=m.length===0?"":m.length===1?m[0]:i(m).join(":"),x=p?y+rx:y,w=x+b;if(s.indexOf(w)>-1)continue;s.push(w);const C=o(b,h);for(let R=0;R<C.length;++R){const k=C[R];s.push(x+k)}l=d+(l.length>0?" "+l:l)}return l},tRe=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=QB(n))&&(o&&(o+=" "),o+=r);return o},QB=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=QB(e[r]))&&(n&&(n+=" "),n+=t);return n},VO=(e,...t)=>{let n,r,o,i;const s=l=>{const u=t.reduce((d,f)=>f(d),e());return n=Jke(u),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const u=r(l);if(u)return u;const d=eRe(l,n);return o(l,d),d};return i=s,(...l)=>i(tRe(...l))},nRe=[],gn=e=>{const t=n=>n[e]||nRe;return t.isThemeGetter=!0,t},e4=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,t4=/^\((?:(\w[\w-]*):)?(.+)\)$/i,rRe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,oRe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,iRe=/\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$/,sRe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,aRe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lRe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bi=e=>rRe.test(e),rt=e=>!!e&&!Number.isNaN(Number(e)),yi=e=>!!e&&Number.isInteger(Number(e)),eb=e=>e.endsWith("%")&&rt(e.slice(0,-1)),Wo=e=>oRe.test(e),n4=()=>!0,cRe=e=>iRe.test(e)&&!sRe.test(e),hC=()=>!1,uRe=e=>aRe.test(e),dRe=e=>lRe.test(e),fRe=e=>!Me(e)&&!je(e),pRe=e=>bs(e,i4,hC),Me=e=>e4.test(e),_s=e=>bs(e,s4,cRe),FO=e=>bs(e,wRe,rt),mRe=e=>bs(e,l4,n4),hRe=e=>bs(e,a4,hC),$O=e=>bs(e,r4,hC),gRe=e=>bs(e,o4,dRe),Ad=e=>bs(e,c4,uRe),je=e=>t4.test(e),Ll=e=>ga(e,s4),vRe=e=>ga(e,a4),zO=e=>ga(e,r4),bRe=e=>ga(e,i4),yRe=e=>ga(e,o4),Md=e=>ga(e,c4,!0),xRe=e=>ga(e,l4,!0),bs=(e,t,n)=>{const r=e4.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ga=(e,t,n=!1)=>{const r=t4.exec(e);return r?r[1]?t(r[1]):n:!1},r4=e=>e==="position"||e==="percentage",o4=e=>e==="image"||e==="url",i4=e=>e==="length"||e==="size"||e==="bg-size",s4=e=>e==="length",wRe=e=>e==="number",a4=e=>e==="family-name",l4=e=>e==="number"||e==="weight",c4=e=>e==="shadow",BO=()=>{const e=gn("color"),t=gn("font"),n=gn("text"),r=gn("font-weight"),o=gn("tracking"),i=gn("leading"),s=gn("breakpoint"),a=gn("container"),l=gn("spacing"),u=gn("radius"),d=gn("shadow"),f=gn("inset-shadow"),m=gn("text-shadow"),p=gn("drop-shadow"),v=gn("blur"),g=gn("perspective"),h=gn("aspect"),b=gn("ease"),y=gn("animate"),x=()=>["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"],C=()=>[...w(),je,Me],R=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],S=()=>[je,Me,l],P=()=>[bi,"full","auto",...S()],L=()=>[yi,"none","subgrid",je,Me],_=()=>["auto",{span:["full",yi,je,Me]},yi,je,Me],O=()=>[yi,"auto",je,Me],B=()=>["auto","min","max","fr",je,Me],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...S()],D=()=>[bi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],T=()=>[bi,"screen","full","dvw","lvw","svw","min","max","fit",...S()],q=()=>[bi,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],A=()=>[e,je,Me],ee=()=>[...w(),zO,$O,{position:[je,Me]}],ie=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Y=()=>["auto","cover","contain",bRe,pRe,{size:[je,Me]}],Q=()=>[eb,Ll,_s],X=()=>["","none","full",u,je,Me],J=()=>["",rt,Ll,_s],te=()=>["solid","dashed","dotted","double"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[rt,eb,zO,$O],re=()=>["","none",v,je,Me],oe=()=>["none",rt,je,Me],M=()=>["none",rt,je,Me],N=()=>[rt,je,Me],j=()=>[bi,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Wo],breakpoint:[Wo],color:[n4],container:[Wo],"drop-shadow":[Wo],ease:["in","out","in-out"],font:[fRe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Wo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Wo],shadow:[Wo],spacing:["px",rt],text:[Wo],"text-shadow":[Wo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",bi,Me,je,h]}],container:["container"],columns:[{columns:[rt,Me,je,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:C()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[yi,"auto",je,Me]}],basis:[{basis:[bi,"full","auto",a,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[rt,bi,"auto","initial","none",Me]}],grow:[{grow:["",rt,je,Me]}],shrink:[{shrink:["",rt,je,Me]}],order:[{order:[yi,"first","last","none",je,Me]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],"inline-size":[{inline:["auto",...T()]}],"min-inline-size":[{"min-inline":["auto",...T()]}],"max-inline-size":[{"max-inline":["none",...T()]}],"block-size":[{block:["auto",...q()]}],"min-block-size":[{"min-block":["auto",...q()]}],"max-block-size":[{"max-block":["none",...q()]}],w:[{w:[a,"screen",...D()]}],"min-w":[{"min-w":[a,"screen","none",...D()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",n,Ll,_s]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,xRe,mRe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",eb,Me]}],"font-family":[{font:[vRe,hRe,t]}],"font-features":[{"font-features":[Me]}],"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,je,Me]}],"line-clamp":[{"line-clamp":[rt,"none",je,FO]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",je,Me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",je,Me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[rt,"from-font","auto",je,_s]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[rt,"auto",je,Me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je,Me]}],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",je,Me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:Y()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},yi,je,Me],radial:["",je,Me],conic:[yi,je,Me]},yRe,gRe]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[rt,je,Me]}],"outline-w":[{outline:["",rt,Ll,_s]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",d,Md,Ad]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",f,Md,Ad]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[rt,_s]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",m,Md,Ad]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[rt,je,Me]}],"mix-blend":[{"mix-blend":[...le(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":le()}],"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":[rt]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[je,Me]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"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":[rt]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:Y()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",je,Me]}],filter:[{filter:["","none",je,Me]}],blur:[{blur:re()}],brightness:[{brightness:[rt,je,Me]}],contrast:[{contrast:[rt,je,Me]}],"drop-shadow":[{"drop-shadow":["","none",p,Md,Ad]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",rt,je,Me]}],"hue-rotate":[{"hue-rotate":[rt,je,Me]}],invert:[{invert:["",rt,je,Me]}],saturate:[{saturate:[rt,je,Me]}],sepia:[{sepia:["",rt,je,Me]}],"backdrop-filter":[{"backdrop-filter":["","none",je,Me]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[rt,je,Me]}],"backdrop-contrast":[{"backdrop-contrast":[rt,je,Me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",rt,je,Me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[rt,je,Me]}],"backdrop-invert":[{"backdrop-invert":["",rt,je,Me]}],"backdrop-opacity":[{"backdrop-opacity":[rt,je,Me]}],"backdrop-saturate":[{"backdrop-saturate":[rt,je,Me]}],"backdrop-sepia":[{"backdrop-sepia":["",rt,je,Me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",je,Me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[rt,"initial",je,Me]}],ease:[{ease:["linear","initial",b,je,Me]}],delay:[{delay:[rt,je,Me]}],animate:[{animate:["none",y,je,Me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,je,Me]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:M()}],"scale-x":[{"scale-x":M()}],"scale-y":[{"scale-y":M()}],"scale-z":[{"scale-z":M()}],"scale-3d":["scale-3d"],skew:[{skew:N()}],"skew-x":[{"skew-x":N()}],"skew-y":[{"skew-y":N()}],transform:[{transform:[je,Me,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:j()}],"translate-x":[{"translate-x":j()}],"translate-y":[{"translate-y":j()}],"translate-z":[{"translate-z":j()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",je,Me]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",je,Me]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[rt,Ll,_s,FO]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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"]}},ERe=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:o={},override:i={}})=>(Bl(e,"cacheSize",t),Bl(e,"prefix",n),Bl(e,"experimentalParseClassName",r),Pd(e.theme,i.theme),Pd(e.classGroups,i.classGroups),Pd(e.conflictingClassGroups,i.conflictingClassGroups),Pd(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Bl(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),_d(e.theme,o.theme),_d(e.classGroups,o.classGroups),_d(e.conflictingClassGroups,o.conflictingClassGroups),_d(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),u4(e,o,"orderSensitiveModifiers"),e),Bl=(e,t,n)=>{n!==void 0&&(e[t]=n)},Pd=(e,t)=>{if(t)for(const n in t)Bl(e,n,t[n])},_d=(e,t)=>{if(t)for(const n in t)u4(e,t,n)},u4=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},CRe=(e,...t)=>typeof e=="function"?VO(BO,e,...t):VO(()=>ERe(BO(),e),...t);CRe({extend:{theme:{text:["h1","h2","h3"]}}});const HO=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,GO=Dke,El=(e,t)=>n=>{var r;if(t?.variants==null)return GO(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const d=n?.[u],f=i?.[u];if(d===null)return null;const m=HO(d)||HO(f);return o[u][m]}),a=n&&Object.entries(n).reduce((u,d)=>{let[f,m]=d;return m===void 0||(u[f]=m),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:m,...p}=d;return Object.entries(p).every(v=>{let[g,h]=v;return Array.isArray(h)?h.includes({...i,...a}[g]):{...i,...a}[g]===h})?[...u,f,m]:u},[]);return GO(e,s,l,n?.class,n?.className)},kRe=El("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"}}),Gn=(e="body-md-regular")=>kRe({variant:e});El("tracking-normal whitespace-nowrap",{variants:{kind:{status:Gn("body-xs-medium"),priority:Gn("body-sm-regular")}},defaultVariants:{kind:"status"}});function WO(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function gC(...e){return t=>{let n=!1;const r=e.map(o=>{const i=WO(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():WO(e[o],null)}}}}function ln(...e){return c.useCallback(gC(...e),e)}var RRe=Symbol.for("react.lazy"),Bp=c[" use ".trim().toString()];function SRe(e){return typeof e=="object"&&e!==null&&"then"in e}function d4(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===RRe&&"_payload"in e&&SRe(e._payload)}function NRe(e){const t=ORe(e),n=c.forwardRef((r,o)=>{let{children:i,...s}=r;d4(i)&&typeof Bp=="function"&&(i=Bp(i._payload));const a=c.Children.toArray(i),l=a.find(ARe);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 E.jsx(t,{...s,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return E.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function ORe(e){const t=c.forwardRef((n,r)=>{let{children:o,...i}=n;if(d4(o)&&typeof Bp=="function"&&(o=Bp(o._payload)),c.isValidElement(o)){const s=PRe(o),a=MRe(i,o.props);return o.type!==c.Fragment&&(a.ref=r?gC(r,s):s),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var IRe=Symbol("radix.slottable");function ARe(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===IRe}function MRe(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const a=i(...s);return o(...s),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function PRe(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)}El(["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
|
|
403
|
+
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
|
|
404
|
+
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
|
|
405
|
+
aria-expanded:text-primary-text`},size:{lg:`${Gn("body-lg-medium")} w-fit gap-2 px-4.5 py-3
|
|
406
|
+
[&_svg]:size-[18px]`,md:`${Gn("body-md-medium")} w-fit gap-2 px-4.5 py-2
|
|
407
|
+
[&_svg]:size-4`,sm:`${Gn("body-sm-medium")} w-fit gap-2 px-3 py-2
|
|
408
|
+
[&_svg]:size-4`,xs:`${Gn("body-xs-medium")} w-fit gap-1 px-3 py-2
|
|
409
|
+
[&_svg]:size-[14px]`,default:`${Gn("body-sm-medium")} size-9 [&_svg]:size-4`}},compoundVariants:[{variant:"link",size:"lg",className:"[&_svg]:size-5"}],defaultVariants:{variant:"primary",size:"md"}});El(`${Gn("body-sm-regular")} text-muted-foreground
|
|
410
|
+
group-data-[disabled=true]/card:text-disabled-text`);function _Re(e,t){const n=c.createContext(t),r=i=>{const{children:s,...a}=i,l=c.useMemo(()=>a,Object.values(a));return E.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(i){const s=c.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function Vo(e,t=[]){let n=[];function r(i,s){const a=c.createContext(s),l=n.length;n=[...n,s];const u=f=>{const{scope:m,children:p,...v}=f,g=m?.[e]?.[l]||a,h=c.useMemo(()=>v,Object.values(v));return E.jsx(g.Provider,{value:h,children:p})};u.displayName=i+"Provider";function d(f,m){const p=m?.[e]?.[l]||a,v=c.useContext(p);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(s=>c.createContext(s));return function(s){const a=s?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:a}}),[s,a])}};return o.scopeName=e,[r,TRe(o,...t)]}function TRe(...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(o){const i=r.reduce((s,{useScope:a,scopeName:l})=>{const u=a(o)[`__scope${l}`];return{...s,...u}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Nt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var Ji=globalThis?.document?c.useLayoutEffect:()=>{},DRe=c[" useInsertionEffect ".trim().toString()]||Ji;function Qc({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=LRe({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=jRe(d)?d(e):d;f!==e&&s.current?.(f)}else i(d)},[a,e,i,s]);return[l,u]}function LRe({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),i=c.useRef(t);return DRe(()=>{i.current=t},[t]),c.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function jRe(e){return typeof e=="function"}function vC(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 jh(e){const[t,n]=c.useState(void 0);return Ji(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,a=u.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function VRe(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var va=e=>{const{present:t,children:n}=e,r=FRe(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),i=ln(r.ref,$Re(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:i}):null};va.displayName="Presence";function FRe(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),i=c.useRef("none"),s=e?"mounted":"unmounted",[a,l]=VRe(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=Td(r.current);i.current=a==="mounted"?u:"none"},[a]),Ji(()=>{const u=r.current,d=o.current;if(d!==e){const f=i.current,m=Td(u);e?l("MOUNT"):m==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&f!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ji(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=p=>{const v=Td(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&v&&(l("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=p=>{p.target===t&&(i.current=Td(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),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 Td(e){return e?.animationName||"none"}function $Re(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 Hp(e){const t=zRe(e),n=c.forwardRef((r,o)=>{const{children:i,...s}=r,a=c.Children.toArray(i),l=a.find(HRe);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 E.jsx(t,{...s,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return E.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function zRe(e){const t=c.forwardRef((n,r)=>{const{children:o,...i}=n;if(c.isValidElement(o)){const s=WRe(o),a=GRe(i,o.props);return o.type!==c.Fragment&&(a.ref=r?gC(r,s):s),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var f4=Symbol("radix.slottable");function BRe(e){const t=({children:n})=>E.jsx(E.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=f4,t}function HRe(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===f4}function GRe(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const a=i(...s);return o(...s),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function WRe(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 URe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_t=URe.reduce((e,t)=>{const n=Hp(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function qRe(e,t){e&&dt.flushSync(()=>e.dispatchEvent(t))}var Vh="Checkbox",[KRe]=Vo(Vh),[YRe,bC]=KRe(Vh);function XRe(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:i,form:s,name:a,onCheckedChange:l,required:u,value:d="on",internal_do_not_use_render:f}=e,[m,p]=Qc({prop:n,defaultProp:o??!1,onChange:l,caller:Vh}),[v,g]=c.useState(null),[h,b]=c.useState(null),y=c.useRef(!1),x=v?!!s||!!v.closest("form"):!0,w={checked:m,disabled:i,setChecked:p,control:v,setControl:g,name:a,form:s,value:d,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:Fi(o)?!1:o,isFormControl:x,bubbleInput:h,setBubbleInput:b};return E.jsx(YRe,{scope:t,...w,children:JRe(f)?f(w):r})}var p4="CheckboxTrigger",m4=c.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:i,value:s,disabled:a,checked:l,required:u,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:m,isFormControl:p,bubbleInput:v}=bC(p4,e),g=ln(o,d),h=c.useRef(l);return c.useEffect(()=>{const b=i?.form;if(b){const y=()=>f(h.current);return b.addEventListener("reset",y),()=>b.removeEventListener("reset",y)}},[i,f]),E.jsx(_t.button,{type:"button",role:"checkbox","aria-checked":Fi(l)?"mixed":l,"aria-required":u,"data-state":y4(l),"data-disabled":a?"":void 0,disabled:a,value:s,...r,ref:g,onKeyDown:Nt(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:Nt(n,b=>{f(y=>Fi(y)?!0:!y),v&&p&&(m.current=b.isPropagationStopped(),m.current||b.stopPropagation())})})});m4.displayName=p4;var h4=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:s,disabled:a,value:l,onCheckedChange:u,form:d,...f}=e;return E.jsx(XRe,{__scopeCheckbox:n,checked:o,defaultChecked:i,disabled:a,required:s,onCheckedChange:u,name:r,form:d,value:l,internal_do_not_use_render:({isFormControl:m})=>E.jsxs(E.Fragment,{children:[E.jsx(m4,{...f,ref:t,__scopeCheckbox:n}),m&&E.jsx(b4,{__scopeCheckbox:n})]})})});h4.displayName=Vh;var g4="CheckboxIndicator",ZRe=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=bC(g4,n);return E.jsx(va,{present:r||Fi(i.checked)||i.checked===!0,children:E.jsx(_t.span,{"data-state":y4(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});ZRe.displayName=g4;var v4="CheckboxBubbleInput",b4=c.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:i,defaultChecked:s,required:a,disabled:l,name:u,value:d,form:f,bubbleInput:m,setBubbleInput:p}=bC(v4,e),v=ln(n,p),g=vC(i),h=jh(r);c.useEffect(()=>{const y=m;if(!y)return;const x=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(x,"checked").set,C=!o.current;if(g!==i&&w){const R=new Event("click",{bubbles:C});y.indeterminate=Fi(i),w.call(y,Fi(i)?!1:i),y.dispatchEvent(R)}},[m,g,i,o]);const b=c.useRef(Fi(i)?!1:i);return E.jsx(_t.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??b.current,required:a,disabled:l,name:u,value:d,form:f,...t,tabIndex:-1,ref:v,style:{...t.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});b4.displayName=v4;function JRe(e){return typeof e=="function"}function Fi(e){return e==="indeterminate"}function y4(e){return Fi(e)?"indeterminate":e?"checked":"unchecked"}const x4=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),QRe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),e1e=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),UO=e=>{const t=e1e(e);return t.charAt(0).toUpperCase()+t.slice(1)};var t1e={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 n1e=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},r1e=ae.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>ae.createElement("svg",{ref:l,...t1e,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:x4("lucide",o),...!i&&!n1e(a)&&{"aria-hidden":"true"},...a},[...s.map(([u,d])=>ae.createElement(u,d)),...Array.isArray(i)?i:[i]])),Et=(e,t)=>{const n=ae.forwardRef(({className:r,...o},i)=>ae.createElement(r1e,{ref:i,iconNode:t,className:x4(`lucide-${QRe(UO(e))}`,`lucide-${e}`,r),...o}));return n.displayName=UO(e),n},o1e=[["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"}]];Et("bell-ring",o1e);const i1e=[["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"}]];Et("book-user",i1e);const s1e=[["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"}]];Et("briefcase-business",s1e);const a1e=[["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"}]];Et("building-2",a1e);const l1e=[["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"}]];Et("calendar-1",l1e);const c1e=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]];Et("chart-line",c1e);const u1e=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]];Et("chevron-down",u1e);const d1e=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]];Et("chevron-left",d1e);const f1e=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]];Et("chevron-right",f1e);const p1e=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]];Et("chevrons-up-down",p1e);const m1e=[["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"}]];Et("circle-question-mark",m1e);const h1e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]];Et("clock-3",h1e);const g1e=[["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"}]];Et("ellipsis",g1e);const v1e=[["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"}]];Et("folder-open",v1e);const b1e=[["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"}]];Et("funnel",b1e);const y1e=[["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"}]];Et("layout-grid",y1e);const x1e=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]];Et("list-filter",x1e);const w1e=[["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"}]];Et("list-todo",w1e);const E1e=[["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"}]];Et("message-circle",E1e);const C1e=[["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"}]];Et("palette",C1e);const k1e=[["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"}]];Et("phone",k1e);const R1e=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]];Et("plus",R1e);const S1e=[["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"}]];Et("rotate-ccw",S1e);const N1e=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]];Et("search",N1e);const O1e=[["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"}]];Et("settings",O1e);const I1e=[["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"}]];Et("tag",I1e);const A1e=[["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"}]];Et("user-cog",A1e);const M1e=[["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"}]];Et("users",M1e);const P1e=[["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"}]];Et("wrench",P1e);const _1e=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]];Et("x",_1e);h4.displayName;const qO={};function Ro(e,t){const n=c.useRef(qO);return n.current===qO&&(n.current=e(t)),n}const tb=c[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],T1e=tb&&tb!==c.useLayoutEffect?tb:e=>e();function en(e){const t=Ro(D1e).current;return t.next=e,T1e(t.effect),t.trampoline}function D1e(){const e={next:void 0,callback:L1e,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function L1e(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const j1e=()=>{},ct=typeof document<"u"?c.useLayoutEffect:j1e,yC=c.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(yC.displayName="CompositeListContext");function V1e(){return c.useContext(yC)}function w4(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=en(o),s=c.useRef(0),a=Ro($1e).current,l=Ro(F1e).current,[u,d]=c.useState(0),f=c.useRef(u),m=en((b,y)=>{l.set(b,y??null),f.current+=1,d(f.current)}),p=en(b=>{l.delete(b),f.current+=1,d(f.current)}),v=c.useMemo(()=>{const b=new Map;return Array.from(l.keys()).filter(y=>y.isConnected).sort(z1e).forEach((y,x)=>{const w=l.get(y)??{};b.set(y,{...w,index:x})}),b},[l,u]);ct(()=>{if(typeof MutationObserver!="function"||v.size===0)return;const b=new MutationObserver(y=>{const x=new Set,w=C=>x.has(C)?x.delete(C):x.add(C);y.forEach(C=>{C.removedNodes.forEach(w),C.addedNodes.forEach(w)}),x.size===0&&(f.current+=1,d(f.current))});return v.forEach((y,x)=>{x.parentElement&&b.observe(x.parentElement,{childList:!0})}),()=>{b.disconnect()}},[v]),ct(()=>{f.current===u&&(n.current.length!==v.size&&(n.current.length=v.size),r&&r.current.length!==v.size&&(r.current.length=v.size),s.current=v.size),i(v)},[i,v,n,r,u]),ct(()=>()=>{n.current=[]},[n]),ct(()=>()=>{r&&(r.current=[])},[r]);const g=en(b=>(a.add(b),()=>{a.delete(b)}));ct(()=>{a.forEach(b=>b(v))},[a,v]);const h=c.useMemo(()=>({register:m,unregister:p,subscribeMapChange:g,elementsRef:n,labelsRef:r,nextIndexRef:s}),[m,p,g,n,r,s]);return E.jsx(yC.Provider,{value:h,children:t})}function F1e(){return new Map}function $1e(){return new Set}function z1e(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 E4=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(E4.displayName="DirectionContext");function C4(){return c.useContext(E4)?.direction??"ltr"}function eo(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 Gp(e,t,n,r){const o=Ro(k4).current;return H1e(o,e,t,n,r)&&R4(o,[e,t,n,r]),o.callback}function B1e(e){const t=Ro(k4).current;return G1e(t,e)&&R4(t,e),t.callback}function k4(){return{callback:null,cleanup:null,refs:[]}}function H1e(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function G1e(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function R4(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 i=t[o];if(i!=null)switch(typeof i){case"function":{const s=i(n);typeof s=="function"&&(r[o]=s);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=r[o];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}}}}}}}const W1e=parseInt(c.version,10);function xC(e){return W1e>=e}function KO(e){if(!c.isValidElement(e))return null;const t=e,n=t.props;return(xC(19)?n?.ref:t.ref)??null}function ox(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function U1e(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function q1e(e,t){return typeof e=="function"?e(t):e}function K1e(e,t){return typeof e=="function"?e(t):e}const sc={};function S4(e,t,n,r,o){let i={...ix(e,sc)};return t&&(i=mf(i,t)),n&&(i=mf(i,n)),r&&(i=mf(i,r)),i}function Y1e(e){if(e.length===0)return sc;if(e.length===1)return ix(e[0],sc);let t={...ix(e[0],sc)};for(let n=1;n<e.length;n+=1)t=mf(t,e[n]);return t}function mf(e,t){return N4(t)?t(e):X1e(e,t)}function X1e(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=ox(e.style,r);break}case"className":{e[n]=O4(e.className,r);break}default:Z1e(n,r)?e[n]=J1e(e[n],r):e[n]=r}}return e}function Z1e(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 N4(e){return typeof e=="function"}function ix(e,t){return N4(e)?e(t):e??sc}function J1e(e,t){return t?e?n=>{if(Q1e(n)){const o=n;sx(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function sx(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function O4(e,t){return t?e?t+" "+e:t:e}function Q1e(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function nr(){}const mr=Object.freeze({}),eSe={style:{transition:"none"}},tSe="data-base-ui-click-trigger",nSe={fallbackAxisSide:"none"},rSe={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Yn(e,t,n={}){const r=t.render,o=oSe(t,n);if(n.enabled===!1)return null;const i=n.state??mr;return sSe(e,r,o,i)}function oSe(e,t={}){const{className:n,style:r,render:o}=e,{state:i=mr,ref:s,props:a,stateAttributesMapping:l,enabled:u=!0}=t,d=u?q1e(n,i):void 0,f=u?K1e(r,i):void 0,m=u?U1e(i,l):mr,p=u?ox(m,Array.isArray(a)?Y1e(a):a)??mr:mr;return typeof document<"u"&&(u?Array.isArray(s)?p.ref=B1e([p.ref,KO(o),...s]):p.ref=Gp(p.ref,KO(o),s):Gp(null,null)),u?(d!==void 0&&(p.className=O4(p.className,d)),f!==void 0&&(p.style=ox(p.style,f)),p):mr}const iSe=Symbol.for("react.lazy");function sSe(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=S4(n,t.props);o.ref=n.ref;let i=t;if(i?.$$typeof===iSe&&(i=c.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!c.isValidElement(i))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(`
|
|
411
|
+
`));return c.cloneElement(i,o)}if(e&&typeof e=="string")return aSe(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":eo(8))}function aSe(e,t){return e==="button"?ae.createElement("button",{type:"button",...t,key:t.key}):e==="img"?ae.createElement("img",{alt:"",...t,key:t.key}):c.createElement(e,t)}const hf="none",lSe="trigger-press",cSe="trigger-hover",uSe="outside-press",YO="clear-press",dSe="chip-remove-press",Dd="input-change",XO="input-clear",I4="focus-out",fSe="escape-key",A4="list-navigation";function Yt(e,t,n,r){let o=!1,i=!1;const s=mr;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...s}}const ax={...c};let ZO=0;function pSe(e,t="mui"){const[n,r]=c.useState(e),o=e||n;return c.useEffect(()=>{n==null&&(ZO+=1,r(`${t}-${ZO}`))},[n,t]),o}const JO=ax.useId;function wC(e,t){if(JO!==void 0){const n=JO();return e??(t?`${t}-${n}`:n)}return pSe(e,t)}function EC(e){return wC(e,"base-ui")}const mSe=[];function M4(e){c.useEffect(e,mSe)}const Ld=null;let QO=globalThis.requestAnimationFrame;class hSe{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"&&QO!==requestAnimationFrame&&(QO=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 jd=new hSe;class so{static create(){return new so}static request(t){return jd.request(t)}static cancel(t){return jd.cancel(t)}currentId=Ld;request(t){this.cancel(),this.currentId=jd.request(()=>{this.currentId=Ld,t()})}cancel=()=>{this.currentId!==Ld&&(jd.cancel(this.currentId),this.currentId=Ld)};disposeEffect=()=>this.cancel}function CC(){const e=Ro(so.create).current;return M4(e.disposeEffect),e}function Xo(e){return e==null?e:"current"in e?e.current:e}let Ac=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const gSe={[Ac.startingStyle]:""},vSe={[Ac.endingStyle]:""},P4={transitionStatus(e){return e==="starting"?gSe:e==="ending"?vSe:null}};function bSe(e,t=!1,n=!0){const r=CC();return en((o,i=null)=>{r.cancel();function s(){dt.flushSync(o)}const a=Xo(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=Ac.startingStyle;if(!l.hasAttribute(f)){r.request(d);return}const m=new MutationObserver(()=>{l.hasAttribute(f)||(m.disconnect(),d())});m.observe(l,{attributes:!0,attributeFilter:[f]}),i?.addEventListener("abort",()=>m.disconnect(),{once:!0})},d=function(){Promise.all(l.getAnimations().map(f=>f.finished)).then(()=>{i?.aborted||s()}).catch(()=>{const f=l.getAnimations();if(n){if(i?.aborted)return;s()}else f.length>0&&f.some(m=>m.pending||m.playState!=="finished")&&d()})};if(t){u();return}r.request(d)}})}function ySe(e,t=!1,n=!1){const[r,o]=c.useState(e&&t?"idle":void 0),[i,s]=c.useState(e);return e&&!i&&(s(!0),o("starting")),!e&&i&&r!=="ending"&&!n&&o("ending"),!e&&!i&&r==="ending"&&o(void 0),ct(()=>{if(!e&&i&&r!=="ending"&&n){const a=so.request(()=>{o("ending")});return()=>{so.cancel(a)}}},[e,i,r,n]),ct(()=>{if(!e||t)return;const a=so.request(()=>{o(void 0)});return()=>{so.cancel(a)}},[t,e]),ct(()=>{if(!e||!t)return;e&&i&&r!=="idle"&&o("starting");const a=so.request(()=>{o("idle")});return()=>{so.cancel(a)}},[t,e,i,o,r]),c.useMemo(()=>({mounted:i,setMounted:s,transitionStatus:r}),[i,r])}let _4=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function T4(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:s,unregister:a,subscribeMapChange:l,elementsRef:u,labelsRef:d,nextIndexRef:f}=V1e(),m=c.useRef(-1),[p,v]=c.useState(i??(o===_4.GuessFromOrder?()=>{if(m.current===-1){const b=f.current;f.current+=1,m.current=b}return m.current}:-1)),g=c.useRef(null),h=c.useCallback(b=>{if(g.current=b,p!==-1&&b!==null&&(u.current[p]=b,d)){const y=t!==void 0;d.current[p]=y?t:r?.current?.textContent??b.textContent}},[p,u,d,t,r]);return ct(()=>{if(i!=null)return;const b=g.current;if(b)return s(b,n),()=>{a(b)}},[i,s,a,n]),ct(()=>{if(i==null)return l(b=>{const y=g.current?b.get(g.current)?.index:null;y!=null&&v(y)})},[i,l,v]),c.useMemo(()=>({ref:h,index:p}),[p,h])}function Fh(){return typeof window<"u"}function ys(e){return kC(e)?(e.nodeName||"").toLowerCase():"#document"}function Fn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fo(e){var t;return(t=(kC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kC(e){return Fh()?e instanceof Node||e instanceof Fn(e).Node:!1}function wn(e){return Fh()?e instanceof Element||e instanceof Fn(e).Element:!1}function Mn(e){return Fh()?e instanceof HTMLElement||e instanceof Fn(e).HTMLElement:!1}function lx(e){return!Fh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Fn(e).ShadowRoot}function xs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Fr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function xSe(e){return/^(table|td|th)$/.test(ys(e))}function $h(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const wSe=/transform|translate|scale|rotate|perspective|filter/,ESe=/paint|layout|strict|content/,Ts=e=>!!e&&e!=="none";let nb;function RC(e){const t=wn(e)?Fr(e):e;return Ts(t.transform)||Ts(t.translate)||Ts(t.scale)||Ts(t.rotate)||Ts(t.perspective)||!SC()&&(Ts(t.backdropFilter)||Ts(t.filter))||wSe.test(t.willChange||"")||ESe.test(t.contain||"")}function CSe(e){let t=Qi(e);for(;Mn(t)&&!vl(t);){if(RC(t))return t;if($h(t))return null;t=Qi(t)}return null}function SC(){return nb==null&&(nb=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),nb}function vl(e){return/^(html|body|#document)$/.test(ys(e))}function Fr(e){return Fn(e).getComputedStyle(e)}function zh(e){return wn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qi(e){if(ys(e)==="html")return e;const t=e.assignedSlot||e.parentNode||lx(e)&&e.host||Fo(e);return lx(t)?t.host:t}function D4(e){const t=Qi(e);return vl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Mn(t)&&xs(t)?t:D4(t)}function Mc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=D4(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Fn(o);if(i){const a=cx(s);return t.concat(s,s.visualViewport||[],xs(o)?o:[],a&&n?Mc(a):[])}else return t.concat(o,Mc(o,[],n))}function cx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}let ux;process.env.NODE_ENV!=="production"&&(ux=new Set);function eI(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");ux.has(t)||(ux.add(t),console.error(`Base UI: ${t}`))}}const L4=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(L4.displayName="CompositeRootContext");function kSe(e=!1){const t=c.useContext(L4);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>.":eo(16));return t}function RSe(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,s=r&&t!==!1,a=r&&t===!1;return{props:c.useMemo(()=>{const l={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(l.tabIndex=o,!i&&n&&(l.tabIndex=t?o:-1)),(i&&(t||s)||!i&&n)&&(l["aria-disabled"]=n),i&&(!t||a)&&(l.disabled=n),l},[r,n,t,s,a,i,o])}}function Bh(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=c.useRef(null),s=kSe(!0)!==void 0,a=en(()=>{const m=i.current;return!!(m?.tagName==="A"&&m?.href)}),{props:l}=RSe({focusableWhenDisabled:n,disabled:t,composite:s,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&c.useEffect(()=>{if(!i.current)return;const m=i.current.tagName==="BUTTON";if(o){if(!m){const p=ax.captureOwnerStack?.()||"";eI(`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(m){const p=ax.captureOwnerStack?.()||"";eI(`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 m=i.current;SSe(m)&&s&&t&&l.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,l.disabled,s]);ct(u,[u]);const d=c.useCallback((m={})=>{const{onClick:p,onMouseDown:v,onKeyUp:g,onKeyDown:h,onPointerDown:b,...y}=m;return S4({type:o?"button":void 0,onClick(x){if(t){x.preventDefault();return}p?.(x)},onMouseDown(x){t||v?.(x)},onKeyDown(x){if(t||(sx(x),h?.(x)),x.baseUIHandlerPrevented)return;const w=x.target===x.currentTarget&&!o&&!a()&&!t,C=x.key==="Enter",R=x.key===" ";w&&((R||C)&&x.preventDefault(),C&&p?.(x))},onKeyUp(x){t||(sx(x),g?.(x)),!x.baseUIHandlerPrevented&&x.target===x.currentTarget&&!o&&!t&&x.key===" "&&p?.(x)},onPointerDown(x){if(t){x.preventDefault();return}b?.(x)}},o?void 0:{role:"button"},l,y)},[t,l,o,a]),f=en(m=>{i.current=m,u()});return{getButtonProps:d,buttonRef:f}}function SSe(e){return Mn(e)&&e.tagName==="BUTTON"}const ba=typeof navigator<"u",rb=ASe(),j4=PSe(),NC=MSe(),V4=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),NSe=rb.platform==="MacIntel"&&rb.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(rb.platform),tI=ba&&/firefox/i.test(NC),OSe=ba&&/apple/i.test(navigator.vendor),Wp=ba&&/android/i.test(j4)||/android/i.test(NC);ba&&j4.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const ISe=NC.includes("jsdom/");function ASe(){if(!ba)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 MSe(){if(!ba)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function PSe(){if(!ba)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const nI="data-base-ui-focusable",_Se="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Vs(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Wt(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&lx(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ac(e){return"composedPath"in e?e.composedPath()[0]:e.target}function OC(e){return Mn(e)&&e.matches(_Se)}function rI(e){return e?e.getAttribute("role")==="combobox"&&OC(e):!1}function oI(e){return e?e.hasAttribute(nI)?e:e.querySelector(`[${nI}]`)||e:null}function dx(e,t,n=!0){return e.filter(r=>r.parentId===t&&(!n||r.context?.open)).flatMap(r=>[r,...dx(e,r.id,n)])}function iI(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(i=>i.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}function Tr(e){e.preventDefault(),e.stopPropagation()}function TSe(e){return e.pointerType===""&&e.isTrusted?!0:Wp&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function DSe(e){return ISe?!1:!Wp&&e.width===0&&e.height===0||Wp&&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 sI(e,t){return["mouse","pen"].includes(e)}function F4(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const LSe=["top","right","bottom","left"],es=Math.min,ur=Math.max,Up=Math.round,Vd=Math.floor,vo=e=>({x:e,y:e}),jSe={left:"right",right:"left",bottom:"top",top:"bottom"};function qp(e,t,n){return ur(e,es(t,n))}function So(e,t){return typeof e=="function"?e(t):e}function yr(e){return e.split("-")[0]}function ai(e){return e.split("-")[1]}function IC(e){return e==="x"?"y":"x"}function Hh(e){return e==="y"?"height":"width"}function Ar(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Gh(e){return IC(Ar(e))}function VSe(e,t,n){n===void 0&&(n=!1);const r=ai(e),o=Gh(e),i=Hh(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Kp(s)),[s,Kp(s)]}function FSe(e){const t=Kp(e);return[fx(e),t,fx(t)]}function fx(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const aI=["left","right"],lI=["right","left"],$Se=["top","bottom"],zSe=["bottom","top"];function BSe(e,t,n){switch(e){case"top":case"bottom":return n?t?lI:aI:t?aI:lI;case"left":case"right":return t?$Se:zSe;default:return[]}}function HSe(e,t,n,r){const o=ai(e);let i=BSe(yr(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(fx)))),i}function Kp(e){const t=yr(e);return jSe[t]+e.slice(t.length)}function GSe(e){return{top:0,right:0,bottom:0,left:0,...e}}function AC(e){return typeof e!="number"?GSe(e):{top:e,right:e,bottom:e,left:e}}function Yp(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}}var WSe=["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] *)"],Xp=WSe.join(","),$4=typeof Element>"u",bl=$4?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Zp=!$4&&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},Jp=function(e,t){var n;t===void 0&&(t=!0);var r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),o=r===""||r==="true",i=o||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):Jp(e.parentNode));return i},USe=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},z4=function(e,t,n){if(Jp(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Xp));return t&&bl.call(e,Xp)&&r.unshift(e),r=r.filter(n),r},Qp=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var i=o.shift();if(!Jp(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),a=s.length?s:i.children,l=Qp(a,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:i,candidates:l})}else{var u=bl.call(i,Xp);u&&n.filter(i)&&(t||!e.includes(i))&&r.push(i);var d=i.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(i),f=!Jp(d,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(d&&f){var m=Qp(d===!0?i.children:d.children,!0,n);n.flatten?r.push.apply(r,m):r.push({scopeParent:i,candidates:m})}else o.unshift.apply(o,i.children)}}return r},B4=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},H4=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||USe(e))&&!B4(e)?0:e.tabIndex},qSe=function(e,t){var n=H4(e);return n<0&&t&&!B4(e)?0:n},KSe=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},G4=function(e){return e.tagName==="INPUT"},YSe=function(e){return G4(e)&&e.type==="hidden"},XSe=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},ZSe=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},JSe=function(e){if(!e.name)return!0;var t=e.form||Zp(e),n=function(i){return t.querySelectorAll('input[type="radio"][name="'+i+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=n(window.CSS.escape(e.name));else try{r=n(e.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 o=ZSe(r,e.form);return!o||o===e},QSe=function(e){return G4(e)&&e.type==="radio"},eNe=function(e){return QSe(e)&&!JSe(e)},tNe=function(e){var t,n=e&&Zp(e),r=(t=n)===null||t===void 0?void 0:t.host,o=!1;if(n&&n!==e){var i,s,a;for(o=!!((i=r)!==null&&i!==void 0&&(s=i.ownerDocument)!==null&&s!==void 0&&s.contains(r)||e!=null&&(a=e.ownerDocument)!==null&&a!==void 0&&a.contains(e));!o&&r;){var l,u,d;n=Zp(r),r=(l=n)===null||l===void 0?void 0:l.host,o=!!((u=r)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(r))}}return o},cI=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},nNe=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e){var o=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(e).visibility==="hidden")return!0;var i=bl.call(e,"details>summary:first-of-type"),s=i?e.parentElement:e;if(bl.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof r=="function"){for(var a=e;e;){var l=e.parentElement,u=Zp(e);if(l&&!l.shadowRoot&&r(l)===!0)return cI(e);e.assignedSlot?e=e.assignedSlot:!l&&u!==e.ownerDocument?e=u.host:e=l}e=a}if(tNe(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return cI(e);return!1},rNe=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName==="LEGEND")return bl.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},px=function(e,t){return!(t.disabled||YSe(t)||nNe(t,e)||XSe(t)||rNe(t))},mx=function(e,t){return!(eNe(t)||H4(t)<0||!px(e,t))},oNe=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},W4=function(e){var t=[],n=[];return e.forEach(function(r,o){var i=!!r.scopeParent,s=i?r.scopeParent:r,a=qSe(s,i),l=i?W4(r.candidates):s;a===0?i?t.push.apply(t,l):t.push(s):n.push({documentOrder:o,tabIndex:a,item:r,isScope:i,content:l})}),n.sort(KSe).reduce(function(r,o){return o.isScope?r.push.apply(r,o.content):r.push(o.content),r},[]).concat(t)},Wh=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Qp([e],t.includeContainer,{filter:mx.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:oNe}):n=z4(e,t.includeContainer,mx.bind(null,t)),W4(n)},iNe=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Qp([e],t.includeContainer,{filter:px.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=z4(e,t.includeContainer,px.bind(null,t)),n},U4=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return bl.call(e,Xp)===!1?!1:mx(t,e)};function Nn(e){return e?.ownerDocument||document}const eu=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function q4(e,t){const n=Wh(e,eu()),r=n.length;if(r===0)return;const o=Vs(Nn(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function K4(e){return q4(Nn(e).body,1)||e}function Y4(e){return q4(Nn(e).body,-1)||e}function lc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Wt(n,r)}function sNe(e){Wh(e,eu()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function uI(e){e.querySelectorAll("[data-tabindex]").forEach(t=>{const n=t.dataset.tabindex;delete t.dataset.tabindex,n?t.setAttribute("tabindex",n):t.removeAttribute("tabindex")})}function X4(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=en(o),s=bSe(r,n,!1);c.useEffect(()=>{if(!t)return;const a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,n,i,s])}const jl=0;class Pc{static create(){return new Pc}currentId=jl;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=jl,n()},t)}isStarted(){return this.currentId!==jl}clear=()=>{this.currentId!==jl&&(clearTimeout(this.currentId),this.currentId=jl)};disposeEffect=()=>this.clear}function _c(){const e=Ro(Pc.create).current;return M4(e.disposeEffect),e}let dI={},fI={},pI="";function aNe(e){if(typeof document>"u")return!1;const t=Nn(e);return Fn(t).innerWidth-t.documentElement.clientWidth>0}function lNe(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const t=Nn(e),n=t.documentElement,r=t.body,o=xs(n)?n:r,i=o.style.overflowY,s=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",o.style.overflowY="scroll";const a=o.offsetWidth;o.style.overflowY="hidden";const l=o.offsetWidth;return o.style.overflowY=i,n.style.scrollbarGutter=s,a===l}function cNe(e){const t=Nn(e),n=t.documentElement,r=t.body,o=xs(n)?n:r,i={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,i)}}function uNe(e){const t=Nn(e),n=t.documentElement,r=t.body,o=Fn(n);let i=0,s=0,a=!1;const l=so.create();if(V4&&(o.visualViewport?.scale??1)!==1)return()=>{};function u(){const m=o.getComputedStyle(n),p=o.getComputedStyle(r),v=(m.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,s=n.scrollLeft,dI={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},pI=n.style.scrollBehavior,fI={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 g=n.scrollHeight>n.clientHeight,h=n.scrollWidth>n.clientWidth,b=m.overflowY==="scroll"||p.overflowY==="scroll",y=m.overflowX==="scroll"||p.overflowX==="scroll",x=Math.max(0,o.innerWidth-r.clientWidth),w=Math.max(0,o.innerHeight-r.clientHeight),C=parseFloat(p.marginTop)+parseFloat(p.marginBottom),R=parseFloat(p.marginLeft)+parseFloat(p.marginRight),k=xs(n)?n:r;if(a=lNe(e),a){n.style.scrollbarGutter=v,k.style.overflowY="hidden",k.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:v,overflowY:"hidden",overflowX:"hidden"}),(g||b)&&(n.style.overflowY="scroll"),(h||y)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:C||w?`calc(100dvh - ${C+w}px)`:"100dvh",width:R||x?`calc(100vw - ${R+x}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=s,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function d(){Object.assign(n.style,dI),Object.assign(r.style,fI),a||(n.scrollTop=i,n.scrollLeft=s,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=pI)}function f(){d(),l.request(u)}return u(),o.addEventListener("resize",f),()=>{l.cancel(),d(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",f)}}class dNe{lockCount=0;restore=null;timeoutLock=Pc.create();timeoutUnlock=Pc.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 n=Nn(t).documentElement,r=Fn(n).getComputedStyle(n).overflowY;if(r==="hidden"||r==="clip"){this.restore=nr;return}const o=NSe||!aNe(t);this.restore=o?cNe(t):uNe(t)}}const fNe=new dNe;function pNe(e=!0,t=null){ct(()=>{if(e)return fNe.acquire(t)},[e,t])}function el(e){const t=Ro(mNe,e).current;return t.next=e,ct(t.effect),t}function mNe(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function hNe(){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 Z4=c.createContext(null);process.env.NODE_ENV!=="production"&&(Z4.displayName="FloatingNodeContext");const J4=c.createContext(null);process.env.NODE_ENV!=="production"&&(J4.displayName="FloatingTreeContext");const gNe=()=>c.useContext(Z4)?.id||null,Q4=e=>{const t=c.useContext(J4);return e??t};function hx(e){return`data-base-ui-${e}`}const vNe={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},e5={...vNe,position:"fixed",top:0,left:0},Tc=c.forwardRef(function(e,t){const[n,r]=c.useState();return ct(()=>{OSe&&r("button")},[]),E.jsx("span",{...e,ref:t,style:e5,"aria-hidden":n?void 0:!0,tabIndex:0,role:n,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(Tc.displayName="FocusGuard");let mI=0;function ob(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(mI);const i=()=>e?.focus({preventScroll:n});o?i():mI=requestAnimationFrame(i)}const tl={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function hI(e){return e==="inert"?tl.inert:e==="aria-hidden"?tl["aria-hidden"]:tl.none}let Fd=new WeakSet,$d={},ib=0;const t5=e=>e&&(e.host||t5(e.parentNode)),bNe=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=t5(n);return e.contains(r)?r:null}).filter(n=>n!=null);function yNe(e,t,n,r){const o="data-base-ui-inert",i=r?"inert":n?"aria-hidden":null,s=bNe(t,e),a=new Set,l=new Set(s),u=[];$d[o]||($d[o]=new WeakMap);const d=$d[o];s.forEach(f),m(t),a.clear();function f(p){!p||a.has(p)||(a.add(p),p.parentNode&&f(p.parentNode))}function m(p){!p||l.has(p)||[].forEach.call(p.children,v=>{if(ys(v)!=="script")if(a.has(v))m(v);else{const g=i?v.getAttribute(i):null,h=g!==null&&g!=="false",b=hI(i),y=(b.get(v)||0)+1,x=(d.get(v)||0)+1;b.set(v,y),d.set(v,x),u.push(v),y===1&&h&&Fd.add(v),x===1&&v.setAttribute(o,""),!h&&i&&v.setAttribute(i,i==="inert"?"":"true")}})}return ib+=1,()=>{u.forEach(p=>{const v=hI(i),g=(v.get(p)||0)-1,h=(d.get(p)||0)-1;v.set(p,g),d.set(p,h),g||(!Fd.has(p)&&i&&p.removeAttribute(i),Fd.delete(p)),h||p.removeAttribute(o)}),ib-=1,ib||(tl.inert=new WeakMap,tl["aria-hidden"]=new WeakMap,tl.none=new WeakMap,Fd=new WeakSet,$d={})}}function xNe(e,t=!1,n=!1){const r=Nn(e[0]).body;return yNe(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const MC=c.createContext(null);process.env.NODE_ENV!=="production"&&(MC.displayName="PortalContext");const n5=()=>c.useContext(MC),wNe=hx("portal");function ENe(e={}){const{ref:t,container:n,componentProps:r=mr,elementProps:o}=e,i=wC(),s=n5()?.portalNode,[a,l]=c.useState(null),[u,d]=c.useState(null),f=en(v=>{v!==null&&d(v)}),m=c.useRef(null);ct(()=>{if(n===null){m.current&&(m.current=null,d(null),l(null));return}if(i==null)return;const v=(n&&(kC(n)?n:n.current))??s??document.body;if(v==null){m.current&&(m.current=null,d(null),l(null));return}m.current!==v&&(m.current=v,d(null),l(v))},[n,s,i]);const p=Yn("div",r,{ref:[t,f],props:[{id:i,[wNe]:""},o]});return{portalNode:u,portalSubtree:a&&p?dt.createPortal(p,a):null}}const r5=c.forwardRef(function(e,t){const{children:n,container:r,className:o,render:i,renderGuards:s,...a}=e,{portalNode:l,portalSubtree:u}=ENe({container:r,ref:t,componentProps:e,elementProps:a}),d=c.useRef(null),f=c.useRef(null),m=c.useRef(null),p=c.useRef(null),[v,g]=c.useState(null),h=v?.modal,b=v?.open,y=typeof s=="boolean"?s:!!v&&!v.modal&&v.open&&!!l;c.useEffect(()=>{if(!l||h)return;function w(C){l&&C.relatedTarget&&lc(C)&&(C.type==="focusin"?uI:sNe)(l)}return l.addEventListener("focusin",w,!0),l.addEventListener("focusout",w,!0),()=>{l.removeEventListener("focusin",w,!0),l.removeEventListener("focusout",w,!0)}},[l,h]),c.useEffect(()=>{!l||b||uI(l)},[b,l]);const x=c.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:m,afterInsideRef:p,portalNode:l,setFocusManagerState:g}),[l]);return E.jsxs(c.Fragment,{children:[u,E.jsxs(MC.Provider,{value:x,children:[y&&l&&E.jsx(Tc,{"data-type":"outside",ref:d,onFocus:w=>{if(lc(w,l))m.current?.focus();else{const C=v?v.domReference:null;Y4(C)?.focus()}}}),y&&l&&E.jsx("span",{"aria-owns":l.id,style:rSe}),l&&dt.createPortal(n,l),y&&l&&E.jsx(Tc,{"data-type":"outside",ref:f,onFocus:w=>{if(lc(w,l))p.current?.focus();else{const C=v?v.domReference:null;K4(C)?.focus(),v?.closeOnFocusOut&&v?.onOpenChange(!1,Yt(I4,w.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(r5.displayName="FloatingPortal");function CNe(e,t){const n=Fn(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 gI=20;let Mi=[];function PC(){Mi=Mi.filter(e=>e.deref()?.isConnected)}function kNe(e){PC(),e&&ys(e)!=="body"&&(Mi.push(new WeakRef(e)),Mi.length>gI&&(Mi=Mi.slice(-gI)))}function sb(){return PC(),Mi[Mi.length-1]?.deref()}function RNe(e){if(!e)return null;const t=eu();return U4(e,t)?e:Wh(e,t)[0]||e}function SNe(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Fr(e).display!=="none"}function vI(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=eu(),r=iNe(e,n).filter(i=>{const s=i.getAttribute("data-tabindex")||"";return U4(i,n)||i.hasAttribute("data-tabindex")&&!s.startsWith("-")}),o=e.getAttribute("tabindex");t.current.includes("floating")||r.length===0?o!=="0"&&e.setAttribute("tabindex","0"):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function NNe(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:i=!0,restoreFocus:s=!1,modal:a=!0,closeOnFocusOut:l=!0,openInteractionType:u="",nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:m,externalTree:p}=e,v="rootStore"in t?t.rootStore:t,g=v.useState("open"),h=v.useState("domReferenceElement"),b=v.useState("floatingElement"),{events:y,dataRef:x}=v.context,w=en(()=>x.current.floatingContext?.nodeId),C=o===!1,R=rI(h)&&C,k=c.useRef(["content"]),S=el(o),P=el(i),L=el(u),_=Q4(p),O=n5(),B=c.useRef(null),I=c.useRef(null),V=c.useRef(!1),F=c.useRef(!1),D=c.useRef(!1),T=c.useRef(-1),q=c.useRef(""),A=c.useRef(""),ee=c.useRef(null),ie=c.useRef(null),Y=Gp(ee,m,O?.beforeInsideRef),Q=Gp(ie,O?.afterInsideRef),X=_c(),J=_c(),te=CC(),le=O!=null,z=oI(b),re=en((N=z)=>N?Wh(N,eu()):[]),oe=en(N=>{const j=re(N);return k.current.map(()=>j).filter(Boolean).flat()});c.useEffect(()=>{if(r||!a)return;function N(K){K.key==="Tab"&&Wt(z,Vs(Nn(z)))&&re().length===0&&!R&&Tr(K)}const j=Nn(z);return j.addEventListener("keydown",N),()=>{j.removeEventListener("keydown",N)}},[r,h,z,a,k,R,re,oe]),c.useEffect(()=>{if(r||!g)return;const N=Nn(z);function j(){D.current=!1}function K(U){const $=ac(U),W=Wt(b,$)||Wt(h,$)||Wt(O?.portalNode,$);D.current=!W,A.current=U.pointerType||"keyboard",$?.closest(`[${tSe}]`)&&(F.current=!0)}function H(){A.current="keyboard"}return N.addEventListener("pointerdown",K,!0),N.addEventListener("pointerup",j,!0),N.addEventListener("pointercancel",j,!0),N.addEventListener("keydown",H,!0),()=>{N.removeEventListener("pointerdown",K,!0),N.removeEventListener("pointerup",j,!0),N.removeEventListener("pointercancel",j,!0),N.removeEventListener("keydown",H,!0)}},[r,b,h,z,g,O]),c.useEffect(()=>{if(r||!l)return;const N=Nn(z);function j(){F.current=!0,J.start(0,()=>{F.current=!1})}function K(Z){const G=ac(Z),ne=re().indexOf(G);ne!==-1&&(T.current=ne)}function H(Z){const G=Z.relatedTarget,ne=Z.currentTarget,we=ac(Z);queueMicrotask(()=>{const Ve=w(),Ye=v.context.triggerElements,ft=G?.hasAttribute(hx("focus-guard"))&&[ee.current,ie.current,O?.beforeInsideRef.current,O?.afterInsideRef.current,O?.beforeOutsideRef.current,O?.afterOutsideRef.current,Xo(f),Xo(d)].includes(G),qe=!(Wt(h,G)||Wt(b,G)||Wt(G,b)||Wt(O?.portalNode,G)||G!=null&&Ye.hasElement(G)||Ye.hasMatchingElement(ce=>Wt(ce,G))||ft||_&&(dx(_.nodesRef.current,Ve).find(ce=>Wt(ce.context?.elements.floating,G)||Wt(ce.context?.elements.domReference,G))||iI(_.nodesRef.current,Ve).find(ce=>[ce.context?.elements.floating,oI(ce.context?.elements.floating)].includes(G)||ce.context?.elements.domReference===G)));if(ne===h&&z&&vI(z,k),s&&ne!==h&&!SNe(we)&&Vs(N)===N.body){if(Mn(z)&&(z.focus(),s==="popup")){te.request(()=>{z.focus()});return}const ce=T.current,Ke=re(),ot=Ke[ce]||Ke[Ke.length-1]||z;Mn(ot)&&ot.focus()}if(x.current.insideReactTree){x.current.insideReactTree=!1;return}(R||!a)&&G&&qe&&!F.current&&(R||G!==sb())&&(V.current=!0,v.setOpen(!1,Yt(I4,Z)))})}function U(){D.current||(x.current.insideReactTree=!0,X.start(0,()=>{x.current.insideReactTree=!1}))}const $=Mn(h)?h:null,W=[];if(!(!b&&!$))return $&&($.addEventListener("focusout",H),$.addEventListener("pointerdown",j),W.push(()=>{$.removeEventListener("focusout",H),$.removeEventListener("pointerdown",j)})),b&&(b.addEventListener("focusin",K),b.addEventListener("focusout",H),O&&(b.addEventListener("focusout",U,!0),W.push(()=>{b.removeEventListener("focusout",U,!0)})),W.push(()=>{b.removeEventListener("focusin",K),b.removeEventListener("focusout",H)})),()=>{W.forEach(Z=>{Z()})}},[r,h,b,z,a,_,O,v,l,s,re,R,w,k,x,X,J,te,d,f]),c.useEffect(()=>{if(r||!b||!g)return;const N=Array.from(O?.portalNode?.querySelectorAll(`[${hx("portal")}]`)||[]),j=(_?iI(_.nodesRef.current,w()):[]).find(H=>rI(H.context?.elements.domReference||null))?.context?.elements.domReference,K=[b,j,...N,B.current,I.current,ee.current,ie.current,O?.beforeOutsideRef.current,O?.afterOutsideRef.current,Xo(f),Xo(d),R?h:null].filter(H=>H!=null);return xNe(K,a||R)},[g,r,h,b,a,k,O,R,_,w,d,f]),ct(()=>{if(!g||r||!Mn(z))return;const N=Nn(z),j=Vs(N);queueMicrotask(()=>{const K=oe(z),H=S.current,U=typeof H=="function"?H(L.current||""):H;if(U===void 0||U===!1)return;let $;U===!0||U===null?$=K[0]||z:$=Xo(U),$=$||K[0]||z,!Wt(z,j)&&ob($,{preventScroll:$===z})})},[r,g,z,C,oe,S,L]),ct(()=>{if(r||!z)return;const N=Nn(z),j=Vs(N);kNe(j);function K($){if($.open||(q.current=CNe($.nativeEvent,A.current)),$.reason===cSe&&$.nativeEvent.type==="mouseleave"&&(V.current=!0),$.reason===uSe)if($.nested)V.current=!1;else if(TSe($.nativeEvent)||DSe($.nativeEvent))V.current=!1;else{let W=!1;document.createElement("div").focus({get preventScroll(){return W=!0,!1}}),W?V.current=!1:V.current=!0}}y.on("openchange",K);const H=N.createElement("span");H.setAttribute("tabindex","-1"),H.setAttribute("aria-hidden","true"),Object.assign(H.style,e5),le&&h&&h.insertAdjacentElement("afterend",H);function U(){const $=P.current;let W=typeof $=="function"?$(q.current):$;if(W===void 0||W===!1)return null;if(W===null&&(W=!0),typeof W=="boolean"){const G=h||sb();return G&&G.isConnected?G:H}const Z=h||sb()||H;return Xo(W)||Z}return()=>{y.off("openchange",K);const $=Vs(N),W=Wt(b,$)||_&&dx(_.nodesRef.current,w(),!1).some(G=>Wt(G.context?.elements.floating,$)),Z=U();queueMicrotask(()=>{const G=RNe(Z),ne=typeof P.current!="boolean";P.current&&!V.current&&Mn(G)&&(!(!ne&&G!==$&&$!==N.body)||W)&&G.focus({preventScroll:!0}),H.remove(),V.current=!1})}},[r,b,z,P,x,y,_,le,h,w]),ct(()=>{if(!V4||g||!b)return;const N=Vs(Nn(b));!Mn(N)||!OC(N)||Wt(b,N)&&N.blur()},[g,b]),ct(()=>{if(!(r||!O))return O.setFocusManagerState({modal:a,closeOnFocusOut:l,open:g,onOpenChange:v.setOpen,domReference:h}),()=>{O.setFocusManagerState(null)}},[r,O,a,g,v,l,h]),ct(()=>{if(!(r||!z))return vI(z,k),()=>{queueMicrotask(PC)}},[r,z,k]);const M=!r&&(a?!R:!0)&&(le||a);return E.jsxs(c.Fragment,{children:[M&&E.jsx(Tc,{"data-type":"inside",ref:Y,onFocus:N=>{if(a){const j=oe();ob(j[j.length-1])}else O?.portalNode&&(V.current=!1,lc(N,O.portalNode)?K4(h)?.focus():Xo(f??O.beforeOutsideRef)?.focus())}}),n,M&&E.jsx(Tc,{"data-type":"inside",ref:Q,onFocus:N=>{a?ob(oe()[0]):O?.portalNode&&(l&&(V.current=!0),lc(N,O.portalNode)?Y4(h)?.focus():Xo(d??O.afterOutsideRef)?.focus())}})]})}function ONe(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:i="click",toggle:s=!0,ignoreMouse:a=!1,stickIfOpen:l=!0,touchOpenDelay:u=0,reason:d=lSe}=t,f=c.useRef(void 0),m=CC(),p=_c(),v=c.useMemo(()=>({onPointerDown(g){f.current=g.pointerType},onMouseDown(g){const h=f.current,b=g.nativeEvent,y=n.select("open");if(g.button!==0||i==="click"||sI(h)&&a)return;const x=r.current.openEvent,w=x?.type,C=n.select("domReferenceElement")!==g.currentTarget,R=y&&C||!(y&&s&&(!(x&&l)||w==="click"||w==="mousedown"));if(OC(b.target)){const S=Yt(d,b,b.target);R&&h==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,S)}):n.setOpen(R,S);return}const k=g.currentTarget;m.request(()=>{const S=Yt(d,b,k);R&&h==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,S)}):n.setOpen(R,S)})},onClick(g){if(i==="mousedown-only")return;const h=f.current;if(i==="mousedown"&&h){f.current=void 0;return}if(sI(h)&&a)return;const b=n.select("open"),y=r.current.openEvent,x=n.select("domReferenceElement")!==g.currentTarget,w=b&&x||!(b&&s&&(!(y&&l)||F4(y))),C=Yt(d,g.nativeEvent,g.currentTarget);w&&h==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,C)}):n.setOpen(w,C)},onKeyDown(){f.current=void 0}}),[r,i,a,n,l,s,m,p,u,d]);return c.useMemo(()=>o?{reference:v}:mr,[o,v])}function bI(e,t,n){let{reference:r,floating:o}=e;const i=Ar(t),s=Gh(t),a=Hh(s),l=yr(t),u=i==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,m=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(ai(t)){case"start":p[s]-=m*(n&&u?-1:1);break;case"end":p[s]+=m*(n&&u?-1:1);break}return p}async function INe(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:p=0}=So(t,e),v=AC(p),g=a[m?f==="floating"?"reference":"floating":f],h=Yp(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),b=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},w=Yp(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:y,strategy:l}):b);return{top:(h.top-w.top+v.top)/x.y,bottom:(w.bottom-h.bottom+v.bottom)/x.y,left:(h.left-w.left+v.left)/x.x,right:(w.right-h.right+v.right)/x.x}}const ANe=50,MNe=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:INe},l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=bI(u,r,l),m=r,p=0;const v={};for(let g=0;g<i.length;g++){const h=i[g];if(!h)continue;const{name:b,fn:y}=h,{x,y:w,data:C,reset:R}=await y({x:d,y:f,initialPlacement:r,placement:m,strategy:o,middlewareData:v,rects:u,platform:a,elements:{reference:e,floating:t}});d=x??d,f=w??f,v[b]={...v[b],...C},R&&p<ANe&&(p++,typeof R=="object"&&(R.placement&&(m=R.placement),R.rects&&(u=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:d,y:f}=bI(u,m,l)),g=-1)}return{x:d,y:f,placement:m,strategy:o,middlewareData:v}},PNe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=So(e,t)||{};if(u==null)return{};const f=AC(d),m={x:n,y:r},p=Gh(o),v=Hh(p),g=await s.getDimensions(u),h=p==="y",b=h?"top":"left",y=h?"bottom":"right",x=h?"clientHeight":"clientWidth",w=i.reference[v]+i.reference[p]-m[p]-i.floating[v],C=m[p]-i.reference[p],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let k=R?R[x]:0;(!k||!await(s.isElement==null?void 0:s.isElement(R)))&&(k=a.floating[x]||i.floating[v]);const S=w/2-C/2,P=k/2-g[v]/2-1,L=es(f[b],P),_=es(f[y],P),O=L,B=k-g[v]-_,I=k/2-g[v]/2+S,V=qp(O,I,B),F=!l.arrow&&ai(o)!=null&&I!==V&&i.reference[v]/2-(I<O?L:_)-g[v]/2<0,D=F?I<O?I-O:I-B:0;return{[p]:m[p]+D,data:{[p]:V,centerOffset:I-V-D,...F&&{alignmentOffset:D}},reset:F}}}),_Ne=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...h}=So(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=yr(o),y=Ar(a),x=yr(a)===a,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=m||(x||!g?[Kp(a)]:FSe(a)),R=v!=="none";!m&&R&&C.push(...HSe(a,g,v,w));const k=[a,...C],S=await l.detectOverflow(t,h),P=[];let L=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&P.push(S[b]),f){const I=VSe(o,s,w);P.push(S[I[0]],S[I[1]])}if(L=[...L,{placement:o,overflows:P}],!P.every(I=>I<=0)){var _,O;const I=(((_=i.flip)==null?void 0:_.index)||0)+1,V=k[I];if(V&&(!(f==="alignment"&&y!==Ar(V))||L.every(D=>Ar(D.placement)===y?D.overflows[0]>0:!0)))return{data:{index:I,overflows:L},reset:{placement:V}};let F=(O=L.filter(D=>D.overflows[0]<=0).sort((D,T)=>D.overflows[1]-T.overflows[1])[0])==null?void 0:O.placement;if(!F)switch(p){case"bestFit":{var B;const D=(B=L.filter(T=>{if(R){const q=Ar(T.placement);return q===y||q==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(q=>q>0).reduce((q,A)=>q+A,0)]).sort((T,q)=>T[1]-q[1])[0])==null?void 0:B[0];D&&(F=D);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function yI(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function xI(e){return LSe.some(t=>e[t]>=0)}const TNe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=So(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=yI(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:xI(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=yI(s,n.floating);return{data:{escapedOffsets:a,escaped:xI(a)}}}default:return{}}}}},o5=new Set(["left","top"]);async function DNe(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=yr(n),a=ai(n),l=Ar(n)==="y",u=o5.has(s)?-1:1,d=i&&l?-1:1,f=So(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof v=="number"&&(p=a==="end"?v*-1:v),l?{x:p*d,y:m*u}:{x:m*u,y:p*d}}const LNe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await DNe(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},jNe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:y,y:x}=b;return{x:y,y:x}}},...u}=So(e,t),d={x:n,y:r},f=await i.detectOverflow(t,u),m=Ar(yr(o)),p=IC(m);let v=d[p],g=d[m];if(s){const b=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=v+f[b],w=v-f[y];v=qp(x,v,w)}if(a){const b=m==="y"?"top":"left",y=m==="y"?"bottom":"right",x=g+f[b],w=g-f[y];g=qp(x,g,w)}const h=l.fn({...t,[p]:v,[m]:g});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:s,[m]:a}}}}}},VNe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=So(e,t),d={x:n,y:r},f=Ar(o),m=IC(f);let p=d[m],v=d[f];const g=So(a,t),h=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const x=m==="y"?"height":"width",w=i.reference[m]-i.floating[x]+h.mainAxis,C=i.reference[m]+i.reference[x]-h.mainAxis;p<w?p=w:p>C&&(p=C)}if(u){var b,y;const x=m==="y"?"width":"height",w=o5.has(yr(o)),C=i.reference[f]-i.floating[x]+(w&&((b=s.offset)==null?void 0:b[f])||0)+(w?0:h.crossAxis),R=i.reference[f]+i.reference[x]+(w?0:((y=s.offset)==null?void 0:y[f])||0)-(w?h.crossAxis:0);v<C?v=C:v>R&&(v=R)}return{[m]:p,[f]:v}}}},FNe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=So(e,t),d=await s.detectOverflow(t,u),f=yr(o),m=ai(o),p=Ar(o)==="y",{width:v,height:g}=i.floating;let h,b;f==="top"||f==="bottom"?(h=f,b=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=f,h=m==="end"?"top":"bottom");const y=g-d.top-d.bottom,x=v-d.left-d.right,w=es(g-d[h],y),C=es(v-d[b],x),R=!t.middlewareData.shift;let k=w,S=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=y),R&&!m){const L=ur(d.left,0),_=ur(d.right,0),O=ur(d.top,0),B=ur(d.bottom,0);p?S=v-2*(L!==0||_!==0?L+_:ur(d.left,d.right)):k=g-2*(O!==0||B!==0?O+B:ur(d.top,d.bottom))}await l({...t,availableWidth:S,availableHeight:k});const P=await s.getDimensions(a.floating);return v!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function i5(e){const t=Fr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Mn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Up(n)!==i||Up(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function _C(e){return wn(e)?e:e.contextElement}function nl(e){const t=_C(e);if(!Mn(t))return vo(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=i5(t);let s=(i?Up(n.width):n.width)/r,a=(i?Up(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const $Ne=vo(0);function s5(e){const t=Fn(e);return!SC()||!t.visualViewport?$Ne:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function zNe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Fn(e)?!1:t}function Qs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=_C(e);let s=vo(1);t&&(r?wn(r)&&(s=nl(r)):s=nl(e));const a=zNe(i,n,r)?s5(i):vo(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,d=o.width/s.x,f=o.height/s.y;if(i){const m=Fn(i),p=r&&wn(r)?Fn(r):r;let v=m,g=cx(v);for(;g&&r&&p!==v;){const h=nl(g),b=g.getBoundingClientRect(),y=Fr(g),x=b.left+(g.clientLeft+parseFloat(y.paddingLeft))*h.x,w=b.top+(g.clientTop+parseFloat(y.paddingTop))*h.y;l*=h.x,u*=h.y,d*=h.x,f*=h.y,l+=x,u+=w,v=Fn(g),g=cx(v)}}return Yp({width:d,height:f,x:l,y:u})}function Uh(e,t){const n=zh(e).scrollLeft;return t?t.left+n:Qs(Fo(e)).left+n}function a5(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Uh(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function BNe(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Fo(r),a=t?$h(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=vo(1);const d=vo(0),f=Mn(r);if((f||!f&&!i)&&((ys(r)!=="body"||xs(s))&&(l=zh(r)),f)){const p=Qs(r);u=nl(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const m=s&&!f&&!i?a5(s,l):vo(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+m.x,y:n.y*u.y-l.scrollTop*u.y+d.y+m.y}}function HNe(e){return Array.from(e.getClientRects())}function GNe(e){const t=Fo(e),n=zh(e),r=e.ownerDocument.body,o=ur(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ur(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Uh(e);const a=-n.scrollTop;return Fr(r).direction==="rtl"&&(s+=ur(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const wI=25;function WNe(e,t){const n=Fn(e),r=Fo(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const d=SC();(!d||d&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const u=Uh(r);if(u<=0){const d=r.ownerDocument,f=d.body,m=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,v=Math.abs(r.clientWidth-f.clientWidth-p);v<=wI&&(i-=v)}else u<=wI&&(i+=u);return{width:i,height:s,x:a,y:l}}function UNe(e,t){const n=Qs(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Mn(e)?nl(e):vo(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function EI(e,t,n){let r;if(t==="viewport")r=WNe(e,n);else if(t==="document")r=GNe(Fo(e));else if(wn(t))r=UNe(t,n);else{const o=s5(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Yp(r)}function l5(e,t){const n=Qi(e);return n===t||!wn(n)||vl(n)?!1:Fr(n).position==="fixed"||l5(n,t)}function qNe(e,t){const n=t.get(e);if(n)return n;let r=Mc(e,[],!1).filter(a=>wn(a)&&ys(a)!=="body"),o=null;const i=Fr(e).position==="fixed";let s=i?Qi(e):e;for(;wn(s)&&!vl(s);){const a=Fr(s),l=RC(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&o&&(o.position==="absolute"||o.position==="fixed")||xs(s)&&!l&&l5(e,s))?r=r.filter(u=>u!==s):o=a,s=Qi(s)}return t.set(e,r),r}function KNe(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?$h(t)?[]:qNe(t,this._c):[].concat(n),r],s=EI(t,i[0],o);let a=s.top,l=s.right,u=s.bottom,d=s.left;for(let f=1;f<i.length;f++){const m=EI(t,i[f],o);a=ur(m.top,a),l=es(m.right,l),u=es(m.bottom,u),d=ur(m.left,d)}return{width:l-d,height:u-a,x:d,y:a}}function YNe(e){const{width:t,height:n}=i5(e);return{width:t,height:n}}function XNe(e,t,n){const r=Mn(t),o=Fo(t),i=n==="fixed",s=Qs(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=vo(0);function u(){l.x=Uh(o)}if(r||!r&&!i)if((ys(t)!=="body"||xs(o))&&(a=zh(t)),r){const p=Qs(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&u();i&&!r&&o&&u();const d=o&&!r&&!i?a5(o,a):vo(0),f=s.left+a.scrollLeft-l.x-d.x,m=s.top+a.scrollTop-l.y-d.y;return{x:f,y:m,width:s.width,height:s.height}}function ab(e){return Fr(e).position==="static"}function CI(e,t){if(!Mn(e)||Fr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Fo(e)===n&&(n=n.ownerDocument.body),n}function c5(e,t){const n=Fn(e);if($h(e))return n;if(!Mn(e)){let o=Qi(e);for(;o&&!vl(o);){if(wn(o)&&!ab(o))return o;o=Qi(o)}return n}let r=CI(e,t);for(;r&&xSe(r)&&ab(r);)r=CI(r,t);return r&&vl(r)&&ab(r)&&!RC(r)?n:r||CSe(e)||n}const ZNe=async function(e){const t=this.getOffsetParent||c5,n=this.getDimensions,r=await n(e.floating);return{reference:XNe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function JNe(e){return Fr(e).direction==="rtl"}const QNe={convertOffsetParentRelativeRectToViewportRelativeRect:BNe,getDocumentElement:Fo,getClippingRect:KNe,getOffsetParent:c5,getElementRects:ZNe,getClientRects:HNe,getDimensions:YNe,getScale:nl,isElement:wn,isRTL:JNe};function u5(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eOe(e,t){let n=null,r;const o=Fo(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:d,top:f,width:m,height:p}=u;if(a||t(),!m||!p)return;const v=Vd(f),g=Vd(o.clientWidth-(d+m)),h=Vd(o.clientHeight-(f+p)),b=Vd(d),y={rootMargin:-v+"px "+-g+"px "+-h+"px "+-b+"px",threshold:ur(0,es(1,l))||1};let x=!0;function w(C){const R=C[0].intersectionRatio;if(R!==l){if(!x)return s();R?s(!1,R):r=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!u5(u,e.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(w,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(w,y)}n.observe(e)}return s(!0),i}function gx(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=_C(e),d=o||i?[...u?Mc(u):[],...t?Mc(t):[]]:[];d.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const f=u&&a?eOe(u,n):null;let m=-1,p=null;s&&(p=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),u&&!l&&p.observe(u),t&&p.observe(t));let v,g=l?Qs(e):null;l&&h();function h(){const b=Qs(e);g&&!u5(g,b)&&n(),g=b,v=requestAnimationFrame(h)}return n(),()=>{var b;d.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f?.(),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(v)}}const tOe=LNe,nOe=jNe,rOe=_Ne,oOe=FNe,iOe=TNe,kI=PNe,sOe=VNe,aOe=(e,t,n)=>{const r=new Map,o={platform:QNe,...n},i={...o.platform,_c:r};return MNe(e,t,{...o,platform:i})};var lOe=typeof document<"u",cOe=function(){},gf=lOe?ae.useLayoutEffect:cOe;function em(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(!em(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 i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!em(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function d5(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function RI(e,t){const n=d5(e);return Math.round(t*n)/n}function lb(e){const t=c.useRef(e);return gf(()=>{t.current=e}),t}function f5(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,f]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=c.useState(r);em(m,r)||p(r);const[v,g]=c.useState(null),[h,b]=c.useState(null),y=c.useCallback(T=>{T!==R.current&&(R.current=T,g(T))},[]),x=c.useCallback(T=>{T!==k.current&&(k.current=T,b(T))},[]),w=i||v,C=s||h,R=c.useRef(null),k=c.useRef(null),S=c.useRef(d),P=l!=null,L=lb(l),_=lb(o),O=lb(u),B=c.useCallback(()=>{if(!R.current||!k.current)return;const T={placement:t,strategy:n,middleware:m};_.current&&(T.platform=_.current),aOe(R.current,k.current,T).then(q=>{const A={...q,isPositioned:O.current!==!1};I.current&&!em(S.current,A)&&(S.current=A,dt.flushSync(()=>{f(A)}))})},[m,t,n,_,O]);gf(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,f(T=>({...T,isPositioned:!1})))},[u]);const I=c.useRef(!1);gf(()=>(I.current=!0,()=>{I.current=!1}),[]),gf(()=>{if(w&&(R.current=w),C&&(k.current=C),w&&C){if(L.current)return L.current(w,C,B);B()}},[w,C,B,L,P]);const V=c.useMemo(()=>({reference:R,floating:k,setReference:y,setFloating:x}),[y,x]),F=c.useMemo(()=>({reference:w,floating:C}),[w,C]),D=c.useMemo(()=>{const T={position:n,left:0,top:0};if(!F.floating)return T;const q=RI(F.floating,d.x),A=RI(F.floating,d.y);return a?{...T,transform:"translate("+q+"px, "+A+"px)",...d5(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:A}},[n,a,F.floating,d.x,d.y]);return c.useMemo(()=>({...d,update:B,refs:V,elements:F,floatingStyles:D}),[d,B,V,F,D])}const uOe=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?kI({element:r.current,padding:o}).fn(n):{}:r?kI({element:r,padding:o}).fn(n):{}}}},p5=(e,t)=>{const n=tOe(e);return{name:n.name,fn:n.fn,options:[e,t]}},m5=(e,t)=>{const n=nOe(e);return{name:n.name,fn:n.fn,options:[e,t]}},h5=(e,t)=>({fn:sOe(e).fn,options:[e,t]}),g5=(e,t)=>{const n=rOe(e);return{name:n.name,fn:n.fn,options:[e,t]}},v5=(e,t)=>{const n=oOe(e);return{name:n.name,fn:n.fn,options:[e,t]}},b5=(e,t)=>{const n=iOe(e);return{name:n.name,fn:n.fn,options:[e,t]}},dOe=(e,t)=>{const n=uOe(e);return{name:n.name,fn:n.fn,options:[e,t]}};var fOe=(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(i){({stack:o}=i)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
412
|
+
\`createSelector([state => state.todos], todos => todos)\`
|
|
413
|
+
This could lead to inefficient memoization and unnecessary re-renders.
|
|
414
|
+
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},pOe=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:i,inputSelectorResultsCopy:s}=e,a=r(()=>({}),...o);if(a.apply(null,i)!==a.apply(null,s)){let l;try{throw new Error}catch(u){({stack:l}=u)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
415
|
+
This means your output selector will likely run more frequently than intended.
|
|
416
|
+
Avoid returning a new reference inside your input selector, e.g.
|
|
417
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:i,secondInputs:s,stack:l})}},mOe={inputStabilityCheck:"once",identityFunctionCheck:"once"},tm=Symbol("NOT_FOUND");function hOe(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function gOe(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function vOe(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 SI=e=>Array.isArray(e)?e:[e];function bOe(e){const t=Array.isArray(e[0])?e[0]:e;return vOe(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function NI(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var yOe=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...mOe,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:fOe},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:pOe}}};function xOe(e){let t;return{get(n){return t&&e(t.key,n)?t.value:tm},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function wOe(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 tm}function o(a,l){r(a)===tm&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var EOe=(e,t)=>e===t;function COe(e){return function(t,n){if(t===null||n===null||t.length!==n.length)return!1;const{length:r}=t;for(let o=0;o<r;o++)if(!e(t[o],n[o]))return!1;return!0}}function kOe(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=EOe,maxSize:o=1,resultEqualityCheck:i}=n,s=COe(r);let a=0;const l=o<=1?xOe(s):wOe(o,s);function u(){let d=l.get(arguments);if(d===tm){if(d=e.apply(null,arguments),a++,i){const f=l.getEntries().find(m=>i(m.value,d));f&&(d=f.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 ROe=class{constructor(e){this.value=e}deref(){return this.value}},SOe=typeof WeakRef<"u"?WeakRef:ROe,NOe=0,OI=1;function zd(){return{s:NOe,v:void 0,o:null,p:null}}function y5(e,t={}){let n=zd();const{resultEqualityCheck:r}=t;let o,i=0;function s(){let a=n;const{length:l}=arguments;for(let f=0,m=l;f<m;f++){const p=arguments[f];if(typeof p=="function"||typeof p=="object"&&p!==null){let v=a.o;v===null&&(a.o=v=new WeakMap);const g=v.get(p);g===void 0?(a=zd(),v.set(p,a)):a=g}else{let v=a.p;v===null&&(a.p=v=new Map);const g=v.get(p);g===void 0?(a=zd(),v.set(p,a)):a=g}}const u=a;let d;if(a.s===OI)d=a.v;else if(d=e.apply(null,arguments),i++,r){const f=o?.deref?.()??o;f!=null&&r(f,d)&&(d=f,i!==0&&i--),o=typeof d=="object"&&d!==null||typeof d=="function"?new SOe(d):d}return u.s=OI,u.v=d,d}return s.clearCache=()=>{n=zd(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function x5(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,s=0,a,l={},u=o.pop();typeof u=="object"&&(l=u,u=o.pop()),hOe(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const d={...n,...l},{memoize:f,memoizeOptions:m=[],argsMemoize:p=y5,argsMemoizeOptions:v=[],devModeChecks:g={}}=d,h=SI(m),b=SI(v),y=bOe(o),x=f(function(){return i++,u.apply(null,arguments)},...h);let w=!0;const C=p(function(){s++;const R=NI(y,arguments);if(a=x.apply(null,R),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:k,inputStabilityCheck:S}=yOe(w,g);if(k.shouldRun&&k.run(u,R,a),S.shouldRun){const P=NI(y,arguments);S.run({inputSelectorResults:R,inputSelectorResultsCopy:P},{memoize:f,memoizeOptions:h},arguments)}w&&(w=!1)}return a},...b);return Object.assign(C,{resultFunc:u,memoizedResultFunc:x,dependencies:y,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:f,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var OOe=x5(y5),IOe=Object.assign((e,t=OOe)=>{gOe(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(o=>e[o]);return t(r,(...o)=>o.reduce((i,s,a)=>(i[n[a]]=s,i),{}))},{withTypes:()=>IOe});x5({memoize:kOe,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const He=(e,t,n,r,o,i,...s)=>{if(s.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":eo(1));let a;if(e)a=e;else throw new Error("Missing arguments");return a};var cb={exports:{}},ub={},II;function AOe(){if(II)return ub;II=1;var e=ae;function t(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(f,m){var p=m(),v=r({inst:{value:p,getSnapshot:m}}),g=v[0].inst,h=v[1];return i(function(){g.value=p,g.getSnapshot=m,l(g)&&h({inst:g})},[f,p,m]),o(function(){return l(g)&&h({inst:g}),f(function(){l(g)&&h({inst:g})})},[f]),s(p),p}function l(f){var m=f.getSnapshot;f=f.value;try{var p=m();return!n(f,p)}catch{return!0}}function u(f,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return ub.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,ub}var AI={},MI;function MOe(){return MI||(MI=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}function t(p,v){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=v();if(!f){var h=v();i(g,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}h=s({inst:{value:g,getSnapshot:v}});var b=h[0].inst,y=h[1];return l(function(){b.value=g,b.getSnapshot=v,n(b)&&y({inst:b})},[p,g,v]),a(function(){return n(b)&&y({inst:b}),p(function(){n(b)&&y({inst:b})})},[p]),u(g),g}function n(p){var v=p.getSnapshot;p=p.value;try{var g=v();return!i(p,g)}catch{return!0}}function r(p,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=ae,i=typeof Object.is=="function"?Object.is:e,s=o.useState,a=o.useEffect,l=o.useLayoutEffect,u=o.useDebugValue,d=!1,f=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;AI.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),AI}var PI;function TC(){return PI||(PI=1,process.env.NODE_ENV==="production"?cb.exports=AOe():cb.exports=MOe()),cb.exports}var POe=TC(),db={exports:{}},fb={},_I;function _Oe(){if(_I)return fb;_I=1;var e=ae,t=TC();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,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return fb.useSyncExternalStoreWithSelector=function(u,d,f,m,p){var v=i(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=a(function(){function b(R){if(!y){if(y=!0,x=R,R=m(R),p!==void 0&&g.hasValue){var k=g.value;if(p(k,R))return w=k}return w=R}if(k=w,r(x,R))return k;var S=m(R);return p!==void 0&&p(k,S)?(x=R,k):(x=R,w=S)}var y=!1,x,w,C=f===void 0?null:f;return[function(){return b(d())},C===null?void 0:function(){return b(C())}]},[d,f,m,p]);var h=o(u,v[0],v[1]);return s(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},fb}var TI={},DI;function TOe(){return DI||(DI=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=ae,n=TC(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;TI.useSyncExternalStoreWithSelector=function(u,d,f,m,p){var v=i(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=a(function(){function b(R){if(!y){if(y=!0,x=R,R=m(R),p!==void 0&&g.hasValue){var k=g.value;if(p(k,R))return w=k}return w=R}if(k=w,r(x,R))return k;var S=m(R);return p!==void 0&&p(k,S)?(x=R,k):(x=R,w=S)}var y=!1,x,w,C=f===void 0?null:f;return[function(){return b(d())},C===null?void 0:function(){return b(C())}]},[d,f,m,p]);var h=o(u,v[0],v[1]);return s(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),TI}var LI;function DOe(){return LI||(LI=1,process.env.NODE_ENV==="production"?db.exports=_Oe():db.exports=TOe()),db.exports}var LOe=DOe();const jOe=xC(19),VOe=jOe?$Oe:zOe;function ge(e,t,n,r,o){return VOe(e,t,n,r,o)}function FOe(e,t,n,r,o){const i=c.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return POe.useSyncExternalStore(e.subscribe,i,i)}function $Oe(e,t,n,r,o){return FOe(e,t,n,r,o)}function zOe(e,t,n,r,o){return LOe.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,r,o))}class BOe{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 ge(this,t,n,r,o)}}class HOe extends BOe{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){c.useDebugValue(t),ct(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;ct(()=>(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,s=>Object.keys(s));const o=c.useRef(Object.keys(t)).current,i=Object.keys(t);(o.length!==i.length||o.some((s,a)=>s!==i[a]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);ct(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){c.useDebugValue(t);const r=n!==void 0;if(ct(()=>{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 i=o.get(t);i!==void 0&&i!==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 i=this.selectors[t];return i(this.state,n,r,o)}useState(t,n,r,o){return c.useDebugValue(t),ge(this,this.selectors[t],n,r,o)}useContextCallback(t,n){c.useDebugValue(t);const r=en(n??nr);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(i=>{const s=r(i);if(!Object.is(o,s)){const a=o;o=s,n(s,a,this)}})}}const GOe={open:He(e=>e.open),domReferenceElement:He(e=>e.domReferenceElement),referenceElement:He(e=>e.positionReference??e.referenceElement),floatingElement:He(e=>e.floatingElement),floatingId:He(e=>e.floatingId)};class WOe extends HOe{constructor(t){const{nested:n,noEmit:r,onOpenChange:o,triggerElements:i,...s}=t;super({...s,positionReference:s.referenceElement,domReferenceElement:s.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:hNe(),nested:n,noEmit:r,triggerElements:i},GOe)}setOpen=(t,n)=>{if((!t||!this.state.open||F4(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 UOe{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 qOe(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=wC(),i=gNe()!=null;if(process.env.NODE_ENV!=="production"){const a=r.reference;a&&!wn(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 s=Ro(()=>new WOe({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new UOe,floatingId:o,nested:i,noEmit:!1})).current;return ct(()=>{const a={open:t,floatingId:o};r.reference!==void 0&&(a.referenceElement=r.reference,a.domReferenceElement=wn(r.reference)?r.reference:null),r.floating!==void 0&&(a.floatingElement=r.floating),s.update(a)},[t,o,r.reference,r.floating,s]),s.context.onOpenChange=n,s.context.nested=i,s.context.noEmit=!1,s}function KOe(e={}){const{nodeId:t,externalTree:n}=e,r=qOe(e),o=e.rootContext||r,i={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[s,a]=c.useState(null),l=c.useRef(null),u=Q4(n);ct(()=>{i.domReference&&(l.current=i.domReference)},[i.domReference]);const d=f5({...e,elements:{...i,...s&&{reference:s}}}),f=c.useCallback(k=>{const S=wn(k)?{getBoundingClientRect:()=>k.getBoundingClientRect(),getClientRects:()=>k.getClientRects(),contextElement:k}:k;a(S),d.refs.setReference(S)},[d.refs]),[m,p]=c.useState(null),[v,g]=c.useState(null);o.useSyncedValue("referenceElement",m),o.useSyncedValue("domReferenceElement",wn(m)?m:null),o.useSyncedValue("floatingElement",v);const h=c.useCallback(k=>{(wn(k)||k===null)&&(l.current=k,p(k)),(wn(d.refs.reference.current)||d.refs.reference.current===null||k!==null&&!wn(k))&&d.refs.setReference(k)},[d.refs,p]),b=c.useCallback(k=>{g(k),d.refs.setFloating(k)},[d.refs]),y=c.useMemo(()=>({...d.refs,setReference:h,setFloating:b,setPositionReference:f,domReference:l}),[d.refs,h,b,f]),x=c.useMemo(()=>({...d.elements,domReference:i.domReference}),[d.elements,i.domReference]),w=o.useState("open"),C=o.useState("floatingId"),R=c.useMemo(()=>({...d,dataRef:o.context.dataRef,open:w,onOpenChange:o.setOpen,events:o.context.events,floatingId:C,refs:y,elements:x,nodeId:t,rootStore:o}),[d,y,x,t,o,w,C]);return ct(()=>{o.context.dataRef.current.floatingContext=R;const k=u?.nodesRef.current.find(S=>S.id===t);k&&(k.context=R)}),c.useMemo(()=>({...d,context:R,refs:y,elements:x,rootStore:o}),[d,y,x,R,o])}function YOe(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,o=n.useState("open"),{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:u=!0,resetMs:d=750,selectedIndex:f=null}=t,m=_c(),p=c.useRef(""),v=c.useRef(f??s??-1),g=c.useRef(null);ct(()=>{!o&&f!==null||(m.clear(),g.current=null,p.current!==""&&(p.current=""))},[o,f,m]),ct(()=>{o&&p.current===""&&(v.current=f??s??-1)},[o,f,s]);const h=en(C=>{C?r.current.typing||(r.current.typing=C,l?.(C)):r.current.typing&&(r.current.typing=C,l?.(C))}),b=en(C=>{function R(_,O,B){const I=O.find(V=>V?.toLocaleLowerCase().indexOf(B.toLocaleLowerCase())===0);return I?_.indexOf(I):-1}const k=i.current;if(p.current.length>0&&p.current[0]!==" "&&(R(k,k,p.current)===-1?h(!1):C.key===" "&&Tr(C)),k==null||C.key.length!==1||C.ctrlKey||C.metaKey||C.altKey)return;o&&C.key!==" "&&(Tr(C),h(!0));const S=p.current==="";S&&(v.current=f??s??-1),k.every(_=>_?_[0]?.toLocaleLowerCase()!==_[1]?.toLocaleLowerCase():!0)&&p.current===C.key&&(p.current="",v.current=g.current),p.current+=C.key,m.start(d,()=>{p.current="",v.current=g.current,h(!1)});const P=S?f??s??-1:v.current,L=R(k,[...k.slice((P||0)+1),...k.slice(0,(P||0)+1)],p.current);L!==-1?(a?.(L),g.current=L):C.key!==" "&&(p.current="",h(!1))}),y=en(C=>{const R=C.relatedTarget,k=n.select("domReferenceElement"),S=n.select("floatingElement"),P=Wt(k,R),L=Wt(S,R);P||L||(m.clear(),p.current="",v.current=g.current,h(!1))}),x=c.useMemo(()=>({onKeyDown:b,onBlur:y}),[b,y]),w=c.useMemo(()=>({onKeyDown:b,onKeyUp(C){C.key===" "&&h(!1)},onBlur:y}),[b,y,h]);return c.useMemo(()=>u?{reference:x,floating:w}:{},[u,x,w])}let DC=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Ac.startingStyle]="startingStyle",e[e.endingStyle=Ac.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),vx=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const XOe={[vx.popupOpen]:""},ZOe={[vx.popupOpen]:"",[vx.pressed]:""},JOe={[DC.open]:""},QOe={[DC.closed]:""},eIe={[DC.anchorHidden]:""},tIe={open(e){return e?XOe:null}},nIe={open(e){return e?ZOe:null}},w5={open(e){return e?JOe:QOe},anchorHidden(e){return e?eIe:null}};function rIe(e){return xC(19)?e:e?"true":void 0}const E5=c.forwardRef(function(e,t){const{cutout:n,...r}=e;let o;if(n){const i=n?.getBoundingClientRect();o=`polygon(
|
|
418
|
+
0% 0%,
|
|
419
|
+
100% 0%,
|
|
420
|
+
100% 100%,
|
|
421
|
+
0% 100%,
|
|
422
|
+
0% 0%,
|
|
423
|
+
${i.left}px ${i.top}px,
|
|
424
|
+
${i.left}px ${i.bottom}px,
|
|
425
|
+
${i.right}px ${i.bottom}px,
|
|
426
|
+
${i.right}px ${i.top}px,
|
|
427
|
+
${i.left}px ${i.top}px
|
|
428
|
+
)`}return E.jsx("div",{ref:t,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})});process.env.NODE_ENV!=="production"&&(E5.displayName="InternalBackdrop");const C5=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(C5.displayName="ComboboxRootContext");const k5=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(k5.displayName="ComboboxFloatingContext");const R5=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(R5.displayName="ComboboxDerivedItemsContext");const S5=c.createContext("");process.env.NODE_ENV!=="production"&&(S5.displayName="ComboboxInputValueContext");function Hr(){const e=c.useContext(C5);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.":eo(22));return e}function qh(){const e=c.useContext(k5);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.":eo(23));return e}function ws(){const e=c.useContext(R5);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.":eo(24));return e}function LC(){return c.useContext(S5)}function nm(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function N5(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:nm(r,t,n))}function oIe(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function iIe(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(oIe(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}const xe={id:He(e=>e.id),query:He(e=>e.query),items:He(e=>e.items),selectedValue:He(e=>e.selectedValue),hasSelectionChips:He(e=>{const t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:He(e=>{const{selectedValue:t,selectionMode:n}=e;return t==null?!1:n==="multiple"&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:He((e,t)=>t?iIe(e.items):!1),open:He(e=>e.open),mounted:He(e=>e.mounted),forceMounted:He(e=>e.forceMounted),inline:He(e=>e.inline),activeIndex:He(e=>e.activeIndex),selectedIndex:He(e=>e.selectedIndex),isActive:He((e,t)=>e.activeIndex===t),isSelected:He((e,t)=>{const n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(o=>nm(t,o,n)):nm(t,r,n)}),transitionStatus:He(e=>e.transitionStatus),popupProps:He(e=>e.popupProps),inputProps:He(e=>e.inputProps),triggerProps:He(e=>e.triggerProps),getItemProps:He(e=>e.getItemProps),positionerElement:He(e=>e.positionerElement),listElement:He(e=>e.listElement),triggerElement:He(e=>e.triggerElement),inputElement:He(e=>e.inputElement),popupSide:He(e=>e.popupSide),openMethod:He(e=>e.openMethod),inputInsidePopup:He(e=>e.inputInsidePopup),selectionMode:He(e=>e.selectionMode),listRef:He(e=>e.listRef),labelsRef:He(e=>e.labelsRef),popupRef:He(e=>e.popupRef),emptyRef:He(e=>e.emptyRef),inputRef:He(e=>e.inputRef),keyboardActiveRef:He(e=>e.keyboardActiveRef),chipsContainerRef:He(e=>e.chipsContainerRef),clearRef:He(e=>e.clearRef),valuesRef:He(e=>e.valuesRef),allValuesRef:He(e=>e.allValuesRef),name:He(e=>e.name),disabled:He(e=>e.disabled),readOnly:He(e=>e.readOnly),required:He(e=>e.required),grid:He(e=>e.grid),isGrouped:He(e=>e.isGrouped),virtualized:He(e=>e.virtualized),onOpenChangeComplete:He(e=>e.onOpenChangeComplete),openOnInputClick:He(e=>e.openOnInputClick),itemToStringLabel:He(e=>e.itemToStringLabel),isItemEqualToValue:He(e=>e.isItemEqualToValue),modal:He(e=>e.modal),autoHighlight:He(e=>e.autoHighlight),submitOnItemClick:He(e=>e.submitOnItemClick)};let jI=(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 sIe={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},aIe={valid(e){return e===null?null:e?{[jI.valid]:""}:{[jI.invalid]:""}}},O5=c.createContext({invalid:void 0,name:void 0,validityData:{state:sIe,errors:[],error:"",value:"",initialValue:null},setValidityData:nr,disabled:void 0,touched:!1,setTouched:nr,dirty:!1,setDirty:nr,filled:!1,setFilled:nr,focused:!1,setFocused:nr,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=mr)=>e,getInputValidationProps:(e=mr)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(O5.displayName="FieldRootContext");function jC(e=!0){const t=c.useContext(O5);if(t.setValidityData===nr&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":eo(28));return t}const lIe=c.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:nr,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(lIe.displayName="FormContext");const I5=c.createContext({controlId:void 0,registerControlId:nr,labelId:void 0,setLabelId:nr,messageIds:[],setMessageIds:nr,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(I5.displayName="LabelableContext");function VC(){return c.useContext(I5)}function cIe(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:i}=VC(),s=EC(t),a=n?o:void 0,l=Ro(()=>Symbol("labelable-control")),u=c.useRef(!1),d=c.useRef(t!=null),f=en(()=>{!u.current||i===nr||(u.current=!1,i(l.current,void 0))});return ct(()=>{if(i===nr)return;let m;if(n){const p=r?.current;wn(p)&&p.closest("label")!=null?m=t??null:m=a??s}else if(t!=null)d.current=!0,m=t;else if(d.current)m=s;else{f();return}if(m===void 0){f();return}u.current=!0,i(l.current,m)},[t,r,a,i,n,s,l,f]),c.useEffect(()=>f,[f]),o??s}const A5={...nIe,...aIe,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null};function uIe(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 o=parseFloat(n.width)||0,i=parseFloat(n.height)||0,s=parseFloat(r.width)||0,a=parseFloat(r.height)||0,l=Math.max(t.width,o,s),u=Math.max(t.height,i,a),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}const Bd=2,dIe=c.forwardRef(function(e,t){const{render:n,className:r,nativeButton:o=!0,disabled:i=!1,id:s,...a}=e,{state:l,disabled:u,setTouched:d,setFocused:f,validationMode:m,validation:p}=jC(),{labelId:v}=VC(),g=Hr(),{filteredItems:h}=ws(),b=ge(g,xe.selectionMode),y=ge(g,xe.disabled),x=ge(g,xe.readOnly),w=ge(g,xe.required),C=ge(g,xe.mounted),R=ge(g,xe.popupSide),k=ge(g,xe.positionerElement),S=ge(g,xe.listElement),P=ge(g,xe.triggerProps),L=ge(g,xe.triggerElement),_=ge(g,xe.inputInsidePopup),O=ge(g,xe.id),B=ge(g,xe.open),I=ge(g,xe.selectedValue),V=ge(g,xe.activeIndex),F=ge(g,xe.selectedIndex),D=ge(g,xe.hasSelectedValue),T=qh(),q=LC(),A=_c(),ee=u||y||i,ie=h.length===0,Y=C&&k?R:null;cIe({id:_?s:void 0});const Q=_?s??O:s,X=c.useRef("");function J(j){X.current=j.pointerType}const te=T.useState("domReferenceElement");c.useEffect(()=>{_&&L&&L!==te&&T.set("domReferenceElement",L)},[L,te,T,_]);const{reference:le}=YOe(T,{enabled:!B&&!x&&!y&&b==="single",listRef:g.state.labelsRef,activeIndex:V,selectedIndex:F,onMatch(j){const K=g.state.valuesRef.current[j];K!==void 0&&g.state.setSelectedValue(K,Yt("none"))}}),{reference:z}=ONe(T,{enabled:!x&&!y,event:"mousedown"}),{buttonRef:re,getButtonProps:oe}=Bh({native:o,disabled:ee}),M={...l,open:B,disabled:ee,popupSide:Y,listEmpty:ie,placeholder:!D},N=en(j=>{g.set("triggerElement",j)});return Yn("button",e,{ref:[t,re,N],state:M,props:[P,z,le,{id:Q,tabIndex:_?0:-1,role:_?"combobox":void 0,"aria-expanded":B?"true":"false","aria-haspopup":_?"dialog":"listbox","aria-controls":B?S?.id:void 0,"aria-required":_&&w||void 0,"aria-labelledby":v,onPointerDown:J,onPointerEnter:J,onFocus(){f(!0),!(ee||x)&&A.start(0,g.state.forceMount)},onBlur(j){if(!Wt(k,j.relatedTarget)&&(d(!0),f(!1),m==="onBlur")){const K=b==="none"?q:I;p.commit(K)}},onMouseDown(j){if(ee||x||(_||T.set("domReferenceElement",j.currentTarget),g.state.forceMount(),X.current!=="touch"&&(g.state.inputRef.current?.focus(),_||j.preventDefault()),B))return;const K=Nn(j.currentTarget);function H(U){if(!L)return;const $=ac(U),W=g.state.positionerElement,Z=g.state.listElement;if(Wt(L,$)||Wt(W,$)||Wt(Z,$)||$===L)return;const G=uIe(L),ne=U.clientX>=G.left-Bd&&U.clientX<=G.right+Bd,we=U.clientY>=G.top-Bd&&U.clientY<=G.bottom+Bd;ne&&we||g.state.setOpen(!1,Yt("cancel-open",U))}_&&K.addEventListener("mouseup",H,{once:!0})},onKeyDown(j){ee||x||(j.key==="ArrowDown"||j.key==="ArrowUp")&&(Tr(j),g.state.setOpen(!0,Yt(A4,j.nativeEvent)),g.state.inputRef.current?.focus())}},p?p.getValidationProps(a):a,oe],stateAttributesMapping:A5})});process.env.NODE_ENV!=="production"&&(dIe.displayName="ComboboxTrigger");const FC=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(FC.displayName="ComboboxChipsContext");function M5(){return c.useContext(FC)}const $C=c.createContext(void 0);process.env.NODE_ENV!=="production"&&($C.displayName="ComboboxPositionerContext");function zC(e){const t=c.useContext($C);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":eo(21));return t}const fIe=c.forwardRef(function(e,t){const{render:n,className:r,disabled:o=!1,id:i,...s}=e,{state:a,disabled:l,setTouched:u,setFocused:d,validationMode:f,validation:m}=jC(),{labelId:p}=VC(),v=M5(),g=!!zC(!0),h=Hr(),{filteredItems:b}=ws(),y=LC(),x=C4(),w=ge(h,xe.required),C=ge(h,xe.disabled),R=ge(h,xe.readOnly),k=ge(h,xe.name),S=ge(h,xe.selectionMode),P=ge(h,xe.autoHighlight),L=ge(h,xe.inputProps),_=ge(h,xe.triggerProps),O=ge(h,xe.open),B=ge(h,xe.mounted),I=ge(h,xe.selectedValue),V=ge(h,xe.popupSide),F=ge(h,xe.positionerElement),D=ge(h,xe.id),T=ge(h,xe.inline),q=!!P,A=B&&F?V:null,ee=l||C||o,ie=b.length===0,Y=EC(i??(g||T?void 0:D)),[Q,X]=c.useState(null),J=c.useRef(!1),te=c.useRef(null),le=c.useRef(!1),z=en(M=>{const N=g||h.state.inline;N&&!h.state.hasInputValue&&h.state.setInputValue("",Yt(hf)),h.update({inputElement:M,inputInsidePopup:N})}),re={...a,open:O,disabled:ee,readOnly:R,popupSide:A,listEmpty:ie};function oe(M){if(!v)return;let N;const{highlightedChipIndex:j}=v;if(j!==void 0){if(M.key==="ArrowLeft")M.preventDefault(),j>0?N=j-1:N=void 0;else if(M.key==="ArrowRight")M.preventDefault(),j<I.length-1?N=j+1:N=void 0;else if(M.key==="Backspace"||M.key==="Delete"){M.preventDefault();const K=j>=I.length-1?I.length-2:j;N=K>=0?K:void 0,h.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return N}return M.key==="ArrowLeft"&&(M.currentTarget.selectionStart??0)===0&&I.length>0?(M.preventDefault(),N=Math.max(I.length-1,0)):M.key==="Backspace"&&M.currentTarget.value===""&&I.length>0&&(h.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),M.preventDefault()),N}return Yn("input",e,{state:re,ref:[t,h.state.inputRef,z],props:[L,_,{type:"text",value:e.value??Q??y,"aria-readonly":R||void 0,"aria-required":w||void 0,"aria-labelledby":p,disabled:ee,readOnly:R,required:S==="none"?w:void 0,...S==="none"&&k&&{name:k},id:Y,onFocus(){if(d(!0),!T||!le.current)return;le.current=!1;const M=te.current;M==null||!Object.hasOwn(h.state.valuesRef.current,M)||h.state.setIndices({activeIndex:M})},onBlur(){u(!0),d(!1);const M=h.state.activeIndex;if(T&&M!==null&&P!=="always"&&(te.current=M,le.current=!0,h.state.setIndices({activeIndex:null})),f==="onBlur"){const N=S==="none"?y:I;m.commit(N)}},onCompositionStart(M){Wp||(J.current=!0,X(M.currentTarget.value))},onCompositionEnd(M){J.current=!1;const N=M.currentTarget.value;X(null),h.state.setInputValue(N,Yt(Dd,M.nativeEvent))},onChange(M){const N=M.nativeEvent.inputType,j=!N||N==="insertReplacementText",K=J.current||!j;if(J.current){const W=M.currentTarget.value;X(W),W===""&&!h.state.openOnInputClick&&!h.state.inputInsidePopup&&h.state.setOpen(!1,Yt(XO,M.nativeEvent));const Z=W.trim(),G=q&&Z!=="";!R&&!ee&&Z&&K&&(h.state.setOpen(!0,Yt(Dd,M.nativeEvent)),q||h.state.setIndices({activeIndex:null,selectedIndex:null,type:h.state.keyboardActiveRef.current?"keyboard":"pointer"})),O&&h.state.activeIndex!==null&&!G&&h.state.setIndices({activeIndex:null,selectedIndex:null,type:h.state.keyboardActiveRef.current?"keyboard":"pointer"});return}h.state.setInputValue(M.currentTarget.value,Yt(Dd,M.nativeEvent));const H=M.currentTarget.value==="",U=Yt(XO,M.nativeEvent);H&&!h.state.inputInsidePopup&&(S==="single"&&h.state.setSelectedValue(null,U),h.state.openOnInputClick||h.state.setOpen(!1,U));const $=M.currentTarget.value.trim();!R&&!ee&&$&&K&&(h.state.setOpen(!0,Yt(Dd,M.nativeEvent)),q||h.state.setIndices({activeIndex:null,selectedIndex:null,type:h.state.keyboardActiveRef.current?"keyboard":"pointer"})),O&&h.state.activeIndex!==null&&!q&&h.state.setIndices({activeIndex:null,selectedIndex:null,type:h.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(M){if(ee||R||M.ctrlKey||M.shiftKey||M.altKey||M.metaKey)return;h.state.keyboardActiveRef.current=!0;const N=M.currentTarget,j=N.scrollWidth-N.clientWidth,K=x==="rtl";if(M.key==="Home"){Tr(M);const $=tI&&K?N.value.length:0;N.setSelectionRange($,$),N.scrollLeft=0;return}if(M.key==="End"){Tr(M);const $=tI&&K?0:N.value.length;N.setSelectionRange($,$),N.scrollLeft=K?-j:j;return}if(!B&&M.key==="Escape"){const $=S==="multiple"&&Array.isArray(I)?I.length===0:I===null,W=Yt(fSe,M.nativeEvent),Z=S==="multiple"?[]:null;h.state.setInputValue("",W),h.state.setSelectedValue(Z,W),!$&&!h.state.inline&&!W.isPropagationAllowed&&M.stopPropagation();return}if(v&&M.key==="Backspace"&&N.value===""&&v.highlightedChipIndex===void 0&&Array.isArray(I)&&I.length>0){const $=I.slice(0,-1);h.state.setIndices({activeIndex:null,selectedIndex:null,type:h.state.keyboardActiveRef.current?"keyboard":"pointer"}),h.state.setSelectedValue($,Yt(hf,M.nativeEvent));return}const H=v?.highlightedChipIndex!==void 0,U=oe(M);if(v?.setHighlightedChipIndex(U),U!==void 0?v?.chipsRef.current[U]?.focus():H&&h.state.inputRef.current?.focus(),M.which!==229&&M.key==="Enter"&&O){const $=h.state.activeIndex,W=M.nativeEvent;if($===null){h.state.setOpen(!1,Yt(hf,W));return}Tr(M);const Z=h.state.listRef.current[$];Z&&(h.state.selectionEventRef.current=W,Z.click(),h.state.selectionEventRef.current=null)}},onPointerMove(){h.state.keyboardActiveRef.current=!1},onPointerDown(){h.state.keyboardActiveRef.current=!1}},m?m.getValidationProps(s):s],stateAttributesMapping:A5})});process.env.NODE_ENV!=="production"&&(fIe.displayName="ComboboxInput");const pIe={...P4,...tIe},mIe=c.forwardRef(function(e,t){const{render:n,className:r,disabled:o=!1,nativeButton:i=!0,keepMounted:s=!1,...a}=e,{disabled:l}=jC(),u=Hr(),d=ge(u,xe.selectionMode),f=ge(u,xe.disabled),m=ge(u,xe.readOnly),p=ge(u,xe.open),v=ge(u,xe.selectedValue),g=ge(u,xe.hasSelectionChips),h=LC();let b=!1;d==="none"?b=h!=="":d==="single"?b=v!=null:b=g;const y=l||f||o,{buttonRef:x,getButtonProps:w}=Bh({native:i,disabled:y}),{mounted:C,transitionStatus:R,setMounted:k}=ySe(b),S={disabled:y,open:p,transitionStatus:R};X4({open:b,ref:u.state.clearRef,onComplete(){b||k(!1)}});const P=Yn("button",e,{state:S,ref:[t,x,u.state.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(L){L.preventDefault()},onClick(L){if(y||m)return;const _=u.state.keyboardActiveRef;u.state.setInputValue("",Yt(YO,L.nativeEvent)),d!=="none"?(u.state.setSelectedValue(Array.isArray(v)?[]:null,Yt(YO,L.nativeEvent)),u.state.setIndices({activeIndex:null,selectedIndex:null,type:_.current?"keyboard":"pointer"})):u.state.setIndices({activeIndex:null,type:_.current?"keyboard":"pointer"}),u.state.inputRef.current?.focus()}},a,w],stateAttributesMapping:pIe});return s||C?P:null});process.env.NODE_ENV!=="production"&&(mIe.displayName="ComboboxClear");const BC=c.createContext(null);process.env.NODE_ENV!=="production"&&(BC.displayName="GroupCollectionContext");function hIe(){return c.useContext(BC)}function gIe(e){const{children:t,items:n}=e,r=c.useMemo(()=>({items:n}),[n]);return E.jsx(BC.Provider,{value:r,children:t})}function vIe(e){const{children:t}=e,{filteredItems:n}=ws(),r=hIe(),o=r?r.items:n;return o?E.jsx(c.Fragment,{children:o.map(t)}):null}const bIe=c.forwardRef(function(e,t){var n;const{render:r,className:o,children:i,...s}=e,a=Hr(),l=qh(),u=!!zC(!0),{filteredItems:d}=ws(),f=ge(a,xe.items),m=ge(a,xe.labelsRef),p=ge(a,xe.listRef),v=ge(a,xe.selectionMode),g=ge(a,xe.grid),h=ge(a,xe.popupProps),b=ge(a,xe.disabled),y=ge(a,xe.readOnly),x=ge(a,xe.virtualized),w=v==="multiple",C=d.length===0,R=en(O=>{a.set("positionerElement",O)}),k=en(O=>{a.set("listElement",O)}),S=c.useMemo(()=>typeof i=="function"?n||(n=E.jsx(vIe,{children:i})):i,[i]),P={empty:C},L=l.useState("floatingId"),_=Yn("div",e,{state:P,ref:[t,k,u?null:R],props:[h,{children:S,tabIndex:-1,id:L,role:g?"grid":"listbox","aria-multiselectable":w?"true":void 0,onKeyDown(O){if(!(b||y)&&O.key==="Enter"){const B=a.state.activeIndex;if(B==null)return;Tr(O);const I=O.nativeEvent,V=a.state.listRef.current[B];V&&(a.state.selectionEventRef.current=I,V.click(),a.state.selectionEventRef.current=null)}},onKeyDownCapture(){a.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){a.state.keyboardActiveRef.current=!1}},s]});return x?_:E.jsx(w4,{elementsRef:p,labelsRef:f?void 0:m,children:_})});process.env.NODE_ENV!=="production"&&(bIe.displayName="ComboboxList");const HC=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(HC.displayName="ComboboxPortalContext");function yIe(){const e=c.useContext(HC);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Portal> is missing.":eo(20));return e}const xIe=c.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,o=Hr(),i=ge(o,xe.mounted),s=ge(o,xe.forceMounted);return i||n||s?E.jsx(HC.Provider,{value:n,children:E.jsx(r5,{ref:t,...r})}):null});process.env.NODE_ENV!=="production"&&(xIe.displayName="ComboboxPortal");const wIe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:d=0,offsetParent:f="real"}=So(e,t)||{};if(u==null)return{};const m=AC(d),p={x:n,y:r},v=Gh(o),g=Hh(v),h=await s.getDimensions(u),b=v==="y",y=b?"top":"left",x=b?"bottom":"right",w=b?"clientHeight":"clientWidth",C=i.reference[g]+i.reference[v]-p[v]-i.floating[g],R=p[v]-i.reference[v],k=f==="real"?await s.getOffsetParent?.(u):a.floating;let S=a.floating[w]||i.floating[g];(!S||!await s.isElement?.(k))&&(S=a.floating[w]||i.floating[g]);const P=C/2-R/2,L=S/2-h[g]/2-1,_=Math.min(m[y],L),O=Math.min(m[x],L),B=_,I=S-h[g]-O,V=S/2-h[g]/2+P,F=qp(B,V,I),D=!l.arrow&&ai(o)!=null&&V!==F&&i.reference[g]/2-(V<B?_:O)-h[g]/2<0,T=D?V<B?V-B:V-I:0;return{[v]:p[v]+T,data:{[v]:F,centerOffset:V-F-T,...D&&{alignmentOffset:T}},reset:D}}}),EIe=(e,t)=>({...wIe(e),options:[e,t]}),CIe={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,i=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:(await b5().fn(e)).data?.referenceHidden||i}}}},kIe={sideX:"left",sideY:"top"};function P5(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 VI(e,t,n){const{rects:r,placement:o}=e;return{side:P5(t,yr(o),n),align:ai(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function RIe(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,collisionBoundary:a,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,keepMounted:m=!1,floatingRootContext:p,mounted:v,collisionAvoidance:g,shiftCrossAxis:h=!1,nodeId:b,adaptiveOrigin:y,lazyFlip:x=!1,externalTree:w}=e,[C,R]=c.useState(null);!v&&C!==null&&R(null);const k=g.side||"flip",S=g.align||"flip",P=g.fallbackAxisSide||"end",L=typeof t=="function"?t:void 0,_=en(L),O=L?_:t,B=el(t),I=C4()==="rtl",V=C||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":I?"left":"right","inline-start":I?"right":"left"}[r],F=i==="center"?V:`${V}-${i}`;let D=l;const T=1,q=r==="bottom"?T:0,A=r==="top"?T:0,ee=r==="right"?T:0,ie=r==="left"?T:0;typeof D=="number"?D={top:D+q,right:D+ie,bottom:D+A,left:D+ee}:D&&(D={top:(D.top||0)+q,right:(D.right||0)+ie,bottom:(D.bottom||0)+A,left:(D.left||0)+ee});const Y={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:D},Q=c.useRef(null),X=el(o),J=el(s),te=[p5(se=>{const Ee=VI(se,r,I),Se=typeof X.current=="function"?X.current(Ee):X.current,Pe=typeof J.current=="function"?J.current(Ee):J.current;return{mainAxis:Se,crossAxis:Pe,alignmentAxis:Pe}},[typeof o!="function"?o:0,typeof s!="function"?s:0,I,r])],le=S==="none"&&k!=="shift",z=!le&&(u||h||k==="shift"),re=k==="none"?null:g5({...Y,padding:{top:D.top+T,right:D.right+T,bottom:D.bottom+T,left:D.left+T},mainAxis:!h&&k==="flip",crossAxis:S==="flip"?"alignment":!1,fallbackAxisSideDirection:P}),oe=le?null:m5(se=>{const Ee=Nn(se.elements.floating).documentElement;return{...Y,rootBoundary:h?{x:0,y:0,width:Ee.clientWidth,height:Ee.clientHeight}:void 0,mainAxis:S!=="none",crossAxis:z,limiter:u||h?void 0:h5(Se=>{if(!Q.current)return{};const{width:Pe,height:Ce}=Q.current.getBoundingClientRect(),ke=Ar(yr(Se.placement)),pt=ke==="y"?Pe:Ce,gt=ke==="y"?D.left+D.right:D.top+D.bottom;return{offset:pt/2+gt/2}})}},[Y,u,h,D,S]);k==="shift"||S==="shift"||i==="center"?te.push(oe,re):te.push(re,oe),te.push(v5({...Y,apply({elements:{floating:se},rects:{reference:Ee},availableWidth:Se,availableHeight:Pe}){const Ce=se.style;Ce.setProperty("--available-width",`${Se}px`),Ce.setProperty("--available-height",`${Pe}px`),Ce.setProperty("--anchor-width",`${Ee.width}px`),Ce.setProperty("--anchor-height",`${Ee.height}px`)}}),EIe(()=>({element:Q.current||document.createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(se){const{elements:Ee,middlewareData:Se,placement:Pe,rects:Ce,y:ke}=se,pt=yr(Pe),gt=Ar(pt),un=Q.current,Vt=Se.arrow?.x||0,rr=Se.arrow?.y||0,vt=un?.clientWidth||0,Gr=un?.clientHeight||0,jt=Vt+vt/2,Dt=rr+Gr/2,or=Math.abs(Se.shift?.y||0),Xn=Ce.reference.height/2,mt=typeof o=="function"?o(VI(se,r,I)):o,Cr=or>mt,$n={top:`${jt}px calc(100% + ${mt}px)`,bottom:`${jt}px ${-mt}px`,left:`calc(100% + ${mt}px) ${Dt}px`,right:`${-mt}px ${Dt}px`}[pt],dn=`${jt}px ${Ce.reference.y+Xn-ke}px`;return Ee.floating.style.setProperty("--transform-origin",z&>==="y"&&Cr?dn:$n),{}}},CIe,y),ct(()=>{!v&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[v,p]);const M=c.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:N,elements:j,x:K,y:H,middlewareData:U,update:$,placement:W,context:Z,isPositioned:G,floatingStyles:ne}=KOe({rootContext:p,placement:F,middleware:te,strategy:n,whileElementsMounted:m?void 0:(...se)=>gx(...se,M),nodeId:b,externalTree:w}),{sideX:we,sideY:Ve}=U.adaptiveOrigin||kIe,Ye=G?n:"fixed",ft=c.useMemo(()=>{const se=y?{position:Ye,[we]:K,[Ve]:H}:{position:Ye,...ne};return G||(se.opacity=0),se},[y,Ye,we,K,Ve,H,ne,G]),qe=c.useRef(null);ct(()=>{if(!v)return;const se=B.current,Ee=typeof se=="function"?se():se,Se=(FI(Ee)?Ee.current:Ee)||null||null;Se!==qe.current&&(N.setPositionReference(Se),qe.current=Se)},[v,N,O,B]),c.useEffect(()=>{if(!v)return;const se=B.current;typeof se!="function"&&FI(se)&&se.current!==qe.current&&(N.setPositionReference(se.current),qe.current=se.current)},[v,N,O,B]),c.useEffect(()=>{if(m&&v&&j.domReference&&j.floating)return gx(j.domReference,j.floating,$,M)},[m,v,j,$,M]);const ce=yr(W),Ke=P5(r,ce,I),ot=ai(W)||"center",Lt=!!U.hide?.referenceHidden;ct(()=>{x&&v&&G&&R(ce)},[x,v,G,ce]);const Ft=c.useMemo(()=>({position:"absolute",top:U.arrow?.y,left:U.arrow?.x}),[U.arrow]),Tt=U.arrow?.centerOffset!==0;return c.useMemo(()=>({positionerStyles:ft,arrowStyles:Ft,arrowRef:Q,arrowUncentered:Tt,side:Ke,align:ot,physicalSide:ce,anchorHidden:Lt,refs:N,context:Z,isPositioned:G,update:$}),[ft,Ft,Q,Tt,Ke,ot,ce,Lt,N,Z,G,$])}function FI(e){return e!=null&&"current"in e}function _5(e){return e==="starting"?eSe:mr}const SIe=c.forwardRef(function(e,t){const{render:n,className:r,anchor:o,positionMethod:i="absolute",side:s="bottom",align:a="center",sideOffset:l=0,alignOffset:u=0,collisionBoundary:d="clipping-ancestors",collisionPadding:f=5,arrowPadding:m=5,sticky:p=!1,disableAnchorTracking:v=!1,collisionAvoidance:g=nSe,...h}=e,b=Hr(),{filteredItems:y}=ws(),x=qh(),w=yIe(),C=ge(b,xe.modal),R=ge(b,xe.open),k=ge(b,xe.mounted),S=ge(b,xe.openMethod),P=ge(b,xe.triggerElement),L=ge(b,xe.inputElement),_=ge(b,xe.inputInsidePopup),O=ge(b,xe.transitionStatus),B=y.length===0,I=RIe({anchor:o??(_?P:L),floatingRootContext:x,positionMethod:i,mounted:k,side:s,sideOffset:l,align:a,alignOffset:u,arrowPadding:m,collisionBoundary:d,collisionPadding:f,sticky:p,disableAnchorTracking:v,keepMounted:w,collisionAvoidance:g,lazyFlip:!0});pNe(R&&C&&S!=="touch",P);const V=c.useMemo(()=>{const A={...I.positionerStyles};return R||(A.pointerEvents="none"),{role:"presentation",hidden:!k,style:A}},[R,k,I.positionerStyles]),F={open:R,side:I.side,align:I.align,anchorHidden:I.anchorHidden,empty:B};ct(()=>{b.set("popupSide",I.side)},[b,I.side]);const D=c.useMemo(()=>({side:I.side,align:I.align,arrowRef:I.arrowRef,arrowUncentered:I.arrowUncentered,arrowStyles:I.arrowStyles,anchorHidden:I.anchorHidden,isPositioned:I.isPositioned}),[I.side,I.align,I.arrowRef,I.arrowUncentered,I.arrowStyles,I.anchorHidden,I.isPositioned]),T=en(A=>{b.set("positionerElement",A)}),q=Yn("div",e,{state:F,ref:[t,T],props:[V,_5(O),h],stateAttributesMapping:w5});return E.jsxs($C.Provider,{value:D,children:[k&&C&&E.jsx(E5,{inert:rIe(!R),cutout:L??P}),q]})});process.env.NODE_ENV!=="production"&&(SIe.displayName="ComboboxPositioner");const NIe={...w5,...P4},OIe=c.forwardRef(function(e,t){const{render:n,className:r,initialFocus:o,finalFocus:i,...s}=e,a=Hr(),l=zC(),u=qh(),{filteredItems:d}=ws(),f=ge(a,xe.mounted),m=ge(a,xe.open),p=ge(a,xe.openMethod),v=ge(a,xe.transitionStatus),g=ge(a,xe.inputInsidePopup),h=ge(a,xe.inputElement),b=d.length===0;X4({open:m,ref:a.state.popupRef,onComplete(){m&&a.state.onOpenChangeComplete(!0)}});const y={open:m,side:l.side,align:l.align,anchorHidden:l.anchorHidden,transitionStatus:v,empty:b},x=Yn("div",e,{state:y,ref:[t,a.state.popupRef],props:[{role:g?"dialog":"presentation",tabIndex:-1,onFocus(R){const k=ac(R.nativeEvent);p!=="touch"&&(Wt(a.state.listElement,k)||k===R.currentTarget)&&a.state.inputRef.current?.focus()}},_5(v),s],stateAttributesMapping:NIe}),w=o===void 0?g?R=>R==="touch"?a.state.popupRef.current:h:!1:o;let C;return i!=null?C=i:C=g?void 0:!1,E.jsx(NNe,{context:u,disabled:!f,modal:!g,openInteractionType:p,initialFocus:w,returnFocus:C,children:x})});process.env.NODE_ENV!=="production"&&(OIe.displayName="ComboboxPopup");const GC=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(GC.displayName="ComboboxGroupContext");function IIe(){const e=c.useContext(GC);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>.":eo(18));return e}const AIe=c.forwardRef(function(e,t){const{render:n,className:r,items:o,...i}=e,[s,a]=c.useState(),l=c.useMemo(()=>({labelId:s,setLabelId:a,items:o}),[s,a,o]),u=Yn("div",e,{ref:t,props:[{role:"group","aria-labelledby":s},i]}),d=E.jsx(GC.Provider,{value:l,children:u});return o?E.jsx(gIe,{items:o,children:d}):d});process.env.NODE_ENV!=="production"&&(AIe.displayName="ComboboxGroup");const MIe=c.forwardRef(function(e,t){const{render:n,className:r,id:o,...i}=e,{setLabelId:s}=IIe(),a=EC(o);return ct(()=>(s(a),()=>{s(void 0)}),[a,s]),Yn("div",e,{ref:t,props:[{id:a},i]})});process.env.NODE_ENV!=="production"&&(MIe.displayName="ComboboxGroupLabel");const T5=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(T5.displayName="ComboboxItemContext");const D5=c.createContext(!1);process.env.NODE_ENV!=="production"&&(D5.displayName="ComboboxRowContext");function PIe(){return c.useContext(D5)}const _Ie=c.memo(c.forwardRef(function(e,t){const{render:n,className:r,value:o=null,index:i,disabled:s=!1,nativeButton:a=!1,...l}=e,u=c.useRef(!1),d=c.useRef(null),f=T4({index:i,textRef:d,indexGuessBehavior:_4.GuessFromOrder}),m=Hr(),p=PIe(),{flatFilteredItems:v,hasItems:g}=ws(),h=ge(m,xe.open),b=ge(m,xe.selectionMode),y=ge(m,xe.readOnly),x=ge(m,xe.virtualized),w=ge(m,xe.isItemEqualToValue),C=b!=="none",R=i??(x?N5(v,o,w):f.index),k=f.index!==-1,S=ge(m,xe.id),P=ge(m,xe.isActive,R),L=ge(m,xe.isSelected,o),_=ge(m,xe.getItemProps),O=c.useRef(null),B=S!=null&&k?`${S}-${R}`:void 0,I=L&&C;ct(()=>{if(!(k&&(x||i!=null)))return;const Y=m.state.listRef.current;return Y[R]=O.current,()=>{delete Y[R]}},[k,x,R,i,m]),ct(()=>{if(!k||g)return;const Y=m.state.valuesRef.current;return Y[R]=o,b!=="none"&&m.state.allValuesRef.current.push(o),()=>{delete Y[R]}},[k,g,R,o,m,b]),ct(()=>{if(!h){u.current=!1;return}if(!k||g)return;const Y=m.state.selectedValue,Q=Array.isArray(Y)?Y[Y.length-1]:Y;nm(o,Q,w)&&m.set("selectedIndex",R)},[k,g,h,m,R,o,w]);const V={disabled:s,selected:I,highlighted:P},F=_({active:P,selected:I});F.id=void 0,F.onFocus=void 0;const{getButtonProps:D,buttonRef:T}=Bh({disabled:s,focusableWhenDisabled:!0,native:a});function q(Y){function Q(){m.state.handleSelection(Y,o)}m.state.submitOnItemClick?(dt.flushSync(Q),m.state.requestSubmit()):Q()}const A={id:B,role:p?"gridcell":"option","aria-selected":C?I:void 0,tabIndex:void 0,onPointerDownCapture(Y){u.current=!0,Y.preventDefault()},onClick(Y){s||y||q(Y.nativeEvent)},onMouseUp(Y){const Q=u.current;u.current=!1,!(s||y||Y.button!==0||Q||!P)&&q(Y.nativeEvent)}},ee=Yn("div",e,{ref:[T,t,f.ref,O],state:V,props:[F,A,l,D]}),ie=c.useMemo(()=>({selected:I,textRef:d}),[I,d]);return E.jsx(T5.Provider,{value:ie,children:ee})}));process.env.NODE_ENV!=="production"&&(_Ie.displayName="ComboboxItem");const TIe=c.forwardRef(function(e,t){const{render:n,className:r,children:o,...i}=e,{filteredItems:s}=ws(),a=Hr(),l=s.length===0?o:null;return Yn("div",e,{ref:[t,a.state.emptyRef],props:[{children:l,role:"status","aria-live":"polite","aria-atomic":!0},i]})});process.env.NODE_ENV!=="production"&&(TIe.displayName="ComboboxEmpty");const DIe=c.forwardRef(function(e,t){const{className:n,render:r,orientation:o="horizontal",...i}=e;return Yn("div",e,{state:{orientation:o},ref:t,props:[{role:"separator","aria-orientation":o},i]})});process.env.NODE_ENV!=="production"&&(DIe.displayName="Separator");const LIe=c.forwardRef(function(e,t){const{render:n,className:r,...o}=e,i=Hr(),s=ge(i,xe.open),a=ge(i,xe.hasSelectionChips),[l,u]=c.useState(void 0);s&&l!==void 0&&u(void 0);const d=c.useRef([]),f=Yn("div",e,{ref:[t,i.state.chipsContainerRef],props:[a?{role:"toolbar"}:mr,o]}),m=c.useMemo(()=>({highlightedChipIndex:l,setHighlightedChipIndex:u,chipsRef:d}),[l,u,d]);return E.jsx(FC.Provider,{value:m,children:E.jsx(w4,{elementsRef:d,children:f})})});process.env.NODE_ENV!=="production"&&(LIe.displayName="ComboboxChips");const WC=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(WC.displayName="ComboboxChipContext");function jIe(){const e=c.useContext(WC);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"useComboboxChipContext must be used within a ComboboxChip":eo(17));return e}const VIe=c.forwardRef(function(e,t){const{render:n,className:r,...o}=e,i=Hr(),{setHighlightedChipIndex:s,chipsRef:a}=M5(),l=ge(i,xe.disabled),u=ge(i,xe.readOnly),d=ge(i,xe.selectedValue),{ref:f,index:m}=T4();function p(h){let b=m;if(h.key==="ArrowLeft")h.preventDefault(),m>0?b=m-1:b=void 0;else if(h.key==="ArrowRight")h.preventDefault(),m<d.length-1?b=m+1:b=void 0;else if(h.key==="Backspace"||h.key==="Delete"){const y=m>=d.length-1?d.length-2:m;b=y>=0?y:void 0,Tr(h),i.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),i.state.setSelectedValue(d.filter((x,w)=>w!==m),Yt(hf,h.nativeEvent))}else h.key==="Enter"||h.key===" "?(Tr(h),b=void 0):h.key==="ArrowDown"||h.key==="ArrowUp"?(Tr(h),i.state.setOpen(!0,Yt(A4,h.nativeEvent)),b=void 0):h.key.length===1&&!h.ctrlKey&&!h.metaKey&&!h.altKey&&(b=void 0);return b}const v=Yn("div",e,{ref:[t,f],state:{disabled:l},props:[{tabIndex:-1,"aria-disabled":l||void 0,"aria-readonly":u||void 0,onKeyDown(h){if(l||u)return;const b=p(h);dt.flushSync(()=>{s(b)}),b===void 0?i.state.inputRef.current?.focus():a.current[b]?.focus()},onMouseDown(h){u||(h.preventDefault(),!l&&i.state.inputRef.current?.focus())}},o]}),g=c.useMemo(()=>({index:m}),[m]);return E.jsx(WC.Provider,{value:g,children:v})});process.env.NODE_ENV!=="production"&&(VIe.displayName="ComboboxChip");const FIe=c.forwardRef(function(e,t){const{render:n,className:r,disabled:o=!1,nativeButton:i=!0,...s}=e,a=Hr(),{index:l}=jIe(),u=ge(a,xe.disabled),d=ge(a,xe.readOnly),f=ge(a,xe.selectedValue),m=ge(a,xe.isItemEqualToValue),p=u||o,{buttonRef:v,getButtonProps:g}=Bh({native:i,disabled:p||d,focusableWhenDisabled:!0}),h={disabled:p};function b(x){const w=a.state.activeIndex;if(w==null)return;const C=N5(a.state.valuesRef.current,x,m);C!==-1&&w===C&&a.state.setIndices({activeIndex:null,type:a.state.keyboardActiveRef.current?"keyboard":"pointer"})}function y(x){const w=Yt(dSe,x.nativeEvent),C=f[l];return b(C),a.state.setSelectedValue(f.filter((R,k)=>k!==l),w),a.state.inputRef.current?.focus(),w}return Yn("button",e,{ref:[t,v],state:h,props:[{tabIndex:-1,onClick(x){p||d||y(x).isPropagationAllowed||x.stopPropagation()},onKeyDown(x){p||d||(x.key==="Enter"||x.key===" ")&&(y(x).isPropagationAllowed||Tr(x))}},s,g]})});process.env.NODE_ENV!=="production"&&(FIe.displayName="ComboboxChipRemove");var $Ie=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Kh=$Ie.reduce((e,t)=>{const n=NRe(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),zIe="Label",L5=c.forwardRef((e,t)=>E.jsx(Kh.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));L5.displayName=zIe;var BIe=L5;El(Gn("body-sm-regular"));BIe.displayName;var HIe="Separator",$I="horizontal",GIe=["horizontal","vertical"],j5=c.forwardRef((e,t)=>{const{decorative:n,orientation:r=$I,...o}=e,i=WIe(r)?r:$I,s=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return E.jsx(Kh.div,{"data-orientation":i,...s,...o,ref:t})});j5.displayName=HIe;function WIe(e){return GIe.includes(e)}var UIe=j5;UIe.displayName;[`text-primary-text flex w-fit items-center gap-2
|
|
429
|
+
group-data-[disabled=true]/field:opacity-50`,Gn("body-sm-regular")].join(" ");["text-sub-label-text group-has-data-[orientation=horizontal]/field:text-balance",Gn("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(" ");c.createContext(null);var qIe=c[" useId ".trim().toString()]||(()=>{}),KIe=0;function V5(e){const[t,n]=c.useState(qIe());return Ji(()=>{n(r=>r??String(KIe++))},[e]),t?`radix-${t}`:""}function ea(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}function YIe(e,t=globalThis?.document){const n=ea(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 XIe="DismissableLayer",bx="dismissableLayer.update",ZIe="dismissableLayer.pointerDownOutside",JIe="dismissableLayer.focusOutside",zI,F5=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),UC=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,u=c.useContext(F5),[d,f]=c.useState(null),m=d?.ownerDocument??globalThis?.document,[,p]=c.useState({}),v=ln(t,k=>f(k)),g=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(h),y=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,w=y>=b,C=tAe(k=>{const S=k.target,P=[...u.branches].some(L=>L.contains(S));!w||P||(o?.(k),s?.(k),k.defaultPrevented||a?.())},m),R=nAe(k=>{const S=k.target;[...u.branches].some(P=>P.contains(S))||(i?.(k),s?.(k),k.defaultPrevented||a?.())},m);return YIe(k=>{y===u.layers.size-1&&(r?.(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},m),c.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(zI=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),BI(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=zI)}},[d,m,n,u]),c.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),BI())},[d,u]),c.useEffect(()=>{const k=()=>p({});return document.addEventListener(bx,k),()=>document.removeEventListener(bx,k)},[]),E.jsx(_t.div,{...l,ref:v,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:Nt(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Nt(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Nt(e.onPointerDownCapture,C.onPointerDownCapture)})});UC.displayName=XIe;var QIe="DismissableLayerBranch",eAe=c.forwardRef((e,t)=>{const n=c.useContext(F5),r=c.useRef(null),o=ln(t,r);return c.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),E.jsx(_t.div,{...e,ref:o})});eAe.displayName=QIe;function tAe(e,t=globalThis?.document){const n=ea(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){$5(ZIe,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},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function nAe(e,t=globalThis?.document){const n=ea(e),r=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!r.current&&$5(JIe,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function BI(){const e=new CustomEvent(bx);document.dispatchEvent(e)}function $5(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?qRe(o,i):o.dispatchEvent(i)}var pb="focusScope.autoFocusOnMount",mb="focusScope.autoFocusOnUnmount",HI={bubbles:!1,cancelable:!0},rAe="FocusScope",z5=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=c.useState(null),u=ea(o),d=ea(i),f=c.useRef(null),m=ln(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(x){if(p.paused||!a)return;const w=x.target;a.contains(w)?f.current=w:ki(f.current,{select:!0})},h=function(x){if(p.paused||!a)return;const w=x.relatedTarget;w!==null&&(a.contains(w)||ki(f.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const w of x)w.removedNodes.length>0&&ki(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",h);const y=new MutationObserver(b);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",h),y.disconnect()}}},[r,a,p.paused]),c.useEffect(()=>{if(a){WI.add(p);const g=document.activeElement;if(!a.contains(g)){const h=new CustomEvent(pb,HI);a.addEventListener(pb,u),a.dispatchEvent(h),h.defaultPrevented||(oAe(cAe(B5(a)),{select:!0}),document.activeElement===g&&ki(a))}return()=>{a.removeEventListener(pb,u),setTimeout(()=>{const h=new CustomEvent(mb,HI);a.addEventListener(mb,d),a.dispatchEvent(h),h.defaultPrevented||ki(g??document.body,{select:!0}),a.removeEventListener(mb,d),WI.remove(p)},0)}}},[a,u,d,p]);const v=c.useCallback(g=>{if(!n&&!r||p.paused)return;const h=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(h&&b){const y=g.currentTarget,[x,w]=iAe(y);x&&w?!g.shiftKey&&b===w?(g.preventDefault(),n&&ki(x,{select:!0})):g.shiftKey&&b===x&&(g.preventDefault(),n&&ki(w,{select:!0})):b===y&&g.preventDefault()}},[n,r,p.paused]);return E.jsx(_t.div,{tabIndex:-1,...s,ref:m,onKeyDown:v})});z5.displayName=rAe;function oAe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ki(r,{select:t}),document.activeElement!==n)return}function iAe(e){const t=B5(e),n=GI(t,e),r=GI(t.reverse(),e);return[n,r]}function B5(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 GI(e,t){for(const n of e)if(!sAe(n,{upTo:t}))return n}function sAe(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 aAe(e){return e instanceof HTMLInputElement&&"select"in e}function ki(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&aAe(e)&&t&&e.select()}}var WI=lAe();function lAe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=UI(e,t),e.unshift(t)},remove(t){e=UI(e,t),e[0]?.resume()}}}function UI(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function cAe(e){return e.filter(t=>t.tagName!=="A")}var uAe="Portal",dAe=c.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=c.useState(!1);Ji(()=>i(!0),[]);const s=n||o&&globalThis?.document?.body;return s?xl.createPortal(E.jsx(_t.div,{...r,ref:t}),s):null});dAe.displayName=uAe;var hb=0;function fAe(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??qI()),document.body.insertAdjacentElement("beforeend",e[1]??qI()),hb++,()=>{hb===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),hb--}},[])}function qI(){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 fo=function(){return fo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},fo.apply(this,arguments)};function H5(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 pAe(e,t,n){for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var vf="right-scroll-bar-position",bf="width-before-scroll-bar",mAe="with-scroll-bars-hidden",hAe="--removed-body-scroll-bar-size";function gb(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function gAe(e,t){var n=ae.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 vAe=typeof window<"u"?c.useLayoutEffect:c.useEffect,KI=new WeakMap;function bAe(e,t){var n=gAe(null,function(r){return e.forEach(function(o){return gb(o,r)})});return vAe(function(){var r=KI.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||gb(a,null)}),i.forEach(function(a){o.has(a)||gb(a,s)})}KI.set(n,e)},[e]),n}function yAe(e){return e}function xAe(e,t){t===void 0&&(t=yAe);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(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var l=function(){var d=s;s=[],d.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),n}}}};return o}function wAe(e){e===void 0&&(e={});var t=xAe(null);return t.options=fo({async:!0,ssr:!1},e),t}var G5=function(e){var t=e.sideCar,n=H5(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,fo({},n))};G5.isSideCarExport=!0;function EAe(e,t){return e.useMedium(t),G5}var W5=wAe(),vb=function(){},Yh=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:vb,onWheelCapture:vb,onTouchMoveCapture:vb}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,p=e.noRelative,v=e.noIsolation,g=e.inert,h=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,x=e.gapMode,w=H5(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,R=bAe([n,t]),k=fo(fo({},w),o);return c.createElement(c.Fragment,null,d&&c.createElement(C,{sideCar:W5,removeScrollBar:u,shards:f,noRelative:p,noIsolation:v,inert:g,setCallbacks:i,allowPinchZoom:!!h,lockRef:n,gapMode:x}),s?c.cloneElement(c.Children.only(a),fo(fo({},k),{ref:R})):c.createElement(y,fo({},k,{className:l,ref:R}),a))});Yh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Yh.classNames={fullWidth:bf,zeroRight:vf};var CAe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function kAe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=CAe();return t&&e.setAttribute("nonce",t),e}function RAe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function SAe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var NAe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=kAe())&&(RAe(t,n),SAe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},OAe=function(){var e=NAe();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},U5=function(){var e=OAe(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},IAe={left:0,top:0,right:0,gap:0},bb=function(e){return parseInt(e||"",10)||0},AAe=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[bb(n),bb(r),bb(o)]},MAe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return IAe;var t=AAe(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])}},PAe=U5(),rl="data-scroll-locked",_Ae=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
430
|
+
.`.concat(mAe,` {
|
|
431
|
+
overflow: hidden `).concat(r,`;
|
|
432
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
433
|
+
}
|
|
434
|
+
body[`).concat(rl,`] {
|
|
435
|
+
overflow: hidden `).concat(r,`;
|
|
436
|
+
overscroll-behavior: contain;
|
|
437
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
438
|
+
padding-left: `.concat(o,`px;
|
|
439
|
+
padding-top: `).concat(i,`px;
|
|
440
|
+
padding-right: `).concat(s,`px;
|
|
441
|
+
margin-left:0;
|
|
442
|
+
margin-top:0;
|
|
443
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
444
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.`).concat(vf,` {
|
|
448
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.`).concat(bf,` {
|
|
452
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.`).concat(vf," .").concat(vf,` {
|
|
456
|
+
right: 0 `).concat(r,`;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.`).concat(bf," .").concat(bf,` {
|
|
460
|
+
margin-right: 0 `).concat(r,`;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
body[`).concat(rl,`] {
|
|
464
|
+
`).concat(hAe,": ").concat(a,`px;
|
|
465
|
+
}
|
|
466
|
+
`)},YI=function(){var e=parseInt(document.body.getAttribute(rl)||"0",10);return isFinite(e)?e:0},TAe=function(){c.useEffect(function(){return document.body.setAttribute(rl,(YI()+1).toString()),function(){var e=YI()-1;e<=0?document.body.removeAttribute(rl):document.body.setAttribute(rl,e.toString())}},[])},DAe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;TAe();var i=c.useMemo(function(){return MAe(o)},[o]);return c.createElement(PAe,{styles:_Ae(i,!t,o,n?"":"!important")})},yx=!1;if(typeof window<"u")try{var Hd=Object.defineProperty({},"passive",{get:function(){return yx=!0,!0}});window.addEventListener("test",Hd,Hd),window.removeEventListener("test",Hd,Hd)}catch{yx=!1}var Ma=yx?{passive:!1}:!1,LAe=function(e){return e.tagName==="TEXTAREA"},q5=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!LAe(e)&&n[t]==="visible")},jAe=function(e){return q5(e,"overflowY")},VAe=function(e){return q5(e,"overflowX")},XI=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=K5(e,r);if(o){var i=Y5(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},FAe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},$Ae=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},K5=function(e,t){return e==="v"?jAe(t):VAe(t)},Y5=function(e,t){return e==="v"?FAe(t):$Ae(t)},zAe=function(e,t){return e==="h"&&t==="rtl"?-1:1},BAe=function(e,t,n,r,o){var i=zAe(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),u=!1,d=s>0,f=0,m=0;do{if(!a)break;var p=Y5(e,a),v=p[0],g=p[1],h=p[2],b=g-h-i*v;(v||b)&&K5(e,a)&&(f+=b,m+=v);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&Math.abs(f)<1||!d&&Math.abs(m)<1)&&(u=!0),u},Gd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ZI=function(e){return[e.deltaX,e.deltaY]},JI=function(e){return e&&"current"in e?e.current:e},HAe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},GAe=function(e){return`
|
|
467
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
468
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
469
|
+
`)},WAe=0,Pa=[];function UAe(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(WAe++)[0],i=c.useState(U5)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=pAe([e.lockRef.current],(e.shards||[]).map(JI)).filter(Boolean);return g.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(g,h){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var b=Gd(g),y=n.current,x="deltaX"in g?g.deltaX:y[0]-b[0],w="deltaY"in g?g.deltaY:y[1]-b[1],C,R=g.target,k=Math.abs(x)>Math.abs(w)?"h":"v";if("touches"in g&&k==="h"&&R.type==="range")return!1;var S=window.getSelection(),P=S&&S.anchorNode,L=P?P===R||P.contains(R):!1;if(L)return!1;var _=XI(k,R);if(!_)return!0;if(_?C=k:(C=k==="v"?"h":"v",_=XI(k,R)),!_)return!1;if(!r.current&&"changedTouches"in g&&(x||w)&&(r.current=C),!C)return!0;var O=r.current||C;return BAe(O,h,g,O==="h"?x:w)},[]),l=c.useCallback(function(g){var h=g;if(!(!Pa.length||Pa[Pa.length-1]!==i)){var b="deltaY"in h?ZI(h):Gd(h),y=t.current.filter(function(C){return C.name===h.type&&(C.target===h.target||h.target===C.shadowParent)&&HAe(C.delta,b)})[0];if(y&&y.should){h.cancelable&&h.preventDefault();return}if(!y){var x=(s.current.shards||[]).map(JI).filter(Boolean).filter(function(C){return C.contains(h.target)}),w=x.length>0?a(h,x[0]):!s.current.noIsolation;w&&h.cancelable&&h.preventDefault()}}},[]),u=c.useCallback(function(g,h,b,y){var x={name:g,delta:h,target:b,should:y,shadowParent:qAe(b)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(w){return w!==x})},1)},[]),d=c.useCallback(function(g){n.current=Gd(g),r.current=void 0},[]),f=c.useCallback(function(g){u(g.type,ZI(g),g.target,a(g,e.lockRef.current))},[]),m=c.useCallback(function(g){u(g.type,Gd(g),g.target,a(g,e.lockRef.current))},[]);c.useEffect(function(){return Pa.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Ma),document.addEventListener("touchmove",l,Ma),document.addEventListener("touchstart",d,Ma),function(){Pa=Pa.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,Ma),document.removeEventListener("touchmove",l,Ma),document.removeEventListener("touchstart",d,Ma)}},[]);var p=e.removeScrollBar,v=e.inert;return c.createElement(c.Fragment,null,v?c.createElement(i,{styles:GAe(o)}):null,p?c.createElement(DAe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function qAe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const KAe=EAe(W5,UAe);var X5=c.forwardRef(function(e,t){return c.createElement(Yh,fo({},e,{ref:t,sideCar:KAe}))});X5.classNames=Yh.classNames;var YAe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_a=new WeakMap,Wd=new WeakMap,Ud={},yb=0,Z5=function(e){return e&&(e.host||Z5(e.parentNode))},XAe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Z5(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})},ZAe=function(e,t,n,r){var o=XAe(t,Array.isArray(e)?e:[e]);Ud[n]||(Ud[n]=new WeakMap);var i=Ud[n],s=[],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(m){if(a.has(m))d(m);else try{var p=m.getAttribute(r),v=p!==null&&p!=="false",g=(_a.get(m)||0)+1,h=(i.get(m)||0)+1;_a.set(m,g),i.set(m,h),s.push(m),g===1&&v&&Wd.set(m,!0),h===1&&m.setAttribute(n,"true"),v||m.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return d(t),a.clear(),yb++,function(){s.forEach(function(f){var m=_a.get(f)-1,p=i.get(f)-1;_a.set(f,m),i.set(f,p),m||(Wd.has(f)||f.removeAttribute(r),Wd.delete(f)),p||f.removeAttribute(n)}),yb--,yb||(_a=new WeakMap,_a=new WeakMap,Wd=new WeakMap,Ud={})}},JAe=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=YAe(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),ZAe(r,o,n,"aria-hidden")):function(){return null}},J5="Dialog",[Q5]=Vo(J5),[o_e,$o]=Q5(J5),eH="DialogTrigger",QAe=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=$o(eH,n),i=ln(t,o.triggerRef);return E.jsx(_t.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":KC(o.open),...r,ref:i,onClick:Nt(e.onClick,o.onOpenToggle)})});QAe.displayName=eH;var eMe="DialogPortal",[i_e,tH]=Q5(eMe,{forceMount:void 0}),rm="DialogOverlay",nH=c.forwardRef((e,t)=>{const n=tH(rm,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=$o(rm,e.__scopeDialog);return i.modal?E.jsx(va,{present:r||i.open,children:E.jsx(nMe,{...o,ref:t})}):null});nH.displayName=rm;var tMe=Hp("DialogOverlay.RemoveScroll"),nMe=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=$o(rm,n);return E.jsx(X5,{as:tMe,allowPinchZoom:!0,shards:[o.contentRef],children:E.jsx(_t.div,{"data-state":KC(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ta="DialogContent",rH=c.forwardRef((e,t)=>{const n=tH(ta,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=$o(ta,e.__scopeDialog);return E.jsx(va,{present:r||i.open,children:i.modal?E.jsx(rMe,{...o,ref:t}):E.jsx(oMe,{...o,ref:t})})});rH.displayName=ta;var rMe=c.forwardRef((e,t)=>{const n=$o(ta,e.__scopeDialog),r=c.useRef(null),o=ln(t,n.contentRef,r);return c.useEffect(()=>{const i=r.current;if(i)return JAe(i)},[]),E.jsx(oH,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Nt(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Nt(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:Nt(e.onFocusOutside,i=>i.preventDefault())})}),oMe=c.forwardRef((e,t)=>{const n=$o(ta,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return E.jsx(oH,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;n.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),oH=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=$o(ta,n),l=c.useRef(null),u=ln(t,l);return fAe(),E.jsxs(E.Fragment,{children:[E.jsx(z5,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:E.jsx(UC,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":KC(a.open),...s,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),E.jsxs(E.Fragment,{children:[E.jsx(sMe,{titleId:a.titleId}),E.jsx(lMe,{contentRef:l,descriptionId:a.descriptionId})]})]})}),qC="DialogTitle",iH=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=$o(qC,n);return E.jsx(_t.h2,{id:o.titleId,...r,ref:t})});iH.displayName=qC;var sH="DialogDescription",aH=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=$o(sH,n);return E.jsx(_t.p,{id:o.descriptionId,...r,ref:t})});aH.displayName=sH;var lH="DialogClose",iMe=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=$o(lH,n);return E.jsx(_t.button,{type:"button",...r,ref:t,onClick:Nt(e.onClick,()=>o.onOpenChange(!1))})});iMe.displayName=lH;function KC(e){return e?"open":"closed"}var cH="DialogTitleWarning",[s_e,uH]=_Re(cH,{contentName:ta,titleName:qC,docsSlug:"dialog"}),sMe=({titleId:e})=>{const t=uH(cH),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
470
|
+
|
|
471
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
472
|
+
|
|
473
|
+
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},aMe="DialogDescriptionWarning",lMe=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${uH(aMe).contentName}}.`;return c.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},cMe=nH,uMe=rH,dMe=iH,fMe=aH;cMe.displayName;uMe.displayName;dMe.displayName;fMe.displayName;Gn("body-sm-medium");[Gn("body-xs-medium"),"mb-1 px-2 text-secondary-text uppercase"].join(" ");function pMe(e,t=[]){let n=[];function r(i,s){const a=c.createContext(s);a.displayName=i+"Context";const l=n.length;n=[...n,s];const u=f=>{const{scope:m,children:p,...v}=f,g=m?.[e]?.[l]||a,h=c.useMemo(()=>v,Object.values(v));return E.jsx(g.Provider,{value:h,children:p})};u.displayName=i+"Provider";function d(f,m){const p=m?.[e]?.[l]||a,v=c.useContext(p);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(s=>c.createContext(s));return function(s){const a=s?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:a}}),[s,a])}};return o.scopeName=e,[r,mMe(o,...t)]}function mMe(...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(o){const i=r.reduce((s,{useScope:a,scopeName:l})=>{const u=a(o)[`__scope${l}`];return{...s,...u}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var YC="Progress",XC=100,[hMe]=pMe(YC),[gMe,vMe]=hMe(YC),dH=c.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=yMe,...s}=e;(o||o===0)&&!QI(o)&&console.error(xMe(`${o}`,"Progress"));const a=QI(o)?o:XC;r!==null&&!eA(r,a)&&console.error(wMe(`${r}`,"Progress"));const l=eA(r,a)?r:null,u=om(l)?i(l,a):void 0;return E.jsx(gMe,{scope:n,value:l,max:a,children:E.jsx(Kh.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":om(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":pH(l,a),"data-value":l??void 0,"data-max":a,...s,ref:t})})});dH.displayName=YC;var fH="ProgressIndicator",bMe=c.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=vMe(fH,n);return E.jsx(Kh.div,{"data-state":pH(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});bMe.displayName=fH;function yMe(e,t){return`${Math.round(e/t*100)}%`}function pH(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function om(e){return typeof e=="number"}function QI(e){return om(e)&&!isNaN(e)&&e>0}function eA(e,t){return om(e)&&!isNaN(e)&&e<=t&&e>=0}function xMe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${XC}\`.`}function wMe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
474
|
+
- a positive number
|
|
475
|
+
- less than the value passed to \`max\` (or ${XC} if no \`max\` prop is set)
|
|
476
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
477
|
+
|
|
478
|
+
Defaulting to \`null\`.`}var EMe=dH;EMe.displayName;function CMe(e){const t=e+"CollectionProvider",[n,r]=Vo(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:h,children:b}=g,y=ae.useRef(null),x=ae.useRef(new Map).current;return E.jsx(o,{scope:h,itemMap:x,collectionRef:y,children:b})};s.displayName=t;const a=e+"CollectionSlot",l=Hp(a),u=ae.forwardRef((g,h)=>{const{scope:b,children:y}=g,x=i(a,b),w=ln(h,x.collectionRef);return E.jsx(l,{ref:w,children:y})});u.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",m=Hp(d),p=ae.forwardRef((g,h)=>{const{scope:b,children:y,...x}=g,w=ae.useRef(null),C=ln(h,w),R=i(d,b);return ae.useEffect(()=>(R.itemMap.set(w,{ref:w,...x}),()=>{R.itemMap.delete(w)})),E.jsx(m,{[f]:"",ref:C,children:y})});p.displayName=d;function v(g){const h=i(e+"CollectionConsumer",g);return ae.useCallback(()=>{const b=h.collectionRef.current;if(!b)return[];const y=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((x,w)=>y.indexOf(x.ref.current)-y.indexOf(w.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},v,r]}var kMe=c.createContext(void 0);function ZC(e){const t=c.useContext(kMe);return e||t||"ltr"}var xb="rovingFocusGroup.onEntryFocus",RMe={bubbles:!1,cancelable:!0},tu="RovingFocusGroup",[xx,mH,SMe]=CMe(tu),[NMe,Xh]=Vo(tu,[SMe]),[OMe,IMe]=NMe(tu),hH=c.forwardRef((e,t)=>E.jsx(xx.Provider,{scope:e.__scopeRovingFocusGroup,children:E.jsx(xx.Slot,{scope:e.__scopeRovingFocusGroup,children:E.jsx(AMe,{...e,ref:t})})}));hH.displayName=tu;var AMe=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,m=c.useRef(null),p=ln(t,m),v=ZC(i),[g,h]=Qc({prop:s,defaultProp:a??null,onChange:l,caller:tu}),[b,y]=c.useState(!1),x=ea(u),w=mH(n),C=c.useRef(!1),[R,k]=c.useState(0);return c.useEffect(()=>{const S=m.current;if(S)return S.addEventListener(xb,x),()=>S.removeEventListener(xb,x)},[x]),E.jsx(OMe,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:g,onItemFocus:c.useCallback(S=>h(S),[h]),onItemShiftTab:c.useCallback(()=>y(!0),[]),onFocusableItemAdd:c.useCallback(()=>k(S=>S+1),[]),onFocusableItemRemove:c.useCallback(()=>k(S=>S-1),[]),children:E.jsx(_t.div,{tabIndex:b||R===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:Nt(e.onMouseDown,()=>{C.current=!0}),onFocus:Nt(e.onFocus,S=>{const P=!C.current;if(S.target===S.currentTarget&&P&&!b){const L=new CustomEvent(xb,RMe);if(S.currentTarget.dispatchEvent(L),!L.defaultPrevented){const _=w().filter(V=>V.focusable),O=_.find(V=>V.active),B=_.find(V=>V.id===g),I=[O,B,..._].filter(Boolean).map(V=>V.ref.current);bH(I,d)}}C.current=!1}),onBlur:Nt(e.onBlur,()=>y(!1))})})}),gH="RovingFocusGroupItem",vH=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:s,...a}=e,l=V5(),u=i||l,d=IMe(gH,n),f=d.currentTabStopId===u,m=mH(n),{onFocusableItemAdd:p,onFocusableItemRemove:v,currentTabStopId:g}=d;return c.useEffect(()=>{if(r)return p(),()=>v()},[r,p,v]),E.jsx(xx.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:E.jsx(_t.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:Nt(e.onMouseDown,h=>{r?d.onItemFocus(u):h.preventDefault()}),onFocus:Nt(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:Nt(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){d.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const b=_Me(h,d.orientation,d.dir);if(b!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let y=m().filter(x=>x.focusable).map(x=>x.ref.current);if(b==="last")y.reverse();else if(b==="prev"||b==="next"){b==="prev"&&y.reverse();const x=y.indexOf(h.currentTarget);y=d.loop?TMe(y,x+1):y.slice(x+1)}setTimeout(()=>bH(y))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:g!=null}):s})})});vH.displayName=gH;var MMe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function PMe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function _Me(e,t,n){const r=PMe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return MMe[r]}function bH(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function TMe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var yH=hH,xH=vH,JC="Radio",[DMe,wH]=Vo(JC),[LMe,jMe]=DMe(JC),EH=c.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:s,value:a="on",onCheck:l,form:u,...d}=e,[f,m]=c.useState(null),p=ln(t,h=>m(h)),v=c.useRef(!1),g=f?u||!!f.closest("form"):!0;return E.jsxs(LMe,{scope:n,checked:o,disabled:s,children:[E.jsx(_t.button,{type:"button",role:"radio","aria-checked":o,"data-state":SH(o),"data-disabled":s?"":void 0,disabled:s,value:a,...d,ref:p,onClick:Nt(e.onClick,h=>{o||l?.(),g&&(v.current=h.isPropagationStopped(),v.current||h.stopPropagation())})}),g&&E.jsx(RH,{control:f,bubbles:!v.current,name:r,value:a,checked:o,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});EH.displayName=JC;var CH="RadioIndicator",kH=c.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=jMe(CH,n);return E.jsx(va,{present:r||i.checked,children:E.jsx(_t.span,{"data-state":SH(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});kH.displayName=CH;var VMe="RadioBubbleInput",RH=c.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const s=c.useRef(null),a=ln(s,i),l=vC(n),u=jh(t);return c.useEffect(()=>{const d=s.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&m){const p=new Event("click",{bubbles:r});m.call(d,n),d.dispatchEvent(p)}},[l,n,r]),E.jsx(_t.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}})});RH.displayName=VMe;function SH(e){return e?"checked":"unchecked"}var FMe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Zh="RadioGroup",[$Me]=Vo(Zh,[Xh,wH]),NH=Xh(),OH=wH(),[zMe,BMe]=$Me(Zh),IH=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:s=!1,disabled:a=!1,orientation:l,dir:u,loop:d=!0,onValueChange:f,...m}=e,p=NH(n),v=ZC(u),[g,h]=Qc({prop:i,defaultProp:o??null,onChange:f,caller:Zh});return E.jsx(zMe,{scope:n,name:r,required:s,disabled:a,value:g,onValueChange:h,children:E.jsx(yH,{asChild:!0,...p,orientation:l,dir:v,loop:d,children:E.jsx(_t.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":a?"":void 0,dir:v,...m,ref:t})})})});IH.displayName=Zh;var AH="RadioGroupItem",MH=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=BMe(AH,n),s=i.disabled||r,a=NH(n),l=OH(n),u=c.useRef(null),d=ln(t,u),f=i.value===o.value,m=c.useRef(!1);return c.useEffect(()=>{const p=g=>{FMe.includes(g.key)&&(m.current=!0)},v=()=>m.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",v)}},[]),E.jsx(xH,{asChild:!0,...a,focusable:!s,active:f,children:E.jsx(EH,{disabled:s,required:i.required,checked:f,...l,...o,name:i.name,ref:d,onCheck:()=>i.onValueChange(o.value),onKeyDown:Nt(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:Nt(o.onFocus,()=>{m.current&&u.current?.click()})})})});MH.displayName=AH;var HMe="RadioGroupIndicator",GMe=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=OH(n);return E.jsx(kH,{...o,...r,ref:t})});GMe.displayName=HMe;var WMe=IH,UMe=MH;WMe.displayName;UMe.displayName;var Jh="Switch",[qMe]=Vo(Jh),[KMe,YMe]=qMe(Jh),PH=c.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:s,disabled:a,value:l="on",onCheckedChange:u,form:d,...f}=e,[m,p]=c.useState(null),v=ln(t,x=>p(x)),g=c.useRef(!1),h=m?d||!!m.closest("form"):!0,[b,y]=Qc({prop:o,defaultProp:i??!1,onChange:u,caller:Jh});return E.jsxs(KMe,{scope:n,checked:b,disabled:a,children:[E.jsx(_t.button,{type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":DH(b),"data-disabled":a?"":void 0,disabled:a,value:l,...f,ref:v,onClick:Nt(e.onClick,x=>{y(w=>!w),h&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),h&&E.jsx(TH,{control:m,bubbles:!g.current,name:r,value:l,checked:b,required:s,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});PH.displayName=Jh;var _H="SwitchThumb",XMe=c.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=YMe(_H,n);return E.jsx(_t.span,{"data-state":DH(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});XMe.displayName=_H;var ZMe="SwitchBubbleInput",TH=c.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const s=c.useRef(null),a=ln(s,i),l=vC(n),u=jh(t);return c.useEffect(()=>{const d=s.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&m){const p=new Event("click",{bubbles:r});m.call(d,n),d.dispatchEvent(p)}},[l,n,r]),E.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}})});TH.displayName=ZMe;function DH(e){return e?"checked":"unchecked"}var JMe=PH;JMe.displayName;var Qh="Tabs",[QMe]=Vo(Qh,[Xh]),LH=Xh(),[ePe,QC]=QMe(Qh),tPe=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:s="horizontal",dir:a,activationMode:l="automatic",...u}=e,d=ZC(a),[f,m]=Qc({prop:r,onChange:o,defaultProp:i??"",caller:Qh});return E.jsx(ePe,{scope:n,baseId:V5(),value:f,onValueChange:m,orientation:s,dir:d,activationMode:l,children:E.jsx(_t.div,{dir:d,"data-orientation":s,...u,ref:t})})});tPe.displayName=Qh;var jH="TabsList",VH=c.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=QC(jH,n),s=LH(n);return E.jsx(yH,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:r,children:E.jsx(_t.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});VH.displayName=jH;var FH="TabsTrigger",$H=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,s=QC(FH,n),a=LH(n),l=HH(s.baseId,r),u=GH(s.baseId,r),d=r===s.value;return E.jsx(xH,{asChild:!0,...a,focusable:!o,active:d,children:E.jsx(_t.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,...i,ref:t,onMouseDown:Nt(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?s.onValueChange(r):f.preventDefault()}),onKeyDown:Nt(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&s.onValueChange(r)}),onFocus:Nt(e.onFocus,()=>{const f=s.activationMode!=="manual";!d&&!o&&f&&s.onValueChange(r)})})})});$H.displayName=FH;var zH="TabsContent",BH=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...s}=e,a=QC(zH,n),l=HH(a.baseId,r),u=GH(a.baseId,r),d=r===a.value,f=c.useRef(d);return c.useEffect(()=>{const m=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(m)},[]),E.jsx(va,{present:o||d,children:({present:m})=>E.jsx(_t.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!m,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:m&&i})})});BH.displayName=zH;function HH(e,t){return`${e}-trigger-${t}`}function GH(e,t){return`${e}-content-${t}`}var nPe=VH,rPe=$H,oPe=BH;El(["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:[Gn("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:[Gn("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"}});c.createContext("default");nPe.displayName;rPe.displayName;oPe.displayName;var iPe="Arrow",WH=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return E.jsx(_t.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});WH.displayName=iPe;var sPe=WH,UH="Popper",[qH,KH]=Vo(UH),[a_e,YH]=qH(UH),XH="PopperAnchor",ZH=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=YH(XH,n),s=c.useRef(null),a=ln(t,s),l=c.useRef(null);return c.useEffect(()=>{const u=l.current;l.current=r?.current||s.current,u!==l.current&&i.onAnchorChange(l.current)}),r?null:E.jsx(_t.div,{...o,ref:a})});ZH.displayName=XH;var ek="PopperContent",[aPe,lPe]=qH(ek),JH=c.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:v,...g}=e,h=YH(ek,n),[b,y]=c.useState(null),x=ln(t,te=>y(te)),[w,C]=c.useState(null),R=jh(w),k=R?.width??0,S=R?.height??0,P=r+(i!=="center"?"-"+i:""),L=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},_=Array.isArray(u)?u:[u],O=_.length>0,B={padding:L,boundary:_.filter(uPe),altBoundary:O},{refs:I,floatingStyles:V,placement:F,isPositioned:D,middlewareData:T}=f5({strategy:"fixed",placement:P,whileElementsMounted:(...te)=>gx(...te,{animationFrame:p==="always"}),elements:{reference:h.anchor},middleware:[p5({mainAxis:o+S,alignmentAxis:s}),l&&m5({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?h5():void 0,...B}),l&&g5({...B}),v5({...B,apply:({elements:te,rects:le,availableWidth:z,availableHeight:re})=>{const{width:oe,height:M}=le.reference,N=te.floating.style;N.setProperty("--radix-popper-available-width",`${z}px`),N.setProperty("--radix-popper-available-height",`${re}px`),N.setProperty("--radix-popper-anchor-width",`${oe}px`),N.setProperty("--radix-popper-anchor-height",`${M}px`)}}),w&&dOe({element:w,padding:a}),dPe({arrowWidth:k,arrowHeight:S}),m&&b5({strategy:"referenceHidden",...B})]}),[q,A]=tG(F),ee=ea(v);Ji(()=>{D&&ee?.()},[D,ee]);const ie=T.arrow?.x,Y=T.arrow?.y,Q=T.arrow?.centerOffset!==0,[X,J]=c.useState();return Ji(()=>{b&&J(window.getComputedStyle(b).zIndex)},[b]),E.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:D?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[T.transformOrigin?.x,T.transformOrigin?.y].join(" "),...T.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(aPe,{scope:n,placedSide:q,onArrowChange:C,arrowX:ie,arrowY:Y,shouldHideArrow:Q,children:E.jsx(_t.div,{"data-side":q,"data-align":A,...g,ref:x,style:{...g.style,animation:D?void 0:"none"}})})})});JH.displayName=ek;var QH="PopperArrow",cPe={top:"bottom",right:"left",bottom:"top",left:"right"},eG=c.forwardRef(function(e,t){const{__scopePopper:n,...r}=e,o=lPe(QH,n),i=cPe[o.placedSide];return E.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:E.jsx(sPe,{...r,ref:t,style:{...r.style,display:"block"}})})});eG.displayName=QH;function uPe(e){return e!==null}var dPe=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,s=i?0:e.arrowWidth,a=i?0:e.arrowHeight,[l,u]=tG(n),d={start:"0%",center:"50%",end:"100%"}[u],f=(o.arrow?.x??0)+s/2,m=(o.arrow?.y??0)+a/2;let p="",v="";return l==="bottom"?(p=i?d:`${f}px`,v=`${-a}px`):l==="top"?(p=i?d:`${f}px`,v=`${r.floating.height+a}px`):l==="right"?(p=`${-a}px`,v=i?d:`${m}px`):l==="left"&&(p=`${r.floating.width+a}px`,v=i?d:`${m}px`),{data:{x:p,y:v}}}});function tG(e){const[t,n="center"]=e.split("-");return[t,n]}var fPe=ZH,pPe=JH,mPe=eG,hPe=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"}),gPe="VisuallyHidden",nG=c.forwardRef((e,t)=>E.jsx(_t.span,{...e,ref:t,style:{...hPe,...e.style}}));nG.displayName=gPe;var vPe=nG,[eg]=Vo("Tooltip",[KH]),tk=KH(),bPe="TooltipProvider",tA="tooltip.open",[l_e,rG]=eg(bPe),oG="Tooltip",[c_e,tg]=eg(oG),wx="TooltipTrigger",yPe=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=tg(wx,n),i=rG(wx,n),s=tk(n),a=c.useRef(null),l=ln(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]),E.jsx(fPe,{asChild:!0,...s,children:E.jsx(_t.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:Nt(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:Nt(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:Nt(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Nt(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Nt(e.onBlur,o.onClose),onClick:Nt(e.onClick,o.onClose)})})});yPe.displayName=wx;var xPe="TooltipPortal",[u_e,wPe]=eg(xPe,{forceMount:void 0}),yl="TooltipContent",iG=c.forwardRef((e,t)=>{const n=wPe(yl,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=tg(yl,e.__scopeTooltip);return E.jsx(va,{present:r||s.open,children:s.disableHoverableContent?E.jsx(sG,{side:o,...i,ref:t}):E.jsx(EPe,{side:o,...i,ref:t})})}),EPe=c.forwardRef((e,t)=>{const n=tg(yl,e.__scopeTooltip),r=rG(yl,e.__scopeTooltip),o=c.useRef(null),i=ln(t,o),[s,a]=c.useState(null),{trigger:l,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,m=c.useCallback(()=>{a(null),f(!1)},[f]),p=c.useCallback((v,g)=>{const h=v.currentTarget,b={x:v.clientX,y:v.clientY},y=NPe(b,h.getBoundingClientRect()),x=OPe(b,y),w=IPe(g.getBoundingClientRect()),C=MPe([...x,...w]);a(C),f(!0)},[f]);return c.useEffect(()=>()=>m(),[m]),c.useEffect(()=>{if(l&&d){const v=h=>p(h,d),g=h=>p(h,l);return l.addEventListener("pointerleave",v),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",g)}}},[l,d,p,m]),c.useEffect(()=>{if(s){const v=g=>{const h=g.target,b={x:g.clientX,y:g.clientY},y=l?.contains(h)||d?.contains(h),x=!APe(b,s);y?m():x&&(m(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,d,s,u,m]),E.jsx(sG,{...e,ref:i})}),[CPe,kPe]=eg(oG,{isInside:!1}),RPe=BRe("TooltipContent"),sG=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=tg(yl,n),u=tk(n),{onClose:d}=l;return c.useEffect(()=>(document.addEventListener(tA,d),()=>document.removeEventListener(tA,d)),[d]),c.useEffect(()=>{if(l.trigger){const f=m=>{m.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),E.jsx(UC,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:E.jsxs(pPe,{"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:[E.jsx(RPe,{children:r}),E.jsx(CPe,{scope:n,isInside:!0,children:E.jsx(vPe,{id:l.contentId,role:"tooltip",children:o||r})})]})})});iG.displayName=yl;var aG="TooltipArrow",SPe=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=tk(n);return kPe(aG,n).isInside?null:E.jsx(mPe,{...o,...r,ref:t})});SPe.displayName=aG;function NPe(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function OPe(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 IPe(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 APe(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],l=t[s],u=a.x,d=a.y,f=l.x,m=l.y;d>r!=m>r&&n<(f-u)*(r-d)/(m-d)+u&&(o=!o)}return o}function MPe(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),PPe(t)}function PPe(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 i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.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 i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.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 _Pe=iG;_Pe.displayName;const TPe=({children:e,text:t,place:n="top",arrow:r=!0,classes:o,color:i="dark",tooltipItemsLimit:s=1/0})=>{const{isOpened:a,togglePopup:l}=Lae(),u=ae.useMemo(()=>({arrow:i==="dark"?"fill-primary-inverse-bg":"fill-primary-bg",content:i==="dark"?"bg-primary-inverse-bg text-primary-inverse-text":"bg-primary-bg text-primary-text"}),[i]),d=ae.useMemo(()=>Array.isArray(t)?(t.length-s>0?t.slice(0,s):t).map((p,v)=>E.jsx("p",{className:o?.tooltipTextItem,children:p},v)):t,[o?.tooltipTextItem,t,s]);return E.jsxs(_ae,{open:a,onOpenChange:l,children:[E.jsx(Tae,{asChild:!0,className:o?.trigger,children:e}),E.jsxs(Ej,{side:n,className:u.content,children:[E.jsx("div",{className:wT(o?.tooltip),children:d}),r&&E.jsx(Dae,{className:u.arrow})]})]})},DPe=({date:e=[],isValid:t,disabled:n=!1,label:r,description:o,...i})=>{const s={"aria-invalid":!!t},a=[t===!0&&"text-success-text",t===!1&&"text-error-text",n&&"text-disabled-text"].filter(Boolean).join(" ");return E.jsx(wm,{children:E.jsx(Vc,{children:E.jsxs(Fc,{children:[r&&E.jsx($c,{children:r}),e.length>0?E.jsxs(hw,{"data-slot":!0,children:[E.jsx(vw,{...i,...s,disabled:n}),e.map(l=>E.jsx(gw,{align:l.position,children:l.component},l.id))]}):E.jsx(mw,{...i,...s,disabled:n}),o&&E.jsx(Em,{className:a,children:o})]})})})};function LPe({classNames:e,id:t,value:n,defaultValue:r,label:o,options:i=[]}){return E.jsx(Tw,{defaultValue:r,className:fe("w-fit",e?.classNameGroup),children:i.length?i.map(s=>E.jsxs("div",{className:fe("flex items-center gap-3",e?.classNameContainerItem),children:[E.jsx(Ff,{value:s.value,id:s.id,className:e?.classNameGroupItem}),s.label&&E.jsx(fc,{htmlFor:s.id,className:e?.classNameLabel,children:s.label})]},s.id)):E.jsxs("div",{className:fe("flex items-center gap-3",e?.classNameContainerItem),children:[E.jsx(Ff,{value:n,id:t,className:e?.classNameGroupItem}),o&&E.jsx(fc,{htmlFor:t,className:e?.classNameLabel,children:o})]})})}const lG=({list:e,label:t,multiple:n,disabled:r=!1,onChange:o,...i})=>{const[s,a]=ae.useState([]),[l,u]=ae.useState(null),[d,f]=ae.useState(""),m=b=>{if(n){const y=Array.isArray(b)?b:[b],x=y.length>s.length;a(y),o?.(y),x&&f("")}else{const y=b;l?.value===y.value?(u(null),o?.(null)):(u(y),o?.(y)),f("")}},p=b=>{const y=b.currentTarget.value;f(y)},v=()=>{r||(u(null),o?.(null))},g=n?s:l,h=e.filter(b=>b.value.toLowerCase().includes(d.trim().toLowerCase()));return E.jsx(wm,{children:E.jsx(Vc,{children:E.jsx(TP,{label:t,children:E.jsxs(_P,{items:e,multiple:n,autoHighlight:n,value:g,onValueChange:r?void 0:m,children:[n?E.jsxs($b,{disabled:r,className:"pr-8",children:[E.jsx(Fb,{children:b=>E.jsxs(E.Fragment,{children:[b.map((y,x)=>E.jsx(zb,{showRemove:!r,className:`${xf({variant:y.variant,kind:y.kind})} ${r&&"opacity-50"} pl-2.5
|
|
479
|
+
${x===0&&"ml-1"}`,children:E.jsx(qd,{variant:y.variant,classNames:{className:"px-2 py-0"},children:y.value})},y.id)),E.jsx(Bb,{...i,disabled:r,placeholder:b.length>0?"":i.placeholder,value:d,onChange:p})]})}),E.jsx(Lf,{className:"-ml-4.5",disabled:r})]}):E.jsxs($b,{disabled:r,className:"pr-8",children:[E.jsx(Fb,{children:b=>E.jsxs(E.Fragment,{children:[b&&E.jsx(zb,{showRemove:!1,onClick:v,className:`${xf({variant:b.variant,kind:b.kind})} ${r&&"opacity-50"} ml-1`,children:E.jsx(qd,{variant:b.variant,classNames:{className:"px-2 py-0"},children:b.value})},b.value),E.jsx(Bb,{...i,placeholder:b?"":i.placeholder,disabled:r,value:d,onChange:p,className:"flex-1 pl-1"})]})}),E.jsx(Lf,{className:"-ml-4.5",disabled:r})]}),E.jsxs(DP,{children:[E.jsx(VP,{children:"No items found."}),E.jsx(LP,{children:h.map(b=>{const y=n?s.includes(b):l===b;return E.jsx(jP,{disabled:r,value:b,className:y?"bg-tertiary-bg":"",children:E.jsx(qd,{dotPosition:"left",variant:b.variant,kind:b.kind,classNames:{className:"px-4 py-1.5"},children:b.value})},b.id)})})]})]})})})})};lG.displayName="SelectSearch";const jPe=({label:e,description:t,...n})=>{const{disabled:r}=n;return E.jsx(wm,{children:E.jsx(Vc,{children:E.jsxs(Fc,{children:[e&&E.jsx($c,{children:e}),E.jsx(Cm,{...n}),t&&E.jsx(Em,{className:r?"text-disabled-text":"",children:t})]})})})};exports.AppPagination=IZ;exports.AppSidebar=DZ;exports.Badge=qd;exports.BasicCheckbox=LZ;exports.BasicModal=jZ;exports.BasicTable=IJ;exports.BasicTooltip=TPe;exports.Button=Qo;exports.Card=EA;exports.CardContent=SA;exports.CardDescription=RA;exports.CardFooter=NA;exports.CardHeader=CA;exports.CardTitle=kA;exports.Checkbox=Mx;exports.Combobox=_P;exports.ComboboxChip=zb;exports.ComboboxChips=$b;exports.ComboboxChipsInput=Bb;exports.ComboboxCollection=f7;exports.ComboboxContent=DP;exports.ComboboxEmpty=VP;exports.ComboboxField=TP;exports.ComboboxGroup=u7;exports.ComboboxInput=c7;exports.ComboboxItem=jP;exports.ComboboxLabel=d7;exports.ComboboxList=LP;exports.ComboboxSeparator=p7;exports.ComboboxTrigger=Lf;exports.ComboboxValue=Fb;exports.Dialog=y_;exports.DialogClose=FY;exports.DialogContent=kw;exports.DialogDescription=w_;exports.DialogFooter=Sw;exports.DialogHeader=Rw;exports.DialogOverlay=Cw;exports.DialogPortal=x_;exports.DialogTitle=Nw;exports.DialogTrigger=VY;exports.Field=Fc;exports.FieldContent=FK;exports.FieldDescription=Em;exports.FieldError=AP;exports.FieldGroup=Vc;exports.FieldLabel=$c;exports.FieldLegend=VK;exports.FieldSeparator=zK;exports.FieldSet=wm;exports.FieldTitle=$K;exports.Icon=ol;exports.Input=mw;exports.InputField=DPe;exports.InputGroup=hw;exports.InputGroupAddon=gw;exports.InputGroupButton=MP;exports.InputGroupInput=vw;exports.InputGroupText=UK;exports.InputGroupTextarea=qK;exports.Label=fc;exports.NavigationItem=E_;exports.NavigationMenu=C_;exports.Pagination=Ow;exports.PaginationContent=Iw;exports.PaginationEllipsis=S_;exports.PaginationItem=La;exports.PaginationLink=zc;exports.PaginationNext=R_;exports.PaginationPrevious=k_;exports.Progress=P_;exports.RadioButton=LPe;exports.RadioGroup=Tw;exports.RadioGroupItem=Ff;exports.SelectField=lG;exports.Separator=pw;exports.Switch=s2;exports.Table=Dw;exports.TableBody=jw;exports.TableCaption=l2;exports.TableCell=$f;exports.TableFooter=a2;exports.TableHead=Vw;exports.TableHeader=Lw;exports.TableRow=Yl;exports.Tabs=jX;exports.TabsContent=R2;exports.TabsList=C2;exports.TabsTrigger=k2;exports.Textarea=Cm;exports.TextareaField=jPe;exports.Tooltip=wZ;exports.TooltipArrow=CZ;exports.TooltipContent=K2;exports.TooltipProvider=xZ;exports.TooltipTrigger=EZ;exports.Typography=yW;exports.badgeVariants=xf;exports.buttonVariants=Sx;exports.cn=fe;exports.getTypographyClassName=vn;exports.typographyClassNames=kx;exports.typographyVariantOptions=vW;exports.usePopupControls=kZ;
|
|
162
480
|
//# sourceMappingURL=index.cjs.map
|