burne-ui 1.6.0 → 1.6.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/README.md +3 -2
- package/dist/components/composite/AlertDialog/alertDialogAnimations.d.ts +1 -1
- package/dist/components/core/Button/buttonAnimations.d.ts +1 -1
- package/dist/components/core/Button/buttonTypes.d.ts +0 -1
- package/dist/components/core/Dialog/dialogParts.d.ts +1 -1
- package/dist/components/core/Dialog/dialogTypes.d.ts +1 -0
- package/dist/components/core/Drawer/drawerParts.d.ts +1 -1
- package/dist/components/core/Drawer/drawerTypes.d.ts +1 -0
- package/dist/components/core/Radio/radioA11y.d.ts +6 -1
- package/dist/components/core/Radio/radioTypes.d.ts +2 -0
- package/dist/components/core/utils/modalSurfaceMotion.d.ts +15 -0
- package/dist/components/core/utils/useFirstLevelInteractiveMotion.d.ts +0 -6
- package/dist/index.cjs +11 -11
- package/dist/index.js +7808 -7756
- package/dist/ui.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),d=require("react/jsx-runtime"),we=require("react-icons/io5"),kr=require("react-dom");function eh(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=eh(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function yT(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=eh(t))&&(r&&(r+=" "),r+=e);return r}const TT=(t,e)=>{const n=new Array(t.length+e.length);for(let r=0;r<t.length;r++)n[r]=t[r];for(let r=0;r<e.length;r++)n[t.length+r]=e[r];return n},AT=(t,e)=>({classGroupId:t,validator:e}),th=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),vi="-",Sm=[],ET="arbitrary..",LT=t=>{const e=IT(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return wT(i);const a=i.split(vi),c=a[0]===""&&a.length>1?1:0;return nh(a,c,e)},getConflictingClassGroupIds:(i,a)=>{if(a){const c=r[i],u=n[i];return c?u?TT(u,c):c:u||Sm}return n[i]||Sm}}},nh=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],s=n.nextPart.get(o);if(s){const u=nh(t,e+1,s);if(u)return u}const i=n.validators;if(i===null)return;const a=e===0?t.join(vi):t.slice(e).join(vi),c=i.length;for(let u=0;u<c;u++){const f=i[u];if(f.validator(a))return f.classGroupId}},wT=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),r=e.slice(0,n);return r?ET+r:void 0})(),IT=t=>{const{theme:e,classGroups:n}=t;return RT(n,e)},RT=(t,e)=>{const n=th();for(const r in t){const o=t[r];jc(o,n,r,e)}return n},jc=(t,e,n,r)=>{const o=t.length;for(let s=0;s<o;s++){const i=t[s];NT(i,e,n,r)}},NT=(t,e,n,r)=>{if(typeof t=="string"){DT(t,e,n);return}if(typeof t=="function"){kT(t,e,n,r);return}OT(t,e,n,r)},DT=(t,e,n)=>{const r=t===""?e:rh(e,t);r.classGroupId=n},kT=(t,e,n,r)=>{if(PT(t)){jc(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(AT(n,t))},OT=(t,e,n,r)=>{const o=Object.entries(t),s=o.length;for(let i=0;i<s;i++){const[a,c]=o[i];jc(c,rh(e,a),n,r)}},rh=(t,e)=>{let n=t;const r=e.split(vi),o=r.length;for(let s=0;s<o;s++){const i=r[s];let a=n.nextPart.get(i);a||(a=th(),n.nextPart.set(i,a)),n=a}return n},PT=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,BT=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null);const o=(s,i)=>{n[s]=i,e++,e>t&&(e=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)}}},gl="!",vm=":",jT=[],ym=(t,e,n,r,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),MT=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=o=>{const s=[];let i=0,a=0,c=0,u;const f=o.length;for(let h=0;h<f;h++){const x=o[h];if(i===0&&a===0){if(x===vm){s.push(o.slice(c,h)),c=h+1;continue}if(x==="/"){u=h;continue}}x==="["?i++:x==="]"?i--:x==="("?a++:x===")"&&a--}const m=s.length===0?o:o.slice(c);let p=m,b=!1;m.endsWith(gl)?(p=m.slice(0,-1),b=!0):m.startsWith(gl)&&(p=m.slice(1),b=!0);const g=u&&u>c?u-c:void 0;return ym(s,b,p,g)};if(e){const o=e+vm,s=r;r=i=>i.startsWith(o)?s(i.slice(o.length)):ym(jT,!1,i,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},FT=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const i=n[s],a=i[0]==="[",c=e.has(i);a||c?(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}},GT=t=>({cache:BT(t.cacheSize),parseClassName:MT(t),sortModifiers:FT(t),postfixLookupClassGroupIds:HT(t),...LT(t)}),HT=t=>{const e=Object.create(null),n=t.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)e[n[r]]=!0;return e},zT=/\s+/,VT=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s,postfixLookupClassGroupIds:i}=e,a=[],c=t.trim().split(zT);let u="";for(let f=c.length-1;f>=0;f-=1){const m=c[f],{isExternal:p,modifiers:b,hasImportantModifier:g,baseClassName:h,maybePostfixModifierPosition:x}=n(m);if(p){u=m+(u.length>0?" "+u:u);continue}let C=!!x,_;if(C){const E=h.substring(0,x);_=r(E);const T=_&&i[_]?r(h):void 0;T&&T!==_&&(_=T,C=!1)}else _=r(h);if(!_){if(!C){u=m+(u.length>0?" "+u:u);continue}if(_=r(h),!_){u=m+(u.length>0?" "+u:u);continue}C=!1}const S=b.length===0?"":b.length===1?b[0]:s(b).join(":"),y=g?S+gl:S,v=y+_;if(a.indexOf(v)>-1)continue;a.push(v);const A=o(_,C);for(let E=0;E<A.length;++E){const T=A[E];a.push(y+T)}u=m+(u.length>0?" "+u:u)}return u},UT=(...t)=>{let e=0,n,r,o="";for(;e<t.length;)(n=t[e++])&&(r=oh(n))&&(o&&(o+=" "),o+=r);return o},oh=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=oh(t[r]))&&(n&&(n+=" "),n+=e);return n},Tm=(t,...e)=>{let n,r,o,s;const i=c=>{const u=e.reduce((f,m)=>m(f),t());return n=GT(u),r=n.cache.get,o=n.cache.set,s=a,a(c)},a=c=>{const u=r(c);if(u)return u;const f=VT(c,n);return o(c,f),f};return s=i,(...c)=>s(UT(...c))},$T=[],$e=t=>{const e=n=>n[t]||$T;return e.isThemeGetter=!0,e},sh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ih=/^\((?:(\w[\w-]*):)?(.+)\)$/i,WT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,XT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,YT=/\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$/,KT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,qT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ZT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Un=t=>WT.test(t),be=t=>!!t&&!Number.isNaN(Number(t)),cn=t=>!!t&&Number.isInteger(Number(t)),Qa=t=>t.endsWith("%")&&be(t.slice(0,-1)),Tn=t=>XT.test(t),ah=()=>!0,QT=t=>YT.test(t)&&!KT.test(t),Mc=()=>!1,JT=t=>qT.test(t),eA=t=>ZT.test(t),tA=t=>!Q(t)&&!J(t),nA=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),rA=t=>or(t,uh,Mc),Q=t=>sh.test(t),br=t=>or(t,dh,QT),Am=t=>or(t,dA,be),oA=t=>or(t,mh,ah),sA=t=>or(t,fh,Mc),Em=t=>or(t,lh,Mc),iA=t=>or(t,ch,eA),Ys=t=>or(t,ph,JT),J=t=>ih.test(t),Jo=t=>Or(t,dh),aA=t=>Or(t,fh),Lm=t=>Or(t,lh),lA=t=>Or(t,uh),cA=t=>Or(t,ch),Ks=t=>Or(t,ph,!0),uA=t=>Or(t,mh,!0),or=(t,e,n)=>{const r=sh.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},Or=(t,e,n=!1)=>{const r=ih.exec(t);return r?r[1]?e(r[1]):n:!1},lh=t=>t==="position"||t==="percentage",ch=t=>t==="image"||t==="url",uh=t=>t==="length"||t==="size"||t==="bg-size",dh=t=>t==="length",dA=t=>t==="number",fh=t=>t==="family-name",mh=t=>t==="number"||t==="weight",ph=t=>t==="shadow",wm=()=>{const t=$e("color"),e=$e("font"),n=$e("text"),r=$e("font-weight"),o=$e("tracking"),s=$e("leading"),i=$e("breakpoint"),a=$e("container"),c=$e("spacing"),u=$e("radius"),f=$e("shadow"),m=$e("inset-shadow"),p=$e("text-shadow"),b=$e("drop-shadow"),g=$e("blur"),h=$e("perspective"),x=$e("aspect"),C=$e("ease"),_=$e("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...y(),J,Q],A=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],T=()=>[J,Q,c],L=()=>[Un,"full","auto",...T()],w=()=>[cn,"none","subgrid",J,Q],I=()=>["auto",{span:["full",cn,J,Q]},cn,J,Q],N=()=>[cn,"auto",J,Q],k=()=>["auto","min","max","fr",J,Q],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],P=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...T()],D=()=>[Un,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],O=()=>[Un,"screen","full","dvw","lvw","svw","min","max","fit",...T()],F=()=>[Un,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],B=()=>[t,J,Q],$=()=>[...y(),Lm,Em,{position:[J,Q]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",lA,rA,{size:[J,Q]}],z=()=>[Qa,Jo,br],H=()=>["","none","full",u,J,Q],oe=()=>["",be,Jo,br],pe=()=>["solid","dashed","dotted","double"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>[be,Qa,Lm,Em],ne=()=>["","none",g,J,Q],me=()=>["none",be,J,Q],re=()=>["none",be,J,Q],xe=()=>[be,J,Q],te=()=>[Un,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Tn],breakpoint:[Tn],color:[ah],container:[Tn],"drop-shadow":[Tn],ease:["in","out","in-out"],font:[tA],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Tn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Tn],shadow:[Tn],spacing:["px",be],text:[Tn],"text-shadow":[Tn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Un,Q,J,x]}],container:["container"],"container-type":[{"@container":["","normal","size",J,Q]}],"container-named":[nA],columns:[{columns:[be,Q,J,a]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"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:v()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{"inset-s":L(),start:L()}],end:[{"inset-e":L(),end:L()}],"inset-bs":[{"inset-bs":L()}],"inset-be":[{"inset-be":L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[cn,"auto",J,Q]}],basis:[{basis:[Un,"full","auto",a,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[be,Un,"auto","initial","none",Q]}],grow:[{grow:["",be,J,Q]}],shrink:[{shrink:["",be,J,Q]}],order:[{order:[cn,"first","last","none",J,Q]}],"grid-cols":[{"grid-cols":w()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":w()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...P(),"normal"]}],"justify-self":[{"justify-self":["auto",...P()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...P(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...P(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...P(),"baseline"]}],"place-self":[{"place-self":["auto",...P()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pbs:[{pbs:T()}],pbe:[{pbe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mbs:[{mbs:G()}],mbe:[{mbe:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],"inline-size":[{inline:["auto",...O()]}],"min-inline-size":[{"min-inline":["auto",...O()]}],"max-inline-size":[{"max-inline":["none",...O()]}],"block-size":[{block:["auto",...F()]}],"min-block-size":[{"min-block":["auto",...F()]}],"max-block-size":[{"max-block":["none",...F()]}],w:[{w:[a,"screen",...D()]}],"min-w":[{"min-w":[a,"screen","none",...D()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...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,Jo,br]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,uA,oA]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Qa,Q]}],"font-family":[{font:[aA,sA,e]}],"font-features":[{"font-features":[Q]}],"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,J,Q]}],"line-clamp":[{"line-clamp":[be,"none",J,Am]}],leading:[{leading:[s,...T()]}],"list-image":[{"list-image":["none",J,Q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",J,Q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[be,"from-font","auto",J,br]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[be,"auto",J,Q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"tab-size":[{tab:[cn,J,Q]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J,Q]}],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",J,Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},cn,J,Q],radial:["",J,Q],conic:[cn,J,Q]},cA,iA]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-bs":[{"border-bs":oe()}],"border-w-be":[{"border-be":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...pe(),"hidden","none"]}],"divide-style":[{divide:[...pe(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-bs":[{"border-bs":B()}],"border-color-be":[{"border-be":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[be,J,Q]}],"outline-w":[{outline:["",be,Jo,br]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",f,Ks,Ys]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",m,Ks,Ys]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[be,br]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",p,Ks,Ys]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[be,J,Q]}],"mix-blend":[{"mix-blend":[...ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ce()}],"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":[be]}],"mask-image-linear-from-pos":[{"mask-linear-from":Y()}],"mask-image-linear-to-pos":[{"mask-linear-to":Y()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":Y()}],"mask-image-t-to-pos":[{"mask-t-to":Y()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":Y()}],"mask-image-r-to-pos":[{"mask-r-to":Y()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":Y()}],"mask-image-b-to-pos":[{"mask-b-to":Y()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":Y()}],"mask-image-l-to-pos":[{"mask-l-to":Y()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":Y()}],"mask-image-x-to-pos":[{"mask-x-to":Y()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":Y()}],"mask-image-y-to-pos":[{"mask-y-to":Y()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[J,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":Y()}],"mask-image-radial-to-pos":[{"mask-radial-to":Y()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"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":y()}],"mask-image-conic-pos":[{"mask-conic":[be]}],"mask-image-conic-from-pos":[{"mask-conic-from":Y()}],"mask-image-conic-to-pos":[{"mask-conic-to":Y()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",J,Q]}],filter:[{filter:["","none",J,Q]}],blur:[{blur:ne()}],brightness:[{brightness:[be,J,Q]}],contrast:[{contrast:[be,J,Q]}],"drop-shadow":[{"drop-shadow":["","none",b,Ks,Ys]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",be,J,Q]}],"hue-rotate":[{"hue-rotate":[be,J,Q]}],invert:[{invert:["",be,J,Q]}],saturate:[{saturate:[be,J,Q]}],sepia:[{sepia:["",be,J,Q]}],"backdrop-filter":[{"backdrop-filter":["","none",J,Q]}],"backdrop-blur":[{"backdrop-blur":ne()}],"backdrop-brightness":[{"backdrop-brightness":[be,J,Q]}],"backdrop-contrast":[{"backdrop-contrast":[be,J,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",be,J,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[be,J,Q]}],"backdrop-invert":[{"backdrop-invert":["",be,J,Q]}],"backdrop-opacity":[{"backdrop-opacity":[be,J,Q]}],"backdrop-saturate":[{"backdrop-saturate":[be,J,Q]}],"backdrop-sepia":[{"backdrop-sepia":["",be,J,Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",J,Q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[be,"initial",J,Q]}],ease:[{ease:["linear","initial",C,J,Q]}],delay:[{delay:[be,J,Q]}],animate:[{animate:["none",_,J,Q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,J,Q]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:re()}],"scale-x":[{"scale-x":re()}],"scale-y":[{"scale-y":re()}],"scale-z":[{"scale-z":re()}],"scale-3d":["scale-3d"],skew:[{skew:xe()}],"skew-x":[{"skew-x":xe()}],"skew-y":[{"skew-y":xe()}],transform:[{transform:[J,Q,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:te()}],"translate-x":[{"translate-x":te()}],"translate-y":[{"translate-y":te()}],"translate-z":[{"translate-z":te()}],"translate-none":["translate-none"],zoom:[{zoom:[cn,J,Q]}],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"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",J,Q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":B()}],"scrollbar-track-color":[{"scrollbar-track":B()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mbs":[{"scroll-mbs":T()}],"scroll-mbe":[{"scroll-mbe":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pbs":[{"scroll-pbs":T()}],"scroll-pbe":[{"scroll-pbe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",J,Q]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[be,Jo,br,Am]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},fA=(t,{cacheSize:e,prefix:n,experimentalParseClassName:r,extend:o={},override:s={}})=>(io(t,"cacheSize",e),io(t,"prefix",n),io(t,"experimentalParseClassName",r),qs(t.theme,s.theme),qs(t.classGroups,s.classGroups),qs(t.conflictingClassGroups,s.conflictingClassGroups),qs(t.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),io(t,"postfixLookupClassGroups",s.postfixLookupClassGroups),io(t,"orderSensitiveModifiers",s.orderSensitiveModifiers),Zs(t.theme,o.theme),Zs(t.classGroups,o.classGroups),Zs(t.conflictingClassGroups,o.conflictingClassGroups),Zs(t.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),bl(t,o,"postfixLookupClassGroups"),bl(t,o,"orderSensitiveModifiers"),t),io=(t,e,n)=>{n!==void 0&&(t[e]=n)},qs=(t,e)=>{if(e)for(const n in e)io(t,n,e[n])},Zs=(t,e)=>{if(e)for(const n in e)bl(t,e,n)},bl=(t,e,n)=>{const r=e[n];r!==void 0&&(t[n]=t[n]?t[n].concat(r):r)},mA=(t,...e)=>typeof t=="function"?Tm(wm,t,...e):Tm(()=>fA(wm(),t),...e),pA=["none","base","mid","large"],Cs={base:"--shadow-base",mid:"--shadow-mid",large:"--shadow-large"};function hA(t){return`var(--shadow-${t})`}const An={size:"--toast-scrim-size",density:"--toast-scrim-density",height:"--toast-scrim-height",insetX:"--toast-scrim-inset-x",offsetY:"--toast-scrim-offset-y",gradientTop:"--toast-scrim-gradient-top",gradientBottom:"--toast-scrim-gradient-bottom",mask:"--toast-scrim-mask"};function En(t){return`var(${t})`}const gA={size:1,density:1},bA={namespace:"burne",tailwindBridge:{"font-sans":"font-family-sans","font-mono":"font-family-mono","spacing-xsmall":"space-xsmall","spacing-small":"space-small","spacing-base":"space-base","spacing-plus":"space-plus","spacing-mid":"space-mid","spacing-large":"space-large","spacing-xlarge":"space-xlarge","radius-xsmall":"radius-value-xsmall","radius-small":"radius-value-small","radius-base":"radius-value-base","radius-mid":"radius-value-mid","radius-large":"radius-value-large","color-background":"color-background","color-foreground":"color-foreground","color-muted":"color-muted","color-surface":"color-surface","color-border":"color-border","border-token":"color-border","color-primary":"color-primary","color-primary-foreground":"color-primary-foreground","color-primary-hover":"color-primary-hover","color-default-hover":"color-default-hover","color-primary-tint":"color-primary-tint","color-primary-tint-strong":"color-primary-tint-strong","color-indicator":"color-indicator","color-indicator-foreground":"color-indicator-foreground","color-secondary":"color-secondary","color-secondary-foreground":"color-secondary-foreground","color-secondary-hover":"color-secondary-hover","color-tertiary":"color-tertiary","color-tertiary-foreground":"color-tertiary-foreground","color-tertiary-hover":"color-tertiary-hover","color-focus-ring":"color-focus-ring","color-converge-ripple-primary-fill":"color-converge-ripple-primary-fill","color-converge-ripple-neutral":"color-converge-ripple-neutral","color-converge-ripple-neutral-muted":"color-converge-ripple-neutral-muted","color-converge-ripple-danger":"color-converge-ripple-danger","color-converge-ripple-info":"color-converge-ripple-info","color-converge-ripple-success":"color-converge-ripple-success","color-converge-ripple-warning":"color-converge-ripple-warning","color-danger":"color-danger","color-danger-foreground":"color-danger-foreground","color-danger-fill-hover":"color-danger-fill-hover","color-success":"color-success","color-success-foreground":"color-success-foreground","color-success-fill-hover":"color-success-fill-hover","color-info":"color-info","color-info-foreground":"color-info-foreground","color-info-fill-hover":"color-info-fill-hover","color-warning":"color-warning","color-warning-foreground":"color-warning-foreground","color-warning-fill-hover":"color-warning-fill-hover","color-surface-tint-danger":"color-surface-tint-danger","color-surface-tint-success":"color-surface-tint-success","color-surface-tint-info":"color-surface-tint-info","color-surface-tint-warning":"color-surface-tint-warning","color-surface-tint-danger-hover":"color-surface-tint-danger-hover","color-surface-tint-success-hover":"color-surface-tint-success-hover","color-surface-tint-info-hover":"color-surface-tint-info-hover","color-surface-tint-warning-hover":"color-surface-tint-warning-hover","icon-xsmall":"icon-size-xsmall","icon-small":"icon-size-small","icon-base":"icon-size-base","icon-mid":"icon-size-mid","icon-large":"icon-size-large","icon-xlarge":"icon-size-xlarge","icon-2xlarge":"icon-size-2xlarge"}},xA=["xsmall","small","base","plus","mid","large","xlarge"],CA=["xsmall","small","base","mid","large"],_A=["small","mid","tools","accent-header","header-1","header-2","large"],SA=mA({extend:{theme:{spacing:[...xA],radius:[...CA],text:[..._A]}}});function R(...t){return SA(yT(t))}const vA=["small","base","mid","large"],le={small:{minWButton:"min-w-button-small",padX:"px-base",padY:"py-xsmall",affixPadX:"px-base",affixText:"text-base",controlPad:"px-base py-xsmall text-base",controlText:"small",icon:"icon-small",chevronIcon:"icon-small",spinnerIcon:"icon-small",spinnerBorder:"border-2"},base:{minWButton:"min-w-button-base",padX:"px-plus",padY:"py-small",affixPadX:"px-plus",affixText:"text-base",controlPad:"px-plus py-small text-base",controlText:"base",icon:"icon-base",chevronIcon:"icon-base",spinnerIcon:"icon-base",spinnerBorder:"border-2"},mid:{minWButton:"min-w-button-mid",padX:"px-plus",padY:"py-base",affixPadX:"px-mid",affixText:"text-mid",controlPad:"px-mid py-base text-mid",controlText:"mid",icon:"icon-large",chevronIcon:"icon-large",spinnerIcon:"icon-large",spinnerBorder:"border-2"},large:{minWButton:"min-w-button-large",padX:"px-large",padY:"py-plus",affixPadX:"px-large",affixText:"text-mid",controlPad:"px-large py-plus text-mid",controlText:"mid",icon:"icon-large",chevronIcon:"icon-large",spinnerIcon:"icon-large",spinnerBorder:"border-[2.5px]"}},yA={small:"--control-height-small",base:"--control-height-base",mid:"--control-height-mid",large:"--control-height-large"},TA={small:1.75,base:2.2,mid:2.5,large:3},Im=new Map;function AA(t){if(typeof document>"u")return null;const e=Im.get(t);if(e!=null)return e;try{const n=document.createElement("div");n.style.position="absolute",n.style.visibility="hidden",n.style.height=`var(${yA[t]})`,document.body.appendChild(n);const r=n.getBoundingClientRect().height;if(document.body.removeChild(n),r>0)return Im.set(t,r),r}catch{}return null}function Fc(t,e=16){return AA(t)??e*TA[t]}function In(t){const e=le[t];return R("flex self-stretch shrink-0 items-center text-muted",e.affixPadX,e.affixText)}const EA={small:"min-w-control-small",base:"min-w-control-base",mid:"min-w-control-mid",large:"min-w-control-large"};function hh(t){return EA[t]}const xt={danger:"text-danger",success:"text-success",info:"text-info",warning:"text-warning"},Gc={danger:"bg-surface-tint-danger border-token",success:"bg-surface-tint-success border-token",info:"bg-surface-tint-info border-token",warning:"bg-surface-tint-warning border-token"},gh={danger:"bg-danger border border-transparent text-danger-foreground",success:"bg-success border border-transparent text-success-foreground",info:"bg-info border border-transparent text-info-foreground",warning:"bg-warning border border-transparent text-warning-foreground"},LA={danger:"text-danger-foreground",success:"text-success-foreground",info:"text-info-foreground",warning:"text-warning-foreground"},Hc={danger:"border-token-danger",success:"border-token-success",info:"border-token-info",warning:"border-token-warning"},Io="surface-color-transition motion-reduce:transition-none",gn="text-color-transition motion-reduce:transition-none",wA={default:{"focus-visible":"hover:bg-default-hover focus-visible:bg-default-hover","focus-within":"hover:bg-default-hover focus-within:bg-default-hover"},primary:{"focus-visible":"hover:bg-primary-hover focus-visible:bg-primary-hover","focus-within":"hover:bg-primary-hover focus-within:bg-primary-hover"},secondary:{"focus-visible":"hover:bg-secondary-hover focus-visible:bg-secondary-hover","focus-within":"hover:bg-secondary-hover focus-within:bg-secondary-hover"},danger:{"focus-visible":"hover:bg-surface-tint-danger focus-visible:bg-surface-tint-danger","focus-within":"hover:bg-surface-tint-danger focus-within:bg-surface-tint-danger"},warning:{"focus-visible":"hover:bg-surface-tint-warning focus-visible:bg-surface-tint-warning","focus-within":"hover:bg-surface-tint-warning focus-within:bg-surface-tint-warning"},info:{"focus-visible":"hover:bg-surface-tint-info focus-visible:bg-surface-tint-info","focus-within":"hover:bg-surface-tint-info focus-within:bg-surface-tint-info"},success:{"focus-visible":"hover:bg-surface-tint-success focus-visible:bg-surface-tint-success","focus-within":"hover:bg-surface-tint-success focus-within:bg-surface-tint-success"},"danger-tint-hover":{"focus-visible":"hover:bg-surface-tint-danger-hover focus-visible:bg-surface-tint-danger-hover","focus-within":"hover:bg-surface-tint-danger-hover focus-within:bg-surface-tint-danger-hover"},"warning-tint-hover":{"focus-visible":"hover:bg-surface-tint-warning-hover focus-visible:bg-surface-tint-warning-hover","focus-within":"hover:bg-surface-tint-warning-hover focus-within:bg-surface-tint-warning-hover"},"info-tint-hover":{"focus-visible":"hover:bg-surface-tint-info-hover focus-visible:bg-surface-tint-info-hover","focus-within":"hover:bg-surface-tint-info-hover focus-within:bg-surface-tint-info-hover"},"success-tint-hover":{"focus-visible":"hover:bg-surface-tint-success-hover focus-visible:bg-surface-tint-success-hover","focus-within":"hover:bg-surface-tint-success-hover focus-within:bg-surface-tint-success-hover"},"danger-fill":{"focus-visible":"hover:bg-danger-fill-hover focus-visible:bg-danger-fill-hover","focus-within":"hover:bg-danger-fill-hover focus-within:bg-danger-fill-hover"},"warning-fill":{"focus-visible":"hover:bg-warning-fill-hover focus-visible:bg-warning-fill-hover","focus-within":"hover:bg-warning-fill-hover focus-within:bg-warning-fill-hover"},"info-fill":{"focus-visible":"hover:bg-info-fill-hover focus-visible:bg-info-fill-hover","focus-within":"hover:bg-info-fill-hover focus-within:bg-info-fill-hover"},"success-fill":{"focus-visible":"hover:bg-success-fill-hover focus-visible:bg-success-fill-hover","focus-within":"hover:bg-success-fill-hover focus-within:bg-success-fill-hover"}};function bh(t="default",e="focus-visible"){return wA[t][e]}function et(t="default"){return R(Io,bh(t,"focus-visible"))}function Ln(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function xh(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),d=require("react/jsx-runtime"),Re=require("react-icons/io5"),kr=require("react-dom");function nh(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=nh(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function AT(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=nh(t))&&(r&&(r+=" "),r+=e);return r}const ET=(t,e)=>{const n=new Array(t.length+e.length);for(let r=0;r<t.length;r++)n[r]=t[r];for(let r=0;r<e.length;r++)n[t.length+r]=e[r];return n},LT=(t,e)=>({classGroupId:t,validator:e}),rh=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),vi="-",ym=[],wT="arbitrary..",RT=t=>{const e=NT(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return IT(i);const a=i.split(vi),c=a[0]===""&&a.length>1?1:0;return oh(a,c,e)},getConflictingClassGroupIds:(i,a)=>{if(a){const c=r[i],u=n[i];return c?u?ET(u,c):c:u||ym}return n[i]||ym}}},oh=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],s=n.nextPart.get(o);if(s){const u=oh(t,e+1,s);if(u)return u}const i=n.validators;if(i===null)return;const a=e===0?t.join(vi):t.slice(e).join(vi),c=i.length;for(let u=0;u<c;u++){const f=i[u];if(f.validator(a))return f.classGroupId}},IT=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),r=e.slice(0,n);return r?wT+r:void 0})(),NT=t=>{const{theme:e,classGroups:n}=t;return DT(n,e)},DT=(t,e)=>{const n=rh();for(const r in t){const o=t[r];jc(o,n,r,e)}return n},jc=(t,e,n,r)=>{const o=t.length;for(let s=0;s<o;s++){const i=t[s];kT(i,e,n,r)}},kT=(t,e,n,r)=>{if(typeof t=="string"){OT(t,e,n);return}if(typeof t=="function"){PT(t,e,n,r);return}BT(t,e,n,r)},OT=(t,e,n)=>{const r=t===""?e:sh(e,t);r.classGroupId=n},PT=(t,e,n,r)=>{if(jT(t)){jc(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(LT(n,t))},BT=(t,e,n,r)=>{const o=Object.entries(t),s=o.length;for(let i=0;i<s;i++){const[a,c]=o[i];jc(c,sh(e,a),n,r)}},sh=(t,e)=>{let n=t;const r=e.split(vi),o=r.length;for(let s=0;s<o;s++){const i=r[s];let a=n.nextPart.get(i);a||(a=rh(),n.nextPart.set(i,a)),n=a}return n},jT=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,MT=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null);const o=(s,i)=>{n[s]=i,e++,e>t&&(e=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)}}},gl="!",Tm=":",FT=[],Am=(t,e,n,r,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),GT=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=o=>{const s=[];let i=0,a=0,c=0,u;const f=o.length;for(let h=0;h<f;h++){const x=o[h];if(i===0&&a===0){if(x===Tm){s.push(o.slice(c,h)),c=h+1;continue}if(x==="/"){u=h;continue}}x==="["?i++:x==="]"?i--:x==="("?a++:x===")"&&a--}const m=s.length===0?o:o.slice(c);let p=m,b=!1;m.endsWith(gl)?(p=m.slice(0,-1),b=!0):m.startsWith(gl)&&(p=m.slice(1),b=!0);const g=u&&u>c?u-c:void 0;return Am(s,b,p,g)};if(e){const o=e+Tm,s=r;r=i=>i.startsWith(o)?s(i.slice(o.length)):Am(FT,!1,i,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},HT=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const i=n[s],a=i[0]==="[",c=e.has(i);a||c?(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}},zT=t=>({cache:MT(t.cacheSize),parseClassName:GT(t),sortModifiers:HT(t),postfixLookupClassGroupIds:VT(t),...RT(t)}),VT=t=>{const e=Object.create(null),n=t.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)e[n[r]]=!0;return e},UT=/\s+/,$T=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s,postfixLookupClassGroupIds:i}=e,a=[],c=t.trim().split(UT);let u="";for(let f=c.length-1;f>=0;f-=1){const m=c[f],{isExternal:p,modifiers:b,hasImportantModifier:g,baseClassName:h,maybePostfixModifierPosition:x}=n(m);if(p){u=m+(u.length>0?" "+u:u);continue}let C=!!x,_;if(C){const E=h.substring(0,x);_=r(E);const T=_&&i[_]?r(h):void 0;T&&T!==_&&(_=T,C=!1)}else _=r(h);if(!_){if(!C){u=m+(u.length>0?" "+u:u);continue}if(_=r(h),!_){u=m+(u.length>0?" "+u:u);continue}C=!1}const v=b.length===0?"":b.length===1?b[0]:s(b).join(":"),y=g?v+gl:v,S=y+_;if(a.indexOf(S)>-1)continue;a.push(S);const A=o(_,C);for(let E=0;E<A.length;++E){const T=A[E];a.push(y+T)}u=m+(u.length>0?" "+u:u)}return u},WT=(...t)=>{let e=0,n,r,o="";for(;e<t.length;)(n=t[e++])&&(r=ih(n))&&(o&&(o+=" "),o+=r);return o},ih=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=ih(t[r]))&&(n&&(n+=" "),n+=e);return n},Em=(t,...e)=>{let n,r,o,s;const i=c=>{const u=e.reduce((f,m)=>m(f),t());return n=zT(u),r=n.cache.get,o=n.cache.set,s=a,a(c)},a=c=>{const u=r(c);if(u)return u;const f=$T(c,n);return o(c,f),f};return s=i,(...c)=>s(WT(...c))},XT=[],We=t=>{const e=n=>n[t]||XT;return e.isThemeGetter=!0,e},ah=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,lh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,YT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,KT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qT=/\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$/,ZT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,QT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,JT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Un=t=>YT.test(t),ge=t=>!!t&&!Number.isNaN(Number(t)),cn=t=>!!t&&Number.isInteger(Number(t)),Qa=t=>t.endsWith("%")&&ge(t.slice(0,-1)),Tn=t=>KT.test(t),ch=()=>!0,eA=t=>qT.test(t)&&!ZT.test(t),Mc=()=>!1,tA=t=>QT.test(t),nA=t=>JT.test(t),rA=t=>!Q(t)&&!J(t),oA=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),sA=t=>or(t,fh,Mc),Q=t=>ah.test(t),br=t=>or(t,mh,eA),Lm=t=>or(t,mA,ge),iA=t=>or(t,hh,ch),aA=t=>or(t,ph,Mc),wm=t=>or(t,uh,Mc),lA=t=>or(t,dh,nA),Ys=t=>or(t,gh,tA),J=t=>lh.test(t),Jo=t=>Or(t,mh),cA=t=>Or(t,ph),Rm=t=>Or(t,uh),uA=t=>Or(t,fh),dA=t=>Or(t,dh),Ks=t=>Or(t,gh,!0),fA=t=>Or(t,hh,!0),or=(t,e,n)=>{const r=ah.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},Or=(t,e,n=!1)=>{const r=lh.exec(t);return r?r[1]?e(r[1]):n:!1},uh=t=>t==="position"||t==="percentage",dh=t=>t==="image"||t==="url",fh=t=>t==="length"||t==="size"||t==="bg-size",mh=t=>t==="length",mA=t=>t==="number",ph=t=>t==="family-name",hh=t=>t==="number"||t==="weight",gh=t=>t==="shadow",Im=()=>{const t=We("color"),e=We("font"),n=We("text"),r=We("font-weight"),o=We("tracking"),s=We("leading"),i=We("breakpoint"),a=We("container"),c=We("spacing"),u=We("radius"),f=We("shadow"),m=We("inset-shadow"),p=We("text-shadow"),b=We("drop-shadow"),g=We("blur"),h=We("perspective"),x=We("aspect"),C=We("ease"),_=We("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...y(),J,Q],A=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],T=()=>[J,Q,c],L=()=>[Un,"full","auto",...T()],w=()=>[cn,"none","subgrid",J,Q],R=()=>["auto",{span:["full",cn,J,Q]},cn,J,Q],N=()=>[cn,"auto",J,Q],D=()=>["auto","min","max","fr",J,Q],P=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],j=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...T()],k=()=>[Un,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],O=()=>[Un,"screen","full","dvw","lvw","svw","min","max","fit",...T()],M=()=>[Un,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],B=()=>[t,J,Q],U=()=>[...y(),Rm,wm,{position:[J,Q]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",uA,sA,{size:[J,Q]}],V=()=>[Qa,Jo,br],H=()=>["","none","full",u,J,Q],re=()=>["",ge,Jo,br],me=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>[ge,Qa,Rm,wm],te=()=>["","none",g,J,Q],de=()=>["none",ge,J,Q],oe=()=>["none",ge,J,Q],xe=()=>[ge,J,Q],ne=()=>[Un,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Tn],breakpoint:[Tn],color:[ch],container:[Tn],"drop-shadow":[Tn],ease:["in","out","in-out"],font:[rA],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Tn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Tn],shadow:[Tn],spacing:["px",ge],text:[Tn],"text-shadow":[Tn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Un,Q,J,x]}],container:["container"],"container-type":[{"@container":["","normal","size",J,Q]}],"container-named":[oA],columns:[{columns:[ge,Q,J,a]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"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:S()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{"inset-s":L(),start:L()}],end:[{"inset-e":L(),end:L()}],"inset-bs":[{"inset-bs":L()}],"inset-be":[{"inset-be":L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[cn,"auto",J,Q]}],basis:[{basis:[Un,"full","auto",a,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ge,Un,"auto","initial","none",Q]}],grow:[{grow:["",ge,J,Q]}],shrink:[{shrink:["",ge,J,Q]}],order:[{order:[cn,"first","last","none",J,Q]}],"grid-cols":[{"grid-cols":w()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":w()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...P(),"normal"]}],"justify-items":[{"justify-items":[...j(),"normal"]}],"justify-self":[{"justify-self":["auto",...j()]}],"align-content":[{content:["normal",...P()]}],"align-items":[{items:[...j(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...j(),{baseline:["","last"]}]}],"place-content":[{"place-content":P()}],"place-items":[{"place-items":[...j(),"baseline"]}],"place-self":[{"place-self":["auto",...j()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pbs:[{pbs:T()}],pbe:[{pbe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mbs:[{mbs:G()}],mbe:[{mbe:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:k()}],"inline-size":[{inline:["auto",...O()]}],"min-inline-size":[{"min-inline":["auto",...O()]}],"max-inline-size":[{"max-inline":["none",...O()]}],"block-size":[{block:["auto",...M()]}],"min-block-size":[{"min-block":["auto",...M()]}],"max-block-size":[{"max-block":["none",...M()]}],w:[{w:[a,"screen",...k()]}],"min-w":[{"min-w":[a,"screen","none",...k()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...k()]}],h:[{h:["screen","lh",...k()]}],"min-h":[{"min-h":["screen","lh","none",...k()]}],"max-h":[{"max-h":["screen","lh",...k()]}],"font-size":[{text:["base",n,Jo,br]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,fA,iA]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Qa,Q]}],"font-family":[{font:[cA,aA,e]}],"font-features":[{"font-features":[Q]}],"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,J,Q]}],"line-clamp":[{"line-clamp":[ge,"none",J,Lm]}],leading:[{leading:[s,...T()]}],"list-image":[{"list-image":["none",J,Q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",J,Q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:[ge,"from-font","auto",J,br]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[ge,"auto",J,Q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"tab-size":[{tab:[cn,J,Q]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J,Q]}],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",J,Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:U()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},cn,J,Q],radial:["",J,Q],conic:[cn,J,Q]},dA,lA]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-bs":[{"border-bs":re()}],"border-w-be":[{"border-be":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...me(),"hidden","none"]}],"divide-style":[{divide:[...me(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-bs":[{"border-bs":B()}],"border-color-be":[{"border-be":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ge,J,Q]}],"outline-w":[{outline:["",ge,Jo,br]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",f,Ks,Ys]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",m,Ks,Ys]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[ge,br]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",p,Ks,Ys]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[ge,J,Q]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"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":[ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":Y()}],"mask-image-linear-to-pos":[{"mask-linear-to":Y()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":Y()}],"mask-image-t-to-pos":[{"mask-t-to":Y()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":Y()}],"mask-image-r-to-pos":[{"mask-r-to":Y()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":Y()}],"mask-image-b-to-pos":[{"mask-b-to":Y()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":Y()}],"mask-image-l-to-pos":[{"mask-l-to":Y()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":Y()}],"mask-image-x-to-pos":[{"mask-x-to":Y()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":Y()}],"mask-image-y-to-pos":[{"mask-y-to":Y()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[J,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":Y()}],"mask-image-radial-to-pos":[{"mask-radial-to":Y()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"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":y()}],"mask-image-conic-pos":[{"mask-conic":[ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":Y()}],"mask-image-conic-to-pos":[{"mask-conic-to":Y()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:U()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",J,Q]}],filter:[{filter:["","none",J,Q]}],blur:[{blur:te()}],brightness:[{brightness:[ge,J,Q]}],contrast:[{contrast:[ge,J,Q]}],"drop-shadow":[{"drop-shadow":["","none",b,Ks,Ys]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",ge,J,Q]}],"hue-rotate":[{"hue-rotate":[ge,J,Q]}],invert:[{invert:["",ge,J,Q]}],saturate:[{saturate:[ge,J,Q]}],sepia:[{sepia:["",ge,J,Q]}],"backdrop-filter":[{"backdrop-filter":["","none",J,Q]}],"backdrop-blur":[{"backdrop-blur":te()}],"backdrop-brightness":[{"backdrop-brightness":[ge,J,Q]}],"backdrop-contrast":[{"backdrop-contrast":[ge,J,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ge,J,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ge,J,Q]}],"backdrop-invert":[{"backdrop-invert":["",ge,J,Q]}],"backdrop-opacity":[{"backdrop-opacity":[ge,J,Q]}],"backdrop-saturate":[{"backdrop-saturate":[ge,J,Q]}],"backdrop-sepia":[{"backdrop-sepia":["",ge,J,Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",J,Q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ge,"initial",J,Q]}],ease:[{ease:["linear","initial",C,J,Q]}],delay:[{delay:[ge,J,Q]}],animate:[{animate:["none",_,J,Q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,J,Q]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:xe()}],"skew-x":[{"skew-x":xe()}],"skew-y":[{"skew-y":xe()}],transform:[{transform:[J,Q,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ne()}],"translate-x":[{"translate-x":ne()}],"translate-y":[{"translate-y":ne()}],"translate-z":[{"translate-z":ne()}],"translate-none":["translate-none"],zoom:[{zoom:[cn,J,Q]}],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"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",J,Q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":B()}],"scrollbar-track-color":[{"scrollbar-track":B()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mbs":[{"scroll-mbs":T()}],"scroll-mbe":[{"scroll-mbe":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pbs":[{"scroll-pbs":T()}],"scroll-pbe":[{"scroll-pbe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",J,Q]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[ge,Jo,br,Lm]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},pA=(t,{cacheSize:e,prefix:n,experimentalParseClassName:r,extend:o={},override:s={}})=>(io(t,"cacheSize",e),io(t,"prefix",n),io(t,"experimentalParseClassName",r),qs(t.theme,s.theme),qs(t.classGroups,s.classGroups),qs(t.conflictingClassGroups,s.conflictingClassGroups),qs(t.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),io(t,"postfixLookupClassGroups",s.postfixLookupClassGroups),io(t,"orderSensitiveModifiers",s.orderSensitiveModifiers),Zs(t.theme,o.theme),Zs(t.classGroups,o.classGroups),Zs(t.conflictingClassGroups,o.conflictingClassGroups),Zs(t.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),bl(t,o,"postfixLookupClassGroups"),bl(t,o,"orderSensitiveModifiers"),t),io=(t,e,n)=>{n!==void 0&&(t[e]=n)},qs=(t,e)=>{if(e)for(const n in e)io(t,n,e[n])},Zs=(t,e)=>{if(e)for(const n in e)bl(t,e,n)},bl=(t,e,n)=>{const r=e[n];r!==void 0&&(t[n]=t[n]?t[n].concat(r):r)},hA=(t,...e)=>typeof t=="function"?Em(Im,t,...e):Em(()=>pA(Im(),t),...e),gA=["none","base","mid","large"],Cs={base:"--shadow-base",mid:"--shadow-mid",large:"--shadow-large"};function bA(t){return`var(--shadow-${t})`}const An={size:"--toast-scrim-size",density:"--toast-scrim-density",height:"--toast-scrim-height",insetX:"--toast-scrim-inset-x",offsetY:"--toast-scrim-offset-y",gradientTop:"--toast-scrim-gradient-top",gradientBottom:"--toast-scrim-gradient-bottom",mask:"--toast-scrim-mask"};function En(t){return`var(${t})`}const xA={size:1,density:1},CA={namespace:"burne",tailwindBridge:{"font-sans":"font-family-sans","font-mono":"font-family-mono","spacing-xsmall":"space-xsmall","spacing-small":"space-small","spacing-base":"space-base","spacing-plus":"space-plus","spacing-mid":"space-mid","spacing-large":"space-large","spacing-xlarge":"space-xlarge","radius-xsmall":"radius-value-xsmall","radius-small":"radius-value-small","radius-base":"radius-value-base","radius-mid":"radius-value-mid","radius-large":"radius-value-large","color-background":"color-background","color-foreground":"color-foreground","color-muted":"color-muted","color-surface":"color-surface","color-border":"color-border","border-token":"color-border","color-primary":"color-primary","color-primary-foreground":"color-primary-foreground","color-primary-hover":"color-primary-hover","color-default-hover":"color-default-hover","color-primary-tint":"color-primary-tint","color-primary-tint-strong":"color-primary-tint-strong","color-indicator":"color-indicator","color-indicator-foreground":"color-indicator-foreground","color-secondary":"color-secondary","color-secondary-foreground":"color-secondary-foreground","color-secondary-hover":"color-secondary-hover","color-tertiary":"color-tertiary","color-tertiary-foreground":"color-tertiary-foreground","color-tertiary-hover":"color-tertiary-hover","color-focus-ring":"color-focus-ring","color-converge-ripple-primary-fill":"color-converge-ripple-primary-fill","color-converge-ripple-neutral":"color-converge-ripple-neutral","color-converge-ripple-neutral-muted":"color-converge-ripple-neutral-muted","color-converge-ripple-danger":"color-converge-ripple-danger","color-converge-ripple-info":"color-converge-ripple-info","color-converge-ripple-success":"color-converge-ripple-success","color-converge-ripple-warning":"color-converge-ripple-warning","color-danger":"color-danger","color-danger-foreground":"color-danger-foreground","color-danger-fill-hover":"color-danger-fill-hover","color-success":"color-success","color-success-foreground":"color-success-foreground","color-success-fill-hover":"color-success-fill-hover","color-info":"color-info","color-info-foreground":"color-info-foreground","color-info-fill-hover":"color-info-fill-hover","color-warning":"color-warning","color-warning-foreground":"color-warning-foreground","color-warning-fill-hover":"color-warning-fill-hover","color-surface-tint-danger":"color-surface-tint-danger","color-surface-tint-success":"color-surface-tint-success","color-surface-tint-info":"color-surface-tint-info","color-surface-tint-warning":"color-surface-tint-warning","color-surface-tint-danger-hover":"color-surface-tint-danger-hover","color-surface-tint-success-hover":"color-surface-tint-success-hover","color-surface-tint-info-hover":"color-surface-tint-info-hover","color-surface-tint-warning-hover":"color-surface-tint-warning-hover","icon-xsmall":"icon-size-xsmall","icon-small":"icon-size-small","icon-base":"icon-size-base","icon-mid":"icon-size-mid","icon-large":"icon-size-large","icon-xlarge":"icon-size-xlarge","icon-2xlarge":"icon-size-2xlarge"}},_A=["xsmall","small","base","plus","mid","large","xlarge"],SA=["xsmall","small","base","mid","large"],vA=["small","mid","tools","accent-header","header-1","header-2","large"],yA=hA({extend:{theme:{spacing:[..._A],radius:[...SA],text:[...vA]}}});function I(...t){return yA(AT(t))}const TA=["small","base","mid","large"],le={small:{minWButton:"min-w-button-small",padX:"px-base",padY:"py-xsmall",affixPadX:"px-base",affixText:"text-base",controlPad:"px-base py-xsmall text-base",controlText:"small",icon:"icon-small",chevronIcon:"icon-small",spinnerIcon:"icon-small",spinnerBorder:"border-2"},base:{minWButton:"min-w-button-base",padX:"px-plus",padY:"py-small",affixPadX:"px-plus",affixText:"text-base",controlPad:"px-plus py-small text-base",controlText:"base",icon:"icon-base",chevronIcon:"icon-base",spinnerIcon:"icon-base",spinnerBorder:"border-2"},mid:{minWButton:"min-w-button-mid",padX:"px-plus",padY:"py-base",affixPadX:"px-mid",affixText:"text-mid",controlPad:"px-mid py-base text-mid",controlText:"mid",icon:"icon-large",chevronIcon:"icon-large",spinnerIcon:"icon-large",spinnerBorder:"border-2"},large:{minWButton:"min-w-button-large",padX:"px-large",padY:"py-plus",affixPadX:"px-large",affixText:"text-mid",controlPad:"px-large py-plus text-mid",controlText:"mid",icon:"icon-large",chevronIcon:"icon-large",spinnerIcon:"icon-large",spinnerBorder:"border-[2.5px]"}},AA={small:"--control-height-small",base:"--control-height-base",mid:"--control-height-mid",large:"--control-height-large"},EA={small:1.75,base:2.2,mid:2.5,large:3},Nm=new Map;function LA(t){if(typeof document>"u")return null;const e=Nm.get(t);if(e!=null)return e;try{const n=document.createElement("div");n.style.position="absolute",n.style.visibility="hidden",n.style.height=`var(${AA[t]})`,document.body.appendChild(n);const r=n.getBoundingClientRect().height;if(document.body.removeChild(n),r>0)return Nm.set(t,r),r}catch{}return null}function Fc(t,e=16){return LA(t)??e*EA[t]}function Rn(t){const e=le[t];return I("flex self-stretch shrink-0 items-center text-muted",e.affixPadX,e.affixText)}const wA={small:"min-w-control-small",base:"min-w-control-base",mid:"min-w-control-mid",large:"min-w-control-large"};function bh(t){return wA[t]}const xt={danger:"text-danger",success:"text-success",info:"text-info",warning:"text-warning"},Gc={danger:"bg-surface-tint-danger border-token",success:"bg-surface-tint-success border-token",info:"bg-surface-tint-info border-token",warning:"bg-surface-tint-warning border-token"},xh={danger:"bg-danger border border-transparent text-danger-foreground",success:"bg-success border border-transparent text-success-foreground",info:"bg-info border border-transparent text-info-foreground",warning:"bg-warning border border-transparent text-warning-foreground"},RA={danger:"text-danger-foreground",success:"text-success-foreground",info:"text-info-foreground",warning:"text-warning-foreground"},Hc={danger:"border-token-danger",success:"border-token-success",info:"border-token-info",warning:"border-token-warning"},Ro="surface-color-transition motion-reduce:transition-none",gn="text-color-transition motion-reduce:transition-none",IA={default:{"focus-visible":"hover:bg-default-hover focus-visible:bg-default-hover","focus-within":"hover:bg-default-hover focus-within:bg-default-hover"},primary:{"focus-visible":"hover:bg-primary-hover focus-visible:bg-primary-hover","focus-within":"hover:bg-primary-hover focus-within:bg-primary-hover"},secondary:{"focus-visible":"hover:bg-secondary-hover focus-visible:bg-secondary-hover","focus-within":"hover:bg-secondary-hover focus-within:bg-secondary-hover"},danger:{"focus-visible":"hover:bg-surface-tint-danger focus-visible:bg-surface-tint-danger","focus-within":"hover:bg-surface-tint-danger focus-within:bg-surface-tint-danger"},warning:{"focus-visible":"hover:bg-surface-tint-warning focus-visible:bg-surface-tint-warning","focus-within":"hover:bg-surface-tint-warning focus-within:bg-surface-tint-warning"},info:{"focus-visible":"hover:bg-surface-tint-info focus-visible:bg-surface-tint-info","focus-within":"hover:bg-surface-tint-info focus-within:bg-surface-tint-info"},success:{"focus-visible":"hover:bg-surface-tint-success focus-visible:bg-surface-tint-success","focus-within":"hover:bg-surface-tint-success focus-within:bg-surface-tint-success"},"danger-tint-hover":{"focus-visible":"hover:bg-surface-tint-danger-hover focus-visible:bg-surface-tint-danger-hover","focus-within":"hover:bg-surface-tint-danger-hover focus-within:bg-surface-tint-danger-hover"},"warning-tint-hover":{"focus-visible":"hover:bg-surface-tint-warning-hover focus-visible:bg-surface-tint-warning-hover","focus-within":"hover:bg-surface-tint-warning-hover focus-within:bg-surface-tint-warning-hover"},"info-tint-hover":{"focus-visible":"hover:bg-surface-tint-info-hover focus-visible:bg-surface-tint-info-hover","focus-within":"hover:bg-surface-tint-info-hover focus-within:bg-surface-tint-info-hover"},"success-tint-hover":{"focus-visible":"hover:bg-surface-tint-success-hover focus-visible:bg-surface-tint-success-hover","focus-within":"hover:bg-surface-tint-success-hover focus-within:bg-surface-tint-success-hover"},"danger-fill":{"focus-visible":"hover:bg-danger-fill-hover focus-visible:bg-danger-fill-hover","focus-within":"hover:bg-danger-fill-hover focus-within:bg-danger-fill-hover"},"warning-fill":{"focus-visible":"hover:bg-warning-fill-hover focus-visible:bg-warning-fill-hover","focus-within":"hover:bg-warning-fill-hover focus-within:bg-warning-fill-hover"},"info-fill":{"focus-visible":"hover:bg-info-fill-hover focus-visible:bg-info-fill-hover","focus-within":"hover:bg-info-fill-hover focus-within:bg-info-fill-hover"},"success-fill":{"focus-visible":"hover:bg-success-fill-hover focus-visible:bg-success-fill-hover","focus-within":"hover:bg-success-fill-hover focus-within:bg-success-fill-hover"}};function Ch(t="default",e="focus-visible"){return IA[t][e]}function et(t="default"){return I(Ro,Ch(t,"focus-visible"))}function Ln(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _h(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}/*!
|
|
2
2
|
* GSAP 3.15.0
|
|
3
3
|
* https://gsap.com
|
|
4
4
|
*
|
|
5
5
|
* @license Copyright 2008-2026, GreenSock. All rights reserved.
|
|
6
6
|
* Subject to the terms at https://gsap.com/standard-license
|
|
7
7
|
* @author: Jack Doyle, jack@greensock.com
|
|
8
|
-
*/var Dt={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},us={duration:.5,overwrite:!1,delay:0},zc,rt,Ie,zt=1e8,Ee=1/zt,xl=Math.PI*2,IA=xl/4,RA=0,Ch=Math.sqrt,NA=Math.cos,DA=Math.sin,qe=function(e){return typeof e=="string"},je=function(e){return typeof e=="function"},Rn=function(e){return typeof e=="number"},Vc=function(e){return typeof e>"u"},mn=function(e){return typeof e=="object"},_t=function(e){return e!==!1},Uc=function(){return typeof window<"u"},Qs=function(e){return je(e)||qe(e)},_h=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},ct=Array.isArray,kA=/random\([^)]+\)/g,OA=/,\s*/g,Rm=/(?:-?\.?\d|\.)+/gi,Sh=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,ao=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Ja=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,vh=/[+-]=-?[.\d]+/,PA=/[^,'"\[\]\s]+/gi,BA=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ke,un,Cl,$c,Ot={},yi={},yh,Th=function(e){return(yi=po(e,Ot))&&At},Wc=function(e,n){return console.warn("Invalid property",e,"set to",n,"Missing plugin? gsap.registerPlugin()")},ds=function(e,n){return!n&&console.warn(e)},Ah=function(e,n){return e&&(Ot[e]=n)&&yi&&(yi[e]=n)||Ot},fs=function(){return 0},jA={suppressEvents:!0,isStart:!0,kill:!1},fi={suppressEvents:!0,kill:!1},MA={suppressEvents:!0},Xc={},Zn=[],_l={},Eh,wt={},el={},Nm=30,mi=[],Yc="",Kc=function(e){var n=e[0],r,o;if(mn(n)||je(n)||(e=[e]),!(r=(n._gsap||{}).harness)){for(o=mi.length;o--&&!mi[o].targetTest(n););r=mi[o]}for(o=e.length;o--;)e[o]&&(e[o]._gsap||(e[o]._gsap=new Yh(e[o],r)))||e.splice(o,1);return e},Tr=function(e){return e._gsap||Kc(Vt(e))[0]._gsap},Lh=function(e,n,r){return(r=e[n])&&je(r)?e[n]():Vc(r)&&e.getAttribute&&e.getAttribute(n)||r},St=function(e,n){return(e=e.split(",")).forEach(n)||e},Ge=function(e){return Math.round(e*1e5)/1e5||0},De=function(e){return Math.round(e*1e7)/1e7||0},co=function(e,n){var r=n.charAt(0),o=parseFloat(n.substr(2));return e=parseFloat(e),r==="+"?e+o:r==="-"?e-o:r==="*"?e*o:e/o},FA=function(e,n){for(var r=n.length,o=0;e.indexOf(n[o])<0&&++o<r;);return o<r},Ti=function(){var e=Zn.length,n=Zn.slice(0),r,o;for(_l={},Zn.length=0,r=0;r<e;r++)o=n[r],o&&o._lazy&&(o.render(o._lazy[0],o._lazy[1],!0)._lazy=0)},qc=function(e){return!!(e._initted||e._startAt||e.add)},wh=function(e,n,r,o){Zn.length&&!rt&&Ti(),e.render(n,r,!!(rt&&n<0&&qc(e))),Zn.length&&!rt&&Ti()},Ih=function(e){var n=parseFloat(e);return(n||n===0)&&(e+"").match(PA).length<2?n:qe(e)?e.trim():e},Rh=function(e){return e},Pt=function(e,n){for(var r in n)r in e||(e[r]=n[r]);return e},GA=function(e){return function(n,r){for(var o in r)o in n||o==="duration"&&e||o==="ease"||(n[o]=r[o])}},po=function(e,n){for(var r in n)e[r]=n[r];return e},Dm=function t(e,n){for(var r in n)r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(e[r]=mn(n[r])?t(e[r]||(e[r]={}),n[r]):n[r]);return e},Ai=function(e,n){var r={},o;for(o in e)o in n||(r[o]=e[o]);return r},os=function(e){var n=e.parent||ke,r=e.keyframes?GA(ct(e.keyframes)):Pt;if(_t(e.inherit))for(;n;)r(e,n.vars.defaults),n=n.parent||n._dp;return e},HA=function(e,n){for(var r=e.length,o=r===n.length;o&&r--&&e[r]===n[r];);return r<0},Nh=function(e,n,r,o,s){var i=e[o],a;if(s)for(a=n[s];i&&i[s]>a;)i=i._prev;return i?(n._next=i._next,i._next=n):(n._next=e[r],e[r]=n),n._next?n._next._prev=n:e[o]=n,n._prev=i,n.parent=n._dp=e,n},na=function(e,n,r,o){r===void 0&&(r="_first"),o===void 0&&(o="_last");var s=n._prev,i=n._next;s?s._next=i:e[r]===n&&(e[r]=i),i?i._prev=s:e[o]===n&&(e[o]=s),n._next=n._prev=n.parent=null},tr=function(e,n){e.parent&&(!n||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},Ar=function(e,n){if(e&&(!n||n._end>e._dur||n._start<0))for(var r=e;r;)r._dirty=1,r=r.parent;return e},zA=function(e){for(var n=e.parent;n&&n.parent;)n._dirty=1,n.totalDuration(),n=n.parent;return e},Sl=function(e,n,r,o){return e._startAt&&(rt?e._startAt.revert(fi):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(n,!0,o))},VA=function t(e){return!e||e._ts&&t(e.parent)},km=function(e){return e._repeat?ho(e._tTime,e=e.duration()+e._rDelay)*e:0},ho=function(e,n){var r=Math.floor(e=De(e/n));return e&&r===e?r-1:r},Ei=function(e,n){return(e-n._start)*n._ts+(n._ts>=0?0:n._dirty?n.totalDuration():n._tDur)},ra=function(e){return e._end=De(e._start+(e._tDur/Math.abs(e._ts||e._rts||Ee)||0))},oa=function(e,n){var r=e._dp;return r&&r.smoothChildTiming&&e._ts&&(e._start=De(r._time-(e._ts>0?n/e._ts:((e._dirty?e.totalDuration():e._tDur)-n)/-e._ts)),ra(e),r._dirty||Ar(r,e)),e},Dh=function(e,n){var r;if((n._time||!n._dur&&n._initted||n._start<e._time&&(n._dur||!n.add))&&(r=Ei(e.rawTime(),n),(!n._dur||_s(0,n.totalDuration(),r)-n._tTime>Ee)&&n.render(r,!0)),Ar(e,n)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(r=e;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),r=r._dp;e._zTime=-Ee}},dn=function(e,n,r,o){return n.parent&&tr(n),n._start=De((Rn(r)?r:r||e!==ke?Ht(e,r,n):e._time)+n._delay),n._end=De(n._start+(n.totalDuration()/Math.abs(n.timeScale())||0)),Nh(e,n,"_first","_last",e._sort?"_start":0),vl(n)||(e._recent=n),o||Dh(e,n),e._ts<0&&oa(e,e._tTime),e},kh=function(e,n){return(Ot.ScrollTrigger||Wc("scrollTrigger",n))&&Ot.ScrollTrigger.create(n,e)},Oh=function(e,n,r,o,s){if(Qc(e,n,s),!e._initted)return 1;if(!r&&e._pt&&!rt&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&Eh!==It.frame)return Zn.push(e),e._lazy=[s,o],1},UA=function t(e){var n=e.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||t(n))},vl=function(e){var n=e.data;return n==="isFromStart"||n==="isStart"},$A=function(e,n,r,o){var s=e.ratio,i=n<0||!n&&(!e._start&&UA(e)&&!(!e._initted&&vl(e))||(e._ts<0||e._dp._ts<0)&&!vl(e))?0:1,a=e._rDelay,c=0,u,f,m;if(a&&e._repeat&&(c=_s(0,e._tDur,n),f=ho(c,a),e._yoyo&&f&1&&(i=1-i),f!==ho(e._tTime,a)&&(s=1-i,e.vars.repeatRefresh&&e._initted&&e.invalidate())),i!==s||rt||o||e._zTime===Ee||!n&&e._zTime){if(!e._initted&&Oh(e,n,o,r,c))return;for(m=e._zTime,e._zTime=n||(r?Ee:0),r||(r=n&&!m),e.ratio=i,e._from&&(i=1-i),e._time=0,e._tTime=c,u=e._pt;u;)u.r(i,u.d),u=u._next;n<0&&Sl(e,n,r,!0),e._onUpdate&&!r&&Rt(e,"onUpdate"),c&&e._repeat&&!r&&e.parent&&Rt(e,"onRepeat"),(n>=e._tDur||n<0)&&e.ratio===i&&(i&&tr(e,1),!r&&!rt&&(Rt(e,i?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=n)},WA=function(e,n,r){var o;if(r>n)for(o=e._first;o&&o._start<=r;){if(o.data==="isPause"&&o._start>n)return o;o=o._next}else for(o=e._last;o&&o._start>=r;){if(o.data==="isPause"&&o._start<n)return o;o=o._prev}},go=function(e,n,r,o){var s=e._repeat,i=De(n)||0,a=e._tTime/e._tDur;return a&&!o&&(e._time*=i/e._dur),e._dur=i,e._tDur=s?s<0?1e10:De(i*(s+1)+e._rDelay*s):i,a>0&&!o&&oa(e,e._tTime=e._tDur*a),e.parent&&ra(e),r||Ar(e.parent,e),e},Om=function(e){return e instanceof bt?Ar(e):go(e,e._dur)},XA={_start:0,endTime:fs,totalDuration:fs},Ht=function t(e,n,r){var o=e.labels,s=e._recent||XA,i=e.duration()>=zt?s.endTime(!1):e._dur,a,c,u;return qe(n)&&(isNaN(n)||n in o)?(c=n.charAt(0),u=n.substr(-1)==="%",a=n.indexOf("="),c==="<"||c===">"?(a>=0&&(n=n.replace(/=/,"")),(c==="<"?s._start:s.endTime(s._repeat>=0))+(parseFloat(n.substr(1))||0)*(u?(a<0?s:r).totalDuration()/100:1)):a<0?(n in o||(o[n]=i),o[n]):(c=parseFloat(n.charAt(a-1)+n.substr(a+1)),u&&r&&(c=c/100*(ct(r)?r[0]:r).totalDuration()),a>1?t(e,n.substr(0,a-1),r)+c:i+c)):n==null?i:+n},ss=function(e,n,r){var o=Rn(n[1]),s=(o?2:1)+(e<2?0:1),i=n[s],a,c;if(o&&(i.duration=n[1]),i.parent=r,e){for(a=i,c=r;c&&!("immediateRender"in a);)a=c.vars.defaults||{},c=_t(c.vars.inherit)&&c.parent;i.immediateRender=_t(a.immediateRender),e<2?i.runBackwards=1:i.startAt=n[s-1]}return new ze(n[0],i,n[s+1])},sr=function(e,n){return e||e===0?n(e):n},_s=function(e,n,r){return r<e?e:r>n?n:r},lt=function(e,n){return!qe(e)||!(n=BA.exec(e))?"":n[1]},YA=function(e,n,r){return sr(r,function(o){return _s(e,n,o)})},yl=[].slice,Ph=function(e,n){return e&&mn(e)&&"length"in e&&(!n&&!e.length||e.length-1 in e&&mn(e[0]))&&!e.nodeType&&e!==un},KA=function(e,n,r){return r===void 0&&(r=[]),e.forEach(function(o){var s;return qe(o)&&!n||Ph(o,1)?(s=r).push.apply(s,Vt(o)):r.push(o)})||r},Vt=function(e,n,r){return Ie&&!n&&Ie.selector?Ie.selector(e):qe(e)&&!r&&(Cl||!bo())?yl.call((n||$c).querySelectorAll(e),0):ct(e)?KA(e,r):Ph(e)?yl.call(e,0):e?[e]:[]},Tl=function(e){return e=Vt(e)[0]||ds("Invalid scope")||{},function(n){var r=e.current||e.nativeElement||e;return Vt(n,r.querySelectorAll?r:r===e?ds("Invalid scope")||$c.createElement("div"):e)}},Bh=function(e){return e.sort(function(){return .5-Math.random()})},jh=function(e){if(je(e))return e;var n=mn(e)?e:{each:e},r=Er(n.ease),o=n.from||0,s=parseFloat(n.base)||0,i={},a=o>0&&o<1,c=isNaN(o)||a,u=n.axis,f=o,m=o;return qe(o)?f=m={center:.5,edges:.5,end:1}[o]||0:!a&&c&&(f=o[0],m=o[1]),function(p,b,g){var h=(g||n).length,x=i[h],C,_,S,y,v,A,E,T,L;if(!x){if(L=n.grid==="auto"?0:(n.grid||[1,zt])[1],!L){for(E=-zt;E<(E=g[L++].getBoundingClientRect().left)&&L<h;);L<h&&L--}for(x=i[h]=[],C=c?Math.min(L,h)*f-.5:o%L,_=L===zt?0:c?h*m/L-.5:o/L|0,E=0,T=zt,A=0;A<h;A++)S=A%L-C,y=_-(A/L|0),x[A]=v=u?Math.abs(u==="y"?y:S):Ch(S*S+y*y),v>E&&(E=v),v<T&&(T=v);o==="random"&&Bh(x),x.max=E-T,x.min=T,x.v=h=(parseFloat(n.amount)||parseFloat(n.each)*(L>h?h-1:u?u==="y"?h/L:L:Math.max(L,h/L))||0)*(o==="edges"?-1:1),x.b=h<0?s-h:s,x.u=lt(n.amount||n.each)||0,r=r&&h<0?lE(r):r}return h=(x[p]-x.min)/x.max||0,De(x.b+(r?r(h):h)*x.v)+x.u}},Al=function(e){var n=Math.pow(10,((e+"").split(".")[1]||"").length);return function(r){var o=De(Math.round(parseFloat(r)/e)*e*n);return(o-o%1)/n+(Rn(r)?0:lt(r))}},Mh=function(e,n){var r=ct(e),o,s;return!r&&mn(e)&&(o=r=e.radius||zt,e.values?(e=Vt(e.values),(s=!Rn(e[0]))&&(o*=o)):e=Al(e.increment)),sr(n,r?je(e)?function(i){return s=e(i),Math.abs(s-i)<=o?s:i}:function(i){for(var a=parseFloat(s?i.x:i),c=parseFloat(s?i.y:0),u=zt,f=0,m=e.length,p,b;m--;)s?(p=e[m].x-a,b=e[m].y-c,p=p*p+b*b):p=Math.abs(e[m]-a),p<u&&(u=p,f=m);return f=!o||u<=o?e[f]:i,s||f===i||Rn(i)?f:f+lt(i)}:Al(e))},Fh=function(e,n,r,o){return sr(ct(e)?!n:r===!0?!!(r=0):!o,function(){return ct(e)?e[~~(Math.random()*e.length)]:(r=r||1e-5)&&(o=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((e-r/2+Math.random()*(n-e+r*.99))/r)*r*o)/o})},qA=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return function(o){return n.reduce(function(s,i){return i(s)},o)}},ZA=function(e,n){return function(r){return e(parseFloat(r))+(n||lt(r))}},QA=function(e,n,r){return Hh(e,n,0,1,r)},Gh=function(e,n,r){return sr(r,function(o){return e[~~n(o)]})},JA=function t(e,n,r){var o=n-e;return ct(e)?Gh(e,t(0,e.length),n):sr(r,function(s){return(o+(s-e)%o)%o+e})},eE=function t(e,n,r){var o=n-e,s=o*2;return ct(e)?Gh(e,t(0,e.length-1),n):sr(r,function(i){return i=(s+(i-e)%s)%s||0,e+(i>o?s-i:i)})},ms=function(e){return e.replace(kA,function(n){var r=n.indexOf("[")+1,o=n.substring(r||7,r?n.indexOf("]"):n.length-1).split(OA);return Fh(r?o:+o[0],r?0:+o[1],+o[2]||1e-5)})},Hh=function(e,n,r,o,s){var i=n-e,a=o-r;return sr(s,function(c){return r+((c-e)/i*a||0)})},tE=function t(e,n,r,o){var s=isNaN(e+n)?0:function(b){return(1-b)*e+b*n};if(!s){var i=qe(e),a={},c,u,f,m,p;if(r===!0&&(o=1)&&(r=null),i)e={p:e},n={p:n};else if(ct(e)&&!ct(n)){for(f=[],m=e.length,p=m-2,u=1;u<m;u++)f.push(t(e[u-1],e[u]));m--,s=function(g){g*=m;var h=Math.min(p,~~g);return f[h](g-h)},r=n}else o||(e=po(ct(e)?[]:{},e));if(!f){for(c in n)Zc.call(a,e,c,"get",n[c]);s=function(g){return tu(g,a)||(i?e.p:e)}}}return sr(r,s)},Pm=function(e,n,r){var o=e.labels,s=zt,i,a,c;for(i in o)a=o[i]-n,a<0==!!r&&a&&s>(a=Math.abs(a))&&(c=i,s=a);return c},Rt=function(e,n,r){var o=e.vars,s=o[n],i=Ie,a=e._ctx,c,u,f;if(s)return c=o[n+"Params"],u=o.callbackScope||e,r&&Zn.length&&Ti(),a&&(Ie=a),f=c?s.apply(u,c):s.call(u),Ie=i,f},ns=function(e){return tr(e),e.scrollTrigger&&e.scrollTrigger.kill(!!rt),e.progress()<1&&Rt(e,"onInterrupt"),e},lo,zh=[],Vh=function(e){if(e)if(e=!e.name&&e.default||e,Uc()||e.headless){var n=e.name,r=je(e),o=n&&!r&&e.init?function(){this._props=[]}:e,s={init:fs,render:tu,add:Zc,kill:xE,modifier:bE,rawVars:0},i={targetTest:0,get:0,getSetter:eu,aliases:{},register:0};if(bo(),e!==o){if(wt[n])return;Pt(o,Pt(Ai(e,s),i)),po(o.prototype,po(s,Ai(e,i))),wt[o.prop=n]=o,e.targetTest&&(mi.push(o),Xc[n]=1),n=(n==="css"?"CSS":n.charAt(0).toUpperCase()+n.substr(1))+"Plugin"}Ah(n,o),e.register&&e.register(At,o,vt)}else zh.push(e)},Ae=255,rs={aqua:[0,Ae,Ae],lime:[0,Ae,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Ae],navy:[0,0,128],white:[Ae,Ae,Ae],olive:[128,128,0],yellow:[Ae,Ae,0],orange:[Ae,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Ae,0,0],pink:[Ae,192,203],cyan:[0,Ae,Ae],transparent:[Ae,Ae,Ae,0]},tl=function(e,n,r){return e+=e<0?1:e>1?-1:0,(e*6<1?n+(r-n)*e*6:e<.5?r:e*3<2?n+(r-n)*(2/3-e)*6:n)*Ae+.5|0},Uh=function(e,n,r){var o=e?Rn(e)?[e>>16,e>>8&Ae,e&Ae]:0:rs.black,s,i,a,c,u,f,m,p,b,g;if(!o){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),rs[e])o=rs[e];else if(e.charAt(0)==="#"){if(e.length<6&&(s=e.charAt(1),i=e.charAt(2),a=e.charAt(3),e="#"+s+s+i+i+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return o=parseInt(e.substr(1,6),16),[o>>16,o>>8&Ae,o&Ae,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),o=[e>>16,e>>8&Ae,e&Ae]}else if(e.substr(0,3)==="hsl"){if(o=g=e.match(Rm),!n)c=+o[0]%360/360,u=+o[1]/100,f=+o[2]/100,i=f<=.5?f*(u+1):f+u-f*u,s=f*2-i,o.length>3&&(o[3]*=1),o[0]=tl(c+1/3,s,i),o[1]=tl(c,s,i),o[2]=tl(c-1/3,s,i);else if(~e.indexOf("="))return o=e.match(Sh),r&&o.length<4&&(o[3]=1),o}else o=e.match(Rm)||rs.transparent;o=o.map(Number)}return n&&!g&&(s=o[0]/Ae,i=o[1]/Ae,a=o[2]/Ae,m=Math.max(s,i,a),p=Math.min(s,i,a),f=(m+p)/2,m===p?c=u=0:(b=m-p,u=f>.5?b/(2-m-p):b/(m+p),c=m===s?(i-a)/b+(i<a?6:0):m===i?(a-s)/b+2:(s-i)/b+4,c*=60),o[0]=~~(c+.5),o[1]=~~(u*100+.5),o[2]=~~(f*100+.5)),r&&o.length<4&&(o[3]=1),o},$h=function(e){var n=[],r=[],o=-1;return e.split(Qn).forEach(function(s){var i=s.match(ao)||[];n.push.apply(n,i),r.push(o+=i.length+1)}),n.c=r,n},Bm=function(e,n,r){var o="",s=(e+o).match(Qn),i=n?"hsla(":"rgba(",a=0,c,u,f,m;if(!s)return e;if(s=s.map(function(p){return(p=Uh(p,n,1))&&i+(n?p[0]+","+p[1]+"%,"+p[2]+"%,"+p[3]:p.join(","))+")"}),r&&(f=$h(e),c=r.c,c.join(o)!==f.c.join(o)))for(u=e.replace(Qn,"1").split(ao),m=u.length-1;a<m;a++)o+=u[a]+(~c.indexOf(a)?s.shift()||i+"0,0,0,0)":(f.length?f:s.length?s:r).shift());if(!u)for(u=e.split(Qn),m=u.length-1;a<m;a++)o+=u[a]+s[a];return o+u[m]},Qn=(function(){var t="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in rs)t+="|"+e+"\\b";return new RegExp(t+")","gi")})(),nE=/hsl[a]?\(/,Wh=function(e){var n=e.join(" "),r;if(Qn.lastIndex=0,Qn.test(n))return r=nE.test(n),e[1]=Bm(e[1],r),e[0]=Bm(e[0],r,$h(e[1])),!0},ps,It=(function(){var t=Date.now,e=500,n=33,r=t(),o=r,s=1e3/240,i=s,a=[],c,u,f,m,p,b,g=function h(x){var C=t()-o,_=x===!0,S,y,v,A;if((C>e||C<0)&&(r+=C-n),o+=C,v=o-r,S=v-i,(S>0||_)&&(A=++m.frame,p=v-m.time*1e3,m.time=v=v/1e3,i+=S+(S>=s?4:s-S),y=1),_||(c=u(h)),y)for(b=0;b<a.length;b++)a[b](v,p,A,x)};return m={time:0,frame:0,tick:function(){g(!0)},deltaRatio:function(x){return p/(1e3/(x||60))},wake:function(){yh&&(!Cl&&Uc()&&(un=Cl=window,$c=un.document||{},Ot.gsap=At,(un.gsapVersions||(un.gsapVersions=[])).push(At.version),Th(yi||un.GreenSockGlobals||!un.gsap&&un||{}),zh.forEach(Vh)),f=typeof requestAnimationFrame<"u"&&requestAnimationFrame,c&&m.sleep(),u=f||function(x){return setTimeout(x,i-m.time*1e3+1|0)},ps=1,g(2))},sleep:function(){(f?cancelAnimationFrame:clearTimeout)(c),ps=0,u=fs},lagSmoothing:function(x,C){e=x||1/0,n=Math.min(C||33,e)},fps:function(x){s=1e3/(x||240),i=m.time*1e3+s},add:function(x,C,_){var S=C?function(y,v,A,E){x(y,v,A,E),m.remove(S)}:x;return m.remove(x),a[_?"unshift":"push"](S),bo(),S},remove:function(x,C){~(C=a.indexOf(x))&&a.splice(C,1)&&b>=C&&b--},_listeners:a},m})(),bo=function(){return!ps&&It.wake()},Ce={},rE=/^[\d.\-M][\d.\-,\s]/,oE=/["']/g,sE=function(e){for(var n={},r=e.substr(1,e.length-3).split(":"),o=r[0],s=1,i=r.length,a,c,u;s<i;s++)c=r[s],a=s!==i-1?c.lastIndexOf(","):c.length,u=c.substr(0,a),n[o]=isNaN(u)?u.replace(oE,"").trim():+u,o=c.substr(a+1).trim();return n},iE=function(e){var n=e.indexOf("(")+1,r=e.indexOf(")"),o=e.indexOf("(",n);return e.substring(n,~o&&o<r?e.indexOf(")",r+1):r)},aE=function(e){var n=(e+"").split("("),r=Ce[n[0]];return r&&n.length>1&&r.config?r.config.apply(null,~e.indexOf("{")?[sE(n[1])]:iE(e).split(",").map(Ih)):Ce._CE&&rE.test(e)?Ce._CE("",e):r},lE=function(e){return function(n){return 1-e(1-n)}},Er=function(e,n){return e&&(je(e)?e:Ce[e]||aE(e))||n},Pr=function(e,n,r,o){r===void 0&&(r=function(c){return 1-n(1-c)}),o===void 0&&(o=function(c){return c<.5?n(c*2)/2:1-n((1-c)*2)/2});var s={easeIn:n,easeOut:r,easeInOut:o},i;return St(e,function(a){Ce[a]=Ot[a]=s,Ce[i=a.toLowerCase()]=r;for(var c in s)Ce[i+(c==="easeIn"?".in":c==="easeOut"?".out":".inOut")]=Ce[a+"."+c]=s[c]}),s},Xh=function(e){return function(n){return n<.5?(1-e(1-n*2))/2:.5+e((n-.5)*2)/2}},nl=function t(e,n,r){var o=n>=1?n:1,s=(r||(e?.3:.45))/(n<1?n:1),i=s/xl*(Math.asin(1/o)||0),a=function(f){return f===1?1:o*Math.pow(2,-10*f)*DA((f-i)*s)+1},c=e==="out"?a:e==="in"?function(u){return 1-a(1-u)}:Xh(a);return s=xl/s,c.config=function(u,f){return t(e,u,f)},c},rl=function t(e,n){n===void 0&&(n=1.70158);var r=function(i){return i?--i*i*((n+1)*i+n)+1:0},o=e==="out"?r:e==="in"?function(s){return 1-r(1-s)}:Xh(r);return o.config=function(s){return t(e,s)},o};St("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var n=e<5?e+1:e;Pr(t+",Power"+(n-1),e?function(r){return Math.pow(r,n)}:function(r){return r},function(r){return 1-Math.pow(1-r,n)},function(r){return r<.5?Math.pow(r*2,n)/2:1-Math.pow((1-r)*2,n)/2})});Ce.Linear.easeNone=Ce.none=Ce.Linear.easeIn;Pr("Elastic",nl("in"),nl("out"),nl());(function(t,e){var n=1/e,r=2*n,o=2.5*n,s=function(a){return a<n?t*a*a:a<r?t*Math.pow(a-1.5/e,2)+.75:a<o?t*(a-=2.25/e)*a+.9375:t*Math.pow(a-2.625/e,2)+.984375};Pr("Bounce",function(i){return 1-s(1-i)},s)})(7.5625,2.75);Pr("Expo",function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)});Pr("Circ",function(t){return-(Ch(1-t*t)-1)});Pr("Sine",function(t){return t===1?1:-NA(t*IA)+1});Pr("Back",rl("in"),rl("out"),rl());Ce.SteppedEase=Ce.steps=Ot.SteppedEase={config:function(e,n){e===void 0&&(e=1);var r=1/e,o=e+(n?0:1),s=n?1:0,i=1-Ee;return function(a){return((o*_s(0,i,a)|0)+s)*r}}};us.ease=Ce["quad.out"];St("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return Yc+=t+","+t+"Params,"});var Yh=function(e,n){this.id=RA++,e._gsap=this,this.target=e,this.harness=n,this.get=n?n.get:Lh,this.set=n?n.getSetter:eu},hs=(function(){function t(n){this.vars=n,this._delay=+n.delay||0,(this._repeat=n.repeat===1/0?-2:n.repeat||0)&&(this._rDelay=n.repeatDelay||0,this._yoyo=!!n.yoyo||!!n.yoyoEase),this._ts=1,go(this,+n.duration,1,1),this.data=n.data,Ie&&(this._ctx=Ie,Ie.data.push(this)),ps||It.wake()}var e=t.prototype;return e.delay=function(r){return r||r===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+r-this._delay),this._delay=r,this):this._delay},e.duration=function(r){return arguments.length?this.totalDuration(this._repeat>0?r+(r+this._rDelay)*this._repeat:r):this.totalDuration()&&this._dur},e.totalDuration=function(r){return arguments.length?(this._dirty=0,go(this,this._repeat<0?r:(r-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(r,o){if(bo(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(oa(this,r),!s._dp||s.parent||Dh(s,this);s&&s.parent;)s.parent._time!==s._start+(s._ts>=0?s._tTime/s._ts:(s.totalDuration()-s._tTime)/-s._ts)&&s.totalTime(s._tTime,!0),s=s.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&r<this._tDur||this._ts<0&&r>0||!this._tDur&&!r)&&dn(this._dp,this,this._start-this._delay)}return(this._tTime!==r||!this._dur&&!o||this._initted&&Math.abs(this._zTime)===Ee||!this._initted&&this._dur&&r||!r&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=r),wh(this,r,o)),this},e.time=function(r,o){return arguments.length?this.totalTime(Math.min(this.totalDuration(),r+km(this))%(this._dur+this._rDelay)||(r?this._dur:0),o):this._time},e.totalProgress=function(r,o){return arguments.length?this.totalTime(this.totalDuration()*r,o):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(r,o){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-r:r)+km(this),o):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(r,o){var s=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(r-1)*s,o):this._repeat?ho(this._tTime,s)+1:1},e.timeScale=function(r,o){if(!arguments.length)return this._rts===-Ee?0:this._rts;if(this._rts===r)return this;var s=this.parent&&this._ts?Ei(this.parent._time,this):this._tTime;return this._rts=+r||0,this._ts=this._ps||r===-Ee?0:this._rts,this.totalTime(_s(-Math.abs(this._delay),this.totalDuration(),s),o!==!1),ra(this),zA(this)},e.paused=function(r){return arguments.length?(this._ps!==r&&(this._ps=r,r?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(bo(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==Ee&&(this._tTime-=Ee)))),this):this._ps},e.startTime=function(r){if(arguments.length){this._start=De(r);var o=this.parent||this._dp;return o&&(o._sort||!this.parent)&&dn(o,this,this._start-this._delay),this}return this._start},e.endTime=function(r){return this._start+(_t(r)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(r){var o=this.parent||this._dp;return o?r&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Ei(o.rawTime(r),this):this._tTime:this._tTime},e.revert=function(r){r===void 0&&(r=MA);var o=rt;return rt=r,qc(this)&&(this.timeline&&this.timeline.revert(r),this.totalTime(-.01,r.suppressEvents)),this.data!=="nested"&&r.kill!==!1&&this.kill(),rt=o,this},e.globalTime=function(r){for(var o=this,s=arguments.length?r:o.rawTime();o;)s=o._start+s/(Math.abs(o._ts)||1),o=o._dp;return!this.parent&&this._sat?this._sat.globalTime(r):s},e.repeat=function(r){return arguments.length?(this._repeat=r===1/0?-2:r,Om(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(r){if(arguments.length){var o=this._time;return this._rDelay=r,Om(this),o?this.time(o):this}return this._rDelay},e.yoyo=function(r){return arguments.length?(this._yoyo=r,this):this._yoyo},e.seek=function(r,o){return this.totalTime(Ht(this,r),_t(o))},e.restart=function(r,o){return this.play().totalTime(r?-this._delay:0,_t(o)),this._dur||(this._zTime=-Ee),this},e.play=function(r,o){return r!=null&&this.seek(r,o),this.reversed(!1).paused(!1)},e.reverse=function(r,o){return r!=null&&this.seek(r||this.totalDuration(),o),this.reversed(!0).paused(!1)},e.pause=function(r,o){return r!=null&&this.seek(r,o),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(r){return arguments.length?(!!r!==this.reversed()&&this.timeScale(-this._rts||(r?-Ee:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-Ee,this},e.isActive=function(){var r=this.parent||this._dp,o=this._start,s;return!!(!r||this._ts&&this._initted&&r.isActive()&&(s=r.rawTime(!0))>=o&&s<this.endTime(!0)-Ee)},e.eventCallback=function(r,o,s){var i=this.vars;return arguments.length>1?(o?(i[r]=o,s&&(i[r+"Params"]=s),r==="onUpdate"&&(this._onUpdate=o)):delete i[r],this):i[r]},e.then=function(r){var o=this,s=o._prom;return new Promise(function(i){var a=je(r)?r:Rh,c=function(){var f=o.then;o.then=null,s&&s(),je(a)&&(a=a(o))&&(a.then||a===o)&&(o.then=f),i(a),o.then=f};o._initted&&o.totalProgress()===1&&o._ts>=0||!o._tTime&&o._ts<0?c():o._prom=c})},e.kill=function(){ns(this)},t})();Pt(hs.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-Ee,_prom:0,_ps:!1,_rts:1});var bt=(function(t){xh(e,t);function e(r,o){var s;return r===void 0&&(r={}),s=t.call(this,r)||this,s.labels={},s.smoothChildTiming=!!r.smoothChildTiming,s.autoRemoveChildren=!!r.autoRemoveChildren,s._sort=_t(r.sortChildren),ke&&dn(r.parent||ke,Ln(s),o),r.reversed&&s.reverse(),r.paused&&s.paused(!0),r.scrollTrigger&&kh(Ln(s),r.scrollTrigger),s}var n=e.prototype;return n.to=function(o,s,i){return ss(0,arguments,this),this},n.from=function(o,s,i){return ss(1,arguments,this),this},n.fromTo=function(o,s,i,a){return ss(2,arguments,this),this},n.set=function(o,s,i){return s.duration=0,s.parent=this,os(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new ze(o,s,Ht(this,i),1),this},n.call=function(o,s,i){return dn(this,ze.delayedCall(0,o,s),i)},n.staggerTo=function(o,s,i,a,c,u,f){return i.duration=s,i.stagger=i.stagger||a,i.onComplete=u,i.onCompleteParams=f,i.parent=this,new ze(o,i,Ht(this,c)),this},n.staggerFrom=function(o,s,i,a,c,u,f){return i.runBackwards=1,os(i).immediateRender=_t(i.immediateRender),this.staggerTo(o,s,i,a,c,u,f)},n.staggerFromTo=function(o,s,i,a,c,u,f,m){return a.startAt=i,os(a).immediateRender=_t(a.immediateRender),this.staggerTo(o,s,a,c,u,f,m)},n.render=function(o,s,i){var a=this._time,c=this._dirty?this.totalDuration():this._tDur,u=this._dur,f=o<=0?0:De(o),m=this._zTime<0!=o<0&&(this._initted||!u),p,b,g,h,x,C,_,S,y,v,A,E;if(this!==ke&&f>c&&o>=0&&(f=c),f!==this._tTime||i||m){if(a!==this._time&&u&&(f+=this._time-a,o+=this._time-a),p=f,y=this._start,S=this._ts,C=!S,m&&(u||(a=this._zTime),(o||!s)&&(this._zTime=o)),this._repeat){if(A=this._yoyo,x=u+this._rDelay,this._repeat<-1&&o<0)return this.totalTime(x*100+o,s,i);if(p=De(f%x),f===c?(h=this._repeat,p=u):(v=De(f/x),h=~~v,h&&h===v&&(p=u,h--),p>u&&(p=u)),v=ho(this._tTime,x),!a&&this._tTime&&v!==h&&this._tTime-v*x-this._dur<=0&&(v=h),A&&h&1&&(p=u-p,E=1),h!==v&&!this._lock){var T=A&&v&1,L=T===(A&&h&1);if(h<v&&(T=!T),a=T?0:f%u?u:f,this._lock=1,this.render(a||(E?0:De(h*x)),s,!u)._lock=0,this._tTime=f,!s&&this.parent&&Rt(this,"onRepeat"),this.vars.repeatRefresh&&!E&&(this.invalidate()._lock=1,v=h),a&&a!==this._time||C!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,c=this._tDur,L&&(this._lock=2,a=T?u:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!E&&this.invalidate()),this._lock=0,!this._ts&&!C)return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(_=WA(this,De(a),De(p)),_&&(f-=p-(p=_._start))),this._tTime=f,this._time=p,this._act=!!S,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=o,a=0),!a&&f&&u&&!s&&!v&&(Rt(this,"onStart"),this._tTime!==f))return this;if(p>=a&&o>=0)for(b=this._first;b;){if(g=b._next,(b._act||p>=b._start)&&b._ts&&_!==b){if(b.parent!==this)return this.render(o,s,i);if(b.render(b._ts>0?(p-b._start)*b._ts:(b._dirty?b.totalDuration():b._tDur)+(p-b._start)*b._ts,s,i),p!==this._time||!this._ts&&!C){_=0,g&&(f+=this._zTime=-Ee);break}}b=g}else{b=this._last;for(var w=o<0?o:p;b;){if(g=b._prev,(b._act||w<=b._end)&&b._ts&&_!==b){if(b.parent!==this)return this.render(o,s,i);if(b.render(b._ts>0?(w-b._start)*b._ts:(b._dirty?b.totalDuration():b._tDur)+(w-b._start)*b._ts,s,i||rt&&qc(b)),p!==this._time||!this._ts&&!C){_=0,g&&(f+=this._zTime=w?-Ee:Ee);break}}b=g}}if(_&&!s&&(this.pause(),_.render(p>=a?0:-Ee)._zTime=p>=a?1:-1,this._ts))return this._start=y,ra(this),this.render(o,s,i);this._onUpdate&&!s&&Rt(this,"onUpdate",!0),(f===c&&this._tTime>=this.totalDuration()||!f&&a)&&(y===this._start||Math.abs(S)!==Math.abs(this._ts))&&(this._lock||((o||!u)&&(f===c&&this._ts>0||!f&&this._ts<0)&&tr(this,1),!s&&!(o<0&&!a)&&(f||a||!c)&&(Rt(this,f===c&&o>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(f<c&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(o,s){var i=this;if(Rn(s)||(s=Ht(this,s,o)),!(o instanceof hs)){if(ct(o))return o.forEach(function(a){return i.add(a,s)}),this;if(qe(o))return this.addLabel(o,s);if(je(o))o=ze.delayedCall(0,o);else return this}return this!==o?dn(this,o,s):this},n.getChildren=function(o,s,i,a){o===void 0&&(o=!0),s===void 0&&(s=!0),i===void 0&&(i=!0),a===void 0&&(a=-zt);for(var c=[],u=this._first;u;)u._start>=a&&(u instanceof ze?s&&c.push(u):(i&&c.push(u),o&&c.push.apply(c,u.getChildren(!0,s,i)))),u=u._next;return c},n.getById=function(o){for(var s=this.getChildren(1,1,1),i=s.length;i--;)if(s[i].vars.id===o)return s[i]},n.remove=function(o){return qe(o)?this.removeLabel(o):je(o)?this.killTweensOf(o):(o.parent===this&&na(this,o),o===this._recent&&(this._recent=this._last),Ar(this))},n.totalTime=function(o,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=De(It.time-(this._ts>0?o/this._ts:(this.totalDuration()-o)/-this._ts))),t.prototype.totalTime.call(this,o,s),this._forcing=0,this):this._tTime},n.addLabel=function(o,s){return this.labels[o]=Ht(this,s),this},n.removeLabel=function(o){return delete this.labels[o],this},n.addPause=function(o,s,i){var a=ze.delayedCall(0,s||fs,i);return a.data="isPause",this._hasPause=1,dn(this,a,Ht(this,o))},n.removePause=function(o){var s=this._first;for(o=Ht(this,o);s;)s._start===o&&s.data==="isPause"&&tr(s),s=s._next},n.killTweensOf=function(o,s,i){for(var a=this.getTweensOf(o,i),c=a.length;c--;)Yn!==a[c]&&a[c].kill(o,s);return this},n.getTweensOf=function(o,s){for(var i=[],a=Vt(o),c=this._first,u=Rn(s),f;c;)c instanceof ze?FA(c._targets,a)&&(u?(!Yn||c._initted&&c._ts)&&c.globalTime(0)<=s&&c.globalTime(c.totalDuration())>s:!s||c.isActive())&&i.push(c):(f=c.getTweensOf(a,s)).length&&i.push.apply(i,f),c=c._next;return i},n.tweenTo=function(o,s){s=s||{};var i=this,a=Ht(i,o),c=s,u=c.startAt,f=c.onStart,m=c.onStartParams,p=c.immediateRender,b,g=ze.to(i,Pt({ease:s.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:s.duration||Math.abs((a-(u&&"time"in u?u.time:i._time))/i.timeScale())||Ee,onStart:function(){if(i.pause(),!b){var x=s.duration||Math.abs((a-(u&&"time"in u?u.time:i._time))/i.timeScale());g._dur!==x&&go(g,x,0,1).render(g._time,!0,!0),b=1}f&&f.apply(g,m||[])}},s));return p?g.render(0):g},n.tweenFromTo=function(o,s,i){return this.tweenTo(s,Pt({startAt:{time:Ht(this,o)}},i))},n.recent=function(){return this._recent},n.nextLabel=function(o){return o===void 0&&(o=this._time),Pm(this,Ht(this,o))},n.previousLabel=function(o){return o===void 0&&(o=this._time),Pm(this,Ht(this,o),1)},n.currentLabel=function(o){return arguments.length?this.seek(o,!0):this.previousLabel(this._time+Ee)},n.shiftChildren=function(o,s,i){i===void 0&&(i=0);var a=this._first,c=this.labels,u;for(o=De(o);a;)a._start>=i&&(a._start+=o,a._end+=o),a=a._next;if(s)for(u in c)c[u]>=i&&(c[u]+=o);return Ar(this)},n.invalidate=function(o){var s=this._first;for(this._lock=0;s;)s.invalidate(o),s=s._next;return t.prototype.invalidate.call(this,o)},n.clear=function(o){o===void 0&&(o=!0);for(var s=this._first,i;s;)i=s._next,this.remove(s),s=i;return this._dp&&(this._time=this._tTime=this._pTime=0),o&&(this.labels={}),Ar(this)},n.totalDuration=function(o){var s=0,i=this,a=i._last,c=zt,u,f,m;if(arguments.length)return i.timeScale((i._repeat<0?i.duration():i.totalDuration())/(i.reversed()?-o:o));if(i._dirty){for(m=i.parent;a;)u=a._prev,a._dirty&&a.totalDuration(),f=a._start,f>c&&i._sort&&a._ts&&!i._lock?(i._lock=1,dn(i,a,f-a._delay,1)._lock=0):c=f,f<0&&a._ts&&(s-=f,(!m&&!i._dp||m&&m.smoothChildTiming)&&(i._start+=De(f/i._ts),i._time-=f,i._tTime-=f),i.shiftChildren(-f,!1,-1/0),c=0),a._end>s&&a._ts&&(s=a._end),a=u;go(i,i===ke&&i._time>s?i._time:s,1,1),i._dirty=0}return i._tDur},e.updateRoot=function(o){if(ke._ts&&(wh(ke,Ei(o,ke)),Eh=It.frame),It.frame>=Nm){Nm+=Dt.autoSleep||120;var s=ke._first;if((!s||!s._ts)&&Dt.autoSleep&&It._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||It.sleep()}}},e})(hs);Pt(bt.prototype,{_lock:0,_hasPause:0,_forcing:0});var cE=function(e,n,r,o,s,i,a){var c=new vt(this._pt,e,n,0,1,eg,null,s),u=0,f=0,m,p,b,g,h,x,C,_;for(c.b=r,c.e=o,r+="",o+="",(C=~o.indexOf("random("))&&(o=ms(o)),i&&(_=[r,o],i(_,e,n),r=_[0],o=_[1]),p=r.match(Ja)||[];m=Ja.exec(o);)g=m[0],h=o.substring(u,m.index),b?b=(b+1)%5:h.substr(-5)==="rgba("&&(b=1),g!==p[f++]&&(x=parseFloat(p[f-1])||0,c._pt={_next:c._pt,p:h||f===1?h:",",s:x,c:g.charAt(1)==="="?co(x,g)-x:parseFloat(g)-x,m:b&&b<4?Math.round:0},u=Ja.lastIndex);return c.c=u<o.length?o.substring(u,o.length):"",c.fp=a,(vh.test(o)||C)&&(c.e=0),this._pt=c,c},Zc=function(e,n,r,o,s,i,a,c,u,f){je(o)&&(o=o(s||0,e,i));var m=e[n],p=r!=="get"?r:je(m)?u?e[n.indexOf("set")||!je(e["get"+n.substr(3)])?n:"get"+n.substr(3)](u):e[n]():m,b=je(m)?u?pE:Qh:Jc,g;if(qe(o)&&(~o.indexOf("random(")&&(o=ms(o)),o.charAt(1)==="="&&(g=co(p,o)+(lt(p)||0),(g||g===0)&&(o=g))),!f||p!==o||El)return!isNaN(p*o)&&o!==""?(g=new vt(this._pt,e,n,+p||0,o-(p||0),typeof m=="boolean"?gE:Jh,0,b),u&&(g.fp=u),a&&g.modifier(a,this,e),this._pt=g):(!m&&!(n in e)&&Wc(n,o),cE.call(this,e,n,p,o,b,c||Dt.stringFilter,u))},uE=function(e,n,r,o,s){if(je(e)&&(e=is(e,s,n,r,o)),!mn(e)||e.style&&e.nodeType||ct(e)||_h(e))return qe(e)?is(e,s,n,r,o):e;var i={},a;for(a in e)i[a]=is(e[a],s,n,r,o);return i},Kh=function(e,n,r,o,s,i){var a,c,u,f;if(wt[e]&&(a=new wt[e]).init(s,a.rawVars?n[e]:uE(n[e],o,s,i,r),r,o,i)!==!1&&(r._pt=c=new vt(r._pt,s,e,0,1,a.render,a,0,a.priority),r!==lo))for(u=r._ptLookup[r._targets.indexOf(s)],f=a._props.length;f--;)u[a._props[f]]=c;return a},Yn,El,Qc=function t(e,n,r){var o=e.vars,s=o.ease,i=o.startAt,a=o.immediateRender,c=o.lazy,u=o.onUpdate,f=o.runBackwards,m=o.yoyoEase,p=o.keyframes,b=o.autoRevert,g=e._dur,h=e._startAt,x=e._targets,C=e.parent,_=C&&C.data==="nested"?C.vars.targets:x,S=e._overwrite==="auto"&&!zc,y=e.timeline,v=o.easeReverse||m,A,E,T,L,w,I,N,k,j,P,G,D,O;if(y&&(!p||!s)&&(s="none"),e._ease=Er(s,us.ease),e._rEase=v&&(Er(v)||e._ease),e._from=!y&&!!o.runBackwards,e._from&&(e.ratio=1),!y||p&&!o.stagger){if(k=x[0]?Tr(x[0]).harness:0,D=k&&o[k.prop],A=Ai(o,Xc),h&&(h._zTime<0&&h.progress(1),n<0&&f&&a&&!b?h.render(-1,!0):h.revert(f&&g?fi:jA),h._lazy=0),i){if(tr(e._startAt=ze.set(x,Pt({data:"isStart",overwrite:!1,parent:C,immediateRender:!0,lazy:!h&&_t(c),startAt:null,delay:0,onUpdate:u&&function(){return Rt(e,"onUpdate")},stagger:0},i))),e._startAt._dp=0,e._startAt._sat=e,n<0&&(rt||!a&&!b)&&e._startAt.revert(fi),a&&g&&n<=0&&r<=0){n&&(e._zTime=n);return}}else if(f&&g&&!h){if(n&&(a=!1),T=Pt({overwrite:!1,data:"isFromStart",lazy:a&&!h&&_t(c),immediateRender:a,stagger:0,parent:C},A),D&&(T[k.prop]=D),tr(e._startAt=ze.set(x,T)),e._startAt._dp=0,e._startAt._sat=e,n<0&&(rt?e._startAt.revert(fi):e._startAt.render(-1,!0)),e._zTime=n,!a)t(e._startAt,Ee,Ee);else if(!n)return}for(e._pt=e._ptCache=0,c=g&&_t(c)||c&&!g,E=0;E<x.length;E++){if(w=x[E],N=w._gsap||Kc(x)[E]._gsap,e._ptLookup[E]=P={},_l[N.id]&&Zn.length&&Ti(),G=_===x?E:_.indexOf(w),k&&(j=new k).init(w,D||A,e,G,_)!==!1&&(e._pt=L=new vt(e._pt,w,j.name,0,1,j.render,j,0,j.priority),j._props.forEach(function(F){P[F]=L}),j.priority&&(I=1)),!k||D)for(T in A)wt[T]&&(j=Kh(T,A,e,G,w,_))?j.priority&&(I=1):P[T]=L=Zc.call(e,w,T,"get",A[T],G,_,0,o.stringFilter);e._op&&e._op[E]&&e.kill(w,e._op[E]),S&&e._pt&&(Yn=e,ke.killTweensOf(w,P,e.globalTime(n)),O=!e.parent,Yn=0),e._pt&&c&&(_l[N.id]=1)}I&&tg(e),e._onInit&&e._onInit(e)}e._onUpdate=u,e._initted=(!e._op||e._pt)&&!O,p&&n<=0&&y.render(zt,!0,!0)},dE=function(e,n,r,o,s,i,a,c){var u=(e._pt&&e._ptCache||(e._ptCache={}))[n],f,m,p,b;if(!u)for(u=e._ptCache[n]=[],p=e._ptLookup,b=e._targets.length;b--;){if(f=p[b][n],f&&f.d&&f.d._pt)for(f=f.d._pt;f&&f.p!==n&&f.fp!==n;)f=f._next;if(!f)return El=1,e.vars[n]="+=0",Qc(e,a),El=0,c?ds(n+" not eligible for reset. Try splitting into individual properties"):1;u.push(f)}for(b=u.length;b--;)m=u[b],f=m._pt||m,f.s=(o||o===0)&&!s?o:f.s+(o||0)+i*f.c,f.c=r-f.s,m.e&&(m.e=Ge(r)+lt(m.e)),m.b&&(m.b=f.s+lt(m.b))},fE=function(e,n){var r=e[0]?Tr(e[0]).harness:0,o=r&&r.aliases,s,i,a,c;if(!o)return n;s=po({},n);for(i in o)if(i in s)for(c=o[i].split(","),a=c.length;a--;)s[c[a]]=s[i];return s},mE=function(e,n,r,o){var s=n.ease||o||"power1.inOut",i,a;if(ct(n))a=r[e]||(r[e]=[]),n.forEach(function(c,u){return a.push({t:u/(n.length-1)*100,v:c,e:s})});else for(i in n)a=r[i]||(r[i]=[]),i==="ease"||a.push({t:parseFloat(e),v:n[i],e:s})},is=function(e,n,r,o,s){return je(e)?e.call(n,r,o,s):qe(e)&&~e.indexOf("random(")?ms(e):e},qh=Yc+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",Zh={};St(qh+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return Zh[t]=1});var ze=(function(t){xh(e,t);function e(r,o,s,i){var a;typeof o=="number"&&(s.duration=o,o=s,s=null),a=t.call(this,i?o:os(o))||this;var c=a.vars,u=c.duration,f=c.delay,m=c.immediateRender,p=c.stagger,b=c.overwrite,g=c.keyframes,h=c.defaults,x=c.scrollTrigger,C=o.parent||ke,_=(ct(r)||_h(r)?Rn(r[0]):"length"in o)?[r]:Vt(r),S,y,v,A,E,T,L,w;if(a._targets=_.length?Kc(_):ds("GSAP target "+r+" not found. https://gsap.com",!Dt.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=b,g||p||Qs(u)||Qs(f)){o=a.vars;var I=o.easeReverse||o.yoyoEase;if(S=a.timeline=new bt({data:"nested",defaults:h||{},targets:C&&C.data==="nested"?C.vars.targets:_}),S.kill(),S.parent=S._dp=Ln(a),S._start=0,p||Qs(u)||Qs(f)){if(A=_.length,L=p&&jh(p),mn(p))for(E in p)~qh.indexOf(E)&&(w||(w={}),w[E]=p[E]);for(y=0;y<A;y++)v=Ai(o,Zh),v.stagger=0,I&&(v.easeReverse=I),w&&po(v,w),T=_[y],v.duration=+is(u,Ln(a),y,T,_),v.delay=(+is(f,Ln(a),y,T,_)||0)-a._delay,!p&&A===1&&v.delay&&(a._delay=f=v.delay,a._start+=f,v.delay=0),S.to(T,v,L?L(y,T,_):0),S._ease=Ce.none;S.duration()?u=f=0:a.timeline=0}else if(g){os(Pt(S.vars.defaults,{ease:"none"})),S._ease=Er(g.ease||o.ease||"none");var N=0,k,j,P;if(ct(g))g.forEach(function(G){return S.to(_,G,">")}),S.duration();else{v={};for(E in g)E==="ease"||E==="easeEach"||mE(E,g[E],v,g.easeEach);for(E in v)for(k=v[E].sort(function(G,D){return G.t-D.t}),N=0,y=0;y<k.length;y++)j=k[y],P={ease:j.e,duration:(j.t-(y?k[y-1].t:0))/100*u},P[E]=j.v,S.to(_,P,N),N+=P.duration;S.duration()<u&&S.to({},{duration:u-S.duration()})}}u||a.duration(u=S.duration())}else a.timeline=0;return b===!0&&!zc&&(Yn=Ln(a),ke.killTweensOf(_),Yn=0),dn(C,Ln(a),s),o.reversed&&a.reverse(),o.paused&&a.paused(!0),(m||!u&&!g&&a._start===De(C._time)&&_t(m)&&VA(Ln(a))&&C.data!=="nested")&&(a._tTime=-Ee,a.render(Math.max(0,-f)||0)),x&&kh(Ln(a),x),a}var n=e.prototype;return n.render=function(o,s,i){var a=this._time,c=this._tDur,u=this._dur,f=o<0,m=o>c-Ee&&!f?c:o<Ee?0:o,p,b,g,h,x,C,_,S;if(!u)$A(this,o,s,i);else if(m!==this._tTime||!o||i||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==f||this._lazy){if(p=m,S=this.timeline,this._repeat){if(h=u+this._rDelay,this._repeat<-1&&f)return this.totalTime(h*100+o,s,i);if(p=De(m%h),m===c?(g=this._repeat,p=u):(x=De(m/h),g=~~x,g&&g===x?(p=u,g--):p>u&&(p=u)),C=this._yoyo&&g&1,C&&(p=u-p),x=ho(this._tTime,h),p===a&&!i&&this._initted&&g===x)return this._tTime=m,this;g!==x&&this.vars.repeatRefresh&&!C&&!this._lock&&p!==h&&this._initted&&(this._lock=i=1,this.render(De(h*g),!0).invalidate()._lock=0)}if(!this._initted){if(Oh(this,f?o:p,i,s,m))return this._tTime=0,this;if(a!==this._time&&!(i&&this.vars.repeatRefresh&&g!==x))return this;if(u!==this._dur)return this.render(o,s,i)}if(this._rEase){var y=p<a;if(y!==this._inv){var v=y?a:u-a;this._inv=y,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=a,this._invRecip=v?(y?-1:1)/v:0,this._invScale=y?-this.ratio:1-this.ratio,this._invEase=y?this._rEase:this._ease}this.ratio=_=this._invRatio+this._invScale*this._invEase((p-this._invTime)*this._invRecip)}else this.ratio=_=this._ease(p/u);if(this._from&&(this.ratio=_=1-_),this._tTime=m,this._time=p,!this._act&&this._ts&&(this._act=1,this._lazy=0),!a&&m&&!s&&!x&&(Rt(this,"onStart"),this._tTime!==m))return this;for(b=this._pt;b;)b.r(_,b.d),b=b._next;S&&S.render(o<0?o:S._dur*S._ease(p/this._dur),s,i)||this._startAt&&(this._zTime=o),this._onUpdate&&!s&&(f&&Sl(this,o,s,i),Rt(this,"onUpdate")),this._repeat&&g!==x&&this.vars.onRepeat&&!s&&this.parent&&Rt(this,"onRepeat"),(m===this._tDur||!m)&&this._tTime===m&&(f&&!this._onUpdate&&Sl(this,o,!0,!0),(o||!u)&&(m===this._tDur&&this._ts>0||!m&&this._ts<0)&&tr(this,1),!s&&!(f&&!a)&&(m||a||C)&&(Rt(this,m===c?"onComplete":"onReverseComplete",!0),this._prom&&!(m<c&&this.timeScale()>0)&&this._prom()))}return this},n.targets=function(){return this._targets},n.invalidate=function(o){return(!o||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(o),t.prototype.invalidate.call(this,o)},n.resetTo=function(o,s,i,a,c){ps||It.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),f;return this._initted||Qc(this,u),f=this._ease(u/this._dur),dE(this,o,s,i,a,f,u,c)?this.resetTo(o,s,i,a,1):(oa(this,0),this.parent||Nh(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},n.kill=function(o,s){if(s===void 0&&(s="all"),!o&&(!s||s==="all"))return this._lazy=this._pt=0,this.parent?ns(this):this.scrollTrigger&&this.scrollTrigger.kill(!!rt),this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(o,s,Yn&&Yn.vars.overwrite!==!0)._first||ns(this),this.parent&&i!==this.timeline.totalDuration()&&go(this,this._dur*this.timeline._tDur/i,0,1),this}var a=this._targets,c=o?Vt(o):a,u=this._ptLookup,f=this._pt,m,p,b,g,h,x,C;if((!s||s==="all")&&HA(a,c))return s==="all"&&(this._pt=0),ns(this);for(m=this._op=this._op||[],s!=="all"&&(qe(s)&&(h={},St(s,function(_){return h[_]=1}),s=h),s=fE(a,s)),C=a.length;C--;)if(~c.indexOf(a[C])){p=u[C],s==="all"?(m[C]=s,g=p,b={}):(b=m[C]=m[C]||{},g=s);for(h in g)x=p&&p[h],x&&((!("kill"in x.d)||x.d.kill(h)===!0)&&na(this,x,"_pt"),delete p[h]),b!=="all"&&(b[h]=1)}return this._initted&&!this._pt&&f&&ns(this),this},e.to=function(o,s){return new e(o,s,arguments[2])},e.from=function(o,s){return ss(1,arguments)},e.delayedCall=function(o,s,i,a){return new e(s,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:o,onComplete:s,onReverseComplete:s,onCompleteParams:i,onReverseCompleteParams:i,callbackScope:a})},e.fromTo=function(o,s,i){return ss(2,arguments)},e.set=function(o,s){return s.duration=0,s.repeatDelay||(s.repeat=0),new e(o,s)},e.killTweensOf=function(o,s,i){return ke.killTweensOf(o,s,i)},e})(hs);Pt(ze.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});St("staggerTo,staggerFrom,staggerFromTo",function(t){ze[t]=function(){var e=new bt,n=yl.call(arguments,0);return n.splice(t==="staggerFromTo"?5:4,0,0),e[t].apply(e,n)}});var Jc=function(e,n,r){return e[n]=r},Qh=function(e,n,r){return e[n](r)},pE=function(e,n,r,o){return e[n](o.fp,r)},hE=function(e,n,r){return e.setAttribute(n,r)},eu=function(e,n){return je(e[n])?Qh:Vc(e[n])&&e.setAttribute?hE:Jc},Jh=function(e,n){return n.set(n.t,n.p,Math.round((n.s+n.c*e)*1e6)/1e6,n)},gE=function(e,n){return n.set(n.t,n.p,!!(n.s+n.c*e),n)},eg=function(e,n){var r=n._pt,o="";if(!e&&n.b)o=n.b;else if(e===1&&n.e)o=n.e;else{for(;r;)o=r.p+(r.m?r.m(r.s+r.c*e):Math.round((r.s+r.c*e)*1e4)/1e4)+o,r=r._next;o+=n.c}n.set(n.t,n.p,o,n)},tu=function(e,n){for(var r=n._pt;r;)r.r(e,r.d),r=r._next},bE=function(e,n,r,o){for(var s=this._pt,i;s;)i=s._next,s.p===o&&s.modifier(e,n,r),s=i},xE=function(e){for(var n=this._pt,r,o;n;)o=n._next,n.p===e&&!n.op||n.op===e?na(this,n,"_pt"):n.dep||(r=1),n=o;return!r},CE=function(e,n,r,o){o.mSet(e,n,o.m.call(o.tween,r,o.mt),o)},tg=function(e){for(var n=e._pt,r,o,s,i;n;){for(r=n._next,o=s;o&&o.pr>n.pr;)o=o._next;(n._prev=o?o._prev:i)?n._prev._next=n:s=n,(n._next=o)?o._prev=n:i=n,n=r}e._pt=s},vt=(function(){function t(n,r,o,s,i,a,c,u,f){this.t=r,this.s=s,this.c=i,this.p=o,this.r=a||Jh,this.d=c||this,this.set=u||Jc,this.pr=f||0,this._next=n,n&&(n._prev=this)}var e=t.prototype;return e.modifier=function(r,o,s){this.mSet=this.mSet||this.set,this.set=CE,this.m=r,this.mt=s,this.tween=o},t})();St(Yc+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse",function(t){return Xc[t]=1});Ot.TweenMax=Ot.TweenLite=ze;Ot.TimelineLite=Ot.TimelineMax=bt;ke=new bt({sortChildren:!1,defaults:us,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Dt.stringFilter=Wh;var Lr=[],pi={},_E=[],jm=0,SE=0,ol=function(e){return(pi[e]||_E).map(function(n){return n()})},Ll=function(){var e=Date.now(),n=[];e-jm>2&&(ol("matchMediaInit"),Lr.forEach(function(r){var o=r.queries,s=r.conditions,i,a,c,u;for(a in o)i=un.matchMedia(o[a]).matches,i&&(c=1),i!==s[a]&&(s[a]=i,u=1);u&&(r.revert(),c&&n.push(r))}),ol("matchMediaRevert"),n.forEach(function(r){return r.onMatch(r,function(o){return r.add(null,o)})}),jm=e,ol("matchMedia"))},ng=(function(){function t(n,r){this.selector=r&&Tl(r),this.data=[],this._r=[],this.isReverted=!1,this.id=SE++,n&&this.add(n)}var e=t.prototype;return e.add=function(r,o,s){je(r)&&(s=o,o=r,r=je);var i=this,a=function(){var u=Ie,f=i.selector,m;return u&&u!==i&&u.data.push(i),s&&(i.selector=Tl(s)),Ie=i,m=o.apply(i,arguments),je(m)&&i._r.push(m),Ie=u,i.selector=f,i.isReverted=!1,m};return i.last=a,r===je?a(i,function(c){return i.add(null,c)}):r?i[r]=a:a},e.ignore=function(r){var o=Ie;Ie=null,r(this),Ie=o},e.getTweens=function(){var r=[];return this.data.forEach(function(o){return o instanceof t?r.push.apply(r,o.getTweens()):o instanceof ze&&!(o.parent&&o.parent.data==="nested")&&r.push(o)}),r},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(r,o){var s=this;if(r?(function(){for(var a=s.getTweens(),c=s.data.length,u;c--;)u=s.data[c],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(f){return a.splice(a.indexOf(f),1)}));for(a.map(function(f){return{g:f._dur||f._delay||f._sat&&!f._sat.vars.immediateRender?f.globalTime(0):-1/0,t:f}}).sort(function(f,m){return m.g-f.g||-1/0}).forEach(function(f){return f.t.revert(r)}),c=s.data.length;c--;)u=s.data[c],u instanceof bt?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof ze)&&u.revert&&u.revert(r);s._r.forEach(function(f){return f(r,s)}),s.isReverted=!0})():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),o)for(var i=Lr.length;i--;)Lr[i].id===this.id&&Lr.splice(i,1)},e.revert=function(r){this.kill(r||{})},t})(),vE=(function(){function t(n){this.contexts=[],this.scope=n,Ie&&Ie.data.push(this)}var e=t.prototype;return e.add=function(r,o,s){mn(r)||(r={matches:r});var i=new ng(0,s||this.scope),a=i.conditions={},c,u,f;Ie&&!i.selector&&(i.selector=Ie.selector),this.contexts.push(i),o=i.add("onMatch",o),i.queries=r;for(u in r)u==="all"?f=1:(c=un.matchMedia(r[u]),c&&(Lr.indexOf(i)<0&&Lr.push(i),(a[u]=c.matches)&&(f=1),c.addListener?c.addListener(Ll):c.addEventListener("change",Ll)));return f&&o(i,function(m){return i.add(null,m)}),this},e.revert=function(r){this.kill(r||{})},e.kill=function(r){this.contexts.forEach(function(o){return o.kill(r,!0)})},t})(),Li={registerPlugin:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n.forEach(function(o){return Vh(o)})},timeline:function(e){return new bt(e)},getTweensOf:function(e,n){return ke.getTweensOf(e,n)},getProperty:function(e,n,r,o){qe(e)&&(e=Vt(e)[0]);var s=Tr(e||{}).get,i=r?Rh:Ih;return r==="native"&&(r=""),e&&(n?i((wt[n]&&wt[n].get||s)(e,n,r,o)):function(a,c,u){return i((wt[a]&&wt[a].get||s)(e,a,c,u))})},quickSetter:function(e,n,r){if(e=Vt(e),e.length>1){var o=e.map(function(f){return At.quickSetter(f,n,r)}),s=o.length;return function(f){for(var m=s;m--;)o[m](f)}}e=e[0]||{};var i=wt[n],a=Tr(e),c=a.harness&&(a.harness.aliases||{})[n]||n,u=i?function(f){var m=new i;lo._pt=0,m.init(e,r?f+r:f,lo,0,[e]),m.render(1,m),lo._pt&&tu(1,lo)}:a.set(e,c);return i?u:function(f){return u(e,c,r?f+r:f,a,1)}},quickTo:function(e,n,r){var o,s=At.to(e,Pt((o={},o[n]="+=0.1",o.paused=!0,o.stagger=0,o),r||{})),i=function(c,u,f){return s.resetTo(n,c,u,f)};return i.tween=s,i},isTweening:function(e){return ke.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=Er(e.ease,us.ease)),Dm(us,e||{})},config:function(e){return Dm(Dt,e||{})},registerEffect:function(e){var n=e.name,r=e.effect,o=e.plugins,s=e.defaults,i=e.extendTimeline;(o||"").split(",").forEach(function(a){return a&&!wt[a]&&!Ot[a]&&ds(n+" effect requires "+a+" plugin.")}),el[n]=function(a,c,u){return r(Vt(a),Pt(c||{},s),u)},i&&(bt.prototype[n]=function(a,c,u){return this.add(el[n](a,mn(c)?c:(u=c)&&{},this),u)})},registerEase:function(e,n){Ce[e]=Er(n)},parseEase:function(e,n){return arguments.length?Er(e,n):Ce},getById:function(e){return ke.getById(e)},exportRoot:function(e,n){e===void 0&&(e={});var r=new bt(e),o,s;for(r.smoothChildTiming=_t(e.smoothChildTiming),ke.remove(r),r._dp=0,r._time=r._tTime=ke._time,o=ke._first;o;)s=o._next,(n||!(!o._dur&&o instanceof ze&&o.vars.onComplete===o._targets[0]))&&dn(r,o,o._start-o._delay),o=s;return dn(ke,r,0),r},context:function(e,n){return e?new ng(e,n):Ie},matchMedia:function(e){return new vE(e)},matchMediaRefresh:function(){return Lr.forEach(function(e){var n=e.conditions,r,o;for(o in n)n[o]&&(n[o]=!1,r=1);r&&e.revert()})||Ll()},addEventListener:function(e,n){var r=pi[e]||(pi[e]=[]);~r.indexOf(n)||r.push(n)},removeEventListener:function(e,n){var r=pi[e],o=r&&r.indexOf(n);o>=0&&r.splice(o,1)},utils:{wrap:JA,wrapYoyo:eE,distribute:jh,random:Fh,snap:Mh,normalize:QA,getUnit:lt,clamp:YA,splitColor:Uh,toArray:Vt,selector:Tl,mapRange:Hh,pipe:qA,unitize:ZA,interpolate:tE,shuffle:Bh},install:Th,effects:el,ticker:It,updateRoot:bt.updateRoot,plugins:wt,globalTimeline:ke,core:{PropTween:vt,globals:Ah,Tween:ze,Timeline:bt,Animation:hs,getCache:Tr,_removeLinkedListItem:na,reverting:function(){return rt},context:function(e){return e&&Ie&&(Ie.data.push(e),e._ctx=Ie),Ie},suppressOverwrites:function(e){return zc=e}}};St("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return Li[t]=ze[t]});It.add(bt.updateRoot);lo=Li.to({},{duration:0});var yE=function(e,n){for(var r=e._pt;r&&r.p!==n&&r.op!==n&&r.fp!==n;)r=r._next;return r},TE=function(e,n){var r=e._targets,o,s,i;for(o in n)for(s=r.length;s--;)i=e._ptLookup[s][o],i&&(i=i.d)&&(i._pt&&(i=yE(i,o)),i&&i.modifier&&i.modifier(n[o],e,r[s],o))},sl=function(e,n){return{name:e,headless:1,rawVars:1,init:function(o,s,i){i._onInit=function(a){var c,u;if(qe(s)&&(c={},St(s,function(f){return c[f]=1}),s=c),n){c={};for(u in s)c[u]=n(s[u]);s=c}TE(a,s)}}}},At=Li.registerPlugin({name:"attr",init:function(e,n,r,o,s){var i,a,c;this.tween=r;for(i in n)c=e.getAttribute(i)||"",a=this.add(e,"setAttribute",(c||0)+"",n[i],o,s,0,0,i),a.op=i,a.b=c,this._props.push(i)},render:function(e,n){for(var r=n._pt;r;)rt?r.set(r.t,r.p,r.b,r):r.r(e,r.d),r=r._next}},{name:"endArray",headless:1,init:function(e,n){for(var r=n.length;r--;)this.add(e,r,e[r]||0,n[r],0,0,0,0,0,1)}},sl("roundProps",Al),sl("modifiers"),sl("snap",Mh))||Li;ze.version=bt.version=At.version="3.15.0";yh=1;Uc()&&bo();Ce.Power0;Ce.Power1;Ce.Power2;Ce.Power3;Ce.Power4;Ce.Linear;Ce.Quad;Ce.Cubic;Ce.Quart;Ce.Quint;Ce.Strong;Ce.Elastic;Ce.Back;Ce.SteppedEase;Ce.Bounce;Ce.Sine;Ce.Expo;Ce.Circ;/*!
|
|
8
|
+
*/var Dt={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},us={duration:.5,overwrite:!1,delay:0},zc,rt,Ne,zt=1e8,Le=1/zt,xl=Math.PI*2,NA=xl/4,DA=0,Sh=Math.sqrt,kA=Math.cos,OA=Math.sin,qe=function(e){return typeof e=="string"},Me=function(e){return typeof e=="function"},In=function(e){return typeof e=="number"},Vc=function(e){return typeof e>"u"},mn=function(e){return typeof e=="object"},_t=function(e){return e!==!1},Uc=function(){return typeof window<"u"},Qs=function(e){return Me(e)||qe(e)},vh=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},ct=Array.isArray,PA=/random\([^)]+\)/g,BA=/,\s*/g,Dm=/(?:-?\.?\d|\.)+/gi,yh=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,ao=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Ja=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Th=/[+-]=-?[.\d]+/,jA=/[^,'"\[\]\s]+/gi,MA=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Oe,un,Cl,$c,Ot={},yi={},Ah,Eh=function(e){return(yi=po(e,Ot))&&At},Wc=function(e,n){return console.warn("Invalid property",e,"set to",n,"Missing plugin? gsap.registerPlugin()")},ds=function(e,n){return!n&&console.warn(e)},Lh=function(e,n){return e&&(Ot[e]=n)&&yi&&(yi[e]=n)||Ot},fs=function(){return 0},FA={suppressEvents:!0,isStart:!0,kill:!1},fi={suppressEvents:!0,kill:!1},GA={suppressEvents:!0},Xc={},Zn=[],_l={},wh,wt={},el={},km=30,mi=[],Yc="",Kc=function(e){var n=e[0],r,o;if(mn(n)||Me(n)||(e=[e]),!(r=(n._gsap||{}).harness)){for(o=mi.length;o--&&!mi[o].targetTest(n););r=mi[o]}for(o=e.length;o--;)e[o]&&(e[o]._gsap||(e[o]._gsap=new qh(e[o],r)))||e.splice(o,1);return e},Tr=function(e){return e._gsap||Kc(Vt(e))[0]._gsap},Rh=function(e,n,r){return(r=e[n])&&Me(r)?e[n]():Vc(r)&&e.getAttribute&&e.getAttribute(n)||r},St=function(e,n){return(e=e.split(",")).forEach(n)||e},He=function(e){return Math.round(e*1e5)/1e5||0},ke=function(e){return Math.round(e*1e7)/1e7||0},co=function(e,n){var r=n.charAt(0),o=parseFloat(n.substr(2));return e=parseFloat(e),r==="+"?e+o:r==="-"?e-o:r==="*"?e*o:e/o},HA=function(e,n){for(var r=n.length,o=0;e.indexOf(n[o])<0&&++o<r;);return o<r},Ti=function(){var e=Zn.length,n=Zn.slice(0),r,o;for(_l={},Zn.length=0,r=0;r<e;r++)o=n[r],o&&o._lazy&&(o.render(o._lazy[0],o._lazy[1],!0)._lazy=0)},qc=function(e){return!!(e._initted||e._startAt||e.add)},Ih=function(e,n,r,o){Zn.length&&!rt&&Ti(),e.render(n,r,!!(rt&&n<0&&qc(e))),Zn.length&&!rt&&Ti()},Nh=function(e){var n=parseFloat(e);return(n||n===0)&&(e+"").match(jA).length<2?n:qe(e)?e.trim():e},Dh=function(e){return e},Pt=function(e,n){for(var r in n)r in e||(e[r]=n[r]);return e},zA=function(e){return function(n,r){for(var o in r)o in n||o==="duration"&&e||o==="ease"||(n[o]=r[o])}},po=function(e,n){for(var r in n)e[r]=n[r];return e},Om=function t(e,n){for(var r in n)r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(e[r]=mn(n[r])?t(e[r]||(e[r]={}),n[r]):n[r]);return e},Ai=function(e,n){var r={},o;for(o in e)o in n||(r[o]=e[o]);return r},os=function(e){var n=e.parent||Oe,r=e.keyframes?zA(ct(e.keyframes)):Pt;if(_t(e.inherit))for(;n;)r(e,n.vars.defaults),n=n.parent||n._dp;return e},VA=function(e,n){for(var r=e.length,o=r===n.length;o&&r--&&e[r]===n[r];);return r<0},kh=function(e,n,r,o,s){var i=e[o],a;if(s)for(a=n[s];i&&i[s]>a;)i=i._prev;return i?(n._next=i._next,i._next=n):(n._next=e[r],e[r]=n),n._next?n._next._prev=n:e[o]=n,n._prev=i,n.parent=n._dp=e,n},na=function(e,n,r,o){r===void 0&&(r="_first"),o===void 0&&(o="_last");var s=n._prev,i=n._next;s?s._next=i:e[r]===n&&(e[r]=i),i?i._prev=s:e[o]===n&&(e[o]=s),n._next=n._prev=n.parent=null},tr=function(e,n){e.parent&&(!n||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},Ar=function(e,n){if(e&&(!n||n._end>e._dur||n._start<0))for(var r=e;r;)r._dirty=1,r=r.parent;return e},UA=function(e){for(var n=e.parent;n&&n.parent;)n._dirty=1,n.totalDuration(),n=n.parent;return e},Sl=function(e,n,r,o){return e._startAt&&(rt?e._startAt.revert(fi):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(n,!0,o))},$A=function t(e){return!e||e._ts&&t(e.parent)},Pm=function(e){return e._repeat?ho(e._tTime,e=e.duration()+e._rDelay)*e:0},ho=function(e,n){var r=Math.floor(e=ke(e/n));return e&&r===e?r-1:r},Ei=function(e,n){return(e-n._start)*n._ts+(n._ts>=0?0:n._dirty?n.totalDuration():n._tDur)},ra=function(e){return e._end=ke(e._start+(e._tDur/Math.abs(e._ts||e._rts||Le)||0))},oa=function(e,n){var r=e._dp;return r&&r.smoothChildTiming&&e._ts&&(e._start=ke(r._time-(e._ts>0?n/e._ts:((e._dirty?e.totalDuration():e._tDur)-n)/-e._ts)),ra(e),r._dirty||Ar(r,e)),e},Oh=function(e,n){var r;if((n._time||!n._dur&&n._initted||n._start<e._time&&(n._dur||!n.add))&&(r=Ei(e.rawTime(),n),(!n._dur||_s(0,n.totalDuration(),r)-n._tTime>Le)&&n.render(r,!0)),Ar(e,n)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(r=e;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),r=r._dp;e._zTime=-Le}},dn=function(e,n,r,o){return n.parent&&tr(n),n._start=ke((In(r)?r:r||e!==Oe?Ht(e,r,n):e._time)+n._delay),n._end=ke(n._start+(n.totalDuration()/Math.abs(n.timeScale())||0)),kh(e,n,"_first","_last",e._sort?"_start":0),vl(n)||(e._recent=n),o||Oh(e,n),e._ts<0&&oa(e,e._tTime),e},Ph=function(e,n){return(Ot.ScrollTrigger||Wc("scrollTrigger",n))&&Ot.ScrollTrigger.create(n,e)},Bh=function(e,n,r,o,s){if(Qc(e,n,s),!e._initted)return 1;if(!r&&e._pt&&!rt&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&wh!==Rt.frame)return Zn.push(e),e._lazy=[s,o],1},WA=function t(e){var n=e.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||t(n))},vl=function(e){var n=e.data;return n==="isFromStart"||n==="isStart"},XA=function(e,n,r,o){var s=e.ratio,i=n<0||!n&&(!e._start&&WA(e)&&!(!e._initted&&vl(e))||(e._ts<0||e._dp._ts<0)&&!vl(e))?0:1,a=e._rDelay,c=0,u,f,m;if(a&&e._repeat&&(c=_s(0,e._tDur,n),f=ho(c,a),e._yoyo&&f&1&&(i=1-i),f!==ho(e._tTime,a)&&(s=1-i,e.vars.repeatRefresh&&e._initted&&e.invalidate())),i!==s||rt||o||e._zTime===Le||!n&&e._zTime){if(!e._initted&&Bh(e,n,o,r,c))return;for(m=e._zTime,e._zTime=n||(r?Le:0),r||(r=n&&!m),e.ratio=i,e._from&&(i=1-i),e._time=0,e._tTime=c,u=e._pt;u;)u.r(i,u.d),u=u._next;n<0&&Sl(e,n,r,!0),e._onUpdate&&!r&&It(e,"onUpdate"),c&&e._repeat&&!r&&e.parent&&It(e,"onRepeat"),(n>=e._tDur||n<0)&&e.ratio===i&&(i&&tr(e,1),!r&&!rt&&(It(e,i?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=n)},YA=function(e,n,r){var o;if(r>n)for(o=e._first;o&&o._start<=r;){if(o.data==="isPause"&&o._start>n)return o;o=o._next}else for(o=e._last;o&&o._start>=r;){if(o.data==="isPause"&&o._start<n)return o;o=o._prev}},go=function(e,n,r,o){var s=e._repeat,i=ke(n)||0,a=e._tTime/e._tDur;return a&&!o&&(e._time*=i/e._dur),e._dur=i,e._tDur=s?s<0?1e10:ke(i*(s+1)+e._rDelay*s):i,a>0&&!o&&oa(e,e._tTime=e._tDur*a),e.parent&&ra(e),r||Ar(e.parent,e),e},Bm=function(e){return e instanceof bt?Ar(e):go(e,e._dur)},KA={_start:0,endTime:fs,totalDuration:fs},Ht=function t(e,n,r){var o=e.labels,s=e._recent||KA,i=e.duration()>=zt?s.endTime(!1):e._dur,a,c,u;return qe(n)&&(isNaN(n)||n in o)?(c=n.charAt(0),u=n.substr(-1)==="%",a=n.indexOf("="),c==="<"||c===">"?(a>=0&&(n=n.replace(/=/,"")),(c==="<"?s._start:s.endTime(s._repeat>=0))+(parseFloat(n.substr(1))||0)*(u?(a<0?s:r).totalDuration()/100:1)):a<0?(n in o||(o[n]=i),o[n]):(c=parseFloat(n.charAt(a-1)+n.substr(a+1)),u&&r&&(c=c/100*(ct(r)?r[0]:r).totalDuration()),a>1?t(e,n.substr(0,a-1),r)+c:i+c)):n==null?i:+n},ss=function(e,n,r){var o=In(n[1]),s=(o?2:1)+(e<2?0:1),i=n[s],a,c;if(o&&(i.duration=n[1]),i.parent=r,e){for(a=i,c=r;c&&!("immediateRender"in a);)a=c.vars.defaults||{},c=_t(c.vars.inherit)&&c.parent;i.immediateRender=_t(a.immediateRender),e<2?i.runBackwards=1:i.startAt=n[s-1]}return new Ve(n[0],i,n[s+1])},sr=function(e,n){return e||e===0?n(e):n},_s=function(e,n,r){return r<e?e:r>n?n:r},lt=function(e,n){return!qe(e)||!(n=MA.exec(e))?"":n[1]},qA=function(e,n,r){return sr(r,function(o){return _s(e,n,o)})},yl=[].slice,jh=function(e,n){return e&&mn(e)&&"length"in e&&(!n&&!e.length||e.length-1 in e&&mn(e[0]))&&!e.nodeType&&e!==un},ZA=function(e,n,r){return r===void 0&&(r=[]),e.forEach(function(o){var s;return qe(o)&&!n||jh(o,1)?(s=r).push.apply(s,Vt(o)):r.push(o)})||r},Vt=function(e,n,r){return Ne&&!n&&Ne.selector?Ne.selector(e):qe(e)&&!r&&(Cl||!bo())?yl.call((n||$c).querySelectorAll(e),0):ct(e)?ZA(e,r):jh(e)?yl.call(e,0):e?[e]:[]},Tl=function(e){return e=Vt(e)[0]||ds("Invalid scope")||{},function(n){var r=e.current||e.nativeElement||e;return Vt(n,r.querySelectorAll?r:r===e?ds("Invalid scope")||$c.createElement("div"):e)}},Mh=function(e){return e.sort(function(){return .5-Math.random()})},Fh=function(e){if(Me(e))return e;var n=mn(e)?e:{each:e},r=Er(n.ease),o=n.from||0,s=parseFloat(n.base)||0,i={},a=o>0&&o<1,c=isNaN(o)||a,u=n.axis,f=o,m=o;return qe(o)?f=m={center:.5,edges:.5,end:1}[o]||0:!a&&c&&(f=o[0],m=o[1]),function(p,b,g){var h=(g||n).length,x=i[h],C,_,v,y,S,A,E,T,L;if(!x){if(L=n.grid==="auto"?0:(n.grid||[1,zt])[1],!L){for(E=-zt;E<(E=g[L++].getBoundingClientRect().left)&&L<h;);L<h&&L--}for(x=i[h]=[],C=c?Math.min(L,h)*f-.5:o%L,_=L===zt?0:c?h*m/L-.5:o/L|0,E=0,T=zt,A=0;A<h;A++)v=A%L-C,y=_-(A/L|0),x[A]=S=u?Math.abs(u==="y"?y:v):Sh(v*v+y*y),S>E&&(E=S),S<T&&(T=S);o==="random"&&Mh(x),x.max=E-T,x.min=T,x.v=h=(parseFloat(n.amount)||parseFloat(n.each)*(L>h?h-1:u?u==="y"?h/L:L:Math.max(L,h/L))||0)*(o==="edges"?-1:1),x.b=h<0?s-h:s,x.u=lt(n.amount||n.each)||0,r=r&&h<0?uE(r):r}return h=(x[p]-x.min)/x.max||0,ke(x.b+(r?r(h):h)*x.v)+x.u}},Al=function(e){var n=Math.pow(10,((e+"").split(".")[1]||"").length);return function(r){var o=ke(Math.round(parseFloat(r)/e)*e*n);return(o-o%1)/n+(In(r)?0:lt(r))}},Gh=function(e,n){var r=ct(e),o,s;return!r&&mn(e)&&(o=r=e.radius||zt,e.values?(e=Vt(e.values),(s=!In(e[0]))&&(o*=o)):e=Al(e.increment)),sr(n,r?Me(e)?function(i){return s=e(i),Math.abs(s-i)<=o?s:i}:function(i){for(var a=parseFloat(s?i.x:i),c=parseFloat(s?i.y:0),u=zt,f=0,m=e.length,p,b;m--;)s?(p=e[m].x-a,b=e[m].y-c,p=p*p+b*b):p=Math.abs(e[m]-a),p<u&&(u=p,f=m);return f=!o||u<=o?e[f]:i,s||f===i||In(i)?f:f+lt(i)}:Al(e))},Hh=function(e,n,r,o){return sr(ct(e)?!n:r===!0?!!(r=0):!o,function(){return ct(e)?e[~~(Math.random()*e.length)]:(r=r||1e-5)&&(o=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((e-r/2+Math.random()*(n-e+r*.99))/r)*r*o)/o})},QA=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return function(o){return n.reduce(function(s,i){return i(s)},o)}},JA=function(e,n){return function(r){return e(parseFloat(r))+(n||lt(r))}},eE=function(e,n,r){return Vh(e,n,0,1,r)},zh=function(e,n,r){return sr(r,function(o){return e[~~n(o)]})},tE=function t(e,n,r){var o=n-e;return ct(e)?zh(e,t(0,e.length),n):sr(r,function(s){return(o+(s-e)%o)%o+e})},nE=function t(e,n,r){var o=n-e,s=o*2;return ct(e)?zh(e,t(0,e.length-1),n):sr(r,function(i){return i=(s+(i-e)%s)%s||0,e+(i>o?s-i:i)})},ms=function(e){return e.replace(PA,function(n){var r=n.indexOf("[")+1,o=n.substring(r||7,r?n.indexOf("]"):n.length-1).split(BA);return Hh(r?o:+o[0],r?0:+o[1],+o[2]||1e-5)})},Vh=function(e,n,r,o,s){var i=n-e,a=o-r;return sr(s,function(c){return r+((c-e)/i*a||0)})},rE=function t(e,n,r,o){var s=isNaN(e+n)?0:function(b){return(1-b)*e+b*n};if(!s){var i=qe(e),a={},c,u,f,m,p;if(r===!0&&(o=1)&&(r=null),i)e={p:e},n={p:n};else if(ct(e)&&!ct(n)){for(f=[],m=e.length,p=m-2,u=1;u<m;u++)f.push(t(e[u-1],e[u]));m--,s=function(g){g*=m;var h=Math.min(p,~~g);return f[h](g-h)},r=n}else o||(e=po(ct(e)?[]:{},e));if(!f){for(c in n)Zc.call(a,e,c,"get",n[c]);s=function(g){return tu(g,a)||(i?e.p:e)}}}return sr(r,s)},jm=function(e,n,r){var o=e.labels,s=zt,i,a,c;for(i in o)a=o[i]-n,a<0==!!r&&a&&s>(a=Math.abs(a))&&(c=i,s=a);return c},It=function(e,n,r){var o=e.vars,s=o[n],i=Ne,a=e._ctx,c,u,f;if(s)return c=o[n+"Params"],u=o.callbackScope||e,r&&Zn.length&&Ti(),a&&(Ne=a),f=c?s.apply(u,c):s.call(u),Ne=i,f},ns=function(e){return tr(e),e.scrollTrigger&&e.scrollTrigger.kill(!!rt),e.progress()<1&&It(e,"onInterrupt"),e},lo,Uh=[],$h=function(e){if(e)if(e=!e.name&&e.default||e,Uc()||e.headless){var n=e.name,r=Me(e),o=n&&!r&&e.init?function(){this._props=[]}:e,s={init:fs,render:tu,add:Zc,kill:_E,modifier:CE,rawVars:0},i={targetTest:0,get:0,getSetter:eu,aliases:{},register:0};if(bo(),e!==o){if(wt[n])return;Pt(o,Pt(Ai(e,s),i)),po(o.prototype,po(s,Ai(e,i))),wt[o.prop=n]=o,e.targetTest&&(mi.push(o),Xc[n]=1),n=(n==="css"?"CSS":n.charAt(0).toUpperCase()+n.substr(1))+"Plugin"}Lh(n,o),e.register&&e.register(At,o,vt)}else Uh.push(e)},Ee=255,rs={aqua:[0,Ee,Ee],lime:[0,Ee,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Ee],navy:[0,0,128],white:[Ee,Ee,Ee],olive:[128,128,0],yellow:[Ee,Ee,0],orange:[Ee,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Ee,0,0],pink:[Ee,192,203],cyan:[0,Ee,Ee],transparent:[Ee,Ee,Ee,0]},tl=function(e,n,r){return e+=e<0?1:e>1?-1:0,(e*6<1?n+(r-n)*e*6:e<.5?r:e*3<2?n+(r-n)*(2/3-e)*6:n)*Ee+.5|0},Wh=function(e,n,r){var o=e?In(e)?[e>>16,e>>8&Ee,e&Ee]:0:rs.black,s,i,a,c,u,f,m,p,b,g;if(!o){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),rs[e])o=rs[e];else if(e.charAt(0)==="#"){if(e.length<6&&(s=e.charAt(1),i=e.charAt(2),a=e.charAt(3),e="#"+s+s+i+i+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return o=parseInt(e.substr(1,6),16),[o>>16,o>>8&Ee,o&Ee,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),o=[e>>16,e>>8&Ee,e&Ee]}else if(e.substr(0,3)==="hsl"){if(o=g=e.match(Dm),!n)c=+o[0]%360/360,u=+o[1]/100,f=+o[2]/100,i=f<=.5?f*(u+1):f+u-f*u,s=f*2-i,o.length>3&&(o[3]*=1),o[0]=tl(c+1/3,s,i),o[1]=tl(c,s,i),o[2]=tl(c-1/3,s,i);else if(~e.indexOf("="))return o=e.match(yh),r&&o.length<4&&(o[3]=1),o}else o=e.match(Dm)||rs.transparent;o=o.map(Number)}return n&&!g&&(s=o[0]/Ee,i=o[1]/Ee,a=o[2]/Ee,m=Math.max(s,i,a),p=Math.min(s,i,a),f=(m+p)/2,m===p?c=u=0:(b=m-p,u=f>.5?b/(2-m-p):b/(m+p),c=m===s?(i-a)/b+(i<a?6:0):m===i?(a-s)/b+2:(s-i)/b+4,c*=60),o[0]=~~(c+.5),o[1]=~~(u*100+.5),o[2]=~~(f*100+.5)),r&&o.length<4&&(o[3]=1),o},Xh=function(e){var n=[],r=[],o=-1;return e.split(Qn).forEach(function(s){var i=s.match(ao)||[];n.push.apply(n,i),r.push(o+=i.length+1)}),n.c=r,n},Mm=function(e,n,r){var o="",s=(e+o).match(Qn),i=n?"hsla(":"rgba(",a=0,c,u,f,m;if(!s)return e;if(s=s.map(function(p){return(p=Wh(p,n,1))&&i+(n?p[0]+","+p[1]+"%,"+p[2]+"%,"+p[3]:p.join(","))+")"}),r&&(f=Xh(e),c=r.c,c.join(o)!==f.c.join(o)))for(u=e.replace(Qn,"1").split(ao),m=u.length-1;a<m;a++)o+=u[a]+(~c.indexOf(a)?s.shift()||i+"0,0,0,0)":(f.length?f:s.length?s:r).shift());if(!u)for(u=e.split(Qn),m=u.length-1;a<m;a++)o+=u[a]+s[a];return o+u[m]},Qn=(function(){var t="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in rs)t+="|"+e+"\\b";return new RegExp(t+")","gi")})(),oE=/hsl[a]?\(/,Yh=function(e){var n=e.join(" "),r;if(Qn.lastIndex=0,Qn.test(n))return r=oE.test(n),e[1]=Mm(e[1],r),e[0]=Mm(e[0],r,Xh(e[1])),!0},ps,Rt=(function(){var t=Date.now,e=500,n=33,r=t(),o=r,s=1e3/240,i=s,a=[],c,u,f,m,p,b,g=function h(x){var C=t()-o,_=x===!0,v,y,S,A;if((C>e||C<0)&&(r+=C-n),o+=C,S=o-r,v=S-i,(v>0||_)&&(A=++m.frame,p=S-m.time*1e3,m.time=S=S/1e3,i+=v+(v>=s?4:s-v),y=1),_||(c=u(h)),y)for(b=0;b<a.length;b++)a[b](S,p,A,x)};return m={time:0,frame:0,tick:function(){g(!0)},deltaRatio:function(x){return p/(1e3/(x||60))},wake:function(){Ah&&(!Cl&&Uc()&&(un=Cl=window,$c=un.document||{},Ot.gsap=At,(un.gsapVersions||(un.gsapVersions=[])).push(At.version),Eh(yi||un.GreenSockGlobals||!un.gsap&&un||{}),Uh.forEach($h)),f=typeof requestAnimationFrame<"u"&&requestAnimationFrame,c&&m.sleep(),u=f||function(x){return setTimeout(x,i-m.time*1e3+1|0)},ps=1,g(2))},sleep:function(){(f?cancelAnimationFrame:clearTimeout)(c),ps=0,u=fs},lagSmoothing:function(x,C){e=x||1/0,n=Math.min(C||33,e)},fps:function(x){s=1e3/(x||240),i=m.time*1e3+s},add:function(x,C,_){var v=C?function(y,S,A,E){x(y,S,A,E),m.remove(v)}:x;return m.remove(x),a[_?"unshift":"push"](v),bo(),v},remove:function(x,C){~(C=a.indexOf(x))&&a.splice(C,1)&&b>=C&&b--},_listeners:a},m})(),bo=function(){return!ps&&Rt.wake()},Ce={},sE=/^[\d.\-M][\d.\-,\s]/,iE=/["']/g,aE=function(e){for(var n={},r=e.substr(1,e.length-3).split(":"),o=r[0],s=1,i=r.length,a,c,u;s<i;s++)c=r[s],a=s!==i-1?c.lastIndexOf(","):c.length,u=c.substr(0,a),n[o]=isNaN(u)?u.replace(iE,"").trim():+u,o=c.substr(a+1).trim();return n},lE=function(e){var n=e.indexOf("(")+1,r=e.indexOf(")"),o=e.indexOf("(",n);return e.substring(n,~o&&o<r?e.indexOf(")",r+1):r)},cE=function(e){var n=(e+"").split("("),r=Ce[n[0]];return r&&n.length>1&&r.config?r.config.apply(null,~e.indexOf("{")?[aE(n[1])]:lE(e).split(",").map(Nh)):Ce._CE&&sE.test(e)?Ce._CE("",e):r},uE=function(e){return function(n){return 1-e(1-n)}},Er=function(e,n){return e&&(Me(e)?e:Ce[e]||cE(e))||n},Pr=function(e,n,r,o){r===void 0&&(r=function(c){return 1-n(1-c)}),o===void 0&&(o=function(c){return c<.5?n(c*2)/2:1-n((1-c)*2)/2});var s={easeIn:n,easeOut:r,easeInOut:o},i;return St(e,function(a){Ce[a]=Ot[a]=s,Ce[i=a.toLowerCase()]=r;for(var c in s)Ce[i+(c==="easeIn"?".in":c==="easeOut"?".out":".inOut")]=Ce[a+"."+c]=s[c]}),s},Kh=function(e){return function(n){return n<.5?(1-e(1-n*2))/2:.5+e((n-.5)*2)/2}},nl=function t(e,n,r){var o=n>=1?n:1,s=(r||(e?.3:.45))/(n<1?n:1),i=s/xl*(Math.asin(1/o)||0),a=function(f){return f===1?1:o*Math.pow(2,-10*f)*OA((f-i)*s)+1},c=e==="out"?a:e==="in"?function(u){return 1-a(1-u)}:Kh(a);return s=xl/s,c.config=function(u,f){return t(e,u,f)},c},rl=function t(e,n){n===void 0&&(n=1.70158);var r=function(i){return i?--i*i*((n+1)*i+n)+1:0},o=e==="out"?r:e==="in"?function(s){return 1-r(1-s)}:Kh(r);return o.config=function(s){return t(e,s)},o};St("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var n=e<5?e+1:e;Pr(t+",Power"+(n-1),e?function(r){return Math.pow(r,n)}:function(r){return r},function(r){return 1-Math.pow(1-r,n)},function(r){return r<.5?Math.pow(r*2,n)/2:1-Math.pow((1-r)*2,n)/2})});Ce.Linear.easeNone=Ce.none=Ce.Linear.easeIn;Pr("Elastic",nl("in"),nl("out"),nl());(function(t,e){var n=1/e,r=2*n,o=2.5*n,s=function(a){return a<n?t*a*a:a<r?t*Math.pow(a-1.5/e,2)+.75:a<o?t*(a-=2.25/e)*a+.9375:t*Math.pow(a-2.625/e,2)+.984375};Pr("Bounce",function(i){return 1-s(1-i)},s)})(7.5625,2.75);Pr("Expo",function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)});Pr("Circ",function(t){return-(Sh(1-t*t)-1)});Pr("Sine",function(t){return t===1?1:-kA(t*NA)+1});Pr("Back",rl("in"),rl("out"),rl());Ce.SteppedEase=Ce.steps=Ot.SteppedEase={config:function(e,n){e===void 0&&(e=1);var r=1/e,o=e+(n?0:1),s=n?1:0,i=1-Le;return function(a){return((o*_s(0,i,a)|0)+s)*r}}};us.ease=Ce["quad.out"];St("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return Yc+=t+","+t+"Params,"});var qh=function(e,n){this.id=DA++,e._gsap=this,this.target=e,this.harness=n,this.get=n?n.get:Rh,this.set=n?n.getSetter:eu},hs=(function(){function t(n){this.vars=n,this._delay=+n.delay||0,(this._repeat=n.repeat===1/0?-2:n.repeat||0)&&(this._rDelay=n.repeatDelay||0,this._yoyo=!!n.yoyo||!!n.yoyoEase),this._ts=1,go(this,+n.duration,1,1),this.data=n.data,Ne&&(this._ctx=Ne,Ne.data.push(this)),ps||Rt.wake()}var e=t.prototype;return e.delay=function(r){return r||r===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+r-this._delay),this._delay=r,this):this._delay},e.duration=function(r){return arguments.length?this.totalDuration(this._repeat>0?r+(r+this._rDelay)*this._repeat:r):this.totalDuration()&&this._dur},e.totalDuration=function(r){return arguments.length?(this._dirty=0,go(this,this._repeat<0?r:(r-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(r,o){if(bo(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(oa(this,r),!s._dp||s.parent||Oh(s,this);s&&s.parent;)s.parent._time!==s._start+(s._ts>=0?s._tTime/s._ts:(s.totalDuration()-s._tTime)/-s._ts)&&s.totalTime(s._tTime,!0),s=s.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&r<this._tDur||this._ts<0&&r>0||!this._tDur&&!r)&&dn(this._dp,this,this._start-this._delay)}return(this._tTime!==r||!this._dur&&!o||this._initted&&Math.abs(this._zTime)===Le||!this._initted&&this._dur&&r||!r&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=r),Ih(this,r,o)),this},e.time=function(r,o){return arguments.length?this.totalTime(Math.min(this.totalDuration(),r+Pm(this))%(this._dur+this._rDelay)||(r?this._dur:0),o):this._time},e.totalProgress=function(r,o){return arguments.length?this.totalTime(this.totalDuration()*r,o):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(r,o){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-r:r)+Pm(this),o):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(r,o){var s=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(r-1)*s,o):this._repeat?ho(this._tTime,s)+1:1},e.timeScale=function(r,o){if(!arguments.length)return this._rts===-Le?0:this._rts;if(this._rts===r)return this;var s=this.parent&&this._ts?Ei(this.parent._time,this):this._tTime;return this._rts=+r||0,this._ts=this._ps||r===-Le?0:this._rts,this.totalTime(_s(-Math.abs(this._delay),this.totalDuration(),s),o!==!1),ra(this),UA(this)},e.paused=function(r){return arguments.length?(this._ps!==r&&(this._ps=r,r?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(bo(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==Le&&(this._tTime-=Le)))),this):this._ps},e.startTime=function(r){if(arguments.length){this._start=ke(r);var o=this.parent||this._dp;return o&&(o._sort||!this.parent)&&dn(o,this,this._start-this._delay),this}return this._start},e.endTime=function(r){return this._start+(_t(r)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(r){var o=this.parent||this._dp;return o?r&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Ei(o.rawTime(r),this):this._tTime:this._tTime},e.revert=function(r){r===void 0&&(r=GA);var o=rt;return rt=r,qc(this)&&(this.timeline&&this.timeline.revert(r),this.totalTime(-.01,r.suppressEvents)),this.data!=="nested"&&r.kill!==!1&&this.kill(),rt=o,this},e.globalTime=function(r){for(var o=this,s=arguments.length?r:o.rawTime();o;)s=o._start+s/(Math.abs(o._ts)||1),o=o._dp;return!this.parent&&this._sat?this._sat.globalTime(r):s},e.repeat=function(r){return arguments.length?(this._repeat=r===1/0?-2:r,Bm(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(r){if(arguments.length){var o=this._time;return this._rDelay=r,Bm(this),o?this.time(o):this}return this._rDelay},e.yoyo=function(r){return arguments.length?(this._yoyo=r,this):this._yoyo},e.seek=function(r,o){return this.totalTime(Ht(this,r),_t(o))},e.restart=function(r,o){return this.play().totalTime(r?-this._delay:0,_t(o)),this._dur||(this._zTime=-Le),this},e.play=function(r,o){return r!=null&&this.seek(r,o),this.reversed(!1).paused(!1)},e.reverse=function(r,o){return r!=null&&this.seek(r||this.totalDuration(),o),this.reversed(!0).paused(!1)},e.pause=function(r,o){return r!=null&&this.seek(r,o),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(r){return arguments.length?(!!r!==this.reversed()&&this.timeScale(-this._rts||(r?-Le:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-Le,this},e.isActive=function(){var r=this.parent||this._dp,o=this._start,s;return!!(!r||this._ts&&this._initted&&r.isActive()&&(s=r.rawTime(!0))>=o&&s<this.endTime(!0)-Le)},e.eventCallback=function(r,o,s){var i=this.vars;return arguments.length>1?(o?(i[r]=o,s&&(i[r+"Params"]=s),r==="onUpdate"&&(this._onUpdate=o)):delete i[r],this):i[r]},e.then=function(r){var o=this,s=o._prom;return new Promise(function(i){var a=Me(r)?r:Dh,c=function(){var f=o.then;o.then=null,s&&s(),Me(a)&&(a=a(o))&&(a.then||a===o)&&(o.then=f),i(a),o.then=f};o._initted&&o.totalProgress()===1&&o._ts>=0||!o._tTime&&o._ts<0?c():o._prom=c})},e.kill=function(){ns(this)},t})();Pt(hs.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-Le,_prom:0,_ps:!1,_rts:1});var bt=(function(t){_h(e,t);function e(r,o){var s;return r===void 0&&(r={}),s=t.call(this,r)||this,s.labels={},s.smoothChildTiming=!!r.smoothChildTiming,s.autoRemoveChildren=!!r.autoRemoveChildren,s._sort=_t(r.sortChildren),Oe&&dn(r.parent||Oe,Ln(s),o),r.reversed&&s.reverse(),r.paused&&s.paused(!0),r.scrollTrigger&&Ph(Ln(s),r.scrollTrigger),s}var n=e.prototype;return n.to=function(o,s,i){return ss(0,arguments,this),this},n.from=function(o,s,i){return ss(1,arguments,this),this},n.fromTo=function(o,s,i,a){return ss(2,arguments,this),this},n.set=function(o,s,i){return s.duration=0,s.parent=this,os(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new Ve(o,s,Ht(this,i),1),this},n.call=function(o,s,i){return dn(this,Ve.delayedCall(0,o,s),i)},n.staggerTo=function(o,s,i,a,c,u,f){return i.duration=s,i.stagger=i.stagger||a,i.onComplete=u,i.onCompleteParams=f,i.parent=this,new Ve(o,i,Ht(this,c)),this},n.staggerFrom=function(o,s,i,a,c,u,f){return i.runBackwards=1,os(i).immediateRender=_t(i.immediateRender),this.staggerTo(o,s,i,a,c,u,f)},n.staggerFromTo=function(o,s,i,a,c,u,f,m){return a.startAt=i,os(a).immediateRender=_t(a.immediateRender),this.staggerTo(o,s,a,c,u,f,m)},n.render=function(o,s,i){var a=this._time,c=this._dirty?this.totalDuration():this._tDur,u=this._dur,f=o<=0?0:ke(o),m=this._zTime<0!=o<0&&(this._initted||!u),p,b,g,h,x,C,_,v,y,S,A,E;if(this!==Oe&&f>c&&o>=0&&(f=c),f!==this._tTime||i||m){if(a!==this._time&&u&&(f+=this._time-a,o+=this._time-a),p=f,y=this._start,v=this._ts,C=!v,m&&(u||(a=this._zTime),(o||!s)&&(this._zTime=o)),this._repeat){if(A=this._yoyo,x=u+this._rDelay,this._repeat<-1&&o<0)return this.totalTime(x*100+o,s,i);if(p=ke(f%x),f===c?(h=this._repeat,p=u):(S=ke(f/x),h=~~S,h&&h===S&&(p=u,h--),p>u&&(p=u)),S=ho(this._tTime,x),!a&&this._tTime&&S!==h&&this._tTime-S*x-this._dur<=0&&(S=h),A&&h&1&&(p=u-p,E=1),h!==S&&!this._lock){var T=A&&S&1,L=T===(A&&h&1);if(h<S&&(T=!T),a=T?0:f%u?u:f,this._lock=1,this.render(a||(E?0:ke(h*x)),s,!u)._lock=0,this._tTime=f,!s&&this.parent&&It(this,"onRepeat"),this.vars.repeatRefresh&&!E&&(this.invalidate()._lock=1,S=h),a&&a!==this._time||C!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,c=this._tDur,L&&(this._lock=2,a=T?u:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!E&&this.invalidate()),this._lock=0,!this._ts&&!C)return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(_=YA(this,ke(a),ke(p)),_&&(f-=p-(p=_._start))),this._tTime=f,this._time=p,this._act=!!v,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=o,a=0),!a&&f&&u&&!s&&!S&&(It(this,"onStart"),this._tTime!==f))return this;if(p>=a&&o>=0)for(b=this._first;b;){if(g=b._next,(b._act||p>=b._start)&&b._ts&&_!==b){if(b.parent!==this)return this.render(o,s,i);if(b.render(b._ts>0?(p-b._start)*b._ts:(b._dirty?b.totalDuration():b._tDur)+(p-b._start)*b._ts,s,i),p!==this._time||!this._ts&&!C){_=0,g&&(f+=this._zTime=-Le);break}}b=g}else{b=this._last;for(var w=o<0?o:p;b;){if(g=b._prev,(b._act||w<=b._end)&&b._ts&&_!==b){if(b.parent!==this)return this.render(o,s,i);if(b.render(b._ts>0?(w-b._start)*b._ts:(b._dirty?b.totalDuration():b._tDur)+(w-b._start)*b._ts,s,i||rt&&qc(b)),p!==this._time||!this._ts&&!C){_=0,g&&(f+=this._zTime=w?-Le:Le);break}}b=g}}if(_&&!s&&(this.pause(),_.render(p>=a?0:-Le)._zTime=p>=a?1:-1,this._ts))return this._start=y,ra(this),this.render(o,s,i);this._onUpdate&&!s&&It(this,"onUpdate",!0),(f===c&&this._tTime>=this.totalDuration()||!f&&a)&&(y===this._start||Math.abs(v)!==Math.abs(this._ts))&&(this._lock||((o||!u)&&(f===c&&this._ts>0||!f&&this._ts<0)&&tr(this,1),!s&&!(o<0&&!a)&&(f||a||!c)&&(It(this,f===c&&o>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(f<c&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(o,s){var i=this;if(In(s)||(s=Ht(this,s,o)),!(o instanceof hs)){if(ct(o))return o.forEach(function(a){return i.add(a,s)}),this;if(qe(o))return this.addLabel(o,s);if(Me(o))o=Ve.delayedCall(0,o);else return this}return this!==o?dn(this,o,s):this},n.getChildren=function(o,s,i,a){o===void 0&&(o=!0),s===void 0&&(s=!0),i===void 0&&(i=!0),a===void 0&&(a=-zt);for(var c=[],u=this._first;u;)u._start>=a&&(u instanceof Ve?s&&c.push(u):(i&&c.push(u),o&&c.push.apply(c,u.getChildren(!0,s,i)))),u=u._next;return c},n.getById=function(o){for(var s=this.getChildren(1,1,1),i=s.length;i--;)if(s[i].vars.id===o)return s[i]},n.remove=function(o){return qe(o)?this.removeLabel(o):Me(o)?this.killTweensOf(o):(o.parent===this&&na(this,o),o===this._recent&&(this._recent=this._last),Ar(this))},n.totalTime=function(o,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ke(Rt.time-(this._ts>0?o/this._ts:(this.totalDuration()-o)/-this._ts))),t.prototype.totalTime.call(this,o,s),this._forcing=0,this):this._tTime},n.addLabel=function(o,s){return this.labels[o]=Ht(this,s),this},n.removeLabel=function(o){return delete this.labels[o],this},n.addPause=function(o,s,i){var a=Ve.delayedCall(0,s||fs,i);return a.data="isPause",this._hasPause=1,dn(this,a,Ht(this,o))},n.removePause=function(o){var s=this._first;for(o=Ht(this,o);s;)s._start===o&&s.data==="isPause"&&tr(s),s=s._next},n.killTweensOf=function(o,s,i){for(var a=this.getTweensOf(o,i),c=a.length;c--;)Yn!==a[c]&&a[c].kill(o,s);return this},n.getTweensOf=function(o,s){for(var i=[],a=Vt(o),c=this._first,u=In(s),f;c;)c instanceof Ve?HA(c._targets,a)&&(u?(!Yn||c._initted&&c._ts)&&c.globalTime(0)<=s&&c.globalTime(c.totalDuration())>s:!s||c.isActive())&&i.push(c):(f=c.getTweensOf(a,s)).length&&i.push.apply(i,f),c=c._next;return i},n.tweenTo=function(o,s){s=s||{};var i=this,a=Ht(i,o),c=s,u=c.startAt,f=c.onStart,m=c.onStartParams,p=c.immediateRender,b,g=Ve.to(i,Pt({ease:s.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:s.duration||Math.abs((a-(u&&"time"in u?u.time:i._time))/i.timeScale())||Le,onStart:function(){if(i.pause(),!b){var x=s.duration||Math.abs((a-(u&&"time"in u?u.time:i._time))/i.timeScale());g._dur!==x&&go(g,x,0,1).render(g._time,!0,!0),b=1}f&&f.apply(g,m||[])}},s));return p?g.render(0):g},n.tweenFromTo=function(o,s,i){return this.tweenTo(s,Pt({startAt:{time:Ht(this,o)}},i))},n.recent=function(){return this._recent},n.nextLabel=function(o){return o===void 0&&(o=this._time),jm(this,Ht(this,o))},n.previousLabel=function(o){return o===void 0&&(o=this._time),jm(this,Ht(this,o),1)},n.currentLabel=function(o){return arguments.length?this.seek(o,!0):this.previousLabel(this._time+Le)},n.shiftChildren=function(o,s,i){i===void 0&&(i=0);var a=this._first,c=this.labels,u;for(o=ke(o);a;)a._start>=i&&(a._start+=o,a._end+=o),a=a._next;if(s)for(u in c)c[u]>=i&&(c[u]+=o);return Ar(this)},n.invalidate=function(o){var s=this._first;for(this._lock=0;s;)s.invalidate(o),s=s._next;return t.prototype.invalidate.call(this,o)},n.clear=function(o){o===void 0&&(o=!0);for(var s=this._first,i;s;)i=s._next,this.remove(s),s=i;return this._dp&&(this._time=this._tTime=this._pTime=0),o&&(this.labels={}),Ar(this)},n.totalDuration=function(o){var s=0,i=this,a=i._last,c=zt,u,f,m;if(arguments.length)return i.timeScale((i._repeat<0?i.duration():i.totalDuration())/(i.reversed()?-o:o));if(i._dirty){for(m=i.parent;a;)u=a._prev,a._dirty&&a.totalDuration(),f=a._start,f>c&&i._sort&&a._ts&&!i._lock?(i._lock=1,dn(i,a,f-a._delay,1)._lock=0):c=f,f<0&&a._ts&&(s-=f,(!m&&!i._dp||m&&m.smoothChildTiming)&&(i._start+=ke(f/i._ts),i._time-=f,i._tTime-=f),i.shiftChildren(-f,!1,-1/0),c=0),a._end>s&&a._ts&&(s=a._end),a=u;go(i,i===Oe&&i._time>s?i._time:s,1,1),i._dirty=0}return i._tDur},e.updateRoot=function(o){if(Oe._ts&&(Ih(Oe,Ei(o,Oe)),wh=Rt.frame),Rt.frame>=km){km+=Dt.autoSleep||120;var s=Oe._first;if((!s||!s._ts)&&Dt.autoSleep&&Rt._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||Rt.sleep()}}},e})(hs);Pt(bt.prototype,{_lock:0,_hasPause:0,_forcing:0});var dE=function(e,n,r,o,s,i,a){var c=new vt(this._pt,e,n,0,1,ng,null,s),u=0,f=0,m,p,b,g,h,x,C,_;for(c.b=r,c.e=o,r+="",o+="",(C=~o.indexOf("random("))&&(o=ms(o)),i&&(_=[r,o],i(_,e,n),r=_[0],o=_[1]),p=r.match(Ja)||[];m=Ja.exec(o);)g=m[0],h=o.substring(u,m.index),b?b=(b+1)%5:h.substr(-5)==="rgba("&&(b=1),g!==p[f++]&&(x=parseFloat(p[f-1])||0,c._pt={_next:c._pt,p:h||f===1?h:",",s:x,c:g.charAt(1)==="="?co(x,g)-x:parseFloat(g)-x,m:b&&b<4?Math.round:0},u=Ja.lastIndex);return c.c=u<o.length?o.substring(u,o.length):"",c.fp=a,(Th.test(o)||C)&&(c.e=0),this._pt=c,c},Zc=function(e,n,r,o,s,i,a,c,u,f){Me(o)&&(o=o(s||0,e,i));var m=e[n],p=r!=="get"?r:Me(m)?u?e[n.indexOf("set")||!Me(e["get"+n.substr(3)])?n:"get"+n.substr(3)](u):e[n]():m,b=Me(m)?u?gE:eg:Jc,g;if(qe(o)&&(~o.indexOf("random(")&&(o=ms(o)),o.charAt(1)==="="&&(g=co(p,o)+(lt(p)||0),(g||g===0)&&(o=g))),!f||p!==o||El)return!isNaN(p*o)&&o!==""?(g=new vt(this._pt,e,n,+p||0,o-(p||0),typeof m=="boolean"?xE:tg,0,b),u&&(g.fp=u),a&&g.modifier(a,this,e),this._pt=g):(!m&&!(n in e)&&Wc(n,o),dE.call(this,e,n,p,o,b,c||Dt.stringFilter,u))},fE=function(e,n,r,o,s){if(Me(e)&&(e=is(e,s,n,r,o)),!mn(e)||e.style&&e.nodeType||ct(e)||vh(e))return qe(e)?is(e,s,n,r,o):e;var i={},a;for(a in e)i[a]=is(e[a],s,n,r,o);return i},Zh=function(e,n,r,o,s,i){var a,c,u,f;if(wt[e]&&(a=new wt[e]).init(s,a.rawVars?n[e]:fE(n[e],o,s,i,r),r,o,i)!==!1&&(r._pt=c=new vt(r._pt,s,e,0,1,a.render,a,0,a.priority),r!==lo))for(u=r._ptLookup[r._targets.indexOf(s)],f=a._props.length;f--;)u[a._props[f]]=c;return a},Yn,El,Qc=function t(e,n,r){var o=e.vars,s=o.ease,i=o.startAt,a=o.immediateRender,c=o.lazy,u=o.onUpdate,f=o.runBackwards,m=o.yoyoEase,p=o.keyframes,b=o.autoRevert,g=e._dur,h=e._startAt,x=e._targets,C=e.parent,_=C&&C.data==="nested"?C.vars.targets:x,v=e._overwrite==="auto"&&!zc,y=e.timeline,S=o.easeReverse||m,A,E,T,L,w,R,N,D,P,j,G,k,O;if(y&&(!p||!s)&&(s="none"),e._ease=Er(s,us.ease),e._rEase=S&&(Er(S)||e._ease),e._from=!y&&!!o.runBackwards,e._from&&(e.ratio=1),!y||p&&!o.stagger){if(D=x[0]?Tr(x[0]).harness:0,k=D&&o[D.prop],A=Ai(o,Xc),h&&(h._zTime<0&&h.progress(1),n<0&&f&&a&&!b?h.render(-1,!0):h.revert(f&&g?fi:FA),h._lazy=0),i){if(tr(e._startAt=Ve.set(x,Pt({data:"isStart",overwrite:!1,parent:C,immediateRender:!0,lazy:!h&&_t(c),startAt:null,delay:0,onUpdate:u&&function(){return It(e,"onUpdate")},stagger:0},i))),e._startAt._dp=0,e._startAt._sat=e,n<0&&(rt||!a&&!b)&&e._startAt.revert(fi),a&&g&&n<=0&&r<=0){n&&(e._zTime=n);return}}else if(f&&g&&!h){if(n&&(a=!1),T=Pt({overwrite:!1,data:"isFromStart",lazy:a&&!h&&_t(c),immediateRender:a,stagger:0,parent:C},A),k&&(T[D.prop]=k),tr(e._startAt=Ve.set(x,T)),e._startAt._dp=0,e._startAt._sat=e,n<0&&(rt?e._startAt.revert(fi):e._startAt.render(-1,!0)),e._zTime=n,!a)t(e._startAt,Le,Le);else if(!n)return}for(e._pt=e._ptCache=0,c=g&&_t(c)||c&&!g,E=0;E<x.length;E++){if(w=x[E],N=w._gsap||Kc(x)[E]._gsap,e._ptLookup[E]=j={},_l[N.id]&&Zn.length&&Ti(),G=_===x?E:_.indexOf(w),D&&(P=new D).init(w,k||A,e,G,_)!==!1&&(e._pt=L=new vt(e._pt,w,P.name,0,1,P.render,P,0,P.priority),P._props.forEach(function(M){j[M]=L}),P.priority&&(R=1)),!D||k)for(T in A)wt[T]&&(P=Zh(T,A,e,G,w,_))?P.priority&&(R=1):j[T]=L=Zc.call(e,w,T,"get",A[T],G,_,0,o.stringFilter);e._op&&e._op[E]&&e.kill(w,e._op[E]),v&&e._pt&&(Yn=e,Oe.killTweensOf(w,j,e.globalTime(n)),O=!e.parent,Yn=0),e._pt&&c&&(_l[N.id]=1)}R&&rg(e),e._onInit&&e._onInit(e)}e._onUpdate=u,e._initted=(!e._op||e._pt)&&!O,p&&n<=0&&y.render(zt,!0,!0)},mE=function(e,n,r,o,s,i,a,c){var u=(e._pt&&e._ptCache||(e._ptCache={}))[n],f,m,p,b;if(!u)for(u=e._ptCache[n]=[],p=e._ptLookup,b=e._targets.length;b--;){if(f=p[b][n],f&&f.d&&f.d._pt)for(f=f.d._pt;f&&f.p!==n&&f.fp!==n;)f=f._next;if(!f)return El=1,e.vars[n]="+=0",Qc(e,a),El=0,c?ds(n+" not eligible for reset. Try splitting into individual properties"):1;u.push(f)}for(b=u.length;b--;)m=u[b],f=m._pt||m,f.s=(o||o===0)&&!s?o:f.s+(o||0)+i*f.c,f.c=r-f.s,m.e&&(m.e=He(r)+lt(m.e)),m.b&&(m.b=f.s+lt(m.b))},pE=function(e,n){var r=e[0]?Tr(e[0]).harness:0,o=r&&r.aliases,s,i,a,c;if(!o)return n;s=po({},n);for(i in o)if(i in s)for(c=o[i].split(","),a=c.length;a--;)s[c[a]]=s[i];return s},hE=function(e,n,r,o){var s=n.ease||o||"power1.inOut",i,a;if(ct(n))a=r[e]||(r[e]=[]),n.forEach(function(c,u){return a.push({t:u/(n.length-1)*100,v:c,e:s})});else for(i in n)a=r[i]||(r[i]=[]),i==="ease"||a.push({t:parseFloat(e),v:n[i],e:s})},is=function(e,n,r,o,s){return Me(e)?e.call(n,r,o,s):qe(e)&&~e.indexOf("random(")?ms(e):e},Qh=Yc+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",Jh={};St(Qh+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return Jh[t]=1});var Ve=(function(t){_h(e,t);function e(r,o,s,i){var a;typeof o=="number"&&(s.duration=o,o=s,s=null),a=t.call(this,i?o:os(o))||this;var c=a.vars,u=c.duration,f=c.delay,m=c.immediateRender,p=c.stagger,b=c.overwrite,g=c.keyframes,h=c.defaults,x=c.scrollTrigger,C=o.parent||Oe,_=(ct(r)||vh(r)?In(r[0]):"length"in o)?[r]:Vt(r),v,y,S,A,E,T,L,w;if(a._targets=_.length?Kc(_):ds("GSAP target "+r+" not found. https://gsap.com",!Dt.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=b,g||p||Qs(u)||Qs(f)){o=a.vars;var R=o.easeReverse||o.yoyoEase;if(v=a.timeline=new bt({data:"nested",defaults:h||{},targets:C&&C.data==="nested"?C.vars.targets:_}),v.kill(),v.parent=v._dp=Ln(a),v._start=0,p||Qs(u)||Qs(f)){if(A=_.length,L=p&&Fh(p),mn(p))for(E in p)~Qh.indexOf(E)&&(w||(w={}),w[E]=p[E]);for(y=0;y<A;y++)S=Ai(o,Jh),S.stagger=0,R&&(S.easeReverse=R),w&&po(S,w),T=_[y],S.duration=+is(u,Ln(a),y,T,_),S.delay=(+is(f,Ln(a),y,T,_)||0)-a._delay,!p&&A===1&&S.delay&&(a._delay=f=S.delay,a._start+=f,S.delay=0),v.to(T,S,L?L(y,T,_):0),v._ease=Ce.none;v.duration()?u=f=0:a.timeline=0}else if(g){os(Pt(v.vars.defaults,{ease:"none"})),v._ease=Er(g.ease||o.ease||"none");var N=0,D,P,j;if(ct(g))g.forEach(function(G){return v.to(_,G,">")}),v.duration();else{S={};for(E in g)E==="ease"||E==="easeEach"||hE(E,g[E],S,g.easeEach);for(E in S)for(D=S[E].sort(function(G,k){return G.t-k.t}),N=0,y=0;y<D.length;y++)P=D[y],j={ease:P.e,duration:(P.t-(y?D[y-1].t:0))/100*u},j[E]=P.v,v.to(_,j,N),N+=j.duration;v.duration()<u&&v.to({},{duration:u-v.duration()})}}u||a.duration(u=v.duration())}else a.timeline=0;return b===!0&&!zc&&(Yn=Ln(a),Oe.killTweensOf(_),Yn=0),dn(C,Ln(a),s),o.reversed&&a.reverse(),o.paused&&a.paused(!0),(m||!u&&!g&&a._start===ke(C._time)&&_t(m)&&$A(Ln(a))&&C.data!=="nested")&&(a._tTime=-Le,a.render(Math.max(0,-f)||0)),x&&Ph(Ln(a),x),a}var n=e.prototype;return n.render=function(o,s,i){var a=this._time,c=this._tDur,u=this._dur,f=o<0,m=o>c-Le&&!f?c:o<Le?0:o,p,b,g,h,x,C,_,v;if(!u)XA(this,o,s,i);else if(m!==this._tTime||!o||i||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==f||this._lazy){if(p=m,v=this.timeline,this._repeat){if(h=u+this._rDelay,this._repeat<-1&&f)return this.totalTime(h*100+o,s,i);if(p=ke(m%h),m===c?(g=this._repeat,p=u):(x=ke(m/h),g=~~x,g&&g===x?(p=u,g--):p>u&&(p=u)),C=this._yoyo&&g&1,C&&(p=u-p),x=ho(this._tTime,h),p===a&&!i&&this._initted&&g===x)return this._tTime=m,this;g!==x&&this.vars.repeatRefresh&&!C&&!this._lock&&p!==h&&this._initted&&(this._lock=i=1,this.render(ke(h*g),!0).invalidate()._lock=0)}if(!this._initted){if(Bh(this,f?o:p,i,s,m))return this._tTime=0,this;if(a!==this._time&&!(i&&this.vars.repeatRefresh&&g!==x))return this;if(u!==this._dur)return this.render(o,s,i)}if(this._rEase){var y=p<a;if(y!==this._inv){var S=y?a:u-a;this._inv=y,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=a,this._invRecip=S?(y?-1:1)/S:0,this._invScale=y?-this.ratio:1-this.ratio,this._invEase=y?this._rEase:this._ease}this.ratio=_=this._invRatio+this._invScale*this._invEase((p-this._invTime)*this._invRecip)}else this.ratio=_=this._ease(p/u);if(this._from&&(this.ratio=_=1-_),this._tTime=m,this._time=p,!this._act&&this._ts&&(this._act=1,this._lazy=0),!a&&m&&!s&&!x&&(It(this,"onStart"),this._tTime!==m))return this;for(b=this._pt;b;)b.r(_,b.d),b=b._next;v&&v.render(o<0?o:v._dur*v._ease(p/this._dur),s,i)||this._startAt&&(this._zTime=o),this._onUpdate&&!s&&(f&&Sl(this,o,s,i),It(this,"onUpdate")),this._repeat&&g!==x&&this.vars.onRepeat&&!s&&this.parent&&It(this,"onRepeat"),(m===this._tDur||!m)&&this._tTime===m&&(f&&!this._onUpdate&&Sl(this,o,!0,!0),(o||!u)&&(m===this._tDur&&this._ts>0||!m&&this._ts<0)&&tr(this,1),!s&&!(f&&!a)&&(m||a||C)&&(It(this,m===c?"onComplete":"onReverseComplete",!0),this._prom&&!(m<c&&this.timeScale()>0)&&this._prom()))}return this},n.targets=function(){return this._targets},n.invalidate=function(o){return(!o||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(o),t.prototype.invalidate.call(this,o)},n.resetTo=function(o,s,i,a,c){ps||Rt.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),f;return this._initted||Qc(this,u),f=this._ease(u/this._dur),mE(this,o,s,i,a,f,u,c)?this.resetTo(o,s,i,a,1):(oa(this,0),this.parent||kh(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},n.kill=function(o,s){if(s===void 0&&(s="all"),!o&&(!s||s==="all"))return this._lazy=this._pt=0,this.parent?ns(this):this.scrollTrigger&&this.scrollTrigger.kill(!!rt),this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(o,s,Yn&&Yn.vars.overwrite!==!0)._first||ns(this),this.parent&&i!==this.timeline.totalDuration()&&go(this,this._dur*this.timeline._tDur/i,0,1),this}var a=this._targets,c=o?Vt(o):a,u=this._ptLookup,f=this._pt,m,p,b,g,h,x,C;if((!s||s==="all")&&VA(a,c))return s==="all"&&(this._pt=0),ns(this);for(m=this._op=this._op||[],s!=="all"&&(qe(s)&&(h={},St(s,function(_){return h[_]=1}),s=h),s=pE(a,s)),C=a.length;C--;)if(~c.indexOf(a[C])){p=u[C],s==="all"?(m[C]=s,g=p,b={}):(b=m[C]=m[C]||{},g=s);for(h in g)x=p&&p[h],x&&((!("kill"in x.d)||x.d.kill(h)===!0)&&na(this,x,"_pt"),delete p[h]),b!=="all"&&(b[h]=1)}return this._initted&&!this._pt&&f&&ns(this),this},e.to=function(o,s){return new e(o,s,arguments[2])},e.from=function(o,s){return ss(1,arguments)},e.delayedCall=function(o,s,i,a){return new e(s,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:o,onComplete:s,onReverseComplete:s,onCompleteParams:i,onReverseCompleteParams:i,callbackScope:a})},e.fromTo=function(o,s,i){return ss(2,arguments)},e.set=function(o,s){return s.duration=0,s.repeatDelay||(s.repeat=0),new e(o,s)},e.killTweensOf=function(o,s,i){return Oe.killTweensOf(o,s,i)},e})(hs);Pt(Ve.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});St("staggerTo,staggerFrom,staggerFromTo",function(t){Ve[t]=function(){var e=new bt,n=yl.call(arguments,0);return n.splice(t==="staggerFromTo"?5:4,0,0),e[t].apply(e,n)}});var Jc=function(e,n,r){return e[n]=r},eg=function(e,n,r){return e[n](r)},gE=function(e,n,r,o){return e[n](o.fp,r)},bE=function(e,n,r){return e.setAttribute(n,r)},eu=function(e,n){return Me(e[n])?eg:Vc(e[n])&&e.setAttribute?bE:Jc},tg=function(e,n){return n.set(n.t,n.p,Math.round((n.s+n.c*e)*1e6)/1e6,n)},xE=function(e,n){return n.set(n.t,n.p,!!(n.s+n.c*e),n)},ng=function(e,n){var r=n._pt,o="";if(!e&&n.b)o=n.b;else if(e===1&&n.e)o=n.e;else{for(;r;)o=r.p+(r.m?r.m(r.s+r.c*e):Math.round((r.s+r.c*e)*1e4)/1e4)+o,r=r._next;o+=n.c}n.set(n.t,n.p,o,n)},tu=function(e,n){for(var r=n._pt;r;)r.r(e,r.d),r=r._next},CE=function(e,n,r,o){for(var s=this._pt,i;s;)i=s._next,s.p===o&&s.modifier(e,n,r),s=i},_E=function(e){for(var n=this._pt,r,o;n;)o=n._next,n.p===e&&!n.op||n.op===e?na(this,n,"_pt"):n.dep||(r=1),n=o;return!r},SE=function(e,n,r,o){o.mSet(e,n,o.m.call(o.tween,r,o.mt),o)},rg=function(e){for(var n=e._pt,r,o,s,i;n;){for(r=n._next,o=s;o&&o.pr>n.pr;)o=o._next;(n._prev=o?o._prev:i)?n._prev._next=n:s=n,(n._next=o)?o._prev=n:i=n,n=r}e._pt=s},vt=(function(){function t(n,r,o,s,i,a,c,u,f){this.t=r,this.s=s,this.c=i,this.p=o,this.r=a||tg,this.d=c||this,this.set=u||Jc,this.pr=f||0,this._next=n,n&&(n._prev=this)}var e=t.prototype;return e.modifier=function(r,o,s){this.mSet=this.mSet||this.set,this.set=SE,this.m=r,this.mt=s,this.tween=o},t})();St(Yc+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse",function(t){return Xc[t]=1});Ot.TweenMax=Ot.TweenLite=Ve;Ot.TimelineLite=Ot.TimelineMax=bt;Oe=new bt({sortChildren:!1,defaults:us,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Dt.stringFilter=Yh;var Lr=[],pi={},vE=[],Fm=0,yE=0,ol=function(e){return(pi[e]||vE).map(function(n){return n()})},Ll=function(){var e=Date.now(),n=[];e-Fm>2&&(ol("matchMediaInit"),Lr.forEach(function(r){var o=r.queries,s=r.conditions,i,a,c,u;for(a in o)i=un.matchMedia(o[a]).matches,i&&(c=1),i!==s[a]&&(s[a]=i,u=1);u&&(r.revert(),c&&n.push(r))}),ol("matchMediaRevert"),n.forEach(function(r){return r.onMatch(r,function(o){return r.add(null,o)})}),Fm=e,ol("matchMedia"))},og=(function(){function t(n,r){this.selector=r&&Tl(r),this.data=[],this._r=[],this.isReverted=!1,this.id=yE++,n&&this.add(n)}var e=t.prototype;return e.add=function(r,o,s){Me(r)&&(s=o,o=r,r=Me);var i=this,a=function(){var u=Ne,f=i.selector,m;return u&&u!==i&&u.data.push(i),s&&(i.selector=Tl(s)),Ne=i,m=o.apply(i,arguments),Me(m)&&i._r.push(m),Ne=u,i.selector=f,i.isReverted=!1,m};return i.last=a,r===Me?a(i,function(c){return i.add(null,c)}):r?i[r]=a:a},e.ignore=function(r){var o=Ne;Ne=null,r(this),Ne=o},e.getTweens=function(){var r=[];return this.data.forEach(function(o){return o instanceof t?r.push.apply(r,o.getTweens()):o instanceof Ve&&!(o.parent&&o.parent.data==="nested")&&r.push(o)}),r},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(r,o){var s=this;if(r?(function(){for(var a=s.getTweens(),c=s.data.length,u;c--;)u=s.data[c],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(f){return a.splice(a.indexOf(f),1)}));for(a.map(function(f){return{g:f._dur||f._delay||f._sat&&!f._sat.vars.immediateRender?f.globalTime(0):-1/0,t:f}}).sort(function(f,m){return m.g-f.g||-1/0}).forEach(function(f){return f.t.revert(r)}),c=s.data.length;c--;)u=s.data[c],u instanceof bt?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof Ve)&&u.revert&&u.revert(r);s._r.forEach(function(f){return f(r,s)}),s.isReverted=!0})():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),o)for(var i=Lr.length;i--;)Lr[i].id===this.id&&Lr.splice(i,1)},e.revert=function(r){this.kill(r||{})},t})(),TE=(function(){function t(n){this.contexts=[],this.scope=n,Ne&&Ne.data.push(this)}var e=t.prototype;return e.add=function(r,o,s){mn(r)||(r={matches:r});var i=new og(0,s||this.scope),a=i.conditions={},c,u,f;Ne&&!i.selector&&(i.selector=Ne.selector),this.contexts.push(i),o=i.add("onMatch",o),i.queries=r;for(u in r)u==="all"?f=1:(c=un.matchMedia(r[u]),c&&(Lr.indexOf(i)<0&&Lr.push(i),(a[u]=c.matches)&&(f=1),c.addListener?c.addListener(Ll):c.addEventListener("change",Ll)));return f&&o(i,function(m){return i.add(null,m)}),this},e.revert=function(r){this.kill(r||{})},e.kill=function(r){this.contexts.forEach(function(o){return o.kill(r,!0)})},t})(),Li={registerPlugin:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n.forEach(function(o){return $h(o)})},timeline:function(e){return new bt(e)},getTweensOf:function(e,n){return Oe.getTweensOf(e,n)},getProperty:function(e,n,r,o){qe(e)&&(e=Vt(e)[0]);var s=Tr(e||{}).get,i=r?Dh:Nh;return r==="native"&&(r=""),e&&(n?i((wt[n]&&wt[n].get||s)(e,n,r,o)):function(a,c,u){return i((wt[a]&&wt[a].get||s)(e,a,c,u))})},quickSetter:function(e,n,r){if(e=Vt(e),e.length>1){var o=e.map(function(f){return At.quickSetter(f,n,r)}),s=o.length;return function(f){for(var m=s;m--;)o[m](f)}}e=e[0]||{};var i=wt[n],a=Tr(e),c=a.harness&&(a.harness.aliases||{})[n]||n,u=i?function(f){var m=new i;lo._pt=0,m.init(e,r?f+r:f,lo,0,[e]),m.render(1,m),lo._pt&&tu(1,lo)}:a.set(e,c);return i?u:function(f){return u(e,c,r?f+r:f,a,1)}},quickTo:function(e,n,r){var o,s=At.to(e,Pt((o={},o[n]="+=0.1",o.paused=!0,o.stagger=0,o),r||{})),i=function(c,u,f){return s.resetTo(n,c,u,f)};return i.tween=s,i},isTweening:function(e){return Oe.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=Er(e.ease,us.ease)),Om(us,e||{})},config:function(e){return Om(Dt,e||{})},registerEffect:function(e){var n=e.name,r=e.effect,o=e.plugins,s=e.defaults,i=e.extendTimeline;(o||"").split(",").forEach(function(a){return a&&!wt[a]&&!Ot[a]&&ds(n+" effect requires "+a+" plugin.")}),el[n]=function(a,c,u){return r(Vt(a),Pt(c||{},s),u)},i&&(bt.prototype[n]=function(a,c,u){return this.add(el[n](a,mn(c)?c:(u=c)&&{},this),u)})},registerEase:function(e,n){Ce[e]=Er(n)},parseEase:function(e,n){return arguments.length?Er(e,n):Ce},getById:function(e){return Oe.getById(e)},exportRoot:function(e,n){e===void 0&&(e={});var r=new bt(e),o,s;for(r.smoothChildTiming=_t(e.smoothChildTiming),Oe.remove(r),r._dp=0,r._time=r._tTime=Oe._time,o=Oe._first;o;)s=o._next,(n||!(!o._dur&&o instanceof Ve&&o.vars.onComplete===o._targets[0]))&&dn(r,o,o._start-o._delay),o=s;return dn(Oe,r,0),r},context:function(e,n){return e?new og(e,n):Ne},matchMedia:function(e){return new TE(e)},matchMediaRefresh:function(){return Lr.forEach(function(e){var n=e.conditions,r,o;for(o in n)n[o]&&(n[o]=!1,r=1);r&&e.revert()})||Ll()},addEventListener:function(e,n){var r=pi[e]||(pi[e]=[]);~r.indexOf(n)||r.push(n)},removeEventListener:function(e,n){var r=pi[e],o=r&&r.indexOf(n);o>=0&&r.splice(o,1)},utils:{wrap:tE,wrapYoyo:nE,distribute:Fh,random:Hh,snap:Gh,normalize:eE,getUnit:lt,clamp:qA,splitColor:Wh,toArray:Vt,selector:Tl,mapRange:Vh,pipe:QA,unitize:JA,interpolate:rE,shuffle:Mh},install:Eh,effects:el,ticker:Rt,updateRoot:bt.updateRoot,plugins:wt,globalTimeline:Oe,core:{PropTween:vt,globals:Lh,Tween:Ve,Timeline:bt,Animation:hs,getCache:Tr,_removeLinkedListItem:na,reverting:function(){return rt},context:function(e){return e&&Ne&&(Ne.data.push(e),e._ctx=Ne),Ne},suppressOverwrites:function(e){return zc=e}}};St("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return Li[t]=Ve[t]});Rt.add(bt.updateRoot);lo=Li.to({},{duration:0});var AE=function(e,n){for(var r=e._pt;r&&r.p!==n&&r.op!==n&&r.fp!==n;)r=r._next;return r},EE=function(e,n){var r=e._targets,o,s,i;for(o in n)for(s=r.length;s--;)i=e._ptLookup[s][o],i&&(i=i.d)&&(i._pt&&(i=AE(i,o)),i&&i.modifier&&i.modifier(n[o],e,r[s],o))},sl=function(e,n){return{name:e,headless:1,rawVars:1,init:function(o,s,i){i._onInit=function(a){var c,u;if(qe(s)&&(c={},St(s,function(f){return c[f]=1}),s=c),n){c={};for(u in s)c[u]=n(s[u]);s=c}EE(a,s)}}}},At=Li.registerPlugin({name:"attr",init:function(e,n,r,o,s){var i,a,c;this.tween=r;for(i in n)c=e.getAttribute(i)||"",a=this.add(e,"setAttribute",(c||0)+"",n[i],o,s,0,0,i),a.op=i,a.b=c,this._props.push(i)},render:function(e,n){for(var r=n._pt;r;)rt?r.set(r.t,r.p,r.b,r):r.r(e,r.d),r=r._next}},{name:"endArray",headless:1,init:function(e,n){for(var r=n.length;r--;)this.add(e,r,e[r]||0,n[r],0,0,0,0,0,1)}},sl("roundProps",Al),sl("modifiers"),sl("snap",Gh))||Li;Ve.version=bt.version=At.version="3.15.0";Ah=1;Uc()&&bo();Ce.Power0;Ce.Power1;Ce.Power2;Ce.Power3;Ce.Power4;Ce.Linear;Ce.Quad;Ce.Cubic;Ce.Quart;Ce.Quint;Ce.Strong;Ce.Elastic;Ce.Back;Ce.SteppedEase;Ce.Bounce;Ce.Sine;Ce.Expo;Ce.Circ;/*!
|
|
9
9
|
* CSSPlugin 3.15.0
|
|
10
10
|
* https://gsap.com
|
|
11
11
|
*
|
|
12
12
|
* Copyright 2008-2026, GreenSock. All rights reserved.
|
|
13
13
|
* Subject to the terms at https://gsap.com/standard-license
|
|
14
14
|
* @author: Jack Doyle, jack@greensock.com
|
|
15
|
-
*/var Mm,Kn,uo,nu,yr,Fm,ru,AE=function(){return typeof window<"u"},Nn={},Sr=180/Math.PI,fo=Math.PI/180,oo=Math.atan2,Gm=1e8,ou=/([A-Z])/g,EE=/(left|right|width|margin|padding|x)/i,LE=/[\s,\(]\S/,fn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},wl=function(e,n){return n.set(n.t,n.p,Math.round((n.s+n.c*e)*1e4)/1e4+n.u,n)},wE=function(e,n){return n.set(n.t,n.p,e===1?n.e:Math.round((n.s+n.c*e)*1e4)/1e4+n.u,n)},IE=function(e,n){return n.set(n.t,n.p,e?Math.round((n.s+n.c*e)*1e4)/1e4+n.u:n.b,n)},RE=function(e,n){return n.set(n.t,n.p,e===1?n.e:e?Math.round((n.s+n.c*e)*1e4)/1e4+n.u:n.b,n)},NE=function(e,n){var r=n.s+n.c*e;n.set(n.t,n.p,~~(r+(r<0?-.5:.5))+n.u,n)},rg=function(e,n){return n.set(n.t,n.p,e?n.e:n.b,n)},og=function(e,n){return n.set(n.t,n.p,e!==1?n.b:n.e,n)},DE=function(e,n,r){return e.style[n]=r},kE=function(e,n,r){return e.style.setProperty(n,r)},OE=function(e,n,r){return e._gsap[n]=r},PE=function(e,n,r){return e._gsap.scaleX=e._gsap.scaleY=r},BE=function(e,n,r,o,s){var i=e._gsap;i.scaleX=i.scaleY=r,i.renderTransform(s,i)},jE=function(e,n,r,o,s){var i=e._gsap;i[n]=r,i.renderTransform(s,i)},Oe="transform",yt=Oe+"Origin",ME=function t(e,n){var r=this,o=this.target,s=o.style,i=o._gsap;if(e in Nn&&s){if(this.tfm=this.tfm||{},e!=="transform")e=fn[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return r.tfm[a]=wn(o,a)}):this.tfm[e]=i.x?i[e]:wn(o,e),e===yt&&(this.tfm.zOrigin=i.zOrigin);else return fn.transform.split(",").forEach(function(a){return t.call(r,a,n)});if(this.props.indexOf(Oe)>=0)return;i.svg&&(this.svgo=o.getAttribute("data-svg-origin"),this.props.push(yt,n,"")),e=Oe}(s||n)&&this.props.push(e,n,s[e])},sg=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},FE=function(){var e=this.props,n=this.target,r=n.style,o=n._gsap,s,i;for(s=0;s<e.length;s+=3)e[s+1]?e[s+1]===2?n[e[s]](e[s+2]):n[e[s]]=e[s+2]:e[s+2]?r[e[s]]=e[s+2]:r.removeProperty(e[s].substr(0,2)==="--"?e[s]:e[s].replace(ou,"-$1").toLowerCase());if(this.tfm){for(i in this.tfm)o[i]=this.tfm[i];o.svg&&(o.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),s=ru(),(!s||!s.isStart)&&!r[Oe]&&(sg(r),o.zOrigin&&r[yt]&&(r[yt]+=" "+o.zOrigin+"px",o.zOrigin=0,o.renderTransform()),o.uncache=1)}},ig=function(e,n){var r={target:e,props:[],revert:FE,save:ME};return e._gsap||At.core.getCache(e),n&&e.style&&e.nodeType&&n.split(",").forEach(function(o){return r.save(o)}),r},ag,Il=function(e,n){var r=Kn.createElementNS?Kn.createElementNS((n||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):Kn.createElement(e);return r&&r.style?r:Kn.createElement(e)},Nt=function t(e,n,r){var o=getComputedStyle(e);return o[n]||o.getPropertyValue(n.replace(ou,"-$1").toLowerCase())||o.getPropertyValue(n)||!r&&t(e,xo(n)||n,1)||""},Hm="O,Moz,ms,Ms,Webkit".split(","),xo=function(e,n,r){var o=n||yr,s=o.style,i=5;if(e in s&&!r)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);i--&&!(Hm[i]+e in s););return i<0?null:(i===3?"ms":i>=0?Hm[i]:"")+e},Rl=function(){AE()&&window.document&&(Mm=window,Kn=Mm.document,uo=Kn.documentElement,yr=Il("div")||{style:{}},Il("div"),Oe=xo(Oe),yt=Oe+"Origin",yr.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",ag=!!xo("perspective"),ru=At.core.reverting,nu=1)},zm=function(e){var n=e.ownerSVGElement,r=Il("svg",n&&n.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),o=e.cloneNode(!0),s;o.style.display="block",r.appendChild(o),uo.appendChild(r);try{s=o.getBBox()}catch{}return r.removeChild(o),uo.removeChild(r),s},Vm=function(e,n){for(var r=n.length;r--;)if(e.hasAttribute(n[r]))return e.getAttribute(n[r])},lg=function(e){var n,r;try{n=e.getBBox()}catch{n=zm(e),r=1}return n&&(n.width||n.height)||r||(n=zm(e)),n&&!n.width&&!n.x&&!n.y?{x:+Vm(e,["x","cx","x1"])||0,y:+Vm(e,["y","cy","y1"])||0,width:0,height:0}:n},cg=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&lg(e))},nr=function(e,n){if(n){var r=e.style,o;n in Nn&&n!==yt&&(n=Oe),r.removeProperty?(o=n.substr(0,2),(o==="ms"||n.substr(0,6)==="webkit")&&(n="-"+n),r.removeProperty(o==="--"?n:n.replace(ou,"-$1").toLowerCase())):r.removeAttribute(n)}},qn=function(e,n,r,o,s,i){var a=new vt(e._pt,n,r,0,1,i?og:rg);return e._pt=a,a.b=o,a.e=s,e._props.push(r),a},Um={deg:1,rad:1,turn:1},GE={grid:1,flex:1},rr=function t(e,n,r,o){var s=parseFloat(r)||0,i=(r+"").trim().substr((s+"").length)||"px",a=yr.style,c=EE.test(n),u=e.tagName.toLowerCase()==="svg",f=(u?"client":"offset")+(c?"Width":"Height"),m=100,p=o==="px",b=o==="%",g,h,x,C;if(o===i||!s||Um[o]||Um[i])return s;if(i!=="px"&&!p&&(s=t(e,n,r,"px")),C=e.getCTM&&cg(e),(b||i==="%")&&(Nn[n]||~n.indexOf("adius")))return g=C?e.getBBox()[c?"width":"height"]:e[f],Ge(b?s/g*m:s/100*g);if(a[c?"width":"height"]=m+(p?i:o),h=o!=="rem"&&~n.indexOf("adius")||o==="em"&&e.appendChild&&!u?e:e.parentNode,C&&(h=(e.ownerSVGElement||{}).parentNode),(!h||h===Kn||!h.appendChild)&&(h=Kn.body),x=h._gsap,x&&b&&x.width&&c&&x.time===It.time&&!x.uncache)return Ge(s/x.width*m);if(b&&(n==="height"||n==="width")){var _=e.style[n];e.style[n]=m+o,g=e[f],_?e.style[n]=_:nr(e,n)}else(b||i==="%")&&!GE[Nt(h,"display")]&&(a.position=Nt(e,"position")),h===e&&(a.position="static"),h.appendChild(yr),g=yr[f],h.removeChild(yr),a.position="absolute";return c&&b&&(x=Tr(h),x.time=It.time,x.width=h[f]),Ge(p?g*s/m:g&&s?m/g*s:0)},wn=function(e,n,r,o){var s;return nu||Rl(),n in fn&&n!=="transform"&&(n=fn[n],~n.indexOf(",")&&(n=n.split(",")[0])),Nn[n]&&n!=="transform"?(s=bs(e,o),s=n!=="transformOrigin"?s[n]:s.svg?s.origin:Ii(Nt(e,yt))+" "+s.zOrigin+"px"):(s=e.style[n],(!s||s==="auto"||o||~(s+"").indexOf("calc("))&&(s=wi[n]&&wi[n](e,n,r)||Nt(e,n)||Lh(e,n)||(n==="opacity"?1:0))),r&&!~(s+"").trim().indexOf(" ")?rr(e,n,s,r)+r:s},HE=function(e,n,r,o){if(!r||r==="none"){var s=xo(n,e,1),i=s&&Nt(e,s,1);i&&i!==r?(n=s,r=i):n==="borderColor"&&(r=Nt(e,"borderTopColor"))}var a=new vt(this._pt,e.style,n,0,1,eg),c=0,u=0,f,m,p,b,g,h,x,C,_,S,y,v;if(a.b=r,a.e=o,r+="",o+="",o.substring(0,6)==="var(--"&&(o=Nt(e,o.substring(4,o.indexOf(")")))),o==="auto"&&(h=e.style[n],e.style[n]=o,o=Nt(e,n)||o,h?e.style[n]=h:nr(e,n)),f=[r,o],Wh(f),r=f[0],o=f[1],p=r.match(ao)||[],v=o.match(ao)||[],v.length){for(;m=ao.exec(o);)x=m[0],_=o.substring(c,m.index),g?g=(g+1)%5:(_.substr(-5)==="rgba("||_.substr(-5)==="hsla(")&&(g=1),x!==(h=p[u++]||"")&&(b=parseFloat(h)||0,y=h.substr((b+"").length),x.charAt(1)==="="&&(x=co(b,x)+y),C=parseFloat(x),S=x.substr((C+"").length),c=ao.lastIndex-S.length,S||(S=S||Dt.units[n]||y,c===o.length&&(o+=S,a.e+=S)),y!==S&&(b=rr(e,n,h,S)||0),a._pt={_next:a._pt,p:_||u===1?_:",",s:b,c:C-b,m:g&&g<4||n==="zIndex"?Math.round:0});a.c=c<o.length?o.substring(c,o.length):""}else a.r=n==="display"&&o==="none"?og:rg;return vh.test(o)&&(a.e=0),this._pt=a,a},$m={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},zE=function(e){var n=e.split(" "),r=n[0],o=n[1]||"50%";return(r==="top"||r==="bottom"||o==="left"||o==="right")&&(e=r,r=o,o=e),n[0]=$m[r]||r,n[1]=$m[o]||o,n.join(" ")},VE=function(e,n){if(n.tween&&n.tween._time===n.tween._dur){var r=n.t,o=r.style,s=n.u,i=r._gsap,a,c,u;if(s==="all"||s===!0)o.cssText="",c=1;else for(s=s.split(","),u=s.length;--u>-1;)a=s[u],Nn[a]&&(c=1,a=a==="transformOrigin"?yt:Oe),nr(r,a);c&&(nr(r,Oe),i&&(i.svg&&r.removeAttribute("transform"),o.scale=o.rotate=o.translate="none",bs(r,1),i.uncache=1,sg(o)))}},wi={clearProps:function(e,n,r,o,s){if(s.data!=="isFromStart"){var i=e._pt=new vt(e._pt,n,r,0,0,VE);return i.u=o,i.pr=-10,i.tween=s,e._props.push(r),1}}},gs=[1,0,0,1,0,0],ug={},dg=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},Wm=function(e){var n=Nt(e,Oe);return dg(n)?gs:n.substr(7).match(Sh).map(Ge)},su=function(e,n){var r=e._gsap||Tr(e),o=e.style,s=Wm(e),i,a,c,u;return r.svg&&e.getAttribute("transform")?(c=e.transform.baseVal.consolidate().matrix,s=[c.a,c.b,c.c,c.d,c.e,c.f],s.join(",")==="1,0,0,1,0,0"?gs:s):(s===gs&&!e.offsetParent&&e!==uo&&!r.svg&&(c=o.display,o.display="block",i=e.parentNode,(!i||!e.offsetParent&&!e.getBoundingClientRect().width)&&(u=1,a=e.nextElementSibling,uo.appendChild(e)),s=Wm(e),c?o.display=c:nr(e,"display"),u&&(a?i.insertBefore(e,a):i?i.appendChild(e):uo.removeChild(e))),n&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},Nl=function(e,n,r,o,s,i){var a=e._gsap,c=s||su(e,!0),u=a.xOrigin||0,f=a.yOrigin||0,m=a.xOffset||0,p=a.yOffset||0,b=c[0],g=c[1],h=c[2],x=c[3],C=c[4],_=c[5],S=n.split(" "),y=parseFloat(S[0])||0,v=parseFloat(S[1])||0,A,E,T,L;r?c!==gs&&(E=b*x-g*h)&&(T=y*(x/E)+v*(-h/E)+(h*_-x*C)/E,L=y*(-g/E)+v*(b/E)-(b*_-g*C)/E,y=T,v=L):(A=lg(e),y=A.x+(~S[0].indexOf("%")?y/100*A.width:y),v=A.y+(~(S[1]||S[0]).indexOf("%")?v/100*A.height:v)),o||o!==!1&&a.smooth?(C=y-u,_=v-f,a.xOffset=m+(C*b+_*h)-C,a.yOffset=p+(C*g+_*x)-_):a.xOffset=a.yOffset=0,a.xOrigin=y,a.yOrigin=v,a.smooth=!!o,a.origin=n,a.originIsAbsolute=!!r,e.style[yt]="0px 0px",i&&(qn(i,a,"xOrigin",u,y),qn(i,a,"yOrigin",f,v),qn(i,a,"xOffset",m,a.xOffset),qn(i,a,"yOffset",p,a.yOffset)),e.setAttribute("data-svg-origin",y+" "+v)},bs=function(e,n){var r=e._gsap||new Yh(e);if("x"in r&&!n&&!r.uncache)return r;var o=e.style,s=r.scaleX<0,i="px",a="deg",c=getComputedStyle(e),u=Nt(e,yt)||"0",f,m,p,b,g,h,x,C,_,S,y,v,A,E,T,L,w,I,N,k,j,P,G,D,O,F,B,$,W,M,z,H;return f=m=p=h=x=C=_=S=y=0,b=g=1,r.svg=!!(e.getCTM&&cg(e)),c.translate&&((c.translate!=="none"||c.scale!=="none"||c.rotate!=="none")&&(o[Oe]=(c.translate!=="none"?"translate3d("+(c.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(c.rotate!=="none"?"rotate("+c.rotate+") ":"")+(c.scale!=="none"?"scale("+c.scale.split(" ").join(",")+") ":"")+(c[Oe]!=="none"?c[Oe]:"")),o.scale=o.rotate=o.translate="none"),E=su(e,r.svg),r.svg&&(r.uncache?(O=e.getBBox(),u=r.xOrigin-O.x+"px "+(r.yOrigin-O.y)+"px",D=""):D=!n&&e.getAttribute("data-svg-origin"),Nl(e,D||u,!!D||r.originIsAbsolute,r.smooth!==!1,E)),v=r.xOrigin||0,A=r.yOrigin||0,E!==gs&&(I=E[0],N=E[1],k=E[2],j=E[3],f=P=E[4],m=G=E[5],E.length===6?(b=Math.sqrt(I*I+N*N),g=Math.sqrt(j*j+k*k),h=I||N?oo(N,I)*Sr:0,_=k||j?oo(k,j)*Sr+h:0,_&&(g*=Math.abs(Math.cos(_*fo))),r.svg&&(f-=v-(v*I+A*k),m-=A-(v*N+A*j))):(H=E[6],M=E[7],B=E[8],$=E[9],W=E[10],z=E[11],f=E[12],m=E[13],p=E[14],T=oo(H,W),x=T*Sr,T&&(L=Math.cos(-T),w=Math.sin(-T),D=P*L+B*w,O=G*L+$*w,F=H*L+W*w,B=P*-w+B*L,$=G*-w+$*L,W=H*-w+W*L,z=M*-w+z*L,P=D,G=O,H=F),T=oo(-k,W),C=T*Sr,T&&(L=Math.cos(-T),w=Math.sin(-T),D=I*L-B*w,O=N*L-$*w,F=k*L-W*w,z=j*w+z*L,I=D,N=O,k=F),T=oo(N,I),h=T*Sr,T&&(L=Math.cos(T),w=Math.sin(T),D=I*L+N*w,O=P*L+G*w,N=N*L-I*w,G=G*L-P*w,I=D,P=O),x&&Math.abs(x)+Math.abs(h)>359.9&&(x=h=0,C=180-C),b=Ge(Math.sqrt(I*I+N*N+k*k)),g=Ge(Math.sqrt(G*G+H*H)),T=oo(P,G),_=Math.abs(T)>2e-4?T*Sr:0,y=z?1/(z<0?-z:z):0),r.svg&&(D=e.getAttribute("transform"),r.forceCSS=e.setAttribute("transform","")||!dg(Nt(e,Oe)),D&&e.setAttribute("transform",D))),Math.abs(_)>90&&Math.abs(_)<270&&(s?(b*=-1,_+=h<=0?180:-180,h+=h<=0?180:-180):(g*=-1,_+=_<=0?180:-180)),n=n||r.uncache,r.x=f-((r.xPercent=f&&(!n&&r.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-f)?-50:0)))?e.offsetWidth*r.xPercent/100:0)+i,r.y=m-((r.yPercent=m&&(!n&&r.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-m)?-50:0)))?e.offsetHeight*r.yPercent/100:0)+i,r.z=p+i,r.scaleX=Ge(b),r.scaleY=Ge(g),r.rotation=Ge(h)+a,r.rotationX=Ge(x)+a,r.rotationY=Ge(C)+a,r.skewX=_+a,r.skewY=S+a,r.transformPerspective=y+i,(r.zOrigin=parseFloat(u.split(" ")[2])||!n&&r.zOrigin||0)&&(o[yt]=Ii(u)),r.xOffset=r.yOffset=0,r.force3D=Dt.force3D,r.renderTransform=r.svg?$E:ag?fg:UE,r.uncache=0,r},Ii=function(e){return(e=e.split(" "))[0]+" "+e[1]},il=function(e,n,r){var o=lt(n);return Ge(parseFloat(n)+parseFloat(rr(e,"x",r+"px",o)))+o},UE=function(e,n){n.z="0px",n.rotationY=n.rotationX="0deg",n.force3D=0,fg(e,n)},xr="0deg",es="0px",Cr=") ",fg=function(e,n){var r=n||this,o=r.xPercent,s=r.yPercent,i=r.x,a=r.y,c=r.z,u=r.rotation,f=r.rotationY,m=r.rotationX,p=r.skewX,b=r.skewY,g=r.scaleX,h=r.scaleY,x=r.transformPerspective,C=r.force3D,_=r.target,S=r.zOrigin,y="",v=C==="auto"&&e&&e!==1||C===!0;if(S&&(m!==xr||f!==xr)){var A=parseFloat(f)*fo,E=Math.sin(A),T=Math.cos(A),L;A=parseFloat(m)*fo,L=Math.cos(A),i=il(_,i,E*L*-S),a=il(_,a,-Math.sin(A)*-S),c=il(_,c,T*L*-S+S)}x!==es&&(y+="perspective("+x+Cr),(o||s)&&(y+="translate("+o+"%, "+s+"%) "),(v||i!==es||a!==es||c!==es)&&(y+=c!==es||v?"translate3d("+i+", "+a+", "+c+") ":"translate("+i+", "+a+Cr),u!==xr&&(y+="rotate("+u+Cr),f!==xr&&(y+="rotateY("+f+Cr),m!==xr&&(y+="rotateX("+m+Cr),(p!==xr||b!==xr)&&(y+="skew("+p+", "+b+Cr),(g!==1||h!==1)&&(y+="scale("+g+", "+h+Cr),_.style[Oe]=y||"translate(0, 0)"},$E=function(e,n){var r=n||this,o=r.xPercent,s=r.yPercent,i=r.x,a=r.y,c=r.rotation,u=r.skewX,f=r.skewY,m=r.scaleX,p=r.scaleY,b=r.target,g=r.xOrigin,h=r.yOrigin,x=r.xOffset,C=r.yOffset,_=r.forceCSS,S=parseFloat(i),y=parseFloat(a),v,A,E,T,L;c=parseFloat(c),u=parseFloat(u),f=parseFloat(f),f&&(f=parseFloat(f),u+=f,c+=f),c||u?(c*=fo,u*=fo,v=Math.cos(c)*m,A=Math.sin(c)*m,E=Math.sin(c-u)*-p,T=Math.cos(c-u)*p,u&&(f*=fo,L=Math.tan(u-f),L=Math.sqrt(1+L*L),E*=L,T*=L,f&&(L=Math.tan(f),L=Math.sqrt(1+L*L),v*=L,A*=L)),v=Ge(v),A=Ge(A),E=Ge(E),T=Ge(T)):(v=m,T=p,A=E=0),(S&&!~(i+"").indexOf("px")||y&&!~(a+"").indexOf("px"))&&(S=rr(b,"x",i,"px"),y=rr(b,"y",a,"px")),(g||h||x||C)&&(S=Ge(S+g-(g*v+h*E)+x),y=Ge(y+h-(g*A+h*T)+C)),(o||s)&&(L=b.getBBox(),S=Ge(S+o/100*L.width),y=Ge(y+s/100*L.height)),L="matrix("+v+","+A+","+E+","+T+","+S+","+y+")",b.setAttribute("transform",L),_&&(b.style[Oe]=L)},WE=function(e,n,r,o,s){var i=360,a=qe(s),c=parseFloat(s)*(a&&~s.indexOf("rad")?Sr:1),u=c-o,f=o+u+"deg",m,p;return a&&(m=s.split("_")[1],m==="short"&&(u%=i,u!==u%(i/2)&&(u+=u<0?i:-i)),m==="cw"&&u<0?u=(u+i*Gm)%i-~~(u/i)*i:m==="ccw"&&u>0&&(u=(u-i*Gm)%i-~~(u/i)*i)),e._pt=p=new vt(e._pt,n,r,o,u,wE),p.e=f,p.u="deg",e._props.push(r),p},Xm=function(e,n){for(var r in n)e[r]=n[r];return e},XE=function(e,n,r){var o=Xm({},r._gsap),s="perspective,force3D,transformOrigin,svgOrigin",i=r.style,a,c,u,f,m,p,b,g;o.svg?(u=r.getAttribute("transform"),r.setAttribute("transform",""),i[Oe]=n,a=bs(r,1),nr(r,Oe),r.setAttribute("transform",u)):(u=getComputedStyle(r)[Oe],i[Oe]=n,a=bs(r,1),i[Oe]=u);for(c in Nn)u=o[c],f=a[c],u!==f&&s.indexOf(c)<0&&(b=lt(u),g=lt(f),m=b!==g?rr(r,c,u,g):parseFloat(u),p=parseFloat(f),e._pt=new vt(e._pt,a,c,m,p-m,wl),e._pt.u=g||0,e._props.push(c));Xm(a,o)};St("padding,margin,Width,Radius",function(t,e){var n="Top",r="Right",o="Bottom",s="Left",i=(e<3?[n,r,o,s]:[n+s,n+r,o+r,o+s]).map(function(a){return e<2?t+a:"border"+a+t});wi[e>1?"border"+t:t]=function(a,c,u,f,m){var p,b;if(arguments.length<4)return p=i.map(function(g){return wn(a,g,u)}),b=p.join(" "),b.split(p[0]).length===5?p[0]:b;p=(f+"").split(" "),b={},i.forEach(function(g,h){return b[g]=p[h]=p[h]||p[(h-1)/2|0]}),a.init(c,b,m)}});var mg={name:"css",register:Rl,targetTest:function(e){return e.style&&e.nodeType},init:function(e,n,r,o,s){var i=this._props,a=e.style,c=r.vars.startAt,u,f,m,p,b,g,h,x,C,_,S,y,v,A,E,T,L;nu||Rl(),this.styles=this.styles||ig(e),T=this.styles.props,this.tween=r;for(h in n)if(h!=="autoRound"&&(f=n[h],!(wt[h]&&Kh(h,n,r,o,e,s)))){if(b=typeof f,g=wi[h],b==="function"&&(f=f.call(r,o,e,s),b=typeof f),b==="string"&&~f.indexOf("random(")&&(f=ms(f)),g)g(this,e,h,f,r)&&(E=1);else if(h.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(h)+"").trim(),f+="",Qn.lastIndex=0,Qn.test(u)||(x=lt(u),C=lt(f),C?x!==C&&(u=rr(e,h,u,C)+C):x&&(f+=x)),this.add(a,"setProperty",u,f,o,s,0,0,h),i.push(h),T.push(h,0,a[h]);else if(b!=="undefined"){if(c&&h in c?(u=typeof c[h]=="function"?c[h].call(r,o,e,s):c[h],qe(u)&&~u.indexOf("random(")&&(u=ms(u)),lt(u+"")||u==="auto"||(u+=Dt.units[h]||lt(wn(e,h))||""),(u+"").charAt(1)==="="&&(u=wn(e,h))):u=wn(e,h),p=parseFloat(u),_=b==="string"&&f.charAt(1)==="="&&f.substr(0,2),_&&(f=f.substr(2)),m=parseFloat(f),h in fn&&(h==="autoAlpha"&&(p===1&&wn(e,"visibility")==="hidden"&&m&&(p=0),T.push("visibility",0,a.visibility),qn(this,a,"visibility",p?"inherit":"hidden",m?"inherit":"hidden",!m)),h!=="scale"&&h!=="transform"&&(h=fn[h],~h.indexOf(",")&&(h=h.split(",")[0]))),S=h in Nn,S){if(this.styles.save(h),L=f,b==="string"&&f.substring(0,6)==="var(--"){if(f=Nt(e,f.substring(4,f.indexOf(")"))),f.substring(0,5)==="calc("){var w=e.style.perspective;e.style.perspective=f,f=Nt(e,"perspective"),w?e.style.perspective=w:nr(e,"perspective")}m=parseFloat(f)}if(y||(v=e._gsap,v.renderTransform&&!n.parseTransform||bs(e,n.parseTransform),A=n.smoothOrigin!==!1&&v.smooth,y=this._pt=new vt(this._pt,a,Oe,0,1,v.renderTransform,v,0,-1),y.dep=1),h==="scale")this._pt=new vt(this._pt,v,"scaleY",v.scaleY,(_?co(v.scaleY,_+m):m)-v.scaleY||0,wl),this._pt.u=0,i.push("scaleY",h),h+="X";else if(h==="transformOrigin"){T.push(yt,0,a[yt]),f=zE(f),v.svg?Nl(e,f,0,A,0,this):(C=parseFloat(f.split(" ")[2])||0,C!==v.zOrigin&&qn(this,v,"zOrigin",v.zOrigin,C),qn(this,a,h,Ii(u),Ii(f)));continue}else if(h==="svgOrigin"){Nl(e,f,1,A,0,this);continue}else if(h in ug){WE(this,v,h,p,_?co(p,_+f):f);continue}else if(h==="smoothOrigin"){qn(this,v,"smooth",v.smooth,f);continue}else if(h==="force3D"){v[h]=f;continue}else if(h==="transform"){XE(this,f,e);continue}}else h in a||(h=xo(h)||h);if(S||(m||m===0)&&(p||p===0)&&!LE.test(f)&&h in a)x=(u+"").substr((p+"").length),m||(m=0),C=lt(f)||(h in Dt.units?Dt.units[h]:x),x!==C&&(p=rr(e,h,u,C)),this._pt=new vt(this._pt,S?v:a,h,p,(_?co(p,_+m):m)-p,!S&&(C==="px"||h==="zIndex")&&n.autoRound!==!1?NE:wl),this._pt.u=C||0,S&&L!==f?(this._pt.b=u,this._pt.e=L,this._pt.r=RE):x!==C&&C!=="%"&&(this._pt.b=u,this._pt.r=IE);else if(h in a)HE.call(this,e,h,u,_?_+f:f);else if(h in e)this.add(e,h,u||e[h],_?_+f:f,o,s);else if(h!=="parseTransform"){Wc(h,f);continue}S||(h in a?T.push(h,0,a[h]):typeof e[h]=="function"?T.push(h,2,e[h]()):T.push(h,1,u||e[h])),i.push(h)}}E&&tg(this)},render:function(e,n){if(n.tween._time||!ru())for(var r=n._pt;r;)r.r(e,r.d),r=r._next;else n.styles.revert()},get:wn,aliases:fn,getSetter:function(e,n,r){var o=fn[n];return o&&o.indexOf(",")<0&&(n=o),n in Nn&&n!==yt&&(e._gsap.x||wn(e,"x"))?r&&Fm===r?n==="scale"?PE:OE:(Fm=r||{})&&(n==="scale"?BE:jE):e.style&&!Vc(e.style[n])?DE:~n.indexOf("-")?kE:eu(e,n)},core:{_removeProperty:nr,_getMatrix:su}};At.utils.checkPrefix=xo;At.core.getStyleSaver=ig;(function(t,e,n,r){var o=St(t+","+e+","+n,function(s){Nn[s]=1});St(e,function(s){Dt.units[s]="deg",ug[s]=1}),fn[o[13]]=t+","+e,St(r,function(s){var i=s.split(":");fn[i[1]]=o[i[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");St("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){Dt.units[t]="px"});At.registerPlugin(mg);var X=At.registerPlugin(mg)||At;X.core.Tween;/*!
|
|
15
|
+
*/var Gm,Kn,uo,nu,yr,Hm,ru,LE=function(){return typeof window<"u"},Nn={},Sr=180/Math.PI,fo=Math.PI/180,oo=Math.atan2,zm=1e8,ou=/([A-Z])/g,wE=/(left|right|width|margin|padding|x)/i,RE=/[\s,\(]\S/,fn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},wl=function(e,n){return n.set(n.t,n.p,Math.round((n.s+n.c*e)*1e4)/1e4+n.u,n)},IE=function(e,n){return n.set(n.t,n.p,e===1?n.e:Math.round((n.s+n.c*e)*1e4)/1e4+n.u,n)},NE=function(e,n){return n.set(n.t,n.p,e?Math.round((n.s+n.c*e)*1e4)/1e4+n.u:n.b,n)},DE=function(e,n){return n.set(n.t,n.p,e===1?n.e:e?Math.round((n.s+n.c*e)*1e4)/1e4+n.u:n.b,n)},kE=function(e,n){var r=n.s+n.c*e;n.set(n.t,n.p,~~(r+(r<0?-.5:.5))+n.u,n)},sg=function(e,n){return n.set(n.t,n.p,e?n.e:n.b,n)},ig=function(e,n){return n.set(n.t,n.p,e!==1?n.b:n.e,n)},OE=function(e,n,r){return e.style[n]=r},PE=function(e,n,r){return e.style.setProperty(n,r)},BE=function(e,n,r){return e._gsap[n]=r},jE=function(e,n,r){return e._gsap.scaleX=e._gsap.scaleY=r},ME=function(e,n,r,o,s){var i=e._gsap;i.scaleX=i.scaleY=r,i.renderTransform(s,i)},FE=function(e,n,r,o,s){var i=e._gsap;i[n]=r,i.renderTransform(s,i)},Pe="transform",yt=Pe+"Origin",GE=function t(e,n){var r=this,o=this.target,s=o.style,i=o._gsap;if(e in Nn&&s){if(this.tfm=this.tfm||{},e!=="transform")e=fn[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return r.tfm[a]=wn(o,a)}):this.tfm[e]=i.x?i[e]:wn(o,e),e===yt&&(this.tfm.zOrigin=i.zOrigin);else return fn.transform.split(",").forEach(function(a){return t.call(r,a,n)});if(this.props.indexOf(Pe)>=0)return;i.svg&&(this.svgo=o.getAttribute("data-svg-origin"),this.props.push(yt,n,"")),e=Pe}(s||n)&&this.props.push(e,n,s[e])},ag=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},HE=function(){var e=this.props,n=this.target,r=n.style,o=n._gsap,s,i;for(s=0;s<e.length;s+=3)e[s+1]?e[s+1]===2?n[e[s]](e[s+2]):n[e[s]]=e[s+2]:e[s+2]?r[e[s]]=e[s+2]:r.removeProperty(e[s].substr(0,2)==="--"?e[s]:e[s].replace(ou,"-$1").toLowerCase());if(this.tfm){for(i in this.tfm)o[i]=this.tfm[i];o.svg&&(o.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),s=ru(),(!s||!s.isStart)&&!r[Pe]&&(ag(r),o.zOrigin&&r[yt]&&(r[yt]+=" "+o.zOrigin+"px",o.zOrigin=0,o.renderTransform()),o.uncache=1)}},lg=function(e,n){var r={target:e,props:[],revert:HE,save:GE};return e._gsap||At.core.getCache(e),n&&e.style&&e.nodeType&&n.split(",").forEach(function(o){return r.save(o)}),r},cg,Rl=function(e,n){var r=Kn.createElementNS?Kn.createElementNS((n||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):Kn.createElement(e);return r&&r.style?r:Kn.createElement(e)},Nt=function t(e,n,r){var o=getComputedStyle(e);return o[n]||o.getPropertyValue(n.replace(ou,"-$1").toLowerCase())||o.getPropertyValue(n)||!r&&t(e,xo(n)||n,1)||""},Vm="O,Moz,ms,Ms,Webkit".split(","),xo=function(e,n,r){var o=n||yr,s=o.style,i=5;if(e in s&&!r)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);i--&&!(Vm[i]+e in s););return i<0?null:(i===3?"ms":i>=0?Vm[i]:"")+e},Il=function(){LE()&&window.document&&(Gm=window,Kn=Gm.document,uo=Kn.documentElement,yr=Rl("div")||{style:{}},Rl("div"),Pe=xo(Pe),yt=Pe+"Origin",yr.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",cg=!!xo("perspective"),ru=At.core.reverting,nu=1)},Um=function(e){var n=e.ownerSVGElement,r=Rl("svg",n&&n.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),o=e.cloneNode(!0),s;o.style.display="block",r.appendChild(o),uo.appendChild(r);try{s=o.getBBox()}catch{}return r.removeChild(o),uo.removeChild(r),s},$m=function(e,n){for(var r=n.length;r--;)if(e.hasAttribute(n[r]))return e.getAttribute(n[r])},ug=function(e){var n,r;try{n=e.getBBox()}catch{n=Um(e),r=1}return n&&(n.width||n.height)||r||(n=Um(e)),n&&!n.width&&!n.x&&!n.y?{x:+$m(e,["x","cx","x1"])||0,y:+$m(e,["y","cy","y1"])||0,width:0,height:0}:n},dg=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&ug(e))},nr=function(e,n){if(n){var r=e.style,o;n in Nn&&n!==yt&&(n=Pe),r.removeProperty?(o=n.substr(0,2),(o==="ms"||n.substr(0,6)==="webkit")&&(n="-"+n),r.removeProperty(o==="--"?n:n.replace(ou,"-$1").toLowerCase())):r.removeAttribute(n)}},qn=function(e,n,r,o,s,i){var a=new vt(e._pt,n,r,0,1,i?ig:sg);return e._pt=a,a.b=o,a.e=s,e._props.push(r),a},Wm={deg:1,rad:1,turn:1},zE={grid:1,flex:1},rr=function t(e,n,r,o){var s=parseFloat(r)||0,i=(r+"").trim().substr((s+"").length)||"px",a=yr.style,c=wE.test(n),u=e.tagName.toLowerCase()==="svg",f=(u?"client":"offset")+(c?"Width":"Height"),m=100,p=o==="px",b=o==="%",g,h,x,C;if(o===i||!s||Wm[o]||Wm[i])return s;if(i!=="px"&&!p&&(s=t(e,n,r,"px")),C=e.getCTM&&dg(e),(b||i==="%")&&(Nn[n]||~n.indexOf("adius")))return g=C?e.getBBox()[c?"width":"height"]:e[f],He(b?s/g*m:s/100*g);if(a[c?"width":"height"]=m+(p?i:o),h=o!=="rem"&&~n.indexOf("adius")||o==="em"&&e.appendChild&&!u?e:e.parentNode,C&&(h=(e.ownerSVGElement||{}).parentNode),(!h||h===Kn||!h.appendChild)&&(h=Kn.body),x=h._gsap,x&&b&&x.width&&c&&x.time===Rt.time&&!x.uncache)return He(s/x.width*m);if(b&&(n==="height"||n==="width")){var _=e.style[n];e.style[n]=m+o,g=e[f],_?e.style[n]=_:nr(e,n)}else(b||i==="%")&&!zE[Nt(h,"display")]&&(a.position=Nt(e,"position")),h===e&&(a.position="static"),h.appendChild(yr),g=yr[f],h.removeChild(yr),a.position="absolute";return c&&b&&(x=Tr(h),x.time=Rt.time,x.width=h[f]),He(p?g*s/m:g&&s?m/g*s:0)},wn=function(e,n,r,o){var s;return nu||Il(),n in fn&&n!=="transform"&&(n=fn[n],~n.indexOf(",")&&(n=n.split(",")[0])),Nn[n]&&n!=="transform"?(s=bs(e,o),s=n!=="transformOrigin"?s[n]:s.svg?s.origin:Ri(Nt(e,yt))+" "+s.zOrigin+"px"):(s=e.style[n],(!s||s==="auto"||o||~(s+"").indexOf("calc("))&&(s=wi[n]&&wi[n](e,n,r)||Nt(e,n)||Rh(e,n)||(n==="opacity"?1:0))),r&&!~(s+"").trim().indexOf(" ")?rr(e,n,s,r)+r:s},VE=function(e,n,r,o){if(!r||r==="none"){var s=xo(n,e,1),i=s&&Nt(e,s,1);i&&i!==r?(n=s,r=i):n==="borderColor"&&(r=Nt(e,"borderTopColor"))}var a=new vt(this._pt,e.style,n,0,1,ng),c=0,u=0,f,m,p,b,g,h,x,C,_,v,y,S;if(a.b=r,a.e=o,r+="",o+="",o.substring(0,6)==="var(--"&&(o=Nt(e,o.substring(4,o.indexOf(")")))),o==="auto"&&(h=e.style[n],e.style[n]=o,o=Nt(e,n)||o,h?e.style[n]=h:nr(e,n)),f=[r,o],Yh(f),r=f[0],o=f[1],p=r.match(ao)||[],S=o.match(ao)||[],S.length){for(;m=ao.exec(o);)x=m[0],_=o.substring(c,m.index),g?g=(g+1)%5:(_.substr(-5)==="rgba("||_.substr(-5)==="hsla(")&&(g=1),x!==(h=p[u++]||"")&&(b=parseFloat(h)||0,y=h.substr((b+"").length),x.charAt(1)==="="&&(x=co(b,x)+y),C=parseFloat(x),v=x.substr((C+"").length),c=ao.lastIndex-v.length,v||(v=v||Dt.units[n]||y,c===o.length&&(o+=v,a.e+=v)),y!==v&&(b=rr(e,n,h,v)||0),a._pt={_next:a._pt,p:_||u===1?_:",",s:b,c:C-b,m:g&&g<4||n==="zIndex"?Math.round:0});a.c=c<o.length?o.substring(c,o.length):""}else a.r=n==="display"&&o==="none"?ig:sg;return Th.test(o)&&(a.e=0),this._pt=a,a},Xm={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},UE=function(e){var n=e.split(" "),r=n[0],o=n[1]||"50%";return(r==="top"||r==="bottom"||o==="left"||o==="right")&&(e=r,r=o,o=e),n[0]=Xm[r]||r,n[1]=Xm[o]||o,n.join(" ")},$E=function(e,n){if(n.tween&&n.tween._time===n.tween._dur){var r=n.t,o=r.style,s=n.u,i=r._gsap,a,c,u;if(s==="all"||s===!0)o.cssText="",c=1;else for(s=s.split(","),u=s.length;--u>-1;)a=s[u],Nn[a]&&(c=1,a=a==="transformOrigin"?yt:Pe),nr(r,a);c&&(nr(r,Pe),i&&(i.svg&&r.removeAttribute("transform"),o.scale=o.rotate=o.translate="none",bs(r,1),i.uncache=1,ag(o)))}},wi={clearProps:function(e,n,r,o,s){if(s.data!=="isFromStart"){var i=e._pt=new vt(e._pt,n,r,0,0,$E);return i.u=o,i.pr=-10,i.tween=s,e._props.push(r),1}}},gs=[1,0,0,1,0,0],fg={},mg=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},Ym=function(e){var n=Nt(e,Pe);return mg(n)?gs:n.substr(7).match(yh).map(He)},su=function(e,n){var r=e._gsap||Tr(e),o=e.style,s=Ym(e),i,a,c,u;return r.svg&&e.getAttribute("transform")?(c=e.transform.baseVal.consolidate().matrix,s=[c.a,c.b,c.c,c.d,c.e,c.f],s.join(",")==="1,0,0,1,0,0"?gs:s):(s===gs&&!e.offsetParent&&e!==uo&&!r.svg&&(c=o.display,o.display="block",i=e.parentNode,(!i||!e.offsetParent&&!e.getBoundingClientRect().width)&&(u=1,a=e.nextElementSibling,uo.appendChild(e)),s=Ym(e),c?o.display=c:nr(e,"display"),u&&(a?i.insertBefore(e,a):i?i.appendChild(e):uo.removeChild(e))),n&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},Nl=function(e,n,r,o,s,i){var a=e._gsap,c=s||su(e,!0),u=a.xOrigin||0,f=a.yOrigin||0,m=a.xOffset||0,p=a.yOffset||0,b=c[0],g=c[1],h=c[2],x=c[3],C=c[4],_=c[5],v=n.split(" "),y=parseFloat(v[0])||0,S=parseFloat(v[1])||0,A,E,T,L;r?c!==gs&&(E=b*x-g*h)&&(T=y*(x/E)+S*(-h/E)+(h*_-x*C)/E,L=y*(-g/E)+S*(b/E)-(b*_-g*C)/E,y=T,S=L):(A=ug(e),y=A.x+(~v[0].indexOf("%")?y/100*A.width:y),S=A.y+(~(v[1]||v[0]).indexOf("%")?S/100*A.height:S)),o||o!==!1&&a.smooth?(C=y-u,_=S-f,a.xOffset=m+(C*b+_*h)-C,a.yOffset=p+(C*g+_*x)-_):a.xOffset=a.yOffset=0,a.xOrigin=y,a.yOrigin=S,a.smooth=!!o,a.origin=n,a.originIsAbsolute=!!r,e.style[yt]="0px 0px",i&&(qn(i,a,"xOrigin",u,y),qn(i,a,"yOrigin",f,S),qn(i,a,"xOffset",m,a.xOffset),qn(i,a,"yOffset",p,a.yOffset)),e.setAttribute("data-svg-origin",y+" "+S)},bs=function(e,n){var r=e._gsap||new qh(e);if("x"in r&&!n&&!r.uncache)return r;var o=e.style,s=r.scaleX<0,i="px",a="deg",c=getComputedStyle(e),u=Nt(e,yt)||"0",f,m,p,b,g,h,x,C,_,v,y,S,A,E,T,L,w,R,N,D,P,j,G,k,O,M,B,U,W,F,V,H;return f=m=p=h=x=C=_=v=y=0,b=g=1,r.svg=!!(e.getCTM&&dg(e)),c.translate&&((c.translate!=="none"||c.scale!=="none"||c.rotate!=="none")&&(o[Pe]=(c.translate!=="none"?"translate3d("+(c.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(c.rotate!=="none"?"rotate("+c.rotate+") ":"")+(c.scale!=="none"?"scale("+c.scale.split(" ").join(",")+") ":"")+(c[Pe]!=="none"?c[Pe]:"")),o.scale=o.rotate=o.translate="none"),E=su(e,r.svg),r.svg&&(r.uncache?(O=e.getBBox(),u=r.xOrigin-O.x+"px "+(r.yOrigin-O.y)+"px",k=""):k=!n&&e.getAttribute("data-svg-origin"),Nl(e,k||u,!!k||r.originIsAbsolute,r.smooth!==!1,E)),S=r.xOrigin||0,A=r.yOrigin||0,E!==gs&&(R=E[0],N=E[1],D=E[2],P=E[3],f=j=E[4],m=G=E[5],E.length===6?(b=Math.sqrt(R*R+N*N),g=Math.sqrt(P*P+D*D),h=R||N?oo(N,R)*Sr:0,_=D||P?oo(D,P)*Sr+h:0,_&&(g*=Math.abs(Math.cos(_*fo))),r.svg&&(f-=S-(S*R+A*D),m-=A-(S*N+A*P))):(H=E[6],F=E[7],B=E[8],U=E[9],W=E[10],V=E[11],f=E[12],m=E[13],p=E[14],T=oo(H,W),x=T*Sr,T&&(L=Math.cos(-T),w=Math.sin(-T),k=j*L+B*w,O=G*L+U*w,M=H*L+W*w,B=j*-w+B*L,U=G*-w+U*L,W=H*-w+W*L,V=F*-w+V*L,j=k,G=O,H=M),T=oo(-D,W),C=T*Sr,T&&(L=Math.cos(-T),w=Math.sin(-T),k=R*L-B*w,O=N*L-U*w,M=D*L-W*w,V=P*w+V*L,R=k,N=O,D=M),T=oo(N,R),h=T*Sr,T&&(L=Math.cos(T),w=Math.sin(T),k=R*L+N*w,O=j*L+G*w,N=N*L-R*w,G=G*L-j*w,R=k,j=O),x&&Math.abs(x)+Math.abs(h)>359.9&&(x=h=0,C=180-C),b=He(Math.sqrt(R*R+N*N+D*D)),g=He(Math.sqrt(G*G+H*H)),T=oo(j,G),_=Math.abs(T)>2e-4?T*Sr:0,y=V?1/(V<0?-V:V):0),r.svg&&(k=e.getAttribute("transform"),r.forceCSS=e.setAttribute("transform","")||!mg(Nt(e,Pe)),k&&e.setAttribute("transform",k))),Math.abs(_)>90&&Math.abs(_)<270&&(s?(b*=-1,_+=h<=0?180:-180,h+=h<=0?180:-180):(g*=-1,_+=_<=0?180:-180)),n=n||r.uncache,r.x=f-((r.xPercent=f&&(!n&&r.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-f)?-50:0)))?e.offsetWidth*r.xPercent/100:0)+i,r.y=m-((r.yPercent=m&&(!n&&r.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-m)?-50:0)))?e.offsetHeight*r.yPercent/100:0)+i,r.z=p+i,r.scaleX=He(b),r.scaleY=He(g),r.rotation=He(h)+a,r.rotationX=He(x)+a,r.rotationY=He(C)+a,r.skewX=_+a,r.skewY=v+a,r.transformPerspective=y+i,(r.zOrigin=parseFloat(u.split(" ")[2])||!n&&r.zOrigin||0)&&(o[yt]=Ri(u)),r.xOffset=r.yOffset=0,r.force3D=Dt.force3D,r.renderTransform=r.svg?XE:cg?pg:WE,r.uncache=0,r},Ri=function(e){return(e=e.split(" "))[0]+" "+e[1]},il=function(e,n,r){var o=lt(n);return He(parseFloat(n)+parseFloat(rr(e,"x",r+"px",o)))+o},WE=function(e,n){n.z="0px",n.rotationY=n.rotationX="0deg",n.force3D=0,pg(e,n)},xr="0deg",es="0px",Cr=") ",pg=function(e,n){var r=n||this,o=r.xPercent,s=r.yPercent,i=r.x,a=r.y,c=r.z,u=r.rotation,f=r.rotationY,m=r.rotationX,p=r.skewX,b=r.skewY,g=r.scaleX,h=r.scaleY,x=r.transformPerspective,C=r.force3D,_=r.target,v=r.zOrigin,y="",S=C==="auto"&&e&&e!==1||C===!0;if(v&&(m!==xr||f!==xr)){var A=parseFloat(f)*fo,E=Math.sin(A),T=Math.cos(A),L;A=parseFloat(m)*fo,L=Math.cos(A),i=il(_,i,E*L*-v),a=il(_,a,-Math.sin(A)*-v),c=il(_,c,T*L*-v+v)}x!==es&&(y+="perspective("+x+Cr),(o||s)&&(y+="translate("+o+"%, "+s+"%) "),(S||i!==es||a!==es||c!==es)&&(y+=c!==es||S?"translate3d("+i+", "+a+", "+c+") ":"translate("+i+", "+a+Cr),u!==xr&&(y+="rotate("+u+Cr),f!==xr&&(y+="rotateY("+f+Cr),m!==xr&&(y+="rotateX("+m+Cr),(p!==xr||b!==xr)&&(y+="skew("+p+", "+b+Cr),(g!==1||h!==1)&&(y+="scale("+g+", "+h+Cr),_.style[Pe]=y||"translate(0, 0)"},XE=function(e,n){var r=n||this,o=r.xPercent,s=r.yPercent,i=r.x,a=r.y,c=r.rotation,u=r.skewX,f=r.skewY,m=r.scaleX,p=r.scaleY,b=r.target,g=r.xOrigin,h=r.yOrigin,x=r.xOffset,C=r.yOffset,_=r.forceCSS,v=parseFloat(i),y=parseFloat(a),S,A,E,T,L;c=parseFloat(c),u=parseFloat(u),f=parseFloat(f),f&&(f=parseFloat(f),u+=f,c+=f),c||u?(c*=fo,u*=fo,S=Math.cos(c)*m,A=Math.sin(c)*m,E=Math.sin(c-u)*-p,T=Math.cos(c-u)*p,u&&(f*=fo,L=Math.tan(u-f),L=Math.sqrt(1+L*L),E*=L,T*=L,f&&(L=Math.tan(f),L=Math.sqrt(1+L*L),S*=L,A*=L)),S=He(S),A=He(A),E=He(E),T=He(T)):(S=m,T=p,A=E=0),(v&&!~(i+"").indexOf("px")||y&&!~(a+"").indexOf("px"))&&(v=rr(b,"x",i,"px"),y=rr(b,"y",a,"px")),(g||h||x||C)&&(v=He(v+g-(g*S+h*E)+x),y=He(y+h-(g*A+h*T)+C)),(o||s)&&(L=b.getBBox(),v=He(v+o/100*L.width),y=He(y+s/100*L.height)),L="matrix("+S+","+A+","+E+","+T+","+v+","+y+")",b.setAttribute("transform",L),_&&(b.style[Pe]=L)},YE=function(e,n,r,o,s){var i=360,a=qe(s),c=parseFloat(s)*(a&&~s.indexOf("rad")?Sr:1),u=c-o,f=o+u+"deg",m,p;return a&&(m=s.split("_")[1],m==="short"&&(u%=i,u!==u%(i/2)&&(u+=u<0?i:-i)),m==="cw"&&u<0?u=(u+i*zm)%i-~~(u/i)*i:m==="ccw"&&u>0&&(u=(u-i*zm)%i-~~(u/i)*i)),e._pt=p=new vt(e._pt,n,r,o,u,IE),p.e=f,p.u="deg",e._props.push(r),p},Km=function(e,n){for(var r in n)e[r]=n[r];return e},KE=function(e,n,r){var o=Km({},r._gsap),s="perspective,force3D,transformOrigin,svgOrigin",i=r.style,a,c,u,f,m,p,b,g;o.svg?(u=r.getAttribute("transform"),r.setAttribute("transform",""),i[Pe]=n,a=bs(r,1),nr(r,Pe),r.setAttribute("transform",u)):(u=getComputedStyle(r)[Pe],i[Pe]=n,a=bs(r,1),i[Pe]=u);for(c in Nn)u=o[c],f=a[c],u!==f&&s.indexOf(c)<0&&(b=lt(u),g=lt(f),m=b!==g?rr(r,c,u,g):parseFloat(u),p=parseFloat(f),e._pt=new vt(e._pt,a,c,m,p-m,wl),e._pt.u=g||0,e._props.push(c));Km(a,o)};St("padding,margin,Width,Radius",function(t,e){var n="Top",r="Right",o="Bottom",s="Left",i=(e<3?[n,r,o,s]:[n+s,n+r,o+r,o+s]).map(function(a){return e<2?t+a:"border"+a+t});wi[e>1?"border"+t:t]=function(a,c,u,f,m){var p,b;if(arguments.length<4)return p=i.map(function(g){return wn(a,g,u)}),b=p.join(" "),b.split(p[0]).length===5?p[0]:b;p=(f+"").split(" "),b={},i.forEach(function(g,h){return b[g]=p[h]=p[h]||p[(h-1)/2|0]}),a.init(c,b,m)}});var hg={name:"css",register:Il,targetTest:function(e){return e.style&&e.nodeType},init:function(e,n,r,o,s){var i=this._props,a=e.style,c=r.vars.startAt,u,f,m,p,b,g,h,x,C,_,v,y,S,A,E,T,L;nu||Il(),this.styles=this.styles||lg(e),T=this.styles.props,this.tween=r;for(h in n)if(h!=="autoRound"&&(f=n[h],!(wt[h]&&Zh(h,n,r,o,e,s)))){if(b=typeof f,g=wi[h],b==="function"&&(f=f.call(r,o,e,s),b=typeof f),b==="string"&&~f.indexOf("random(")&&(f=ms(f)),g)g(this,e,h,f,r)&&(E=1);else if(h.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(h)+"").trim(),f+="",Qn.lastIndex=0,Qn.test(u)||(x=lt(u),C=lt(f),C?x!==C&&(u=rr(e,h,u,C)+C):x&&(f+=x)),this.add(a,"setProperty",u,f,o,s,0,0,h),i.push(h),T.push(h,0,a[h]);else if(b!=="undefined"){if(c&&h in c?(u=typeof c[h]=="function"?c[h].call(r,o,e,s):c[h],qe(u)&&~u.indexOf("random(")&&(u=ms(u)),lt(u+"")||u==="auto"||(u+=Dt.units[h]||lt(wn(e,h))||""),(u+"").charAt(1)==="="&&(u=wn(e,h))):u=wn(e,h),p=parseFloat(u),_=b==="string"&&f.charAt(1)==="="&&f.substr(0,2),_&&(f=f.substr(2)),m=parseFloat(f),h in fn&&(h==="autoAlpha"&&(p===1&&wn(e,"visibility")==="hidden"&&m&&(p=0),T.push("visibility",0,a.visibility),qn(this,a,"visibility",p?"inherit":"hidden",m?"inherit":"hidden",!m)),h!=="scale"&&h!=="transform"&&(h=fn[h],~h.indexOf(",")&&(h=h.split(",")[0]))),v=h in Nn,v){if(this.styles.save(h),L=f,b==="string"&&f.substring(0,6)==="var(--"){if(f=Nt(e,f.substring(4,f.indexOf(")"))),f.substring(0,5)==="calc("){var w=e.style.perspective;e.style.perspective=f,f=Nt(e,"perspective"),w?e.style.perspective=w:nr(e,"perspective")}m=parseFloat(f)}if(y||(S=e._gsap,S.renderTransform&&!n.parseTransform||bs(e,n.parseTransform),A=n.smoothOrigin!==!1&&S.smooth,y=this._pt=new vt(this._pt,a,Pe,0,1,S.renderTransform,S,0,-1),y.dep=1),h==="scale")this._pt=new vt(this._pt,S,"scaleY",S.scaleY,(_?co(S.scaleY,_+m):m)-S.scaleY||0,wl),this._pt.u=0,i.push("scaleY",h),h+="X";else if(h==="transformOrigin"){T.push(yt,0,a[yt]),f=UE(f),S.svg?Nl(e,f,0,A,0,this):(C=parseFloat(f.split(" ")[2])||0,C!==S.zOrigin&&qn(this,S,"zOrigin",S.zOrigin,C),qn(this,a,h,Ri(u),Ri(f)));continue}else if(h==="svgOrigin"){Nl(e,f,1,A,0,this);continue}else if(h in fg){YE(this,S,h,p,_?co(p,_+f):f);continue}else if(h==="smoothOrigin"){qn(this,S,"smooth",S.smooth,f);continue}else if(h==="force3D"){S[h]=f;continue}else if(h==="transform"){KE(this,f,e);continue}}else h in a||(h=xo(h)||h);if(v||(m||m===0)&&(p||p===0)&&!RE.test(f)&&h in a)x=(u+"").substr((p+"").length),m||(m=0),C=lt(f)||(h in Dt.units?Dt.units[h]:x),x!==C&&(p=rr(e,h,u,C)),this._pt=new vt(this._pt,v?S:a,h,p,(_?co(p,_+m):m)-p,!v&&(C==="px"||h==="zIndex")&&n.autoRound!==!1?kE:wl),this._pt.u=C||0,v&&L!==f?(this._pt.b=u,this._pt.e=L,this._pt.r=DE):x!==C&&C!=="%"&&(this._pt.b=u,this._pt.r=NE);else if(h in a)VE.call(this,e,h,u,_?_+f:f);else if(h in e)this.add(e,h,u||e[h],_?_+f:f,o,s);else if(h!=="parseTransform"){Wc(h,f);continue}v||(h in a?T.push(h,0,a[h]):typeof e[h]=="function"?T.push(h,2,e[h]()):T.push(h,1,u||e[h])),i.push(h)}}E&&rg(this)},render:function(e,n){if(n.tween._time||!ru())for(var r=n._pt;r;)r.r(e,r.d),r=r._next;else n.styles.revert()},get:wn,aliases:fn,getSetter:function(e,n,r){var o=fn[n];return o&&o.indexOf(",")<0&&(n=o),n in Nn&&n!==yt&&(e._gsap.x||wn(e,"x"))?r&&Hm===r?n==="scale"?jE:BE:(Hm=r||{})&&(n==="scale"?ME:FE):e.style&&!Vc(e.style[n])?OE:~n.indexOf("-")?PE:eu(e,n)},core:{_removeProperty:nr,_getMatrix:su}};At.utils.checkPrefix=xo;At.core.getStyleSaver=lg;(function(t,e,n,r){var o=St(t+","+e+","+n,function(s){Nn[s]=1});St(e,function(s){Dt.units[s]="deg",fg[s]=1}),fn[o[13]]=t+","+e,St(r,function(s){var i=s.split(":");fn[i[1]]=o[i[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");St("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){Dt.units[t]="px"});At.registerPlugin(hg);var X=At.registerPlugin(hg)||At;X.core.Tween;/*!
|
|
16
16
|
* paths 3.15.0
|
|
17
17
|
* https://gsap.com
|
|
18
18
|
*
|
|
19
19
|
* Copyright 2008-2026, GreenSock. All rights reserved.
|
|
20
20
|
* Subject to the terms at https://gsap.com/standard-license
|
|
21
21
|
* @author: Jack Doyle, jack@greensock.com
|
|
22
|
-
*/var
|
|
22
|
+
*/var qE=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,ZE=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/ig,QE=Math.PI/180,Js=Math.sin,ei=Math.cos,as=Math.abs,ts=Math.sqrt,JE=function(e){return typeof e=="number"},qm=1e5,$n=function(e){return Math.round(e*qm)/qm||0},Zm=function(e){return e.closed=Math.abs(e[0]-e[e.length-2])<.001&&Math.abs(e[1]-e[e.length-1])<.001};function e0(t,e,n,r,o,s,i){for(var a=t.length,c,u,f,m,p;--a>-1;)for(c=t[a],u=c.length,f=0;f<u;f+=2)m=c[f],p=c[f+1],c[f]=m*e+p*r+s,c[f+1]=m*n+p*o+i;return t._dirty=1,t}function t0(t,e,n,r,o,s,i,a,c){if(!(t===a&&e===c)){n=as(n),r=as(r);var u=o%360*QE,f=ei(u),m=Js(u),p=Math.PI,b=p*2,g=(t-a)/2,h=(e-c)/2,x=f*g+m*h,C=-m*g+f*h,_=x*x,v=C*C,y=_/(n*n)+v/(r*r);y>1&&(n=ts(y)*n,r=ts(y)*r);var S=n*n,A=r*r,E=(S*A-S*v-A*_)/(S*v+A*_);E<0&&(E=0);var T=(s===i?-1:1)*ts(E),L=T*(n*C/r),w=T*-(r*x/n),R=(t+a)/2,N=(e+c)/2,D=R+(f*L-m*w),P=N+(m*L+f*w),j=(x-L)/n,G=(C-w)/r,k=(-x-L)/n,O=(-C-w)/r,M=j*j+G*G,B=(G<0?-1:1)*Math.acos(j/ts(M)),U=(j*O-G*k<0?-1:1)*Math.acos((j*k+G*O)/ts(M*(k*k+O*O)));isNaN(U)&&(U=p),!i&&U>0?U-=b:i&&U<0&&(U+=b),B%=b,U%=b;var W=Math.ceil(as(U)/(b/4)),F=[],V=U/W,H=4/3*Js(V/2)/(1+ei(V/2)),re=f*n,me=m*n,pe=m*-r,Y=f*r,te;for(te=0;te<W;te++)o=B+te*V,x=ei(o),C=Js(o),j=ei(o+=V),G=Js(o),F.push(x-H*C,C+H*x,j+H*G,G-H*j,j,G);for(te=0;te<F.length;te+=2)x=F[te],C=F[te+1],F[te]=x*re+C*pe+D,F[te+1]=x*me+C*Y+P;return F[te-2]=a,F[te-1]=c,F}}function n0(t){var e=(t+"").replace(ZE,function(L){var w=+L;return w<1e-4&&w>-1e-4?0:w}).match(qE)||[],n=[],r=0,o=0,s=2/3,i=e.length,a=0,c="ERROR: malformed path: "+t,u,f,m,p,b,g,h,x,C,_,v,y,S,A,E,T=function(w,R,N,D){_=(N-w)/3,v=(D-R)/3,h.push(w+_,R+v,N-_,D-v,N,D)};if(!t||!isNaN(e[0])||isNaN(e[1]))return console.log(c),n;for(u=0;u<i;u++)if(S=b,isNaN(e[u])?(b=e[u].toUpperCase(),g=b!==e[u]):u--,m=+e[u+1],p=+e[u+2],g&&(m+=r,p+=o),u||(x=m,C=p),b==="M")h&&(h.length<8?n.length-=1:a+=h.length,Zm(h)),r=x=m,o=C=p,h=[m,p],n.push(h),u+=2,b="L";else if(b==="C")h||(h=[0,0]),g||(r=o=0),h.push(m,p,r+e[u+3]*1,o+e[u+4]*1,r+=e[u+5]*1,o+=e[u+6]*1),u+=6;else if(b==="S")_=r,v=o,(S==="C"||S==="S")&&(_+=r-h[h.length-4],v+=o-h[h.length-3]),g||(r=o=0),h.push(_,v,m,p,r+=e[u+3]*1,o+=e[u+4]*1),u+=4;else if(b==="Q")_=r+(m-r)*s,v=o+(p-o)*s,g||(r=o=0),r+=e[u+3]*1,o+=e[u+4]*1,h.push(_,v,r+(m-r)*s,o+(p-o)*s,r,o),u+=4;else if(b==="T")_=r-h[h.length-4],v=o-h[h.length-3],h.push(r+_,o+v,m+(r+_*1.5-m)*s,p+(o+v*1.5-p)*s,r=m,o=p),u+=2;else if(b==="H")T(r,o,r=m,o),u+=1;else if(b==="V")T(r,o,r,o=m+(g?o-r:0)),u+=1;else if(b==="L"||b==="Z")b==="Z"&&(m=x,p=C,h.closed=!0),(b==="L"||as(r-m)>.5||as(o-p)>.5)&&(T(r,o,m,p),b==="L"&&(u+=2)),r=m,o=p;else if(b==="A"){if(A=e[u+4],E=e[u+5],_=e[u+6],v=e[u+7],f=7,A.length>1&&(A.length<3?(v=_,_=E,f--):(v=E,_=A.substr(2),f-=2),E=A.charAt(1),A=A.charAt(0)),y=t0(r,o,+e[u+1],+e[u+2],+e[u+3],+A,+E,(g?r:0)+_*1,(g?o:0)+v*1),u+=f,y)for(f=0;f<y.length;f++)h.push(y[f]);r=h[h.length-2],o=h[h.length-1]}else console.log(c);return u=h.length,u<6?(n.pop(),u=0):Zm(h),n.totalPoints=a+u,n}function r0(t){JE(t[0])&&(t=[t]);var e="",n=t.length,r,o,s,i;for(o=0;o<n;o++){for(i=t[o],e+="M"+$n(i[0])+","+$n(i[1])+" C",r=i.length,s=2;s<r;s++)e+=$n(i[s++])+","+$n(i[s++])+" "+$n(i[s++])+","+$n(i[s++])+" "+$n(i[s++])+","+$n(i[s])+" ";i.closed&&(e+="z")}return e}/*!
|
|
23
23
|
* CustomEase 3.15.0
|
|
24
24
|
* https://gsap.com
|
|
25
25
|
*
|
|
26
26
|
* @license Copyright 2008-2026, GreenSock. All rights reserved.
|
|
27
27
|
* Subject to the terms at https://gsap.com/standard-license
|
|
28
28
|
* @author: Jack Doyle, jack@greensock.com
|
|
29
|
-
*/var gt,
|
|
29
|
+
*/var gt,gg,bg=function(){return gt||typeof window<"u"&&(gt=window.gsap)&>.registerPlugin&>},Qm=function(){gt=bg(),gt?(gt.registerEase("_CE",Nr.create),gg=1):console.warn("Please gsap.registerPlugin(CustomEase)")},o0=1e20,ti=function(e){return~~(e*1e3+(e<0?-.5:.5))/1e3},s0=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/gi,i0=/[cLlsSaAhHvVtTqQ]/g,a0=function(e){var n=e.length,r=o0,o;for(o=1;o<n;o+=6)+e[o]<r&&(r=+e[o]);return r},l0=function(e,n,r){!r&&r!==0&&(r=Math.max(+e[e.length-1],+e[1]));var o=+e[0]*-1,s=-r,i=e.length,a=1/(+e[i-2]+o),c=-n||(Math.abs(+e[i-1]-+e[1])<.01*(+e[i-2]-+e[0])?a0(e)+s:+e[i-1]+s),u;for(c?c=1/c:c=-a,u=0;u<i;u+=2)e[u]=(+e[u]+o)*a,e[u+1]=(+e[u+1]+s)*c},c0=function t(e,n,r,o,s,i,a,c,u,f,m){var p=(e+r)/2,b=(n+o)/2,g=(r+s)/2,h=(o+i)/2,x=(s+a)/2,C=(i+c)/2,_=(p+g)/2,v=(b+h)/2,y=(g+x)/2,S=(h+C)/2,A=(_+y)/2,E=(v+S)/2,T=a-e,L=c-n,w=Math.abs((r-a)*L-(o-c)*T),R=Math.abs((s-a)*L-(i-c)*T),N;return f||(f=[{x:e,y:n},{x:a,y:c}],m=1),f.splice(m||f.length-1,0,{x:A,y:E}),(w+R)*(w+R)>u*(T*T+L*L)&&(N=f.length,t(e,n,p,b,_,v,A,E,u,f,m),t(A,E,y,S,x,C,a,c,u,f,m+1+(f.length-N))),f},Nr=(function(){function t(n,r,o){gg||Qm(),this.id=n,this.setData(r,o)}var e=t.prototype;return e.setData=function(r,o){o=o||{},r=r||"0,0,1,1";var s=r.match(s0),i=1,a=[],c=[],u=o.precision||1,f=u<=1,m,p,b,g,h,x,C,_,v;if(this.data=r,(i0.test(r)||~r.indexOf("M")&&r.indexOf("C")<0)&&(s=n0(r)[0]),m=s.length,m===4)s.unshift(0,0),s.push(1,1),m=8;else if((m-2)%6)throw"Invalid CustomEase";for((+s[0]!=0||+s[m-2]!=1)&&l0(s,o.height,o.originY),this.segment=s,g=2;g<m;g+=6)p={x:+s[g-2],y:+s[g-1]},b={x:+s[g+4],y:+s[g+5]},a.push(p,b),c0(p.x,p.y,+s[g],+s[g+1],+s[g+2],+s[g+3],b.x,b.y,1/(u*2e5),a,a.length-1);for(m=a.length,g=0;g<m;g++)C=a[g],_=a[g-1]||C,(C.x>_.x||_.y!==C.y&&_.x===C.x||C===_)&&C.x<=1?(_.cx=C.x-_.x,_.cy=C.y-_.y,_.n=C,_.nx=C.x,f&&g>1&&Math.abs(_.cy/_.cx-a[g-2].cy/a[g-2].cx)>2&&(f=0),_.cx<i&&(_.cx?i=_.cx:(_.cx=.001,g===m-1&&(_.x-=.001,i=Math.min(i,.001),f=0)))):(a.splice(g--,1),m--);if(m=1/i+1|0,h=1/m,x=0,C=a[0],f){for(g=0;g<m;g++)v=g*h,C.nx<v&&(C=a[++x]),p=C.y+(v-C.x)/C.cx*C.cy,c[g]={x:v,cx:h,y:p,cy:0,nx:9},g&&(c[g-1].cy=p-c[g-1].y);x=a[a.length-1],c[m-1].cy=x.y-p,c[m-1].cx=x.x-c[c.length-1].x}else{for(g=0;g<m;g++)C.nx<g*h&&(C=a[++x]),c[g]=C;x<a.length-1&&(c[g-1]=a[a.length-2])}return this.ease=function(y){var S=c[y*m|0]||c[m-1];return S.nx<y&&(S=S.n),S.y+(y-S.x)/S.cx*S.cy},this.ease.custom=this,this.id&>&>.registerEase(this.id,this.ease),this},e.getSVGData=function(r){return t.getSVGData(this,r)},t.create=function(r,o,s){return new t(r,o,s).ease},t.register=function(r){gt=r,Qm()},t.get=function(r){return gt.parseEase(r)},t.getSVGData=function(r,o){o=o||{};var s=o.width||100,i=o.height||100,a=o.x||0,c=(o.y||0)+i,u=gt.utils.toArray(o.path)[0],f,m,p,b,g,h,x,C,_,v;if(o.invert&&(i=-i,c=0),typeof r=="string"&&(r=gt.parseEase(r)),r.custom&&(r=r.custom),r instanceof t)f=r0(e0([r.segment.slice(0)],s,0,0,-i,a,c));else{for(f=[a,c],x=Math.max(5,(o.precision||1)*200),b=1/x,x+=2,C=5/x,_=ti(a+b*s),v=ti(c+r(b)*-i),m=(v-c)/(_-a),p=2;p<x;p++)g=ti(a+p*b*s),h=ti(c+r(p*b)*-i),(Math.abs((h-v)/(g-_)-m)>C||p===x-1)&&(f.push(_,v),m=(h-v)/(g-_)),_=g,v=h;f="M"+f.join(",")}return u&&u.setAttribute("d",f),f},t})();Nr.version="3.15.0";Nr.headless=!0;bg()&>.registerPlugin(Nr);/*!
|
|
30
30
|
* @gsap/react 2.1.2
|
|
31
31
|
* https://gsap.com
|
|
32
32
|
*
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
* Subject to the terms at https://gsap.com/standard-license or for
|
|
35
35
|
* Club GSAP members, the agreement issued with that membership.
|
|
36
36
|
* @author: Jack Doyle, jack@greensock.com
|
|
37
|
-
*/let Zm=typeof document<"u"?l.useLayoutEffect:l.useEffect,Qm=t=>t&&!Array.isArray(t)&&typeof t=="object",ni=[],l0={},gg=X;const sa=(t,e=ni)=>{let n=l0;Qm(t)?(n=t,t=null,e="dependencies"in n?n.dependencies:ni):Qm(e)&&(n=e,e="dependencies"in n?n.dependencies:ni),t&&typeof t!="function"&&console.warn("First parameter must be a function or config object");const{scope:r,revertOnUpdate:o}=n,s=l.useRef(!1),i=l.useRef(gg.context(()=>{},r)),a=l.useRef(u=>i.current.add(null,u)),c=e&&e.length&&!o;return c&&Zm(()=>(s.current=!0,()=>i.current.revert()),ni),Zm(()=>{if(t&&i.current.add(t,r),!c||!s.current)return()=>i.current.revert()},e),{context:i.current,contextSafe:a.current}};sa.register=t=>{gg=t};sa.headless=!0;const c0={interactiveDuration:280,interactiveEase:"power2.out",hoverLiftEase:"sine.inOut",tooltipDuration:200,switchThumbDuration:340,switchThumbEase:"back.out(1.4)",selectionFillEase:"back.out(1.25)",selectionFillDuration:200,hoverLiftScale:1.025,badgeAnchorHoverLiftScale:1.052,pressSqueezeScale:[1,.98,1],rippleDefaultDuration:700,rippleDefaultOpacityFrom:.42,rippleExpandableDuration:700,rippleExpandableOpacityFrom:.34,rippleEaseCss:"cubic-bezier(0.25, 0.55, 0.35, 0.95)",feedbackExpandDuration:720,expandDuration:200,expandOpenEase:"sine.inOut",enableHoverLift:!0,enablePressSqueeze:!0,enableToggleButtonFill:!0,enableRipple:!0,enableExpandable:!0,enableToastStack:!0,enableAsyncButtonCrossfade:!0,enableContentFade:!0,enableFeedbackExpand:!0,progressFillDuration:600,progressFillEase:"power2.out",enableProgressFill:!0,loadingDotsDuration:900,loadingDotsEaseUp:"power2.out",loadingDotsEaseDown:"power2.in",enableLoadingDots:!0};let Me={...c0},bg=0;const Dl=new Set;function u0(t){return Dl.add(t),()=>{Dl.delete(t)}}function Jm(){return bg}function xg(t){Me={...Me,...t},bg+=1;for(const e of Dl)e()}function Se(){return Me}function ve(){return{duration:Me.interactiveDuration/1e3,ease:Me.interactiveEase}}function Ri(){return{duration:Me.selectionFillDuration/1e3,ease:Me.selectionFillEase}}function Co(){return{duration:Me.tooltipDuration/1e3,ease:Me.interactiveEase}}function d0(){return{duration:Me.switchThumbDuration/1e3,ease:Me.switchThumbEase}}function ep(){return{duration:Me.expandDuration/1e3,ease:Me.expandOpenEase}}function Cg(){return{duration:Me.tooltipDuration/1e3,ease:Me.interactiveEase}}function f0(){return{duration:Me.feedbackExpandDuration/1e3}}function m0(){return{duration:Me.progressFillDuration/1e3,ease:Me.progressFillEase}}const p0=3;function h0(){const t=Me.loadingDotsDuration/1e3;return{cycleSec:t,staggerSec:t/p0,halfCycleSec:t/2,easeUp:Me.loadingDotsEaseUp,easeDown:Me.loadingDotsEaseDown,enabled:Me.enableLoadingDots}}X.registerPlugin(Nr,sa);const al="brn-ripple";let tp="";function iu(){const t=Se().rippleEaseCss;if(tp!==t){const e=/cubic-bezier\(\s*([\d.]+),\s*([\d.]+),\s*([\d.]+),\s*([\d.]+)\s*\)/.exec(t);e?Nr.create(al,`${e[1]},${e[2]},${e[3]},${e[4]}`):Nr.create(al,"0.25,0.55,0.35,0.95"),tp=t}return al}function V(...t){X.killTweensOf(t)}function Ss(t){return typeof window>"u"?"none":getComputedStyle(document.documentElement).getPropertyValue(t).trim()||"none"}const _o=()=>Ss("--shadow-none"),bn=()=>Ss(Cs.base),_g=()=>Ss(Cs.mid),g0=()=>Ss(Cs.large);function b0(t){return t==="none"?_o():Ss(Cs[t])}function vs(t,e){t&&t.style.setProperty("--el-shadow",e)}function de(){return typeof window>"u"||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}const x0="(max-width: 1024px), (hover: none), (pointer: coarse)";function C0(){return typeof window>"u"||!window.matchMedia?!1:window.matchMedia(x0).matches}function Re(){return de()||C0()||!Se().enableHoverLift}const _0=2.4,S0=.003,v0=1.8,y0=.002;function Sg(t){const{width:e,height:n}=t.getBoundingClientRect(),r=Math.max(e,n,1),o=1-Se().pressSqueezeScale[1];return 1-Math.min(Math.max(_0/r,S0),o)}function au(t){return lu(t)}function T0(t){return Sg(t)}function lu(t){const{width:e,height:n}=t.getBoundingClientRect(),r=Math.max(e,n,1);return 1+Math.min(Math.max(v0/r,y0),Se().hoverLiftScale-1)}function pt(t,e,n,r){if(Re()){e||(V(t),X.set(t,{scale:1}),r&&t.style.setProperty("--el-shadow",r.idle??_o()));return}V(t);const o=e?n!==void 0?n:lu(t):1,s=Se();if(X.to(t,{scale:o,duration:s.interactiveDuration/1e3,ease:s.hoverLiftEase,overwrite:"auto"}),r){const i=r.idle??_o();t.style.setProperty("--el-shadow",e?r.hover:i)}}function We(t,e){var p;if(!Se().enablePressSqueeze)return(p=e==null?void 0:e.onReleaseStart)==null||p.call(e),Promise.resolve();V(t);const n=Sg(t),r=Se(),o=r.interactiveDuration*1.15/1e3,s=o*.3,i=!Re(),a=!!(e!=null&&e.pointerInside&&i),c=a?(e==null?void 0:e.liftScale)!==void 0?e.liftScale:lu(t):1,u=a?o:o*.5,f=a?r.hoverLiftEase:"sine.inOut",m=e==null?void 0:e.shadow;if(m){const b=m.idle??_o();t.style.setProperty("--el-shadow",a?m.hover:b)}return new Promise(b=>{X.timeline({onComplete:()=>{X.set(t,{scale:c}),b()}}).to(t,{scale:n,duration:s,ease:"power1.out",overwrite:"auto"}).add(()=>{var g;(g=e==null?void 0:e.onReleaseStart)==null||g.call(e)}).to(t,{scale:c,duration:u,ease:f,overwrite:"auto"})})}function A0(t,e){return e==null||!(e instanceof Node)?!0:!t.contains(e)}function vg(t,e,n,r,o){return l.useEffect(()=>{const s=t.current;return()=>{s&&V(s)}},[t]),l.useMemo(()=>({onPointerOver:a=>{if(!e||a.defaultPrevented)return;const c=a.currentTarget;if(!(a.target instanceof Node)||!c.contains(a.target)||!A0(c,a.relatedTarget)||Re())return;const u=t.current;u&&(n&&(n.current=!0),pt(u,!0,r,o))},onPointerOut:a=>{const c=a.currentTarget,u=a.relatedTarget;if(u instanceof Node&&c.contains(u)||(n&&(n.current=!1),!e)||Re())return;const f=t.current;f&&pt(f,!1,r,o)}}),[t,e,n,r,o])}const kl="data-gloss-motion-init",nn="will-change-transform origin-center",np={rest:{angle1:-75,angle2:-45,shineX:0,shineY:50},hover:{angle1:-80,angle2:-45,shineX:10,shineY:50},press:{angle1:-75,angle2:-15,shineX:15,shineY:15}},E0=120,L0=.35;function w0(t){const{width:e,height:n}=t.getBoundingClientRect(),r=Math.max(e,n,1);return Math.min(1,Math.max(L0,E0/r))}function I0(t,e){const n=np.rest,r=np[e];if(e==="rest")return r;const o=w0(t);return{angle1:n.angle1+(r.angle1-n.angle1)*o,angle2:n.angle2+(r.angle2-n.angle2)*o,shineX:n.shineX+(r.shineX-n.shineX)*o,shineY:n.shineY+(r.shineY-n.shineY)*o}}function _r(t,e){const n=getComputedStyle(t).getPropertyValue(e).trim();return n||(typeof document>"u"?"":getComputedStyle(document.documentElement).getPropertyValue(e).trim())}function R0(t,e){const n=I0(t,e);return{"--gloss-angle-1":`${n.angle1}deg`,"--gloss-angle-2":`${n.angle2}deg`,"--gloss-shine-x":n.shineX,"--gloss-shine-y":n.shineY}}function N0(t,e){const n=_r(t,"--gloss-inset-top"),r=_r(t,"--gloss-inset-bottom"),o=_r(t,"--gloss-elevation"),s=_r(t,"--gloss-elevation-hover")||o,i=_r(t,"--gloss-inner-glow"),a=_r(t,"--gloss-glow-hover"),c=_r(t,"--gloss-press-inset"),u=`inset 0 0.425em 0.425em ${n}, inset 0 -0.225em 0.225em ${r}`,f=e==="hover"?`0 0.125em 0.3125em -0.1875em ${s}`:e==="press"?`0 0.04em 0.08em -0.0625em ${o}`:`0 0.0625em 0.125em -0.0625em ${o}`,m=e==="hover"?`inset 0 0 0.1em 0.25em ${a}`:`inset 0 0 0.05em 0.1em ${i}`,p=e==="press"?`inset 0 0.25em 0.06em 0 ${c}`:"inset 0 0.25em 0.06em 0 rgb(0 0 0 / 0)";return`${u}, ${f}, ${m}, ${p}`}function So(t,e){return{...R0(t,e),boxShadow:N0(t,e)}}function Ni(t){V(t),X.set(t,{scale:1,...So(t,"rest")})}let ll=null;function yg(t){if(Re()){Ni(t);return}const e=t.matches(":hover")||t.matches(":focus-within");if(V(t),e){X.set(t,{scale:au(t),...So(t,"hover")});return}Ni(t)}function D0(t=document){typeof document>"u"||t.querySelectorAll(`[${kl}]`).forEach(yg)}function k0(){ll||typeof document>"u"||(ll=new MutationObserver(t=>{for(const e of t)if(e.type==="attributes"&&e.attributeName==="data-theme"){D0();return}}),ll.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}))}function Mt(t,e=!0){return n=>{t.current=n,n&&e&&(k0(),n.hasAttribute(kl)||(n.setAttribute(kl,""),Ni(n)))}}function Ro(t,e=!0){const n=l.useRef(null),r=l.useMemo(()=>Mt(n,e),[e]);return l.useCallback(o=>{r(o),n.current=o,typeof t=="function"?t(o):t&&(t.current=o)},[r,t])}function vo(t,e,n){if(Re()){e||(V(t),X.set(t,{scale:1,...So(t,"rest")}));return}V(t);const r=Se(),o=e?"hover":"rest",s=e?n!==void 0?n:au(t):1;X.to(t,{scale:s,...So(t,o),duration:r.interactiveDuration/1e3,ease:r.hoverLiftEase,overwrite:"auto"})}function No(t,e=!1,n,r){if(de())return Promise.resolve();const o=Se();if(!o.enablePressSqueeze)return r==null||r(),Re()||vo(t,e,n),Promise.resolve();V(t);const s=T0(t),i=o.interactiveDuration*1.15/1e3,a=i*.3,c=i*1,u=!Re(),f=e&&u,m=f?"hover":"rest",p=f?au(t):1;return new Promise(b=>{X.timeline({onComplete:()=>b()}).to(t,{...So(t,"press"),scale:s,duration:a,ease:"power1.out",overwrite:"auto"}).add(()=>{r==null||r()}).to(t,{...So(t,m),scale:p,duration:c,ease:o.hoverLiftEase,overwrite:"auto"})})}function O0(t,e){return e==null||!(e instanceof Node)?!0:!t.contains(e)}function Do(t,e,n){const r=n==null?void 0:n.liftScale,o=n==null?void 0:n.pointerInsideRef;return l.useLayoutEffect(()=>{if(!e)return;const s=t.current;s&&Ni(s)},[e,t]),l.useEffect(()=>{const s=t.current;return()=>{s&&V(s)}},[t]),l.useMemo(()=>({onPointerOver:a=>{if(!e||a.defaultPrevented)return;const c=a.currentTarget;if(!(a.target instanceof Node)||!c.contains(a.target)||!O0(c,a.relatedTarget)||Re())return;const u=t.current;u&&(o&&(o.current=!0),vo(u,!0,r))},onPointerOut:a=>{const c=a.currentTarget,u=a.relatedTarget;if(u instanceof Node&&c.contains(u)||(o&&(o.current=!1),!e||Re()))return;const f=t.current;f&&vo(f,!1,r)}}),[e,r,o,t])}function ko(t,e){const n=l.useRef(!1),r=l.useRef(!1),o=l.useRef(!1),s=l.useMemo(()=>Mt(t,e),[t,e]),i=l.useCallback(()=>{const b=t.current;if(!b||!e||Re())return;const g=n.current||r.current;vo(b,g)},[e,t]),a=Do(t,e,{pointerInsideRef:n});l.useLayoutEffect(()=>{if(!e)return;const b=t.current;if(!b||typeof ResizeObserver>"u")return;const g=new ResizeObserver(()=>{yg(b)});return g.observe(b),()=>g.disconnect()},[e,t]);const c=l.useCallback(b=>{a.onPointerOver(b),r.current&&i()},[a,i]),u=l.useCallback(b=>{a.onPointerOut(b),r.current&&i()},[a,i]),f=l.useCallback(()=>{e&&(r.current=!0,!(o.current||n.current)&&i())},[e,i]),m=l.useCallback(b=>{if(!e)return;const g=t.current;g&&b.relatedTarget instanceof Node&&g.contains(b.relatedTarget)||(r.current=!1,i())},[e,t,i]),p=l.useCallback(()=>{if(!e)return;const b=t.current;!b||de()||(n.current=!0,o.current=!0,No(b,!0).finally(()=>{o.current=!1}))},[e,t]);return{bindShellRef:s,shellHoverMotionClass:e?nn:"",onShellPointerEnter:c,onShellPointerLeave:u,onShellFocusIn:f,onShellFocusOut:m,onShellPointerDown:p}}const ir="animate-shadow will-change-transform origin-center";function Tg(){return{hover:bn()}}function cu(){return{idle:bn(),hover:_g()}}function uu(t,e,n=bn,r){l.useLayoutEffect(()=>{e&&vs(t.current,n())},[e,t,n,r])}function Oo(t,e,n){const r=l.useMemo(()=>cu(),[]),o=(n==null?void 0:n.resolveIdle)??bn;l.useLayoutEffect(()=>{e&&vs(t.current,o())},[e,t,o,n==null?void 0:n.idleSyncKey]);const s=l.useCallback(a=>{if(!e||a.defaultPrevented)return;const c=t.current;!c||Re()||pt(c,!0,n==null?void 0:n.liftScale,r)},[e,n==null?void 0:n.liftScale,r,t]),i=l.useCallback(a=>{if(!e)return;const c=t.current;!c||Re()||pt(c,!1,n==null?void 0:n.liftScale,r)},[e,n==null?void 0:n.liftScale,r,t]);return{motionClass:e?ir:"",shadow:r,onPointerEnter:s,onPointerLeave:i}}function du(t,e,n){const r=l.useMemo(()=>cu(),[]),o=(n==null?void 0:n.resolveIdle)??bn;l.useLayoutEffect(()=>{e&&vs(t.current,o())},[e,t,o,n==null?void 0:n.idleSyncKey]);const s=vg(t,e,n==null?void 0:n.pointerInsideRef,n==null?void 0:n.liftScale,r);return{motionClass:e?ir:"",shadow:r,...s}}const P0=["small","base","mid","strong","bold"],ia={small:"--font-w-small",base:"--font-w-base",mid:"--font-w-mid",strong:"--font-w-strong",bold:"--font-w-bold"},Ag={small:400,base:500,mid:600,strong:700,bold:800};function B0(t){return`var(--font-w-${t})`}const j0=["--border-width","--color-background","--color-surface","--color-border","--color-foreground","--color-muted","--color-primary","--color-primary-foreground","--color-primary-hover","--color-default-hover","--color-primary-tint","--color-primary-tint-strong","--color-indicator","--color-indicator-foreground","--color-secondary","--color-secondary-foreground","--color-secondary-hover","--color-tertiary","--color-tertiary-foreground","--color-tertiary-hover","--color-focus-ring","--color-converge-ripple-primary-fill","--color-converge-ripple-neutral","--color-converge-ripple-neutral-muted","--color-converge-ripple-danger","--color-converge-ripple-info","--color-converge-ripple-success","--color-converge-ripple-warning","--color-danger","--color-danger-fill-hover","--color-danger-foreground","--color-success","--color-success-foreground","--color-success-fill-hover","--color-info","--color-info-foreground","--color-info-fill-hover","--color-warning","--color-warning-foreground","--color-warning-fill-hover","--color-surface-tint-danger","--color-surface-tint-success","--color-surface-tint-info","--color-surface-tint-warning","--color-surface-tint-danger-hover","--color-surface-tint-success-hover","--color-surface-tint-info-hover","--color-surface-tint-warning-hover","--font-family-sans","--font-family-mono","--font-w-small","--font-w-base","--font-w-mid","--font-w-strong","--font-w-bold","--space","--space-xsmall","--space-small","--space-base","--space-plus","--space-mid","--space-large","--space-xlarge","--size","--size-scale-xsmall","--size-scale-small","--size-scale-base","--size-scale-plus","--size-scale-mid","--size-scale-large","--size-scale-xlarge","--selection-indicator-small","--selection-indicator-base","--selection-indicator-mid","--selection-indicator-large","--radius","--radius-value-xsmall","--radius-value-small","--radius-value-base","--radius-value-mid","--radius-value-large","--text-scale-tools","--text-scale-tools--line-height","--text-scale-xsmall","--text-scale-xsmall--line-height","--text-scale-small","--text-scale-small--line-height","--text-scale-base","--text-scale-base--line-height","--text-scale-mid","--text-scale-mid--line-height","--text-scale-large","--text-scale-large--line-height","--text-scale-xlarge","--text-scale-xlarge--line-height","--text-scale-2xlarge","--text-scale-2xlarge--line-height","--text-scale-3xlarge","--text-scale-3xlarge--line-height","--text-accent-header-size","--text-accent-header-line-height","--text-accent-header-weight","--text-header-1-size","--text-header-1-line-height","--text-header-1-weight","--text-header-2-size","--text-header-2-line-height","--text-header-2-weight","--text-large-size","--text-large-line-height","--text-large-weight","--text-base-size","--text-base-line-height","--text-base-weight","--text-small-size","--text-small-line-height","--text-small-weight","--text-mid-size","--text-mid-line-height","--text-mid-weight","--text-tools-size","--text-tools-line-height","--text-tools-weight","--max-component-small","--max-component-base","--max-component-mid","--max-component-large","--button-min-width-small","--button-min-width-base","--button-min-width-mid","--button-min-width-large","--control-height-small","--control-height-base","--control-height-mid","--control-height-large","--avatar-size-small","--avatar-size-base","--avatar-size-mid","--avatar-size-large","--icon-size-xsmall","--icon-size-small","--icon-size-base","--icon-size-mid","--icon-size-large","--icon-size-xlarge","--icon-size-2xlarge","--shadow-size","--shadow-none","--shadow-base","--shadow-mid","--shadow-large","--toast-scrim-size","--toast-scrim-density"];function _e(t){return`var(--color-${t})`}const vr={default:"bg-surface text-foreground border-token",primary:"bg-primary text-primary-foreground border border-transparent",outline:"bg-transparent border-token text-foreground",secondary:"bg-secondary text-secondary-foreground border border-token",ghost:"bg-transparent text-foreground border border-transparent",gloss:""},M0=new Set(["default","primary","outline","secondary","ghost"]),Eg={default:{root:vr.default,loaderText:"text-foreground"},primary:{root:vr.primary,loaderText:"text-primary-foreground"},outline:{root:vr.outline,loaderText:"text-foreground"},secondary:{root:vr.secondary,loaderText:"text-secondary-foreground"},ghost:{root:vr.ghost,loaderText:"text-foreground"},gloss:{root:vr.gloss,loaderText:"text-foreground"}},F0={default:"",danger:"gloss-btn-danger",success:"gloss-btn-success",info:"gloss-btn-info",warning:"gloss-btn-warning"},G0={default:"focus-visible:outline-primary",danger:"focus-visible:outline-danger",success:"focus-visible:outline-success",info:"focus-visible:outline-info",warning:"focus-visible:outline-warning"},H0={default:_e("converge-ripple-neutral"),danger:_e("converge-ripple-danger"),success:_e("converge-ripple-success"),info:_e("converge-ripple-info"),warning:_e("converge-ripple-warning")},z0={danger:_e("converge-ripple-danger"),success:_e("converge-ripple-success"),info:_e("converge-ripple-info"),warning:_e("converge-ripple-warning")},V0={small:"[&_svg]:icon-small",base:"[&_svg]:icon-base",mid:"[&_svg]:icon-large",large:"[&_svg]:icon-large"},U0={small:"small",base:"base",mid:"mid",large:"mid"},$0="relative overflow-hidden inline-flex items-center justify-center outline-none focus-ring disabled:pointer-events-none",W0="pointer-events-none absolute inset-0 z-0 overflow-hidden",X0="relative z-[1] grid w-full min-w-0 place-items-center",Y0="origin-center will-change-transform",K0="col-start-1 row-start-1 inline-flex w-full min-w-0 items-center justify-center gap-xsmall",q0="inline-flex shrink-0 items-center justify-center",Z0="min-w-0 shrink",fu="col-start-1 row-start-1 flex items-center justify-center",Q0="text-success",J0="text-danger",eL="animate-spin motion-reduce:animate-none",tL="cursor-pointer",nL="opacity-50";function rL(t,e){const{root:n}=Eg[t];return t==="outline"&&e!=="default"?"bg-transparent text-foreground":n}function oL(t){return Eg[t].loaderText}function sL(t,e){if(e==="default")switch(t){case"default":return"default";case"primary":return"primary";case"outline":return"default";case"secondary":return"secondary";case"ghost":return"default";case"gloss":return"default"}switch(t){case"default":return`${e}-tint-hover`;case"primary":return`${e}-fill`;case"outline":case"ghost":return e;case"secondary":return"secondary";case"gloss":return"default"}}function iL(t,e){if(e==="default")return"";switch(t){case"default":return R(Gc[e],xt[e]);case"primary":return gh[e];case"outline":return R(Hc[e],xt[e]);case"secondary":return xt[e];case"ghost":return xt[e];case"gloss":return""}}function aL(t,e,n){return n?"":et(sL(t,e))}function lL(t,e){return t==="primary"&&e!=="default"?LA[e]:oL(t)}function cL(t,e){return t==="primary"?e==="default"?_e("converge-ripple-primary-fill"):z0[e]:H0[e]}const uL={small:"h-control-small",base:"h-control-base",mid:"h-control-mid",large:"h-control-large"};function dL(t,e=le[t].minWButton){const n=le[t];return R(e,n.padX,n.padY)}function mu(t,e=!1){const n=le[t];return R(uL[t],e?"min-w-fit":n.minWButton,n.padX,n.padY)}function Lg(t){const e=le[t];return R(e.spinnerIcon,e.spinnerBorder)}function fL(){return"pointer-events-none absolute left-1/2 top-1/2 z-0 rounded-full will-change-[transform,opacity]"}function mL(){return"box-border inline-block rounded-full border-current border-t-transparent"}function pL({groupSegment:t,slotClass:e,className:n}){return R(X0,t&&Y0,e,n)}function hL({slotClass:t,className:e,layoutClass:n}){return R(K0,t,n,e)}function gL(t,e){return R(q0,V0[t],e)}function bL(t,e){return R(Z0,t,e)}function xL(t,e){return R(fu,t,e)}function CL(t){return R(fu,Q0,t)}function _L(t){return R(fu,J0,t)}function wg(){return"shrink-0"}const SL={default:_e("converge-ripple-neutral"),primary:_e("converge-ripple-primary-fill"),outline:_e("converge-ripple-neutral"),secondary:_e("converge-ripple-neutral"),ghost:_e("converge-ripple-neutral"),gloss:_e("converge-ripple-neutral")},vL={danger:_e("converge-ripple-danger"),success:_e("converge-ripple-success"),info:_e("converge-ripple-info"),warning:_e("converge-ripple-warning")};function yL(t,e="default"){return e!=="default"?vL[e]:SL[t]}function TL(t,e,n,r,o){return t?R("gloss-btn",nn,F0[e]):R(rL(n,e),iL(n,e),!r&&ir,aL(n,e,o))}const cl=.12;function AL({id:t,x:e,y:n,size:r,durationMs:o,opacityFrom:s,background:i,direction:a,onDone:c}){const u=l.useRef(null),f=l.useRef(c);return f.current=c,l.useLayoutEffect(()=>{const m=u.current;if(!m)return;let p=!1;V(m);const b=a==="out"?cl:1,g=a==="out"?1:cl,h=X.fromTo(m,{scale:b,autoAlpha:s},{scale:g,autoAlpha:0,duration:o/1e3,ease:iu(),onComplete:()=>{p||f.current(t)}});return()=>{p=!0,h.kill(),V(m)}},[t,e,n,r,o,s,i,a]),d.jsx("span",{ref:u,className:"pointer-events-none absolute z-0 rounded-full",style:{left:e-r/2,top:n-r/2,width:r,height:r,background:i,transformOrigin:"center center",transform:`scale(${a==="out"?cl:1})`},"aria-hidden":!0})}function Ig({ripples:t,tone:e,onDone:n,durationMs:r=Se().rippleDefaultDuration,opacityFrom:o=Se().rippleDefaultOpacityFrom,direction:s="in"}){return d.jsx(d.Fragment,{children:t.map(i=>d.jsx(AL,{...i,background:e,durationMs:r,opacityFrom:o,direction:s,onDone:n},i.id))})}function EL(t,e,n,r){return Math.max(...[[0,0],[n,0],[0,r],[n,r]].map(([s,i])=>Math.hypot(s-t,i-e)))}function pu(t,e,n,r){const o=t.getBoundingClientRect(),s=e-o.left,i=n-o.top,a=EL(s,i,o.width,o.height)*2;return{id:r,x:s,y:i,size:a}}function LL(t,e){const n=t.currentTarget;return n?pu(n,t.clientX,t.clientY,e):null}function Rg(){const t=l.useRef(0),[e,n]=l.useState([]),r=l.useCallback(i=>{n(a=>a.filter(c=>c.id!==i))},[]),o=l.useCallback((i,a,c)=>{const u=++t.current,f=pu(i,a,c,u);n(m=>[...m,f])},[]),s=l.useCallback(i=>{const a=i.currentTarget;a&&o(a,i.clientX,i.clientY)},[o]);return{ripples:e,pushFromPointer:s,pushAtClientCoords:o,dismiss:r}}const hi={primarySolid:_e("converge-ripple-primary-fill"),neutral:_e("converge-ripple-neutral"),neutralMuted:_e("converge-ripple-neutral-muted"),danger:_e("converge-ripple-danger"),success:_e("converge-ripple-success"),info:_e("converge-ripple-info"),warning:_e("converge-ripple-warning")};function wL(t){return t==null||t===""?hi.neutral:Object.hasOwn(hi,t)?hi[t]:t}function IL(t){return t.closest("button,a[href],[role='button']")??t.parentElement}function ys({color:t,disabled:e=!1,duration:n=Se().rippleDefaultDuration,direction:r="out",className:o=""}){const s=l.useRef(null),{ripples:i,pushAtClientCoords:a,dismiss:c}=Rg(),u=wL(t);return l.useLayoutEffect(()=>{const f=s.current;if(!f||e)return;const m=IL(f);if(!m)return;const p=b=>{e||de()||!Se().enableRipple||b.defaultPrevented||b.pointerType==="mouse"&&b.button!==0||a(m,b.clientX,b.clientY)};return m.addEventListener("pointerdown",p),()=>m.removeEventListener("pointerdown",p)},[e,a]),d.jsx("span",{ref:s,className:R("pointer-events-none absolute inset-0 z-0 overflow-hidden rounded-[inherit]",o),"aria-hidden":!0,children:d.jsx(Ig,{ripples:i,tone:u,onDone:c,durationMs:n,opacityFrom:Se().rippleDefaultOpacityFrom,direction:r})})}function dt(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function aa({isGloss:t,animated:e,enabled:n,hasHoverShadow:r,useContentRef:o=!1,forwardedRef:s,onPointerEnter:i,onPointerLeave:a,onPointerDown:c,onPressReleaseStart:u}){const f=l.useRef(null),m=l.useRef(null),p=l.useRef(!1),b=l.useMemo(()=>Mt(f,t),[t]),g=l.useCallback(y=>{b(y),f.current=y,dt(s,y)},[b,s]),h=l.useCallback(()=>o?m.current:f.current,[o]);l.useEffect(()=>{if(n)return;const y=f.current,v=m.current;p.current=!1,y&&(V(y),y.style.removeProperty("--el-shadow")),v&&(V(v),v.style.transform="")},[n]);const x=l.useMemo(()=>r&&!t?Tg():void 0,[r,t]),C=l.useCallback(y=>{if(i==null||i(y),!e||!n||y.defaultPrevented||Re())return;const v=h();v&&(p.current=!0,t&&!o?vo(v,!0):pt(v,!0,void 0,o?void 0:x))},[e,x,n,t,h,i,o]),_=l.useCallback(y=>{if(a==null||a(y),p.current=!1,!e||!n||Re())return;const v=h();v&&(t&&!o?vo(v,!1):pt(v,!1,void 0,o?void 0:x))},[e,x,n,t,h,a,o]),S=l.useCallback(y=>{if(c==null||c(y),!e||!n||y.defaultPrevented||de())return;const v=h();if(v){if(t&&!o){No(v,p.current,void 0,u);return}We(v,{pointerInside:p.current,shadow:o?void 0:x,onReleaseStart:u})}},[e,x,n,t,h,c,u,o]);return{setRefs:g,btnRef:f,contentMotionRef:m,hoverPointerInsideRef:p,handlePointerEnter:C,handlePointerLeave:_,handlePointerDown:S}}const Ng=new Set(["ButtonContent","ButtonLabel","ButtonIcon","ButtonText","ButtonLoader","ButtonSuccess","ButtonError"]);function Dg(t,e){let n=!1;const r=o=>{if(!n)for(const s of l.Children.toArray(o)){if(!l.isValidElement(s))continue;const i=s.type.displayName;if(e(i)){n=!0;return}r(s.props.children)}};return r(t),n}function RL(t){return Dg(t,e=>e!=null&&Ng.has(e))}function ri(t,e){return Dg(t,n=>n===e)}function NL(t){if(t==null||t===!1)return!1;if(typeof t=="string"||typeof t=="number")return!0;const e=l.Children.toArray(t).filter(o=>o!=null);if(e.length!==1)return!1;const n=e[0];if(typeof n=="string"||typeof n=="number")return!0;if(!l.isValidElement(n))return!1;const r=n.type.displayName;return r==null||!Ng.has(r)}function DL(t,e,n,r){return Math.max(...[[0,0],[n,0],[0,r],[n,r]].map(([s,i])=>Math.hypot(s-t,i-e)))}function kL(t,e){return 2*DL(t/2,e/2,t,e)}function OL(t,e){switch(e){case"label":return t==="idle";case"loader":return t==="loading";case"success":return t==="success";case"error":return t==="error"}}const rp="data-button-async-layer-init",PL={label:{in:1,out:.92},loader:{in:1,out:.85},success:{in:1,out:.85},error:{in:1,out:.85}};function BL(t,e,n){const r=OL(e,n),{in:o,out:s}=PL[n];X.set(t,{autoAlpha:r?1:0,scale:r?o:s})}function oi(t,e,n){return r=>{t.current=r,r&&!r.hasAttribute(rp)&&(r.setAttribute(rp,""),BL(r,e,n))}}function jL({variant:t,animated:e,asyncState:n,isControlled:r,blocked:o,userDisabled:s,groupSegment:i,forwardedRef:a,onPointerEnter:c,onPointerLeave:u,onPointerDown:f}){const m=l.useRef(null),p=l.useRef(null),b=l.useRef(null),g=l.useRef(null),h=l.useRef("idle");h.current=n;const x=l.useRef(0),C=l.useRef("idle"),_=l.useRef(void 0),S=l.useRef(!1),[y,v]=l.useState([]),A=l.useRef(n),E=l.useMemo(()=>oi(m,A.current,"label"),[]),T=l.useMemo(()=>oi(p,A.current,"loader"),[]),L=l.useMemo(()=>oi(b,A.current,"success"),[]),w=l.useMemo(()=>oi(g,A.current,"error"),[]),I=l.useCallback(P=>{const G=N.btnRef.current;if(!G)return;const D=G.getBoundingClientRect(),O=kL(D.width,D.height),F=++x.current;v(B=>[...B,{id:F,size:O,tone:P}])},[]),N=aa({isGloss:t==="gloss",animated:e,enabled:!o,hasHoverShadow:M0.has(t),useContentRef:!!i,forwardedRef:a,onPointerEnter:c,onPointerLeave:u,onPointerDown:f});l.useLayoutEffect(()=>{if(!r)return;const P=C.current;(n==="success"||n==="error")&&P==="loading"&&I(n==="success"?"success":"error"),C.current=n},[n,r,I]),l.useLayoutEffect(()=>{const P=m.current,G=p.current,D=b.current,O=g.current;if(!P||!G||!D||!O)return;const F=de()||!Se().enableAsyncButtonCrossfade,B=ve(),$=[{el:P,active:n==="idle",scaleIn:1,scaleOut:.92},{el:G,active:n==="loading",scaleIn:1,scaleOut:.85},{el:D,active:n==="success",scaleIn:1,scaleOut:.85},{el:O,active:n==="error",scaleIn:1,scaleOut:.85}];if(_.current===void 0){_.current=n;for(const{el:W,active:M,scaleIn:z,scaleOut:H}of $)V(W),X.set(W,{autoAlpha:M?1:0,scale:M?z:H});return}if(_.current!==n){_.current=n;for(const{el:W,active:M,scaleIn:z,scaleOut:H}of $){if(V(W),F){X.set(W,{autoAlpha:M?1:0,scale:M?z:H});continue}X.to(W,{autoAlpha:M?1:0,scale:M?z:H,...B,overwrite:"auto"})}}},[n]);const k=l.useCallback(P=>{v(G=>G.filter(D=>D.id!==P))},[]),j=l.useCallback((P,G,D,O,F,B)=>$=>{P==null||P($),!(D||!G||$.defaultPrevented)&&(S.current||O!=="idle"||(S.current=!0,F("loading"),Promise.resolve(G($)).then(W=>{const M=W?"success":"error";F(M),I(M),B()}).catch(()=>{F("error"),I("error"),B()}).finally(()=>{S.current=!1})))},[I]);return{setRefs:N.setRefs,contentMotionRef:N.contentMotionRef,bindLabelRef:E,bindLoaderRef:T,bindSuccessRef:L,bindErrorRef:w,expandRipples:y,dismissExpand:k,pushExpandRipple:I,handlePointerEnter:N.handlePointerEnter,handlePointerLeave:N.handlePointerLeave,handlePointerDown:N.handlePointerDown,createAsyncClickHandler:j,asyncInFlight:S}}const kg=l.createContext(null),Ol=l.createContext({});function ML({classNames:t,children:e}){const n=l.useContext(Ol),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Ol.Provider,{value:r,children:e})}function Br(){return l.useContext(Ol)}function jr(){return l.useContext(kg)}function FL({value:t,children:e}){return d.jsx(kg.Provider,{value:t,children:e})}const GL={"accent-header":"text-accent-header","header-1":"text-header-1","header-2":"text-header-2",large:"text-large",mid:"text-mid",base:"text-base",small:"text-small",tools:"text-tools"},HL={"accent-header":"h1","header-1":"h2","header-2":"h3",large:"p",mid:"p",base:"p",small:"p",tools:"p"},ee=l.forwardRef(function({variant:e,as:n,inheritColor:r,className:o,children:s,...i},a){const c=n??HL[e];return l.createElement(c,{...i,ref:a,className:R(GL[e],!r&&"text-foreground",o)},s)});function zL({className:t}){return d.jsx("span",{className:R(mL(),t),"aria-hidden":!0})}function VL({className:t}){return d.jsx("svg",{className:R(wg(),t),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:d.jsx("path",{d:"M20 6L9 17l-5-5"})})}function UL({className:t}){return d.jsx("svg",{className:R(wg(),t),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:d.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})}function $L({size:t,tone:e,onDone:n}){const r=l.useRef(null),o=l.useRef(n);return o.current=n,l.useLayoutEffect(()=>{const s=r.current;if(!s)return;let i=!1;if(V(s),de()||!Se().enableFeedbackExpand){o.current();return}const c=X.fromTo(s,{scale:0,autoAlpha:.5},{scale:1,autoAlpha:0,...f0(),ease:iu(),overwrite:"auto",onComplete:()=>{i||o.current()}});return()=>{i=!0,c.kill(),V(s)}},[t,e]),d.jsx("span",{ref:r,className:fL(),style:{width:t,height:t,marginLeft:-t/2,marginTop:-t/2,background:e==="success"?"color-mix(in oklab, var(--color-success) 55%, transparent)":"color-mix(in oklab, var(--color-danger) 55%, transparent)",transform:"scale(0)"},"aria-hidden":!0})}const Di=l.forwardRef(function({className:e="",children:n,...r},o){const s=jr(),i=Br();return d.jsx("span",{ref:o??(s==null?void 0:s.contentMotionRef),className:pL({groupSegment:!!(s!=null&&s.groupSegment),slotClass:i.content,className:e}),...r,children:n})});Di.displayName="ButtonContent";const hu=l.forwardRef(function({className:e="",children:n,...r},o){const s=jr(),i=Br();return d.jsx("span",{ref:o??(s==null?void 0:s.bindLabelRef),className:hL({slotClass:i.label,className:e}),...r,children:n})});hu.displayName="ButtonLabel";function gu({className:t="",children:e,...n}){const r=jr(),o=Br(),s=(r==null?void 0:r.size)??"base";return d.jsx("span",{className:gL(s,R(o.icon,t)),"aria-hidden":!0,...n,children:e})}gu.displayName="ButtonIcon";function bu({className:t="",children:e,...n}){const r=jr(),o=Br(),s=(r==null?void 0:r.size)??"base";return d.jsx(ee,{variant:U0[s],as:"span",inheritColor:!0,className:bL(o.text,t),...n,children:e})}bu.displayName="ButtonText";const ki=l.forwardRef(function({className:e="",...n},r){const o=jr(),s=Br(),i=(o==null?void 0:o.size)??"base",a=(o==null?void 0:o.asyncState)??"idle",c=(o==null?void 0:o.loaderTextClass)??"";return d.jsx("span",{ref:r??(o==null?void 0:o.bindLoaderRef),"data-button-async-layer":!0,className:xL(c,R(s.loader,e)),"aria-hidden":a!=="loading",...n,children:d.jsx(zL,{className:R(Lg(i),eL)})})});ki.displayName="ButtonLoader";const Oi=l.forwardRef(function({className:e="",...n},r){const o=jr(),s=Br(),i=(o==null?void 0:o.size)??"base",a=(o==null?void 0:o.asyncState)??"idle",c=le[i];return d.jsx("span",{ref:r??(o==null?void 0:o.bindSuccessRef),"data-button-async-layer":!0,className:CL(R(s.success,e)),"aria-hidden":a!=="success",...n,children:d.jsx(VL,{className:c.icon})})});Oi.displayName="ButtonSuccess";const Pi=l.forwardRef(function({className:e="",...n},r){const o=jr(),s=Br(),i=(o==null?void 0:o.size)??"base",a=(o==null?void 0:o.asyncState)??"idle",c=le[i];return d.jsx("span",{ref:r??(o==null?void 0:o.bindErrorRef),"data-button-async-layer":!0,className:_L(R(s.error,e)),"aria-hidden":a!=="error",...n,children:d.jsx(UL,{className:c.icon})})});Pi.displayName="ButtonError";function WL({clipClass:t,expandRipples:e,onDismiss:n}){return d.jsx("span",{className:R(W0,t),"aria-hidden":!0,children:e.map(r=>d.jsx($L,{size:r.size,tone:r.tone,onDone:()=>n(r.id)},r.id))})}function XL({leftIcon:t,children:e}){const n=NL(e);return d.jsxs(d.Fragment,{children:[t!=null?d.jsx(gu,{children:t}):null,n?d.jsx(bu,{children:e}):e]})}const Og=l.createContext(null),Pg=l.createContext(null);function YL({value:t,children:e}){return d.jsx(Pg.Provider,{value:t,children:e})}function Bg({segment:t,buttonSize:e,variant:n,children:r}){const o=l.useMemo(()=>({segment:t,buttonSize:e,variant:n}),[e,t,n]);return d.jsx(Og.Provider,{value:o,children:r})}function On(){return l.useContext(Og)}function Po(){return l.useContext(Pg)}const Pl=l.createContext({}),jg=l.createContext(null),Mg=l.createContext(null);function KL({classNames:t,children:e}){const r={...l.useContext(Pl),...t};return d.jsx(Pl.Provider,{value:r,children:e})}function qL({shellIds:t,children:e}){return d.jsx(jg.Provider,{value:t,children:e})}function Mr(){return l.useContext(Pl)}function la(){return l.useContext(jg)}function xn(){return l.useContext(Mg)}function ZL(t){return t==="loading"}function QL({variant:t,status:e="default",size:n,type:r="button",animated:o=!0,asyncState:s,onAsyncStateChange:i,onAsyncClick:a,asyncFeedbackMs:c=2e3,disabled:u,leftIcon:f,ripple:m=!1,iconOnly:p=!1,groupSegment:b,className:g="",classNames:h,children:x,onClick:C}){const _=Po(),S=On(),y=xn(),v=_!=null&&_.segmented?void 0:b??(S==null?void 0:S.segment),A=n??(S==null?void 0:S.buttonSize)??(y==null?void 0:y.size)??"base",E=t??(S==null?void 0:S.variant)??"default",T=!!(u??(y==null?void 0:y.disabled)??(y==null?void 0:y.isSubmitting)),L=E==="gloss",[w,I]=l.useState("idle"),N=s!==void 0,k=N?s:w,j=l.useCallback(oe=>{I(oe),i==null||i(oe)},[i]),P=l.useCallback(()=>{window.setTimeout(()=>{j("idle")},c)},[c,j]),G=k==="loading"||k==="success"||k==="error",D=T||G,O=v?hn(v):"rounded-base",F=v?$r(v):"",B=v?hn(v):"rounded-base",$=RL(x),W=$?void 0:g,M=R($0,G0[e],mu(A,p),TL(L,e,E,!!v,D),T?nL:"",O,g,F,tL),z=cL(E,e),H=lL(E,e);return{type:r,size:A,variant:E,status:e,animated:o,ripple:m,blocked:D,busy:G,userDisabled:T,isGloss:L,groupSegment:v,clipClass:B,buttonClass:M,convergeRippleColor:z,loaderTextClass:H,asyncState:k,isControlled:N,internalAsync:w,leftIcon:f,children:x,classNames:h,isCompound:$,labelLayoutClass:W,onClick:C,onAsyncClick:a,setUncontrolledAsync:j,scheduleAsyncIdleReset:P,ariaBusy:ZL(k)}}const Fg=l.forwardRef(function({className:e,classNames:n,variant:r,status:o,size:s,type:i,animated:a,asyncState:c,onAsyncStateChange:u,onAsyncClick:f,asyncFeedbackMs:m,disabled:p,leftIcon:b,ripple:g,iconOnly:h,groupSegment:x,children:C,onClick:_,onPointerDown:S,onPointerEnter:y,onPointerLeave:v,onMouseDown:A,...E},T){var D;const L=QL({className:e,classNames:n,variant:r,status:o,size:s,type:i,animated:a,asyncState:c,onAsyncStateChange:u,onAsyncClick:f,asyncFeedbackMs:m,disabled:p,leftIcon:b,ripple:g,iconOnly:h,groupSegment:x,children:C,onClick:_}),w=jL({variant:L.variant,animated:L.animated,asyncState:L.asyncState,isControlled:L.isControlled,blocked:L.blocked,userDisabled:L.userDisabled,groupSegment:L.groupSegment,forwardedRef:T,onPointerEnter:y,onPointerLeave:v,onPointerDown:S}),I=w.createAsyncClickHandler(L.onClick,L.onAsyncClick,L.isControlled,L.internalAsync,L.setUncontrolledAsync,L.scheduleAsyncIdleReset),N={size:L.size,variant:L.variant,status:L.status,asyncState:L.asyncState,groupSegment:L.groupSegment,loaderTextClass:L.loaderTextClass,bindLabelRef:w.bindLabelRef,bindLoaderRef:w.bindLoaderRef,bindSuccessRef:w.bindSuccessRef,bindErrorRef:w.bindErrorRef,contentMotionRef:w.contentMotionRef},k=ri(C,"ButtonContent"),j=ri(C,"ButtonLoader"),P=ri(C,"ButtonSuccess"),G=ri(C,"ButtonError");return d.jsx(FL,{value:N,children:d.jsx(ML,{classNames:L.classNames,children:d.jsxs("button",{ref:w.setRefs,...E,type:L.type,disabled:L.blocked,"aria-busy":L.ariaBusy,className:L.buttonClass,onPointerDown:w.handlePointerDown,onPointerEnter:w.handlePointerEnter,onPointerLeave:w.handlePointerLeave,onMouseDown:A,onClick:I,children:[L.ripple?d.jsx(ys,{color:L.convergeRippleColor,disabled:L.blocked||L.asyncState!=="idle",duration:Se().rippleDefaultDuration,className:L.clipClass}):null,d.jsx(WL,{clipClass:L.clipClass,expandRipples:w.expandRipples,onDismiss:w.dismissExpand}),L.isCompound?k?C:d.jsxs(Di,{children:[C,j?null:d.jsx(ki,{}),P?null:d.jsx(Oi,{}),G?null:d.jsx(Pi,{})]}):d.jsxs(Di,{children:[d.jsx(hu,{className:R((D=L.classNames)==null?void 0:D.label,L.labelLayoutClass),children:d.jsx(XL,{leftIcon:L.leftIcon,children:L.children})}),d.jsx(ki,{}),d.jsx(Oi,{}),d.jsx(Pi,{})]})]})})})});Fg.displayName="ButtonRoot";const yo=Object.assign(Fg,{Content:Di,Label:hu,Icon:gu,Text:bu,Loader:ki,Success:Oi,Error:Pi}),Xt=l.createContext(null),Bl=l.createContext({});function JL({classNames:t,children:e}){const n=l.useContext(Bl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Bl.Provider,{value:r,children:e})}function xu(){return l.useContext(Xt)}function Gg(){return l.useContext(Bl)}function Cu(...t){return R(...t)}const ew="inline-flex flex-wrap items-baseline gap-x-xsmall gap-y-0",tw="font-w-mid",nw="text-danger";function rw({className:t,slotClass:e}){return Cu(ew,e,t)}function ow(t){return Cu(tw,t)}function sw(t){return Cu(nw,t)}const iw=!0;function Hg(t){return null}Hg.displayName="Label";function op({children:t,isRequired:e}){const n=Gg();return d.jsxs(d.Fragment,{children:[d.jsx(ee,{as:"span",variant:"base",className:ow(n.text),children:t}),e?d.jsx("span",{className:sw(n.required),"aria-hidden":iw,children:"*"}):null]})}function aw({isRequired:t,htmlFor:e,id:n}){const r=xu();return{htmlFor:e??(r==null?void 0:r.controlId),id:n??(r==null?void 0:r.labelId),isRequired:t??(r==null?void 0:r.isRequired)??!1}}function lw({children:t,className:e,isRequired:n,htmlFor:r,id:o,...s}){const{htmlFor:i,id:a,isRequired:c}=aw({isRequired:n,htmlFor:r,id:o}),u=Gg(),f=rw({className:e,slotClass:u.root});if(i!=null)return d.jsx("label",{htmlFor:i,className:f,...s,children:d.jsx(op,{isRequired:c,children:t})});const m=s;return d.jsx("span",{id:a,className:f,...m,children:d.jsx(op,{isRequired:c,children:t})})}function cw({classNames:t,...e}){return d.jsx(JL,{classNames:t,children:d.jsx(lw,{...e})})}const Ue=Object.assign(cw,{Slot:Hg}),uw=new Set(["FieldLegend","OptionGroupLegend","RadioGroup.Legend","CheckboxGroup.Legend"]);function Ft(...t){const e=t.filter(Boolean).join(" ");return e.length>0?e:void 0}function Yt(t){return`${t}-hint`}function Kt(t){return`${t}-error`}function Pn(...t){return R(...t)}function dw(t){return t.displayName}function _u(t){if(l.isValidElement(t))return dw(t.type)}function fw(t){if(!l.isValidElement(t))return!1;if(t.type==="legend")return!0;const e=_u(t);return e!=null&&uw.has(e)}function mw(t){return _u(t)==="FieldSetGroup"}function pw(t){return _u(t)==="FieldSetActions"}function hw(t){const e=l.Children.toArray(t),n=e.findIndex(fw);return n===-1?{legend:null,body:e}:{legend:e[n],body:[...e.slice(0,n),...e.slice(n+1)]}}function gw(t){const e=[],n=[];let r=null;for(const o of t)pw(o)?r=o:mw(o)?n.push(o):e.push(o);return{loose:e,groups:n,actions:r}}const jl=l.createContext({});function bw({classNames:t,children:e}){const n=l.useContext(jl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(jl.Provider,{value:r,children:e})}function Su(){return l.useContext(jl)}const Ml=l.createContext({});function xw({classNames:t,children:e}){const n=l.useContext(Ml),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Ml.Provider,{value:r,children:e})}function Bo(){return l.useContext(Ml)}const zg=l.createContext("base");function Cw({size:t,children:e}){return d.jsx(zg.Provider,{value:t,children:e})}function vu(){return l.useContext(zg)}const _w="flex w-full flex-col gap-xsmall",Sw={default:"text-muted",danger:"text-danger",success:"text-success",warning:"text-warning"},vw="m-0 min-w-0 border-0 p-0 disabled:pointer-events-none disabled:opacity-55",yw="flex min-w-0 w-full flex-col",Tw="m-0 block w-full max-w-full border-0 p-0",Aw="flex flex-col w-fit",Ew="flex min-w-0 w-full flex-col",Lw="flex flex-wrap w-fit items-center",yu={small:{legendGap:"mt-mid",stackGap:"gap-mid",groupGap:"gap-base",actionsGap:"gap-base"},base:{legendGap:"mt-large",stackGap:"gap-large",groupGap:"gap-plus",actionsGap:"gap-plus"},mid:{legendGap:"mt-xlarge",stackGap:"gap-xlarge",groupGap:"gap-mid",actionsGap:"gap-mid"},large:{legendGap:"mt-xlarge",stackGap:"gap-xlarge",groupGap:"gap-large",actionsGap:"gap-large"}};function ww({status:t,className:e,slotClass:n}){return Pn(Sw[t],n,e)}function Iw({size:t,hasLegend:e,slotClass:n}){const r=yu[t];return Pn(yw,r.stackGap,e&&r.legendGap,n)}function Rw({size:t,className:e,slotClass:n}){return Pn(Ew,yu[t].groupGap,n,e)}function Nw({size:t,className:e,slotClass:n}){return Pn(Lw,yu[t].actionsGap,n,e)}function Dw({className:t,children:e,...n}){const r=Su();return d.jsx("div",{className:Pn(_w,r.root,t),...n,children:e})}function pn({classNames:t,...e}){return d.jsx(bw,{classNames:t,children:d.jsx(Dw,{...e})})}function Xe({children:t,className:e,status:n="default",as:r="p",variant:o="small",...s}){const i=Su();return d.jsx(ee,{as:r,variant:o,inheritColor:r==="span",className:ww({status:n,className:e,slotClass:i.hint}),...s,children:t})}const kw=Ue;function Ze({role:t="alert",className:e,...n}){const r=Su();return d.jsx(Xe,{status:"danger",role:t,className:Pn(r.error,e),...n})}const Ts=l.forwardRef(function({className:e,children:n,...r},o){const s=Bo();return d.jsx("legend",{ref:o,className:Pn(Tw,s.legend,e),...r,children:n})});Ts.displayName="FieldLegend";function ca({children:t,className:e,...n}){const r=Bo();return d.jsx("span",{className:Pn(Aw,r.legendHeader,e),...n,children:t})}const Fr=l.forwardRef(function({className:e,children:n,...r},o){const s=vu(),i=Bo();return d.jsx("div",{ref:o,className:Rw({size:s,className:e,slotClass:i.group}),...r,children:n})});Fr.displayName="FieldSetGroup";const jo=l.forwardRef(function({className:e,children:n,...r},o){const s=vu(),i=Bo();return d.jsx("div",{ref:o,className:Nw({size:s,className:e,slotClass:i.actions}),...r,children:n})});jo.displayName="FieldSetActions";function Ow({legend:t,loose:e,groups:n,actions:r}){const o=vu(),s=Bo(),i=[];return n.length>0?i.push(...e,...n):e.length>0&&i.push(d.jsx(Fr,{children:e},"field-set-group")),r!=null&&i.push(r),i.length===0?null:d.jsx("div",{className:Iw({size:o,hasLegend:t!=null,slotClass:s.stack}),children:i})}const Vg=l.forwardRef(function({className:e,hintId:n,errorId:r,disabled:o,state:s,...i},a){const c=Bo();return d.jsxs("fieldset",{ref:a,disabled:o,"aria-describedby":Ft(n,r),className:Pn(vw,c.set,e),...i,children:[s.legend,d.jsx(Ow,{...s})]})});Vg.displayName="FieldSetRootInner";function Pw(t){const{legend:e,body:n}=hw(t),{loose:r,groups:o,actions:s}=gw(n);return{legend:e,loose:r,groups:o,actions:s}}const Tu=l.forwardRef(function({children:e,className:n,classNames:r,hintId:o,errorId:s,disabled:i,size:a="base",...c},u){const f=Pw(e);return d.jsx(Cw,{size:a,children:d.jsx(xw,{classNames:r,children:d.jsx(Vg,{ref:u,className:n,hintId:o,errorId:s,disabled:i,state:f,...c})})})});Tu.displayName="FieldSet";function Au(t){const e=l.useId();return t??`${e}-hint`}function Eu(t){const e=l.useId();return t??`${e}-error`}const Ug=Object.assign(Tu,{Legend:Ts,LegendHeader:ca,Group:Fr,Actions:jo}),Bw=Object.assign(pn,{Root:pn,Hint:Xe,Label:kw,Error:Ze,Set:Ug,Legend:Ts,LegendHeader:ca,Group:Fr,Actions:jo});function en(...t){return R(...t)}function $g(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function jw(t){const e=[t.value];return t.filterText&&e.push(t.filterText),typeof t.label=="string"&&e.push(t.label),typeof t.hint=="string"&&e.push(t.hint),e.join(" ").toLowerCase()}function Mw(t,e){const n=e.trim().toLowerCase();return n?jw(t).includes(n):!0}function Wg(t,e){const n=[];for(const r of t)Mw(r,e)&&n.push(r.value);return n}function Fw(t){return new Map(t.map(e=>[e.value,e]))}function Gw(t){return t?typeof t.label=="string"?t.label:t.filterText?t.filterText:t.value:""}function Hw({filteredValues:t,activeValue:e,optionsByValue:n,delta:r}){if(t.length===0)return e;const o=e?t.indexOf(e):-1;let s=o<0?0:o;for(let i=0;i<t.length;i+=1){s=(s+r+t.length)%t.length;const a=t[s],c=n.get(a);if(a&&c&&!c.disabled)return a}return e}function zw(t,e){for(const n of t){const r=e.get(n);if(r&&!r.disabled)return n}return null}function Vw(t,e){for(let n=t.length-1;n>=0;n-=1){const r=t[n],o=e.get(r);if(o&&!o.disabled)return r}return null}function Uw(t,e){return t||(e==="danger"||e==="default"?"default":e)}const $w=[],Xg=l.createContext(null);function Ww({value:t,children:e}){return d.jsx(Xg.Provider,{value:t,children:e})}function As(){const t=l.useContext(Xg);if(!t)throw new Error("ComboBox.* must be inside <ComboBox>.");return t}const Yg=l.createContext(null);function Xw({value:t,children:e}){return d.jsx(Yg.Provider,{value:t,children:e})}function Kg(){const t=l.useContext(Yg);if(!t)throw new Error("ComboBox compound-parts must be inside <ComboBox>.");return t}const Fl=l.createContext({});function Yw({classNames:t,children:e}){const n=l.useContext(Fl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Fl.Provider,{value:r,children:e})}function ar(){return l.useContext(Fl)}const Kw="No matches";function qw(t,e){return`${t}-opt-${e}`}function Zw({ariaLabel:t,ariaLabelledBy:e,label:n}){return{"aria-label":t??(e?void 0:n),"aria-labelledby":e}}const qg=l.createContext(null);function Qw({value:t,children:e}){return d.jsx(qg.Provider,{value:t,children:e})}function Zg(t){const e=l.useContext(qg);if(!e)throw new Error(`${t} must be inside <ListBox>.`);return e}const Gl=l.createContext({});function Jw({classNames:t,children:e}){const n=l.useContext(Gl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Gl.Provider,{value:r,children:e})}function Cn(){return l.useContext(Gl)}const Qg=l.createContext(null);function eI({value:t,children:e}){return d.jsx(Qg.Provider,{value:t,children:e})}function tI(){return l.useContext(Qg)}const Jg=l.createContext(null);function nI({value:t,children:e}){return d.jsx(Jg.Provider,{value:t,children:e})}function eb(){const t=l.useContext(Jg);if(!t)throw new Error("SelectionIndicator.* parts must be inside <SelectionIndicator>.");return t}const rI={small:"selection-indicator-small",base:"selection-indicator-base",mid:"selection-indicator-mid",large:"selection-indicator-large"},Lu={small:"icon-xsmall",base:"icon-xsmall",mid:"icon-base",large:"icon-mid"},oI="pointer-events-none relative z-[2] inline-flex items-center justify-center";function sI(t){return R("[&_svg]:size-full",Lu[t])}function iI(t){return Lu[t]}const aI={small:"size-[calc(var(--selection-indicator-small)*0.333333)]",base:"size-[calc(var(--selection-indicator-base)*0.333333)]",mid:"size-[calc(var(--selection-indicator-mid)*0.333333)]",large:"size-[calc(var(--selection-indicator-large)*0.333333)]"},lI="shrink-0 rounded-full bg-indicator-foreground",cI="shrink-0 rounded-full bg-foreground",Hl="relative box-border inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full",tb="pointer-events-none absolute inset-px z-[0] flex origin-center items-center justify-center rounded-[inherit]",uI="bg-indicator text-indicator-foreground",dI="bg-secondary text-secondary-foreground",fI="pointer-events-none absolute inset-px z-[1] flex origin-center items-center justify-center rounded-[inherit] gloss-indicator-fill text-foreground",mI=R(tb,"z-[1] rounded-[inherit] bg-primary-tint"),pI={small:"--selection-indicator-small",base:"--selection-indicator-base",mid:"--selection-indicator-mid",large:"--selection-indicator-large"},hI={small:1,base:1.125,mid:1.5,large:1.75};function Ut(t,e=16){if(typeof document<"u"){const n=getComputedStyle(document.documentElement).getPropertyValue(pI[t]).trim(),r=/^([\d.]+)rem$/i.exec(n);if(r)return Number.parseFloat(r[1])*e;const o=/^([\d.]+)px$/i.exec(n);if(o)return Number.parseFloat(o[1])}return hI[t]*e}function gI(t){switch(t){case"gloss":case"outline":return cI;case"secondary":return"shrink-0 rounded-full bg-secondary-foreground";default:return lI}}function bI(t){return t!=="outline"}function nb(t){return t==="gloss"?fI:R(tb,t==="secondary"?dI:uI)}function xI(t){switch(t){case"gloss":case"outline":return"text-foreground";case"secondary":return"text-secondary-foreground";default:return"text-indicator-foreground"}}function CI(t,e){return R(Hl,rI[t],e)}function _I(t,e){switch(t){case"base":return"border border-primary bg-surface";case"secondary":return"border-token bg-secondary";case"outline":return"border border-primary bg-surface";case"gloss":return"gloss-indicator border-0"}}const rb="SelectionIndicatorFill",ob="SelectionIndicatorMark";function ul(...t){return R(...t)}function sb(t){return t.type.displayName===rb}function ib(t){return t.type.displayName===ob}function SI({resolvedIcon:t,showCheck:e,showDot:n,size:r,variant:o}){if(t!=null)return t;if(e)return l.createElement(we.IoCheckmarkSharp,{"aria-hidden":!0,className:"size-full"});if(n)return l.createElement("span",{"aria-hidden":!0,className:R(aI[r],gI(o))})}function vI(t){return l.Children.toArray(t).some(e=>l.isValidElement(e)&&(sb(e)||ib(e)))}function yI(t){const e=l.Children.toArray(t);let n,r;const o=[];for(const s of e){if(l.isValidElement(s)&&sb(s)){n=s;continue}if(l.isValidElement(s)&&ib(s)){r=s;continue}o.push(s)}return{fillSlot:n,markSlot:r,legacyIcon:o.length===0?void 0:o.length===1?o[0]:o}}function TI({shell:t,fill:e,mark:n,classNames:r,className:o}){return{shell:ul(t,r==null?void 0:r.shell,o),fill:ul(e,r==null?void 0:r.fill),mark:ul(n,r==null?void 0:r.mark)}}const AI={transform:"scale(0)",opacity:0},EI={opacity:0},Bi=l.forwardRef(function({className:e,style:n,...r},o){const s=eb();return d.jsx("span",{ref:i=>{s.fillRef.current=i,dt(o,i)},"aria-hidden":!0,className:R(s.fillClassName,e),style:{...AI,...n},...r})});Bi.displayName=rb;const ji=l.forwardRef(function({className:e,children:n,style:r,...o},s){const i=eb(),a=n??i.markContent;return a==null?null:d.jsx("span",{ref:c=>{i.markRef.current=c,dt(s,c)},"aria-hidden":!0,className:R(i.markClassName,e),style:{...EI,...r},...o,children:a})});ji.displayName=ob;function ab(t,e,n){const r=l.useRef(!0),o=de();l.useLayoutEffect(()=>{const s=e==null?void 0:e.current,i=n==null?void 0:n.current,a=f=>{s&&(s.style.transform=`scale(${f?1:0})`,s.style.opacity=f?"1":"0"),i&&(i.style.opacity=f?"1":"0",i.style.transform="scale(1)")};if(!s&&!i)return;if(o){s&&V(s),i&&V(i),a(t);return}if(r.current){r.current=!1,s&&V(s),i&&V(i),a(t);return}const c={...Ri(),overwrite:"auto"},u={...Ri(),overwrite:"auto"};s&&(V(s),t?X.fromTo(s,{scale:0,autoAlpha:0},{scale:1,autoAlpha:1,...c}):X.to(s,{scale:0,autoAlpha:0,...c})),i&&(V(i),t?X.fromTo(i,{scale:.88,autoAlpha:0},{scale:1,autoAlpha:1,...u}):X.to(i,{scale:.92,autoAlpha:0,...u}))},[t,e,n,o])}function LI({size:t="base",variant:e="base",selected:n,check:r=!1,dot:o=!1,icon:s,children:i,className:a,classNames:c}){const u=l.useRef(null),f=l.useRef(null),{fillSlot:m,markSlot:p,legacyIcon:b}=yI(i),g=vI(i),h=p!=null,x=s??(h?p.props.children:b),C=x!=null,_=r&&!C,y=SI({resolvedIcon:x,showCheck:_,showDot:o&&!C&&!_,size:t,variant:e}),v=h||y!=null,A=bI(e);ab(n,A?u:void 0,v?f:void 0);const E=TI({shell:_I(e),fill:nb(e),mark:R(oI,_&&sI(t),C&&iI(t),xI(e)),classNames:c,className:a}),T=l.useMemo(()=>({fillRef:u,markRef:f,fillClassName:E.fill,markClassName:E.mark,markContent:y}),[E.fill,E.mark,y]);return{shellClassName:CI(t,E.shell),contextValue:T,usesCompound:g,fillSlot:m,markSlot:p,hasMark:v,markContent:y,showsFill:A}}function lb({size:t="base",variant:e="base",selected:n,check:r=!1,dot:o=!1,icon:s,children:i,className:a,classNames:c,...u}){const{shellClassName:f,contextValue:m,usesCompound:p,fillSlot:b,markSlot:g,hasMark:h,markContent:x,showsFill:C}=LI({size:t,variant:e,selected:n,check:r,dot:o,icon:s,children:i,className:a,classNames:c}),_=p?d.jsxs(d.Fragment,{children:[C?b??d.jsx(Bi,{}):null,h?g??d.jsx(ji,{}):null]}):d.jsxs(d.Fragment,{children:[C?d.jsx(Bi,{}):null,h?d.jsx(ji,{children:x}):null]});return d.jsx(nI,{value:m,children:d.jsx("span",{className:f,"aria-hidden":!0,...u,children:_})})}lb.displayName="SelectionIndicator";const Bt=Object.assign(lb,{Fill:Bi,Mark:ji});function wu(t,e,n="right",r){const o=n==="left"?"grid-cols-[minmax(0,1fr)_auto]":"grid-cols-[auto_minmax(0,1fr)]",s=t>=2?"grid-rows-[auto_auto_auto]":t===1?"grid-rows-[auto_auto]":"grid-rows-[auto] items-center";return R("grid",o,s,e,r)}function ua(t="right"){return R("row-start-1 self-center justify-self-start",t==="left"?"col-start-2":"col-start-1")}function da(t="right"){return R("row-start-1 inline-flex min-w-0 max-w-full items-center justify-self-start [width:fit-content]",t==="left"?"col-start-1":"col-start-2")}function fa(t,e="right"){return R(t===2?"row-start-2":"row-start-3","min-w-0 max-w-full justify-self-start [width:fit-content]",e==="left"?"col-start-1":"col-start-2")}function Iu(t){return t?3:2}function cb(t,e,n,r){return R("grid w-full min-w-0 text-left",n&&r?"grid-cols-[auto_minmax(0,1fr)_auto]":n?"grid-cols-[auto_minmax(0,1fr)]":r?"grid-cols-[minmax(0,1fr)_auto]":"grid-cols-[minmax(0,1fr)]",t?"grid-rows-[auto_auto] gap-y-xsmall":"grid-rows-[auto] items-center",e)}function wI(){return ua()}function II(t){return t?da():R("row-start-1 col-start-1 inline-flex min-w-0 max-w-full items-center justify-self-start [width:fit-content]")}function RI(t){return t?fa(2):R("row-start-2 col-start-1 min-w-0 max-w-full justify-self-start [width:fit-content]")}function NI(t){return R("row-start-1 self-center shrink-0 justify-self-end",t?"col-start-3":"col-start-2")}const ub=l.createContext(null);function zl({value:t,children:e}){return d.jsx(ub.Provider,{value:t,children:e})}function Es(t){const e=l.useContext(ub);if(!e)throw new Error(`${t} must be used inside a list item (Dropdown.Item / ListBox.Item).`);return e}function db({className:t,children:e,...n}){const r=Es("ItemLabel");return d.jsx("span",{ref:o=>{r.enableLabelMotion&&r.labelMotionRef&&(r.labelMotionRef.current=o)},className:R("inline-flex min-w-0 items-center",II(r.showIndicatorSlot),r.hasHint&&"min-w-0",r.enableLabelMotion&&"origin-center will-change-transform",t),...n,children:d.jsx(ee,{as:"span",variant:"base",inheritColor:!0,className:R("font-w-mid",r.disabled&&"text-muted"),children:e})})}function fb({className:t,children:e,...n}){const r=Es("ItemHint");return d.jsx(ee,{as:"span",variant:"tools",inheritColor:!0,className:R(RI(r.showIndicatorSlot),r.mutedHint||r.disabled?"text-muted":"opacity-80",t),...n,children:e})}function mb({className:t,children:e,...n}){const r=Es("ItemIcon");return d.jsx("span",{className:R("inline-flex items-center [&_svg]:icon-base",NI(r.showIndicatorSlot),r.mutedHint||r.disabled?"text-muted":"opacity-80",t),...n,children:e})}function pb({className:t,children:e,...n}){return d.jsx("span",{className:R("relative inline-flex shrink-0 items-center justify-center",wI(),t),...n,children:e})}const DI=new Set(["ListBoxItemIndicator","DropdownItemIndicator"]),kI=new Set(["ListBoxLabel","DropdownItemLabel","Dropdown.ItemLabel"]),OI=new Set(["ListBoxHint","DropdownItemHint","Dropdown.ItemHint"]),PI=new Set(["ListBoxIcon","DropdownItemIcon","Dropdown.ItemIcon"]);function BI(t){return t.displayName}function hb(t){let e=null,n=null,r=null,o=null;const s=[];for(const i of l.Children.toArray(t)){if(!l.isValidElement(i)){s.push(i);continue}const a=BI(i.type);if(a&&DI.has(a)){e==null&&(e=i);continue}if(a&&kI.has(a)){n==null&&(n=i);continue}if(a&&OI.has(a)){r==null&&(r=i);continue}if(a&&PI.has(a)){o==null&&(o=i);continue}s.push(i)}return{indicator:e,label:n,hint:r,icon:o,rest:s}}function ut(...t){return R(...t)}function jI({slotClassNames:t,classNames:e}){return{shell:ut(t.itemIndicatorShell,e==null?void 0:e.shell,e==null?void 0:e.itemIndicatorShell),fill:ut(t.itemIndicatorFill,e==null?void 0:e.fill,e==null?void 0:e.itemIndicatorFill),mark:ut(t.itemIndicatorMark,e==null?void 0:e.mark,e==null?void 0:e.itemIndicatorMark)}}function sp(t){return t==null?[]:Array.isArray(t)?[...t]:[t]}function MI(t){return hb(t)}function FI({children:t,label:e,hint:n,icon:r,showIndicator:o}){const s=MI(t),i=s.indicator!=null,a=s.hint!=null||n!=null,c=s.icon!=null||r!=null,u=s.label!=null||s.hint!=null||s.icon!=null,f=e!=null||s.label!=null;return{parts:s,hasCompoundIndicator:i,hasHint:a,hasIcon:c,isCompound:u,hasLabel:f,showIndicatorSlot:u?o&&i:o}}function lr({isDisabled:t,enabled:e,textMotionRef:n,hoverLift:r=!1,onPointerEnter:o,onPointerLeave:s,onPointerDown:i}){const a=de(),c=l.useRef(!1);l.useEffect(()=>{const p=n.current;return()=>{p&&V(p)}},[]),l.useEffect(()=>{const p=n.current;!p||!t||(c.current=!1,V(p),p.style.transform="")},[t,n]);const u=l.useCallback(p=>{if(o==null||o(p),!r||!e||t||p.defaultPrevented||Re())return;c.current=!0;const b=n.current;b&&pt(b,!0,Se().hoverLiftScale)},[e,r,t,o,n]),f=l.useCallback(p=>{if(s==null||s(p),!r||(c.current=!1,Re()))return;const b=n.current;b&&pt(b,!1,Se().hoverLiftScale)},[r,s,n]),m=l.useCallback(p=>{if(i==null||i(p),p.defaultPrevented||t||!e||a)return;const b=n.current;b&&(r?We(b,{pointerInside:c.current,liftScale:Se().hoverLiftScale}):We(b))},[e,r,t,i,a,n]);return{handlePointerEnter:u,handlePointerLeave:f,handlePointerDown:m}}function GI(t){return Ro(void 0,t)}function HI({disabled:t,hasLabel:e,onPointerDown:n}){const r=l.useRef(null),o=!t&&e,{handlePointerDown:s}=lr({isDisabled:t,enabled:o,textMotionRef:r,onPointerDown:n});return{labelMotionRef:r,enableLabelMotion:o,handlePointerDown:s}}const zI="flex min-h-0 flex-col gap-xsmall text-left outline-none",VI="gloss-panel gloss-deep rounded-mid p-plus text-foreground",UI="flex min-w-0 flex-col gap-xsmall",$I="px-plus text-left",WI="text-muted",XI="my-xsmall h-0 w-full shrink-0 border-t-token",YI="px-mid py-small text-center text-muted",KI="w-full min-w-0 rounded-mid px-plus py-base text-left outline-none",qI="cursor-pointer text-foreground focus-ring",ZI="cursor-not-allowed bg-transparent text-muted opacity-45 hover:bg-transparent",QI="bg-default-hover";function JI({isGloss:t,slotClass:e,className:n}){return ut(zI,t&&VI,e,n)}function eR({slotClass:t,className:e}){return ut(UI,t,e)}function tR({slotClass:t,className:e}){return ut($I,t,e)}function nR({slotClass:t,className:e}){return ut(WI,t,e)}function rR({slotClass:t,className:e}){return ut(XI,t,e)}function oR({slotClass:t,className:e}){return ut(YI,t,e)}function sR({disabled:t,isActive:e,slotClass:n,className:r}){return ut(KI,!t&&ut(qI,et()),t&&ZI,e&&!t&&QI,n,r)}function iR({children:t,label:e,hint:n,icon:r,value:o,disabled:s=!1}){const{listId:i,selected:a,activeValue:c,showIndicator:u,indicatorMode:f,disabled:m,selectItem:p,setActiveValue:b}=Zg("ListBox.Item"),g=s||!!m,h=a.has(o),x=c===o,C=qw(i,o),_=FI({children:t,label:e,hint:n,icon:r,showIndicator:u});return{disabled:g,isSelected:h,isActive:x,optionId:C,indicatorMode:f,selectItem:p,setActiveValue:b,..._}}function gb({listId:t,variant:e="default",className:n,ariaLabel:r,ariaLabelledBy:o,children:s,...i}){const a=Cn(),c=e==="gloss",u=GI(c);return d.jsx("div",{ref:u,id:t,role:"listbox","aria-label":r,"aria-labelledby":o,className:JI({isGloss:c,slotClass:a.root,className:n}),...i,children:s})}gb.displayName="ListBox";function bb({className:t,children:e,...n}){const r=Cn(),[o,s]=l.useState(),i=l.useCallback(a=>{s(a)},[]);return d.jsx(eI,{value:i,children:d.jsx("div",{role:"group","aria-labelledby":o,className:eR({slotClass:r.section,className:t}),...n,children:e})})}bb.displayName="ListBoxSection";function xb({className:t,children:e,id:n,...r}){const o=l.useId(),s=n??o,i=Cn(),a=tI();return l.useEffect(()=>(a==null||a(s),()=>a==null?void 0:a(void 0)),[s,a]),d.jsx("div",{id:s,className:tR({slotClass:i.header,className:t}),...r,children:d.jsx(ee,{as:"span",variant:"small",className:nR({slotClass:i.headerText}),children:e})})}xb.displayName="ListBoxHeader";function Cb({className:t,...e}){const n=Cn();return d.jsx("div",{role:"presentation","aria-hidden":!0,className:rR({slotClass:n.separator,className:t}),...e})}Cb.displayName="ListBoxSeparator";function _b({className:t,children:e,...n}){const r=Cn();return d.jsx(ee,{as:"p",variant:"base",className:oR({slotClass:r.empty,className:t}),...n,children:e??Kw})}_b.displayName="ListBoxEmpty";const Sb=l.forwardRef(function({children:e,className:n,value:r,disabled:o=!1,label:s,hint:i,icon:a,onClick:c,onPointerDown:u,onPointerEnter:f,...m},p){const b=Cn(),{disabled:g,isSelected:h,isActive:x,optionId:C,indicatorMode:_,isCompound:S,hasHint:y,hasIcon:v,hasLabel:A,showIndicatorSlot:E,selectItem:T,setActiveValue:L}=iR({children:e,label:s,hint:i,icon:a,value:r,disabled:o}),{labelMotionRef:w,enableLabelMotion:I,handlePointerDown:N}=HI({disabled:g,hasLabel:A,onPointerDown:u}),k=l.useCallback(D=>{c==null||c(D),!(D.defaultPrevented||g)&&T(r)},[g,c,T,r]),j=l.useCallback(D=>{f==null||f(D),!g&&L(r)},[g,f,L,r]),P={showIndicatorSlot:E,hasHint:y,hasIcon:v,selected:h,indicatorMode:_,disabled:g,mutedHint:g,enableLabelMotion:I,labelMotionRef:w},G=S?d.jsx(d.Fragment,{children:e}):d.jsxs(d.Fragment,{children:[E?d.jsx(ku,{}):null,s!=null?d.jsx(Ru,{children:s}):null,i!=null?d.jsx(Nu,{children:i}):null,a!=null?d.jsx(Du,{children:a}):null]});return d.jsx(zl,{value:P,children:d.jsx("button",{ref:p,type:"button",id:C,role:"option","aria-selected":h,disabled:g,tabIndex:-1,className:ut(sR({disabled:g,isActive:x,slotClass:b.item}),cb(y,"gap-x-base",E,v),n),onClick:k,onPointerDown:N,onPointerEnter:j,...m,children:G})})});Sb.displayName="ListBoxItem";function Ru({className:t,...e}){const n=Cn();return d.jsx(db,{className:ut(n.label,t),...e})}Ru.displayName="ListBoxLabel";function Nu({className:t,...e}){const n=Cn();return d.jsx(fb,{className:ut(n.hint,t),...e})}Nu.displayName="ListBoxHint";function Du({className:t,...e}){const n=Cn();return d.jsx(mb,{className:ut(n.icon,t),...e})}Du.displayName="ListBoxIcon";function ku({variant:t="base",size:e="small",check:n,children:r,className:o,classNames:s,...i}){const a=Es("ListBox.ItemIndicator"),c=Cn();if(!a.showIndicatorSlot)return null;const u=n??a.indicatorMode==="multi";return d.jsx(pb,{className:ut(c.itemIndicator,s==null?void 0:s.itemIndicator,o),...i,children:d.jsx(Bt,{variant:t,size:e,selected:a.selected,check:u,classNames:jI({slotClassNames:c,classNames:s}),children:r})})}ku.displayName="ListBoxItemIndicator";function Ou(t,e,n){if(n){const r=[...t],o=r.indexOf(e);return o>=0?r.splice(o,1):r.push(e),r}return t.includes(e)?[]:[e]}function aR({size:t="base",multiple:e=!1,value:n,defaultValue:r,onValueChange:o,selectionIndicator:s=!0,disabled:i=!1,activeValue:a,onActiveValueChange:c,listId:u}){const f=l.useId(),m=u??`listbox-${f}`,p=n!==void 0,[b,g]=l.useState(()=>sp(r)),h=p?sp(n):b,x=l.useMemo(()=>new Set(h),[h]),C=l.useRef(h);C.current=h;const[_,S]=l.useState(null),y=a!==void 0,v=y?a:_,A=l.useCallback(w=>{y||S(w),c==null||c(w)},[y,c]),E=l.useCallback(w=>{p||g(w),o==null||o(e?w:w[0]??"")},[p,e,o]),T=l.useCallback(w=>{const I=Ou(C.current,w,e);C.current=I,E(I)},[e,E]),L=l.useMemo(()=>({listId:m,size:t,multiple:e,selected:x,selectItem:T,activeValue:v,setActiveValue:A,showIndicator:s,indicatorMode:e?"multi":"radio",disabled:i}),[v,i,m,e,T,x,s,A,t]);return{listId:m,contextValue:L}}function vb({classNames:t,children:e,className:n,size:r,variant:o="default",multiple:s,value:i,defaultValue:a,onValueChange:c,selectionIndicator:u,disabled:f,activeValue:m,onActiveValueChange:p,listId:b,label:g,"aria-label":h,"aria-labelledby":x,...C}){const{listId:_,contextValue:S}=aR({size:r,multiple:s,value:i,defaultValue:a,onValueChange:c,selectionIndicator:u,disabled:f,activeValue:m,onActiveValueChange:p,listId:b}),y=Zw({ariaLabel:h,ariaLabelledBy:x,label:g});return d.jsx(Qw,{value:S,children:d.jsx(Jw,{classNames:t,children:d.jsx(gb,{listId:_,variant:o,className:n,ariaLabel:y["aria-label"],ariaLabelledBy:y["aria-labelledby"],...C,children:e})})})}vb.displayName="ListBox";const lR=Object.assign(ku,{Fill:Bt.Fill,Mark:Bt.Mark}),wr=Object.assign(vb,{Section:bb,Header:xb,Separator:Cb,Empty:_b,Item:Sb,Label:Ru,Hint:Nu,Icon:Du,ItemIndicator:lR}),yb=l.createContext(null);function cR({value:t,children:e}){return d.jsx(yb.Provider,{value:t,children:e})}function Ls(t){const e=l.useContext(yb);if(!e)throw new Error(`${t} must be inside <Popover>.`);return e}const Vl=l.createContext({});function uR({classNames:t,children:e}){const n=l.useContext(Vl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Vl.Provider,{value:r,children:e})}function Gr(){return l.useContext(Vl)}const Tb=l.createContext("bottom");function dR({value:t,children:e}){return d.jsx(Tb.Provider,{value:t,children:e})}function fR(){return l.useContext(Tb)}function mR(t,e){if(t===e)return!0;const n=t==null?void 0:t.displayName;if(typeof e=="string")return n===e;const r=e==null?void 0:e.displayName;return r!=null&&n===r}function Te(t,...e){let n=!1;const r=o=>{if(!n){for(const s of l.Children.toArray(o))if(l.isValidElement(s)){if(e.some(i=>mR(s.type,i))){n=!0;return}r(s.props.children)}}};return r(t),n}function pR(t){return`${t}-label`}function hR(t){return`${t}-hint`}function gR({contentRole:t,labelConnected:e,hintConnected:n,labelId:r,hintId:o}){if(t==="dialog"){if(e&&n)return`${r} ${o}`;if(n)return o}}function bR({contentRole:t,labelConnected:e,labelId:n}){if(t==="dialog"&&e)return n}const Ab="PopoverArrow";function rn(...t){return R(...t)}function Ul(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function ip(t){return t.type.displayName===Ab}function xR(t){const e=l.Children.toArray(t),n=e.find(o=>l.isValidElement(o)&&ip(o)),r=e.filter(o=>!(l.isValidElement(o)&&ip(o)));return{customArrow:n,panelChildren:r}}function CR(t,e,n){const[r,o]=l.useState(e),s=t!==void 0,i=s?t:r,a=l.useCallback(c=>{s||o(c),n==null||n(c)},[s,n]);return[i,a]}function _R({children:t,size:e="base",variant:n="default",side:r="bottom",open:o,defaultOpen:s=!1,onOpenChange:i,anchorRef:a,shouldDismiss:c}){const[u,f]=CR(o,s,i),m=l.useRef(null),p=l.useRef(null),g=`popover-${l.useId()}`,h=pR(g),x=hR(g),C=Te(t,"PopoverLabel"),_=Te(t,"PopoverHint");return l.useEffect(()=>{if(!u)return;const y=v=>{v.key==="Escape"&&f(!1)};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[u,f]),l.useEffect(()=>{if(!u)return;const y=v=>{var T;const A=v.target,E=(a==null?void 0:a.current)??m.current;E!=null&&E.contains(A)||(T=p.current)!=null&&T.contains(A)||c&&!c(A)||f(!1)};return document.addEventListener("pointerdown",y),()=>document.removeEventListener("pointerdown",y)},[a,u,f,c]),{contextValue:l.useMemo(()=>({open:u,setOpen:f,popoverId:g,labelId:h,hintId:x,size:e,variant:n,side:r,labelConnected:C,hintConnected:_,triggerRef:m,anchorRef:a,contentRef:p}),[a,_,x,C,h,u,g,f,r,e,n])}}const Pu="data-theme",Eb=`[${Pu}]`;function $l(t){const e=t.getAttribute(Pu);return e==="light"?"light":e?"dark":null}function SR(t){if(typeof document>"u")return!1;if(t){const e=t.closest(Eb);if(e)return $l(e)==="light"}return $l(document.documentElement)==="light"}function Mo(t){if(typeof document>"u")return{};const e=(t==null?void 0:t.closest(Eb))??document.documentElement;return $l(e)!=="light"?{}:e===document.documentElement?{}:{"data-theme":"light"}}function vR(t){if(typeof document>"u")return[];const e=new Set,n=[],r=o=>{let s=o;for(;s&&!e.has(s);)e.add(s),n.push(s),s=s.parentElement};return t&&r(t),r(document.documentElement),n}function yR(t,e){if(typeof document>"u")return()=>{};const n=new MutationObserver(e);for(const r of vR(t))n.observe(r,{attributes:!0,attributeFilter:[Pu]});return()=>n.disconnect()}function Bu(t){return l.useSyncExternalStore(l.useCallback(e=>yR(t,e),[t]),()=>SR(t),()=>!1)}function TR(t){return t?"current"in t?t.current:t:null}function ju(t,e){const n=TR(e),r=l.useRef(null);if(!t)r.current=null;else if(!n&&r.current===null){const o=typeof document<"u"?document.activeElement:null;r.current=o instanceof HTMLElement?o:null}return n??r.current}function ws({triggerRef:t,openingRef:e,setOpen:n}){if(e.current)return;if(de()){n(!0);return}const r=t.current;if(!r){n(!0);return}e.current=!0,We(r).then(()=>{e.current=!1,n(!0)})}function Is(){return l.useRef(!1)}const AR=8;function ER(t,e,n,r){return Math.max(r,Math.min(t,n-e-r))}function ma(t,e,n,r,o,s){const i=r==="start"?t:r==="end"?t+e-n:t+e/2-n/2;return ER(i,n,o,s)}function LR(t,e,n,r){return t.top-n-e>=r}function wR(t,e,n,r){return t.bottom+n+e<=window.innerHeight-r}function IR(t,e,n,r){return t.left-n-e>=r}function RR(t,e,n,r){return t.right+n+e<=window.innerWidth-r}function NR(t,e,n,r,o){return{left:ma(t.left,t.width,e.width,o,window.innerWidth,r),top:t.top-n-e.height,resolvedSide:"top"}}function DR(t,e,n,r,o){return{left:ma(t.left,t.width,e.width,o,window.innerWidth,r),top:t.bottom+n,resolvedSide:"bottom"}}function kR(t,e,n,r,o){return{left:t.left-n-e.width,top:ma(t.top,t.height,e.height,o,window.innerHeight,r),resolvedSide:"left"}}function OR(t,e,n,r,o){return{left:t.right+n,top:ma(t.top,t.height,e.height,o,window.innerHeight,r),resolvedSide:"right"}}const ap={top:NR,bottom:DR,left:kR,right:OR},PR={top:(t,e,n,r,o)=>LR(t,n,r,o),bottom:(t,e,n,r,o)=>wR(t,n,r,o),left:(t,e,n,r,o)=>IR(t,e,r,o),right:(t,e,n,r,o)=>RR(t,e,r,o)},BR={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]};function Lb(t,e,n,r,o){const s=r,i=AR,a=(o==null?void 0:o.align)??"center",c=BR[n];for(const u of c)if(PR[u](t,e.width,e.height,s,i))return ap[u](t,e,s,i,a);return ap[n](t,e,s,i,a)}const wb={top:"bottom-0 left-1/2 -translate-x-1/2 translate-y-1/2",bottom:"top-0 left-1/2 -translate-x-1/2 -translate-y-1/2",left:"right-0 top-1/2 -translate-y-1/2 translate-x-1/2",right:"left-0 top-1/2 -translate-y-1/2 -translate-x-1/2"},Ib={top:"pb-1",bottom:"pt-1",left:"pr-1",right:"pl-1"},pa=.97;function $t(){return de()}function Rb(){return{opacity:$t()?1:0}}function Mu(t,e,n){t&&(t.style.opacity="1"),e&&(e.style.opacity="1",e.style.visibility="visible",X.set(e,{scale:1,clearProps:"transform"}),n!=null&&n.focusPanel&&e.focus())}function Nb({overlay:t,panel:e,vars:n,panelFrom:r={scale:pa},panelTo:o={scale:1}}){V(t,e),X.fromTo(t,{opacity:0},{opacity:1,...n}),X.fromTo(e,r,{...o,...n})}function Db({overlay:t,panel:e,vars:n,onComplete:r,panelExit:o={autoAlpha:0,scale:pa}}){V(t,e);const s=X.timeline({onComplete:r});return s.to(t,{opacity:0,...n},0),s.to(e,{...o,...n},0),s}function ha(t){t&&(t.style.opacity="",t.style.visibility="",X.set(t,{scale:1,clearProps:"transform"}))}function jR(t){t.style.opacity="1",t.style.visibility="visible"}function ga({surface:t,vars:e,from:n={scale:pa},to:r={scale:1}}){V(t),jR(t),X.fromTo(t,n,{...r,...e})}function ba({surface:t,vars:e,onComplete:n,exit:r={}}){V(t);const o=Number.parseFloat(getComputedStyle(t).opacity),s=Number.isFinite(o)&&o>0?o:1;return X.fromTo(t,{autoAlpha:s},{autoAlpha:0,...r,...e,onComplete:n})}function MR({open:t,side:e,offset:n,align:r,matchAnchorWidth:o,showArrow:s,isGloss:i,forwardedRef:a,contentRef:c,triggerRef:u,anchorRef:f}){const m=l.useRef(null),p=l.useRef(null),b=l.useMemo(()=>Mt(p,i),[i]),[g,h]=l.useState(!1),[x,C]=l.useState(e),_=l.useCallback(y=>{m.current=y,c.current=y,Ul(a)(y)},[c,a]),S=l.useCallback(()=>{const y=(f==null?void 0:f.current)??u.current,v=m.current;if(!y||!v)return;const A=y.getBoundingClientRect();o?v.style.minWidth=`${Math.max(A.width,192)}px`:v.style.minWidth="";const E=Lb(A,v.getBoundingClientRect(),e,n,{align:r});C(E.resolvedSide),v.style.position="fixed",v.style.left=`${E.left}px`,v.style.top=`${E.top}px`,v.style.transform=""},[r,f,o,n,e,u]);return l.useLayoutEffect(()=>{t&&h(!0)},[t]),uu(m,!i,bn),l.useLayoutEffect(()=>{if(!t)return;S();const y=window.requestAnimationFrame(()=>S()),v=()=>S();window.addEventListener("scroll",v,!0),window.addEventListener("resize",v);const A=m.current,E=A&&typeof ResizeObserver<"u"?new ResizeObserver(()=>S()):null;return A&&E&&E.observe(A),()=>{window.cancelAnimationFrame(y),window.removeEventListener("scroll",v,!0),window.removeEventListener("resize",v),E==null||E.disconnect()}},[t,S,s,n,r,o]),l.useLayoutEffect(()=>{if(!g)return;const y=m.current;if(!y)return;const v=$t();let A=!1;if(v)return V(y),t?ha(y):h(!1),()=>{A=!0};if(V(y),t)return ga({surface:y,vars:{...Co(),overwrite:"auto"}}),()=>{A=!0,V(y)};const E=ba({surface:y,vars:{...Co(),overwrite:"auto"},onComplete:()=>{A||h(!1)}});return()=>{A=!0,V(y),E.kill()}},[t,g]),{panelRef:m,setPanelRef:_,bindGlossPanelRef:b,portalMounted:g,resolvedSide:x}}function FR({alignProp:t,matchAnchorWidth:e}){return t??(e?"start":"center")}const Rs=6,GR={small:"small",base:"base",mid:"mid",large:"mid"},HR={small:"tools",base:"small",mid:"small",large:"base"},kb={small:"min-w-[12rem]",base:"min-w-[14rem]",mid:"min-w-[16rem]",large:"min-w-[18rem]"},Ob={small:"max-w-[16rem]",base:"max-w-xs",mid:"max-w-sm",large:"max-w-md"},Pb={small:"px-small py-xsmall",base:"px-plus py-base",mid:"px-mid py-plus",large:"px-large py-mid"},Bb={small:"gap-small",base:"gap-base",plus:"gap-plus",mid:"gap-mid"},zR={small:"small",base:"base",mid:"plus",large:"mid"},VR="inline-flex shrink-0 border-0 bg-transparent p-0",UR="pointer-events-auto z-[10000] w-max min-w-0 overflow-visible text-left outline-none will-change-transform",$R="relative overflow-visible",WR="gloss-panel gloss-deep relative z-[1] flex min-w-0 origin-center flex-col overflow-hidden rounded-mid text-foreground",XR="gloss-content flex min-w-0 flex-col",YR="relative z-[1] flex min-w-0 flex-col overflow-hidden rounded-mid border-token bg-surface text-foreground animate-shadow",KR="pointer-events-none absolute z-0 size-2 rotate-45",qR="border-0 bg-[var(--color-surface)]",ZR="border-token bg-surface",QR="flex shrink-0 flex-col gap-xsmall text-left",JR="min-w-0 font-w-mid",eN="min-h-0 min-w-0 text-left";function tN({rootSlot:t,slotClass:e,className:n}){return rn(VR,t,e,n)}function nN({resolvedSide:t,showArrow:e,slotClass:n,className:r}){return rn(UR,e&&Ib[t],n,r)}function rN({size:t,unstyled:e,contentGap:n,slotClass:r}){return rn(WR,nn,!e&&kb[t],!e&&Ob[t],!e&&Pb[t],!e&&Bb[n],r)}function oN(t){return rn(XR,t)}function sN({size:t,unstyled:e,contentGap:n,slotClass:r}){return rn(YR,!e&&kb[t],!e&&Ob[t],!e&&Pb[t],!e&&Bb[n],r)}function iN({isGloss:t,arrowSideClass:e,slotClass:n,className:r}){return rn(KR,t?qR:ZR,e,n,r)}function aN({slotClass:t,className:e}){return rn(QR,t,e)}function lN({slotClass:t,className:e}){return rn(JR,t,e)}function cN({slotClass:t,className:e}){return rn(eN,t,e)}function uN(t){return GR[t]}function dN(t){return HR[t]}const jb=l.forwardRef(function({className:e="",children:n,asChild:r=!0,onClick:o,onPointerDown:s,...i},a){const{open:c,setOpen:u,triggerRef:f,popoverId:m}=Ls("Popover.Trigger"),p=Gr(),b=Is(),g=l.useCallback(S=>{f.current=S,Ul(a)(S)},[a,f]),h=l.useCallback(S=>{c||b.current||S.button!==0||(S.preventDefault(),ws({triggerRef:f,openingRef:b,setOpen:()=>u(!0)}))},[c,b,f,u]),x=l.useCallback(S=>{o==null||o(S),!S.defaultPrevented&&c&&u(!1)},[o,c,u]),C=l.useCallback(S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),c?u(!1):b.current||u(!0))},[c,b,u]),_=l.Children.count(n)===1&&l.isValidElement(n)?n:null;if(r&&_){const S=_;return l.cloneElement(S,{className:rn(p.root,p.trigger,S.props.className,e),onPointerDown:y=>{var v,A;h(y),(A=(v=S.props).onPointerDown)==null||A.call(v,y),s==null||s(y)},onClick:y=>{var v,A;(A=(v=S.props).onClick)==null||A.call(v,y),x(y)},"aria-expanded":c,"aria-controls":c?m:void 0,ref:Ul(S.props.ref,g)})}return d.jsx("button",{type:"button",ref:g,className:tN({rootSlot:p.root,slotClass:p.trigger,className:e}),"aria-expanded":c,"aria-controls":c?m:void 0,onPointerDown:S=>{s==null||s(S),h(S)},onClick:x,onKeyDown:C,...i,children:n})});jb.displayName="PopoverTrigger";function Fu({className:t,...e}){const n=fR(),{variant:r}=Ls("Popover.Arrow"),o=Gr(),s=r==="gloss";return d.jsx("span",{"aria-hidden":!0,className:iN({isGloss:s,arrowSideClass:wb[n],slotClass:o.arrow,className:t}),...e})}Fu.displayName=Ab;function Mb({className:t,children:e,...n}){const r=Gr();return d.jsx("div",{className:aN({slotClass:r.header,className:t}),...n,children:e})}Mb.displayName="PopoverHeader";const Fb=l.forwardRef(function({className:e,children:n,id:r,...o},s){const{labelId:i,size:a}=Ls("Popover.Label"),c=Gr();return d.jsx(ee,{ref:s,as:"h2",variant:uN(a),id:r??i,className:lN({slotClass:c.label,className:e}),...o,children:n})});Fb.displayName="PopoverLabel";function Gb({className:t,children:e,variant:n,...r}){const{hintId:o,size:s}=Ls("Popover.Hint"),i=Gr();return d.jsx(Xe,{as:"p",id:o,variant:n??dN(s),className:rn(i.hint,t),...r,children:e})}Gb.displayName="PopoverHint";function Hb({className:t,children:e,...n}){const r=Gr();return d.jsx("div",{className:cN({slotClass:r.body,className:t}),...n,children:e})}Hb.displayName="PopoverBody";const zb=l.forwardRef(function({className:e="",children:n,showArrow:r=!1,offset:o=Rs,gap:s,matchAnchorWidth:i=!1,align:a,unstyled:c=!1,contentRole:u="dialog",...f},m){const{open:p,popoverId:b,size:g,variant:h,side:x,labelConnected:C,hintConnected:_,labelId:S,hintId:y,triggerRef:v,anchorRef:A,contentRef:E}=Ls("Popover.Content"),T=Gr(),L=h==="gloss",w=FR({alignProp:a,matchAnchorWidth:i}),I=s??zR[g],{customArrow:N,panelChildren:k}=xR(n),{setPanelRef:j,bindGlossPanelRef:P,portalMounted:G,resolvedSide:D}=MR({open:p,side:x,offset:o,align:w,matchAnchorWidth:i,showArrow:r,isGloss:L,forwardedRef:m,contentRef:E,triggerRef:v,anchorRef:A});if(!G||typeof document>"u")return null;const O=Mo((A==null?void 0:A.current)??v.current),F=gR({contentRole:u,labelConnected:C,hintConnected:_,labelId:S,hintId:y}),B=bR({contentRole:u,labelConnected:C,labelId:S}),$=d.jsx(dR,{value:D,children:d.jsx("div",{ref:j,...O,id:b,role:u,"aria-modal":u==="dialog"?"false":void 0,"aria-labelledby":B,"aria-describedby":F,"data-side":D,className:nN({resolvedSide:D,showArrow:r,slotClass:T.content,className:e}),...f,children:d.jsxs("div",{className:$R,children:[r?N??d.jsx(Fu,{}):null,L?d.jsx("div",{ref:P,className:rN({size:g,unstyled:c,contentGap:I,slotClass:T.glossPanel}),children:d.jsx("div",{className:oN(T.glossContent),children:k})}):d.jsx("div",{className:sN({size:g,unstyled:c,contentGap:I,slotClass:T.panel}),children:k})]})})});return kr.createPortal($,document.body)});zb.displayName="PopoverContent";function Vb({children:t,classNames:e,size:n="base",variant:r="default",side:o="bottom",open:s,defaultOpen:i=!1,onOpenChange:a,anchorRef:c,shouldDismiss:u}){const{contextValue:f}=_R({children:t,size:n,variant:r,side:o,open:s,defaultOpen:i,onOpenChange:a,anchorRef:c,shouldDismiss:u});return d.jsx(cR,{value:f,children:d.jsx(uR,{classNames:e,children:t})})}Vb.displayName="PopoverRoot";const kt=Object.assign(Vb,{Trigger:jb,Content:zb,Header:Mb,Label:Fb,Hint:Gb,Body:Hb,Arrow:Fu}),lp="data-chevron-init";function gi(t,e){X.set(t,{rotation:e?180:0})}function fN(t,e){return n=>{t.current=n,n&&!n.hasAttribute(lp)&&(n.setAttribute(lp,""),gi(n,e))}}function Hr(t,e,n=()=>!0,r){const o=l.useRef(t),s=l.useRef(void 0),i=l.useMemo(()=>fN(e,o.current),[e]);return l.useLayoutEffect(()=>{const a=e.current;if(!a)return;if(r!=null&&r.current){r.current=!1,s.current=t,gi(a,t);return}const c=de()||!n();if(s.current===void 0){s.current=t,gi(a,t);return}if(s.current!==t){if(s.current=t,V(a),c){gi(a,t);return}X.to(a,{rotation:t?180:0,...ve(),overwrite:"auto"})}},[t,e,n,r]),i}const Gu={default:"bg-surface",outline:"bg-transparent",secondary:"bg-secondary"};function mN(t){return t==="secondary"?"secondary":"default"}function Hu(t){return t==="gloss"?"gloss":t==="outline"?"outline":t==="secondary"?"secondary":"default"}function Ns({variant:t,statusTinted:e,statusTintClass:n}){return t==="gloss"?"gloss-control":e?R(n,"border-token"):t==="outline"?"bg-transparent border-token":R(Gu[t],"border-token")}const pN={default:"default",danger:"danger-tint-hover",success:"success-tint-hover",warning:"warning-tint-hover"};function zr(t,e="default",n="default"){if(!t)return"";const r=e!=="default"?pN[e]:mN(n);return bh(r,"focus-within")}const Vr="field-shell-transition motion-reduce:transition-none",Ur="focus-within-ring";function Fo(t,e){const n=Oo(t,e);return{shellHoverMotionClass:n.motionClass,onShellPointerEnter:n.onPointerEnter,onShellPointerLeave:n.onPointerLeave}}function hN(t){return`${t}-label`}function gN(t){return`${t}-listbox`}function bN(t){return{hintId:Yt(t),errorId:Kt(t),labelId:hN(t),listId:gN(t)}}function xN(t,e,n){return e&&n?`${t}-opt-${n}`:void 0}function CN(t){return t?"Close list":"Open list"}function Ub({anchorRef:t,disabled:e,isGloss:n,groupSegment:r,setOpen:o,onOpened:s,openingRef:i,preferStandardSqueeze:a=!1}){if(e||i.current)return;i.current=!0;const c=t.current;if(!c){i.current=!1;return}if(de()){i.current=!1,o(!0),s==null||s();return}(!a&&n&&r==null?No(c,!0):We(c)).then(()=>{i.current=!1,!e&&(o(!0),s==null||s())})}function $b(){return l.useRef(!1)}const Et="field-control-mobile-no-zoom",_N={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},SN={small:le.small.controlPad,base:le.base.controlPad,mid:le.mid.controlPad,large:le.large.controlPad},vN={small:le.small.chevronIcon,base:le.base.chevronIcon,mid:le.mid.chevronIcon,large:le.large.chevronIcon},yN="relative z-0 flex min-w-0 items-stretch border-1 text-left overflow-hidden motion-reduce:transition-none",TN=`min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted ${Et}`,AN="text-muted",EN="flex shrink-0 origin-center items-center justify-center self-stretch px-small outline-none text-muted hover:text-foreground focus-ring",LN="pointer-events-none",wN="z-[100]",IN="gap-0 p-base",RN="overflow-y-auto overflow-x-hidden",NN="cursor-not-allowed opacity-55 shadow-token-base",DN="cursor-pointer";function kN({variant:t,status:e}){const n=e==="danger"||e==="success"||e==="warning";return Ns({variant:t,statusTinted:n,statusTintClass:n?_N[e]:""})}function ON(t){return t?R(hn(t),$r(t)):"rounded-base"}function PN({variant:t,status:e,disabled:n,groupSegment:r,shellHoverMotionClass:o,className:s,slotClass:i}){const a=t==="gloss";return en(yN,(r==null?void 0:r.orientation)==="horizontal"?"flex-1":"w-full",ON(r),kN({variant:t,status:e}),Vr,Ur,a?"":zr(!n,e,t),o,n?NN:DN,s,i)}function BN({size:t,muted:e,className:n,slotClass:r}){return en(TN,SN[t],e&&AN,n,r,Et)}function jN({disabled:t,className:e,slotClass:n}){return en(EN,t&&LN,e,n)}const zu=l.forwardRef(function({className:e,children:n,groupSegment:r,onPointerEnter:o,onPointerLeave:s,...i},a){const c=Po(),u=On(),f=ar(),m=As(),{open:p,setOpen:b,disabled:g,variant:h,status:x,size:C,anchorRef:_,listId:S}=m,y=$b(),v=h==="gloss",A=c!=null&&c.segmented?void 0:r??(u==null?void 0:u.segment),E=Fo(_,!g&&!v&&A==null),T=ko(_,!g&&v&&A==null),L=l.useCallback(N=>{_.current=N,!g&&v&&T.bindShellRef(N)},[_,g,T,v]),w=l.useCallback(()=>{Ub({anchorRef:_,disabled:g,isGloss:v,groupSegment:A,setOpen:b,openingRef:y})},[_,g,A,v,b,y]),I=l.useCallback(N=>{g||p||N.button===0&&w()},[g,p,w]);return d.jsx("div",{ref:$g(a,L),role:"combobox","aria-expanded":p,"aria-controls":p?S:void 0,"aria-haspopup":"listbox","aria-disabled":g||void 0,onPointerDown:I,onPointerEnter:N=>{o==null||o(N),!N.defaultPrevented&&(v&&A==null?T.onShellPointerEnter(N):E.onShellPointerEnter(N))},onPointerLeave:N=>{s==null||s(N),v&&A==null?T.onShellPointerLeave(N):E.onShellPointerLeave(N)},onFocusCapture:v&&!g&&A==null?T.onShellFocusIn:void 0,onBlurCapture:v&&!g&&A==null?T.onShellFocusOut:void 0,...g&&v?{"data-gloss-disabled":""}:{},className:PN({variant:h,status:x,disabled:g,groupSegment:A,shellHoverMotionClass:v?T.shellHoverMotionClass:E.shellHoverMotionClass,className:e,slotClass:f.inputGroup}),...i,children:n})});zu.displayName="ComboBoxInputGroup";const Vu=l.forwardRef(function({className:e,onKeyDown:n,onChange:r,onBlur:o,...s},i){const a=ar(),c=As(),{comboBoxId:u,open:f,setOpen:m,value:p,setValue:b,filterQuery:g,setFilterQuery:h,listId:x,activeValue:C,setActiveValue:_,inputRef:S,anchorRef:y,options:v,filteredValues:A,disabled:E,placeholder:T,size:L,status:w,isRequired:I,hintConnected:N,errorConnected:k,hintId:j,errorId:P,variant:G,formInputRef:D,formOnBlur:O}=c,F=$b(),B=l.useRef(null),$=G==="gloss",W=l.useMemo(()=>Fw(v),[v]),M=l.useMemo(()=>W.get(p),[W,p]),z=l.useMemo(()=>Gw(M),[M]),H=xN(x,f,C),oe=Ft(N?j:void 0,k?P:void 0),pe=l.useCallback(()=>{const U=B.current;B.current=null;const ae=U??"";h(ae);const he=Wg(v,ae),Ne=he.indexOf(p);_(Ne>=0?p:he[0]??null),requestAnimationFrame(()=>{const Ye=S.current;if(!Ye)return;Ye.focus();const q=ae.length;Ye.setSelectionRange(q,q)})},[S,v,_,h,p]),ce=l.useCallback(()=>{Ub({anchorRef:y,disabled:E,isGloss:$,setOpen:m,onOpened:pe,openingRef:F,preferStandardSqueeze:!0})},[y,E,pe,$,m,F]),Y=l.useCallback(U=>{const ae=Hw({filteredValues:A,activeValue:C,optionsByValue:W,delta:U});ae&&_(ae)},[C,A,W,_]),ne=l.useCallback(U=>{var he;const ae=W.get(U);!ae||ae.disabled||(b(U),m(!1),h(""),(he=S.current)==null||he.focus())},[S,W,h,m,b]),me=l.useCallback(U=>{r==null||r(U),f&&h(U.target.value)},[r,f,h]),re=l.useCallback(U=>{if(n==null||n(U),!(U.defaultPrevented||E)&&!U.nativeEvent.isComposing){if(!f){if(U.key==="ArrowDown"||U.key==="ArrowUp"){U.preventDefault(),ce();return}if(U.key==="Enter"||U.key===" "){U.preventDefault(),ce();return}U.key.length===1&&!U.ctrlKey&&!U.metaKey&&!U.altKey&&U.key!=="Tab"&&(U.preventDefault(),B.current=U.key,ce());return}if(U.key==="ArrowDown"){U.preventDefault(),Y(1);return}if(U.key==="ArrowUp"){U.preventDefault(),Y(-1);return}if(U.key==="Enter"){U.preventDefault(),C&&ne(C);return}if(U.key==="Home"){U.preventDefault();const ae=zw(A,W);ae&&_(ae);return}if(U.key==="End"){U.preventDefault();const ae=Vw(A,W);ae&&_(ae)}}},[C,Y,E,A,n,f,ce,W,ne,_]);l.useEffect(()=>{f||h("")},[f,h]);const xe=f?g:z,te=l.useCallback(U=>{o==null||o(U),O==null||O()},[O,o]);return d.jsx("input",{ref:$g(i,S,D),id:u,type:"text","aria-autocomplete":"list","aria-activedescendant":H,"aria-required":I||void 0,"aria-invalid":w==="danger"?!0:void 0,"aria-describedby":oe,disabled:E,readOnly:!f,autoComplete:"off",placeholder:T,value:xe,onChange:me,onKeyDown:re,onBlur:te,className:BN({size:L,muted:!f&&!M,className:e,slotClass:a.input}),...s})});Vu.displayName="ComboBoxInput";const Uu=l.forwardRef(function({className:e,onPointerDown:n,...r},o){const s=ar(),{open:i,setOpen:a,setFilterQuery:c,disabled:u,size:f,inputRef:m}=As(),p=l.useRef(null),b=Hr(i,p),g=l.useCallback(x=>{b(x),typeof o=="function"?o(x):o&&(o.current=x)},[b,o]),h=l.useCallback(x=>{if(n==null||n(x),x.stopPropagation(),!u){if(i){a(!1),c("");return}x.button===0&&(a(!0),requestAnimationFrame(()=>{var C;return(C=m.current)==null?void 0:C.focus()}))}},[u,m,n,i,c,a]);return d.jsx("button",{type:"button",ref:g,tabIndex:-1,disabled:u,"aria-label":CN(i),className:jN({disabled:u,className:e,slotClass:s.trigger}),onPointerDown:h,...r,children:d.jsx(we.IoChevronDown,{className:en(vN[f],s.triggerIcon),"aria-hidden":!0})})});Uu.displayName="ComboBoxTrigger";function $u({children:t,className:e,offset:n=Rs,...r}){const o=ar(),{open:s,setOpen:i,anchorRef:a,listId:c,labelId:u,labelConnected:f,placeholder:m,menuMaxHeight:p,options:b,filteredValues:g,value:h,setValue:x,activeValue:C,setActiveValue:_,setFilterQuery:S,variant:y}=As(),v=l.useCallback(E=>{const T=Array.isArray(E)?E[0]??"":E;x(T),S(""),i(!1)},[S,i,x]),A=t??(g.length===0?d.jsx(wr.Empty,{}):g.map(E=>{const T=b.find(L=>L.value===E);return d.jsx(wr.Item,{value:E,disabled:T.disabled,label:T.label,hint:T.hint,icon:T.icon},E)}));return d.jsx(kt,{open:s,onOpenChange:i,side:"bottom",anchorRef:a,variant:y==="gloss"?"gloss":"default",children:d.jsx(kt.Content,{matchAnchorWidth:!0,unstyled:!0,contentRole:void 0,offset:n,className:en(wN,o.popover,e),...r,children:d.jsx(kt.Body,{className:en(IN,o.popoverBody),children:d.jsx(wr,{listId:c,"aria-labelledby":f?u:void 0,"aria-label":f?void 0:m,value:h,onValueChange:v,activeValue:C,onActiveValueChange:_,selectionIndicator:!0,className:en(RN,o.listBox),style:{maxHeight:p},children:A})})})})}$u.displayName="ComboBoxPopover";function Wb({className:t,classNames:e,...n}){const r=ar();return d.jsx(Ue,{className:t,classNames:{...e,root:en(r.label,e==null?void 0:e.root)},...n})}Wb.displayName="ComboBoxLabel";function Wu({children:t,status:e,className:n,id:r,...o}){const s=Kg(),i=ar(),a=Uw(e,s.status);return d.jsx(Xe,{id:r??s.hintId,status:a,className:en(i.hint,n),...o,children:t})}Wu.displayName="ComboBoxHint";function Xu({children:t,className:e,id:n,...r}){const o=Kg(),s=ar();return d.jsx(Ze,{id:n??o.errorId,className:en(s.error,e),...r,children:t??o.errorMessage})}Xu.displayName="ComboBox.Error";function MN({label:t,hint:e,error:n,labelId:r}){const o=ar();return d.jsxs(d.Fragment,{children:[t!=null?d.jsx(Ue,{id:r,classNames:{root:o.label},children:t}):null,d.jsxs(zu,{children:[d.jsx(Vu,{}),d.jsx(Uu,{})]}),d.jsx($u,{}),e!=null?d.jsx(Wu,{children:e}):null,n!=null?d.jsx(Xu,{children:n}):null]})}function cr(...t){return R(...t)}function dl(t){return Object.keys(t).length}function FN(t){return Object.entries(t)}function GN(t,e,n){if(!e.includes("."))return{...t,[e]:n};const r=e.split("."),o={...t};let s=o;for(let i=0;i<r.length-1;i+=1){const a=r[i],c=s[a],u=c!=null&&typeof c=="object"&&!Array.isArray(c)?{...c}:{};s[a]=u,s=u}return s[r[r.length-1]]=n,o}function HN(t){return t==null?!0:typeof t=="string"?t.trim().length===0:Array.isArray(t)?t.length===0:!1}function fl(t,e,n){if(n!=null){if(n.required){const r=typeof n.required=="string"?n.required:"Required field";if(typeof t=="boolean"){if(!t)return r}else if(HN(t))return r}if(typeof t=="string"){if(n.minLength&&t.length<n.minLength.value)return n.minLength.message;if(n.maxLength&&t.length>n.maxLength.value)return n.maxLength.message;if(n.pattern&&!n.pattern.value.test(t))return n.pattern.message}if(n.validate)return n.validate(t,e)}}function Xb(...t){const e={};for(const n of t)n!=null&&Object.assign(e,n);return Object.keys(e).length>0?e:void 0}function zN(t,e){if(t==null||typeof t!="object"||!("target"in t))return t;const n=t.target;if(n instanceof HTMLInputElement)return e==="checkbox"?n.checked:e==="number"?n.value===""?void 0:Number(n.value):n.value}function Yb(t){return t?!0:void 0}function VN({descriptionId:t,errorSummaryId:e,hasErrors:n}){const r=[t,n?e:void 0].filter(Boolean);return r.length>0?r.join(" "):void 0}function UN(t){return t<=0?"":t===1?"Fix the error in the form":`Fix ${t} errors in the form`}function $N(){return"Form submitted successfully"}function cp(t,e){const n=Object.keys(e)[0];if(n==null)return;const r=t.get(n);r==null||r.focus()}function Kb({name:t,value:e,onChange:n,disabled:r,readOnly:o,rules:s}){const i=xn(),a=e!==void 0,c=i!=null&&t!=null&&!a,u=l.useRef(null),f=l.useCallback(S=>{u.current=S,c&&t&&i.registerRef(t,S)},[c,i,t]),m=r??(i==null?void 0:i.disabled)??!1,p=o??(i==null?void 0:i.readOnly)??!1,b=c&&t?i.getError(t):void 0,g=l.useMemo(()=>Xb(t?i==null?void 0:i.getFieldRules(t):void 0,s),[i,t,s]),h=c&&t?i.getValue(t):e,x=c?h??"":h,C=l.useCallback(S=>{n==null||n(S),!(!c||!t||!i)&&i.setValue(t,S,{shouldValidate:i.validateMode==="onChange"})},[c,i,t,n]),_=l.useCallback(()=>{!c||!t||!i||(i.setTouched(t,!0),i.validateMode==="onBlur"&&i.validateField(t))},[c,i,t]);return{bound:c,name:t,value:x,setValue:C,onBlur:_,disabled:m||(i==null?void 0:i.isSubmitting),readOnly:p,ref:f,"aria-invalid":Yb(b),error:b,rules:g}}function qt(t){return l.Children.toArray(t).some(e=>l.isValidElement(e))}function WN({children:t,label:e,hint:n,error:r,id:o,name:s,isRequired:i=!1,status:a="default",size:c="base",options:u=$w,value:f,defaultValue:m,onValueChange:p,variant:b,disabled:g=!1,placeholder:h="Select a value",menuMaxHeight:x="min(24rem, 70vh)"}){const C=Kb({name:s,value:f,disabled:g}),_=C.bound,S=C.disabled??g,y=l.useId(),v=On(),A=b??((v==null?void 0:v.variant)!=null?Hu(v.variant):"default"),E=o??`combobox-${y}`,{hintId:T,errorId:L,labelId:w,listId:I}=bN(E),N=qt(t),k=e!=null||N&&Te(t,"Label"),j=n!=null||N&&Te(t,"ComboBoxHint"),P=r!=null||N&&Te(t,"ComboBoxError"),G=f!==void 0||_,[D,O]=l.useState(m??""),F=_?String(C.value??""):G?f??"":D,B=l.useCallback(xe=>{G||O(xe),p==null||p(xe),_&&C.setValue(xe)},[_,C,G,p]),[$,W]=l.useState(!1),[M,z]=l.useState(""),[H,oe]=l.useState(null),pe=l.useRef(null),ce=l.useRef(null);l.useEffect(()=>{var xe;!$||!H||(xe=document.getElementById(`${I}-opt-${H}`))==null||xe.scrollIntoView({block:"nearest"})},[H,I,$]);const Y=l.useMemo(()=>Wg(u,M),[M,u]),ne=l.useMemo(()=>({comboBoxId:E,hintId:T,errorId:L,labelId:w,labelConnected:k,hintConnected:j,errorConnected:P,isRequired:i,status:a,size:c,errorMessage:r}),[E,r,L,P,j,k,T,i,w,c,a]),me=l.useMemo(()=>({...ne,open:$,setOpen:W,value:F,setValue:B,filterQuery:M,setFilterQuery:z,listId:I,activeValue:H,setActiveValue:oe,anchorRef:pe,inputRef:ce,variant:A,disabled:S,placeholder:h,menuMaxHeight:x,options:u,filteredValues:Y,formInputRef:_?C.ref:void 0,formOnBlur:_?C.onBlur:void 0}),[H,S,ne,M,Y,_,C,I,x,$,u,h,B,F,A]),re=l.useMemo(()=>({controlId:E,labelId:w,isRequired:i}),[E,i,w]);return{isCompound:N,label:e,hint:n,error:r,children:t,fieldCtx:ne,comboCtx:me,fieldLabelCtx:re}}function qb({children:t,label:e,hint:n,error:r,className:o,classNames:s,id:i,isRequired:a,status:c,size:u,options:f,value:m,defaultValue:p,onValueChange:b,variant:g,disabled:h,placeholder:x,menuMaxHeight:C,name:_,...S}){const y=xn(),v=typeof _=="string"?_:void 0,A=v?y==null?void 0:y.getError(v):void 0,E=r??A,T=c==="default"&&A?"danger":c,L=u??(y==null?void 0:y.size)??"base",w=WN({children:t,label:e,hint:n,error:E,id:i,name:_,isRequired:a,status:T,size:L,options:f,value:m,defaultValue:p,onValueChange:b,variant:g,disabled:h,placeholder:x,menuMaxHeight:C});return d.jsx(Xw,{value:w.fieldCtx,children:d.jsx(Ww,{value:w.comboCtx,children:d.jsx(Yw,{classNames:s,children:d.jsx(Xt.Provider,{value:w.fieldLabelCtx,children:d.jsx(pn,{className:en(o,s==null?void 0:s.root),...S,children:w.isCompound?t:d.jsx(MN,{label:w.label,hint:w.hint,error:w.error,labelId:w.fieldCtx.labelId})})})})})})}qb.displayName="ComboBox";const Zb=Object.assign(qb,{Label:Wb,InputGroup:zu,Input:Vu,Trigger:Uu,Popover:$u,Hint:Wu,Error:Xu});function ye(...t){return R(...t)}function XN({slotClassNames:t,classNames:e}){return{shell:ye(t.itemIndicatorShell,e==null?void 0:e.shell,e==null?void 0:e.itemIndicatorShell),fill:ye(t.itemIndicatorFill,e==null?void 0:e.fill,e==null?void 0:e.itemIndicatorFill),mark:ye(t.itemIndicatorMark,e==null?void 0:e.mark,e==null?void 0:e.itemIndicatorMark)}}function To(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function up(t){return t==null?[]:Array.isArray(t)?[...t]:[t]}function YN(t){return hb(t)}const Qb=l.createContext(null),Wl=l.createContext({}),Jb=l.createContext(!1),ex=l.createContext(null),tx=l.createContext(null);function KN({value:t,children:e}){return d.jsx(Qb.Provider,{value:t,children:e})}function qN({classNames:t,children:e}){const n=l.useContext(Wl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Wl.Provider,{value:r,children:e})}function nx({value:t,children:e}){return d.jsx(Jb.Provider,{value:t,children:e})}function ZN({value:t,children:e}){return d.jsx(ex.Provider,{value:t,children:e})}function QN({value:t,children:e}){return d.jsx(tx.Provider,{value:t,children:e})}function Ds(){const t=l.useContext(Qb);if(!t)throw new Error("Dropdown.* components must be inside <Dropdown>.");return t}function Gt(){return l.useContext(Wl)}function rx(){return l.useContext(Jb)}function JN(){return l.useContext(ex)}function ox(){const t=l.useContext(tx);if(!t)throw new Error("DropdownSub.* components must be inside <DropdownSub>.");return t}const Yu=l.forwardRef(function({orientation:e="horizontal",className:n="",...r},o){const s=R("box-border shrink-0",e==="horizontal"?"my-xsmall h-0 w-full min-w-0 max-w-full border-t-token":"mx-xsmall min-h-[1.5rem] w-0 self-stretch border-l-token",n);return e==="horizontal"?d.jsx("hr",{ref:o,className:s,...r}):d.jsx("div",{ref:o,role:"separator","aria-orientation":"vertical",className:s,...r})});Yu.displayName="Separator";const eD='[role="menuitem"]:not([aria-disabled="true"]), [role="menuitemcheckbox"]:not([disabled]), [role="menuitemradio"]:not([disabled])';function dp(t){return Array.from(t.querySelectorAll(eD)).filter(e=>!e.hasAttribute("disabled"))}function si(t,e){const n=t[e];n&&n.focus()}function tD({open:t,setOpen:e,triggerRef:n,contentRef:r}){l.useLayoutEffect(()=>{var i;if(!t)return;const o=r.current;if(!o)return;(i=dp(o)[0])==null||i.focus()},[r,t]),l.useEffect(()=>{if(!t)return;const o=r.current;if(!o)return;const s=i=>{var f;if(i.key==="Escape"){i.preventDefault(),e(!1),(f=n.current)==null||f.focus();return}const a=dp(o);if(a.length===0)return;const c=document.activeElement,u=c?a.indexOf(c):-1;if(i.key==="ArrowDown"){i.preventDefault(),si(a,u<a.length-1?u+1:0);return}if(i.key==="ArrowUp"){i.preventDefault(),si(a,u>0?u-1:a.length-1);return}if(i.key==="Home"){i.preventDefault(),si(a,0);return}i.key==="End"&&(i.preventDefault(),si(a,a.length-1))};return o.addEventListener("keydown",s),()=>o.removeEventListener("keydown",s)},[r,t,e,n])}function nD({subOpen:t,triggerRef:e,menuTriggerRef:n,subPanelRootsRef:r,popoverVariant:o}){const s=o==="gloss",i=l.useRef(null),[a,c]=l.useState({top:0,left:0,minW:0}),[u,f]=l.useState(t),m=l.useCallback(()=>{const p=e.current;if(!p)return;const b=p.getBoundingClientRect(),g=6,h=Math.max(b.width,160);let x=b.right+g,C=b.top;const _=h;x+_>window.innerWidth-12&&(x=Math.max(12,b.left-_-g));const S=i.current,y=(S==null?void 0:S.offsetHeight)??0;y>0&&C+y>window.innerHeight-8&&(C=Math.max(8,window.innerHeight-y-8)),c({top:C,left:x,minW:h})},[e]);return l.useLayoutEffect(()=>{t&&f(!0)},[t]),l.useLayoutEffect(()=>{t&&m()},[t,m]),l.useEffect(()=>{if(!t)return;const p=()=>m();return window.addEventListener("scroll",p,!0),window.addEventListener("resize",p),()=>{window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}},[t,m]),l.useLayoutEffect(()=>{const p=i.current,b=r.current;if(!(!u||!p))return b.add(p),()=>{b.delete(p)}},[u,r]),l.useLayoutEffect(()=>{if(!u)return;const p=i.current;if(!p)return;const b=$t();let g=!1;if(b)return V(p),t?ha(p):f(!1),()=>{g=!0};if(V(p),t)return ga({surface:p,vars:{...Co(),overwrite:"auto"}}),()=>{g=!0,V(p)};const h=ba({surface:p,vars:{...Co(),overwrite:"auto"},onComplete:()=>{g||f(!1)}});return()=>{g=!0,V(p),h.kill()}},[t,u]),{isGlossPanel:s,panelRef:i,pos:a,portalMounted:u,menuTriggerRef:n}}const rD="relative inline-flex",fp="inline-flex",oD="z-[100]",sD="max-h-[min(24rem,70vh)] gap-xsmall overflow-y-auto overflow-x-hidden p-base text-left outline-none",iD="flex min-w-0 flex-col gap-xsmall text-left",aD="px-base text-left",lD="text-muted",cD="relative min-w-0",uD="flex w-full min-w-0 cursor-pointer items-center gap-base rounded-mid px-base py-small text-left outline-none text-base text-foreground focus-ring",dD="min-w-0 flex-1",fD="shrink-0 text-muted icon-base",mD="fixed z-[110] outline-none will-change-transform",pD="flex max-h-[min(22rem,65vh)] flex-col overflow-y-auto overflow-x-hidden rounded-mid border-token bg-surface p-base text-left shadow-token-mid",hD="gloss-panel gloss-deep flex max-h-[min(22rem,65vh)] min-w-0 origin-center flex-col overflow-hidden rounded-mid text-foreground",gD="gloss-content flex min-h-0 flex-col overflow-y-auto overflow-x-hidden p-base text-left",bD="w-full min-w-0 origin-center rounded-mid px-base py-small text-left no-underline outline-none text-base",xD="cursor-not-allowed bg-transparent text-muted opacity-45 hover:bg-transparent",CD={default:ye("text-foreground",et(),"focus-ring"),danger:ye("text-danger",et("danger"),"focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-danger"),warning:ye("text-warning",et("warning"),"focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-warning"),info:ye("text-info",et("info"),"focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-info"),success:ye("text-success",et("success"),"focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-success")};function _D({variant:t,disabled:e,hasHint:n,showIndicatorSlot:r,hasIcon:o,className:s,slotClass:i}){return ye(bD,cb(n,"gap-x-base",r,o),!e&&ye("cursor-pointer",CD[t]),e&&xD,i,s)}function SD({className:t,slotClass:e}){return ye(uD,et(),e,t)}function vD({isGlossPanel:t,subOpen:e,portalMounted:n,className:r,slotClass:o}){return ye(mD,!t&&pD,!e&&n&&"pointer-events-none",o,r)}function yD(t){const[e,n]=l.useState(!1),r=l.useRef(null),o=l.useRef(void 0);l.useEffect(()=>{t||n(!1)},[t]);const s=l.useCallback(()=>{window.clearTimeout(o.current),o.current=void 0},[]),i=l.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(()=>{n(!1)},160)},[]);return{contextValue:l.useMemo(()=>({open:e,setOpen:n,triggerRef:r,scheduleClose:i,cancelClose:s}),[e,i,s])}}const Ku=l.forwardRef(function({children:e,className:n,asChild:r,onClick:o,onPointerDown:s,...i},a){const{open:c,setOpen:u,triggerRef:f,contentId:m}=Ds(),p=Gt(),b=Is(),g=l.useCallback(x=>{c||b.current||x.button!==0||(x.preventDefault(),ws({triggerRef:f,openingRef:b,setOpen:()=>u(!0)}))},[c,b,f,u]),h=l.useCallback(x=>{o==null||o(x),!x.defaultPrevented&&c&&u(!1)},[o,c,u]);if(r&&l.isValidElement(e)){const x=e;return l.cloneElement(x,{...i,ref:To(a,f,x.props.ref),className:ye(x.props.className,fp,p.trigger,n),onPointerDown:C=>{var _,S;g(C),(S=(_=x.props).onPointerDown)==null||S.call(_,C),s==null||s(C)},onClick:C=>{var _,S;(S=(_=x.props).onClick)==null||S.call(_,C),h(C)},"aria-expanded":c,"aria-haspopup":"menu","aria-controls":c?m:void 0})}return d.jsx("button",{type:"button",ref:To(a,f),className:ye(fp,p.trigger,n),"aria-expanded":c,"aria-haspopup":"menu","aria-controls":c?m:void 0,onPointerDown:x=>{s==null||s(x),g(x)},onClick:h,...i,children:e})});Ku.displayName="Dropdown.Trigger";const Mi=l.forwardRef(function({children:e,className:n,bodyClassName:r,variant:o,...s},i){const{open:a,setOpen:c,triggerRef:u,contentRef:f,contentId:m,subPanelRootsRef:p,popoverVariant:b}=Ds(),g=Gt(),h=o??b,x=l.useCallback(C=>{for(const _ of p.current)if(_.contains(C))return!1;return!0},[p]);return tD({open:a,setOpen:c,triggerRef:u,contentRef:f}),d.jsx(kt,{open:a,onOpenChange:c,side:"bottom",variant:h,anchorRef:u,shouldDismiss:x,children:d.jsx(kt.Content,{ref:To(i,f),matchAnchorWidth:!0,unstyled:!0,contentRole:void 0,offset:Rs,id:m,className:ye(oD,g.popover,n),...s,children:d.jsx(kt.Body,{role:"menu",className:ye(sD,g.popoverBody,r),children:e})})})});Mi.displayName="Dropdown.Popover";function qu({className:t,children:e,selectionIndicator:n,...r}){const o=rx(),s=Gt(),i=n!==void 0?n:o,[a,c]=l.useState(),u=l.useCallback(f=>{c(f)},[]);return d.jsx(nx,{value:i,children:d.jsx(ZN,{value:u,children:d.jsx("div",{role:"group","aria-labelledby":a,className:ye(iD,s.group,t),...r,children:e})})})}qu.displayName="Dropdown.Group";function Zu({className:t,children:e,id:n,...r}){const o=l.useId(),s=n??o,i=JN(),a=Gt();return l.useLayoutEffect(()=>(i==null||i(s),()=>i==null?void 0:i(void 0)),[s,i]),d.jsx("div",{id:s,className:ye(aD,a.label,t),...r,children:d.jsx(ee,{as:"span",variant:"small",className:lD,children:e})})}Zu.displayName="Dropdown.Label";function Qu({className:t,...e}){const n=Gt();return d.jsx(Yu,{className:ye(n.separator,t),...e})}Qu.displayName="Dropdown.Separator";function Ju({className:t,children:e,...n}){const{open:r}=Ds(),o=Gt(),{contextValue:s}=yD(r);return d.jsx(QN,{value:s,children:d.jsx("div",{className:ye(cD,o.sub,t),...n,children:e})})}Ju.displayName="Dropdown.Sub";const ed=l.forwardRef(function({className:e,children:n,asChild:r,onPointerEnter:o,onPointerLeave:s,onClick:i,onKeyDown:a,...c},u){const{open:f,setOpen:m,triggerRef:p,scheduleClose:b,cancelClose:g}=ox(),h=Gt(),x=l.useCallback(v=>{o==null||o(v),!v.defaultPrevented&&(g(),m(!0))},[g,o,m]),C=l.useCallback(v=>{s==null||s(v),!v.defaultPrevented&&b()},[s,b]),_=l.useCallback(v=>{i==null||i(v),!v.defaultPrevented&&(g(),m(!0))},[g,i,m]),S=l.useCallback(v=>{a==null||a(v),!v.defaultPrevented&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),g(),m(!0))},[g,a,m]),y=SD({className:e,slotClass:h.subTrigger});if(r&&l.isValidElement(n)){const v=n;return l.cloneElement(v,{...c,ref:To(u,p,v.props.ref),className:ye(v.props.className,y),onPointerEnter:A=>{var E,T;(T=(E=v.props).onPointerEnter)==null||T.call(E,A),x(A)},onPointerLeave:A=>{var E,T;(T=(E=v.props).onPointerLeave)==null||T.call(E,A),C(A)},onClick:A=>{var E,T;(T=(E=v.props).onClick)==null||T.call(E,A),_(A)},onKeyDown:A=>{var E,T;(T=(E=v.props).onKeyDown)==null||T.call(E,A),S(A)},role:"menuitem","aria-expanded":f,"aria-haspopup":"menu"})}return d.jsxs("div",{ref:To(u,p),role:"menuitem",tabIndex:-1,"aria-expanded":f,"aria-haspopup":"menu",className:y,onPointerEnter:x,onPointerLeave:C,onClick:_,onKeyDown:S,...c,children:[d.jsx("span",{className:ye(dD,h.subTriggerLabelWrap),children:n}),d.jsx(we.IoChevronForward,{className:ye(fD,h.subTriggerChevron),"aria-hidden":!0})]})});ed.displayName="Dropdown.SubTrigger";const td=l.forwardRef(function({children:e,className:n,style:r,onPointerEnter:o,onPointerLeave:s,...i},a){const{open:c,triggerRef:u,scheduleClose:f,cancelClose:m}=ox(),{subPanelRootsRef:p,triggerRef:b,popoverVariant:g}=Ds(),h=Gt(),x=nD({subOpen:c,triggerRef:u,menuTriggerRef:b,subPanelRootsRef:p,popoverVariant:g}),C=l.useCallback(v=>{o==null||o(v),!v.defaultPrevented&&m()},[m,o]),_=l.useCallback(v=>{s==null||s(v),!v.defaultPrevented&&f()},[s,f]);if(!x.portalMounted)return null;const S=Mo(b.current),y=d.jsx("div",{ref:To(a,x.panelRef),...S,role:"menu",className:vD({isGlossPanel:x.isGlossPanel,subOpen:c,portalMounted:x.portalMounted,className:n,slotClass:h.subContent}),style:{top:x.pos.top,left:x.pos.left,minWidth:x.pos.minW,...r},...i,onPointerEnter:C,onPointerLeave:_,children:x.isGlossPanel?d.jsx("div",{className:ye(hD,h.subContentGlossPanel),children:d.jsx("div",{className:ye(gD,h.subContentGlossContent),children:e})}):e});return typeof document<"u"?kr.createPortal(y,document.body):null});td.displayName="Dropdown.SubContent";function nd({className:t,...e}){const n=Gt();return d.jsx(db,{className:ye(n.itemLabel,t),...e})}nd.displayName="DropdownItemLabel";function rd({className:t,...e}){const n=Gt();return d.jsx(fb,{className:ye(n.itemHint,t),...e})}rd.displayName="DropdownItemHint";function od({className:t,...e}){const n=Gt();return d.jsx(mb,{className:ye(n.itemIcon,t),...e})}od.displayName="DropdownItemIcon";function xa({variant:t="base",size:e="small",check:n,children:r,className:o,classNames:s,...i}){const a=Es("Dropdown.ItemIndicator"),c=Gt();if(!a.showIndicatorSlot)return null;const u=n??a.indicatorMode==="multi";return d.jsx(pb,{className:ye(c.itemIndicator,s==null?void 0:s.itemIndicator,o),...i,children:d.jsx(Bt,{variant:t,size:e,selected:a.selected,check:u,classNames:XN({slotClassNames:c,classNames:s}),children:r})})}xa.displayName="DropdownItemIndicator";const sd=l.forwardRef(function({children:e,className:n,value:r,href:o,disabled:s=!1,selection:i,variant:a="default",onClick:c,onPointerDown:u,...f},m){const{selected:p,selectItem:b,multiple:g,indicatorMode:h,setOpen:x}=Ds(),C=rx(),_=Gt(),S=YN(e),y=S.indicator!=null,v=S.hint!=null,A=S.icon!=null,E=!!o,T=!E&&i!==!1,L=T&&(g||C||y),w=L?h==="multi"?"menuitemcheckbox":"menuitemradio":"menuitem",I=T&&r!=null&&p.has(r),N=l.useCallback(O=>{typeof m=="function"?m(O):m&&(m.current=O)},[m]),k=_D({variant:a,disabled:s,hasHint:v,showIndicatorSlot:L,hasIcon:A,className:n,slotClass:_.item}),j=l.useCallback(O=>{if(u==null||u(O),O.defaultPrevented||s)return;const F=O.currentTarget;!F||de()||We(F)},[s,u]),P=l.useCallback(O=>{if(c==null||c(O),!(O.defaultPrevented||s)){if(!T){x(!1);return}r!=null&&b(r)}},[s,T,c,b,x,r]),G=d.jsxs(d.Fragment,{children:[L&&!y?d.jsx(xa,{}):null,S.indicator,S.label,S.hint,S.icon,S.rest]}),D={showIndicatorSlot:L,hasHint:v,hasIcon:A,selected:I,indicatorMode:h,disabled:s,mutedHint:s||a==="default"};return E?d.jsx(zl,{value:D,children:d.jsx("a",{ref:N,role:w,href:s?void 0:o,tabIndex:-1,"aria-disabled":s||void 0,className:k,onClick:P,onPointerDown:j,...f,children:G})}):d.jsx(zl,{value:D,children:d.jsx("button",{ref:N,type:"button",role:w,disabled:s,tabIndex:-1,"aria-checked":L?I:void 0,className:k,onClick:P,onPointerDown:j,...f,children:G})})});sd.displayName="Dropdown.Item";function TD({open:t,defaultOpen:e=!1,onOpenChange:n,multiple:r=!1,value:o,defaultValue:s,onValueChange:i,closeOnSelect:a,popoverVariant:c="default"}){const u=t!==void 0,[f,m]=l.useState(e),p=u?t:f,b=l.useCallback(N=>{u||m(N),n==null||n(N)},[u,n]),g=o!==void 0,[h,x]=l.useState(()=>up(s)),C=g?up(o):h,_=l.useMemo(()=>new Set(C),[C]),S=l.useRef(C);S.current=C;const y=l.useCallback(N=>{g||x(N),i==null||i(r?N:N[0]??"")},[g,r,i]),v=l.useCallback(N=>{const k=Ou(S.current,N,r);S.current=k,y(k),(a??!r)&&b(!1)},[a,r,b,y]),A=l.useRef(null),E=l.useRef(null),T=l.useRef(null);T.current||(T.current=new Set);const L=l.useId(),w=r?"multi":"radio";return{contextValue:l.useMemo(()=>({open:p,setOpen:b,multiple:r,selected:_,selectItem:v,indicatorMode:w,closeOnSelect:a??!r,popoverVariant:c,triggerRef:A,contentRef:E,contentId:L,subPanelRootsRef:T}),[p,b,r,_,v,w,a,c,L,T])}}function sx({children:t,className:e,classNames:n,open:r,defaultOpen:o,onOpenChange:s,multiple:i,value:a,defaultValue:c,onValueChange:u,selectionIndicator:f=!1,closeOnSelect:m,popoverVariant:p,...b}){const{contextValue:g}=TD({open:r,defaultOpen:o,onOpenChange:s,multiple:i,value:a,defaultValue:c,onValueChange:u,closeOnSelect:m,popoverVariant:p});return d.jsx(KN,{value:g,children:d.jsx(qN,{classNames:n,children:d.jsx(nx,{value:f,children:d.jsx("div",{className:ye(rD,n==null?void 0:n.root,e),...b,children:t})})})})}sx.displayName="Dropdown";const AD=Object.assign(xa,{Fill:Bt.Fill,Mark:Bt.Mark}),Ir=Object.assign(sx,{Trigger:Ku,Popover:Mi,Content:Mi,Group:qu,Label:Zu,Separator:Qu,Item:sd,ItemLabel:nd,ItemHint:rd,ItemIcon:od,ItemIndicator:AD,Sub:Ju,SubTrigger:ed,SubContent:td});function Be(...t){return R(...t)}function ED(t,e){const n=new DataTransfer;e.forEach(r=>n.items.add(r)),t.files=n.files}const id=l.createContext(null),Xl=l.createContext({});function LD({value:t,children:e}){return d.jsx(id.Provider,{value:t,children:e})}function wD({classNames:t,children:e}){const n=l.useContext(Xl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Xl.Provider,{value:r,children:e})}function ix(){const t=l.useContext(id);if(!t)throw new Error("Input compound parts must be used inside <Input>.");return t}function ID(){return l.useContext(id)}function Bn(){return l.useContext(Xl)}function ad({name:t,value:e,onChange:n,onBlur:r,disabled:o,readOnly:s,type:i,rules:a}){const c=xn(),u=e!==void 0,f=c!=null&&t!=null&&!u,m=l.useRef(null),p=l.useCallback(y=>{m.current=y,f&&t&&c.registerRef(t,y)},[f,c,t]),b=o??(c==null?void 0:c.disabled)??!1,g=s??(c==null?void 0:c.readOnly)??!1,h=f&&t?c.getError(t):void 0,x=l.useMemo(()=>Xb(t?c==null?void 0:c.getFieldRules(t):void 0,a),[c,t,a]),C=f&&t?c.getValue(t):e,_=l.useCallback(y=>{if(n==null||n(y),!f||!t||!c)return;const v=zN(y,i);c.setValue(t,v,{shouldValidate:c.validateMode==="onChange"})},[f,c,t,n,i]),S=l.useCallback(y=>{r==null||r(y),!(!f||!t||!c)&&(c.setTouched(t,!0),c.validateMode==="onBlur"&&c.validateField(t))},[f,c,t,r]);return{bound:f,name:t,value:f&&i==="checkbox"?!!C:f?C??"":C,checked:f&&i==="checkbox"?!!C:void 0,onChange:_,onBlur:S,disabled:b||(c==null?void 0:c.isSubmitting),readOnly:g,ref:p,"aria-invalid":Yb(h),error:h,rules:x}}function RD(t,e){return ad({name:t,rules:e})}function ND(t){return V(t),new Promise(e=>{X.to(t,{scale:.94,y:"-0.5rem",autoAlpha:0,...ve(),overwrite:"auto",onComplete:()=>{V(t),e()}})})}function DD({shellRef:t,blocked:e,variant:n,groupSegment:r,onPointerDown:o}){const s=n==="gloss",i=Fo(t,!e&&!s&&r==null),a=ko(t,!e&&s&&r==null),c=l.useCallback(f=>{t.current=f,!e&&s&&a.bindShellRef(f)},[e,a,s,t]),u=l.useCallback(f=>{if(o==null||o(f),f.defaultPrevented||e||s||r!=null)return;const m=t.current;!m||de()||We(m)},[e,r,s,o,t]);return{isGloss:s,setShellRef:c,handleShellPointerDown:u,shellPointerDown:s&&!e?a.onShellPointerDown:u,shellPointerEnter:s&&!e?a.onShellPointerEnter:i.onShellPointerEnter,shellPointerLeave:s&&!e?a.onShellPointerLeave:i.onShellPointerLeave,shellFocusCapture:s&&!e?a.onShellFocusIn:void 0,shellBlurCapture:s&&!e?a.onShellFocusOut:void 0,shellHoverMotionClass:s?a.shellHoverMotionClass:i.shellHoverMotionClass,glossDisabledAttr:e&&s?{"data-gloss-disabled":""}:{}}}const kD="Show password",OD="Hide password",mp="Remove file",ax={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},PD={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},BD="bg-primary-tint",jD="flex items-stretch overflow-hidden",MD="relative",FD=`min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted ${Et}`,GD=`absolute inset-0 cursor-pointer opacity-0 disabled:cursor-not-allowed ${Et}`,HD="pointer-events-none size-12 shrink-0 text-muted",zD="pointer-events-none max-w-[18rem] text-center text-muted",pp="size-9 shrink-0 rounded-base border-token object-cover",VD="flex min-w-0 items-center gap-base",UD="flex h-full min-w-0 flex-1 items-center gap-base",hp="min-w-0 flex-1 truncate",$D="relative z-10 flex size-8 shrink-0 items-center justify-center rounded-base text-danger outline-none",WD="flex self-stretch shrink-0 items-stretch border-l-token",XD="relative z-10 flex h-full items-center justify-center text-muted outline-none hover:text-foreground focus-ring-inset",YD="border-r-token",KD="border-l-token",qD={small:In("small"),base:In("base"),mid:In("mid"),large:In("large")},ZD={small:le.small.controlPad,base:le.base.controlPad,mid:le.mid.controlPad,large:le.large.controlPad},lx={small:{icon:"icon-small",pad:"px-xsmall"},base:{icon:"icon-base",pad:"px-small"},mid:{icon:"icon-mid",pad:"px-base"},large:{icon:"icon-large",pad:"px-base"}};function cx(t){return t==="default"?BD:PD[t]}function QD({side:t,status:e,size:n,slotClass:r}){return Be(qD[n],cx(e),t==="prefix"?YD:KD,r)}function JD({variant:t,status:e,statusTinted:n}){return Ns({variant:t,statusTinted:n&&e!=="default",statusTintClass:e!=="default"?ax[e]:""})}function ek({variant:t,status:e,statusTinted:n}){return t==="gloss"?"gloss-control":n&&e!=="default"?ax[e]:Gu[t]}function tk(t){return t!=null?Be(hn(t),$r(t),"relative focus-within:z-[2]"):"rounded-base"}function nk({variant:t,status:e,blocked:n,groupSegment:r,fileListEmpty:o,shellSurface:s,shellFileEmptySurface:i,shellHoverMotionClass:a,className:c,slotClass:u}){const f=t==="gloss";return Be(jD,f&&MD,(r==null?void 0:r.orientation)==="horizontal"?"min-w-0 flex-1":"w-full",o?"min-h-[7.25rem]":Be(f?"":"border-1"),tk(r),i??s,Vr,Ur,!f&&zr(!n,e,t),a,n&&"cursor-not-allowed opacity-55 shadow-token-base",u,c)}function rk(t){return Be("relative flex min-h-[6.5rem] min-w-0 flex-1 flex-col items-center justify-center gap-plus px-large py-xlarge",t)}function ok({multipleFiles:t,slotClass:e}){return Be("relative min-w-0 flex-1 px-large py-base",t?"flex flex-col gap-base":"flex h-full items-center gap-plus",e)}function sk({size:t,disabled:e,slotClass:n}){const r=lx[t];return Be(XD,gn,hh(t),r.pad,e?"cursor-not-allowed opacity-45":"cursor-pointer",n)}function ik({disabled:t,slotClass:e}){return Be($D,gn,et("danger"),"focus-ring",t&&"pointer-events-none opacity-40",e)}function gp({side:t,status:e,controlSize:n,children:r}){const o=Bn();return d.jsx("span",{className:QD({side:t,status:e,size:n,slotClass:t==="prefix"?o.prefix:o.suffix}),children:r})}function ak({status:t,controlSize:e,visible:n,disabled:r,onToggle:o}){const s=Bn(),i=lx[e];return d.jsx("span",{className:Be(WD,cx(t)),children:d.jsx("button",{type:"button",disabled:r,"aria-label":n?OD:kD,"aria-pressed":n,onClick:a=>{a.preventDefault(),a.stopPropagation(),o()},onPointerDown:a=>a.stopPropagation(),className:sk({size:e,disabled:r,slotClass:s.passwordToggle}),children:n?d.jsx(we.IoEyeOff,{className:R("shrink-0",i.icon),"aria-hidden":!0}):d.jsx(we.IoEye,{className:R("shrink-0",i.icon),"aria-hidden":!0})})})}function bp({className:t}){const e=Bn();return d.jsx("span",{className:Be("flex size-9 shrink-0 items-center justify-center rounded-base bg-surface text-muted border-token",e.fileGlyph,t),"aria-hidden":!0,children:d.jsx(we.IoFolderOpen,{className:"icon-mid shrink-0","aria-hidden":!0})})}function xp({disabled:t,onRemove:e}){const n=Bn();return d.jsx("button",{type:"button",disabled:t,title:mp,"aria-label":mp,onClick:r=>{r.preventDefault(),r.stopPropagation(),e(r)},onPointerDown:r=>r.stopPropagation(),className:ik({disabled:t,slotClass:n.fileRemove}),children:d.jsx(we.IoClose,{className:"icon-mid shrink-0","aria-hidden":!0})})}const Ca=l.forwardRef(function({variant:e="default",status:n,size:r,inputType:o="text",placeholder:s,prefix:i,suffix:a,id:c,disabled:u,readOnly:f,className:m="",groupSegment:p,onPointerDown:b,onChange:g,onBlur:h,"aria-describedby":x,name:C,value:_,...S},y){const v=ad({name:typeof C=="string"?C:void 0,value:_,onChange:g,onBlur:h,disabled:u,readOnly:f,type:o}),A=v.name??C,E=v.bound?v.value:_,T=v.onChange,L=v.onBlur,w=v.disabled??u,I=v.readOnly??f,N=v.ref,k=ID(),j=xn(),P=Bn(),G=Po(),D=On(),O=l.useId(),F=c??(k==null?void 0:k.inputId)??O,B=n??(k==null?void 0:k.status)??"default",$=r??(k==null?void 0:k.size)??(j==null?void 0:j.size)??((D==null?void 0:D.buttonSize)??"base"),W=(k==null?void 0:k.isRequired)??!1,M=(k==null?void 0:k.hintConnected)??!1,z=(k==null?void 0:k.errorConnected)??!1,H=k==null?void 0:k.hintId,oe=k==null?void 0:k.errorId,pe=x??Ft(M?H:void 0,z?oe:void 0),ce=G!=null&&G.segmented?void 0:p??(D==null?void 0:D.segment),Y=l.useRef(null),ne=l.useRef(null),me=l.useCallback(K=>{ne.current=K,N(K),typeof y=="function"?y(K):y&&(y.current=K)},[y,N]),re=!!(w||I),xe=B==="danger"||B==="success"||B==="warning",te=e==="gloss",U=DD({shellRef:Y,blocked:re,variant:e,groupSegment:ce,onPointerDown:b}),ae=o==="file",he=o==="password",[Ne,Ye]=l.useState(!1),[q,se]=l.useState([]);l.useEffect(()=>{he||Ye(!1)},[he]);const ue=l.useMemo(()=>q.map(K=>({file:K,previewUrl:K.type.startsWith("image/")?URL.createObjectURL(K):null})),[q]);l.useEffect(()=>{const K=ue.map(Z=>Z.previewUrl).filter(Z=>Z!=null);return()=>{for(const Z of K)URL.revokeObjectURL(Z)}},[ue]),l.useEffect(()=>{if(!ae)return;const K=ne.current,Z=K==null?void 0:K.form;if(!Z)return;const fe=()=>se([]);return Z.addEventListener("reset",fe),()=>Z.removeEventListener("reset",fe)},[ae]);const Pe=l.useCallback(K=>{const Z=K.target.files;se(Z?Array.from(Z):[]),T==null||T(K)},[T]),ft=l.useCallback((K,Z)=>{if(re)return;const fe=()=>{se(Le=>{const He=Le.filter(Je=>Je!==K),Qe=ne.current;return Qe&&ED(Qe,He),Qe&&(g==null||g({target:Qe,currentTarget:Qe})),He})};if(!Z||de()){fe();return}ND(Z).then(fe)},[re,g]),vn=K=>Z=>{const fe=Z.currentTarget.closest("[data-file-row]");ft(K,fe instanceof HTMLElement?fe:null)},hr=q.length>1,yn=ae&&q.length===0,ln=!ae,qo=JD({variant:e,status:B,statusTinted:xe}),Zo=yn?Be(ek({variant:e,status:B,statusTinted:xe}),!te&&"border-2 border-dashed border-token"):null;return d.jsxs("div",{ref:U.setShellRef,"data-slot":"input-shell",role:"presentation",onPointerDown:U.shellPointerDown,onPointerEnter:U.shellPointerEnter,onPointerLeave:U.shellPointerLeave,onFocusCapture:U.shellFocusCapture,onBlurCapture:U.shellBlurCapture,...U.glossDisabledAttr,className:nk({variant:e,status:B,blocked:re,groupSegment:ce,fileListEmpty:yn,shellSurface:qo,shellFileEmptySurface:Zo,shellHoverMotionClass:U.shellHoverMotionClass,className:m,slotClass:P.shell}),children:[ln&&i!=null?d.jsx(gp,{side:"prefix",status:B,controlSize:$,children:i}):null,ae?d.jsxs("div",{className:yn?rk(P.fileArea):ok({multipleFiles:hr,slotClass:P.fileArea}),children:[yn?d.jsxs(d.Fragment,{children:[d.jsx(we.IoFolderOpen,{className:Be(HD,P.fileEmpty),"aria-hidden":!0}),d.jsx(ee,{as:"span",variant:"base",className:Be(zD,P.fileEmpty),children:s??"Select file"})]}):hr?ue.map(({file:K,previewUrl:Z})=>d.jsxs("div",{"data-file-row":"",className:Be(VD,P.fileRow),children:[Z?d.jsx("img",{src:Z,alt:"",className:Be(pp,P.filePreview)}):d.jsx(bp,{}),d.jsx(ee,{as:"span",variant:"base",className:hp,children:K.name}),re?null:d.jsx(xp,{onRemove:vn(K)})]},`${K.name}-${K.size}-${K.lastModified}`)):d.jsxs("div",{"data-file-row":"",className:Be(UD,P.fileRow),children:[ue[0].previewUrl?d.jsx("img",{src:ue[0].previewUrl,alt:"",className:Be(pp,P.filePreview)}):d.jsx(bp,{}),d.jsx(ee,{as:"span",variant:"base",className:hp,children:ue[0].file.name}),re?null:d.jsx(xp,{onRemove:vn(ue[0].file)})]}),d.jsx("input",{ref:me,id:F,name:A,type:"file",disabled:w,readOnly:I,onChange:Pe,onBlur:L,"aria-required":W||void 0,"aria-invalid":v["aria-invalid"]??(B==="danger"?!0:void 0),"aria-describedby":pe,className:GD,...S})]}):d.jsx("input",{ref:me,id:F,name:A,type:he?Ne?"text":"password":o,disabled:w,readOnly:I,placeholder:s,value:E,onChange:T,onBlur:L,"aria-required":W||void 0,"aria-invalid":v["aria-invalid"]??(B==="danger"?!0:void 0),"aria-describedby":pe,className:Be(FD,ZD[$],P.control,Et),...S}),ln&&a!=null?d.jsx(gp,{side:"suffix",status:B,controlSize:$,children:a}):null,ln&&he?d.jsx(ak,{status:B,controlSize:$,visible:Ne,disabled:u,onToggle:()=>Ye(K=>!K)}):null]})});Ca.displayName="InputControl";function ux({className:t,classNames:e,...n}){const r=Bn();return d.jsx(Ue,{className:t,classNames:{...e,root:Be(r.label,e==null?void 0:e.root)},...n})}ux.displayName="InputLabel";function ld({children:t,status:e,className:n,id:r,...o}){const s=ix(),i=Bn(),a=e??(s.status==="danger"||s.status==="default"?"default":s.status);return d.jsx(Xe,{id:r??s.hintId,status:a,className:Be(i.hint,n),...o,children:t})}ld.displayName="InputHint";function cd({children:t,className:e,id:n,...r}){const o=ix(),s=Bn();return d.jsx(Ze,{id:n??o.errorId,className:Be(s.error,e),...r,children:t})}cd.displayName="InputError";function lk({label:t,hint:e,error:n,inputId:r,labelId:o,size:s,status:i,controlProps:a}){const c=Bn();return d.jsxs(d.Fragment,{children:[t!=null?d.jsx(Ue,{id:o,classNames:{root:c.label},children:t}):null,d.jsx(Ca,{id:r,size:s,status:i,...a}),e!=null?d.jsx(ld,{children:e}):null,n!=null?d.jsx(cd,{children:n}):null]})}function ck({children:t,label:e,hint:n,error:r,id:o,isRequired:s=!1,status:i="default",size:a="base"}){const c=l.useId(),u=o??`input-${c}`,f=Yt(u),m=Kt(u),p=`${u}-label`,b=qt(t),g=n!=null||b&&Te(t,"InputHint"),h=r!=null||b&&Te(t,"InputError"),x=l.useMemo(()=>({inputId:u,hintId:f,errorId:m,labelId:p,hintConnected:g,errorConnected:h,isRequired:s,status:i,size:a}),[m,h,g,f,u,s,p,a,i]),C=l.useMemo(()=>({controlId:u,labelId:p,isRequired:s}),[u,s,p]);return{fieldCtx:x,fieldLabelCtx:C,isCompound:b,inputId:u,label:e,hint:n,error:r,status:i,size:a}}function uk({children:t,label:e,hint:n,error:r,className:o,classNames:s,id:i,isRequired:a=!1,status:c="default",size:u="base",...f}){const m=xn(),p=typeof f.name=="string"?f.name:void 0,b=p?m==null?void 0:m.getError(p):void 0,g=r??b,h=c==="default"&&b?"danger":c,x=u??(m==null?void 0:m.size)??"base",C=ck({children:t,label:e,hint:n,error:g,id:i,isRequired:a,status:h,size:x}),_=C.isCompound?t:d.jsx(lk,{label:C.label,hint:C.hint,error:C.error,inputId:C.inputId,labelId:C.fieldCtx.labelId,size:C.size,status:C.status,controlProps:f});return d.jsx(LD,{value:C.fieldCtx,children:d.jsx(wD,{classNames:s,children:d.jsx(Xt.Provider,{value:C.fieldLabelCtx,children:d.jsx(pn,{className:Be(s==null?void 0:s.root,o),children:_})})})})}const dk=Object.assign(uk,{Label:ux,Control:Ca,Hint:ld,Error:cd}),fk={xsmall:"--radius-value-xsmall",small:"--radius-value-small",base:"--radius-value-base",mid:"--radius-value-mid",large:"--radius-value-large"},mk={xsmall:.5,small:.75,base:1,mid:1.25,large:1.5},pk={small:"small",base:"base",mid:"mid",large:"large"},hk={small:"rounded-small",base:"rounded-base",mid:"rounded-mid",large:"rounded-large"};function gk(t,e){const n=/^([\d.]+)rem$/i.exec(t);if(n)return Number.parseFloat(n[1])*e;const r=/^([\d.]+)px$/i.exec(t);if(r)return Number.parseFloat(r[1])}function bk(t,e=16){if(typeof document<"u"){const n=getComputedStyle(document.documentElement).getPropertyValue(fk[t]).trim(),r=gk(n,e);if(r!=null)return r}return e*.5*mk[t]}function xk(t,e=16){return bk(pk[t],e)}const Ck={small:"w-control-small",base:"w-control-base",mid:"w-control-mid",large:"w-control-large"},_k={small:8,base:12,mid:16,large:20},Sk={small:14,base:16,mid:20,large:20},vk={small:20,base:24,mid:28,large:32},yk={small:240,base:280,mid:320,large:360};function ii(t){const e=le[t];return{defaultExpandedW:yk[t],iconBox:Sk[t],padX:_k[t],iconClass:e.icon,controlPad:e.controlPad,shellWCollapsed:Ck[t],clearTap:vk[t],clearIconClass:e.chevronIcon,textGapClear:t==="small"?4:6}}const Tk={small:ii("small"),base:ii("base"),mid:ii("mid"),large:ii("large")};function Ak(t){return Tk[t]}const ud=l.forwardRef(function({className:e="",size:n="base",variant:r,expandedWidth:o,defaultExpanded:s=!1,expanded:i,onExpandedChange:a,collapseOnBlur:c=!0,disabled:u,readOnly:f,placeholder:m="Search…",value:p,defaultValue:b,onChange:g,onBlur:h,onKeyDown:x,id:C,"aria-label":_,onValueChange:S,ripple:y=!1,groupSegment:v,...A},E){const T=Po(),L=On(),w=T!=null&&T.segmented?void 0:v??(L==null?void 0:L.segment),I=r??((L==null?void 0:L.variant)!=null?Hu(L.variant):"default"),N=l.useId(),k=C??N,j=i!==void 0,[P,G]=l.useState(s),D=j?i:P,O=l.useCallback(ie=>{j||G(ie),a==null||a(ie)},[j,a]),F=l.useRef(null),B=l.useRef(null),$=l.useRef(null),W=l.useRef(null),M=l.useRef(!1),z=l.useRef(D),H=p!==void 0,[oe,pe]=l.useState(()=>b!=null&&String(b).trim().length>0||p!=null&&String(p).trim().length>0);l.useEffect(()=>{H&&pe(String(p??"").trim().length>0)},[H,p]);const ce=l.useCallback(ie=>{$.current=ie,typeof E=="function"?E(ie):E&&(E.current=ie)},[E]),Y=!!(u||f),ne=l.useCallback(ie=>{g==null||g(ie),S==null||S(ie.target.value),H||pe(ie.target.value.trim().length>0)},[H,g,S]),me=l.useCallback(ie=>{var Qo;if(ie.preventDefault(),ie.stopPropagation(),Y)return;const ge=$.current;if(!ge)return;H||pe(!1);const Fe=(Qo=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:Qo.set;Fe==null||Fe.call(ge,""),ge.dispatchEvent(new Event("input",{bubbles:!0})),g==null||g({target:ge,currentTarget:ge}),S==null||S(""),requestAnimationFrame(()=>ge.focus())},[Y,H,g,S]),re=Ak(n),xe=o??re.defaultExpandedW,te=Fc(n),U=I==="gloss",ae=l.useCallback(()=>D?bn():_o(),[D]),he=Oo(F,!Y&&!U&&w==null,{resolveIdle:ae,idleSyncKey:D}),Ne=ko(F,!Y&&U&&w==null),Ye=l.useCallback(ie=>{F.current=ie,!Y&&U&&w==null&&Ne.bindShellRef(ie)},[Y,Ne,w,U]),q=l.useCallback(ie=>ie.offsetWidth-ie.clientWidth,[]),se=l.useCallback((ie,ge)=>(ie-ge-re.iconBox)/2,[re.iconBox]),ue=`calc(50% - ${re.iconBox/2}px)`,Pe=l.useRef(D),ft=l.useCallback(ie=>{if(B.current=ie,ie&&!ie.hasAttribute("data-search-icon-init")){ie.setAttribute("data-search-icon-init","");const ge=Pe.current;ie.style.left=ge?`${re.padX}px`:ue}},[ue,re.padX]),vn=l.useCallback(ie=>{const ge=F.current,Fe=B.current;!ge||!Fe||(ie?ge.style.width=`${xe}px`:ge.style.removeProperty("width"),ge.style.removeProperty("height"),ge.style.removeProperty("borderRadius"),Fe.style.left=ie?`${re.padX}px`:ue)},[ue,re.padX,xe]),hr=l.useCallback(ie=>{const ge=F.current,Fe=B.current;if(!ge||!Fe)return;if(de()){vn(ie);return}V(ge),V(Fe),ge.style.removeProperty("borderRadius");const Qo=xk(n);if(ie){ge.style.width=`${te}px`,ge.style.borderRadius=`${te/2}px`;const vT=(ge.clientWidth-re.iconBox)/2;Fe.style.left=`${vT}px`;const _m=ve();X.timeline({onComplete:()=>{ge.style.removeProperty("borderRadius")}}).to(ge,{width:xe,borderRadius:Qo,..._m,overwrite:"auto"},0).to(Fe,{left:re.padX,..._m,overwrite:"auto"},0);return}const _T=q(ge),ST=se(te,_T);Fe.style.left=`${re.padX}px`;const Cm=ve();X.timeline({onComplete:()=>{ge.style.removeProperty("width"),ge.style.removeProperty("borderRadius"),Fe.style.left=ue}}).to(ge,{width:te,borderRadius:te/2,...Cm,overwrite:"auto"},0).to(Fe,{left:ST,...Cm,overwrite:"auto"},0)},[vn,te,se,ue,re.iconBox,re.padX,q,n,xe]);l.useLayoutEffect(()=>{if(!M.current){M.current=!0,vn(D),z.current=D;return}z.current!==D&&(z.current=D,hr(D))},[vn,D,hr]);const yn=l.useCallback(()=>{requestAnimationFrame(()=>{var ie;return(ie=$.current)==null?void 0:ie.focus()})},[]),ln=l.useCallback(async()=>{Y||D||(await(W.current??Promise.resolve()),W.current=null,O(!0),yn())},[Y,D,yn,O]),qo=l.useCallback(ie=>{if(Y||D)return;const ge=F.current;if(!ge||de()){W.current=Promise.resolve();return}W.current=U&&w==null?No(ge):We(ge).then(()=>{})},[Y,D,w,U]),Zo=l.useCallback(ie=>{Y||D||(ie.preventDefault(),ln())},[Y,D,ln]),K=U&&w==null?Ne.onShellPointerEnter:he.onPointerEnter,Z=U&&w==null?Ne.onShellPointerLeave:he.onPointerLeave,fe=l.useCallback(ie=>{h==null||h(ie),!(!c||Y)&&window.setTimeout(()=>{const ge=F.current;if(!(ge!=null&&ge.contains(document.activeElement))){const Fe=$.current;((Fe==null?void 0:Fe.value)??"").trim().length===0&&O(!1)}},0)},[Y,c,h,O]),Le=l.useCallback(ie=>{D||Y||(ie.key==="Enter"||ie.key===" ")&&(ie.preventDefault(),ln())},[Y,D,ln]),He=l.useCallback(ie=>{var ge,Fe;x==null||x(ie),!ie.defaultPrevented&&ie.key==="Escape"&&c&&(((ge=$.current)==null?void 0:ge.value)??"").length===0&&(ie.stopPropagation(),O(!1),(Fe=F.current)==null||Fe.focus())},[c,x,O]),Qe=re.padX+re.iconBox+6,Je=D&&oe&&!Y,Qt=re.padX+(Je?re.clearTap+re.textGapClear:0),Jt=_??"Open search",gr=_??(m?String(m):"Search"),CT=w?R(hn(w),$r(w)):null;return d.jsxs("div",{ref:Ye,...D?{role:"search",tabIndex:-1}:{role:"button",tabIndex:Y?-1:0,onClick:Zo,onKeyDown:Le},"aria-expanded":D,"aria-disabled":Y||void 0,"aria-label":D?void 0:Jt,"data-search-expanded":D?"":void 0,onFocusCapture:U&&w==null?Ne.onShellFocusIn:void 0,onBlurCapture:U&&w==null?Ne.onShellFocusOut:void 0,className:R(w?CT:D?hk[n]:R("rounded-full",re.shellWCollapsed),"relative box-border inline-block overflow-hidden text-left",U?"gloss-control border-0":R("border-1 border-token",Gu[I]),Vr,Ur,U?Ne.shellHoverMotionClass:zr(!Y,"default",I),!U&&!Y&&he.motionClass,D?"cursor-text":"",!D&&!Y?"cursor-pointer":"",Y?"pointer-events-none opacity-55":"",e),onPointerDown:qo,onPointerEnter:K,onPointerLeave:Z,children:[y?d.jsx(ys,{color:"neutral",disabled:Y}):null,d.jsx("span",{ref:ft,className:"pointer-events-none absolute inset-y-0 z-[1] flex items-center justify-center text-muted",style:{width:re.iconBox},"aria-hidden":!0,children:d.jsx(we.IoSearch,{className:R("shrink-0",re.iconClass),"aria-hidden":!0})}),d.jsx("input",{ref:ce,id:k,type:"search",disabled:u,readOnly:f,placeholder:m,value:p,defaultValue:b,onChange:ne,onBlur:fe,onKeyDown:He,tabIndex:D?0:-1,"aria-label":gr,className:R("box-border min-h-0 w-full border-0 bg-transparent text-foreground outline-none placeholder:text-muted","[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none","disabled:cursor-not-allowed disabled:opacity-100",re.controlPad,Et,D?"relative z-[2] opacity-100":"pointer-events-none absolute inset-0 opacity-0"),style:D?{paddingLeft:Qe,paddingRight:Qt}:void 0,...A}),Je?d.jsx("button",{type:"button","aria-label":"Clear field",onClick:me,onPointerDown:ie=>ie.stopPropagation(),className:R("absolute top-1/2 z-[3] flex -translate-y-1/2 items-center justify-center rounded-full border-0 bg-transparent p-0","text-foreground outline-none",gn,et(),"focus-ring-inset","cursor-pointer"),style:{right:re.padX,width:re.clearTap,height:re.clearTap},children:d.jsx(we.IoClose,{className:`shrink-0 ${re.clearIconClass}`,"aria-hidden":!0})}):null]})});ud.displayName="SearchInput";function dd(...t){return R(...t)}function fd(t){const e=[];return l.Children.forEach(t,n=>{if(l.isValidElement(n)){if(n.type===l.Fragment){const{children:r}=n.props;e.push(...fd(r));return}e.push(n)}}),e}function dx(t){return t.type===yo||t.type===Ca||t.type===Zb||t.type===ud||t.type===Ir||t.type.displayName==="ButtonGroupText"}function fx(t,e){return e<=1?"only":t===0?"first":t===e-1?"last":"middle"}function mx(t,e){return{orientation:t,position:e}}function Ek(t){return t.reduce((e,n)=>e+(dx(n)?1:0),0)}const Lk={small:"small",base:"base",mid:"mid",large:"mid"},wk={small:"h-control-small",base:"h-control-base",mid:"h-control-mid",large:"h-control-large"};function px(t){const{padX:e,padY:n}=le[t];return R(wk[t],e,n)}function hn(t){if(t==null)return"";const{orientation:e,position:n}=t;return n==="only"?"rounded-base":e==="horizontal"?n==="first"?"rounded-l-base rounded-r-none":n==="middle"?"rounded-none":"rounded-r-base rounded-l-none":n==="first"?"rounded-t-base rounded-b-none":n==="middle"?"rounded-none":"rounded-b-base rounded-t-none"}function Ik(t){const{orientation:e,position:n}=t;return n==="only"?"!rounded-base":e==="horizontal"?n==="first"?"!rounded-l-base !rounded-r-none":n==="middle"?"!rounded-none":"!rounded-r-base !rounded-l-none":n==="first"?"!rounded-t-base !rounded-b-none":n==="middle"?"!rounded-none":"!rounded-b-base !rounded-t-none"}function $r(t){return t==null?"":R(hn(t),Ik(t),"!border-0 [border:0!important] !shadow-none [box-shadow:none!important]","z-0 focus-visible:z-[2]")}function Rk(t){return R("relative inline-flex shrink-0 select-none items-center justify-center border-token bg-surface text-muted",hn(t),t!=null&&$r(t),"z-0")}function hx({orientation:t,segmented:e,variant:n,className:r}){return dd("inline-flex text-left w-fit",!e&&R("relative rounded-base",n==="gloss"?"gloss-panel gloss-deep border-0 text-foreground":"after:pointer-events-none after:absolute after:inset-0 after:rounded-base after:border-token after:content-['']"),R(t==="horizontal"?"flex-row flex-nowrap items-stretch":"flex-col flex-nowrap items-stretch",e&&"gap-xsmall"),r)}function gx(t){return dd("pointer-events-none shrink-0",t==="horizontal"?"my-[var(--border-width)] self-stretch border-r-token":"mx-[var(--border-width)] self-stretch border-b-token")}function Nk({groupSegment:t,groupVariant:e,buttonSize:n,className:r}){return dd(Rk(t),e==="gloss"&&"bg-transparent text-foreground","inline-flex items-center",px(n),r)}const Dk="max-w-[12rem] truncate font-w-base whitespace-nowrap md:max-w-[18rem]";function md(...t){return R(...t)}const kk=new Set(["default","primary","outline","secondary","ghost"]),Ok={default:"default",primary:"primary",outline:"default",secondary:"secondary",ghost:"default",gloss:"default"},bx={default:{focusOutline:"focus-visible:outline-primary",convergeBg:_e("converge-ripple-neutral")},primary:{focusOutline:"focus-visible:outline-primary",convergeBg:_e("converge-ripple-primary-fill")},outline:{focusOutline:"focus-visible:outline-primary",convergeBg:_e("converge-ripple-neutral")},secondary:{focusOutline:"focus-visible:outline-primary",convergeBg:_e("converge-ripple-neutral")},ghost:{focusOutline:"focus-visible:outline-primary",convergeBg:_e("converge-ripple-neutral")},gloss:{focusOutline:"focus-visible:outline-primary",convergeBg:_e("converge-ripple-neutral")}},xx={small:{root:"h-control-xsmall w-control-xsmall",icon:"icon-small"},base:{root:"h-control-small w-control-small",icon:"icon-base"},mid:{root:"h-control-base w-control-base",icon:"icon-mid"},large:{root:"h-control-mid w-control-mid",icon:"icon-large"}},Pk="relative z-0 flex shrink-0 cursor-pointer items-center justify-center rounded-full outline-none overflow-hidden",Bk="cursor-not-allowed opacity-50",jk="relative z-[1] shrink-0 text-current",Mk="rounded-full";function Fk(t){return bx[t]}function Gk({variant:t,size:e,disabled:n,className:r,slotRoot:o}){const s=t==="gloss",i=bx[t],a=xx[e];return md(Pk,s?R("gloss-btn",nn):ir,!n&&!s&&et(Ok[t]),!s&&vr[t],i.focusOutline,a.root,n&&Bk,r,o)}function Hk(t,e){return md(jk,xx[t].icon,e)}function zk({variant:t,animated:e,disabled:n,forwardedRef:r,onPointerDown:o,onPointerEnter:s,onPointerLeave:i}){const a=aa({isGloss:t==="gloss",animated:e,enabled:!n,hasHoverShadow:kk.has(t),useContentRef:!1,forwardedRef:r,onPointerEnter:s,onPointerLeave:i,onPointerDown:o});return{setRefs:a.setRefs,handlePointerEnter:a.handlePointerEnter,handlePointerLeave:a.handlePointerLeave,handlePointerDown:a.handlePointerDown}}const Yl=l.createContext({});function Vk({classNames:t,children:e}){const n=l.useContext(Yl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Yl.Provider,{value:r,children:e})}function Cx(){return l.useContext(Yl)}function Uk({color:t,disabled:e,className:n}){const r=Cx();return d.jsx(ys,{color:t,disabled:e,duration:Se().rippleDefaultDuration,className:md(Mk,r.ripple,n)})}function $k({size:t}){const e=Cx();return d.jsx(we.IoClose,{"aria-hidden":!0,className:Hk(t,e.icon)})}function Wk(t){return t??"Close"}function Xk({variant:t="default",size:e="base",animated:n=!0,ripple:r=!1,className:o,disabled:s,type:i="button","aria-label":a,classNames:c}){const u=!!s,f=Fk(t),m=Gk({variant:t,size:e,disabled:u,className:o,slotRoot:c==null?void 0:c.root});return{variant:t,size:e,animated:n,ripple:r,disabled:u,type:i,ariaLabel:Wk(a),buttonClass:m,convergeRippleColor:f.convergeBg,classNames:c}}const Go=l.forwardRef(function({variant:e,size:n,animated:r,ripple:o,className:s,classNames:i,disabled:a,type:c,"aria-label":u,onPointerDown:f,onPointerEnter:m,onPointerLeave:p,...b},g){const h=Xk({variant:e,size:n,animated:r,ripple:o,className:s,classNames:i,disabled:a,type:c,"aria-label":u}),x=zk({variant:h.variant,animated:h.animated,disabled:h.disabled,forwardedRef:g,onPointerDown:f,onPointerEnter:m,onPointerLeave:p});return d.jsx(Vk,{classNames:h.classNames,children:d.jsxs("button",{ref:x.setRefs,type:h.type,disabled:h.disabled,"aria-label":h.ariaLabel,className:h.buttonClass,onPointerEnter:x.handlePointerEnter,onPointerLeave:x.handlePointerLeave,onPointerDown:x.handlePointerDown,...b,children:[h.ripple?d.jsx(Uk,{color:h.convergeRippleColor,disabled:h.disabled}):null,d.jsx($k,{size:h.size})]})})});Go.displayName="CloseButton";const Yk=new Set(["ExpandableIcon","Accordion.Icon"]),Kk=new Set(["ExpandableTitle","Accordion.Title"]),qk=new Set(["ExpandableDescription","Accordion.Description"]),Zk=new Set(["ExpandableChevron","Accordion.Indicator"]),Qk=new Set(["ExpandableMessage","Accordion.Message"]),Jk=new Set(["ExpandableTrigger","ExpandablePanel","ExpandableMessage","Accordion.Trigger","Accordion.Panel","Accordion.Message","Accordion.Heading"]);function ot(...t){return R(...t)}function eO(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function pd(t){return t.displayName}function tO(t){const e=[],n=[];return l.Children.forEach(t,r=>{l.isValidElement(r)&&r.type===ys?e.push(r):n.push(r)}),{ripples:e,rest:n}}function nO(t){let e=!1;return l.Children.forEach(t,n=>{if(e||!l.isValidElement(n))return;const r=pd(n.type);r!=null&&Qk.has(r)&&(e=!0)}),e}function rO(t){let e=!1;const n=r=>{if(!e)for(const o of l.Children.toArray(r)){if(!l.isValidElement(o))continue;const s=pd(o.type);if(s!=null&&Jk.has(s)){e=!0;return}n(o.props.children)}};return n(t),e}function _a(t,e){let n=!1;const r=o=>{if(!n)for(const s of l.Children.toArray(o)){if(!l.isValidElement(s))continue;const i=pd(s.type);if(i!=null&&e.has(i)){n=!0;return}r(s.props.children)}};return r(t),n}function oO(t){return _a(t,Yk)}function sO(t){return _a(t,Kk)}function iO(t){return _a(t,qk)}function _x(t){return _a(t,Zk)}function aO({children:t,hideChevron:e,hasPanel:n}){const r=_x(t),o=n&&!e&&!r;return{hasIndicator:oO(t),hasTitle:sO(t),hasDescription:iO(t),hasAction:o||r,hasClose:!1}}const Sx=l.createContext(null);function lO({value:t,children:e}){return d.jsx(Sx.Provider,{value:t,children:e})}function Wr(){const t=l.useContext(Sx);if(!t)throw new Error("Expandable components must be used inside <Expandable>.");return t}const Kl=l.createContext({});function cO({classNames:t,children:e}){const n=l.useContext(Kl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Kl.Provider,{value:r,children:e})}function ur(){return l.useContext(Kl)}const hd=l.createContext(null);function uO({gridSlots:t,children:e}){return d.jsx(hd.Provider,{value:t,children:e})}function dO(){const t=l.useContext(hd);if(!t)throw new Error("Expandable trigger parts must be inside <Expandable.Trigger>.");return t}function Sa(){return l.useContext(hd)}function va(t){return t?2:1}function fO(t){return t.hasAction?va(t.hasIndicator)+1:null}function mO(t){return t.hasClose?va(t.hasIndicator)+(t.hasAction?2:1):null}function pO(t){const{hasIndicator:e,hasAction:n,hasClose:r}=t;return e&&n&&r?"grid-cols-[auto_minmax(0,1fr)_auto_auto]":e&&(n||r)?"grid-cols-[auto_minmax(0,1fr)_auto]":e?"grid-cols-[auto_minmax(0,1fr)]":n&&r?"grid-cols-[minmax(0,1fr)_auto_auto]":n||r?"grid-cols-[minmax(0,1fr)_auto]":"grid-cols-[minmax(0,1fr)]"}const ya={1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4"};function Ho(t,e="gap-x-base"){const n=t.hasTitle&&t.hasDescription;return R("grid w-full min-w-0 text-left",pO(t),n?"grid-rows-[auto_auto] gap-y-xsmall":"grid-rows-[auto]",e)}function Rr(t){return t.hasIndicator?"col-start-1 row-start-1 self-center shrink-0":"hidden"}function zo(t){return R("row-start-1 self-center min-w-0 max-w-full justify-self-start",ya[va(t.hasIndicator)])}function ks(t){return R(t.hasTitle?"row-start-2":"row-start-1","min-w-0 w-full max-w-full justify-self-stretch self-start",ya[va(t.hasIndicator)])}function Os(t){const e=fO(t);return e==null?"hidden":R("row-start-1 self-center shrink-0 justify-self-end",ya[e])}function vx(t){const e=mO(t);return e==null?"hidden":R("row-start-1 self-center shrink-0 justify-self-end",ya[e])}function Fi(t){return t.scrollHeight}function hO(t,e){const n=Fi(e),r=t.getBoundingClientRect().height;if(n<=0){X.set(t,{clearProps:"height"}),t.style.removeProperty("overflow");return}if(Math.abs(n-r)<=.5){requestAnimationFrame(()=>{requestAnimationFrame(()=>{X.set(t,{clearProps:"height"}),t.style.removeProperty("height"),t.style.removeProperty("overflow")})});return}t.style.height=`${n}px`,t.style.overflow="hidden",requestAnimationFrame(()=>{requestAnimationFrame(()=>{X.set(t,{clearProps:"height"}),t.style.removeProperty("height"),t.style.removeProperty("overflow")})})}function bi(t,e){e?(X.set(t,{clearProps:"height"}),t.style.removeProperty("height"),t.style.removeProperty("overflow")):(t.style.height="0px",t.style.overflow="hidden")}const Cp="data-collapsible-init";function yx(t,e){const n=l.useRef(e);return l.useCallback(r=>{t.current=r,r&&!r.hasAttribute(Cp)&&(r.setAttribute(Cp,""),bi(r,n.current))},[t])}function Tx(t,e,n,r){const o=l.useRef((r==null?void 0:r.enabled)??(()=>Se().enableExpandable));o.current=(r==null?void 0:r.enabled)??(()=>Se().enableExpandable);const s=r==null?void 0:r.skipAnimRef,i=l.useRef(void 0);l.useLayoutEffect(()=>{const a=e.current,c=n.current;if(!a||!c)return;const u=de()||!o.current();if(i.current===void 0){i.current=t,bi(a,t);return}if(s!=null&&s.current){s.current=!1,i.current=t,bi(a,t);return}if(i.current!==t){if(i.current=t,V(a),u){bi(a,t);return}if(t)a.style.overflow="hidden",X.fromTo(a,{height:0},{height:()=>Fi(c),...ep(),overwrite:"auto",onComplete:()=>hO(a,c)});else{const f=a.getBoundingClientRect().height||Fi(c);a.style.height=`${f}px`,a.style.overflow="hidden",X.to(a,{height:0,...ep(),overwrite:"auto",onComplete:()=>{a.style.height="0px",a.style.overflow="hidden"}})}}},[t,e,n,s])}function gO({open:t,disabled:e,toggle:n,forwardedRef:r,onClick:o,onKeyDown:s,onPointerDown:i}){const a=l.useRef(null),c=l.useRef(null),u=Hr(t,c,()=>Se().enableExpandable),f=l.useCallback(g=>{dt(r,g)},[r]),m=l.useCallback(g=>{o==null||o(g),!(g.defaultPrevented||e)&&n()},[e,o,n]),p=l.useCallback(g=>{s==null||s(g),!(g.defaultPrevented||e)&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),n())},[e,s,n]),b=l.useCallback(g=>{if(!e){const h=a.current;h&&!de()&&We(h)}i==null||i(g)},[e,i]);return{liftSpanRef:a,bindChevronRef:u,setTriggerRef:f,handleClick:m,handleKeyDown:p,handlePointerDown:b}}function bO(t){const e=l.useRef(null),n=l.useRef(null),r=yx(e,t);return Tx(t,e,n),{shellRef:e,innerRef:n,bindShellRef:r}}const xO={small:"small",base:"small",mid:"base",large:"base"},CO={small:"px-base pb-base pt-small",base:"px-plus pb-plus pt-small",mid:"px-mid pb-mid pt-base",large:"px-large pb-large pt-base"},_O="rounded-mid text-left text-foreground",SO="border-token bg-surface shadow-token-base",vO="gloss-panel gloss-deep border-0",yO="gloss-content flex min-w-0 flex-col",TO="relative w-full overflow-hidden py-base text-left outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary focus-visible:outline-offset-2",AO="cursor-not-allowed opacity-50",EO="cursor-pointer",LO="relative z-[1] w-full min-w-0 origin-center will-change-transform",Ax="contents",Ex="relative z-[1] flex shrink-0 origin-center self-center",wO=Ax,IO="shrink-0 text-primary [&_svg]:size-full",RO=Ax,NO="text-muted",DO="font-w-mid",kO=Ex,OO="overflow-hidden",PO="pointer-events-none absolute inset-0 z-0 overflow-hidden rounded-[inherit]";function BO({variant:t,className:e,slotClass:n}){return ot(_O,t==="gloss"?vO:SO,e,n)}function jO({size:t,disabled:e,className:n,slotClass:r}){const o=le[t];return ot(TO,o.padX,e?AO:EO,r,n)}function MO({gridSlots:t,slotClass:e}){return ot(LO,Ho(t),e)}function FO({size:t,className:e,slotClass:n}){return ot(IO,le[t].icon,n,e)}function GO({size:t,className:e,slotClass:n}){return ot(CO[t],"text-left",n,e)}function HO(t){return le[t].chevronIcon}function zO(t){return le[t].chevronIcon}function VO(t){return le[t].controlText}function Lx({className:t}){return d.jsx("svg",{className:ot("shrink-0",t),width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:d.jsx("path",{d:"m6 9 6 6 6-6"})})}const gd=l.forwardRef(function({className:e,...n},r){const o=ur();return d.jsx("div",{ref:r,className:ot(wO,o.message,e),...n})});gd.displayName="ExpandableMessage";const bd=l.forwardRef(function({hideChevron:e=!1,asChild:n,className:r,onClick:o,onKeyDown:s,onPointerDown:i,children:a,type:c="button",...u},f){const{open:m,disabled:p,hasPanel:b,size:g,toggle:h,headerId:x,panelId:C}=Wr(),_=ur(),S=gO({open:m,disabled:p,toggle:h,forwardedRef:f,onClick:o,onKeyDown:s,onPointerDown:i}),{ripples:y,rest:v}=tO(a),A=l.useMemo(()=>aO({children:v,hideChevron:e,hasPanel:b}),[v,e,b]),E=nO(v)?d.jsx(d.Fragment,{children:v}):d.jsx(gd,{children:v}),T=b&&!e&&!_x(v),L=y.length>0?d.jsx("span",{className:ot(PO,_.triggerRippleOverlay),"aria-hidden":!0,children:y}):null,w=d.jsxs(d.Fragment,{children:[E,T?d.jsx("span",{ref:S.bindChevronRef,className:ot(Os(A),Ex,_.chevron),"aria-hidden":!0,children:d.jsx(Lx,{className:zO(g)})}):null]});if(n&&l.isValidElement(a)){const I=a;return l.cloneElement(I,{...u,id:x,ref:eO(f,I.props.ref),className:ot(I.props.className,r),disabled:p||I.props.disabled,"aria-expanded":b?m:void 0,"aria-controls":b?C:void 0,onClick:N=>{var k,j;(j=(k=I.props).onClick)==null||j.call(k,N),S.handleClick(N)},onKeyDown:N=>{var k,j;(j=(k=I.props).onKeyDown)==null||j.call(k,N),S.handleKeyDown(N)}})}return d.jsxs("button",{ref:S.setTriggerRef,type:c,id:x,className:jO({size:g,disabled:p,className:r,slotClass:_.trigger}),"aria-expanded":b?m:void 0,"aria-controls":b?C:void 0,disabled:p,onPointerDown:S.handlePointerDown,onClick:S.handleClick,onKeyDown:S.handleKeyDown,...u,children:[L,d.jsx(uO,{gridSlots:A,children:d.jsx("span",{ref:S.liftSpanRef,className:MO({gridSlots:A,slotClass:_.triggerLift}),children:w})})]})});bd.displayName="ExpandableTrigger";function xd({className:t,children:e,...n}){const{size:r}=Wr(),o=ur(),s=Sa();return e==null?null:d.jsx("span",{"aria-hidden":!0,className:ot(FO({size:r,className:t,slotClass:o.icon}),s&&Rr(s)),...n,children:e})}xd.displayName="ExpandableIcon";function wx({className:t,...e}){const n=ur();return d.jsx("div",{className:ot(RO,n.content,t),...e})}wx.displayName="ExpandableContent";function Cd({className:t,...e}){const{size:n}=Wr(),r=ur(),o=Sa();return d.jsx(ee,{as:"div",variant:VO(n),className:ot(DO,o&&zo(o),r.title,t),...e})}Cd.displayName="ExpandableTitle";function _d({className:t,...e}){const{size:n}=Wr(),r=ur(),o=Sa();return d.jsx(ee,{as:"div",variant:xO[n],className:ot(NO,o&&ks(o),r.description,t),...e})}_d.displayName="ExpandableDescription";function Ix({className:t,...e}){const{open:n,hasPanel:r,size:o}=Wr(),s=ur(),i=dO(),a=l.useRef(null),c=Hr(n,a,()=>Se().enableExpandable);return r?d.jsx("span",{ref:c,className:ot(Os(i),kO,s.chevron,t),"aria-hidden":!0,...e,children:d.jsx(Lx,{className:HO(o)})}):null}Ix.displayName="ExpandableChevron";const Sd=l.forwardRef(function({className:e,children:n,...r},o){const{open:s,headerId:i,panelId:a,size:c,setHasPanel:u}=Wr(),f=ur(),m=bO(s);l.useLayoutEffect(()=>(u(!0),()=>u(!1)),[u]);const p=l.useCallback(b=>{typeof o=="function"?o(b):o&&(o.current=b)},[o]);return d.jsx("div",{ref:m.bindShellRef,className:ot(OO,f.panelShell),children:d.jsx("div",{ref:m.innerRef,children:d.jsx("section",{ref:p,id:a,"aria-labelledby":i,"aria-hidden":!s,inert:!s,className:GO({size:c,className:e,slotClass:f.panel}),...r,children:n})})})});Sd.displayName="ExpandablePanel";function UO({title:t,description:e,icon:n,panelChildren:r}){return d.jsxs(d.Fragment,{children:[d.jsxs(bd,{children:[n!=null?d.jsx(xd,{children:n}):null,t!=null?d.jsx(Cd,{children:t}):null,e!=null?d.jsx(_d,{children:e}):null]}),r!=null?d.jsx(Sd,{children:r}):null]})}function $O({children:t,compound:e,defaultOpen:n=!1,open:r,onOpenChange:o,disabled:s=!1,size:i="base",variant:a="default"}){const c=l.useId(),u=l.useId(),f=r!==void 0,[m,p]=l.useState(n),[b,g]=l.useState(!1),h=l.useCallback(y=>{g(y)},[]),x=f?r:m,C=l.useCallback(()=>{if(s||!b)return;const y=!x;f||p(y),o==null||o(y)},[f,s,b,x,o]),_={open:x,disabled:s,hasPanel:b,size:i,variant:a,toggle:C,headerId:u,panelId:c,setHasPanel:h},S=e===!0||rO(t);return{contextValue:_,isCompound:S,isGloss:a==="gloss"}}const Rx=l.forwardRef(function({children:e,compound:n,title:r,description:o,icon:s,variant:i="default",size:a="base",defaultOpen:c=!1,open:u,onOpenChange:f,disabled:m=!1,className:p,classNames:b,...g},h){const x=$O({children:e,compound:n,defaultOpen:c,open:u,onOpenChange:f,disabled:m,size:a,variant:i}),C=Ro(h,x.isGloss),_=x.isCompound?e:d.jsx(UO,{title:r,description:o,icon:s,panelChildren:e});return d.jsx(lO,{value:x.contextValue,children:d.jsx(cO,{classNames:b,children:d.jsx("div",{ref:C,className:BO({variant:i,className:p,slotClass:b==null?void 0:b.root}),...g,children:x.isGloss?d.jsx("div",{className:ot(yO,b==null?void 0:b.glossContent),children:_}):_})})})});Rx.displayName="ExpandableRoot";const jn=Object.assign(Rx,{Trigger:bd,Message:gd,Icon:xd,Content:wx,Title:Cd,Description:_d,Chevron:Ix,Panel:Sd}),Ps=l.createContext(null),ql=l.createContext({});function WO({classNames:t,children:e}){const n=l.useContext(ql),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(ql.Provider,{value:r,children:e})}function Vo(){return l.useContext(ql)}const XO={small:{maxWidthClass:"max-w-component-small",shellPadding:"rounded-mid py-small px-base",gridGap:"gap-x-base gap-y-xsmall",iconSvgClass:"[&_svg]:icon-small",titleVariant:"small",descVariant:"tools",loadingSize:"small",toastWidthPx:280},base:{maxWidthClass:"max-w-component-base",shellPadding:"rounded-mid py-base px-plus",gridGap:"gap-x-base gap-y-xsmall",iconSvgClass:"[&_svg]:icon-mid",titleVariant:"base",descVariant:"small",loadingSize:"small",toastWidthPx:360},mid:{maxWidthClass:"max-w-component-mid",shellPadding:"rounded-mid py-base px-plus",gridGap:"gap-x-base gap-y-xsmall",iconSvgClass:"[&_svg]:icon-large",titleVariant:"mid",descVariant:"base",loadingSize:"base",toastWidthPx:400},large:{maxWidthClass:"max-w-component-large",shellPadding:"rounded-mid py-plus px-plus",gridGap:"gap-x-base gap-y-xsmall",iconSvgClass:"[&_svg]:icon-large",titleVariant:"large",descVariant:"base",loadingSize:"mid",toastWidthPx:440}};function vd(t){return t??"base"}function Dn(t){return XO[vd(t)]}function YO(t){const e=Dn(t);return`w-fit ${e.maxWidthClass} ${e.shellPadding}`}function KO(t,e="base"){const n=Dn(e).toastWidthPx;return t.length===0?n:Math.max(n,...t.map(r=>Dn(r.size??e).toastWidthPx))}const yd={danger:we.IoCloseCircleOutline,success:we.IoCheckmarkCircleOutline,info:we.IoInformationCircleOutline,warning:we.IoWarning};function Td(t){return t??"default"}function Ad(t){return t??"default"}function Bs(t,e){let n=!1;const r=o=>{if(!n)for(const s of l.Children.toArray(o)){if(!l.isValidElement(s))continue;const i=s.type.displayName;if(e(i)){n=!0;return}r(s.props.children)}};return r(t),n}function qO(t){return Bs(t,e=>e==="AlertTitle")}function ZO(t){return Bs(t,e=>e==="AlertDescription")}function QO(t){return Bs(t,e=>e==="AlertIndicator")}function Nx(t,e){for(const n of l.Children.toArray(t)){if(!l.isValidElement(n))continue;n.type.displayName==="AlertIndicator"&&e(n.props),Nx(n.props.children,e)}}function JO(t,e,n,r){const o=r??e;return n===null?!1:n!==void 0||o!=="default"?!0:t==="outline"}function eP(t,e,n){if(!QO(t))return!1;let r=!1;return Nx(t,o=>{JO(e,n,o.children,o.status)&&(r=!0)}),r}function tP(t){return Bs(t,e=>e==="AlertAction")}const nP=new Set(["AlertMessage","AlertIndicator","AlertContent","AlertTitle","AlertDescription","AlertAction"]);function rP(t){return Bs(t,e=>e!=null&&nP.has(e))}function Ed(t,e){return e!=="default"?!0:t==="outline"}function Ld(t,e){return e!=="default"?yd[e]:t==="outline"?we.IoHelpCircleOutline:null}function oP(t,e,n,r,o){return r?eP(o,t,e):n===null?!1:n!==void 0?!0:Ed(t,e)&&Ld(t,e)!==null}const sP={default:"bg-surface border-token text-foreground",outline:"bg-transparent border-token text-foreground",secondary:"bg-secondary border-token text-secondary-foreground"};function Dx(t,e){if(t==="gloss")return R("gloss-panel border-0 text-foreground",e!=="default"?xt[e]:"");if(e==="default")return sP[t];switch(t){case"default":return R(Gc[e],xt[e]);case"outline":return R("bg-transparent",Hc[e],xt[e]);case"secondary":return R("bg-secondary border-token",xt[e])}}function kx(t){return t!=="default"?xt[t]:"text-primary"}const iP="inline-flex shrink-0 items-center justify-center";function aP(t,e){return R(iP,e,kx(t))}const Ox="contents",lP="font-w-mid",cP="text-muted";function wd({status:t,className:e="",children:n,...r}){const o=l.useContext(Ps),s=Vo(),i=(o==null?void 0:o.variant)??"default",a=t??(o==null?void 0:o.status)??"default",c=(o==null?void 0:o.sizePreset)??Dn("base"),u=o==null?void 0:o.gridSlots;if(n===null)return null;const f=Ld(i,a),m=n!==void 0?n:Ed(i,a)&&f!==null?d.jsx(f,{"aria-hidden":!0}):null;return m===null?null:d.jsx("span",{className:R(aP(a,c.iconSvgClass),u&&Rr(u),s.indicator,e),...r,children:m})}wd.displayName="AlertIndicator";function Px({className:t="",...e}){const n=Vo();return d.jsx("div",{className:R(Ox,n.content,t),...e})}Px.displayName="AlertContent";const Bx=l.forwardRef(function({className:e="",...n},r){const o=Vo();return d.jsx("div",{ref:r,className:R(Ox,o.message,e),...n})});Bx.displayName="AlertMessage";function Id({className:t="",id:e,...n}){const r=l.useContext(Ps),o=Vo(),s=(r==null?void 0:r.sizePreset)??Dn("base");return d.jsx(ee,{as:"div",id:e??(r==null?void 0:r.titleId),variant:s.titleVariant,className:R(lP,(r==null?void 0:r.gridSlots)&&zo(r.gridSlots),o.title,t),...n})}Id.displayName="AlertTitle";function Rd({className:t="",id:e,...n}){const r=l.useContext(Ps),o=Vo(),s=(r==null?void 0:r.sizePreset)??Dn("base");return d.jsx(ee,{as:"div",id:e??(r==null?void 0:r.descriptionId),variant:s.descVariant,className:R(cP,(r==null?void 0:r.gridSlots)&&ks(r.gridSlots),o.description,t),...n})}Rd.displayName="AlertDescription";function Nd({className:t="",...e}){const n=l.useContext(Ps),r=Vo();return d.jsx("div",{className:R((n==null?void 0:n.gridSlots)&&Os(n.gridSlots),r.action,t),...e})}Nd.displayName="AlertAction";function uP({gridSlots:t,title:e,description:n,icon:r,action:o,children:s}){return d.jsxs(d.Fragment,{children:[t.hasIndicator?d.jsx(wd,{children:r}):null,e!=null?d.jsx(Id,{children:e}):null,n!=null?d.jsx(Rd,{children:n}):null,s,o!=null?d.jsx(Nd,{children:o}):null]})}function dP({variant:t,status:e,hoverLift:n=!0,ref:r,onPointerOver:o,onPointerOut:s}){const i=t==="gloss",a=n,c=l.useRef(null),u=l.useMemo(()=>Mt(c,a&&i),[i,a]),f=l.useCallback(x=>{u(x),c.current=x,typeof r=="function"?r(x):r&&(r.current=x)},[u,r]),m=Do(c,a&&i),p=Oo(c,a&&!i),b=a?i?nn:p.motionClass:"",g=R(Dx(t,e),b),h=l.useMemo(()=>({onPointerOver:x=>{o==null||o(x),!(x.defaultPrevented||!a)&&(i?m.onPointerOver(x):p.onPointerEnter(x))},onPointerOut:x=>{s==null||s(x),a&&(i?m.onPointerOut(x):p.onPointerLeave(x))}}),[m.onPointerOut,m.onPointerOver,i,a,s,o,p.onPointerEnter,p.onPointerLeave]);return{setRootRef:f,surfaceClass:g,pointerHandlers:h}}function jx(t,e){return e??(t==="danger"||t==="warning"?"alert":"status")}function fP(t,e,n,r){if(n)return t;if(r)return e}function mP(t,e,n){if(e&&n)return t}function pP(t,e,n,r,o,s,i,a){return{hasIndicator:oP(t,e,n,o,s),hasTitle:i,hasDescription:a,hasAction:o?tP(s):r!=null,hasClose:!1}}function hP({variant:t,status:e,size:n,role:r,title:o,description:s,icon:i,action:a,children:c,ariaLabelledByProp:u,ariaDescribedByProp:f}){const m=Td(t),p=Ad(e),b=vd(n),g=Dn(b),h=l.useId(),x=`${h}-title`,C=`${h}-description`,_=rP(c),S=l.useMemo(()=>o!=null||qO(c),[c,o]),y=l.useMemo(()=>s!=null||ZO(c),[c,s]),v=l.useMemo(()=>pP(m,p,i,a,_,c,S,y),[a,c,y,S,i,_,p,m]),A=jx(p,r),E=u??fP(x,C,S,y),T=f??mP(C,S,y),L=l.useMemo(()=>({variant:m,status:p,size:b,sizePreset:g,titleId:x,descriptionId:C,gridSlots:v}),[C,v,b,g,p,x,m]);return{variant:m,status:p,size:b,sizePreset:g,isCompound:_,gridSlots:v,liveRole:A,ariaLabelledBy:E,ariaDescribedBy:T,contextValue:L}}const Mx=l.forwardRef(function({variant:e="default",status:n,size:r="base",role:o,title:s,description:i,icon:a,action:c,classNames:u,hoverLift:f=!0,className:m="",children:p,onPointerOver:b,onPointerOut:g,"aria-labelledby":h,"aria-describedby":x,...C},_){const{isCompound:S,gridSlots:y,sizePreset:v,liveRole:A,ariaLabelledBy:E,ariaDescribedBy:T,contextValue:L}=hP({variant:e,status:n,size:r,role:o,title:s,description:i,icon:a,action:c,children:p,ariaLabelledByProp:h,ariaDescribedByProp:x}),{setRootRef:w,surfaceClass:I,pointerHandlers:N}=dP({variant:L.variant,status:L.status,hoverLift:f,ref:_,onPointerOver:b,onPointerOut:g});return d.jsx(Ps.Provider,{value:L,children:d.jsx(WO,{classNames:u,children:d.jsx("div",{ref:w,role:A,"aria-labelledby":E,"aria-describedby":T,className:R(Ho(y,v.gridGap),YO(r),I,u==null?void 0:u.root,m),...N,...C,children:S?p:d.jsx(uP,{gridSlots:y,title:s,description:i,icon:a,action:c,children:p})})})})});Mx.displayName="AlertRoot";const gP=Object.assign(Mx,{Indicator:wd,Message:Bx,Content:Px,Title:Id,Description:Rd,Action:Nd}),Fx=l.createContext(null);function bP(){const t=l.useContext(Fx);if(!t)throw new Error("Accordion components must be inside <Accordion>.");return t}function xP(t){const e=l.useRef(null);return Hr(t,e,()=>Se().enableExpandable)}function Xr(...t){return R(...t)}function CP(t,e){return t??(e!=null?String(e):null)}function _P(t){return Xr("flex w-full flex-col text-left","[&>[data-accordion-item]:first-child]:!rounded-t-mid","[&>[data-accordion-item]:last-child]:!rounded-b-mid","[&>[data-accordion-item]:not(:first-child)]:-mt-px",t)}function SP(t){return Xr("relative !rounded-none",t)}function vP(t){return Xr("m-0 font-[inherit] text-[inherit]",t)}function yP(t){return Xr("relative z-[1] flex shrink-0 origin-center self-center",t)}function TP(t){return Xr("text-muted",t)}const AP="shrink-0";function EP({className:t=""}){return d.jsx("svg",{className:Xr(AP,t),width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:d.jsx("path",{d:"m6 9 6 6 6-6"})})}const Gx=l.forwardRef(function({value:e,disabled:n,className:r,children:o,...s},i){const{openId:a,setOpenId:c,getItemId:u,size:f}=bP(),m=u(e),p=a===m;return d.jsx(jn,{ref:i,compound:!0,size:f,"data-accordion-item":!0,disabled:n,open:p,onOpenChange:b=>c(b?m:null),className:SP(r),...s,children:o})});Gx.displayName="Accordion.Item";function Hx({className:t,children:e,...n}){return d.jsx("h3",{className:vP(t),...n,children:e})}Hx.displayName="Accordion.Heading";const zx=l.forwardRef(function({hideChevron:e=!0,className:n,...r},o){return d.jsx(jn.Trigger,{ref:o,hideChevron:e,className:n,...r})});zx.displayName="Accordion.Trigger";function Vx(t){return d.jsx(jn.Message,{...t})}Vx.displayName="Accordion.Message";function Ux(t){return d.jsx(jn.Icon,{...t})}Ux.displayName="Accordion.Icon";function $x(t){return d.jsx(jn.Content,{...t})}$x.displayName="Accordion.Content";function Wx(t){return d.jsx(jn.Title,{...t})}Wx.displayName="Accordion.Title";function Xx(t){return d.jsx(jn.Description,{...t})}Xx.displayName="Accordion.Description";function Yx({className:t,children:e,...n}){const{open:r,hasPanel:o}=Wr(),s=xP(r),i=Sa();return o?d.jsx("span",{ref:s,className:Xr(i&&Os(i),yP(t)),"aria-hidden":!0,...n,children:e??d.jsx(EP,{})}):null}Yx.displayName="Accordion.Indicator";const Kx=l.forwardRef(function(e,n){return d.jsx(jn.Panel,{ref:n,...e})});Kx.displayName="Accordion.Panel";function qx({className:t,...e}){return d.jsx(ee,{as:"div",variant:"base",className:TP(t),...e})}qx.displayName="Accordion.Body";function LP({defaultOpenId:t=null,defaultOpenIndex:e=null,openId:n,onOpenIdChange:r,size:o="base"}){const s=n!==void 0,i=CP(t,e),[a,c]=l.useState(i),u=s?n:a,f=l.useRef(0);f.current=0;const m=l.useCallback(g=>{if(g!=null)return g;const h=String(f.current);return f.current+=1,h},[]),p=l.useCallback(g=>{s||c(g),r==null||r(g)},[s,r]);return{contextValue:l.useMemo(()=>({openId:u,setOpenId:p,getItemId:m,size:o}),[m,u,p,o])}}const Zx=l.forwardRef(function({defaultOpenId:e=null,defaultOpenIndex:n=null,openId:r,onOpenIdChange:o,size:s="base",className:i,children:a,...c},u){const{contextValue:f}=LP({defaultOpenId:e,defaultOpenIndex:n,openId:r,onOpenIdChange:o,size:s});return d.jsx(Fx.Provider,{value:f,children:d.jsx("div",{ref:u,className:_P(i),...c,children:a})})});Zx.displayName="Accordion";const wP=Object.assign(Zx,{Item:Gx,Heading:Hx,Trigger:zx,Message:Vx,Icon:Ux,Content:$x,Title:Wx,Description:Xx,Indicator:Yx,Panel:Kx,Body:qx});function IP(t,e){return cr("flex w-full max-w-full flex-col gap-mid text-left",e==null?void 0:e.root,t)}function RP(t,e){return cr("flex flex-col gap-base",e==null?void 0:e.section,t)}function NP(t,e){return cr("text-base font-w-mid text-foreground",e==null?void 0:e.title,t)}function DP(t,e){return cr("text-base text-muted",e==null?void 0:e.description,t)}function kP(t,e){return cr("flex flex-wrap items-center justify-end gap-small pt-small",e==null?void 0:e.actions,t)}function OP(t,e){return cr("sr-only",e==null?void 0:e.errorSummary,t)}function PP(t,e){return cr("sr-only",e==null?void 0:e.announce,t)}function BP(t,e){return cr(t,e==null?void 0:e.field)}function Qx({className:t="",classNames:e,...n}){const r=Mr();return d.jsx("div",{className:RP(t,{...r,section:e==null?void 0:e.section}),...n})}Qx.displayName="Form.Section";function Jx({className:t="",id:e,...n}){const r=Mr(),o=la();return d.jsx(ee,{as:"h2",variant:"mid",id:e??(o==null?void 0:o.titleId),className:NP(t,r),...n})}Jx.displayName="Form.Title";function eC({className:t="",id:e,...n}){const r=Mr(),o=la();return d.jsx("p",{id:e??(o==null?void 0:o.descriptionId),className:DP(t,r),...n})}eC.displayName="Form.Description";function tC({className:t="",...e}){const n=Mr();return d.jsx("div",{className:kP(t,n),...e})}tC.displayName="Form.Actions";function Dd({className:t="",id:e,...n}){const r=Mr(),o=la(),s=xn(),i=(s==null?void 0:s.getErrors())??{},a=FN(i);if(a.length===0)return null;const c=a.map(([,u])=>u).join(". ");return d.jsx("div",{id:e??(o==null?void 0:o.errorSummaryId),role:"alert","aria-live":"polite",className:OP(t,r),...n,children:c})}Dd.displayName="Form.ErrorSummary";function kd({className:t="",id:e,message:n}){const r=Mr(),o=la();return n?d.jsx("div",{id:e??(o==null?void 0:o.announceId),role:"status","aria-live":"polite","aria-atomic":"true",className:PP(t,r),children:n}):null}kd.displayName="Form.Announce";function nC({name:t,rules:e,className:n="",classNames:r,children:o}){const s=Mr(),i=xn();return l.useEffect(()=>{if(!(!i||!e))return i.registerFieldRules(t,e),()=>i.unregisterFieldRules(t)},[i,t,e]),d.jsx("div",{className:BP(n,{...s,field:r==null?void 0:r.field}),children:o})}nC.displayName="Form.Field";function jP({defaultValues:t,values:e,onValuesChange:n,rules:r,resolver:o,validateMode:s="onSubmit",disabled:i=!1,readOnly:a=!1,size:c,onSubmit:u,onSubmitError:f}){const m=l.useId(),p=l.useId(),b=l.useId(),g=l.useId(),h={titleId:m,descriptionId:p,errorSummaryId:b,announceId:g},x=e!==void 0,[C,_]=l.useState(t??{}),S=x?e:C,[y,v]=l.useState({}),[A,E]=l.useState({}),[T,L]=l.useState(0),[w,I]=l.useState(!1),[N,k]=l.useState(null),j=l.useRef(new Map),P=l.useRef(r??{});P.current=r??{};const G=l.useCallback(te=>{x||_(te),n==null||n(te)},[x,n]),D=l.useCallback(te=>te.split(".").reduce((ae,he)=>{if(!(ae==null||typeof ae!="object"))return ae[he]},S),[S]),O=l.useCallback((te,U,ae)=>{const he=GN(S,te,U);if(G(he),ae!=null&&ae.shouldValidate){const Ne=fl(U,he,P.current[te]);v(Ye=>{const q={...Ye};return Ne?q[te]=Ne:delete q[te],q})}},[G,S]),F=l.useCallback(te=>y[te],[y]),B=l.useCallback(()=>y,[y]),$=l.useCallback(te=>P.current[te],[]),W=l.useCallback((te,U)=>{E(ae=>({...ae,[te]:U}))},[]),M=l.useCallback(te=>!!A[te],[A]),z=l.useCallback((te,U)=>{U?j.current.set(te,U):j.current.delete(te)},[]),H=l.useCallback((te,U)=>{U!=null&&(P.current={...P.current,[te]:U})},[]),oe=l.useCallback(te=>{const U={...P.current};delete U[te],P.current=U},[]),pe=l.useCallback(te=>{const U=fl(D(te),S,P.current[te]);return v(ae=>{const he={...ae};return U?he[te]=U:delete he[te],he}),U},[D,S]),ce=l.useCallback(()=>{const te={};for(const U of Object.keys(P.current)){const ae=fl(D(U),S,P.current[U]);ae&&(te[U]=ae)}return v(te),te},[D,S]),Y=l.useCallback(()=>{cp(j.current,y)},[y]),ne=l.useCallback(()=>k(null),[]),me=l.useMemo(()=>({disabled:i,readOnly:a,size:c,validateMode:s,isSubmitting:w,submitCount:T,getValue:D,setValue:O,getError:F,getErrors:B,getFieldRules:$,setTouched:W,isTouched:M,registerRef:z,registerFieldRules:H,unregisterFieldRules:oe,validateField:pe,validateForm:ce,focusFirstInvalid:Y,announce:N,clearAnnounce:ne}),[N,ne,i,Y,F,B,$,D,w,M,a,z,H,oe,W,O,c,T,pe,ce,s]),re=l.useCallback(async te=>{te.preventDefault(),L(ae=>ae+1),k(null);let U=ce();if(o){const ae=await o(S);ae.errors&&(U={...U,...ae.errors},v(U))}if(dl(U)>0){k(UN(dl(U))),cp(j.current,U),f==null||f(U);return}if(u)try{I(!0),await u(S),k($N())}finally{I(!1)}},[u,f,o,ce,S]),xe=dl(y)>0;return{shellIds:h,bindingValue:me,handleSubmit:re,errors:y,hasErrors:xe,isSubmitting:w,announce:N}}const rC=l.forwardRef(function({children:e,className:n="",classNames:r,defaultValues:o,values:s,onValuesChange:i,rules:a,resolver:c,validateMode:u,readOnly:f,size:m,disabled:p,onSubmit:b,onSubmitError:g,...h},x){const{shellIds:C,bindingValue:_,handleSubmit:S,hasErrors:y,announce:v}=jP({defaultValues:o,values:s,onValuesChange:i,rules:a,resolver:c,validateMode:u,readOnly:f,size:m,disabled:p,onSubmit:b,onSubmitError:g,classNames:r});return d.jsx(KL,{classNames:r,children:d.jsx(Mg.Provider,{value:_,children:d.jsx(qL,{shellIds:C,children:d.jsxs("form",{ref:x,noValidate:!0,onSubmit:S,"aria-labelledby":C.titleId,"aria-describedby":VN({descriptionId:C.descriptionId,errorSummaryId:C.errorSummaryId,hasErrors:y}),className:IP(n,r),...h,children:[d.jsx(kd,{message:v}),d.jsx(Dd,{}),e]})})})})});rC.displayName="Form";const MP=Object.assign(rC,{Section:Qx,Title:Jx,Description:eC,Actions:tC,ErrorSummary:Dd,Announce:kd,Field:nC}),FP={vertical:"flex flex-col gap-plus",horizontal:"flex flex-row flex-wrap items-start gap-x-mid gap-y-plus"},oC=l.forwardRef(function({size:e="small",...n},r){return d.jsx(Tu,{ref:r,size:e,...n})}),Od=l.forwardRef(function({children:e,...n},r){return d.jsx(Ts,{ref:r,...n,children:e})});Od.displayName="OptionGroupLegend";function sC({children:t,className:e,id:n,...r}){return d.jsx(Xe,{as:"span",variant:"small",id:n,className:e,...r,children:t})}function iC({children:t,className:e,...n}){return d.jsx(ca,{className:e,...n,children:t})}const aC=l.forwardRef(function({className:e,orientation:n="vertical",children:r,...o},s){return d.jsx("div",{ref:s,className:R("text-left",FP[n],e),...o,children:r})});function lC({children:t,...e}){return d.jsx(Od,{...e,children:d.jsx(iC,{children:t})})}lC.displayName="CheckboxGroup.Legend";const Pd=l.createContext(null);function GP({value:t,children:e}){return d.jsx(Pd.Provider,{value:t,children:e})}function cC(){const t=l.useContext(Pd);if(!t)throw new Error("CheckboxGroup components must be inside <CheckboxGroup>.");return t}function HP(){return l.useContext(Pd)}function uC({id:t,...e}){const{hintId:n}=cC();return d.jsx(sC,{id:t??n,...e})}uC.displayName="CheckboxGroup.Hint";function dC({id:t,...e}){const{errorId:n}=cC();return d.jsx(Ze,{id:t??n,...e})}dC.displayName="CheckboxGroup.Error";const fC=l.forwardRef(function(e,n){return d.jsx(aC,{ref:n,...e})});fC.displayName="CheckboxGroup.List";function zP({isRequired:t=!1,selection:e="multiple",value:n,defaultValue:r,onValueChange:o,disabled:s=!1,hintId:i,errorId:a}){const c=Au(i),u=Eu(a),f=n!==void 0,[m,p]=l.useState(r),b=e==="single"?f?n==null?void 0:String(n):m:void 0,g=l.useCallback((S,y)=>{if(e!=="single")return;const v=y?S:void 0;f||p(v),o==null||o(v)},[f,o,e]),h=l.useRef(!1);l.useEffect(()=>{h.current=!1},[t,e]);const x=l.useCallback(()=>e!=="single"||!t||h.current?!1:(h.current=!0,!0),[t,e]),C=l.useMemo(()=>({selection:e,disabled:s,isRequired:t,hintId:c,errorId:u,selectedValue:b,selectSingleValue:g,claimRequiredAnchor:x}),[x,s,u,c,t,g,b,e]),_=l.useMemo(()=>({isRequired:t}),[t]);return{contextValue:C,fieldLabelCtx:_,hintId:c,errorId:u,disabled:s}}const mC=l.forwardRef(function(e,n){const{children:r,className:o,size:s,disabled:i=!1,isRequired:a,selection:c,value:u,defaultValue:f,onValueChange:m,hintId:p,errorId:b,...g}=e,{contextValue:h,fieldLabelCtx:x,hintId:C,errorId:_}=zP(e);return d.jsx(GP,{value:h,children:d.jsx(Xt.Provider,{value:x,children:d.jsx(oC,{ref:n,disabled:i,hintId:C,errorId:_,size:s,className:o,...g,children:r})})})});mC.displayName="CheckboxGroup";const VP=Object.assign(mC,{Legend:lC,Label:Ue,Hint:uC,Error:dC,List:fC,Group:Fr,Actions:jo}),Bd=l.createContext(null);function UP({value:t,children:e}){return d.jsx(Bd.Provider,{value:t,children:e})}function pC(){const t=l.useContext(Bd);if(!t)throw new Error("RadioGroup components must be inside <RadioGroup>.");return t}function $P(){return l.useContext(Bd)}function hC({children:t,...e}){return d.jsx(Od,{...e,children:d.jsx(iC,{children:t})})}hC.displayName="RadioGroup.Legend";function gC({id:t,...e}){const{hintId:n}=pC();return d.jsx(sC,{id:t??n,...e})}gC.displayName="RadioGroup.Hint";function bC({id:t,...e}){const{errorId:n}=pC();return d.jsx(Ze,{id:t??n,...e})}bC.displayName="RadioGroup.Error";const xC=l.forwardRef(function(e,n){return d.jsx(aC,{ref:n,...e})});xC.displayName="RadioGroup.List";function WP({isRequired:t=!1,value:e,defaultValue:n,onValueChange:r,disabled:o=!1,name:s,hintId:i,errorId:a}){const c=l.useId(),u=s??`radio-group-${c}`,f=Au(i),m=Eu(a),p=e!==void 0,[b,g]=l.useState(n),h=p?e==null?void 0:String(e):b,x=l.useCallback(v=>{t&&v===void 0||(p||g(v),r==null||r(v))},[p,t,r]),C=l.useRef(!1);l.useEffect(()=>{C.current=!1},[t,u]);const _=l.useCallback(()=>!t||C.current?!1:(C.current=!0,!0),[t]),S=l.useMemo(()=>({name:u,disabled:o,isRequired:t,hintId:f,errorId:m,selectedValue:h,selectValue:x,claimRequiredAnchor:_}),[_,o,m,u,f,t,x,h]),y=l.useMemo(()=>({isRequired:t}),[t]);return{contextValue:S,fieldLabelCtx:y,hintId:f,errorId:m,disabled:o}}const CC=l.forwardRef(function(e,n){const{children:r,className:o,size:s,disabled:i=!1,name:a,isRequired:c,value:u,defaultValue:f,onValueChange:m,hintId:p,errorId:b,...g}=e,{contextValue:h,fieldLabelCtx:x,hintId:C,errorId:_}=WP(e);return d.jsx(UP,{value:h,children:d.jsx(Xt.Provider,{value:x,children:d.jsx(oC,{ref:n,disabled:i,hintId:C,errorId:_,size:s,className:o,...g,children:r})})})});CC.displayName="RadioGroup";const XP=Object.assign(CC,{Legend:hC,Label:Ue,Hint:gC,Error:bC,List:xC,Group:Fr,Actions:jo}),_C=l.forwardRef(function({children:e,className:n="",buttonSize:r,groupSegment:o,...s},i){const a=Po(),c=On(),u=r??(c==null?void 0:c.buttonSize)??"base",f=a!=null&&a.segmented?void 0:o??(c==null?void 0:c.segment),m=c==null?void 0:c.variant;return d.jsx("span",{ref:i,...s,className:Nk({groupSegment:f,groupVariant:m,buttonSize:u,className:n}),children:d.jsx(ee,{variant:Lk[u],inheritColor:!0,as:"span",className:Dk,children:e})})});_C.displayName="ButtonGroupText";function YP({children:t,orientation:e="horizontal",segmented:n=!1,buttonSize:r="base",variant:o="default"}){const s=l.useMemo(()=>fd(t),[t]),i=l.useMemo(()=>Ek(s),[s]),a=l.useMemo(()=>({segmented:n}),[n]);return{flat:s,segmentCount:i,layoutValue:a,orientation:e,segmented:n,buttonSize:r,variant:o}}function KP({orientation:t}){return d.jsx("span",{"aria-hidden":!0,className:gx(t)})}const SC=l.forwardRef(function({children:e,className:n="",orientation:r="horizontal",segmented:o=!1,buttonSize:s="base",variant:i="default",...a},c){const{flat:u,segmentCount:f,layoutValue:m}=YP({children:e,orientation:r,segmented:o,buttonSize:s,variant:i});let p=-1;return d.jsx(YL,{value:m,children:d.jsx("div",{ref:c,role:"group",className:hx({orientation:r,segmented:o,variant:i,className:n}),...a,children:u.map((b,g)=>{if(!dx(b))return d.jsx(l.Fragment,{children:b},b.key??`bg-wrap-${g}`);if(o)return d.jsx(l.Fragment,{children:b},b.key??`bg-item-${g}`);p+=1;const h=fx(p,f),x=mx(r,h);return d.jsxs(l.Fragment,{children:[d.jsx(Bg,{segment:x,buttonSize:s,variant:i,children:b}),i!=="gloss"&&h!=="last"&&h!=="only"?d.jsx(KP,{orientation:r}):null]},b.key??`bg-seg-${g}`)})})})});SC.displayName="ButtonGroup";const qP=SC;function ZP(t){return Array.from(t.querySelectorAll("[data-toggle-button-value]:not([disabled])")).filter(e=>e instanceof HTMLButtonElement)}function QP(t,e,n,r){if(t)return n!=null?n===e?0:-1:e===r?0:-1}function JP(t,e,n,r){if(r===0)return null;const o=e==="horizontal";switch(t){case"ArrowRight":return o?n<0?0:(n+1)%r:null;case"ArrowLeft":return o?n<0?r-1:(n-1+r)%r:null;case"ArrowDown":return o?null:n<0?0:(n+1)%r;case"ArrowUp":return o?null:n<0?r-1:(n-1+r)%r;default:return null}}function e1(t){return t?-1:0}function t1({disabled:t,isSingle:e,orientation:n,onKeyDown:r,select:o}){return s=>{if(r==null||r(s),s.defaultPrevented||t||!e)return;const i=ZP(s.currentTarget);if(i.length===0)return;const a=i.findIndex(m=>m===document.activeElement),c=JP(s.key,n,a,i.length);if(c==null)return;s.preventDefault();const u=i[c];u.focus();const f=u.dataset.toggleButtonValue;f&&o(f)}}const vC="data-selection-fill",jd="data-selection-fill-ready";function yC(t,e){V(t),t.setAttribute(jd,""),t.dataset.pressed=e?"true":"false",X.set(t,{scale:e?1:0,autoAlpha:e?1:0})}function n1(t,e){return n=>{t.current=n,n&&!n.hasAttribute(jd)&&yC(n,e)}}function _p(t,e,n=de()||!Se().enableToggleButtonFill){if(V(t),t.setAttribute(jd,""),t.dataset.pressed=e?"true":"false",n){X.set(t,{scale:e?1:0,autoAlpha:e?1:0});return}e?X.fromTo(t,{scale:0,autoAlpha:0},{scale:1,autoAlpha:1,...Ri(),overwrite:"auto"}):X.to(t,{scale:0,autoAlpha:0,...Ri(),overwrite:"auto"})}function TC(t,e,n){const r=n==null?void 0:n.deferFillFromPressRef,o=n==null?void 0:n.onFillStart,s=l.useRef(t),i=l.useRef(void 0),a=de(),c=l.useMemo(()=>n1(e,s.current),[e]),u=l.useCallback(f=>{const m=e.current;m&&i.current!==f&&(i.current=f,o==null||o(f),_p(m,f,a))},[e,o,a]);return l.useLayoutEffect(()=>{const f=e.current;if(f){if(i.current===void 0){i.current=t,yC(f,t);return}i.current!==t&&(r!=null&&r.current||(i.current=t,o==null||o(t),_p(f,t,a)))}},[r,o,t,e,a]),{animateTo:u,bindFillRef:c}}function r1({animated:t,disabled:e,variant:n,groupSegment:r,forwardedRef:o,pressed:s,onFillStart:i,onPointerEnter:a,onPointerLeave:c,onPointerDown:u}){const f=l.useRef(null),m=l.useRef(!1),p=l.useRef(null),b=l.useRef(!1),{animateTo:g,bindFillRef:h}=TC(s,f,{deferFillFromPressRef:m,onFillStart:i}),x=l.useCallback(()=>{m.current=!1,p.current=null,b.current=!1},[]),C=l.useCallback(()=>{const T=p.current;T!==null&&(p.current=null,m.current=!1,g(T))},[g]),_=l.useCallback(()=>{b.current=!0,C()},[C]),S=t&&!e&&!de(),y=aa({isGloss:n==="gloss",animated:t,enabled:!e,hasHoverShadow:n!=="gloss",useContentRef:!!r,forwardedRef:o,onPointerEnter:a,onPointerLeave:c,onPointerDown:u,onPressReleaseStart:S?_:void 0}),v=l.useCallback(T=>{S&&(m.current=!0,b.current=!1,p.current=!s),y.handlePointerDown(T)},[y,s,S]),A=l.useCallback(T=>{y.handlePointerLeave(T),x()},[x,y]),E=l.useCallback(T=>{if(!S){g(T);return}p.current=T,b.current&&C()},[g,C,S]);return{setRefs:y.setRefs,contentMotionRef:y.contentMotionRef,handlePointerEnter:y.handlePointerEnter,handlePointerLeave:A,handlePointerDown:v,bindFillRef:h,queueFillOnClick:E}}const AC=new Set(["ToggleButtonContent","ToggleButtonFill","ToggleButtonLabel","ToggleButtonIcon","ToggleButtonTrailing","ToggleButtonText"]);function EC(t,e){let n=!1;const r=o=>{if(!n)for(const s of l.Children.toArray(o)){if(!l.isValidElement(s))continue;const i=s.type.displayName;if(e(i)){n=!0;return}r(s.props.children)}};return r(t),n}function o1(t){return EC(t,e=>e!=null&&AC.has(e))}function Sp(t,e){return EC(t,n=>n===e)}function s1(t){if(t==null||t===!1)return!1;if(typeof t=="string"||typeof t=="number")return!0;const e=l.Children.toArray(t).filter(o=>o!=null);if(e.length!==1)return!1;const n=e[0];if(typeof n=="string"||typeof n=="number")return!0;if(!l.isValidElement(n))return!1;const r=n.type.displayName;return r==null||!AC.has(r)}function Jn(...t){return R(...t)}function i1(t,e){const n=t!==void 0,[r,o]=l.useState(!!e),s=n?!!t:r,i=l.useCallback(a=>{n||o(a)},[n]);return[s,i,n]}const LC=l.createContext(null),wC=l.createContext(null),Zl=l.createContext({});function a1(){return l.useContext(LC)}function l1({classNames:t,children:e}){const n=l.useContext(Zl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Zl.Provider,{value:r,children:e})}function Uo(){return l.useContext(Zl)}function js(){return l.useContext(wC)}function c1({value:t,children:e}){return d.jsx(wC.Provider,{value:t,children:e})}const u1={default:"border-token bg-surface text-foreground",outline:"bg-transparent border-token text-foreground",ghost:"bg-transparent border-token border-transparent text-foreground",gloss:"border-0 bg-transparent text-foreground"},d1="group/toggle relative inline-flex origin-center items-center justify-center overflow-hidden outline-none text-foreground focus-ring",f1="gloss-btn",m1="bg-transparent",p1="cursor-not-allowed opacity-50",h1="cursor-pointer",g1="pointer-events-none absolute -inset-px z-0 origin-center motion-reduce:transition-none",b1="relative z-[1] inline-flex w-full min-w-0 items-center justify-center gap-xsmall",x1="origin-center will-change-transform",C1="inline-flex shrink-0 items-center justify-center [&_svg]:size-full",_1="inline-flex w-full min-w-0 items-center gap-xsmall",S1="min-w-0 shrink";function v1({slotClass:t,className:e}){return Jn(_1,t,e)}function y1(t,e){return Jn(S1,t,e)}function T1(t){return u1[t]}function A1({fillColor:t,pressed:e,roundingClass:n,slotClass:r}){return Jn(g1,t,Io,e?`group-hover/toggle:${t}/80`:"group-hover/toggle:bg-default-hover",n,r)}function IC(t,e){return Jn(C1,le[t].icon,e)}function E1({variant:t,pressed:e,disabled:n,size:r,groupSegment:o,slotClass:s,className:i}){const a=t==="gloss",c=o?hn(o):"rounded-base",u=o?$r(o):"";return Jn(d1,a?Jn(f1,!o&&nn):Jn(!o&&ir),!a&&!e&&!n&&et(),!a&&T1(t),e&&m1,n?p1:h1,mu(r,!0),c,u,s,i)}function L1({groupSegment:t,slotClass:e}){return Jn(b1,t&&x1,e)}function w1(t){return t?hn(t):"rounded-base"}const I1={small:"small",base:"base",mid:"mid",large:"mid"},Md=l.forwardRef(function({className:e="",...n},r){const o=js(),s=Uo();return o?d.jsx("span",{ref:r??o.bindFillRef,"aria-hidden":!0,className:A1({fillColor:o.fillColor,pressed:o.pressed,roundingClass:o.roundingClass,slotClass:R(s.fill,e)}),...n,[vC]:"","data-pressed":o.pressed?"true":"false"}):null});Md.displayName="ToggleButtonFill";const Gi=l.forwardRef(function({className:e="",children:n,...r},o){const s=js(),i=Uo();return d.jsx("span",{ref:o??(s==null?void 0:s.contentMotionRef),className:L1({groupSegment:s==null?void 0:s.groupSegment,slotClass:R(i.content,e)}),...r,children:n})});Gi.displayName="ToggleButtonContent";const RC=l.forwardRef(function({className:e="",children:n,...r},o){const s=Uo();return d.jsx("span",{ref:o,className:v1({slotClass:s.label,className:e}),...r,children:n})});RC.displayName="ToggleButtonLabel";function Fd({className:t="",children:e,...n}){const r=js(),o=Uo(),s=(r==null?void 0:r.size)??"base";return d.jsx("span",{className:IC(s,R(o.leftIcon,t)),"aria-hidden":!0,...n,children:e})}Fd.displayName="ToggleButtonIcon";function Gd({className:t="",children:e,...n}){const r=js(),o=Uo(),s=(r==null?void 0:r.size)??"base";return d.jsx("span",{className:IC(s,R(o.rightIcon,t)),"aria-hidden":!0,...n,children:e})}Gd.displayName="ToggleButtonTrailing";function Hd({className:t="",children:e,...n}){const r=js(),o=Uo(),s=(r==null?void 0:r.size)??"base";return d.jsx(ee,{variant:I1[s],as:"span",inheritColor:!0,className:y1(o.text,t),...n,children:e})}Hd.displayName="ToggleButtonText";function R1({leftIcon:t,rightIcon:e,children:n}){const r=s1(n);return d.jsxs(d.Fragment,{children:[t!=null?d.jsx(Fd,{children:t}):null,r?d.jsx(Hd,{children:n}):n,e!=null?d.jsx(Gd,{children:e}):null]})}function N1({inGroup:t,isSingleGroup:e}){return t&&e?"radio":void 0}function D1({inGroup:t,isSingleGroup:e,pressed:n}){return!t||!e?n:void 0}function k1({inGroup:t,isSingleGroup:e,pressed:n}){return t&&e?n:void 0}function O1({value:t,groupSegment:e,pressed:n,defaultPressed:r=!1,onPressedChange:o,onFillStart:s,variant:i,fillColor:a="bg-primary-tint",size:c,animated:u=!0,disabled:f=!1,className:m,classNames:p,children:b,onClick:g}){const h=a1(),x=On(),C=e??(x==null?void 0:x.segment),_=h!=null&&t!=null,S=(h==null?void 0:h.type)==="single",y=c??(h==null?void 0:h.size)??(x==null?void 0:x.buttonSize)??"base",v=i??(h==null?void 0:h.variant)??"default",A=f||!!(h!=null&&h.disabled),[E,T]=i1(_?void 0:n,_?!1:r),L=_?h.isSelected(t):E,w=_?n!==void 0?!!n:L:n!==void 0?!!n:E,I=w1(C),N=o1(b),k=N?void 0:m,j=E1({variant:v,pressed:w,disabled:A,size:y,groupSegment:C,slotClass:p==null?void 0:p.root,className:m}),P=l.useCallback((G,D)=>{if(g==null||g(G),G.defaultPrevented||A)return;if(_&&t!=null){h.select(t);return}const O=!w;D(O),T(O),o==null||o(O)},[A,h,_,t,g,o,w,T]);return{itemValue:t,groupCtx:h,groupSegment:C,inGroup:_,isSingleGroup:S,size:y,variant:v,disabled:A,pressed:w,onFillStart:s,fillColor:a,animated:u,classNames:p,roundingClass:I,buttonClass:j,role:N1({inGroup:_,isSingleGroup:S}),ariaPressed:D1({inGroup:_,isSingleGroup:S,pressed:w}),ariaChecked:k1({inGroup:_,isSingleGroup:S,pressed:w}),tabIndex:_&&S?h.tabIndexFor(t):void 0,isCompound:N,contentLayoutClass:k,children:b,handleClick:P}}const NC=l.forwardRef(function({className:e,classNames:n,value:r,groupSegment:o,pressed:s,defaultPressed:i,onPressedChange:a,onFillStart:c,variant:u,fillColor:f,size:m,type:p="button",leftIcon:b,rightIcon:g,animated:h,disabled:x,children:C,onClick:_,onPointerDown:S,onPointerEnter:y,onPointerLeave:v,...A},E){var k;const T=O1({value:r,groupSegment:o,pressed:s,defaultPressed:i,onPressedChange:a,onFillStart:c,variant:u,fillColor:f,size:m,animated:h,disabled:x,className:e,classNames:n,children:C,onClick:_}),L=r1({animated:T.animated,disabled:T.disabled,variant:T.variant,groupSegment:T.groupSegment,pressed:T.pressed,onFillStart:T.onFillStart,forwardedRef:E,onPointerEnter:y,onPointerLeave:v,onPointerDown:S}),w={size:T.size,groupSegment:T.groupSegment,contentMotionRef:L.contentMotionRef,bindFillRef:L.bindFillRef,fillColor:T.fillColor,pressed:T.pressed,roundingClass:T.roundingClass},I=Sp(C,"ToggleButtonFill"),N=Sp(C,"ToggleButtonContent");return d.jsx(c1,{value:w,children:d.jsx(l1,{classNames:T.classNames,children:d.jsxs("button",{ref:L.setRefs,type:p,disabled:T.disabled,"data-toggle-button-value":T.itemValue,role:T.role,"aria-pressed":T.ariaPressed,"aria-checked":T.ariaChecked,tabIndex:T.tabIndex,className:T.buttonClass,onPointerEnter:L.handlePointerEnter,onPointerLeave:L.handlePointerLeave,onPointerDown:L.handlePointerDown,onClick:j=>T.handleClick(j,L.queueFillOnClick),...A,children:[I?null:d.jsx(Md,{}),T.isCompound?N?C:d.jsx(Gi,{children:C}):d.jsx(Gi,{className:R((k=T.classNames)==null?void 0:k.content,T.contentLayoutClass),children:d.jsx(R1,{leftIcon:b,rightIcon:g,children:T.children})})]})})})});NC.displayName="ToggleButtonRoot";const DC=Object.assign(NC,{Content:Gi,Fill:Md,Label:RC,Icon:Fd,Trailing:Gd,Text:Hd});function zd(t){return t.type===DC}function P1(t){return t.reduce((e,n)=>e+(zd(n)?1:0),0)}function B1(t){return t.reduce((e,n)=>{if(!zd(n))return e;const r=n.props.value;return typeof r=="string"&&e.push(r),e},[])}function vp(t){return t==null?[]:Array.isArray(t)?t:[t]}function yp(t){if(t!=null)return Array.isArray(t)?t[0]:t}function j1(t,e,n,r){return t==="single"?n===e:r.includes(e)}function M1(t,e,n,r){return t==="single"?n===e?null:{kind:"single",value:e}:{kind:"multiple",value:r.includes(e)?r.filter(s=>s!==e):[...r,e]}}function F1({value:t,children:e}){return d.jsx(LC.Provider,{value:t,children:e})}function G1({orientation:t,separated:e,variant:n,className:r}){return hx({orientation:t,segmented:e,variant:n,className:r})}function H1(t){return gx(t)}function z1({orientation:t}){return d.jsx("span",{"aria-hidden":!0,className:H1(t)})}function V1({children:t,type:e="multiple",disabled:n=!1,size:r="base",variant:o="default",value:s,defaultValue:i,onValueChange:a,onKeyDown:c,orientation:u="horizontal"}){const f=e==="single",m=s!==void 0,[p,b]=l.useState(()=>yp(i)),[g,h]=l.useState(()=>vp(i)),x=f?m?yp(s):p:void 0,C=l.useMemo(()=>f?[]:m?vp(s):g,[g,m,f,s]),_=l.useRef(C);_.current=C;const S=l.useCallback(I=>j1(e,I,x,C),[C,x,e]),y=l.useCallback(I=>{if(n)return;if(f){const k=M1(e,I,x,C);if(k==null||k.kind!=="single")return;m||b(k.value),a==null||a(k.value);return}const N=Ou(_.current,I,!0);_.current=N,m||h(N),a==null||a(N)},[n,m,f,C,a,x,e]),v=l.useMemo(()=>fd(t),[t]),A=l.useMemo(()=>P1(v),[v]),E=l.useMemo(()=>B1(v)[0],[v]),T=l.useCallback(I=>QP(f,I,x,E),[E,f,x]),L=l.useMemo(()=>({type:e,disabled:n,size:r,variant:o,isSelected:S,select:y,tabIndexFor:T}),[n,S,y,r,T,e,o]),w=l.useMemo(()=>t1({disabled:n,isSingle:f,orientation:u,onKeyDown:c,select:y}),[n,f,c,u,y]);return{flat:v,segmentCount:A,contextValue:L,handleKeyDown:w,isSingle:f}}const kC=l.forwardRef(function(e,n){const{children:r,className:o="",orientation:s="horizontal",separated:i=!1,disabled:a=!1,size:c="base",variant:u="default",type:f="multiple",value:m,defaultValue:p,onValueChange:b,onKeyDown:g,...h}=e,{flat:x,segmentCount:C,contextValue:_,handleKeyDown:S,isSingle:y}=V1(e);let v=-1;return d.jsx(F1,{value:_,children:d.jsx("div",{ref:n,role:"toolbar",tabIndex:e1(a),"aria-orientation":s,"aria-disabled":a||void 0,className:G1({orientation:s,separated:i,variant:u,className:o}),...y?{onKeyDown:S}:{},...h,children:x.map((A,E)=>{if(!zd(A))return d.jsx(l.Fragment,{children:A},A.key??`tbg-wrap-${E}`);if(i)return d.jsx(l.Fragment,{children:A},A.key??`tbg-item-${E}`);v+=1;const T=fx(v,C),L=mx(s,T);return d.jsxs(l.Fragment,{children:[d.jsx(Bg,{segment:L,buttonSize:c,children:A}),u!=="gloss"&&T!=="last"&&T!=="only"?d.jsx(z1,{orientation:s}):null]},A.key??`tbg-seg-${E}`)})})})});kC.displayName="ToggleButtonGroup";const U1=kC,OC=l.createContext(null);function $1({value:t,children:e}){return d.jsx(OC.Provider,{value:t,children:e})}function Mn(){const t=l.useContext(OC);if(!t)throw new Error("AlertDialog.* components must be used inside <AlertDialog>.");return t}const Ql=l.createContext({});function W1({classNames:t,children:e}){const n=l.useContext(Ql),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Ql.Provider,{value:r,children:e})}function on(){return l.useContext(Ql)}const Vd=l.createContext(null);function X1({value:t,children:e}){return d.jsx(Vd.Provider,{value:t,children:e})}function Y1(t){const e=l.useContext(Vd);if(!e)throw new Error(`${t} must be used inside <AlertDialog.Header>.`);return e}function Ud(){return l.useContext(Vd)}function st(...t){return R(...t)}function K1(t){return"primary"}function q1(t){switch(t){case"danger":case"success":case"info":case"warning":return t;default:return"default"}}function Ta(t,e){let n=!1;const r=o=>{if(!n)for(const s of l.Children.toArray(o)){if(!l.isValidElement(s))continue;const i=s.type.displayName;if(e(i)){n=!0;return}r(s.props.children)}};return r(t),n}function Z1(t){return Ta(t,e=>e==="AlertDialogTitle")}function Q1(t){return Ta(t,e=>e==="AlertDialogDescription")}function PC(t){return Ta(t,e=>e==="AlertDialogIndicator")}function BC(t){return Ta(t,e=>e==="AlertDialogClose")}function jC(t,e){return Ed(t,e)}function MC(t,e){return Ld(t,e)}function J1(t,e,n,r){return r?!0:n===null?!1:n!==void 0?!0:jC(t,e)&&MC(t,e)!==null}function eB(t,e,n,r,o){const s=PC(o),i=BC(o);return{hasIndicator:J1(t,e,n,s),hasTitle:Z1(o),hasDescription:Q1(o),hasAction:!1,hasClose:i||r}}function FC(t,e){return l.Children.map(t,n=>{if(!l.isValidElement(n))return n;if(n.type===yo){const r=n.props;return l.cloneElement(n,{size:r.size??e})}if(n.type===l.Fragment){const r=n;return l.cloneElement(r,{key:r.key??void 0},FC(r.props.children,e))}return n})}function tB({open:t,variant:e}){const[n,r]=l.useState(!1),o=l.useRef(null),s=l.useRef(null),i=l.useRef(null),a=l.useRef(null),c=l.useMemo(()=>Mt(a,e==="gloss"),[e]);return l.useLayoutEffect(()=>{t&&r(!0)},[t]),l.useEffect(()=>{if(!n)return;const u=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=u}},[n]),l.useLayoutEffect(()=>{if(t||!n)return;const u=s.current,f=i.current;let m=!1;const p=()=>{m||r(!1)};if(!u||!f||$t()){p();return}V(u,f);const b={...ve(),overwrite:"auto"},g=Db({overlay:u,panel:f,vars:b,onComplete:p});return()=>{m=!0,g.kill(),V(u,f)}},[t,n]),l.useLayoutEffect(()=>{if(!t||!n)return;const u=o.current;u&&!u.open&&u.showModal();const f=s.current,m=i.current;if(!(!f||!m)){if($t()){Mu(f,m,{focusPanel:!0});return}Nb({overlay:f,panel:m,vars:{...ve(),overwrite:"auto"}}),m.focus()}},[t,n]),{mounted:n,dialogRef:o,overlayRef:s,panelRef:i,bindGlossPanelRef:c}}function ht(...t){return R(...t)}function GC(t,e){return l.Children.map(t,n=>{if(!l.isValidElement(n))return n;if(n.type===yo){const r=n.props;return l.cloneElement(n,{size:r.size??e})}if(n.type===l.Fragment){const r=n;return l.cloneElement(r,{key:r.key??void 0},GC(r.props.children,e))}return n})}const nB="flex min-h-0 flex-1 flex-col gap-mid text-left",rB={headerPadding:"px-plus pt-base",bodyPadding:"px-plus py-small",footerPadding:"px-plus pb-base"},ml={headerPadding:"px-mid pt-plus",bodyPadding:"px-mid py-small",footerPadding:"px-mid pb-plus"},oB={small:{panelMax:"max-w-component-small",maxHeight:"max-h-[min(85dvh,26rem)]",headerGap:"gap-base",...rB,headingBlockGap:"flex min-w-0 flex-1 flex-col gap-xsmall text-left",titleVariant:"base",descVariant:"small",descClassName:"text-muted",bodyVariant:"small"},base:{panelMax:"max-w-component-base",maxHeight:"max-h-[min(90dvh,36rem)]",headerGap:"gap-plus",...ml,headingBlockGap:"flex min-w-0 flex-1 flex-col gap-base text-left",titleVariant:"mid",descVariant:"base",descClassName:"text-muted",bodyVariant:"base"},mid:{panelMax:"max-w-component-mid",maxHeight:"max-h-[min(90dvh,40rem)]",headerGap:"gap-plus",...ml,headingBlockGap:"flex min-w-0 flex-1 flex-col gap-base text-left",titleVariant:"mid",descVariant:"base",descClassName:"text-muted",bodyVariant:"base"},large:{panelMax:"max-w-component-large",maxHeight:"max-h-[min(90dvh,44rem)]",headerGap:"gap-plus",...ml,headingBlockGap:"flex min-w-0 flex-1 flex-col gap-base text-left",titleVariant:"mid",descVariant:"base",descClassName:"text-muted",bodyVariant:"mid"}},sB={small:"small",base:"base",mid:"base",large:"base"},iB="fixed inset-0 z-[100] m-0 flex h-full w-full max-h-none max-w-none items-center justify-center border-0 bg-transparent p-mid open:flex [&::backdrop]:bg-transparent",aB="bg-[color-mix(in_oklab,var(--color-foreground)_14%,transparent)] backdrop-blur-[14px] backdrop-saturate-150 motion-reduce:backdrop-blur-none",lB="bg-[color-mix(in_oklab,black_58%,transparent)]",cB="relative z-10 w-full outline-none",uB="flex min-h-0 flex-col overflow-hidden rounded-mid border-token bg-surface text-left text-foreground shadow-token-large",dB="gloss-panel gloss-deep flex min-h-0 w-full flex-col rounded-mid text-foreground",fB="flex shrink-0 items-start",mB="min-w-0",pB="min-w-0",hB="min-h-0 flex-1 overflow-y-auto py-small",gB="flex shrink-0 flex-wrap items-center justify-end gap-base",bB="shrink-0",HC="gloss-content";function zC(){return Rb()}function VC(t,e){return ht("absolute inset-0",t?aB:lB,e)}function xB({variant:t,sizePreset:e,className:n,slotClass:r}){const o=t==="gloss";return ht(cB,e.panelMax,!o&&uB,!o&&e.maxHeight,n,r)}function CB(t,e){return ht(dB,t,e)}function UC(t,e=!1){return ht(nB,e&&HC,t)}function _B(t,e){return ht(hB,t,e)}function SB(t){return sB[t]}const vB="flex min-h-0 flex-1 flex-col gap-mid text-left",yB={headerPadding:"px-plus pt-base",bodyPadding:"px-plus py-small",footerPadding:"px-plus pb-base"},pl={headerPadding:"px-mid pt-plus",bodyPadding:"px-mid py-small",footerPadding:"px-mid pb-plus"},TB={small:{panelMax:"max-w-component-small",maxHeight:"max-h-[min(85dvh,26rem)]",headerGap:"gap-x-base",...yB,headingBlockGap:"flex min-w-0 flex-col gap-xsmall",iconClass:"icon-mid",titleVariant:"base",descVariant:"small",descClassName:"text-muted",bodyVariant:"small"},base:{panelMax:"max-w-component-base",maxHeight:"max-h-[min(90dvh,36rem)]",headerGap:"gap-x-plus gap-y-xsmall",...pl,headingBlockGap:"flex min-w-0 flex-col gap-base",iconClass:"icon-large",titleVariant:"mid",descVariant:"base",descClassName:"text-muted",bodyVariant:"base"},mid:{panelMax:"max-w-component-mid",maxHeight:"max-h-[min(90dvh,40rem)]",headerGap:"gap-x-plus gap-y-small",...pl,headingBlockGap:"flex min-w-0 flex-col gap-base",iconClass:"icon-large",titleVariant:"mid",descVariant:"base",descClassName:"text-muted",bodyVariant:"base"},large:{panelMax:"max-w-component-large",maxHeight:"max-h-[min(90dvh,44rem)]",headerGap:"gap-x-plus gap-y-small",...pl,headingBlockGap:"flex min-w-0 flex-col gap-base",iconClass:"icon-large",titleVariant:"mid",descVariant:"base",descClassName:"text-muted",bodyVariant:"mid"}},AB={small:"small",base:"base",mid:"base",large:"base"},EB="fixed inset-0 z-[100] m-0 flex h-full w-full max-h-none max-w-none items-center justify-center border-0 bg-transparent p-mid open:flex [&::backdrop]:bg-transparent",LB="relative z-10 w-full outline-none",wB="flex min-h-0 flex-col overflow-hidden rounded-mid text-left",IB="gloss-panel gloss-deep flex min-h-0 w-full flex-col rounded-mid text-left text-foreground",RB="gloss-content",NB="shrink-0",DB="shrink-0 [&_svg]:block",kB="shrink-0",OB="contents",PB="font-w-mid",BB="min-h-0 flex-1 overflow-y-auto py-small",jB="flex shrink-0 flex-wrap items-center justify-end gap-base";function MB(t){return R(Dx(t,"default"),"shadow-token-large")}function FB(t,e){return VC(t,e)}function GB(){return zC()}function HB(t,e){return st(BB,t,"text-left",e)}function $C(t){return st(vB,t)}function zB({variant:t,sizePreset:e,className:n,slotClass:r}){const o=t==="gloss";return st(LB,e.panelMax,!o&&wB,!o&&e.maxHeight,!o&&MB(t),n,r)}function VB(t,e){return st(IB,t,e)}function UB(t){return kx(t)}function WC(t){return AB[t]}function $d({className:t,...e}){const n=on();return d.jsx("div",{className:$C(st(n.content,t)),...e})}$d.displayName="AlertDialogContent";const Wd=l.forwardRef(function({className:e,onClick:n,...r},o){const{onOpenChange:s}=Mn(),i=Ud(),a=on();return d.jsx(Go,{ref:o,variant:"secondary",className:st(NB,i&&vx(i.gridSlots),a.close,e),onClick:c=>{n==null||n(c),c.defaultPrevented||s(!1)},...r})});Wd.displayName="AlertDialogClose";function Xd({className:t,children:e,...n}){const{variant:r,status:o,sizePreset:s,gridSlots:i,headerIcon:a}=Y1("AlertDialog.Indicator"),c=on();if(e===null)return null;const u=MC(r,o),f=e!==void 0?e:a!==void 0?a:jC(r,o)&&u!==null?d.jsx(u,{"aria-hidden":!0,className:s.iconClass}):null;return f===null?null:d.jsx("span",{className:st(DB,UB(o),Rr(i),c.indicator,t),...n,children:f})}Xd.displayName="AlertDialogIndicator";function XC({icon:t,showClose:e=!0,className:n,children:r,...o}){const{variant:s,status:i,sizePreset:a}=Mn(),c=on(),u=PC(r),f=BC(r),m=l.useMemo(()=>eB(s,i,t,e,r),[r,t,e,i,s]),p=l.useMemo(()=>({variant:s,status:i,sizePreset:a,gridSlots:m,headerIcon:t}),[m,t,a,i,s]),b=m.hasIndicator&&!u,g=e&&!f;return d.jsx(X1,{value:p,children:d.jsxs("div",{className:st(kB,a.headerPadding,Ho(m,a.headerGap),c.header,n),...o,children:[b?d.jsx(Xd,{}):null,r,g?d.jsx(Wd,{}):null]})})}XC.displayName="AlertDialogHeader";const YC=l.forwardRef(function({className:e,id:n,...r},o){const{titleId:s,sizePreset:i}=Mn(),a=Ud(),c=on();return d.jsx(ee,{ref:o,as:"h2",variant:i.titleVariant,id:n??s,className:st(PB,a&&zo(a.gridSlots),c.title,e),...r})});YC.displayName="AlertDialogTitle";function KC({className:t,id:e,...n}){const{descriptionId:r,setHasDescription:o,sizePreset:s}=Mn(),i=Ud(),a=on();return l.useLayoutEffect(()=>(o(!0),()=>o(!1)),[o]),d.jsx(ee,{as:"p",variant:s.descVariant,id:e??r,className:st(s.descClassName,i&&ks(i.gridSlots),a.description,t),...n})}KC.displayName="AlertDialogDescription";function qC({className:t,...e}){const n=on();return d.jsx("div",{className:st(OB,n.headingBlock,t),...e})}qC.displayName="AlertDialogHeadingBlock";function ZC({className:t,children:e,...n}){const{sizePreset:r}=Mn(),o=on();return d.jsx("div",{className:HB(r.bodyPadding,st(o.body,t)),...n,children:d.jsx(ee,{variant:r.bodyVariant,as:"div",children:e})})}ZC.displayName="AlertDialogBody";function QC({className:t,children:e,...n}){const{footerButtonSize:r,sizePreset:o}=Mn(),s=on(),i=l.useMemo(()=>FC(e,r),[e,r]);return d.jsx("div",{className:st(jB,o.footerPadding,s.footer,t),...n,children:i})}QC.displayName="AlertDialogFooter";const JC=l.forwardRef(function({children:e,asChild:n,className:r,onClick:o,onPointerDown:s,...i},a){const{open:c,onOpenChange:u}=Mn(),f=on(),m=l.useRef(null),p=Is(),b=l.useCallback(x=>{m.current=x,dt(a,x)},[a]),g=l.useCallback(x=>{c||p.current||x.button!==0||(x.preventDefault(),ws({triggerRef:m,openingRef:p,setOpen:()=>u(!0)}))},[c,p,u]),h=l.useCallback(x=>{o==null||o(x),!x.defaultPrevented&&!c&&!p.current&&u(!0)},[o,c,p,u]);if(n&&l.isValidElement(e)){const x=l.Children.count(e)===1?e:null;if(x){const C=x;return l.cloneElement(C,{ref:(_=>{m.current=_}),className:st(f.trigger,C.props.className,r),onPointerDown:_=>{var S,y;g(_),(y=(S=C.props).onPointerDown)==null||y.call(S,_),s==null||s(_)},onClick:_=>{var S,y;(y=(S=C.props).onClick)==null||y.call(S,_),h(_)},"aria-haspopup":"dialog","aria-expanded":c})}}return d.jsx("button",{type:"button",ref:b,"aria-haspopup":"dialog","aria-expanded":c,className:st(f.trigger,r),onPointerDown:x=>{s==null||s(x),g(x)},onClick:h,...i,children:e})});JC.displayName="AlertDialog.Trigger";function e_({className:t,themeAnchor:e,children:n}){const{open:r,titleId:o,descriptionId:s,hasDescription:i,variant:a,sizePreset:c}=Mn(),u=tB({open:r,variant:a}),f=ju(r,e??null),m=Bu(f),p=Mo(f);return typeof document>"u"||!u.mounted?null:kr.createPortal(d.jsx($B,{className:t,variant:a,sizePreset:c,portalTheme:p,lightUi:m,titleId:o,descriptionId:s,hasDescription:i,dialogRef:u.dialogRef,overlayRef:u.overlayRef,panelRef:u.panelRef,bindGlossPanelRef:u.bindGlossPanelRef,children:n}),document.body)}e_.displayName="AlertDialog.Panel";function $B({children:t,className:e,variant:n,sizePreset:r,portalTheme:o,lightUi:s,titleId:i,descriptionId:a,hasDescription:c,dialogRef:u,overlayRef:f,panelRef:m,bindGlossPanelRef:p}){const b=n==="gloss",g=on();return d.jsxs("dialog",{...o,ref:u,role:"alertdialog",onCancel:h=>h.preventDefault(),"aria-labelledby":i,"aria-describedby":c?a:void 0,className:st(EB,g.dialog),children:[d.jsx("div",{ref:f,className:FB(s,g.overlay),style:GB(),"aria-hidden":!0}),d.jsx("div",{ref:m,tabIndex:-1,className:zB({variant:n,sizePreset:r,className:e,slotClass:g.panel}),children:b?d.jsx("div",{ref:p,className:VB(r.maxHeight,g.glossPanel),children:d.jsx("div",{className:$C(st(RB,g.glossContent)),children:t})}):d.jsx($d,{children:t})})]})}function WB({open:t,onOpenChange:e,status:n,variant:r="default",size:o="base"}){const s=l.useId(),i=l.useId(),[a,c]=l.useState(!1),u=l.useCallback(g=>{c(g)},[]),f=Td(r),m=Ad(n),p=TB[o];return{contextValue:{open:t,titleId:s,descriptionId:i,hasDescription:a,setHasDescription:u,onOpenChange:e,variant:f,status:m,size:o,sizePreset:p,footerButtonSize:WC(o)}}}function t_({open:t,onOpenChange:e,children:n,status:r,variant:o="default",size:s="base",classNames:i}){const a=WB({open:t,onOpenChange:e,status:r,variant:o,size:s});return d.jsx(W1,{classNames:i,children:d.jsx($1,{value:a.contextValue,children:n})})}t_.displayName="AlertDialog";const XB=Object.assign(t_,{Trigger:JC,Panel:e_,Content:$d,Header:XC,Indicator:Xd,HeadingBlock:qC,Title:YC,Description:KC,Body:ZC,Footer:QC,Close:Wd}),n_=l.createContext(null),Jl=l.createContext({});function YB({value:t,children:e}){return d.jsx(n_.Provider,{value:t,children:e})}function KB({classNames:t,children:e}){const n=l.useContext(Jl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Jl.Provider,{value:r,children:e})}function Fn(){const t=l.useContext(n_);if(!t)throw new Error("Dialog.* components must be used inside <Dialog>.");return t}function Gn(){return l.useContext(Jl)}const qB="Close";function ZB({open:t,onOpenChange:e,variant:n,dismissOnBackdrop:r=!0}){const[o,s]=l.useState(!1),i=l.useRef(null),a=l.useRef(null),c=l.useRef(null),u=l.useRef(null),f=l.useMemo(()=>Mt(u,n==="gloss"),[n]);l.useLayoutEffect(()=>{t&&s(!0)},[t]),l.useEffect(()=>{if(!o)return;const p=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=p}},[o]),l.useLayoutEffect(()=>{if(t||!o)return;const p=a.current,b=c.current;let g=!1;const h=()=>{g||s(!1)};if(!p||!b||$t()){h();return}V(p,b);const x={...ve(),overwrite:"auto"},C=Db({overlay:p,panel:b,vars:x,onComplete:h});return()=>{g=!0,C.kill(),V(p,b)}},[t,o]),l.useLayoutEffect(()=>{if(!t||!o)return;const p=i.current;p&&!p.open&&p.showModal();const b=a.current,g=c.current;if(!(!b||!g)){if($t()){Mu(b,g,{focusPanel:!0});return}Nb({overlay:b,panel:g,vars:{...ve(),overwrite:"auto"}}),g.focus()}},[t,o]);const m=l.useCallback(p=>{r&&p.target===p.currentTarget&&e(!1)},[r,e]);return{mounted:o,dialogRef:i,overlayRef:a,panelRef:c,bindGlossPanelRef:f,handleBackdropPointerDown:m}}function Yd({className:t,...e}){const n=Gn();return d.jsx("div",{className:UC(ht(n.content,t)),...e})}Yd.displayName="DialogContent";function r_({className:t,...e}){const{sizePreset:n}=Fn(),r=Gn();return d.jsx("div",{className:ht(fB,n.headerGap,n.headerPadding,r.header,t),...e})}r_.displayName="DialogHeader";const o_=l.forwardRef(function({className:e,id:n,...r},o){const{titleId:s,sizePreset:i}=Fn(),a=Gn();return d.jsx(ee,{ref:o,as:"h2",variant:i.titleVariant,id:n??s,className:ht(pB,a.title,e),...r})});o_.displayName="DialogTitle";function s_({className:t,id:e,...n}){const{descriptionId:r,setHasDescription:o,sizePreset:s}=Fn(),i=Gn();return l.useLayoutEffect(()=>(o(!0),()=>o(!1)),[o]),d.jsx(ee,{as:"p",variant:s.descVariant,id:e??r,className:ht(s.descClassName,i.description,t),...n})}s_.displayName="DialogDescription";function i_({className:t,...e}){const{sizePreset:n}=Fn(),r=Gn();return d.jsx("div",{className:ht(mB,n.headingBlockGap,r.headingBlock,t),...e})}i_.displayName="DialogHeadingBlock";const a_=l.forwardRef(function({className:e,onClick:n,"aria-label":r=qB,...o},s){const{onOpenChange:i}=Fn(),a=Gn();return d.jsx(Go,{ref:s,variant:"secondary","aria-label":r,className:ht(bB,a.close,e),onClick:c=>{n==null||n(c),c.defaultPrevented||i(!1)},...o})});a_.displayName="DialogClose";function l_({className:t,...e}){const{sizePreset:n}=Fn(),r=Gn();return d.jsx("div",{className:_B(n.bodyPadding,ht(r.body,t)),...e})}l_.displayName="DialogBody";function c_({className:t,children:e,...n}){const{footerButtonSize:r,sizePreset:o}=Fn(),s=Gn(),i=l.useMemo(()=>GC(e,r),[e,r]);return d.jsx("div",{className:ht(gB,o.footerPadding,s.footer,t),...n,children:i})}c_.displayName="DialogFooter";const u_=l.forwardRef(function({children:e,asChild:n,onClick:r,onPointerDown:o,...s},i){const{open:a,onOpenChange:c}=Fn(),u=l.useRef(null),f=Is(),m=l.useCallback(g=>{u.current=g,dt(i,g)},[i]),p=l.useCallback(g=>{a||f.current||g.button!==0||(g.preventDefault(),ws({triggerRef:u,openingRef:f,setOpen:()=>c(!0)}))},[a,f,u,c]),b=l.useCallback(g=>{r==null||r(g),!g.defaultPrevented&&!a&&!f.current&&c(!0)},[r,a,f,c]);if(n&&l.isValidElement(e)){const g=l.Children.count(e)===1?e:null;if(g){const h=g;return l.cloneElement(h,{ref:(x=>{u.current=x}),onPointerDown:x=>{var C,_;p(x),(_=(C=h.props).onPointerDown)==null||_.call(C,x),o==null||o(x)},onClick:x=>{var C,_;(_=(C=h.props).onClick)==null||_.call(C,x),b(x)},"aria-haspopup":"dialog","aria-expanded":a})}}return d.jsx("button",{type:"button",ref:m,"aria-haspopup":"dialog","aria-expanded":a,onPointerDown:g=>{o==null||o(g),p(g)},onClick:b,...s,children:e})});u_.displayName="Dialog.Trigger";function d_({variant:t="default",dismissOnBackdrop:e=!0,className:n,themeAnchor:r,children:o}){const{open:s,onOpenChange:i,titleId:a,descriptionId:c,hasDescription:u,sizePreset:f}=Fn(),m=ZB({open:s,onOpenChange:i,variant:t,dismissOnBackdrop:e}),p=ju(s,r??null),b=Bu(p),g=Mo(p);return typeof document>"u"||!m.mounted?null:kr.createPortal(d.jsx(QB,{className:n,variant:t,sizePreset:f,portalTheme:g,lightUi:b,titleId:a,descriptionId:c,hasDescription:u,dialogRef:m.dialogRef,overlayRef:m.overlayRef,panelRef:m.panelRef,bindGlossPanelRef:m.bindGlossPanelRef,onBackdropMouseDown:m.handleBackdropPointerDown,onDialogClose:()=>i(!1),children:o}),document.body)}d_.displayName="Dialog.Panel";function QB({children:t,className:e,variant:n,sizePreset:r,portalTheme:o,lightUi:s,titleId:i,descriptionId:a,hasDescription:c,dialogRef:u,overlayRef:f,panelRef:m,bindGlossPanelRef:p,onBackdropMouseDown:b,onDialogClose:g}){const h=n==="gloss",x=Gn();return d.jsxs("dialog",{...o,ref:u,onClose:g,"aria-labelledby":i,"aria-describedby":c?a:void 0,className:ht(iB,x.dialog),children:[d.jsx("div",{ref:f,className:VC(s,x.overlay),style:zC(),"aria-hidden":!0,onMouseDown:b}),d.jsx("div",{ref:m,tabIndex:-1,className:xB({variant:n,sizePreset:r,className:e,slotClass:x.panel}),children:h?d.jsx("div",{ref:p,className:CB(r.maxHeight,x.glossPanel),children:d.jsx("div",{className:UC(ht(HC,x.glossContent),!0),children:t})}):d.jsx(Yd,{children:t})})]})}function JB({open:t,onOpenChange:e,size:n="base"}){const r=l.useId(),o=l.useId(),[s,i]=l.useState(!1),a=l.useCallback(f=>{i(f)},[]),c=oB[n];return{contextValue:{open:t,titleId:r,descriptionId:o,hasDescription:s,setHasDescription:a,onOpenChange:e,size:n,sizePreset:c,footerButtonSize:SB(n)}}}function f_({open:t,onOpenChange:e,size:n="base",children:r,classNames:o}){const s=JB({open:t,onOpenChange:e,size:n});return d.jsx(YB,{value:s.contextValue,children:d.jsx(KB,{classNames:o,children:r})})}f_.displayName="Dialog";const ej=Object.assign(f_,{Trigger:u_,Panel:d_,Content:Yd,Header:r_,HeadingBlock:i_,Title:o_,Description:s_,Close:a_,Body:l_,Footer:c_}),Kd=l.createContext(null),m_=l.createContext(null),ec=l.createContext({});function p_({classNames:t,children:e}){const n=l.useContext(ec),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(ec.Provider,{value:r,children:e})}function tj({value:t,children:e}){return d.jsx(m_.Provider,{value:t,children:e})}function h_(){const t=l.useContext(Kd);if(!t)throw new Error("Components Toast must be used inside <Toast.Provider>.");return t}function Ms(){const t=l.useContext(m_);if(!t)throw new Error("Toast.* must be inside <Toast>.");return t}function dr(){return l.useContext(ec)}const nj={small:{icon:le.small.spinnerIcon,border:le.small.spinnerBorder},base:{icon:le.base.spinnerIcon,border:le.base.spinnerBorder},mid:{icon:le.mid.spinnerIcon,border:le.mid.spinnerBorder},large:{icon:le.large.spinnerIcon,border:le.large.spinnerBorder}},rj={primary:"text-primary",foreground:"text-foreground",muted:"text-muted",secondary:"text-primary",danger:"text-danger",success:"text-success",info:"text-info",warning:"text-warning"},oj="inline-flex shrink-0 items-center justify-center",sj="box-border inline-block rounded-full border-current border-t-transparent animate-spin motion-reduce:animate-none",ij="flex items-end",aj="block shrink-0 rounded-full origin-bottom",Aa={small:{dotClass:"size-[calc(var(--icon-size-xsmall)*0.45)]",dotSizeVar:"calc(var(--icon-size-xsmall) * 0.45)",gapClass:"gap-[calc(var(--space-xsmall)*0.75)]",jumpPx:5,scalePeak:1.25},base:{dotClass:"size-[calc(var(--icon-size-xsmall)*0.6)]",dotSizeVar:"calc(var(--icon-size-xsmall) * 0.6)",gapClass:"gap-xsmall",jumpPx:7,scalePeak:1.3},mid:{dotClass:"size-[calc(var(--icon-size-xsmall)*0.75)]",dotSizeVar:"calc(var(--icon-size-xsmall) * 0.75)",gapClass:"gap-xsmall",jumpPx:9,scalePeak:1.35},large:{dotClass:"size-[calc(var(--icon-size-small)*0.75)]",dotSizeVar:"calc(var(--icon-size-small) * 0.75)",gapClass:"gap-small",jumpPx:12,scalePeak:1.4}},lj={primary:"bg-primary",foreground:"bg-foreground",muted:"bg-muted",secondary:"bg-primary",danger:"bg-danger",success:"bg-success",info:"bg-info",warning:"bg-warning"};function cj(t,e,n){const r=nj[t];return R(sj,r.icon,r.border,rj[e],n)}function uj(t,e){const n=Aa[t];return R(ij,n.gapClass,e)}function dj(t,e,n){return R(aj,Aa[t].dotClass,lj[e],n)}function fj(t){const{jumpPx:e,dotSizeVar:n}=Aa[t];return{height:`calc(${n} + ${e}px)`}}const mj=3;function pj(t,e){const{jumpPx:n,scalePeak:r}=Aa[e],{staggerSec:o,halfCycleSec:s,easeUp:i,easeDown:a,enabled:c}=h0();for(const u of t)V(u),X.set(u,{y:0,scale:1,transformOrigin:"50% 100%"});return c?t.map((u,f)=>X.to(u,{keyframes:[{y:-n,scale:r,duration:s,ease:i},{y:0,scale:1,duration:s,ease:a}],repeat:-1,delay:o*f,transformOrigin:"50% 100%"})):[]}function hj(t,e){const n=l.useSyncExternalStore(u0,Jm,Jm);l.useLayoutEffect(()=>{const r=t.current;if(!r)return;const o=Array.from(r.querySelectorAll("[data-loading-dot]")).slice(0,mj);if(o.length===0)return;const s=de();let i=[];return s||(i=pj(o,e)),()=>{for(const a of i)a.kill();for(const a of o)V(a)}},[e,t,n])}const gj=[0,1,2];function g_({size:t,color:e,className:n}){return d.jsx("span",{"aria-hidden":!0,className:cj(t,e,n)})}function b_({size:t,color:e,className:n}){const r=l.useRef(null);return hj(r,t),d.jsx("span",{ref:r,className:R(uj(t),n),style:fj(t),"aria-hidden":!0,children:gj.map(o=>d.jsx("span",{"data-loading-dot":!0,className:dj(t,e)},o))})}b_.displayName="LoadingDots";g_.displayName="LoadingSpinner";const qd=l.forwardRef(function({variant:e="spinner",size:n="base",color:r="primary",label:o="Loading",className:s="",...i},a){return d.jsx("span",{ref:a,role:"status","aria-live":"polite","aria-label":o,className:R(oj,s),...i,children:e==="dots"?d.jsx(b_,{size:n,color:r}):d.jsx(g_,{size:n,color:r})})});qd.displayName="Loading";const bj="Close";function xj(t){return t==="danger"||t==="warning"?"alert":"status"}function Cj(t){return`Notifications (${t})`}function Tt(...t){return R(...t)}const tc=8,_j=.04,xi=3,nc=4e3,ai=24;function Sj(){return`toast-${Math.random().toString(36).slice(2)}`}function Fs(t,e){let n=!1;const r=o=>{if(!n)for(const s of l.Children.toArray(o)){if(!l.isValidElement(s))continue;const i=s.type.displayName;if(e(i)){n=!0;return}r(s.props.children)}};return r(t),n}function vj(t){return Fs(t,e=>e==="ToastTitle")}function yj(t){return Fs(t,e=>e==="ToastDescription")}function Tj(t){return Fs(t,e=>e==="ToastIndicator")}function Aj(t){return Fs(t,e=>e==="ToastActionButton")}function Ej(t){return Fs(t,e=>e==="ToastCloseButton")}function Lj(t,e,n,r){return n?r:e?!0:t!=="default"}function wj(t,e,n,r,o,s,i,a){const c=e!=null||vj(a),u=n!=null||yj(a);return{hasIndicator:Lj(t,s,i,Tj(a)),hasTitle:c,hasDescription:u,hasAction:i?Aj(a):r!=null,hasClose:i?Ej(a):o!=null}}const Ij={default:"bg-surface border-token text-foreground",success:"bg-surface-tint-success border-token text-foreground",danger:"bg-surface-tint-danger border-token text-foreground",info:"bg-surface-tint-info border-token text-foreground",warning:"bg-surface-tint-warning border-token text-foreground"},Rj={default:"text-primary",success:"text-success",danger:"text-danger",info:"text-info",warning:"text-warning"},x_="contents",Nj="font-w-mid",Dj="text-muted",kj="-mx-xsmall",Oj="inline-flex shrink-0 items-center justify-center";function Pj(t,e,n){return Tt(Oj,e,Rj[t],n)}const Bj={default:"primary",success:"success",danger:"danger",info:"info",warning:"warning"},jj="fixed z-[300] pointer-events-none",Mj="relative grid",Fj="pointer-events-none absolute",Gj={"top-left":"top-4 left-4","top-center":"top-4 left-1/2 -translate-x-1/2","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-center":"bottom-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4"};function Hj(t){return Gj[t]}function zj(t){return Bj[t]}function Vj({variant:t,status:e,size:n,gridSlots:r,slotClass:o,className:s}){const i=t==="gloss",a=Dn(n);return Tt(Ho(r,a.gridGap),`w-full ${a.shellPadding}`,i?R("gloss-panel gloss-deep border-0 text-foreground",nn):R("shadow-token-mid",Ij[e]),o,s)}function Uj({placement:t,slotClass:e}){return Tt(jj,Hj(t),e)}function $j(t){return Tt(Mj,t)}function Wj(t){return Tt(Fj,t)}function Zd({className:t,children:e,...n}){const{status:r,isLoading:o,gridSlots:s,sizePreset:i}=Ms(),a=dr(),c=Pj(r,i.iconSvgClass);if(e!==void 0)return d.jsx("span",{className:Tt(c,Rr(s),a.indicator,t),...n,children:e});if(o)return d.jsx("span",{className:Tt(c,Rr(s),a.indicator,t),...n,children:d.jsx(qd,{size:i.loadingSize,color:zj(r)})});if(r==="default")return null;const u=yd[r];return u?d.jsx("span",{className:Tt(c,Rr(s),a.indicator,t),...n,children:d.jsx(u,{"aria-hidden":!0})}):null}Zd.displayName="ToastIndicator";function C_({className:t,...e}){const n=dr();return d.jsx("div",{className:Tt(x_,n.message,t),...e})}C_.displayName="ToastMessage";function __({className:t,...e}){const n=dr();return d.jsx("div",{className:Tt(x_,n.content,t),...e})}__.displayName="ToastContent";function Qd({className:t,id:e,...n}){const{titleId:r,gridSlots:o,sizePreset:s}=Ms(),i=dr();return d.jsx(ee,{as:"div",variant:s.titleVariant,id:e??r,className:Tt(Nj,zo(o),i.title,t),...n})}Qd.displayName="ToastTitle";function Jd({className:t,id:e,...n}){const{descriptionId:r,gridSlots:o,sizePreset:s}=Ms(),i=dr();return d.jsx(ee,{as:"div",variant:s.descVariant,id:e??r,className:Tt(Dj,ks(o),i.description,t),...n})}Jd.displayName="ToastDescription";function ef({className:t,...e}){const{gridSlots:n}=Ms(),r=dr();return d.jsx("div",{className:Tt(Os(n),r.action,t),...e})}ef.displayName="ToastActionButton";const tf=l.forwardRef(function({className:e,onClick:n,"aria-label":r=bj,...o},s){const{dismiss:i,gridSlots:a}=Ms(),c=dr();return d.jsx(Go,{ref:s,size:"small",variant:"ghost","aria-label":r,className:Tt(kj,vx(a),c.close,e),onClick:u=>{n==null||n(u),u.defaultPrevented||i()},...o})});tf.displayName="ToastCloseButton";function Xj({gridSlots:t,title:e,description:n,action:r,onClose:o}){return d.jsxs(d.Fragment,{children:[t.hasIndicator?d.jsx(Zd,{}):null,e!=null?d.jsx(Qd,{children:e}):null,n!=null?d.jsx(Jd,{children:n}):null,r!=null?d.jsx(ef,{children:r}):null,o!=null?d.jsx(tf,{}):null]})}function Yj({status:t="default",size:e,title:n,description:r,action:o,isLoading:s=!1,onClose:i,children:a}){const c=l.useId(),u=`${c}-title`,f=`${c}-description`,m=!!a,p=vd(e),b=Dn(p),g=l.useMemo(()=>wj(t,n,r,o,i,s,m,a),[o,a,r,m,s,i,t,n]),h=xj(t),x=l.useMemo(()=>({status:t,size:p,sizePreset:b,titleId:u,descriptionId:f,isLoading:s,dismiss:i??(()=>{}),gridSlots:g}),[f,g,s,i,p,b,t,u]);return{isCompound:m,liveRole:h,titleId:u,size:p,itemCtx:x,gridSlots:g}}function Kj({entry:t,reverseIdx:e,total:n,isTop:r,isDismissing:o,onDismiss:s,onRemoveFinal:i,onHeightChange:a,providerClassNames:c}){const u=l.useRef(null),f=l.useRef(null),m=l.useRef(null),p=l.useRef(!1),b=Math.min(e,xi-1),g=1-b*_j,h=r?b*tc:-b*tc,x=e>=xi?0:1;l.useLayoutEffect(()=>{const y=m.current;if(!y)return;const v=de()||!Se().enableToastStack,A=!p.current;if(p.current=!0,V(y),v){X.set(y,{y:h,scale:g,autoAlpha:x});return}A&&t.variant!=="gloss"?X.fromTo(y,{opacity:0},{opacity:x,...ve(),overwrite:"auto"}):X.to(y,{y:h,scale:g,autoAlpha:x,...ve(),overwrite:"auto"})},[t.variant,h,x,g]),l.useLayoutEffect(()=>{const y=f.current;if(!y)return;a(t.id,y.offsetHeight);const v=new ResizeObserver(()=>{a(t.id,y.offsetHeight)});return v.observe(y),()=>v.disconnect()},[t.id,a]),l.useLayoutEffect(()=>{const y=u.current;if(!y)return;if($t()){ha(y);return}const v=r?-ai:ai;ga({surface:y,vars:{...ve(),overwrite:"auto"},from:{y:v,scale:pa},to:{y:0,scale:1}})},[r]),l.useEffect(()=>{if(!o)return;const y=u.current;if(!y)return;if($t()){i(t.id);return}const v=r?-ai:ai;V(y),ba({surface:y,vars:{duration:.22,ease:"power2.in",overwrite:"auto"},exit:{y:v},onComplete:()=>i(t.id)})},[o,r,t.id,i]),l.useEffect(()=>{if(t.timeout===0||o||t.isLoading)return;const y=setTimeout(()=>s(t.id),t.timeout);return()=>clearTimeout(y)},[t.id,t.timeout,o,t.isLoading,s]);const C=l.useCallback(()=>s(t.id),[t.id,s]),_=e<n,S={...c,...t.classNames};return d.jsx("div",{ref:m,"aria-hidden":!_||void 0,className:"will-change-transform",style:{gridColumn:1,gridRow:1,transformOrigin:r?"top center":"bottom center",zIndex:xi+1-e,pointerEvents:e===0?"auto":"none"},children:d.jsx("div",{ref:u,children:d.jsx(p_,{classNames:S,children:d.jsx(nf,{ref:f,status:t.status,variant:t.variant,size:t.size,title:t.title,description:t.description,action:t.action,isLoading:t.isLoading,onClose:C})})})})}function qj({placement:t,sorted:e,dismissingIds:n,onDismiss:r,onRemoveFinal:o,classNames:s,defaultSize:i="base"}){const a=t.startsWith("top"),[c,u]=l.useState(new Map),f=l.useRef(null),m=l.useRef(null),p=l.useRef(0),b=l.useCallback((_,S)=>{u(y=>{const v=new Map(y);return v.set(_,S),v})},[]),g=(e[0]&&c.get(e[0].id))??0,h=Math.min(e.length-1,xi-1)*tc,x=g+h,C=x>0?x:p.current;return x>0&&(p.current=x),l.useLayoutEffect(()=>{const _=f.current;if(!_||C<=0)return;const S=de()||!Se().enableToastStack;if(V(_),S){_.style.height=`${C}px`;return}X.to(_,{height:C,...ve(),overwrite:"auto"})},[C]),l.useLayoutEffect(()=>{const _=m.current;_&&X.set(_,{opacity:0})},[]),l.useLayoutEffect(()=>{var v;const _=m.current;if(!_)return;const S=de(),y=e.length===1&&n.has(((v=e[0])==null?void 0:v.id)??"");if(V(_),S){X.set(_,{opacity:y?0:1});return}y?X.to(_,{opacity:0,duration:.22,ease:"power2.in",overwrite:"auto"}):X.to(_,{opacity:1,...ve(),overwrite:"auto"})},[e,n]),d.jsxs("div",{role:"region","aria-label":Cj(t),className:Uj({placement:t,slotClass:s==null?void 0:s.viewport}),style:{width:KO(e,i)},children:[d.jsx("div",{ref:m,"aria-hidden":!0,className:Wj(s==null?void 0:s.scrim),style:{[a?"top":"bottom"]:`calc(-1 * ${En(An.offsetY)})`,left:`calc(-1 * ${En(An.insetX)})`,right:`calc(-1 * ${En(An.insetX)})`,height:En(An.height),background:En(a?An.gradientTop:An.gradientBottom),maskImage:En(An.mask),WebkitMaskImage:En(An.mask)}}),d.jsx("div",{ref:f,className:$j(s==null?void 0:s.stack),style:{height:C||void 0,alignItems:a?"start":"end"},children:e.map((_,S)=>d.jsx(Kj,{entry:_,reverseIdx:S,total:e.length,isTop:a,isDismissing:n.has(_.id),onDismiss:r,onRemoveFinal:o,onHeightChange:b,providerClassNames:s},_.id))})]})}function Zj({defaultPlacement:t="bottom-center",defaultVariant:e="default",defaultSize:n="base",classNames:r}){const[o,s]=l.useState([]),[i,a]=l.useState(new Set),c=l.useRef(0),u=l.useCallback(x=>{const C=x.id??Sj(),_={id:C,status:x.status??"default",variant:x.variant??e,size:x.size??n,title:x.title,description:x.description,action:x.action,timeout:x.timeout??nc,placement:x.placement??t,createdAt:++c.current,isLoading:x.isLoading??!1,classNames:{...r,...x.classNames}};return s(S=>[...S,_]),C},[t,n,e,r]),f=l.useCallback((x,C)=>{s(_=>_.map(S=>S.id===x?{...S,...C}:S))},[]),m=l.useCallback(x=>{a(C=>new Set([...C,x]))},[]),p=l.useCallback(x=>{s(C=>C.filter(_=>_.id!==x)),a(C=>{const _=new Set(C);return _.delete(x),_})},[]),b=l.useMemo(()=>[...new Set(o.map(x=>x.placement))],[o]),g=l.useMemo(()=>({add:u,update:f,dismiss:m}),[u,m,f]),h=l.useCallback(x=>o.filter(C=>C.placement===x).toSorted((C,_)=>_.createdAt-C.createdAt),[o]);return{toasts:o,dismissingIds:i,placements:b,ctx:g,sortedByPlacement:h,dismiss:m,removeFinal:p,providerClassNames:r,defaultSize:n}}function Qj({children:t,defaultPlacement:e="bottom-center",defaultVariant:n="default",defaultSize:r="base",classNames:o}){const s=Zj({defaultPlacement:e,defaultVariant:n,defaultSize:r,classNames:o});return d.jsxs(Kd.Provider,{value:s.ctx,children:[t,typeof document<"u"&&s.placements.map(i=>kr.createPortal(d.jsx(qj,{placement:i,sorted:s.sortedByPlacement(i),dismissingIds:s.dismissingIds,onDismiss:s.dismiss,onRemoveFinal:s.removeFinal,classNames:o,defaultSize:s.defaultSize}),document.body,i))]})}const nf=l.forwardRef(function({status:e="default",variant:n="default",size:r="base",title:o,description:s,action:i,isLoading:a=!1,onClose:c,className:u,classNames:f,children:m,onPointerOver:p,onPointerOut:b,...g},h){const x=Yj({status:e,size:r,title:o,description:s,action:i,isLoading:a,onClose:c,children:m}),C=n==="gloss",_=l.useRef(null),S=l.useMemo(()=>Mt(_,C),[C]),y=l.useCallback(E=>{S(E),_.current=E,typeof h=="function"?h(E):h&&(h.current=E)},[S,h]),v=Do(_,C),A=dr();return d.jsx(tj,{value:x.itemCtx,children:d.jsx(p_,{classNames:f,children:d.jsx("div",{ref:y,role:x.liveRole,"aria-labelledby":x.titleId,"aria-live":x.liveRole==="alert"?"assertive":"polite",className:Vj({variant:n,status:e,size:x.size,gridSlots:x.gridSlots,slotClass:A.root,className:u}),onPointerOver:E=>{p==null||p(E),!E.defaultPrevented&&C&&v.onPointerOver(E)},onPointerOut:E=>{b==null||b(E),C&&v.onPointerOut(E)},...g,children:x.isCompound?m:d.jsx(Xj,{gridSlots:x.gridSlots,title:o,description:s,action:i,onClose:c})})})})});nf.displayName="ToastRoot";function Jj(){const t=h_(),e=l.useCallback(s=>t.add(s),[t]),n=l.useCallback(s=>(i,a)=>t.add({...a,status:s,title:i}),[t]),r=l.useCallback((s,i)=>{const a=t.add({status:"default",title:i.loading??"Loading…",timeout:0,isLoading:!0,placement:i.placement,classNames:i.classNames});return s.then(c=>{const u=typeof i.success=="function"?i.success(c):i.success;t.update(a,{status:"success",title:u,isLoading:!1,timeout:i.timeout??nc})},c=>{const u=i.error==null?"An error occurred":typeof i.error=="function"?i.error(c):i.error;t.update(a,{status:"danger",title:u,isLoading:!1,timeout:i.timeout??nc})}),a},[t]);return{toast:{show:e,success:n("success"),danger:n("danger"),info:n("info"),warning:n("warning"),promise:r,dismiss:t.dismiss}}}const S_=Object.assign(nf,{Provider:Qj,Message:C_,Indicator:Zd,Content:__,Title:Qd,Description:Jd,ActionButton:ef,CloseButton:tf}),v_=l.createContext(null),rc=l.createContext({});function y_({value:t,children:e}){return d.jsx(v_.Provider,{value:t,children:e})}function eM({classNames:t,children:e}){const n=l.useContext(rc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(rc.Provider,{value:r,children:e})}function $o(){const t=l.useContext(v_);if(!t)throw new Error("Drawer.* components must be used inside <Drawer>.");return t}function sn(){return l.useContext(rc)}const tM="Close";function nM(t){switch(t){case"bottom":return"Drag down to close";case"top":return"Drag up to close";case"left":return"Drag left to close";case"right":return"Drag right to close"}}function at(...t){return R(...t)}function rM(t){return t.displayName}function oM(t){let e=!0;const n=[];let r=[];const o=()=>{if(r.length===0)return;const s=r;r=[],n.push({kind:"content",children:s})};return l.Children.forEach(t,s=>{if(!l.isValidElement(s)){r.push(s);return}const i=rM(s.type);if(i==="DrawerBackdrop"){s.props.isDismissable===!1&&(e=!1);return}if(i==="DrawerHandle"){o(),n.push({kind:"handle",node:s});return}r.push(s)}),o(),{backdropIsDismissable:e,panelSegments:n}}function sM(t,e){return e==="left"||e==="right"?t.offsetWidth:t.offsetHeight}function T_(t,e){const n=sM(t,e);switch(e){case"left":return{x:-n,y:0};case"right":return{x:n,y:0};case"top":return{x:0,y:-n};case"bottom":return{x:0,y:n}}}function iM(){return{x:0,y:0}}function aM(t,e){return T_(t,e)}function lM(t){X.set(t,{xPercent:0,yPercent:0,x:0,y:0})}function cM({overlay:t,panel:e,placement:n,vars:r}){V(t,e),lM(e),X.fromTo(t,{opacity:0},{opacity:1,...r}),X.fromTo(e,T_(e,n),{...iM(),...r})}function uM({overlay:t,panel:e,placement:n,vars:r,onComplete:o}){V(t,e);const s=X.timeline({onComplete:o});return s.to(t,{opacity:0,...r},0),s.to(e,{...aM(e,n),...r},0),s}function dM({open:t,onOpenChange:e,variant:n,placement:r,backdropIsDismissable:o}){const[s,i]=l.useState(!1),a=l.useRef(null),c=l.useRef(null),u=l.useRef(null),f=l.useRef(null),m=l.useRef(!1),p=t||s,b=l.useMemo(()=>Mt(f,n==="gloss"),[n]);l.useLayoutEffect(()=>{t&&(m.current=!1,i(!0))},[t]),l.useEffect(()=>{if(!p)return;const h=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=h}},[p]),l.useLayoutEffect(()=>{if(t||!s)return;const h=c.current,x=u.current;let C=!1;const _=()=>{C||i(!1)};if(m.current){m.current=!1,_();return}if(!h||!x||$t()){_();return}V(h,x);const S={...ve(),overwrite:"auto"},y=uM({overlay:h,panel:x,placement:r,vars:S,onComplete:_});return()=>{C=!0,y.kill(),V(h,x)}},[t,s,r]),l.useLayoutEffect(()=>{if(!t)return;const h=a.current;h&&!h.open&&h.showModal();const x=c.current,C=u.current;if(!(!x||!C)){if($t()){Mu(x,C);return}cM({overlay:x,panel:C,placement:r,vars:{...ve(),overwrite:"auto"}})}},[t,r]),l.useLayoutEffect(()=>{!t||!u.current||u.current.focus()},[t]);const g=l.useCallback(h=>{o&&h.target===h.currentTarget&&e(!1)},[o,e]);return{showPortal:p,mounted:s,dialogRef:a,overlayRef:c,panelRef:u,skipCloseAnimRef:m,bindGlossPanelRef:b,handleBackdropMouseDown:g}}const fM={left:"left-0 top-0 h-full",right:"right-0 top-0 h-full",bottom:"bottom-0 inset-x-0 w-full",top:"top-0 inset-x-0 w-full"},mM={default:{horizontal:"max-w-[min(100vw,24rem)] w-full",vertical:"max-h-[90dvh]"},mid:{horizontal:"w-[50vw] max-w-full",vertical:"max-h-[50dvh]"},full:{horizontal:"w-screen",vertical:"h-dvh"}},A_={left:"rounded-r-mid",right:"rounded-l-mid",bottom:"rounded-t-mid",top:"rounded-b-mid"},pM={bottom:"pt-plus",top:"pb-plus",left:"pr-plus",right:"pl-plus"},hM="flex min-h-0 flex-1 flex-col gap-mid text-left",gM="px-mid pt-plus",bM="px-mid py-base",xM="px-mid pb-plus",CM="fixed inset-0 z-[100] m-0 h-full w-full max-h-none max-w-none border-0 bg-transparent p-0 open:block [&::backdrop]:bg-transparent",_M="bg-[color-mix(in_oklab,var(--color-foreground)_14%,transparent)] backdrop-blur-[14px] backdrop-saturate-150 motion-reduce:backdrop-blur-none",SM="bg-[color-mix(in_oklab,black_55%,transparent)]",vM="absolute z-10 flex flex-col outline-none overflow-hidden",yM="border-token bg-surface text-foreground shadow-token-large",TM="gloss-panel gloss-deep flex min-h-0 flex-1 flex-col text-foreground",AM="gloss-content flex min-h-0 min-w-0 flex-1 flex-col",EM="flex shrink-0 items-start gap-plus text-left",LM="flex min-w-0 flex-1 flex-col gap-xsmall text-left",wM="min-w-0",IM="text-muted",RM="min-h-0 flex-1 overflow-y-auto",NM="flex shrink-0 flex-wrap items-center justify-end gap-base",DM="shrink-0",kM="flex touch-none select-none shrink-0 items-center justify-center cursor-grab active:cursor-grabbing box-content",OM="h-1 w-10",PM="h-10 w-1",BM="rounded-full bg-tertiary";function jM(t,e){const n=mM[e];return t==="left"||t==="right"?n.horizontal:n.vertical}function MM(){return Rb()}function FM({lightUi:t,dismissable:e,slotClass:n}){return at("absolute inset-0",t?_M:SM,e?"cursor-pointer":"cursor-default",n)}function GM({variant:t,placement:e,size:n,className:r,slotClass:o}){const s=n!=="full"?A_[e]:void 0;return at(vM,t!=="gloss"&&yM,fM[e],jM(e,n),s,r,o)}function HM({placement:t,size:e,slotClass:n}){const r=e!=="full"?A_[t]:void 0;return at(TM,r,n)}function zM(t){return at(hM,t)}function VM(t){return at(AM,t)}function UM(t){return at(RM,bM,t)}function $M({placement:t,slotClass:e,className:n}){return at(kM,t==="left"||t==="right"?"self-stretch w-xsmall":"h-xsmall w-full",pM[t],e,n)}function WM({placement:t,slotClass:e}){return at(BM,t==="left"||t==="right"?PM:OM,e)}const XM=.38,Tp=.45;function YM(t,e){return t==="left"?-e.offsetWidth:t==="right"?e.offsetWidth:t==="top"?-e.offsetHeight:e.offsetHeight}function KM(t){return t==="left"||t==="right"?"x":"y"}function qM(t,e,n){X.set(t,{[e]:n})}function ZM(t,e){return 1-Math.min(Math.abs(t)/Math.abs(e),1)}function QM(t,e,n,r,o,s){return{onPointerDown:l.useCallback(a=>{const c=t.current,u=e.current;if(!c||de())return;const f=KM(n),m=f==="x",p=m?a.clientX:a.clientY;let b=p,g=performance.now(),h=0;const x=YM(n,c),C=a.currentTarget;C.setPointerCapture(a.pointerId),V(c,u),c.style.willChange="transform";const _=y=>{if(y.pointerId!==a.pointerId)return;const v=m?y.clientX:y.clientY,A=v-p,E=performance.now(),T=E-g;T>0&&(h=(v-b)/T),b=v,g=E;const w=(n==="left"||n==="top"?-1:1)>0?Math.max(0,A):Math.min(0,A);qM(c,f,w),u&&X.set(u,{opacity:ZM(w,x)})},S=y=>{if(y.pointerId!==a.pointerId)return;C.releasePointerCapture(a.pointerId),C.removeEventListener("pointermove",_),C.removeEventListener("pointerup",S),C.removeEventListener("pointercancel",S);const A=(m?y.clientX:y.clientY)-p,E=Math.abs(A)/Math.abs(x),T=n==="right"||n==="bottom"?h>Tp:h<-Tp,L={...ve(),overwrite:"auto"};if(E>=XM||T){V(c,u);const w=X.timeline({onComplete:()=>{c.style.willChange="",s&&(s.current=!0),r()}});w.fromTo(c,{[f]:A},{[f]:x,...L},0),u&&w.to(u,{opacity:0,...L},0)}else{V(c,u);const w=X.timeline({onComplete:()=>{c.style.willChange="",X.set(c,{clearProps:f}),u&&X.set(u,{opacity:1})}});w.fromTo(c,{[f]:A},{[f]:0,...L},0),u&&w.to(u,{opacity:1,...L},0)}};C.addEventListener("pointermove",_),C.addEventListener("pointerup",S),C.addEventListener("pointercancel",S)},[o,r,e,t,n,s])}}function E_(t){return null}E_.displayName="DrawerBackdrop";function Hi({className:t,...e}){const n=sn();return d.jsx("div",{className:zM(at(n.content,t)),...e})}Hi.displayName="DrawerContent";function JM({segment:t,variant:e}){const n=sn();return t.kind==="handle"?t.node:e==="gloss"?d.jsx("div",{className:VM(n.glossContent),children:d.jsx(Hi,{children:t.children})}):d.jsx(Hi,{children:t.children})}function L_({className:t,onPointerDown:e,...n}){const{onOpenChange:r,placement:o,overlayRef:s,panelRef:i,skipCloseAnimRef:a}=$o(),c=sn(),{onPointerDown:u}=QM(i,s,o,()=>r(!1),!1,a);return d.jsx("div",{"aria-label":nM(o),className:$M({placement:o,slotClass:c.handle,className:t}),onPointerDown:f=>{e==null||e(f),u(f)},...n,children:d.jsx("span",{"aria-hidden":!0,className:WM({placement:o,slotClass:c.handleGrip})})})}L_.displayName="DrawerHandle";function w_({className:t,...e}){const n=sn();return d.jsx("div",{className:at(EM,gM,n.header,t),...e})}w_.displayName="DrawerHeader";function I_({className:t,...e}){const n=sn();return d.jsx("div",{className:at(LM,n.headingBlock,t),...e})}I_.displayName="DrawerHeadingBlock";const R_=l.forwardRef(function({className:e,id:n,...r},o){const{titleId:s}=$o(),i=sn();return d.jsx(ee,{ref:o,as:"h2",variant:"mid",id:n??s,className:at(wM,i.title,e),...r})});R_.displayName="DrawerTitle";function N_({className:t,id:e,...n}){const{descriptionId:r,setHasDescription:o}=$o(),s=sn();return l.useLayoutEffect(()=>(o(!0),()=>o(!1)),[o]),d.jsx(ee,{as:"p",variant:"base",id:e??r,className:at(IM,s.description,t),...n})}N_.displayName="DrawerDescription";const D_=l.forwardRef(function({className:e,onClick:n,"aria-label":r=tM,...o},s){const{onOpenChange:i}=$o(),a=sn();return d.jsx(Go,{ref:s,variant:"secondary","aria-label":r,className:at(DM,a.close,e),onClick:c=>{n==null||n(c),c.defaultPrevented||i(!1)},...o})});D_.displayName="DrawerClose";function k_({className:t,...e}){const n=sn();return d.jsx("div",{className:UM(at(n.body,t)),...e})}k_.displayName="DrawerBody";function O_({className:t,...e}){const n=sn();return d.jsx("div",{className:at(NM,xM,n.footer,t),...e})}O_.displayName="DrawerFooter";const P_=l.forwardRef(function({children:e,asChild:n,onClick:r,onPointerDown:o,...s},i){const{open:a,onOpenChange:c}=$o(),u=l.useRef(null),f=Is(),m=l.useCallback(g=>{u.current=g,dt(i,g)},[i]),p=l.useCallback(g=>{a||f.current||g.button!==0||(g.preventDefault(),ws({triggerRef:u,openingRef:f,setOpen:()=>c(!0)}))},[a,f,u,c]),b=l.useCallback(g=>{r==null||r(g),!g.defaultPrevented&&!a&&!f.current&&c(!0)},[r,a,f,c]);if(n&&l.isValidElement(e)){const g=l.Children.count(e)===1?e:null;if(g){const h=g;return l.cloneElement(h,{ref:(x=>{u.current=x}),onPointerDown:x=>{var C,_;p(x),(_=(C=h.props).onPointerDown)==null||_.call(C,x),o==null||o(x)},onClick:x=>{var C,_;(_=(C=h.props).onClick)==null||_.call(C,x),b(x)},"aria-haspopup":"dialog","aria-expanded":a})}}return d.jsx("button",{type:"button",ref:m,"aria-haspopup":"dialog","aria-expanded":a,onPointerDown:g=>{o==null||o(g),p(g)},onClick:b,...s,children:e})});P_.displayName="Drawer.Trigger";function B_({size:t="default",variant:e="default",className:n,themeAnchor:r,children:o}){const s=$o(),{open:i,onOpenChange:a,placement:c}=s,{backdropIsDismissable:u,panelSegments:f}=l.useMemo(()=>oM(o),[o]),m=dM({open:i,onOpenChange:a,variant:e,placement:c,backdropIsDismissable:u}),p=ju(i,r??null),b=Bu(p),g=Mo(p),h=l.useMemo(()=>({...s,overlayRef:m.overlayRef,panelRef:m.panelRef,skipCloseAnimRef:m.skipCloseAnimRef}),[s,m.overlayRef,m.panelRef,m.skipCloseAnimRef]);return typeof document>"u"||!m.showPortal?null:kr.createPortal(d.jsx(y_,{value:h,children:d.jsx(eF,{className:n,variant:e,placement:c,size:t,portalTheme:g,lightUi:b,titleId:s.titleId,descriptionId:s.descriptionId,hasDescription:s.hasDescription,backdropIsDismissable:u,panelSegments:f,dialogRef:m.dialogRef,overlayRef:m.overlayRef,panelRef:m.panelRef,bindGlossPanelRef:m.bindGlossPanelRef,onBackdropMouseDown:m.handleBackdropMouseDown,onDialogClose:()=>a(!1)})}),document.body)}B_.displayName="Drawer.Panel";function eF({className:t,variant:e,placement:n,size:r,portalTheme:o,lightUi:s,titleId:i,descriptionId:a,hasDescription:c,backdropIsDismissable:u,panelSegments:f,dialogRef:m,overlayRef:p,panelRef:b,bindGlossPanelRef:g,onBackdropMouseDown:h,onDialogClose:x}){const C=sn(),_=f.map((S,y)=>d.jsx(JM,{segment:S,variant:e},S.kind==="handle"?`handle-${y}`:`content-${y}`));return d.jsxs("dialog",{...o,ref:m,onClose:x,"aria-labelledby":i,"aria-describedby":c?a:void 0,className:at(CM,C.dialog),children:[d.jsx("div",{ref:p,className:FM({lightUi:s,dismissable:u,slotClass:C.overlay}),style:MM(),"aria-hidden":!0,onMouseDown:h}),d.jsx("div",{ref:b,tabIndex:-1,className:GM({variant:e,placement:n,size:r,className:t,slotClass:C.panel}),children:e==="gloss"?d.jsx("div",{ref:g,className:HM({placement:n,size:r,slotClass:C.glossPanel}),children:_}):_})]})}const tF="right";function nF({open:t,onOpenChange:e,placement:n=tF}){const r=l.useId(),o=l.useId(),[s,i]=l.useState(!1),a=l.useRef(null),c=l.useRef(null),u=l.useRef(!1),f=l.useCallback(p=>{i(p)},[]);return{contextValue:{open:t,titleId:r,descriptionId:o,hasDescription:s,setHasDescription:f,onOpenChange:e,placement:n,overlayRef:a,panelRef:c,skipCloseAnimRef:u}}}function j_({open:t,onOpenChange:e,placement:n="right",children:r,classNames:o}){const s=nF({open:t,onOpenChange:e,placement:n});return d.jsx(y_,{value:s.contextValue,children:d.jsx(eM,{classNames:o,children:r})})}j_.displayName="Drawer";const rF=Object.assign(j_,{Trigger:P_,Panel:B_,Backdrop:E_,Handle:L_,Content:Hi,Header:w_,HeadingBlock:I_,Title:R_,Description:N_,Close:D_,Body:k_,Footer:O_});function oF({forwardedRef:t,onPointerEnter:e,onPointerLeave:n,onPointerDown:r}){const o=l.useRef(null),s=l.useCallback(u=>{o.current=u,dt(t,u)},[t]),{handlePointerEnter:i,handlePointerLeave:a,handlePointerDown:c}=lr({isDisabled:!1,enabled:!0,textMotionRef:o,hoverLift:!0,onPointerEnter:e,onPointerLeave:n,onPointerDown:r});return{setAnchorRef:s,handlePointerEnter:i,handlePointerLeave:a,handlePointerDown:c}}const oc=l.createContext({});function sF({classNames:t,children:e}){const n=l.useContext(oc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(oc.Provider,{value:r,children:e})}function iF(){return l.useContext(oc)}const aF=!0,lF=!0,M_="Link.Icon";function Ea(...t){return R(...t)}function F_(t){if(l.isValidElement(t))return t.type.displayName}function G_(t){return l.Children.toArray(t).some(e=>{if(!l.isValidElement(e))return!1;if(F_(e)===M_)return!0;const n=e.props.children;return n!=null&&G_(n)})}function cF(t){const e=t.children!==void 0&&t.children!==null;return{node:e?t.children:"default",muted:!e}}function uF(t){const e=[];let n,r;return l.Children.forEach(t,o=>{if(l.isValidElement(o)&&F_(o)===M_){const s=o.props,i=cF(s);(s.position??"end")==="start"?n=i:r=i;return}e.push(o)}),{textChildren:e.length===1?e[0]:l.createElement(l.Fragment,null,...e),startIcon:n,endIcon:r}}function Ap(t,e,n,r){return t?{node:t.node==="default"?null:t.node,muted:t.muted}:{node:null,muted:!1}}function dF({leftIcon:t,rightIcon:e,showDefaultIcon:n=!1,defaultIconPosition:r="end"}){const o=n&&!t&&!e;return{usesDefaultIcon:o,defaultIconAtStart:o&&r==="start",defaultIconAtEnd:o&&r==="end"}}function fF({leftIcon:t,rightIcon:e,showDefaultIcon:n,defaultIconPosition:r,children:o}){var a,c;if(o!=null&&G_(o)){const u=uF(o),f=Ap(u.startIcon),m=Ap(u.endIcon);return{textChildren:u.textChildren,startIcon:f.node,endIcon:m.node,startIconMuted:f.muted,endIconMuted:m.muted,usesDefaultAtStart:((a=u.startIcon)==null?void 0:a.node)==="default",usesDefaultAtEnd:((c=u.endIcon)==null?void 0:c.node)==="default"}}const i=dF({leftIcon:t,rightIcon:e,showDefaultIcon:n,defaultIconPosition:r});return{textChildren:o??null,startIcon:t??null,endIcon:e??null,startIconMuted:i.defaultIconAtStart,endIconMuted:i.defaultIconAtEnd,usesDefaultAtStart:i.defaultIconAtStart,usesDefaultAtEnd:i.defaultIconAtEnd}}const mF="group/link inline-flex max-w-full min-w-0 items-center gap-xsmall rounded-mid no-underline outline-none w-fit text-primary focus-ring",pF="min-w-0 truncate font-w-mid",hF="underline decoration-current/70 underline-offset-[0.2em]",gF="text-muted group-hover/link:text-primary group-focus-visible/link:text-primary",bF="text-primary",xF="rotate-[-45deg]",CF={small:"small",base:"base",mid:"mid",large:"large"},H_={small:"icon-small",base:"icon-base",mid:"icon-mid",large:"icon-large"};function _F({slotClass:t,className:e}){return Ea(mF,t,e)}function SF({underline:t,slotClass:e}){return Ea(pF,t&&hF,e)}function vF({size:t,muted:e,slotClass:n}){return Ea(gn,H_[t],"[&_svg]:size-full",e?gF:bF,n)}function yF(t){return Ea(H_[t],xF)}function Ep({size:t}){return d.jsx(we.IoArrowForward,{"aria-hidden":aF,className:yF(t)})}function Lp({children:t,size:e,muted:n=!1,slotClass:r}){return d.jsx("span",{className:vF({size:e,muted:n,slotClass:r}),"aria-hidden":lF,children:t})}function TF({href:t,size:e,underline:n,textVariant:r,textChildren:o,startIcon:s,endIcon:i,startIconMuted:a,endIconMuted:c,usesDefaultAtStart:u,usesDefaultAtEnd:f,className:m="",setAnchorRef:p,handlePointerEnter:b,handlePointerLeave:g,handlePointerDown:h,...x}){const C=iF(),_=s??(u?d.jsx(Ep,{size:e}):null),S=i??(f?d.jsx(Ep,{size:e}):null);return d.jsxs("a",{ref:p,href:t,className:_F({slotClass:C.anchor,className:m}),onPointerEnter:b,onPointerLeave:g,onPointerDown:h,...x,children:[_?d.jsx(Lp,{size:e,muted:a,slotClass:C.iconStart,children:_}):null,d.jsx(ee,{as:"span",variant:r,inheritColor:!0,className:SF({underline:n,slotClass:C.text}),children:o}),S?d.jsx(Lp,{size:e,muted:c,slotClass:C.iconEnd,children:S}):null]})}function rf(t){return null}rf.displayName="Link.Icon";function AF({size:t="base",underline:e=!1,leftIcon:n,rightIcon:r,showDefaultIcon:o=!1,defaultIconPosition:s="end",children:i}){const a=fF({leftIcon:n,rightIcon:r,showDefaultIcon:o,defaultIconPosition:s,children:i});return{size:t,underline:e,textVariant:CF[t],...a}}const of=l.forwardRef(function({href:e,children:n,className:r="",size:o,underline:s,leftIcon:i,rightIcon:a,showDefaultIcon:c,defaultIconPosition:u,onPointerEnter:f,onPointerLeave:m,onPointerDown:p,...b},g){const h=AF({size:o,underline:s,leftIcon:i,rightIcon:a,showDefaultIcon:c,defaultIconPosition:u,children:n}),x=oF({forwardedRef:g,onPointerEnter:f,onPointerLeave:m,onPointerDown:p});return d.jsx(TF,{href:e,size:h.size,underline:h.underline,textVariant:h.textVariant,textChildren:h.textChildren,startIcon:h.startIcon,endIcon:h.endIcon,startIconMuted:h.startIconMuted,endIconMuted:h.endIconMuted,usesDefaultAtStart:h.usesDefaultAtStart,usesDefaultAtEnd:h.usesDefaultAtEnd,className:r,setAnchorRef:x.setAnchorRef,handlePointerEnter:x.handlePointerEnter,handlePointerLeave:x.handlePointerLeave,handlePointerDown:x.handlePointerDown,...b})});of.displayName="Link";const z_=l.forwardRef(function({classNames:e,...n},r){return d.jsx(sF,{classNames:e,children:d.jsx(of,{ref:r,...n})})});z_.displayName="Link";const EF=Object.assign(z_,{Icon:rf,Root:of});function Yr(...t){return R(...t)}const sf=l.createContext(null),sc=l.createContext({});function LF({value:t,children:e}){return d.jsx(sf.Provider,{value:t,children:e})}function wF({classNames:t,children:e}){const n=l.useContext(sc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(sc.Provider,{value:r,children:e})}function V_(){const t=l.useContext(sf);if(!t)throw new Error("TextArea compound parts must be inside <TextArea>.");return t}function IF(){return l.useContext(sf)}function Gs(){return l.useContext(sc)}const RF="Resize height";function NF({shellRef:t,blocked:e,variant:n,resizable:r,onPointerDown:o}){const s=n==="gloss",i=Fo(t,!e&&!s),a=ko(t,!e&&s),c=l.useCallback(f=>{t.current=f,f&&!r&&f.style.removeProperty("height"),!e&&s&&a.bindShellRef(f)},[e,a,s,r,t]),u=l.useCallback(f=>{if(o==null||o(f),f.defaultPrevented||e)return;const m=f.target;if(m instanceof HTMLElement&&m.closest("[data-textarea-resize-handle]"))return;const p=t.current;if(!(!p||de())){if(s){a.onShellPointerDown();return}We(p)}},[e,a,s,o,t]);return{isGloss:s,setShellRef:c,shellPointerDown:u,shellPointerEnter:s?a.onShellPointerEnter:i.onShellPointerEnter,shellPointerLeave:s?a.onShellPointerLeave:i.onShellPointerLeave,shellFocusCapture:s?a.onShellFocusIn:void 0,shellBlurCapture:s?a.onShellFocusOut:void 0,glossShellHoverMotionClass:a.shellHoverMotionClass,standardShellHoverMotionClass:i.shellHoverMotionClass}}const DF={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},kF={small:"min-h-control-small",base:"min-h-control-base",mid:"min-h-control-mid",large:"min-h-control-large"},OF="flex flex-col items-stretch",PF=`box-border block min-h-0 w-full flex-1 resize-none overflow-auto bg-transparent font-inherit text-foreground outline-none placeholder:text-muted appearance-none [field-sizing:content] ${Et}`,BF="absolute bottom-[2px] right-0 block h-px w-[9px] origin-bottom-right rotate-[135deg] bg-muted",jF="absolute bottom-[6px] right-0 block h-px w-[6px] origin-bottom-right rotate-[135deg] bg-muted",MF="relative block size-3 shrink-0",FF="absolute bottom-0 right-0 z-[2] m-0 flex touch-none select-none appearance-none border-0 bg-transparent items-end justify-end p-xsmall",GF="cursor-not-allowed opacity-45",HF="cursor-ns-resize";function zF(t){return le[t].controlPad}function VF({variant:t,status:e,statusTinted:n}){return Ns({variant:t,statusTinted:n&&e!=="default",statusTintClass:e!=="default"?DF[e]:""})}function UF({variant:t,status:e,blocked:n,size:r,shellSurface:o,glossShellHoverMotionClass:s,standardShellHoverMotionClass:i,slotClass:a,className:c}){const u=t==="gloss";return Yr("relative w-full overflow-hidden rounded-base border-1",OF,u&&"relative",kF[r],o,Vr,Ur,u?s:zr(!n,e,t),!u&&i,n?"cursor-not-allowed opacity-55 shadow-token-base":"",a,c)}function $F({size:t,resizable:e,slotClass:n}){return Yr(PF,e&&"pr-mid",zF(t),n,Et)}function WF({disabled:t,slotClass:e}){return Yr(FF,t?GF:HF,e)}const XF=640;function YF(t,e,n,r){const o=l.useCallback(i=>{const a=t.current;a&&(i!=null?a.style.height=`${i}px`:a.style.removeProperty("height"))},[t]);return{onResizePointerDown:l.useCallback(i=>{if(n||!e)return;i.preventDefault(),i.stopPropagation();const a=t.current,c=i.currentTarget;if(!a)return;const u=i.clientY,f=a.getBoundingClientRect().height,m=Fc(r);c.setPointerCapture(i.pointerId);const p=g=>{if(g.pointerId!==i.pointerId)return;const h=Math.min(XF,Math.max(m,f+(g.clientY-u)));o(h)},b=g=>{g.pointerId===i.pointerId&&(c.releasePointerCapture(i.pointerId),c.removeEventListener("pointermove",p),c.removeEventListener("pointerup",b),c.removeEventListener("pointercancel",b))};c.addEventListener("pointermove",p),c.addEventListener("pointerup",b),c.addEventListener("pointercancel",b)},[n,e,o,t,r])}}function KF(){return d.jsxs("span",{"aria-hidden":!0,className:MF,children:[d.jsx("span",{className:BF}),d.jsx("span",{className:jF})]})}function qF({disabled:t,className:e,onPointerDown:n}){return d.jsx("button",{type:"button","data-textarea-resize-handle":!0,"aria-label":RF,disabled:t,onPointerDown:n,className:WF({disabled:t,slotClass:e}),children:d.jsx(KF,{})})}const af=l.forwardRef(function({variant:e="default",status:n,size:r,rows:o=1,resizable:s=!0,placeholder:i,id:a,disabled:c,readOnly:u,className:f,onPointerDown:m,"aria-describedby":p,...b},g){const h=IF(),x=Gs(),C=l.useId(),_=a??(h==null?void 0:h.textareaId)??C,S=n??(h==null?void 0:h.status)??"default",y=r??(h==null?void 0:h.size)??"base",v=(h==null?void 0:h.isRequired)??!1,A=(h==null?void 0:h.hintConnected)??!1,E=(h==null?void 0:h.errorConnected)??!1,T=h==null?void 0:h.hintId,L=h==null?void 0:h.errorId,w=p??Ft(A?T:void 0,E?L:void 0),I=l.useRef(null),N=l.useRef(null),k=l.useCallback(F=>{N.current=F,typeof g=="function"?g(F):g&&(g.current=F)},[g]),j=!!(c||u),G=VF({variant:e,status:S,statusTinted:S==="danger"||S==="success"||S==="warning"}),D=NF({shellRef:I,blocked:j,variant:e,resizable:s,onPointerDown:m}),{onResizePointerDown:O}=YF(I,s,j,y);return d.jsxs("div",{ref:D.setShellRef,"data-slot":"textarea-shell",onPointerDown:D.shellPointerDown,onPointerEnter:D.shellPointerEnter,onPointerLeave:D.shellPointerLeave,onFocusCapture:D.shellFocusCapture,onBlurCapture:D.shellBlurCapture,className:UF({variant:e,status:S,blocked:j,size:y,shellSurface:G,glossShellHoverMotionClass:D.glossShellHoverMotionClass,standardShellHoverMotionClass:D.standardShellHoverMotionClass,slotClass:x.shell,className:f}),children:[d.jsx("textarea",{ref:k,id:_,rows:o,disabled:c,readOnly:u,placeholder:i,"aria-required":v||void 0,"aria-invalid":S==="danger"?!0:void 0,"aria-describedby":w,className:$F({size:y,resizable:s,slotClass:x.control}),...b}),s?d.jsx(qF,{disabled:j,className:x.resizeHandle,onPointerDown:O}):null]})});af.displayName="TextAreaControl";function U_({className:t,classNames:e,...n}){const r=Gs();return d.jsx(Ue,{className:t,classNames:{...e,root:Yr(r.label,e==null?void 0:e.root)},...n})}U_.displayName="TextAreaLabel";function lf({children:t,status:e,className:n,id:r,...o}){const s=V_(),i=Gs(),a=e??(s.status==="danger"||s.status==="default"?"default":s.status);return d.jsx(Xe,{id:r??s.hintId,status:a,className:Yr(i.hint,n),...o,children:t})}lf.displayName="TextAreaHint";function cf({children:t,className:e,id:n,...r}){const o=V_(),s=Gs();return d.jsx(Ze,{id:n??o.errorId,className:Yr(s.error,e),...r,children:t})}cf.displayName="TextAreaError";function ZF({label:t,hint:e,error:n,textareaId:r,labelId:o,size:s,status:i,controlProps:a}){const c=Gs();return d.jsxs(d.Fragment,{children:[t!=null?d.jsx(Ue,{id:o,classNames:{root:c.label},children:t}):null,d.jsx(af,{id:r,size:s,status:i,...a}),e!=null?d.jsx(lf,{children:e}):null,n!=null?d.jsx(cf,{children:n}):null]})}function QF({children:t,label:e,hint:n,error:r,id:o,isRequired:s=!1,status:i="default",size:a="base"}){const c=l.useId(),u=o??`textarea-${c}`,f=Yt(u),m=Kt(u),p=`${u}-label`,b=qt(t),g=n!=null||b&&Te(t,"TextAreaHint"),h=r!=null||b&&Te(t,"TextAreaError"),x=l.useMemo(()=>({textareaId:u,hintId:f,errorId:m,labelId:p,hintConnected:g,errorConnected:h,isRequired:s,status:i,size:a}),[m,h,g,f,s,p,a,i,u]),C=l.useMemo(()=>({controlId:u,labelId:p,isRequired:s}),[s,p,u]);return{fieldCtx:x,fieldLabelCtx:C,isCompound:b,textareaId:u,label:e,hint:n,error:r,status:i,size:a}}function $_({children:t,label:e,hint:n,error:r,className:o,classNames:s,id:i,isRequired:a=!1,status:c="default",size:u="base",...f}){const m=QF({children:t,label:e,hint:n,error:r,id:i,isRequired:a,status:c,size:u}),p=m.isCompound?t:d.jsx(ZF,{label:m.label,hint:m.hint,error:m.error,textareaId:m.textareaId,labelId:m.fieldCtx.labelId,size:m.size,status:m.status,controlProps:f});return d.jsx(LF,{value:m.fieldCtx,children:d.jsx(wF,{classNames:s,children:d.jsx(Xt.Provider,{value:m.fieldLabelCtx,children:d.jsx(pn,{className:Yr(s==null?void 0:s.root,o),children:p})})})})}$_.displayName="TextArea";const JF=Object.assign($_,{Label:U_,Control:af,Hint:lf,Error:cf});function tn(...t){return R(...t)}function W_(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function eG(t){return new Map(t.map(e=>[e.value,e]))}function tG(t){return t.map(e=>e.value)}function nG({optionValues:t,activeValue:e,optionsByValue:n,delta:r}){if(t.length===0)return e;const o=e?t.indexOf(e):-1;let s=o<0?0:o;for(let i=0;i<t.length;i+=1){s=(s+r+t.length)%t.length;const a=t[s],c=n.get(a);if(a&&c&&!c.disabled)return a}return e}function rG(t,e){for(const n of t){const r=e.get(n);if(r&&!r.disabled)return n}return null}function oG(t,e){for(let n=t.length-1;n>=0;n-=1){const r=t[n],o=e.get(r);if(o&&!o.disabled)return r}return null}function sG(t,e){return t||(e==="danger"||e==="default"?"default":e)}const iG=[],X_=l.createContext(null);function aG({value:t,children:e}){return d.jsx(X_.Provider,{value:t,children:e})}function Y_(){const t=l.useContext(X_);if(!t)throw new Error("Select compound-parts must be inside <Select>.");return t}const K_=l.createContext(null);function lG({value:t,children:e}){return d.jsx(K_.Provider,{value:t,children:e})}function La(){const t=l.useContext(K_);if(!t)throw new Error("Select.* must be inside <Select>.");return t}const ic=l.createContext({});function cG({classNames:t,children:e}){const n=l.useContext(ic),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(ic.Provider,{value:r,children:e})}function fr(){return l.useContext(ic)}function uG(t){return`${t}-label`}function dG(t){return`${t}-listbox`}function fG(t){return{hintId:Yt(t),errorId:Kt(t),labelId:uG(t),listId:dG(t)}}function mG(t,e,n){return e&&n?`${t}-opt-${n}`:void 0}function pG(t){return t?"Close list":"Open list"}function q_({anchorRef:t,disabled:e,isGloss:n,groupSegment:r,setOpen:o,onOpened:s,openingRef:i}){if(e||i.current)return;i.current=!0;const a=t.current;if(!a){i.current=!1;return}if(de()){i.current=!1,o(!0),s==null||s();return}(n&&r==null?No(a,!0):We(a)).then(()=>{i.current=!1,!e&&(o(!0),s==null||s())})}function Z_(){return l.useRef(!1)}const hG={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},gG={small:le.small.controlPad,base:le.base.controlPad,mid:le.mid.controlPad,large:le.large.controlPad},bG={small:le.small.chevronIcon,base:le.base.chevronIcon,mid:le.mid.chevronIcon,large:le.large.chevronIcon},xG="relative z-0 flex min-w-0 items-stretch border-1 text-left overflow-hidden motion-reduce:transition-none",CG="min-w-0 flex-1 truncate bg-transparent text-left text-foreground outline-none focus-ring",_G="text-muted",SG="flex shrink-0 origin-center items-center justify-center self-stretch px-small outline-none text-muted hover:text-foreground focus-ring",vG="pointer-events-none",yG="z-[110]",TG="gap-0 p-base",AG="overflow-y-auto overflow-x-hidden",EG="cursor-not-allowed opacity-55 shadow-token-base",LG="cursor-pointer";function wG({variant:t,status:e}){const n=e==="danger"||e==="success"||e==="warning";return Ns({variant:t,statusTinted:n,statusTintClass:n?hG[e]:""})}function IG(t){return t?R(hn(t),$r(t)):"rounded-base"}function RG({variant:t,status:e,disabled:n,groupSegment:r,shellHoverMotionClass:o,className:s,slotClass:i}){const a=t==="gloss";return tn(xG,(r==null?void 0:r.orientation)==="horizontal"?"flex-1":"w-full",IG(r),wG({variant:t,status:e}),Vr,Ur,a?"":zr(!n,e,t),o,n?EG:LG,s,i)}function NG({size:t,muted:e,className:n,slotClass:r}){return tn(CG,gG[t],e&&_G,n,r)}function DG({disabled:t,className:e,slotClass:n}){return tn(SG,t&&vG,e,n)}const uf=l.forwardRef(function({className:e,children:n,groupSegment:r,onPointerEnter:o,onPointerLeave:s,...i},a){const c=Po(),u=On(),f=fr(),m=La(),{open:p,setOpen:b,disabled:g,variant:h,status:x,anchorRef:C,listId:_,valueRef:S,value:y,optionValues:v,setActiveValue:A,activeValue:E,isRequired:T,hintConnected:L,errorConnected:w,hintId:I,errorId:N}=m,k=mG(_,p,E),j=Ft(L?I:void 0,w?N:void 0),P=Z_(),G=h==="gloss",D=c!=null&&c.segmented?void 0:r??(u==null?void 0:u.segment),O=Fo(C,!g&&!G&&D==null),F=ko(C,!g&&G&&D==null),B=l.useCallback(z=>{C.current=z,!g&&G&&F.bindShellRef(z)},[C,g,F,G]),$=l.useCallback(()=>{const z=v.indexOf(y);A(z>=0?y:v[0]??null),requestAnimationFrame(()=>{var H;return(H=S.current)==null?void 0:H.focus()})},[v,A,y,S]),W=l.useCallback(()=>{q_({anchorRef:C,disabled:g,isGloss:G,groupSegment:D,setOpen:b,onOpened:$,openingRef:P})},[C,g,$,D,G,b,P]),M=l.useCallback(z=>{g||p||z.button===0&&W()},[g,p,W]);return d.jsx("div",{ref:W_(a,B),role:"combobox","aria-expanded":p,"aria-controls":p?_:void 0,"aria-haspopup":"listbox","aria-activedescendant":p?k:void 0,"aria-required":T||void 0,"aria-invalid":x==="danger"?!0:void 0,"aria-describedby":j,"aria-disabled":g||void 0,tabIndex:g?-1:0,onPointerDown:M,onPointerEnter:z=>{o==null||o(z),!z.defaultPrevented&&(G&&D==null?F.onShellPointerEnter(z):O.onShellPointerEnter(z))},onPointerLeave:z=>{s==null||s(z),G&&D==null?F.onShellPointerLeave(z):O.onShellPointerLeave(z)},onFocusCapture:G&&!g&&D==null?F.onShellFocusIn:void 0,onBlurCapture:G&&!g&&D==null?F.onShellFocusOut:void 0,...g&&G?{"data-gloss-disabled":""}:{},className:RG({variant:h,status:x,disabled:g,groupSegment:D,shellHoverMotionClass:G?F.shellHoverMotionClass:O.shellHoverMotionClass,className:e,slotClass:f.triggerGroup}),...i,children:n})});uf.displayName="SelectTriggerGroup";const df=l.forwardRef(function({className:e,onKeyDown:n,onBlur:r,children:o,placeholder:s,...i},a){const c=fr(),u=La(),{selectId:f,open:m,setOpen:p,value:b,setValue:g,activeValue:h,setActiveValue:x,valueRef:C,anchorRef:_,options:S,optionValues:y,disabled:v,placeholder:A,size:E,variant:T,formValueRef:L,formOnBlur:w}=u,I=s??A,N=Z_(),k=T==="gloss",j=l.useMemo(()=>eG(S),[S]),P=l.useMemo(()=>j.get(b),[j,b]),G=l.useCallback(()=>{const M=y.indexOf(b);x(M>=0?b:y[0]??null),requestAnimationFrame(()=>{var z;return(z=C.current)==null?void 0:z.focus()})},[y,x,b,C]),D=l.useCallback(()=>{q_({anchorRef:_,disabled:v,isGloss:k,setOpen:p,onOpened:G,openingRef:N})},[_,v,G,k,p,N]),O=l.useCallback(M=>{const z=nG({optionValues:y,activeValue:h,optionsByValue:j,delta:M});z&&x(z)},[h,y,j,x]),F=l.useCallback(M=>{var H;const z=j.get(M);!z||z.disabled||(g(M),p(!1),(H=C.current)==null||H.focus())},[j,p,g,C]),B=l.useCallback(M=>{if(n==null||n(M),!(M.defaultPrevented||v)){if(!m){if(M.key==="ArrowDown"||M.key==="ArrowUp"){M.preventDefault(),D();return}if(M.key==="Enter"||M.key===" "){M.preventDefault(),D();return}return}if(M.key==="ArrowDown"){M.preventDefault(),O(1);return}if(M.key==="ArrowUp"){M.preventDefault(),O(-1);return}if(M.key==="Enter"||M.key===" "){M.preventDefault(),h&&F(h);return}if(M.key==="Escape"){M.preventDefault(),p(!1);return}if(M.key==="Home"){M.preventDefault();const z=rG(y,j);z&&x(z);return}if(M.key==="End"){M.preventDefault();const z=oG(y,j);z&&x(z)}}},[h,O,v,n,m,D,y,j,F,x,p]),$=l.useCallback(M=>{r==null||r(M),w==null||w()},[w,r]),W=o??(P?P.label:I);return d.jsx("button",{ref:W_(a,C,L),id:f,type:"button",disabled:v,className:NG({size:E,muted:!P,className:e,slotClass:c.value}),onKeyDown:B,onBlur:$,...i,children:W})});df.displayName="SelectValue";const ff=l.forwardRef(function({className:e,onPointerDown:n,...r},o){const s=fr(),{open:i,setOpen:a,disabled:c,size:u,valueRef:f}=La(),m=l.useRef(null),p=Hr(i,m),b=l.useCallback(h=>{p(h),typeof o=="function"?o(h):o&&(o.current=h)},[p,o]),g=l.useCallback(h=>{if(n==null||n(h),h.stopPropagation(),!c){if(i){a(!1);return}h.button===0&&(a(!0),requestAnimationFrame(()=>{var x;return(x=f.current)==null?void 0:x.focus()}))}},[c,n,i,a,f]);return d.jsx("button",{type:"button",ref:b,tabIndex:-1,disabled:c,"aria-label":pG(i),className:DG({disabled:c,className:e,slotClass:s.trigger}),onPointerDown:g,...r,children:d.jsx(we.IoChevronDown,{className:tn(bG[u],s.triggerIcon),"aria-hidden":!0})})});ff.displayName="SelectTrigger";function mf({children:t,className:e,offset:n=Rs,...r}){const o=fr(),{open:s,setOpen:i,anchorRef:a,listId:c,labelId:u,labelConnected:f,placeholder:m,menuMaxHeight:p,options:b,optionValues:g,value:h,setValue:x,activeValue:C,setActiveValue:_,variant:S}=La(),y=l.useCallback(A=>{const E=Array.isArray(A)?A[0]??"":A;x(E),i(!1)},[i,x]),v=t??(g.length===0?d.jsx(wr.Empty,{}):g.map(A=>{const E=b.find(T=>T.value===A);return d.jsx(wr.Item,{value:A,disabled:E.disabled,label:E.label,hint:E.hint,icon:E.icon},A)}));return d.jsx(kt,{open:s,onOpenChange:i,side:"bottom",anchorRef:a,variant:S==="gloss"?"gloss":"default",children:d.jsx(kt.Content,{matchAnchorWidth:!0,unstyled:!0,contentRole:void 0,offset:n,className:tn(yG,o.popover,e),...r,children:d.jsx(kt.Body,{className:tn(TG,o.popoverBody),children:d.jsx(wr,{listId:c,"aria-labelledby":f?u:void 0,"aria-label":f?void 0:m,value:h,onValueChange:y,activeValue:C,onActiveValueChange:_,selectionIndicator:!0,className:tn(AG,o.listBox),style:{maxHeight:p},children:v})})})})}mf.displayName="SelectPopover";function Q_({className:t,classNames:e,...n}){const r=fr();return d.jsx(Ue,{className:t,classNames:{...e,root:tn(r.label,e==null?void 0:e.root)},...n})}Q_.displayName="SelectLabel";function pf({children:t,status:e,className:n,id:r,...o}){const s=Y_(),i=fr(),a=sG(e,s.status);return d.jsx(Xe,{id:r??s.hintId,status:a,className:tn(i.hint,n),...o,children:t})}pf.displayName="SelectHint";function hf({children:t,className:e,id:n,...r}){const o=Y_(),s=fr();return d.jsx(Ze,{id:n??o.errorId,className:tn(s.error,e),...r,children:t??o.errorMessage})}hf.displayName="Select.Error";function kG({label:t,hint:e,error:n,labelId:r}){const o=fr();return d.jsxs(d.Fragment,{children:[t!=null?d.jsx(Ue,{id:r,classNames:{root:o.label},children:t}):null,d.jsxs(uf,{children:[d.jsx(df,{}),d.jsx(ff,{})]}),d.jsx(mf,{}),e!=null?d.jsx(pf,{children:e}):null,n!=null?d.jsx(hf,{children:n}):null]})}function OG({children:t,label:e,hint:n,error:r,id:o,name:s,isRequired:i=!1,status:a="default",size:c="base",options:u=iG,value:f,defaultValue:m,onValueChange:p,variant:b,disabled:g=!1,placeholder:h="Select a value",menuMaxHeight:x="min(24rem, 70vh)"}){const C=Kb({name:s,value:f,disabled:g}),_=C.bound,S=C.disabled??g,y=l.useId(),v=On(),A=b??((v==null?void 0:v.variant)!=null?Hu(v.variant):"default"),E=o??`select-${y}`,{hintId:T,errorId:L,labelId:w,listId:I}=fG(E),N=qt(t),k=e!=null||N&&Te(t,"Label"),j=n!=null||N&&Te(t,"SelectHint"),P=r!=null||N&&Te(t,"SelectError"),G=f!==void 0||_,[D,O]=l.useState(m??""),F=_?String(C.value??""):G?f??"":D,B=l.useCallback(me=>{G||O(me),p==null||p(me),_&&C.setValue(me)},[_,C,G,p]),[$,W]=l.useState(!1),[M,z]=l.useState(null),H=l.useRef(null),oe=l.useRef(null),pe=l.useMemo(()=>tG(u),[u]);l.useEffect(()=>{var me;!$||!M||(me=document.getElementById(`${I}-opt-${M}`))==null||me.scrollIntoView({block:"nearest"})},[M,I,$]);const ce=l.useMemo(()=>({selectId:E,hintId:T,errorId:L,labelId:w,labelConnected:k,hintConnected:j,errorConnected:P,isRequired:i,status:a,size:c,errorMessage:r}),[E,r,L,P,j,k,T,i,w,c,a]),Y=l.useMemo(()=>({...ce,open:$,setOpen:W,value:F,setValue:B,listId:I,activeValue:M,setActiveValue:z,anchorRef:H,valueRef:oe,variant:A,disabled:S,placeholder:h,menuMaxHeight:x,options:u,optionValues:pe,formValueRef:_?C.ref:void 0,formOnBlur:_?C.onBlur:void 0}),[M,S,ce,_,C,I,x,$,pe,u,h,B,F,A]),ne=l.useMemo(()=>({controlId:E,labelId:w,isRequired:i}),[E,i,w]);return{isCompound:N,label:e,hint:n,error:r,children:t,fieldCtx:ce,selectCtx:Y,fieldLabelCtx:ne}}function J_({children:t,label:e,hint:n,error:r,className:o,classNames:s,id:i,isRequired:a,status:c,size:u,options:f,value:m,defaultValue:p,onValueChange:b,variant:g,disabled:h,placeholder:x,menuMaxHeight:C,name:_,...S}){const y=xn(),v=typeof _=="string"?_:void 0,A=v?y==null?void 0:y.getError(v):void 0,E=r??A,T=c==="default"&&A?"danger":c,L=u??(y==null?void 0:y.size)??"base",w=OG({children:t,label:e,hint:n,error:E,id:i,name:_,isRequired:a,status:T,size:L,options:f,value:m,defaultValue:p,onValueChange:b,variant:g,disabled:h,placeholder:x,menuMaxHeight:C});return d.jsx(aG,{value:w.fieldCtx,children:d.jsx(lG,{value:w.selectCtx,children:d.jsx(cG,{classNames:s,children:d.jsx(Xt.Provider,{value:w.fieldLabelCtx,children:d.jsx(pn,{className:tn(o,s==null?void 0:s.root),...S,children:w.isCompound?t:d.jsx(kG,{label:w.label,hint:w.hint,error:w.error,labelId:w.fieldCtx.labelId})})})})})})}J_.displayName="Select";const PG=Object.assign(J_,{Label:Q_,TriggerGroup:uf,Value:df,Trigger:ff,Popover:mf,Hint:pf,Error:hf});function Ve(...t){return R(...t)}function BG(t){return t==="default"?"base":t}function jG({slotClassNames:t,classNames:e,className:n}){return{shell:Ve(t.indicator,e==null?void 0:e.shell,e==null?void 0:e.indicator,n),fill:Ve(t.indicatorFill,e==null?void 0:e.fill,e==null?void 0:e.indicatorFill),mark:Ve(t.indicatorMark,e==null?void 0:e.mark,e==null?void 0:e.indicatorMark)}}function MG(t){let e=!1;const n=r=>{if(!e)for(const o of l.Children.toArray(r)){if(!l.isValidElement(o))continue;const s=o.props;if(s.htmlFor!=null){e=!0;return}n(s.children)}};return n(t),e}function FG(t){return!/\bflex-col\b/.test(t??"")}function GG(t,e){const n=t!==void 0,[r,o]=l.useState(!!e),s=n?!!t:r,i=l.useCallback(a=>{n||o(a)},[n]);return[s,i,n]}const eS=l.createContext(null),ac=l.createContext({});function wp({value:t,children:e}){return d.jsx(eS.Provider,{value:t,children:e})}function Ip({classNames:t,children:e}){const n=l.useContext(ac),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(ac.Provider,{value:r,children:e})}function Kr(){const t=l.useContext(eS);if(!t)throw new Error("Checkbox.* parts must be used inside <Checkbox>.");return t}function qr(){return l.useContext(ac)}function HG(){const t=Kr(),e=l.useRef(null),n=l.useRef(!0),r=de();return l.useLayoutEffect(()=>{const o=e.current;if(!o)return;if(r){V(o),o.style.opacity=t.isDisabled?"0.48":"1";return}if(n.current){n.current=!1,o.style.opacity=t.isDisabled?"0.48":"1";return}V(o);const s=Number.parseFloat(getComputedStyle(o).opacity),i=Number.isFinite(s)?s:1;X.fromTo(o,{autoAlpha:i},{autoAlpha:t.isDisabled?.48:1,...ve(),overwrite:"auto"})},[t.isDisabled,r]),e}function zG({isDisabled:t,enableTextMotion:e,textMotionRef:n,onPointerDown:r}){return lr({isDisabled:t,enabled:e,textMotionRef:n,onPointerDown:r})}const Hs={small:{title:"small",desc:"tools",gridGap:"gap-x-small gap-y-xsmall"},base:{title:"base",desc:"small",gridGap:"gap-x-base gap-y-xsmall"},mid:{title:"mid",desc:"small",gridGap:"gap-x-plus gap-y-xsmall"},large:{title:"large",desc:"base",gridGap:"gap-x-plus gap-y-xsmall"}},VG="absolute m-[-1px] h-px w-px overflow-hidden border-0 p-0 opacity-0 [clip:rect(0,0,0,0)]",UG="absolute inset-0 z-[2] m-0 h-full w-full cursor-pointer opacity-0",$G="relative inline-flex shrink-0 items-center justify-center",WG="relative inline-flex items-center justify-center",XG="min-w-0",YG="cursor-pointer",KG="inline-flex flex-wrap items-center gap-x-xsmall gap-y-0 font-w-mid",qG="min-w-0",ZG="origin-center will-change-transform",tS="text-muted",nS="text-danger",QG="text-danger",rS="text-muted",oS="text-muted",JG="origin-center will-change-transform",eH="min-w-0 font-w-mid",tH="relative cursor-pointer select-none rounded-small text-left",nH="cursor-not-allowed",rH="has-[:focus-visible]:outline has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-primary",oH="m-0 min-w-0 border-0 p-0",sH="contents";function iH(){return ua()}function aH(t,e,n){return R(tH,wu(t,e),rH,n)}function sS(){return da()}function zi(t){return fa(t)}function iS(t){return Iu(t)}const gf=l.forwardRef(function({className:e,children:n,...r},o){const s=Kr(),i=qr(),a=HG();return d.jsx("span",{ref:o,className:Ve($G,iH(),i.control,e),...r,children:d.jsxs("span",{ref:a,className:Ve(WG,i.controlTrack),children:[d.jsx("input",{ref:s.inputProps.inputRef,id:s.inputId,type:"checkbox",className:s.isCompound?Ve(UG,i.input):Ve(VG,i.input),disabled:s.isDisabled,name:s.inputProps.name,value:s.inputProps.value,required:s.inputProps.required,form:s.inputProps.form,autoFocus:s.inputProps.autoFocus,tabIndex:s.inputProps.tabIndex,readOnly:s.inputProps.readOnly,onBlur:s.inputProps.onBlur,onFocus:s.inputProps.onFocus,"aria-invalid":s.inputProps.ariaInvalid,"aria-describedby":Ft(s.hintConnected?s.hintId:void 0,s.errorConnected?s.errorId:void 0),"aria-labelledby":s.labelConnected?s.labelId:void 0,"aria-label":s.labelConnected?void 0:s.accessibleName,...s.isControlled?{checked:s.mergedChecked,onChange:s.onChange}:{defaultChecked:s.inputProps.defaultChecked,onChange:s.onChange}}),n??d.jsx(bf,{})]})})});gf.displayName="CheckboxControl";function bf({children:t,className:e,classNames:n,size:r,...o}){const s=Kr(),i=qr();return d.jsx(Bt,{variant:BG(s.variant),size:r??s.size,selected:s.mergedChecked,icon:s.checkIcon??void 0,check:!0,classNames:jG({slotClassNames:i,classNames:n,className:e}),...o,children:t})}bf.displayName="CheckboxIndicator";const aS=l.forwardRef(function({className:e,children:n,...r},o){const s=Kr(),i=qr(),a=Ve(sH,s.isCompound&&XG,i.content,e);return s.isCompound&&!MG(n)?d.jsx("label",{ref:o,htmlFor:s.inputId,id:s.labelId,className:Ve(a,!s.isDisabled&&YG),...r,children:n}):d.jsx("div",{ref:o,className:a,...r,children:n})});aS.displayName="CheckboxContent";function lS({children:t,className:e,isRequired:n,id:r,...o}){const s=Kr(),i=qr(),a=xu(),c=n??(a==null?void 0:a.isRequired)??!1,u=Hs[s.size];return d.jsxs("span",{id:r,ref:f=>{s.isCompound&&s.useInlineCompoundMotion&&(s.textMotionRef.current=f)},className:Ve(KG,s.isCompound&&sS(),s.isCompound&&(s.hasCompoundHint||s.hasCompoundError)&&qG,s.isCompound&&s.useInlineCompoundMotion&&ZG,i.label,e),...o,children:[d.jsx(ee,{as:"span",variant:u.title,inheritColor:!0,className:Ve(s.isDisabled&&tS,!s.isDisabled&&s.danger&&nS,i.labelText),children:t}),c?d.jsx("span",{className:Ve(QG,i.requiredMark),"aria-hidden":!0,children:"*"}):null]})}lS.displayName="CheckboxLabel";function cS({children:t,className:e,variant:n,...r}){const o=Kr(),s=qr();return d.jsx(Xe,{as:"span",id:o.hintId,variant:n??Hs[o.size].desc,className:Ve(o.isCompound&&zi(2),o.isDisabled&&rS,s.hint,e),...r,children:t})}cS.displayName="CheckboxHint";function uS({children:t,className:e,...n}){const r=Kr(),o=qr();return d.jsx(Ze,{as:"span",id:r.errorId,variant:Hs[r.size].desc,className:Ve(r.isCompound&&zi(iS(r.hasCompoundHint)),r.isDisabled&&oS,o.error,e),...n,children:t})}uS.displayName="CheckboxError";function lH({label:t,hint:e,error:n,hasHint:r,hasError:o,secondaryLines:s,textColRef:i,size:a,isDisabled:c,danger:u,hintId:f,errorId:m}){const p=qr(),b=Hs[a];return d.jsxs(d.Fragment,{children:[d.jsx(gf,{}),d.jsx("span",{ref:i,className:Ve(sS(),!s&&JG,p.simpleLabelWrap,p.label),children:d.jsx(ee,{as:"span",variant:b.title,inheritColor:!0,className:Ve(eH,c&&tS,!c&&u&&nS,p.simpleLabelText,p.labelText),children:t})}),r?d.jsx(Xe,{as:"span",id:f,variant:b.desc,className:Ve(zi(2),c&&rS,p.hint),children:e}):null,o?d.jsx(Ze,{as:"span",id:m,variant:b.desc,className:Ve(zi(iS(r)),c&&oS,p.error),children:n}):null]})}function cH(t,e){return t??`checkbox-${e}`}function uH(t){return Yt(t)}function dH(t){return Kt(t)}function fH(t){return`${t}-label`}function mH({size:t="base",variant:e="default",checkIcon:n,danger:r=!1,disabled:o,checked:s,defaultChecked:i,onChange:a,id:c,name:u,value:f,required:m,form:p,autoFocus:b,tabIndex:g,readOnly:h,onBlur:x,onFocus:C,"aria-label":_,label:S,hint:y,error:v},A,E){const T=HP(),L=f!=null?String(f):void 0,w=(T==null?void 0:T.selection)==="single"&&T!=null&&L!=null,I=ad({name:u,value:s,onChange:a,onBlur:x,disabled:o,readOnly:h,type:"checkbox"}),N=I.bound&&T==null,k=l.useId(),j=cH(c,k),P=uH(j),G=dH(j),D=fH(j),O=s!==void 0,F=w?T.selectedValue===L:void 0,B=N?!!I.checked:void 0,$=O?s:B!==void 0?B:F!==void 0?F:void 0,[W,M,z]=GG($,w||O||N?void 0:i),H=!!(o??(T==null?void 0:T.disabled)??I.disabled),oe=qt(A),pe=oe&&Te(A,"Label"),ce=oe?Te(A,"CheckboxHint"):!1,Y=oe?Te(A,"CheckboxError"):!1,ne=oe&&FG(E),me=!H&&(!oe||ne),re=Hs[t],xe=y!=null,te=v!=null,U=oe?(ce?1:0)+(Y?1:0):(xe?1:0)+(te?1:0),ae=l.useRef(null),he=l.useCallback(ue=>{const Pe=ue.target.checked;if(!z&&!w&&!N&&M(Pe),a==null||a(ue),!ue.defaultPrevented){if(w){T.selectSingleValue(L,Pe);return}N&&I.onChange(ue)}},[N,I,T,w,z,a,L,M]),Ne=l.useCallback(ue=>{x==null||x(ue),N&&I.onBlur(ue)},[N,I,x]),Ye=m??(w&&T.isRequired?T.claimRequiredAnchor():void 0),q=l.useMemo(()=>({inputId:j,hintId:P,errorId:G,labelId:D,size:t,variant:e,mergedChecked:W,isDisabled:H,isControlled:z,isCompound:oe,hasCompoundHint:ce,hasCompoundError:Y,hintConnected:oe?ce:xe,errorConnected:oe?Y:te,labelConnected:pe,accessibleName:_,useInlineCompoundMotion:ne,textMotionRef:ae,danger:r,checkIcon:n,onChange:he,inputProps:{name:I.name??u,value:f,defaultChecked:!z&&!N?i:void 0,required:Ye,form:p,autoFocus:b,tabIndex:g,readOnly:I.readOnly??h,onBlur:Ne,onFocus:C,inputRef:N?I.ref:void 0,ariaInvalid:N?I["aria-invalid"]:void 0}}),[_,n,r,i,p,I,N,b,G,Ne,he,P,Y,ce,pe,te,xe,j,oe,z,H,D,W,u,C,Ye,h,t,g,ne,f,e]),se=l.useMemo(()=>({controlId:j,labelId:D,isRequired:!!m}),[j,D,m]);return{contextValue:q,fieldLabelContext:se,isCompound:oe,isDisabled:H,mergedChecked:W,enableTextMotion:me,textColRef:ae,secondaryLines:U,sz:re,hasHint:xe,hasError:te,label:S,hint:y,error:v,hintId:P,errorId:G,danger:r}}const dS=l.forwardRef(function({children:e,label:n,hint:r,error:o,size:s,variant:i,checkIcon:a,danger:c,disabled:u,checked:f,defaultChecked:m,onChange:p,id:b,name:g,value:h,required:x,form:C,autoFocus:_,tabIndex:S,readOnly:y,onBlur:v,onFocus:A,className:E,classNames:T,onPointerDown:L,"aria-label":w,...I},N){const k=xn(),j=typeof g=="string"?g:void 0,P=j?k==null?void 0:k.getError(j):void 0,O=mH({size:s,variant:i,checkIcon:a,danger:c||!!P,disabled:u,checked:f,defaultChecked:m,onChange:p,id:b,name:g,value:h,required:x,form:C,autoFocus:_,tabIndex:S,readOnly:y,onBlur:v,onFocus:A,"aria-label":w,label:n,hint:r,error:o??P},e,E),{handlePointerDown:F}=zG({isDisabled:O.isDisabled,enableTextMotion:O.enableTextMotion,textMotionRef:O.textColRef,onPointerDown:L}),B=Ve(aH(O.secondaryLines,O.sz.gridGap,E),O.isDisabled&&nH,T==null?void 0:T.root);return O.isCompound?d.jsx(wp,{value:O.contextValue,children:d.jsx(Ip,{classNames:T,children:d.jsx(Xt.Provider,{value:O.fieldLabelContext,children:d.jsx("fieldset",{ref:N,"aria-labelledby":O.contextValue.labelConnected?O.contextValue.labelId:void 0,"data-checked":O.mergedChecked?!0:void 0,className:Ve(B,oH),onPointerDown:F,...I,children:e})})})}):d.jsx(wp,{value:O.contextValue,children:d.jsx(Ip,{classNames:T,children:d.jsx("label",{ref:N,htmlFor:O.contextValue.inputId,"data-checked":O.mergedChecked?!0:void 0,className:B,...I,onPointerDown:F,children:d.jsx(lH,{label:O.label,hint:O.hint,error:O.error,hasHint:O.hasHint,hasError:O.hasError,secondaryLines:O.secondaryLines,textColRef:O.textColRef,size:O.contextValue.size,isDisabled:O.isDisabled,danger:O.danger,hintId:O.hintId,errorId:O.errorId})})})})});dS.displayName="CheckboxRoot";const pH=Object.assign(bf,{Fill:Bt.Fill,Mark:Bt.Mark}),hH=Object.assign(dS,{Control:gf,Indicator:pH,Content:aS,Label:lS,Hint:cS,Error:uS});function wa({active:t,size:e="base",gloss:n=!1,shellRef:r,fillRef:o,className:s,children:i,...a}){const c=l.useRef(null),u=o??c;ab(t,u);const f=n?R(Hl,"gloss-indicator size-full min-h-0 min-w-0 origin-center border-0",s):R(Hl,"size-full min-h-0 min-w-0 origin-center border border-primary bg-surface",s),m=n?mI:nb("base");return d.jsxs("span",{ref:r,className:f,"aria-hidden":!0,...a,children:[d.jsx("span",{ref:u,"aria-hidden":!0,className:m,style:{transform:"scale(0)",opacity:0}}),i]})}wa.displayName="SelectionThumb";function Ia({size:t="base",highlighted:e=!1,gloss:n=!1,iconRef:r,className:o,children:s,style:i,...a}){const c=n?"text-foreground":e?"text-indicator-foreground":"text-primary";return d.jsx("span",{ref:r,"aria-hidden":!0,className:R("pointer-events-none z-[2] flex items-center justify-center",c,o),style:i,...a,children:d.jsx("span",{className:R("inline-flex shrink-0 items-center justify-center [&_svg]:size-full",Lu[t]),children:s})})}Ia.displayName="SelectionThumbIcon";function tt(...t){return R(...t)}function gH(t){return t==="gloss"?"gloss":"base"}function bH({slotClassNames:t,classNames:e,className:n}){return{shell:tt(t.indicator,e==null?void 0:e.shell,e==null?void 0:e.indicator,n),fill:tt(t.indicatorFill,e==null?void 0:e.fill,e==null?void 0:e.indicatorFill),mark:tt(t.indicatorMark,e==null?void 0:e.mark,e==null?void 0:e.indicatorMark)}}function xH(t){return!/\bflex-col\b/.test(t??"")}function CH(t,e){const n=t!==void 0,[r,o]=l.useState(!!e),s=n?!!t:r,i=l.useCallback(a=>{n||o(a)},[n]);return[s,i,n]}const fS=l.createContext(null),lc=l.createContext({});function _H({value:t,children:e}){return d.jsx(fS.Provider,{value:t,children:e})}function SH({classNames:t,children:e}){const n=l.useContext(lc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(lc.Provider,{value:r,children:e})}function Zr(){const t=l.useContext(fS);if(!t)throw new Error("Radio.* parts must be used inside <Radio>.");return t}function Qr(){return l.useContext(lc)}function vH(){const t=Zr(),e=l.useRef(null),n=l.useRef(!0),r=de();return l.useLayoutEffect(()=>{const o=e.current;if(!o)return;if(r){V(o),o.style.opacity=t.isDisabled?"0.48":"1";return}if(n.current){n.current=!1,o.style.opacity=t.isDisabled?"0.48":"1";return}V(o);const s=Number.parseFloat(getComputedStyle(o).opacity),i=Number.isFinite(s)?s:1;X.fromTo(o,{autoAlpha:i},{autoAlpha:t.isDisabled?.48:1,...ve(),overwrite:"auto"})},[t.isDisabled,r]),e}function yH({isDisabled:t,enableTextMotion:e,textMotionRef:n,onPointerDown:r}){return lr({isDisabled:t,enabled:e,textMotionRef:n,onPointerDown:r})}function TH(t,e){return t??`radio-${e}`}function AH(t){return Yt(t)}function EH(t){return Kt(t)}function LH(t){return t!=null?String(t):"Option"}const zs={small:{title:"small",desc:"tools",gridGap:"gap-x-small gap-y-xsmall"},base:{title:"base",desc:"small",gridGap:"gap-x-base gap-y-xsmall"},mid:{title:"mid",desc:"small",gridGap:"gap-x-plus gap-y-xsmall"},large:{title:"large",desc:"base",gridGap:"gap-x-plus gap-y-xsmall"}},wH="absolute m-[-1px] h-px w-px overflow-hidden border-0 p-0 opacity-0 [clip:rect(0,0,0,0)]",IH="relative inline-flex shrink-0 items-center justify-center",RH="relative inline-flex items-center justify-center",NH="min-w-0",DH="inline-flex flex-wrap items-center gap-x-xsmall gap-y-0",kH="min-w-0",OH="origin-center will-change-transform",mS="text-muted",pS="text-danger",PH="text-danger",hS="text-muted",gS="text-muted",BH="origin-center will-change-transform",jH="min-w-0",MH="relative cursor-pointer select-none rounded-small text-left",FH="cursor-not-allowed",GH="has-[:focus-visible]:outline has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-primary",HH="contents";function zH(){return ua()}function VH(t,e,n){return R(MH,wu(t,e),GH,n)}function bS(){return da()}function Vi(t){return fa(t)}function xS(t){return Iu(t)}const xf=l.forwardRef(function({className:e,children:n,...r},o){const s=Zr(),i=Qr(),a=vH();return d.jsxs("span",{ref:o,className:tt(IH,zH(),i.control,e),...r,children:[d.jsx("input",{id:s.inputId,type:"radio",className:tt(wH,i.input),checked:s.mergedChecked,disabled:s.isDisabled,name:s.inputName,value:s.inputProps.value,required:s.inputProps.required,form:s.inputProps.form,autoFocus:s.inputProps.autoFocus,tabIndex:s.inputProps.tabIndex,readOnly:s.inputProps.readOnly,onBlur:s.inputProps.onBlur,onFocus:s.inputProps.onFocus,"aria-describedby":Ft(s.hintConnected?s.hintId:void 0,s.errorConnected?s.errorId:void 0),"aria-label":LH(s.inputProps.value),onChange:s.onChange,onClick:s.onActivate}),d.jsx("span",{ref:a,className:tt(RH,i.controlTrack),children:n??d.jsx(Cf,{})})]})});xf.displayName="RadioControl";function Cf({children:t,className:e,classNames:n,size:r,...o}){const s=Zr(),i=Qr();return d.jsx(Bt,{size:r??s.size,variant:gH(s.variant),selected:s.mergedChecked,dot:!0,classNames:bH({slotClassNames:i,classNames:n,className:e}),...o,children:t})}Cf.displayName="RadioIndicator";const CS=l.forwardRef(function({className:e,children:n,...r},o){const s=Zr(),i=Qr();return d.jsx("div",{ref:o,className:tt(HH,s.isCompound&&NH,i.content,e),...r,children:n})});CS.displayName="RadioContent";function _S({children:t,className:e,isRequired:n,...r}){const o=Zr(),s=Qr(),i=xu(),a=n??(i==null?void 0:i.isRequired)??!1,c=zs[o.size];return d.jsxs("span",{ref:u=>{o.isCompound&&o.useInlineCompoundMotion&&(o.textMotionRef.current=u)},className:tt(DH,o.isCompound&&bS(),o.isCompound&&(o.hasCompoundHint||o.hasCompoundError)&&kH,o.isCompound&&o.useInlineCompoundMotion&&OH,s.label,e),...r,children:[d.jsx(ee,{as:"span",variant:c.title,inheritColor:!0,className:tt(o.isDisabled&&mS,!o.isDisabled&&o.danger&&pS,s.labelText),children:t}),a?d.jsx("span",{className:tt(PH,s.requiredMark),"aria-hidden":!0,children:"*"}):null]})}_S.displayName="RadioLabel";function SS({children:t,className:e,variant:n,...r}){const o=Zr(),s=Qr();return d.jsx(Xe,{as:"span",id:o.hintId,variant:n??zs[o.size].desc,className:tt(o.isCompound&&Vi(2),o.isDisabled&&hS,s.hint,e),...r,children:t})}SS.displayName="RadioHint";function vS({children:t,className:e,...n}){const r=Zr(),o=Qr();return d.jsx(Ze,{as:"span",id:r.errorId,variant:zs[r.size].desc,className:tt(r.isCompound&&Vi(xS(r.hasCompoundHint)),r.isDisabled&&gS,o.error,e),...n,children:t})}vS.displayName="RadioError";function UH({label:t,hint:e,error:n,hasHint:r,hasError:o,secondaryLines:s,textColRef:i,size:a,isDisabled:c,danger:u,hintId:f,errorId:m}){const p=Qr(),b=zs[a];return d.jsxs(d.Fragment,{children:[d.jsx(xf,{}),d.jsx("span",{ref:i,className:tt(bS(),!s&&BH,p.simpleLabelWrap,p.label),children:d.jsx(ee,{as:"span",variant:b.title,inheritColor:!0,className:tt(jH,c&&mS,!c&&u&&pS,p.simpleLabelText,p.labelText),children:t})}),r?d.jsx(Xe,{as:"span",id:f,variant:b.desc,className:tt(Vi(2),c&&hS,p.hint),children:e}):null,o?d.jsx(Ze,{as:"span",id:m,variant:b.desc,className:tt(Vi(xS(r)),c&&gS,p.error),children:n}):null]})}function $H({size:t="base",variant:e="default",danger:n=!1,disabled:r,checked:o,defaultChecked:s,onChange:i,id:a,name:c,value:u,required:f,form:m,autoFocus:p,tabIndex:b,readOnly:g,onBlur:h,onFocus:x,label:C,hint:_,error:S},y,v,A){const E=$P(),T=u!=null?String(u):void 0,L=E!=null&&T!=null,w=l.useId(),I=TH(a,w),N=AH(I),k=EH(I),j=o!==void 0,P=L?E.selectedValue===T:void 0,G=j?o:P!==void 0?P:void 0,[D,O,F]=CH(G,L||j?void 0:s),B=c??(E==null?void 0:E.name),$=!!(r??(E==null?void 0:E.disabled)),W=qt(y),M=W?Te(y,"RadioHint"):!1,z=W?Te(y,"RadioError"):!1,H=W&&xH(v),oe=!$&&(!W||H),pe=zs[t],ce=_!=null,Y=S!=null,ne=W?(M?1:0)+(z?1:0):(ce?1:0)+(Y?1:0),me=l.useRef(null),re=l.useCallback(he=>{!j&&!L&&O(he.target.checked),i==null||i(he),!he.defaultPrevented&&L&&he.target.checked&&T!=null&&E.selectValue(T)},[E,L,j,i,T,O]),xe=!$&&!g&&!f&&!(L&&E.isRequired),te=f??(L&&E.isRequired?E.claimRequiredAnchor():void 0),U=l.useCallback(he=>{if(A==null||A(he),!(he.defaultPrevented||!xe||!D)){if(he.preventDefault(),L){E.selectValue(void 0);return}j||O(!1)}},[xe,E,L,j,D,A,O]);return{contextValue:l.useMemo(()=>({inputId:I,hintId:N,errorId:k,size:t,variant:e,mergedChecked:D,isDisabled:$,isControlled:F,isCompound:W,hasCompoundHint:M,hasCompoundError:z,hintConnected:W?M:ce,errorConnected:W?z:Y,useInlineCompoundMotion:H,textMotionRef:me,danger:n,inputName:B,onChange:re,onActivate:U,inputProps:{value:u,defaultChecked:F?void 0:s,required:te,form:m,autoFocus:p,tabIndex:b,readOnly:g,onBlur:h,onFocus:x}}),[n,s,m,p,k,re,U,z,M,Y,ce,N,I,B,W,H,F,$,D,h,x,te,g,t,b,u,e]),isCompound:W,isDisabled:$,mergedChecked:D,enableTextMotion:oe,textColRef:me,secondaryLines:ne,sz:pe,hasHint:ce,hasError:Y,label:C,hint:_,error:S,hintId:N,errorId:k,danger:n}}const yS=l.forwardRef(function({children:e,label:n,hint:r,error:o,size:s,variant:i,danger:a,disabled:c,checked:u,defaultChecked:f,onChange:m,id:p,name:b,value:g,required:h,form:x,autoFocus:C,tabIndex:_,readOnly:S,onBlur:y,onFocus:v,className:A,classNames:E,onPointerDown:T,onClick:L,...w},I){const N=$H({size:s,variant:i,danger:a,disabled:c,checked:u,defaultChecked:f,onChange:m,id:p,name:b,value:g,required:h,form:x,autoFocus:C,tabIndex:_,readOnly:S,onBlur:y,onFocus:v,label:n,hint:r,error:o},e,A,L),{handlePointerDown:k}=yH({isDisabled:N.isDisabled,enableTextMotion:N.enableTextMotion,textMotionRef:N.textColRef,onPointerDown:T}),j=tt(VH(N.secondaryLines,N.sz.gridGap,A),N.isDisabled&&FH,E==null?void 0:E.root);return d.jsx(_H,{value:N.contextValue,children:d.jsx(SH,{classNames:E,children:d.jsx("label",{ref:I,"data-selected":N.mergedChecked?!0:void 0,className:j,...w,onPointerDown:k,children:N.isCompound?e:d.jsx(UH,{label:N.label,hint:N.hint,error:N.error,hasHint:N.hasHint,hasError:N.hasError,secondaryLines:N.secondaryLines,textColRef:N.textColRef,size:N.contextValue.size,isDisabled:N.isDisabled,danger:N.danger,hintId:N.hintId,errorId:N.errorId})})})})});yS.displayName="RadioRoot";const WH=Object.assign(Cf,{Fill:Bt.Fill,Mark:Bt.Mark}),XH=Object.assign(yS,{Control:xf,Indicator:WH,Content:CS,Label:_S,Hint:SS,Error:vS});function nt(...t){return R(...t)}function YH(t,e){const n=t!==void 0,[r,o]=l.useState(!!e),s=n?!!t:r,i=l.useCallback(a=>{n||o(a)},[n]);return[s,i,n]}function KH(t){return!/\bflex-col\b/.test(t??"")}function qH(t,e){return l.Children.map(t,n=>l.isValidElement(n)&&n.type.displayName==="SwitchControl"?l.cloneElement(n,{...e,...n.props}):n)}function ZH(t){let e=!1;const n=r=>{if(!e)for(const o of l.Children.toArray(r)){if(!l.isValidElement(o))continue;const s=o.type.displayName;if(s==="SwitchLabel"||s==="SwitchContent"){e=!0;return}n(o.props.children)}};return n(t),e}function QH(t,e,n,r,o){return t?(r?1:0)+(o?1:0):(e?1:0)+(n?1:0)}function JH(t){let e=null;const n=[];for(const r of l.Children.toArray(t)){if(l.isValidElement(r)&&r.type.displayName==="SwitchTrack"){e==null&&(e=r);continue}n.push(r)}return n.length===0?{track:e,content:null}:n.length===1?{track:e,content:n[0]}:{track:e,content:n}}function e2(t){let e=!1;const n=r=>{if(!e)for(const o of l.Children.toArray(r)){if(!l.isValidElement(o))continue;if(o.type.displayName==="SwitchThumb"){e=!0;return}n(o.props.children)}};return n(t),e}const Rp={small:Ut("small"),base:Ut("base"),mid:Ut("mid"),large:Ut("large")};function t2(t,e){if(t==null)return Rp[e];if(typeof t=="number")return t;const n=t.trim(),r=/^([\d.]+)px$/i.exec(n);if(r)return Number.parseFloat(r[1]);const o=/^([\d.]+)rem$/i.exec(n);if(o&&typeof document<"u"){const s=Number.parseFloat(getComputedStyle(document.documentElement).fontSize)||16;return Number.parseFloat(o[1])*s}return Rp[e]}function n2(t,e){const n=t.getBoundingClientRect().width,r=e.getBoundingClientRect().width;return Math.max(0,n-r)}const li={small:"h-[var(--selection-indicator-small)] min-h-[var(--selection-indicator-small)] w-[calc(2*var(--selection-indicator-small))] min-w-[calc(2*var(--selection-indicator-small))]",base:"h-[var(--selection-indicator-base)] min-h-[var(--selection-indicator-base)] w-[calc(2*var(--selection-indicator-base))] min-w-[calc(2*var(--selection-indicator-base))]",mid:"h-[var(--selection-indicator-mid)] min-h-[var(--selection-indicator-mid)] w-[calc(2*var(--selection-indicator-mid))] min-w-[calc(2*var(--selection-indicator-mid))]",large:"h-[var(--selection-indicator-large)] min-h-[var(--selection-indicator-large)] w-[calc(2*var(--selection-indicator-large))] min-w-[calc(2*var(--selection-indicator-large))]"},Wo={small:{track:li.small,travelPx:Ut("small"),title:"small",desc:"tools",gap:"gap-x-small gap-y-xsmall"},base:{track:li.base,travelPx:Ut("base"),title:"base",desc:"small",gap:"gap-x-base gap-y-xsmall"},mid:{track:li.mid,travelPx:Ut("mid"),title:"mid",desc:"small",gap:"gap-x-plus gap-y-xsmall"},large:{track:li.large,travelPx:Ut("large"),title:"large",desc:"base",gap:"gap-x-plus gap-y-xsmall"}};function r2({isDisabled:t,enableTextMotion:e,textMotionRef:n,onPointerDown:r}){return lr({isDisabled:!!t,enabled:e,textMotionRef:n,onPointerDown:r})}function o2({checked:t,disabled:e,size:n,thickness:r,squeezeToken:o,trackRef:s,trackFillRef:i,thumbRef:a,thumbShellRef:c,thumbFillRef:u,iconOffRef:f,iconOnRef:m}){const p=de(),b=t2(r,n),g=l.useRef(b),h=l.useRef(!0),x=l.useRef(!0),C=l.useCallback((_,S)=>{const y=a.current;if(!y)return;const v=_?S:0;if(p||x.current){x.current=!1,V(y),y.style.transform=`translate(${v}px, 0)`;return}V(y),X.to(y,{x:v,...d0(),overwrite:"auto"})},[p,a]);l.useLayoutEffect(()=>{g.current=b,C(t,g.current)},[t,b,C]),l.useLayoutEffect(()=>{const _=s.current,S=c.current;if(!_||!S)return;const y=()=>{g.current=n2(_,S),C(t,g.current)};y();const v=new ResizeObserver(y);return v.observe(_),v.observe(S),()=>v.disconnect()},[t,n,C,r,b,s,c]),l.useEffect(()=>{const _=[i.current,a.current,c.current,u.current,f.current,m.current,s.current];return()=>{for(const S of _)S&&V(S)}},[f,m,u,a,c,i,s]),l.useLayoutEffect(()=>{const _=i.current;if(_){if(p){V(_),_.style.opacity=t?"1":"0";return}if(h.current){h.current=!1,V(_),_.style.opacity=t?"1":"0";return}V(_),t?X.fromTo(_,{autoAlpha:0},{autoAlpha:1,...ve(),overwrite:"auto"}):X.to(_,{autoAlpha:0,...ve(),overwrite:"auto"})}},[t,p,i]),l.useLayoutEffect(()=>{if(!(!f.current&&!m.current)){if(p){f.current&&(V(f.current),f.current.style.opacity=t?"0":"1"),m.current&&(V(m.current),m.current.style.opacity=t?"1":"0");return}f.current&&(V(f.current),t?X.to(f.current,{autoAlpha:0,scale:.88,...ve(),overwrite:"auto"}):X.fromTo(f.current,{autoAlpha:0,scale:.88},{autoAlpha:1,scale:1,...ve(),overwrite:"auto"})),m.current&&(V(m.current),t?X.fromTo(m.current,{autoAlpha:0,scale:.88},{autoAlpha:1,scale:1,...ve(),overwrite:"auto"}):X.to(m.current,{autoAlpha:0,scale:.88,...ve(),overwrite:"auto"}))}},[t,f,m,p]),l.useLayoutEffect(()=>{const _=s.current;_&&(V(_),_.style.opacity=e?"0.48":"1")},[e,s]),l.useLayoutEffect(()=>{if(o===0||p)return;const _=c.current;_&&We(_)},[p,o,c])}const _f=l.createContext(null);function s2({value:t,children:e}){return d.jsx(_f.Provider,{value:t,children:e})}function Ra(){const t=l.useContext(_f);if(!t)throw new Error("Switch components must be inside <Switch>.");return t}function i2(){return l.useContext(_f)}const cc=l.createContext({});function a2({classNames:t,children:e}){const n=l.useContext(cc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(cc.Provider,{value:r,children:e})}function _n(){return l.useContext(cc)}const TS=l.createContext(null);function l2({value:t,children:e}){return d.jsx(TS.Provider,{value:t,children:e})}function Sf(){const t=l.useContext(TS);if(!t)throw new Error("Switch.Track, Switch.Fill, Switch.Thumb, Switch.Icon must be inside <Switch.Track>");return t}function c2(t,e,n){return t??n??`switch-${e}`}function u2(t){return Yt(t)}function d2(t){return Kt(t)}function f2(t){return t?void 0:"Switch"}const vf=l.createContext(null);function m2({value:t,children:e}){return d.jsx(vf.Provider,{value:t,children:e})}function Na(){const t=l.useContext(vf);if(!t)throw new Error("Slider components must be inside <Slider>.");return t}function p2(){return l.useContext(vf)}const uc=l.createContext({});function h2({classNames:t,children:e}){const n=l.useContext(uc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(uc.Provider,{value:r,children:e})}function Sn(){return l.useContext(uc)}const AS=l.createContext(null);function g2({value:t,children:e}){return d.jsx(AS.Provider,{value:t,children:e})}function yf(){const t=l.useContext(AS);if(!t)throw new Error("Slider.Rail, Slider.Fill, Slider.Thumb, Slider.Icon must be inside Slider.Track");return t}function b2({children:t,className:e,orientation:n="horizontal",...r}){return d.jsx("div",{className:R("flex items-baseline justify-between gap-xsmall",n==="horizontal"?"w-full":"min-w-[8rem]",e),...r,children:t})}function x2({children:t,fallback:e,className:n,...r}){const o=t??e;return o==null?null:d.jsx(ee,{as:"span",variant:"base",className:R("tabular-nums text-muted",n),...r,children:o})}function C2({label:t,labelClassName:e,showValue:n,valueText:r,hint:o,hintId:s,error:i,errorId:a,Header:c,Value:u,track:f}){const m=t!=null||n||r!=null;return d.jsxs(d.Fragment,{children:[m?d.jsxs(c,{children:[t!=null?d.jsx(Ue,{classNames:e?{root:e}:void 0,children:t}):null,r!=null?d.jsx(u,{children:r}):n?d.jsx(u,{}):null]}):null,f,o!=null?d.jsx(Xe,{id:s,children:o}):null,i!=null?d.jsx(Ze,{id:a,children:i}):null]})}function Lt(...t){return R(...t)}function Vs(t){return typeof t=="number"?`${t}px`:t}const Np={small:Ut("small"),base:Ut("base"),mid:Ut("mid"),large:Ut("large")};function Ao(t,e,n){return Math.min(n,Math.max(e,t))}function ES(t,e,n){return n<=e?0:(t-e)/(n-e)*100}function LS(t,e,n){return n<=e?0:(t-e)/(n-e)}function dc(t,e,n,r,o){if(r<=0)return ES(t,e,n);if(r<=o)return 50;const s=o/2,i=r-o;return(s+LS(t,e,n)*i)/r*100}function hl(t,e,n,r,o){return r<=o?r/2:o/2+LS(t,e,n)*(r-o)}function _2(t,e,n,r,o,s,i){if(t<=0)return{start:0,end:ES(s,n,r)};const a=e/2;if(o){const u=hl(i[0],n,r,t,e),f=hl(i[1],n,r,t,e);return{start:Math.max(0,u-a)/t*100,end:Math.min(t,f+a)/t*100}}const c=hl(s,n,r,t,e);return{start:0,end:Math.min(t,c+a)/t*100}}function S2(t,e){const n=t.end-t.start;return e==="horizontal"?{left:`${t.start}%`,width:`${n}%`}:{bottom:`${t.start}%`,height:`${n}%`}}function v2(t,e,n,r){if(r<=0)return Ao(t,e,n);const o=Math.round((t-e)/r);return Ao(e+o*r,e,n)}function y2(t,e){if(e.length===0)return t;let n=e[0],r=Math.abs(t-n);for(const o of e){const s=Math.abs(t-o);s<r&&(r=s,n=o)}return n}function T2(t,e,n){if(t!=null&&t.length)return[...new Set(t.map(r=>Ao(r,e,n)))].toSorted((r,o)=>r-o)}function fc(t,e,n,r,o,s,i){const a=r==="horizontal"?n.width:n.height,c=i/2,u=a-i;if(u<=0)return o;const f=Ao(r==="horizontal"?(t-n.left-c)/u:1-(e-n.top-c)/u,0,1);return o+f*(s-o)}function A2(t,e,n){const r=e.findIndex(o=>o===t);if(r>=0){const o=e[r+n];return o!==void 0?o:t}return n>0?e.find(o=>o>t)??e[e.length-1]:[...e].reverse().find(o=>o<t)??e[0]}function E2(t,e,n,r){const o=r==="horizontal";if(t!=null&&t.length)switch(n){case"ArrowRight":return o?"mark-next":0;case"ArrowLeft":return o?"mark-prev":0;case"ArrowUp":return o?0:"mark-next";case"ArrowDown":return o?0:"mark-prev";case"Home":return"home";case"End":return"end";default:return 0}const s=e>0?e*10:10;switch(n){case"ArrowRight":return o?e:0;case"ArrowLeft":return o?-e:0;case"ArrowUp":return o?0:e;case"ArrowDown":return o?0:-e;case"PageUp":return s;case"PageDown":return-s;case"Home":return"home";case"End":return"end";default:return 0}}function L2(t){return Number.isInteger(t)?String(t):t.toFixed(1)}function Ci(t,e){const n=e==="horizontal"?t.width:t.height,r=e==="horizontal"?t.height:t.width;return{trackSpanPx:n,thumbSpanPx:r}}function wS(t,e){if(t==null)return Np[e];if(typeof t=="number")return t;const n=t.trim(),r=/^([\d.]+)px$/i.exec(n);if(r)return Number.parseFloat(r[1]);const o=/^([\d.]+)rem$/i.exec(n);if(o&&typeof document<"u"){const s=Number.parseFloat(getComputedStyle(document.documentElement).fontSize)||16;return Number.parseFloat(o[1])*s}return Np[e]}function w2(t,e){return t===e?!0:t==null||e==null?!1:t.valueLabel===e.valueLabel&&t.min===e.min&&t.max===e.max&&t.range===e.range&&t.singleValue===e.singleValue&&t.rangeValue[0]===e.rangeValue[0]&&t.rangeValue[1]===e.rangeValue[1]&&t.label===e.label}function I2(t){let e=!1;const n=[];for(const r of l.Children.toArray(t)){if(!l.isValidElement(r)){n.push(r);continue}const o=r.type.displayName;(o==="SliderRail"||o==="SliderFill"||o==="SliderThumb"||o==="SliderIcon")&&(e=!0),n.push(r)}return e?{body:n,hasCompoundParts:!0}:{body:null,hasCompoundParts:!1}}function R2(t,e,n){const r=t!==void 0,[o,s]=l.useState(e??n),i=r?t:o,a=l.useCallback(c=>{r||s(c)},[r]);return[i,a,r]}function N2(t,e,n,r){const o=t!==void 0,[s,i]=l.useState(e??[n,r]),a=o?t:s,c=l.useCallback(u=>{o||i(u)},[o]);return[a,c,o]}function D2(t,e){if(t==null)return e;const n=l.Children.toArray(t);return n.length===0?e:n.length===1&&l.isValidElement(n[0])&&n[0].type.displayName==="SliderIcon"?n[0].props.children??e:t}function k2(t){return`${t}-label`}function O2({kind:t,explicitLabel:e,labelConnected:n,labelId:r,hintConnected:o,hintId:s,errorConnected:i,errorId:a}){const c=Ft(o?s:void 0,i?a:void 0);return e?t==="start"?{ariaLabel:`${e}, minimum`,ariaLabelledBy:void 0,ariaDescribedBy:c}:t==="end"?{ariaLabel:`${e}, maximum`,ariaLabelledBy:void 0,ariaDescribedBy:c}:{ariaLabel:e,ariaLabelledBy:void 0,ariaDescribedBy:c}:t==="start"?{ariaLabel:"Minimum range",ariaLabelledBy:void 0,ariaDescribedBy:c}:t==="end"?{ariaLabel:"Maximum range",ariaLabelledBy:void 0,ariaDescribedBy:c}:n&&r?{ariaLabel:void 0,ariaLabelledBy:r,ariaDescribedBy:c}:{ariaLabel:e??"Value",ariaLabelledBy:void 0,ariaDescribedBy:c}}function P2(t){const e=l.useRef(null);return l.useLayoutEffect(()=>{const n=e.current;n&&(V(n),n.style.opacity=t?"0.48":"1")},[t]),e}function B2({disabled:t,onPointerDown:e}){const n=l.useRef(null),r=de();l.useEffect(()=>{const s=n.current;return()=>{s&&V(s)}},[]);const o=l.useCallback(s=>{if(e(s),s.defaultPrevented||t||r)return;const i=n.current;i&&We(i)},[t,e,r]);return{squeezeRef:n,handlePointerDown:o}}function j2(t){l.useEffect(()=>{const e=t.current;return()=>{e&&V(e)}},[t])}function M2(t,e,n){V(t),t.style.left=e.left??"",t.style.width=e.width??"",t.style.bottom=e.bottom??"",t.style.height=e.height??"",n==="horizontal"?(t.style.bottom="",t.style.height=""):(t.style.left="",t.style.width="")}function Tf(t,e){return R(t==="horizontal"?"w-full":"w-auto items-center",e)}const F2={small:"h-[var(--selection-indicator-small)] min-h-[var(--selection-indicator-small)]",base:"h-[var(--selection-indicator-base)] min-h-[var(--selection-indicator-base)]",mid:"h-[var(--selection-indicator-mid)] min-h-[var(--selection-indicator-mid)]",large:"h-[var(--selection-indicator-large)] min-h-[var(--selection-indicator-large)]"},G2={small:"w-[var(--selection-indicator-small)] min-w-[var(--selection-indicator-small)]",base:"w-[var(--selection-indicator-base)] min-w-[var(--selection-indicator-base)]",mid:"w-[var(--selection-indicator-mid)] min-w-[var(--selection-indicator-mid)]",large:"w-[var(--selection-indicator-large)] min-w-[var(--selection-indicator-large)]"},H2="pointer-events-none absolute inset-0 overflow-hidden rounded-full",z2="bg-primary-tint",V2="gloss-indicator border-0",U2="overflow-hidden rounded-full",$2="opacity-48",W2="absolute rounded-full",X2="bg-primary",Y2="bg-primary-tint",K2="z-[1]",q2="inset-y-0",Z2="inset-x-0",Q2="relative touch-none select-none",J2="w-full",ez="h-48",tz="pointer-events-none absolute z-[1] size-1 rounded-full bg-primary/30",nz="absolute z-[2] box-border flex shrink-0 origin-center items-center justify-center m-0 appearance-none border-0 bg-transparent p-0 focus-ring",rz="top-0 h-full w-auto -translate-x-1/2 aspect-square",oz="left-0 w-full h-auto -translate-y-1/2 aspect-square",sz="cursor-not-allowed",iz="cursor-grab active:cursor-grabbing";function az({orientation:t,slotClass:e,className:n}){return Lt(Tf(t,n),e)}function lz({disabled:t,gloss:e=!1,slotClass:n,className:r}){return Lt(H2,!e&&z2,t&&$2,n,r)}function cz({isHorizontal:t,gloss:e=!1,slotClass:n,className:r}){return Lt(W2,t?q2:Z2,e?Y2:X2,e&&K2,n,r)}function IS({isHorizontal:t,size:e,thickness:n,gloss:r=!1,slotClass:o,className:s}){return Lt(Q2,t?J2:ez,n==null&&(t?F2[e]:G2[e]),r&&U2,r&&V2,o,s)}function uz({orientation:t,disabled:e,slotClass:n,className:r}){return Lt(nz,t==="horizontal"?rz:oz,e?sz:iz,n,r)}function dz(t,e){return e==="horizontal"?{left:`${t}%`}:{top:`${100-t}%`}}function fz(t,e){return e==="horizontal"?{left:`${t}%`,top:"50%",transform:"translate(-50%, -50%)"}:{bottom:`${t}%`,left:"50%",top:"auto",transform:"translate(-50%, 50%)"}}function mz({isHorizontal:t,thickness:e}){if(e==null)return;const n=Vs(e);return t?{height:n,minHeight:n}:{width:n,minWidth:n}}function _i({size:t,icon:e,gloss:n=!1,thumbClassName:r,percent:o,orientation:s,disabled:i,active:a,ariaValueNow:c,ariaValueMin:u,ariaValueMax:f,ariaValueText:m,ariaLabel:p,ariaLabelledBy:b,ariaDescribedBy:g,onPointerDown:h,onKeyDown:x}){const C=Sn(),_=P2(i),{squeezeRef:S,handlePointerDown:y}=B2({disabled:i,onPointerDown:h});return d.jsx("button",{ref:S,type:"button",role:"slider",...b!=null?{"aria-labelledby":b}:p!=null?{"aria-label":p}:{},...g!=null?{"aria-describedby":g}:{},"aria-valuemin":u,"aria-valuemax":f,"aria-valuenow":c,"aria-valuetext":m,"aria-orientation":s,disabled:i,tabIndex:i?-1:0,className:uz({orientation:s,disabled:i,slotClass:C.thumb}),style:dz(o,s),onPointerDown:y,onKeyDown:x,children:d.jsx(wa,{active:a,size:t,gloss:n,shellRef:_,className:Lt(C.thumbShell,r),children:e!=null?d.jsx(Ia,{size:t,highlighted:a,gloss:n,children:e}):null})})}function pz(t,e){const{orientation:n,size:r="base",thickness:o,min:s=0,max:i=100,step:a=1,marks:c,formatValue:u=L2,icon:f,gloss:m=!1,thumbClassName:p,disabled:b=!1,className:g,classNames:h,ariaLabel:x,range:C=!1,children:_}=t,S=p2(),y=Sn(),v=l.useMemo(()=>({...y,...h}),[y,h]),A=n??(S==null?void 0:S.orientation)??"horizontal",E=S==null?void 0:S.labelId,T=(S==null?void 0:S.labelConnected)??!1,L=x,w=l.useCallback(K=>O2({kind:K,explicitLabel:L,labelConnected:T,labelId:E,hintConnected:(S==null?void 0:S.hintConnected)??!1,hintId:(S==null?void 0:S.hintId)??"",errorConnected:(S==null?void 0:S.errorConnected)??!1,errorId:(S==null?void 0:S.errorId)??""}),[L,S==null?void 0:S.errorConnected,S==null?void 0:S.errorId,S==null?void 0:S.hintConnected,S==null?void 0:S.hintId,T,E]),I=l.useRef(null),N=l.useRef(null),[k,j]=l.useState(0),P=l.useMemo(()=>wS(o,r),[o,r]),[G,D]=l.useState(P),O=l.useRef(null),[F,B]=l.useState(null),$=l.useMemo(()=>T2(c,s,i),[c,s,i]),W=l.useCallback(K=>{const Z=Ao(K,s,i);return $!=null&&$.length?y2(Z,$):v2(Z,s,i,a)},[$,s,i,a]),[M,z]=R2(C?void 0:t.value,C?void 0:t.defaultValue,s),[H,oe]=N2(C?t.value:void 0,C?t.defaultValue:void 0,s,i),pe=C?void 0:t.onValueChange,ce=C?t.onValueChange:void 0,Y=l.useCallback(K=>{const Z=W(K);Z!==M&&(z(Z),pe==null||pe(Z))},[pe,z,M,W]),ne=l.useCallback(K=>{let[Z,fe]=K.map(W);Z>fe&&([Z,fe]=[fe,Z]);const[Le,He]=H;Z===Le&&fe===He||(oe([Z,fe]),ce==null||ce([Z,fe]))},[ce,H,oe,W]),me=l.useCallback((K=M,Z=H)=>{const fe=I.current,Le=N.current;if(!fe||!Le)return;const He=fe.getBoundingClientRect(),{trackSpanPx:Qe,thumbSpanPx:Je}=Ci(He,A);j(Jt=>Jt===Qe?Jt:Qe),Je>0&&D(Jt=>Jt===Je?Jt:Je);const Qt=_2(Qe,Je>0?Je:P,s,i,C,K,Z);M2(Le,S2(Qt,A),A)},[P,i,s,A,C,H,M]);l.useLayoutEffect(()=>{me()},[me]),l.useEffect(()=>{const K=I.current;if(!K)return;const Z=new ResizeObserver(()=>me());return Z.observe(K),()=>Z.disconnect()},[A,me]),j2(N);const re=l.useCallback((K,Z,fe)=>{const Le=I.current;if(!Le||b)return;const He=Le.getBoundingClientRect(),{thumbSpanPx:Qe}=Ci(He,A),Je=fc(K,Z,He,A,s,i,Qe>0?Qe:P);if(C){const[Qt,Jt]=H;if(fe==="start"){const gr=W(Math.min(Je,Jt));ne([gr,Jt]),me(M,[gr,Jt])}else if(fe==="end"){const gr=W(Math.max(Je,Qt));ne([Qt,gr]),me(M,[Qt,gr])}}else{const Qt=W(Je);Y(Je),me(Qt,H)}},[b,ne,Y,P,i,s,A,C,H,M,W,me]),xe=l.useCallback((K,Z)=>{const fe=I.current;if(!fe)return"start";const Le=fe.getBoundingClientRect(),{thumbSpanPx:He}=Ci(Le,A),Qe=fc(K,Z,Le,A,s,i,He>0?He:P),[Je,Qt]=H;return Math.abs(Qe-Je)<=Math.abs(Qe-Qt)?"start":"end"},[P,i,s,A,H]);l.useEffect(()=>{const K=fe=>{const Le=O.current;Le&&re(fe.clientX,fe.clientY,Le)},Z=()=>{O.current=null,B(null)};return window.addEventListener("pointermove",K),window.addEventListener("pointerup",Z),window.addEventListener("pointercancel",Z),()=>{window.removeEventListener("pointermove",K),window.removeEventListener("pointerup",Z),window.removeEventListener("pointercancel",Z)}},[re]);const te=l.useCallback(K=>{if(b||K.button!==0)return;K.preventDefault();const Z=C?xe(K.clientX,K.clientY):"single";O.current=Z,B(Z),re(K.clientX,K.clientY,Z)},[b,xe,C,re]),U=l.useCallback(K=>Z=>{b||Z.button!==0||(Z.preventDefault(),Z.stopPropagation(),O.current=K,B(K),Z.currentTarget.setPointerCapture(Z.pointerId))},[b]),ae=l.useCallback((K,Z)=>{if(C){const[fe,Le]=H;ne(K==="start"?[fe+Z,Le]:[fe,Le+Z])}else Y(M+Z)},[ne,Y,C,H,M]),he=l.useCallback(K=>Z=>{if(b)return;const fe=E2($,a,Z.key,A);if(fe===0)return;Z.preventDefault();const Le=K==="start"?H[0]:K==="end"?H[1]:M;if(fe==="home"){C?ne(K==="start"?[s,H[1]]:[H[0],s]):Y(s);return}if(fe==="end"){C?ne(K==="start"?[i,H[1]]:[H[0],i]):Y(i);return}if(fe==="mark-next"||fe==="mark-prev"){if(!($!=null&&$.length))return;const He=A2(Le,$,fe==="mark-next"?1:-1);C?ne(K==="start"?[He,H[1]]:[H[0],He]):Y(He);return}typeof fe=="number"&&fe!==0&&ae(K,fe)},[b,ne,Y,$,i,s,ae,A,C,H,M,a]),Ne=l.useCallback((K,Z)=>{const fe=Z??f,Le=He=>dc(He,s,i,k,G);return K==="start"?d.jsx(_i,{size:r,icon:fe,gloss:m,thumbClassName:p,percent:Le(H[0]),orientation:A,disabled:b,active:F==="start",ariaValueNow:H[0],ariaValueMin:s,ariaValueMax:H[1],ariaValueText:u(H[0]),...w("start"),onPointerDown:U("start"),onKeyDown:he("start")}):K==="end"?d.jsx(_i,{size:r,icon:fe,gloss:m,thumbClassName:p,percent:Le(H[1]),orientation:A,disabled:b,active:F==="end",ariaValueNow:H[1],ariaValueMin:H[0],ariaValueMax:i,ariaValueText:u(H[1]),...w("end"),onPointerDown:U("end"),onKeyDown:he("end")}):d.jsx(_i,{size:r,icon:fe,gloss:m,thumbClassName:p,percent:Le(M),orientation:A,disabled:b,active:F==="single",ariaValueNow:M,ariaValueMin:s,ariaValueMax:i,ariaValueText:u(M),...w("single"),onPointerDown:U("single"),onKeyDown:he("single")})},[F,b,u,m,he,U,f,i,s,A,H,M,r,w,p,G,k]),Ye=l.useMemo(()=>{if(C){const[K,Z]=H;return`${u(K)} — ${u(Z)}`}return u(M)},[u,C,H,M]),q=S==null?void 0:S.setDisplay;l.useLayoutEffect(()=>{q==null||q({valueLabel:Ye,min:s,max:i,range:C,singleValue:M,rangeValue:H,label:L})},[L,i,s,C,H,q,M,Ye]);const se=A==="horizontal",ue=cz({isHorizontal:se,gloss:m,slotClass:v.fill}),Pe=lz({disabled:b,gloss:m,slotClass:v.rail}),ft=$==null?void 0:$.map(K=>{const Z=dc(K,s,i,k,G);return d.jsx("span",{"aria-hidden":!0,className:Lt(tz,v.mark),style:fz(Z,A)},K)}),vn=l.useCallback(K=>{I.current=K,typeof e=="function"?e(K):e&&(e.current=K)},[e]),hr=l.useMemo(()=>({fillRef:N,fillClassResolved:ue,railClass:Pe,markNodes:ft,size:r,orientation:A,disabled:b,icon:f,range:C,renderThumb:Ne}),[b,ue,f,ft,A,Pe,C,Ne,r]),{body:yn,hasCompoundParts:ln}=I2(_),qo=l.useMemo(()=>mz({isHorizontal:se,thickness:o}),[se,o]),Zo=IS({isHorizontal:se,size:r,thickness:o,gloss:m,slotClass:v.track,className:g});return{setTrackRef:vn,trackHitClass:Zo,trackCrossStyle:qo,handleTrackPointerDown:te,trackContextValue:hr,compoundBody:yn,hasCompoundParts:ln,range:C,icon:f}}function hz({label:t,showValue:e,valueText:n,hint:r,error:o,hintId:s,errorId:i,trackProps:a}){const c=Sn();return C2({label:t,labelClassName:c.label,showValue:e,valueText:n,hint:r,hintId:s,error:o,errorId:i,Header:Af,Value:Ef,track:d.jsx(Lf,{...a})})}function RS({className:t,classNames:e,...n}){const r=Sn();return d.jsx(Ue,{className:t,classNames:{...e,root:Lt(r.label,e==null?void 0:e.root)},...n})}RS.displayName="SliderLabel";function Af({children:t,className:e,...n}){const{orientation:r}=Na(),o=Sn();return d.jsx(b2,{orientation:r,className:Lt(o.header,e),...n,children:t})}Af.displayName="Slider.Header";function Ef({children:t,className:e,...n}){const{display:r}=Na(),o=Sn();return d.jsx(x2,{fallback:r==null?void 0:r.valueLabel,className:Lt(o.value,e),...n,children:t})}Ef.displayName="Slider.Value";function NS({children:t,className:e,id:n,...r}){const o=Na(),s=Sn();return d.jsx(Xe,{id:n??o.hintId,className:Lt(s.hint,e),...r,children:t})}NS.displayName="Slider.Hint";function DS({children:t,className:e,id:n,...r}){const o=Na(),s=Sn();return d.jsx(Ze,{id:n??o.errorId,className:Lt(s.error,e),...r,children:t})}DS.displayName="Slider.Error";const Lf=l.forwardRef(function(e,n){const r=pz(e,n),o=d.jsxs(d.Fragment,{children:[d.jsx(If,{}),r.range?d.jsxs(d.Fragment,{children:[d.jsx(ls,{thumb:"start",children:r.icon!=null?d.jsx(cs,{children:r.icon}):null}),d.jsx(ls,{thumb:"end",children:r.icon!=null?d.jsx(cs,{children:r.icon}):null})]}):d.jsx(ls,{thumb:"single",children:r.icon!=null?d.jsx(cs,{children:r.icon}):null})]});return d.jsx("div",{ref:r.setTrackRef,role:"presentation",className:r.trackHitClass,style:r.trackCrossStyle,onPointerDown:r.handleTrackPointerDown,children:d.jsx(g2,{value:r.trackContextValue,children:r.hasCompoundParts?r.compoundBody:o})})});Lf.displayName="SliderTrack";function wf({className:t,...e}){const n=yf(),r=Sn();return d.jsx("span",{ref:n.fillRef,className:Lt(n.fillClassResolved,r.fill,t),...e})}wf.displayName="SliderFill";function If({className:t,children:e,...n}){const r=yf(),o=Sn();return d.jsx("div",{className:Lt(r.railClass,o.rail,t),"aria-hidden":!0,...n,children:e??d.jsxs(d.Fragment,{children:[d.jsx(wf,{}),r.markNodes]})})}If.displayName="SliderRail";function ls({thumb:t="single",children:e}){const n=yf(),r=D2(e,n.icon);return n.renderThumb(t,r)}ls.displayName="SliderThumb";function cs({children:t}){return t}cs.displayName="SliderIcon";function gz({children:t,id:e,orientation:n="horizontal",label:r,showValue:o,valueText:s,hint:i,error:a,range:c,value:u,defaultValue:f,onValueChange:m,min:p,max:b,step:g,marks:h,size:x,thickness:C,formatValue:_,icon:S,disabled:y,ariaLabel:v,gloss:A,thumbClassName:E}){const T=l.useId(),L=e??`slider-${T}`,w=Yt(L),I=Kt(L),N=k2(L),[k,j]=l.useState(null),P=l.useCallback(M=>{j(z=>w2(z,M)?z:M)},[]),G=qt(t),D=r!=null||G&&Te(t,"Label"),O=i!=null||G&&Te(t,"Slider.Hint"),F=a!=null||G&&Te(t,"Slider.Error"),B=l.useMemo(()=>({sliderId:L,labelId:N,hintId:w,errorId:I,hintConnected:O,errorConnected:F,labelConnected:D,orientation:n,display:k,setDisplay:P}),[k,I,F,O,D,w,N,n,P,L]),$=l.useMemo(()=>({labelId:N,isRequired:!1}),[N]);return{sliderId:L,isCompound:G,fieldCtx:B,fieldLabelCtx:$,trackProps:{range:c,value:u,defaultValue:f,onValueChange:m,min:p,max:b,step:g,marks:h,size:x,thickness:C,formatValue:_,icon:S,disabled:y,ariaLabel:v,gloss:A,thumbClassName:E,orientation:n},label:r,showValue:o,valueText:s,hint:i,error:a,hasHint:O,hasError:F,hintId:w,errorId:I}}function kS({children:t,className:e,classNames:n,id:r,orientation:o,label:s,showValue:i,valueText:a,hint:c,error:u,range:f,value:m,defaultValue:p,onValueChange:b,min:g,max:h,step:x,marks:C,size:_,thickness:S,formatValue:y,icon:v,disabled:A,ariaLabel:E,gloss:T,thumbClassName:L,...w}){const I=gz({children:t,id:r,orientation:o,label:s,showValue:i,valueText:a,hint:c,error:u,range:f,value:m,defaultValue:p,onValueChange:b,min:g,max:h,step:x,marks:C,size:_,thickness:S,formatValue:y,icon:v,disabled:A,ariaLabel:E,gloss:T,thumbClassName:L}),N=I.isCompound?t:d.jsx(hz,{label:I.label,showValue:I.showValue,valueText:I.valueText,hint:I.hint,error:I.error,hintId:I.hasHint?I.hintId:void 0,errorId:I.hasError?I.errorId:void 0,trackProps:I.trackProps});return d.jsx(m2,{value:I.fieldCtx,children:d.jsx(h2,{classNames:n,children:d.jsx(Xt.Provider,{value:I.fieldLabelCtx,children:d.jsx(pn,{id:I.sliderId,className:az({orientation:I.fieldCtx.orientation,slotClass:n==null?void 0:n.root,className:e}),...w,children:N})})})})}kS.displayName="Slider";const bz=Object.assign(kS,{Header:Af,Label:RS,Value:Ef,Hint:NS,Error:DS,Track:Lf,Rail:If,Fill:wf,Thumb:ls,Icon:cs}),xz="absolute m-[-1px] h-px w-px overflow-hidden border-0 p-0 opacity-0 [clip:rect(0,0,0,0)]",Cz="relative inline-flex shrink-0 items-center justify-center",_z="min-w-0",Sz="contents",vz="inline-flex flex-wrap items-center gap-x-xsmall gap-y-0",yz="min-w-0",Tz="origin-center will-change-transform",Az="font-w-mid",OS="text-muted",PS="text-muted",BS="text-muted",Ez="origin-center will-change-transform",Lz="min-w-0 font-w-mid",wz="relative cursor-pointer select-none rounded-small text-left",Iz="cursor-not-allowed",Rz="has-[:focus-visible]:outline has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-primary",Nz="inline-grid grid-cols-[auto] grid-rows-[auto]",Dz="relative box-border inline-flex shrink-0 rounded-full",kz="gloss-indicator border-0",Oz="bg-primary-tint",Pz="pointer-events-none absolute inset-0 rounded-full",Bz="z-[1]",jz="bg-primary",Mz="bg-primary-tint",Fz="absolute inset-y-0 left-0 aspect-square h-full w-auto will-change-transform flex",Gz="z-[2]",Hz="absolute inset-0 flex items-center justify-center";function Da(t){return t==="left"?"left":"right"}function jS(t){return ua(Da(t))}function MS(t){return da(Da(t))}function Ui(t,e){return fa(t,Da(e))}function zz(t){return Iu(t)}function Vz({hasTextColumn:t,secondaryLines:e,gap:n,labelPosition:r,slotClass:o,className:s}){return nt(wz,t?wu(e,n,Da(r),"inline-grid"):Nz,Rz,o,s)}function Uz({size:t,thickness:e,gloss:n,slotClass:r,className:o}){return nt(Dz,e==null&&Wo[t].track,n?kz:Oz,r,o)}function $z(t){if(t==null)return;const e=Vs(t);return{height:e,minHeight:e,width:`calc(2 * (${e}))`,minWidth:`calc(2 * (${e}))`}}function Wz(t){if(t)return{background:t}}const Rf=l.forwardRef(function({size:e,iconOff:n,iconOn:r,color:o,gloss:s=!1,thickness:i,className:a,classNames:c,disabled:u,checked:f,defaultChecked:m,onChange:p,id:b,name:g,value:h,required:x,form:C,autoFocus:_,tabIndex:S,readOnly:y,onBlur:v,onFocus:A,onPointerDown:E,children:T,...L},w){const I=i2(),N=_n(),k=l.useMemo(()=>({...N,...c}),[c,N]),j=l.useId(),P=c2(b,j,I==null?void 0:I.switchId),G=(I==null?void 0:I.hintId)??`${P}-hint`,D=(I==null?void 0:I.errorId)??`${P}-error`,O=e??(I==null?void 0:I.size)??"base",[F,B,$]=YH(f,m),[W,M]=l.useState(0),z=l.useCallback(me=>{const re=me.target.checked;$||B(re),p==null||p(me)},[$,p,B]),H=l.useCallback(me=>{E==null||E(me),!(me.defaultPrevented||u)&&(M(re=>re+1),I==null||I.setSqueezeToken(re=>re+1))},[u,I,E]),{"aria-label":oe,...pe}=L,ce={size:O,thickness:i,checked:F,disabled:u,color:o,gloss:s,squeezeToken:W,iconOff:n,iconOn:r,classNames:{track:k.track,fill:k.fill,thumb:k.thumb,thumbShell:k.thumbShell,icon:k.icon}},{track:Y}=JH(T);let ne;return Y!=null?ne=l.isValidElement(Y)?l.cloneElement(Y,ce):Y:T!=null&&e2(T)?ne=d.jsxs($i,{...ce,children:[d.jsx(ka,{}),T]}):T!=null?ne=T:ne=d.jsx($i,{...ce}),d.jsxs("span",{className:nt(Cz,I!=null?jS(I.labelPosition):void 0,k.control,a),children:[d.jsx("input",{ref:w,id:P,type:"checkbox",role:"switch","aria-checked":F,className:nt(xz,k.input),disabled:u,name:g,value:h,required:x,form:C,autoFocus:_,tabIndex:S,readOnly:y??($&&p===void 0),onBlur:v,onFocus:A,"aria-describedby":Ft(I!=null&&I.hintConnected?G:void 0,I!=null&&I.errorConnected?D:void 0),"aria-label":oe??f2((I==null?void 0:I.hasTextColumn)??!1),onPointerDown:H,...$?{checked:F,onChange:z}:{defaultChecked:m,onChange:z},...pe}),ne]})});Rf.displayName="SwitchControl";function $i({size:t,thickness:e,checked:n=!1,disabled:r,color:o,gloss:s=!1,squeezeToken:i=0,iconOff:a,iconOn:c,className:u,classNames:f,children:m,...p}){const b=_n(),g=l.useMemo(()=>({...b,...f}),[b,f]),h=l.useRef(null),x=l.useRef(null),C=l.useRef(null),_=l.useRef(null),S=l.useRef(null),y=l.useRef(null),v=l.useRef(null);o2({checked:n,disabled:r,size:t,thickness:e,squeezeToken:i,trackRef:h,trackFillRef:x,thumbRef:C,thumbShellRef:_,thumbFillRef:S,iconOffRef:y,iconOnRef:v});const A=l.useMemo(()=>({checked:n,disabled:r,size:t,color:o,gloss:s,trackFillRef:x,thumbRef:C,thumbShellRef:_,thumbFillRef:S,iconOffRef:y,iconOnRef:v}),[n,o,r,s,t]),E=d.jsxs(d.Fragment,{children:[d.jsx(ka,{}),d.jsxs(Nf,{children:[a!=null?d.jsx(Wi,{when:"off",children:a}):null,c!=null?d.jsx(Wi,{when:"on",children:c}):null]})]});return d.jsx(l2,{value:A,children:d.jsx("span",{ref:h,className:Uz({size:t,thickness:e,gloss:s,slotClass:g.track,className:u}),style:$z(e),"aria-hidden":!0,...p,children:m??E})})}$i.displayName="SwitchTrack";function ka({className:t,style:e,...n}){const r=Sf(),o=_n(),s=Wz(r.color);return d.jsx("span",{ref:r.trackFillRef,"aria-hidden":!0,className:nt(Pz,r.gloss&&Bz,!r.color&&(r.gloss?Mz:jz),o.fill,t),style:{opacity:0,...s,...e},...n})}ka.displayName="SwitchFill";function Nf({className:t,children:e,...n}){const r=Sf(),o=_n();return d.jsx("span",{ref:r.thumbRef,className:nt(Fz,r.gloss&&Gz,o.thumb,t),...n,children:d.jsx(wa,{active:r.checked,size:r.size,gloss:r.gloss,shellRef:r.thumbShellRef,fillRef:r.thumbFillRef,className:o.thumbShell,children:e})})}Nf.displayName="SwitchThumb";function Wi({when:t,children:e,className:n,...r}){const o=Sf(),s=_n(),i=t==="off"?o.iconOffRef:o.iconOnRef,a=t==="on",c=t==="off"?!o.checked:o.checked;return d.jsx(Ia,{iconRef:i,size:o.size,highlighted:a,gloss:o.gloss,className:nt(Hz,s.icon,n),style:{opacity:c?1:0},...r,children:e})}Wi.displayName="SwitchIcon";const FS=l.forwardRef(function({className:e,children:n,...r},o){const s=Ra(),i=_n();return d.jsx("div",{ref:o,className:nt(Sz,s.isCompound&&_z,i.content,e),...r,children:n})});FS.displayName="SwitchContent";function GS({children:t,className:e,...n}){const r=Ra(),o=_n(),s=Wo[r.size];return d.jsx("span",{ref:i=>{r.isCompound&&r.useInlineCompoundMotion&&(r.textMotionRef.current=i)},className:nt(vz,r.isCompound&&MS(r.labelPosition),r.isCompound&&(r.hasCompoundHint||r.hasCompoundError)&&yz,r.isCompound&&r.useInlineCompoundMotion&&Tz,o.label,e),...n,children:d.jsx(ee,{as:"span",variant:s.title,inheritColor:!0,className:nt(Az,r.disabled&&OS,o.labelText),children:t})})}GS.displayName="SwitchLabel";function HS({children:t,className:e,variant:n,...r}){const o=Ra(),s=_n();return d.jsx(Xe,{as:"span",id:o.hintId,variant:n??Wo[o.size].desc,className:nt(o.isCompound&&Ui(2,o.labelPosition),o.disabled&&PS,s.hint,e),...r,children:t})}HS.displayName="Switch.Hint";function zS({children:t,className:e,...n}){const r=Ra(),o=_n();return d.jsx(Ze,{as:"span",id:r.errorId,variant:Wo[r.size].desc,className:nt(r.isCompound&&Ui(zz(r.hasCompoundHint),r.labelPosition),r.disabled&&BS,o.error,e),...n,children:t})}zS.displayName="Switch.Error";function Xz({label:t,hint:e,error:n,hasTextColumn:r,hasHint:o,hasError:s,secondaryLines:i,textColRef:a,size:c,disabled:u,labelPosition:f,hintId:m,errorId:p,controlProps:b}){const g=_n(),h=Wo[c];return d.jsxs(d.Fragment,{children:[d.jsx(Rf,{size:c,disabled:u,className:jS(f),...b}),r?d.jsxs(d.Fragment,{children:[d.jsx("span",{ref:a,className:nt(MS(f),!i&&Ez,g.simpleLabelWrap,g.label),children:d.jsx(ee,{as:"span",variant:h.title,inheritColor:!0,className:nt(Lz,u&&OS,g.simpleLabelText,g.labelText),children:t})}),o?d.jsx(Xe,{as:"span",id:m,variant:h.desc,className:nt(Ui(2,f),u&&PS,g.hint),children:e}):null,s?d.jsx(Ze,{as:"span",id:p,variant:h.desc,className:nt(Ui(o?3:2,f),u&&BS,g.error),children:n}):null]}):null]})}function Yz({children:t,label:e,hint:n,error:r,labelPosition:o="right",size:s="base",disabled:i,className:a,...c}){const f=`switch-${l.useId()}`,m=u2(f),p=d2(f),[,b]=l.useState(0),g=qt(t),h=g?Te(t,"Switch.Hint"):!1,x=g?Te(t,"Switch.Error"):!1,C=g?ZH(t):!1,_=g&&KH(a),S=n!=null,y=r!=null,v=QH(g,S,y,h,x),A=g?C:e!=null,E=i,T=!E&&A&&(!g||_),L=l.useRef(null),w=Wo[s];return{fieldCtx:l.useMemo(()=>({switchId:f,hintId:m,errorId:p,size:s,labelPosition:o,disabled:E,isCompound:g,hasCompoundHint:h,hasCompoundError:x,hasTextColumn:A,hintConnected:g?h:S,errorConnected:g?x:y,useInlineCompoundMotion:_,textMotionRef:L,setSqueezeToken:b}),[E,h,x,S,y,A,m,p,g,o,s,f,_]),isCompound:g,hasTextColumn:A,secondaryLines:v,sz:w,label:e,hint:n,error:r,hasHint:S,hasError:y,hintId:m,errorId:p,disabled:E,enableTextMotion:T,textColRef:L,labelPosition:o,controlRest:c}}const VS=l.forwardRef(function({children:e,label:n,hint:r,error:o,labelPosition:s="right",size:i="base",disabled:a,className:c,classNames:u,onPointerDown:f,...m},p){const b=Yz({children:e,label:n,hint:r,error:o,labelPosition:s,size:i,disabled:a,className:c,...m}),{handlePointerDown:g}=r2({isDisabled:b.disabled,enableTextMotion:b.enableTextMotion,textMotionRef:b.textColRef,onPointerDown:f}),h=nt(Vz({hasTextColumn:b.hasTextColumn,secondaryLines:b.secondaryLines,gap:b.sz.gap,labelPosition:b.labelPosition,slotClass:u==null?void 0:u.root,className:c}),b.disabled&&Iz);return d.jsx(s2,{value:b.fieldCtx,children:d.jsx(a2,{classNames:u,children:d.jsx("label",{ref:p,className:h,onPointerDown:g,children:b.isCompound?qH(e,b.controlRest):d.jsx(Xz,{label:b.label,hint:b.hint,error:b.error,hasTextColumn:b.hasTextColumn,hasHint:b.hasHint,hasError:b.hasError,secondaryLines:b.secondaryLines,textColRef:b.textColRef,size:b.fieldCtx.size,disabled:b.disabled,labelPosition:b.labelPosition,hintId:b.hintId,errorId:b.errorId,controlProps:b.controlRest})})})})});VS.displayName="SwitchRoot";const Kz=Object.assign(VS,{Control:Rf,Track:$i,Fill:ka,Thumb:Nf,Icon:Wi,Content:FS,Label:GS,Hint:HS,Error:zS}),US=l.createContext(null),mc=l.createContext({});function qz({classNames:t,children:e}){const n=l.useContext(mc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(mc.Provider,{value:r,children:e})}function Oa(){const t=l.useContext(US);if(!t)throw new Error("Components Tabs must be inside <Tabs>.");return t}function Df(){return l.useContext(mc)}function Jr(...t){return R(...t)}function Zz(t,e){const n=t!==void 0,[r,o]=l.useState(e??""),s=n?t:r,i=l.useCallback(a=>{n||o(a)},[n]);return[s,i,n]}function Qz(t){return le[t].controlText}function $S(t){return Array.from(t.querySelectorAll('[role="tab"]:not([disabled])')).filter(e=>e instanceof HTMLButtonElement)}function Jz(t,e){const n=$S(t);if(n.length===0)return null;const r=n[Math.max(0,Math.min(e,n.length-1))];return r.focus(),r}function eV(...t){return e=>{for(const n of t)typeof n=="function"?n(e):n&&(n.current=e)}}const tV={default:"",outline:"bg-transparent border-token rounded-mid p-xsmall",secondary:"bg-secondary border-token rounded-mid p-xsmall",gloss:"border-0 p-small"},nV={default:"bg-primary",outline:"bg-secondary",secondary:"bg-tertiary",gloss:"bg-tertiary"};function rV({orientation:t,slotClass:e,className:n}){return Jr("flex min-w-0 text-left",t==="horizontal"?"flex-col gap-mid":"flex-row gap-mid",e,n)}function oV({orientation:t,variant:e,slotClass:n,className:r}){const o=e==="gloss",s=e==="outline"||e==="secondary"||e==="gloss";return Jr("relative box-border min-w-0 w-fit",t==="horizontal"?R("flex flex-row flex-wrap gap-xsmall",s?"items-center":"items-stretch border-b-token"):R("flex flex-col gap-xsmall",s?"items-start":"items-stretch border-l-token"),o&&"gloss-panel rounded-mid text-foreground",tV[e],n,r)}function sV({variant:t,slotClass:e}){return Jr("pointer-events-none absolute z-0 motion-reduce:transition-none",t==="default"?"rounded-full":"rounded-mid",nV[t],e)}function iV({size:t,variant:e,isSelected:n,isDisabled:r,slotClass:o,className:s}){const i=le[t],a=e==="outline"||e==="secondary"||e==="gloss";return Jr("relative z-[1] m-0 inline-flex shrink-0 appearance-none items-center justify-center border-0 bg-transparent outline-none",i.padX,i.padY,a&&"rounded-mid","focus-ring",r?"cursor-not-allowed opacity-45":"cursor-pointer",n?"text-primary":"text-muted hover:text-primary",!n&&!r&&gn,o,s)}const aV="relative z-[1] shrink-0";function lV(t){return Jr("inline-flex origin-center items-center gap-xsmall will-change-transform",t)}function cV({slotClass:t,className:e}){return Jr("min-w-0 outline-none focus-ring",t,e)}function uV(t){const e=getComputedStyle(t);return{borderTop:Number.parseFloat(e.borderTopWidth)||0,borderLeft:Number.parseFloat(e.borderLeftWidth)||0}}function dV(t,e){const n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),{borderTop:o,borderLeft:s}=uV(t),i=n.left+s,a=n.top+o;return{left:r.left-i+t.scrollLeft,top:r.top-a+t.scrollTop,width:r.width,height:r.height}}function fV(t,e,n,r){const o=t.getBoundingClientRect(),s=e.getBoundingClientRect(),i=s.left-o.left+t.scrollLeft,a=s.top-o.top+t.scrollTop,c=s.width,u=s.height;return r==="default"?n==="horizontal"?{left:i,top:a+u-2,width:c,height:2}:{left:i,top:a,width:2,height:u}:dV(t,e)}function mV(t,e){t.style.left=`${e.left}px`,t.style.top=`${e.top}px`,t.style.width=`${e.width}px`,t.style.height=`${e.height}px`}function pV(t,e,n,r,o,s,i){const a=l.useRef(!0),c=l.useCallback(()=>{var _;const u=t.current,f=e.current,m=(_=s.current)==null?void 0:_.get(n);if(!u||!f||!m){f&&(f.style.opacity="0");return}const p=fV(u,m,r,o),b=de();if(f.style.opacity="1",b||a.current){V(f),mV(f,p);return}const g=f.offsetLeft,h=f.offsetTop,x=f.offsetWidth,C=f.offsetHeight;V(f),X.fromTo(f,{left:g,top:h,width:x,height:C},{...p,...ve(),overwrite:"auto"})},[n,e,t,r,s,o]);l.useLayoutEffect(()=>{c(),a.current=!1},[c]),l.useLayoutEffect(()=>{var m;const u=t.current;if(!u||typeof ResizeObserver>"u")return;const f=new ResizeObserver(()=>c());f.observe(u);for(const p of((m=s.current)==null?void 0:m.values())??[])f.observe(p);return()=>f.disconnect()},[n,i,t,s,c])}function WS(t,e){return`${t}-tab-${e}`}function XS(t,e){return`${t}-panel-${e}`}function hV({isSelected:t,isDisabled:e,panelId:n}){return{"aria-selected":t,"aria-controls":n,tabIndex:t?0:-1,disabled:e}}function gV({isSelected:t,tabId:e}){return{"aria-labelledby":e,hidden:!t,tabIndex:t?0:-1}}function bV({motionRef:t,isDisabled:e,isSelected:n,onPointerEnter:r,onPointerLeave:o,onPointerDown:s}){return lr({isDisabled:!!e,enabled:!e&&!n,textMotionRef:t,hoverLift:!0,onPointerEnter:r,onPointerLeave:o,onPointerDown:s})}const YS=l.forwardRef(function({value:e,children:n,asChild:r,className:o,disabled:s,onClick:i,onPointerDown:a,onPointerEnter:c,onPointerLeave:u,...f},m){const{value:p,setValue:b,size:g,variant:h,baseId:x,disabled:C,tabElementsRef:_,notifyTabLayout:S}=Oa(),y=Df(),v=l.useRef(null),A=p===e,E=C||s,T=WS(x,e),L=XS(x,e),w=hV({isSelected:A,isDisabled:E,panelId:L}),I=l.useCallback(D=>{D?_.current.set(e,D):_.current.delete(e),S(),typeof m=="function"?m(D):m&&(m.current=D)},[S,m,_,e]);l.useLayoutEffect(()=>{const D=_.current;return()=>{D.delete(e),S()}},[S,_,e]);const N=l.useCallback(D=>{i==null||i(D),!(D.defaultPrevented||E)&&b(e)},[E,i,b,e]),{handlePointerEnter:k,handlePointerLeave:j,handlePointerDown:P}=bV({motionRef:v,isDisabled:E,isSelected:A,onPointerEnter:c,onPointerLeave:u,onPointerDown:a}),G=iV({size:g,variant:h,isSelected:A,isDisabled:E,slotClass:y.tab,className:o});if(r&&l.isValidElement(n)){const D=n;return l.cloneElement(D,{...f,role:"tab",id:T,"data-tab-value":e,"aria-selected":w["aria-selected"],"aria-controls":w["aria-controls"],tabIndex:w.tabIndex,disabled:E||D.props.disabled,ref:eV(I,D.props.ref),className:Jr(D.props.className,aV,o),onClick:O=>{var F,B;(B=(F=D.props).onClick)==null||B.call(F,O),N(O)},onPointerEnter:O=>{var F,B;(B=(F=D.props).onPointerEnter)==null||B.call(F,O),k(O)},onPointerLeave:O=>{var F,B;(B=(F=D.props).onPointerLeave)==null||B.call(F,O),j(O)},onPointerDown:O=>{var F,B;(B=(F=D.props).onPointerDown)==null||B.call(F,O),P(O)}})}return d.jsx("button",{ref:I,type:"button",role:"tab",id:T,"data-tab-value":e,"aria-selected":w["aria-selected"],"aria-controls":w["aria-controls"],tabIndex:w.tabIndex,disabled:w.disabled,className:G,onClick:N,onPointerEnter:k,onPointerLeave:j,onPointerDown:P,...f,children:d.jsx(ee,{as:"span",inheritColor:!0,ref:v,variant:Qz(g),className:lV(y.tabText),children:n})})});YS.displayName="TabsTab";const KS=l.forwardRef(function({value:e,children:n,className:r,...o},s){const{value:i,baseId:a}=Oa(),c=Df(),u=i===e,f=WS(a,e),m=XS(a,e),p=gV({isSelected:u,tabId:f});return d.jsx("div",{ref:s,role:"tabpanel",id:m,"aria-labelledby":p["aria-labelledby"],hidden:p.hidden,tabIndex:p.tabIndex,className:cV({slotClass:c.panel,className:r}),...o,children:n})});KS.displayName="TabsPanel";const qS=l.forwardRef(function({className:e,children:n,onKeyDown:r,...o},s){const{value:i,setValue:a,orientation:c,variant:u,disabled:f,tabElementsRef:m,layoutEpoch:p}=Oa(),b=Df(),g=l.useRef(null),h=l.useRef(null),C=Ro(s,u==="gloss"),_=l.useCallback(y=>{C(y),g.current=y},[C]);pV(g,h,i,c,u,m,p);const S=l.useCallback(y=>{if(r==null||r(y),y.defaultPrevented||f)return;const v=g.current;if(!v)return;const A=$S(v);if(A.length===0)return;const E=A.findIndex(N=>N===document.activeElement),T=c==="horizontal";let L=null;switch(y.key){case"ArrowRight":T&&(L=E<0?0:(E+1)%A.length);break;case"ArrowLeft":T&&(L=E<0?A.length-1:(E-1+A.length)%A.length);break;case"ArrowDown":T||(L=E<0?0:(E+1)%A.length);break;case"ArrowUp":T||(L=E<0?A.length-1:(E-1+A.length)%A.length);break;case"Home":L=0;break;case"End":L=A.length-1;break;default:return}if(L==null)return;y.preventDefault();const w=Jz(v,L),I=w==null?void 0:w.dataset.tabValue;I&&a(I)},[f,r,c,a]);return d.jsxs("div",{ref:_,role:"tablist",tabIndex:f?-1:0,"aria-orientation":c,"aria-disabled":f||void 0,className:oV({orientation:c,variant:u,slotClass:b.list,className:e}),onKeyDown:S,...o,children:[d.jsx("span",{ref:h,"aria-hidden":!0,className:sV({variant:u,slotClass:b.indicator}),style:{left:0,top:0,width:0,height:0,opacity:0}}),n]})});qS.displayName="TabsList";function xV({value:t,defaultValue:e,onValueChange:n,orientation:r="horizontal",size:o="base",variant:s="default",disabled:i=!1}){const a=l.useId(),[c,u]=Zz(t,e),f=l.useRef(null);f.current||(f.current=new Map);const[m,p]=l.useState(0),b=l.useCallback(x=>{u(x),n==null||n(x)},[n,u]),g=l.useCallback(()=>{p(x=>x+1)},[]);return{contextValue:l.useMemo(()=>({value:c,setValue:b,orientation:r,size:o,variant:s,baseId:a,disabled:i,tabElementsRef:f,layoutEpoch:m,notifyTabLayout:g}),[c,b,r,o,s,a,i,f,m,g])}}const pc=l.forwardRef(function({children:e,className:n,classNames:r,value:o,defaultValue:s,onValueChange:i,orientation:a="horizontal",size:c="base",variant:u="default",disabled:f=!1,...m},p){const{contextValue:b}=xV({value:o,defaultValue:s,onValueChange:i,orientation:a,size:c,variant:u,disabled:f});return d.jsx(US.Provider,{value:b,children:d.jsx(qz,{classNames:r,children:d.jsx("div",{ref:p,className:rV({orientation:b.orientation,slotClass:r==null?void 0:r.root,className:n}),"data-orientation":b.orientation,...m,children:e})})})});pc.displayName="Tabs";const CV=Object.assign(pc,{Root:pc,List:qS,Tab:YS,Panel:KS}),kf=l.createContext(null),hc=l.createContext({});function _V({value:t,children:e}){return d.jsx(kf.Provider,{value:t,children:e})}function SV({classNames:t,children:e}){const n=l.useContext(hc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(hc.Provider,{value:r,children:e})}function Pa(){const t=l.useContext(kf);if(!t)throw new Error("Meter.* components must be inside <Meter>.");return t}function vV(){return l.useContext(kf)}function eo(){return l.useContext(hc)}function mr(...t){return R(...t)}function yV(t,e,n){return Math.min(n,Math.max(e,t))}function TV(t,e,n){return n<=e?0:(t-e)/(n-e)*100}function AV(t){return Number.isInteger(t)?String(t):t.toFixed(1)}function EV(t,e){return t===e?!0:t==null||e==null?!1:t.clampedValue===e.clampedValue&&t.statusText===e.statusText&&t.min===e.min&&t.max===e.max}function LV({fillTargetStyle:t,isHorizontal:e}){const n=l.useRef(null),r=l.useRef(!0),o=de();return l.useLayoutEffect(()=>{const s=n.current;if(s){if(o||r.current){r.current=!1,V(s),s.style.width=t.width!=null?String(t.width):"",s.style.height=t.height!=null?String(t.height):"";return}V(s),X.to(s,{...e?{width:t.width}:{height:t.height},...ve(),overwrite:"auto"})}},[t.height,t.width,e,o]),l.useEffect(()=>{const s=n.current;return()=>{s&&V(s)}},[]),{fillRef:n}}const wV={small:"h-small",base:"h-base",mid:"h-plus",large:"h-mid"},IV={small:"w-small",base:"w-base",mid:"w-plus",large:"w-mid"},RV="relative overflow-hidden rounded-full bg-primary-tint",NV="w-full",DV="h-48",kV="absolute rounded-full",OV="inset-y-0 left-0",PV="inset-x-0 bottom-0",BV="bg-primary",jV="flex items-baseline justify-between gap-xsmall",MV="w-full",FV="min-w-[8rem]",GV="tabular-nums text-muted";function HV({orientation:t,slotClass:e,className:n}){return mr(Tf(t),e,n)}function zV({orientation:t,slotClass:e,className:n}){return mr(jV,t==="horizontal"?MV:FV,e,n)}function VV({slotClass:t,className:e}){return mr(GV,t,e)}function UV({isHorizontal:t,size:e,thickness:n,slotClass:r,className:o}){return mr(RV,t?NV:DV,n==null&&(t?wV[e]:IV[e]),r,o)}function $V({isHorizontal:t,hasCustomColor:e,slotClass:n}){return mr(kV,t?OV:PV,!e&&BV,n)}function WV({isHorizontal:t,thickness:e}){if(e==null)return;const n=Vs(e);return t?{height:n}:{width:n}}function XV(t){if(t)return{background:t}}function YV({isHorizontal:t,percent:e}){return t?{width:`${e}%`,height:"100%"}:{width:"100%",height:`${e}%`}}function KV({isHorizontal:t,percent:e,fillColorStyle:n}){return{width:t?`${e}%`:"100%",height:t?"100%":`${e}%`,...n}}function ZS(t){return`${t}-label`}function qV({clampedValue:t,min:e,max:n,statusText:r,labelConnected:o,labelId:s,ariaDescribedBy:i}){return{"aria-valuenow":t,"aria-valuemin":e,"aria-valuemax":n,"aria-valuetext":r,"aria-labelledby":o?s:void 0,"aria-describedby":i,"aria-label":o?void 0:r}}function ZV({ariaDescribedByProp:t,hintConnected:e,hintId:n,errorConnected:r,errorId:o}){return t??Ft(e?n:void 0,r?o:void 0)}function QV({value:t,min:e=0,max:n=100,size:r="base",thickness:o,color:s,formatValue:i=AV,orientation:a,"aria-describedby":c}){const u=vV(),f=a??(u==null?void 0:u.orientation)??"horizontal",m=u==null?void 0:u.meterId,p=m!=null?ZS(m):void 0,b=(u==null?void 0:u.labelConnected)??!1,g=(u==null?void 0:u.hintConnected)??!1,h=(u==null?void 0:u.errorConnected)??!1,x=l.useMemo(()=>yV(t,e,n),[n,e,t]),C=l.useMemo(()=>TV(x,e,n),[x,n,e]),_=f==="horizontal",S=l.useMemo(()=>i(x),[x,i]),y=ZV({ariaDescribedByProp:c,hintConnected:g,hintId:u==null?void 0:u.hintId,errorConnected:h,errorId:u==null?void 0:u.errorId}),v=qV({clampedValue:x,min:e,max:n,statusText:S,labelConnected:b,labelId:p,ariaDescribedBy:y}),A=l.useMemo(()=>WV({isHorizontal:_,thickness:o}),[_,o]),E=l.useMemo(()=>XV(s),[s]),T=l.useMemo(()=>YV({isHorizontal:_,percent:C}),[_,C]),L=l.useMemo(()=>KV({isHorizontal:_,percent:C,fillColorStyle:E}),[E,_,C]),w=u==null?void 0:u.setDisplay;return l.useLayoutEffect(()=>{w==null||w({clampedValue:x,statusText:S,min:e,max:n})},[x,n,e,w,S]),{size:r,thickness:o,color:s,isHorizontal:_,percent:C,aria:v,trackCrossStyle:A,fillColorStyle:E,fillTargetStyle:T,fillInitialStyle:L}}function JV({label:t,showValue:e,valueText:n,hint:r,error:o,trackProps:s}){const i=eo(),a=t!=null||e||n!=null;return d.jsxs(d.Fragment,{children:[a?d.jsxs(Of,{children:[t!=null?d.jsx(Ue,{classNames:{root:i.label},children:t}):null,n!=null?d.jsx(Xi,{children:n}):e?d.jsx(Xi,{}):null]}):null,s.value!=null?d.jsx(jf,{...s,value:s.value}):null,r!=null?d.jsx(Pf,{children:r}):null,o!=null?d.jsx(Bf,{children:o}):null]})}function QS({className:t,classNames:e,...n}){const r=eo();return d.jsx(Ue,{className:t,classNames:{...e,root:mr(r.label,e==null?void 0:e.root)},...n})}QS.displayName="MeterLabel";function Of({children:t,className:e,...n}){const{orientation:r}=Pa(),o=eo();return d.jsx("div",{className:zV({orientation:r,slotClass:o.header,className:e}),...n,children:t})}Of.displayName="Meter.Header";function Xi({children:t,className:e,...n}){const{display:r}=Pa(),o=eo(),s=t??(r==null?void 0:r.statusText);return s==null?null:d.jsx(ee,{as:"span",variant:"base",className:VV({slotClass:o.value,className:e}),...n,children:s})}Xi.displayName="Meter.Value";function Pf({children:t,className:e,id:n,...r}){const o=Pa(),s=eo();return d.jsx(Xe,{id:n??o.hintId,className:mr(s.hint,e),...r,children:t})}Pf.displayName="Meter.Hint";function Bf({children:t,className:e,id:n,...r}){const o=Pa(),s=eo();return d.jsx(Ze,{id:n??o.errorId,className:mr(s.error,e),...r,children:t})}Bf.displayName="Meter.Error";const jf=l.forwardRef(function({value:e,min:n,max:r,size:o,thickness:s,color:i,formatValue:a,orientation:c,className:u,"aria-describedby":f,...m},p){const b=eo(),{size:g,isHorizontal:h,aria:x,trackCrossStyle:C,fillTargetStyle:_,fillInitialStyle:S}=QV({value:e,min:n,max:r,size:o,thickness:s,color:i,formatValue:a,orientation:c,"aria-describedby":f}),{fillRef:y}=LV({fillTargetStyle:_,isHorizontal:h});return d.jsx("div",{ref:p,role:"meter","aria-valuenow":x["aria-valuenow"],"aria-valuemin":x["aria-valuemin"],"aria-valuemax":x["aria-valuemax"],"aria-valuetext":x["aria-valuetext"],"aria-labelledby":x["aria-labelledby"],"aria-describedby":x["aria-describedby"],"aria-label":x["aria-label"],className:UV({isHorizontal:h,size:g??"base",thickness:s,slotClass:b.track,className:u}),style:C,...m,children:d.jsx("span",{ref:y,"aria-hidden":!0,className:$V({isHorizontal:h,hasCustomColor:!!i,slotClass:b.fill}),style:S})})});jf.displayName="Meter.Track";function eU({children:t,id:e,orientation:n="horizontal",label:r,showValue:o,valueText:s,hint:i,error:a,value:c,min:u,max:f,size:m,thickness:p,color:b,formatValue:g}){const h=l.useId(),x=e??`meter-${h}`,C=Yt(x),_=Kt(x),S=ZS(x),[y,v]=l.useState(null),A=l.useCallback(j=>{v(P=>EV(P,j)?P:j)},[]),E=qt(t),T=r!=null||E&&Te(t,"Label"),L=i!=null||E&&Te(t,"Meter.Hint"),w=a!=null||E&&Te(t,"Meter.Error"),I=l.useMemo(()=>({meterId:x,hintId:C,errorId:_,hintConnected:L,errorConnected:w,labelConnected:T,orientation:n,display:y,setDisplay:A}),[y,_,w,L,T,C,x,n,A]),N=l.useMemo(()=>({labelId:S}),[S]);return{meterId:x,isCompound:E,fieldCtx:I,fieldLabelCtx:N,trackProps:{value:c,min:u,max:f,size:m,thickness:p,color:b,formatValue:g,orientation:n},label:r,showValue:o,valueText:s,hint:i,error:a}}function JS({children:t,className:e,classNames:n,id:r,orientation:o,label:s,showValue:i,valueText:a,hint:c,error:u,value:f,min:m,max:p,size:b,thickness:g,color:h,formatValue:x,...C}){const _=eU({children:t,id:r,orientation:o,label:s,showValue:i,valueText:a,hint:c,error:u,value:f,min:m,max:p,size:b,thickness:g,color:h,formatValue:x}),S=_.isCompound?t:d.jsx(JV,{label:_.label,showValue:_.showValue,valueText:_.valueText,hint:_.hint,error:_.error,trackProps:_.trackProps});return d.jsx(_V,{value:_.fieldCtx,children:d.jsx(SV,{classNames:n,children:d.jsx(Xt.Provider,{value:_.fieldLabelCtx,children:d.jsx(pn,{id:_.meterId,className:HV({orientation:_.fieldCtx.orientation,slotClass:n==null?void 0:n.root,className:e}),...C,children:S})})})})}JS.displayName="Meter";const tU=Object.assign(JS,{Header:Of,Label:QS,Value:Xi,Hint:Pf,Error:Bf,Track:jf}),Mf=l.createContext(null),gc=l.createContext({});function nU({value:t,children:e}){return d.jsx(Mf.Provider,{value:t,children:e})}function rU({classNames:t,children:e}){const n=l.useContext(gc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(gc.Provider,{value:r,children:e})}function Ba(){const t=l.useContext(Mf);if(!t)throw new Error("ProgressBar.* components must be inside <ProgressBar>.");return t}function oU(){return l.useContext(Mf)}function to(){return l.useContext(gc)}const sU=1500,iU="expo.inOut";function Hn(...t){return R(...t)}function aU(t,e,n){return Math.min(n,Math.max(e,t))}function lU(t,e,n){return n<=e?0:(t-e)/(n-e)*100}function cU(t){return Number.isInteger(t)?String(t):t.toFixed(1)}function uU(t,e){return t===e?!0:t==null||e==null?!1:t.clampedValue===e.clampedValue&&t.statusText===e.statusText&&t.min===e.min&&t.max===e.max&&t.indeterminate===e.indeterminate}function dU({indeterminate:t,fillTargetStyle:e,isHorizontal:n}){const r=l.useRef(null),o=l.useRef(!0),s=de();return l.useLayoutEffect(()=>{if(t)return;const i=r.current;if(!i)return;const a=Se(),c=n?"width":"height",u=e[c]!=null?String(e[c]):"",f=()=>{V(i),i.style.transform="",n?(i.style.width=u,i.style.height="100%"):(i.style.width="100%",i.style.height=u)};if(s||!a.enableProgressFill||o.current){o.current=!1,f();return}o.current=!1,V(i),i.style.transform="",X.to(i,{[c]:u,...m0(),overwrite:"auto"})},[e.height,e.width,t,n,s]),l.useLayoutEffect(()=>{if(!t)return;const i=r.current,a=i==null?void 0:i.parentElement;if(!i||!a)return;if(V(i),s){X.set(i,{clearProps:"transform"});return}const c=()=>{const f=n?a.offsetWidth:a.offsetHeight,m=n?i.offsetWidth:i.offsetHeight;f<=0||m<=0||(V(i),X.fromTo(i,n?{x:-m}:{y:m},{...n?{x:f}:{y:-f},duration:sU/1e3,ease:iU,repeat:-1,overwrite:"auto"}))};if(c(),typeof ResizeObserver>"u")return;const u=new ResizeObserver(()=>c());return u.observe(a),u.observe(i),()=>u.disconnect()},[t,n,s]),l.useEffect(()=>{const i=r.current;return()=>{i&&V(i)}},[]),{fillRef:r,reduceMotion:s}}const fU={small:"h-small",base:"h-base",mid:"h-plus",large:"h-mid"},mU={small:"w-small",base:"w-base",mid:"w-plus",large:"w-mid"},pU="relative overflow-hidden rounded-full bg-primary-tint",hU="w-full",gU="h-48",bU="absolute rounded-full",xU="inset-y-0 left-0",CU="inset-x-0 bottom-0",ev="bg-primary",_U="absolute rounded-full will-change-transform",SU="inset-y-0 left-0 w-1/4",vU="inset-x-0 bottom-0 h-1/4",yU="left-1/4 w-1/2",TU="bottom-1/4 h-1/2",AU="flex items-baseline justify-between gap-xsmall",EU="w-full",LU="min-w-[8rem]",wU="tabular-nums text-muted";function IU({orientation:t,slotClass:e,className:n}){return Hn(Tf(t),e,n)}function RU({orientation:t,slotClass:e,className:n}){return Hn(AU,t==="horizontal"?EU:LU,e,n)}function NU({slotClass:t,className:e}){return Hn(wU,t,e)}function DU({isHorizontal:t,size:e,thickness:n,slotClass:r,className:o}){return Hn(pU,t?hU:gU,n==null&&(t?fU[e]:mU[e]),r,o)}function kU({isHorizontal:t,hasCustomColor:e,slotClass:n}){return Hn(bU,t?xU:CU,!e&&ev,n)}function OU({isHorizontal:t,hasCustomColor:e,reduceMotion:n,slotClass:r}){return Hn(_U,t?SU:vU,!e&&ev,n&&(t?yU:TU),r)}function PU({isHorizontal:t,thickness:e}){if(e==null)return;const n=Vs(e);return t?{height:n}:{width:n}}function BU(t){if(t)return{background:t}}function jU({isHorizontal:t,percent:e}){return t?{width:`${e}%`,height:"100%"}:{width:"100%",height:`${e}%`}}function MU({isHorizontal:t,fillColorStyle:e}){return{...t?{height:"100%"}:{width:"100%"},...e}}const FU="Loading…";function tv(t){return`${t}-label`}function GU({clampedValue:t,min:e,max:n,statusText:r,indeterminate:o,labelId:s,ariaDescribedBy:i}){return{"aria-valuenow":o?void 0:t,"aria-valuemin":o?void 0:e,"aria-valuemax":o?void 0:n,"aria-valuetext":r,"aria-busy":o||void 0,"aria-labelledby":s,"aria-describedby":i,"aria-label":s==null?r:void 0}}function HU({ariaDescribedByProp:t,hintConnected:e,hintId:n,errorConnected:r,errorId:o}){return t??Ft(e?n:void 0,r?o:void 0)}function zU({value:t=0,indeterminate:e=!1,min:n=0,max:r=100,size:o="base",thickness:s,color:i,formatValue:a=cU,orientation:c,"aria-describedby":u}){const f=oU(),m=c??(f==null?void 0:f.orientation)??"horizontal",p=f==null?void 0:f.progressId,b=p!=null?tv(p):void 0,g=(f==null?void 0:f.hintConnected)??!1,h=(f==null?void 0:f.errorConnected)??!1,x=l.useMemo(()=>aU(t,n,r),[r,n,t]),C=l.useMemo(()=>lU(x,n,r),[x,r,n]),_=m==="horizontal",S=l.useMemo(()=>e?FU:a(x),[x,a,e]),y=HU({ariaDescribedByProp:u,hintConnected:g,hintId:f==null?void 0:f.hintId,errorConnected:h,errorId:f==null?void 0:f.errorId}),v=GU({clampedValue:x,min:n,max:r,statusText:S,indeterminate:e,labelId:b,ariaDescribedBy:y}),A=l.useMemo(()=>PU({isHorizontal:_,thickness:s}),[_,s]),E=l.useMemo(()=>BU(i),[i]),T=l.useMemo(()=>jU({isHorizontal:_,percent:C}),[_,C]),L=f==null?void 0:f.setDisplay;return l.useLayoutEffect(()=>{L==null||L({clampedValue:x,statusText:S,min:n,max:r,indeterminate:e})},[x,e,r,n,L,S]),{size:o,thickness:s,color:i,indeterminate:e,isHorizontal:_,aria:v,trackCrossStyle:A,fillColorStyle:E,fillTargetStyle:T}}function VU({label:t,showValue:e,valueText:n,hint:r,error:o,trackProps:s}){const i=to(),a=t!=null||e||n!=null;return d.jsxs(d.Fragment,{children:[a?d.jsxs(Ff,{children:[t!=null?d.jsx(Ue,{classNames:{root:i.label},children:t}):null,n!=null?d.jsx(Yi,{children:n}):e?d.jsx(Yi,{}):null]}):null,d.jsx(zf,{...s}),r!=null?d.jsx(Gf,{children:r}):null,o!=null?d.jsx(Hf,{children:o}):null]})}function nv({className:t,classNames:e,...n}){const r=to();return d.jsx(Ue,{className:t,classNames:{...e,root:Hn(r.label,e==null?void 0:e.root)},...n})}nv.displayName="ProgressBarLabel";function Ff({children:t,className:e,...n}){const{orientation:r}=Ba(),o=to();return d.jsx("div",{className:RU({orientation:r,slotClass:o.header,className:e}),...n,children:t})}Ff.displayName="ProgressBar.Header";function Yi({children:t,className:e,...n}){const{display:r}=Ba(),o=to(),s=t??(r==null?void 0:r.statusText);return s==null?null:d.jsx(ee,{as:"span",variant:"base",className:NU({slotClass:o.value,className:e}),...n,children:s})}Yi.displayName="ProgressBar.Value";function Gf({children:t,className:e,id:n,...r}){const o=Ba(),s=to();return d.jsx(Xe,{id:n??o.hintId,className:Hn(s.hint,e),...r,children:t})}Gf.displayName="ProgressBar.Hint";function Hf({children:t,className:e,id:n,...r}){const o=Ba(),s=to();return d.jsx(Ze,{id:n??o.errorId,className:Hn(s.error,e),...r,children:t})}Hf.displayName="ProgressBar.Error";const zf=l.forwardRef(function({value:e,indeterminate:n,min:r,max:o,size:s,thickness:i,color:a,formatValue:c,orientation:u,className:f,"aria-describedby":m,...p},b){const g=to(),{size:h,indeterminate:x,isHorizontal:C,aria:_,trackCrossStyle:S,fillColorStyle:y,fillTargetStyle:v}=zU({value:e,indeterminate:n,min:r,max:o,size:s,thickness:i,color:a,formatValue:c,orientation:u,"aria-describedby":m}),{fillRef:A,reduceMotion:E}=dU({indeterminate:x,fillTargetStyle:v,isHorizontal:C});return d.jsx("div",{ref:b,role:"progressbar","aria-valuenow":_["aria-valuenow"],"aria-valuemin":_["aria-valuemin"],"aria-valuemax":_["aria-valuemax"],"aria-valuetext":_["aria-valuetext"],"aria-busy":_["aria-busy"],"aria-labelledby":_["aria-labelledby"],"aria-describedby":_["aria-describedby"],"aria-label":_["aria-label"],className:DU({isHorizontal:C,size:h??"base",thickness:i,slotClass:g.track,className:f}),style:S,...p,children:x?d.jsx("span",{ref:A,"aria-hidden":!0,className:OU({isHorizontal:C,hasCustomColor:!!a,reduceMotion:E,slotClass:g.indeterminateFill}),style:y}):d.jsx("span",{ref:A,"aria-hidden":!0,className:kU({isHorizontal:C,hasCustomColor:!!a,slotClass:g.fill}),style:MU({isHorizontal:C,fillColorStyle:y})})})});zf.displayName="ProgressBar.Track";function UU({children:t,id:e,orientation:n="horizontal",label:r,showValue:o,valueText:s,hint:i,error:a,value:c,indeterminate:u,min:f,max:m,size:p,thickness:b,color:g,formatValue:h}){const x=l.useId(),C=e??`progress-${x}`,_=Yt(C),S=Kt(C),y=tv(C),[v,A]=l.useState(null),E=l.useCallback(j=>{A(P=>uU(P,j)?P:j)},[]),T=qt(t),L=i!=null||T&&Te(t,"ProgressBar.Hint"),w=a!=null||T&&Te(t,"ProgressBar.Error"),I=l.useMemo(()=>({progressId:C,hintId:_,errorId:S,hintConnected:L,errorConnected:w,orientation:n,display:v,setDisplay:E}),[v,S,w,L,_,n,C,E]),N=l.useMemo(()=>({labelId:y}),[y]);return{progressId:C,isCompound:T,fieldCtx:I,fieldLabelCtx:N,trackProps:{value:c,indeterminate:u,min:f,max:m,size:p,thickness:b,color:g,formatValue:h,orientation:n},label:r,showValue:o,valueText:s,hint:i,error:a}}function rv({children:t,className:e,classNames:n,id:r,orientation:o,label:s,showValue:i,valueText:a,hint:c,error:u,value:f,indeterminate:m,min:p,max:b,size:g,thickness:h,color:x,formatValue:C,..._}){const S=UU({children:t,id:r,orientation:o,label:s,showValue:i,valueText:a,hint:c,error:u,value:f,indeterminate:m,min:p,max:b,size:g,thickness:h,color:x,formatValue:C}),y=S.isCompound?t:d.jsx(VU,{label:S.label,showValue:S.showValue,valueText:S.valueText,hint:S.hint,error:S.error,trackProps:S.trackProps});return d.jsx(nU,{value:S.fieldCtx,children:d.jsx(rU,{classNames:n,children:d.jsx(Xt.Provider,{value:S.fieldLabelCtx,children:d.jsx(pn,{id:S.progressId,className:IU({orientation:S.fieldCtx.orientation,slotClass:n==null?void 0:n.root,className:e}),..._,children:y})})})})}rv.displayName="ProgressBar";const $U=Object.assign(rv,{Header:Ff,Label:nv,Value:Yi,Hint:Gf,Error:Hf,Track:zf});function kn(...t){return R(...t)}function WU(t,e){return t||e}function XU(t){return!!(t.onClick||t.onKeyDown||t.onPointerDown)}function YU({pressable:t,isGloss:e,animated:n,onPress:r,onClick:o,onKeyDown:s,onPointerDown:i,onPointerOver:a,onPointerOut:c,forwardedRef:u}){const f=l.useRef(null),m=l.useRef(!1),p=t&&e,b=l.useMemo(()=>Mt(f,e),[e]),g=l.useCallback(A=>{b(A),f.current=A,dt(u,A)},[b,u]),h=Do(f,p,{pointerInsideRef:m}),x=du(f,t&&!e,{pointerInsideRef:m});l.useEffect(()=>{if(t)return;const A=f.current;A&&V(A),m.current=!1},[t]);const C=l.useCallback(A=>{if(i==null||i(A),!t||!n||A.defaultPrevented||de())return;const E=f.current;if(E){if(e){No(E,m.current);return}We(E,{pointerInside:m.current,shadow:x.shadow})}},[n,e,i,t,x.shadow]),_=l.useCallback(A=>{o==null||o(A),!(!t||A.defaultPrevented)&&(r==null||r(A))},[o,r,t]),S=l.useCallback(A=>{s==null||s(A)},[s]),y=l.useCallback(A=>{a==null||a(A),!(!t||A.defaultPrevented||!n)&&(e?h.onPointerOver(A):x.onPointerOver(A))},[n,h,e,a,t,x]),v=l.useCallback(A=>{c==null||c(A),!(!t||!n)&&(e?h.onPointerOut(A):x.onPointerOut(A))},[n,h,e,c,t,x]);return{setRootRef:g,pressableLiftMotionClass:x.motionClass,handlePointerDown:C,handleClick:_,handleKeyDown:S,onPointerOver:y,onPointerOut:v,onPointerDownProp:i,onClickProp:o,onKeyDownProp:s}}function KU(){return"h3"}const bc=l.createContext({});function qU({classNames:t,children:e}){const n=l.useContext(bc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(bc.Provider,{value:r,children:e})}function no(){return l.useContext(bc)}const ZU={default:"bg-surface border-token",outline:"bg-transparent border-token",secondary:"bg-secondary border-token"},QU="shadow-token-base",JU="gloss-panel flex min-w-0 flex-col rounded-mid text-foreground outline-none",e$="gloss-content flex min-w-0 flex-1 flex-col",t$="flex min-w-0 flex-col overflow-hidden rounded-mid text-foreground outline-none",n$="relative cursor-pointer focus-ring",ci="w-full border-0 p-0 text-left",r$="relative flex min-w-0 flex-1 flex-col",o$="flex shrink-0 flex-col gap-small py-plus px-mid text-left",s$="flex min-w-0 flex-1 flex-col gap-xsmall text-left",i$="min-w-0 px-mid pb-mid",a$="min-w-0",l$="min-w-0 text-muted",c$="mt-auto border-t-token py-plus px-mid text-muted";function u$(t){return R(JU,Io,t)}function d$(t){return t?R(nn,"cursor-pointer focus-ring"):""}function f$(t,e,n,r){return R(t$,e&&R(n$,n),Io,ZU[t],!e&&QU,r)}function m$({className:t="",...e}){const n=no();return d.jsx("div",{className:kn(o$,n.header,t),...e})}function p$({className:t="",...e}){const n=no();return d.jsx("div",{className:kn(s$,n.headingBlock,t),...e})}function h$({className:t="",...e}){const n=no();return d.jsx("div",{className:kn(i$,n.body,t),...e})}const ov=l.forwardRef(function({className:e="",...n},r){const o=no();return d.jsx(ee,{ref:r,as:KU(),variant:"base",className:kn(a$,o.title,e),...n})}),sv=l.forwardRef(function({className:e="",...n},r){const o=no();return d.jsx(ee,{ref:r,as:"p",variant:"base",className:kn(l$,o.description,e),...n})});function g$({className:t="",...e}){const n=no();return d.jsx("div",{className:kn(c$,n.footer,t),...e})}function b$({pressable:t,isGloss:e,renderAsButton:n,glossPanelClass:r,rootClassName:o,setRootRef:s,rest:i,children:a,onPointerOver:c,onPointerOut:u,onPointerDown:f,onClick:m,onKeyDown:p}){const b=no();if(e){const g=d.jsx("div",{className:R(e$,b.glossContent),children:a});return t?d.jsx("button",{type:"button",...i,ref:s,className:R(ci,r,d$(t)),onPointerOver:c,onPointerOut:u,onPointerDown:f,onClick:m,onKeyDown:p,children:g}):n?d.jsx("button",{type:"button",...i,ref:s,className:R(ci,r),onPointerOver:c,onPointerOut:u,onPointerDown:f,onClick:m,onKeyDown:p,children:g}):d.jsx("div",{...i,ref:s,className:r,onPointerOver:c,onPointerOut:u,children:g})}return t?d.jsx("button",{type:"button",...i,ref:s,className:R(ci,o),onPointerOver:c,onPointerOut:u,onPointerDown:f,onClick:m,onKeyDown:p,children:d.jsx("div",{className:kn(r$,b.content),children:a})}):n?d.jsx("button",{type:"button",...i,ref:s,className:R(ci,o),onPointerOver:c,onPointerOut:u,onPointerDown:f,onClick:m,onKeyDown:p,children:a}):d.jsx("div",{...i,ref:s,className:o,onPointerOver:c,onPointerOut:u,children:a})}ov.displayName="CardTitle";sv.displayName="CardDescription";function x$({variant:t="default",pressable:e=!1,onClick:n,onKeyDown:r,onPointerDown:o}){const s=t==="gloss",i=e&&s,a=WU(e,XU({onClick:n,onKeyDown:r,onPointerDown:o}));return{variant:t,pressable:e,isGloss:s,glossPressable:i,renderAsButton:a}}const iv=l.forwardRef(function({className:e="",variant:n="default",pressable:r=!1,animated:o=!0,classNames:s,onPress:i,onPointerOver:a,onPointerOut:c,onPointerDown:u,onClick:f,onKeyDown:m,children:p,...b},g){const h=x$({variant:n,pressable:r,onClick:f,onKeyDown:m,onPointerDown:u}),x=YU({pressable:r,isGloss:h.isGloss,animated:o,onPress:i,onClick:f,onKeyDown:m,onPointerDown:u,onPointerOver:a,onPointerOut:c,forwardedRef:g}),C=u$(kn(s==null?void 0:s.root,e)),_=h.isGloss?"":f$(h.variant,r,x.pressableLiftMotionClass,kn(s==null?void 0:s.root,e));return d.jsx(qU,{classNames:s,children:d.jsx(b$,{pressable:r,isGloss:h.isGloss,renderAsButton:h.renderAsButton,glossPanelClass:C,rootClassName:_,setRootRef:x.setRootRef,rest:b,onPointerOver:x.onPointerOver,onPointerOut:x.onPointerOut,onPointerDown:r?x.handlePointerDown:x.onPointerDownProp,onClick:r?x.handleClick:x.onClickProp,onKeyDown:r?x.handleKeyDown:x.onKeyDownProp,children:p})})});iv.displayName="Card";const C$=Object.assign(iv,{Header:m$,HeadingBlock:p$,Title:ov,Description:sv,Body:h$,Footer:g$}),av=l.createContext(null),lv=l.createContext("top"),xc=l.createContext(null),Cc=l.createContext({});function _$({classNames:t,children:e}){const n=l.useContext(Cc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Cc.Provider,{value:r,children:e})}function pr(){return l.useContext(Cc)}function Vf(t){const e=l.useContext(av);if(!e)throw new Error(`${t} must be used inside <Tooltip>.`);return e}function S$(){return l.useContext(lv)}function Uf(t){const e=l.useContext(xc);if(!e)throw new Error(`${t} must be inside <Tooltip.Panel> or <Tooltip.Content>.`);return e}function v$(t,e,n){return n?t?t.split(/\s+/).includes(e)?t:`${t} ${e}`:e:t}function Dp(t,e){return{onPointerEnter:n=>{var r,o;(r=t.onPointerEnter)==null||r.call(t,n),(o=e==null?void 0:e.onPointerEnter)==null||o.call(e,n)},onPointerLeave:n=>{var r,o;(r=t.onPointerLeave)==null||r.call(t,n),(o=e==null?void 0:e.onPointerLeave)==null||o.call(e,n)},onFocus:n=>{var r,o;(r=t.onFocus)==null||r.call(t,n),(o=e==null?void 0:e.onFocus)==null||o.call(e,n)},onBlur:n=>{var r,o;(r=t.onBlur)==null||r.call(t,n),(o=e==null?void 0:e.onBlur)==null||o.call(e,n)}}}function Wt(...t){return R(...t)}const y$=new Set(["TooltipIndicator","TooltipIcon","TooltipTitle","TooltipDescription","TooltipMessage"]);function ja(t,e){let n=!1;const r=o=>{if(!n)for(const s of l.Children.toArray(o)){if(!l.isValidElement(s))continue;const i=s.type.displayName;if(e(i)){n=!0;return}r(s.props.children)}};return r(t),n}function T$(t){return ja(t,e=>e!=null&&y$.has(e))}function A$(t){return ja(t,e=>e==="TooltipTitle")}function E$(t){return ja(t,e=>e==="TooltipDescription")}function L$(t){return ja(t,e=>e==="TooltipIndicator"||e==="TooltipIcon")}function cv(t,e){for(const n of l.Children.toArray(t)){if(!l.isValidElement(n))continue;const r=n.type.displayName;(r==="TooltipIndicator"||r==="TooltipIcon")&&e(n.props),cv(n.props.children,e)}}function w$(t,e,n,r){return n===!1||r===null?!1:r!==void 0||e!=null?!0:$f(t)}function I$(t,e,n,r){if(!L$(t))return!1;let o=!1;return cv(t,s=>{w$(e,n,s.showIcon??r,s.children)&&(o=!0)}),o}function $f(t){return t==="danger"||t==="success"||t==="info"||t==="warning"}function R$(t,e,n,r,o){return n===!1?!1:r?I$(o,t,e,n):e!=null?!0:$f(t)}function N$({variant:t,icon:e,showIcon:n,title:r,description:o,isCompound:s,children:i}){const a=r!=null||(s?A$(i):i!=null&&o==null),c=o!=null||s&&E$(i);return{hasIndicator:R$(t,e,n,s,i),hasTitle:a,hasDescription:c,hasAction:!1,hasClose:!1}}function D$(...t){return e=>{for(const n of t)typeof n=="function"?n(e):n&&(n.current=e)}}function kp(t){return t.type.displayName==="TooltipArrow"}function k$({open:t,portalMounted:e,setPortalMounted:n,tipRef:r}){l.useLayoutEffect(()=>{if(!e)return;const o=r.current;if(!o)return;const s=$t();let i=!1;if(s)return V(o),t?ha(o):n(!1),()=>{i=!0};if(V(o),t)return ga({surface:o,vars:{...Co(),overwrite:"auto"}}),()=>{i=!0,V(o)};const a=ba({surface:o,vars:{...Co(),overwrite:"auto"},onComplete:()=>{i||n(!1)}});return()=>{i=!0,V(o),a.kill()}},[t,e,n,r])}const O$=8,uv={default:"border-token bg-surface",outline:"bg-transparent border-token",secondary:"bg-secondary border-token",danger:"bg-surface-tint-danger border-token",success:"bg-surface-tint-success border-token",info:"bg-surface-tint-info border-token",warning:"bg-surface-tint-warning border-token"},dv={small:"max-w-[12rem] p-small",base:"max-w-[16rem] p-base",mid:"max-w-xs p-plus",large:"max-w-sm p-mid"},P$={small:"tools",base:"small",mid:"base",large:"mid"},B$={small:"tools",base:"tools",mid:"small",large:"base"},j$={small:"icon-small",base:"icon-base",mid:"icon-mid",large:"icon-large"},M$={small:"[&_svg]:icon-small",base:"[&_svg]:icon-base",mid:"[&_svg]:icon-mid",large:"[&_svg]:icon-large"},fv={default:"text-foreground",outline:"text-foreground",secondary:"text-secondary-foreground",danger:"text-danger",success:"text-success",info:"text-info",warning:"text-warning"},mv={small:"gap-x-xsmall gap-y-0",base:"gap-x-small gap-y-xsmall",mid:"gap-x-base gap-y-xsmall",large:"gap-x-plus gap-y-small"},F$="inline-flex shrink-0",G$="inline-flex shrink-0 [&_svg]:shrink-0",H$="text-muted",z$="pointer-events-none absolute z-0 size-2 rotate-45",V$="border-0 bg-[var(--color-surface)]",U$="pointer-events-none z-[10000] w-max min-w-0 overflow-visible text-left outline-none will-change-transform",$$="relative overflow-visible",W$="gloss-panel gloss-deep relative z-[1] w-max min-w-0 origin-center overflow-hidden rounded-mid text-left text-foreground",X$="gloss-content",Y$="contents",K$="relative z-[1] w-max min-w-0 rounded-mid text-left animate-shadow";function q$({size:t,slotClass:e,className:n}){return Wt(W$,nn,dv[t],e,n)}function Z$({gridSlots:t,size:e,slotClass:n}){return Wt(Ho(t,mv[e]),X$,n)}function Q$({variant:t,surface:e,size:n,gridSlots:r,slotClass:o,className:s}){return e==="gloss"?q$({size:n,slotClass:o,className:s}):Wt(Ho(r,mv[n]),K$,uv[t],dv[n],o,s)}function J$({variant:t,surface:e,resolvedSide:n,slotClass:r,className:o}){return Wt(z$,e==="gloss"?V$:uv[t],wb[n],r,o)}function eW({resolvedSide:t,showArrow:e,slotClass:n,className:r}){return Wt(U$,e&&Ib[t],n,r)}function tW({variant:t,size:e,showIcon:n,icon:r,children:o}){if(o===null)return null;if(o!==void 0)return o;if(n===!1)return null;if(r!=null)return r;if(!$f(t))return null;const s=yd[t];return d.jsx(s,{"aria-hidden":!0,className:Wt("shrink-0",j$[e],fv[t])})}function nW(t,e,n,r){return e!=null||n!=null?d.jsxs(d.Fragment,{children:[r.hasIndicator?d.jsx(mo,{}):null,e!=null?d.jsx(Ki,{children:e}):null,n!=null?d.jsx(Wf,{children:n}):null]}):t==null?null:typeof t=="string"||typeof t=="number"?d.jsxs(d.Fragment,{children:[r.hasIndicator?d.jsx(mo,{}):null,d.jsx(Ki,{children:t})]}):l.isValidElement(t)?d.jsxs(d.Fragment,{children:[r.hasIndicator?d.jsx(mo,{}):null,d.jsx("div",{className:zo(r),children:t})]}):t}function mo({className:t,children:e,showIcon:n,...r}){const o=pr(),{variant:s,size:i,icon:a,showIcon:c,gridSlots:u}=Uf("Tooltip.Indicator"),f=tW({variant:s,size:i,showIcon:n??c,icon:a,children:e});return f==null?null:d.jsx("span",{className:Wt(G$,M$[i],fv[s],Rr(u),o.indicator,o.icon,t),...r,children:f})}mo.displayName="TooltipIndicator";function pv(t){return d.jsx(mo,{...t})}pv.displayName="TooltipIcon";function hv({className:t,...e}){const n=pr();return d.jsx("div",{className:Wt(Y$,n.message,t),...e})}hv.displayName="TooltipMessage";function Ki({className:t,...e}){const n=pr(),{size:r,gridSlots:o}=Uf("Tooltip.Title");return d.jsx(ee,{as:"div",variant:P$[r],className:Wt(zo(o),n.title,t),...e})}Ki.displayName="TooltipTitle";function Wf({className:t,...e}){const n=pr(),{size:r,gridSlots:o}=Uf("Tooltip.Description");return d.jsx(ee,{as:"div",variant:B$[r],className:Wt(H$,ks(o),n.description,t),...e})}Wf.displayName="TooltipDescription";function Xf({variant:t="default",surface:e="default",size:n="base",icon:r,showIcon:o,title:s,description:i,className:a,children:c,glossPanelRef:u,...f}){const m=pr(),p=e==="gloss",b=c!=null&&T$(c),g=l.useMemo(()=>N$({variant:t,icon:r,showIcon:o,title:s,description:i,isCompound:b,children:c}),[c,i,r,b,o,s,t]),h=l.useMemo(()=>({variant:t,size:n,icon:r,showIcon:o,gridSlots:g}),[g,r,o,n,t]),x=b?c:nW(c,s,i,g),C=Q$({variant:t,surface:e,size:n,gridSlots:g,slotClass:m.panel,className:a});return p?d.jsx(xc.Provider,{value:h,children:d.jsx("div",{ref:u,className:C,...f,children:d.jsx("div",{className:Z$({gridSlots:g,size:n,slotClass:m.glossContent}),children:x})})}):d.jsx(xc.Provider,{value:h,children:d.jsx("div",{className:C,...f,children:x})})}Xf.displayName="TooltipPanel";const gv=l.forwardRef(function({asChild:e=!0,className:n,children:r,onPointerEnter:o,onPointerLeave:s,onFocus:i,onBlur:a,...c},u){const f=pr(),{scheduleShow:m,hide:p,tooltipId:b,open:g,triggerRef:h}=Vf("Tooltip.Trigger"),x=l.useMemo(()=>({onPointerEnter:()=>m(),onPointerLeave:()=>p(),onFocus:()=>m(),onBlur:()=>p()}),[p,m]),C=l.useCallback(S=>{h.current=S,typeof u=="function"?u(S):u&&(u.current=S)},[u,h]),_=l.Children.count(r)===1&&l.isValidElement(r)?r:null;if(e&&_){const S=_;return l.cloneElement(S,{...Dp(x,{onPointerEnter:o,onPointerLeave:s,onFocus:i,onBlur:a}),className:Wt(f.root,f.trigger,S.props.className,n),"aria-describedby":v$(S.props["aria-describedby"],b,g),ref:D$(S.props.ref,C)})}return d.jsx("span",{ref:C,className:Wt(F$,f.root,f.trigger,n),"aria-describedby":g?b:void 0,tabIndex:c.tabIndex??0,...Dp(x,{onPointerEnter:o,onPointerLeave:s,onFocus:i,onBlur:a}),...c,children:r})});gv.displayName="TooltipTrigger";function Yf({className:t,...e}){const n=pr(),r=S$(),{variant:o,surface:s}=Vf("Tooltip.Arrow");return d.jsx("span",{"aria-hidden":!0,className:J$({variant:o,surface:s,resolvedSide:r,slotClass:n.arrow,className:t}),...e})}Yf.displayName="TooltipArrow";const bv=l.forwardRef(function({className:e,children:n,showArrow:r=!1,offset:o=O$,...s},i){const a=pr(),{open:c,tooltipId:u,variant:f,surface:m,size:p,side:b,icon:g,showIcon:h,triggerRef:x}=Vf("Tooltip.Content"),C=l.useRef(null),_=l.useRef(null),S=m==="gloss",y=l.useMemo(()=>Mt(_,S),[S]),[v,A]=l.useState(!1),[E,T]=l.useState(b),L=l.useCallback(D=>{C.current=D,dt(i,D)},[i]),w=l.Children.toArray(n),I=w.find(D=>l.isValidElement(D)&&kp(D)),N=w.filter(D=>!(l.isValidElement(D)&&kp(D))),k=l.useCallback(()=>{const D=x.current,O=C.current;if(!D||!O)return;const F=Lb(D.getBoundingClientRect(),O.getBoundingClientRect(),b,o);T(F.resolvedSide),O.style.position="fixed",O.style.left=`${F.left}px`,O.style.top=`${F.top}px`,O.style.transform=""},[o,b,x]);if(l.useLayoutEffect(()=>{c&&A(!0)},[c]),uu(C,!S,bn),l.useLayoutEffect(()=>{if(!c)return;k();const D=window.requestAnimationFrame(()=>k()),O=()=>k();return window.addEventListener("scroll",O,!0),window.addEventListener("resize",O),()=>{window.cancelAnimationFrame(D),window.removeEventListener("scroll",O,!0),window.removeEventListener("resize",O)}},[c,k,n,r,o]),k$({open:c,portalMounted:v,setPortalMounted:A,tipRef:C}),!v||typeof document>"u")return null;const j=Mo(x.current),P=d.jsx(Xf,{variant:f,surface:m,size:p,icon:g,showIcon:h,glossPanelRef:y,children:N.length===1?N[0]:N}),G=d.jsx(lv.Provider,{value:E,children:d.jsx("div",{ref:L,...j,role:"tooltip",id:u,"data-side":E,className:eW({resolvedSide:E,showArrow:r,slotClass:a.content,className:e}),...s,children:d.jsxs("div",{className:$$,children:[r?I??d.jsx(Yf,{}):null,P]})})});return kr.createPortal(G,document.body)});bv.displayName="TooltipContent";function rW({size:t="base",variant:e="default",surface:n="default",delayShowMs:r=240,side:o="top",icon:s,showIcon:i}){const[a,c]=l.useState(!1),u=l.useRef(null),f=l.useRef(null),m=l.useId(),p=l.useCallback(()=>{f.current!=null&&(clearTimeout(f.current),f.current=null)},[]),b=l.useCallback(()=>{p(),f.current=globalThis.setTimeout(()=>{f.current=null,c(!0)},r)},[p,r]),g=l.useCallback(()=>{p(),c(!1)},[p]);return l.useEffect(()=>()=>p(),[p]),l.useEffect(()=>{if(!a)return;const x=C=>{C.key==="Escape"&&g()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[g,a]),{contextValue:l.useMemo(()=>({open:a,tooltipId:m,variant:e,surface:n,size:t,side:o,icon:s,showIcon:i,triggerRef:u,scheduleShow:b,hide:g}),[g,s,a,b,i,o,t,n,m,e])}}function xv({children:t,classNames:e,size:n="base",variant:r="default",surface:o="default",delayShowMs:s=240,side:i="top",icon:a,showIcon:c}){const{contextValue:u}=rW({size:n,variant:r,surface:o,delayShowMs:s,side:i,icon:a,showIcon:c});return d.jsx(_$,{classNames:e,children:d.jsx(av.Provider,{value:u,children:t})})}xv.displayName="TooltipRoot";const Si=Object.assign(xv,{Trigger:gv,Content:bv,Arrow:Yf,Panel:Xf,Indicator:mo,Icon:pv,Message:hv,Title:Ki,Description:Wf}),Cv=l.createContext(null),_c=l.createContext({});function _v(t){const e=l.useContext(Cv);if(!e)throw new Error(`${t} must be used inside <Avatar>`);return e}function Sv({classNames:t,children:e}){const n=l.useContext(_c),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(_c.Provider,{value:r,children:e})}function Xo(){return l.useContext(_c)}function oW(t){const e=t==null?void 0:t.trim();if(!e)return"?";const n=[...e][0];return n?n.toLocaleUpperCase():"?"}function sW(t){return t??"default"}function iW(t){return t??"base"}function aW(t){return(t==null?void 0:t.trim())||void 0}function lW(t){return!!(t!=null&&t.trim())}function cW(t){return t??"group"}function uW(t){return(t==null?void 0:t.trim())||void 0}function dW(){return"group"}const fW=!0,Op=-10,Pp=1.08;function mW(t,e){l.useLayoutEffect(()=>{const n=e.current;if(!n)return;const r=de()||!Se().enableContentFade;if(V(n),r){X.set(n,{autoAlpha:t?1:0});return}X.to(n,{autoAlpha:t?1:0,...Cg(),overwrite:"auto"})},[e,t])}function pW(t){const e=de(),n=l.useCallback(()=>{const o=t.current;if(o){if(V(o),e){o.style.transform="";return}X.to(o,{y:0,scale:1,...ve(),overwrite:"auto"})}},[e,t]),r=l.useCallback(()=>{const o=t.current;if(o){if(V(o),e){o.style.transform=`translateY(${Op}px) scale(${Pp})`;return}X.to(o,{y:Op,scale:Pp,...ve(),overwrite:"auto"})}},[e,t]);return l.useEffect(()=>{const o=t.current;return()=>{o&&V(o)}},[t]),{applyLift:r,applyRest:n}}const Sc={small:{root:"avatar-size-small"},base:{root:"avatar-size-base"},mid:{root:"avatar-size-mid"},large:{root:"avatar-size-large"}},hW={small:{variant:"small",className:"font-w-strong uppercase"},base:{variant:"base",className:"font-w-strong uppercase"},mid:{variant:"mid",className:"font-w-strong uppercase"},large:{variant:"header-2",className:"font-w-strong uppercase"}};function vv(t,e,n){return R("relative inline-flex shrink-0 select-none overflow-hidden text-left",R(e?"gloss-panel size-full rounded-full border-token":"rounded-full bg-surface border-token",Sc[t].root),!e&&n)}function gW(t,e){return R("gloss-wrap inline-flex shrink-0 rounded-full",Sc[t].root,e)}const bW="gloss-shadow rounded-full";function xW(t,e){return R("absolute inset-0 z-[1] size-full object-cover",!t&&"pointer-events-none",e)}function CW(t,e){return R("absolute inset-0 z-0 flex items-center justify-center bg-primary-tint text-primary",t?"opacity-100":"pointer-events-none opacity-0",e)}function _W(t){return R("flex flex-row flex-nowrap items-center text-left",t)}function SW(t,e){return R("relative inline-flex will-change-transform",t>0&&"-ml-plus",e)}const vW="center bottom",Kf=l.forwardRef(function({className:e="",onLoad:n,onError:r,...o},s){const{imageStatus:i,onImageLoad:a,onImageError:c}=_v("Avatar.Image"),u=Xo(),f=l.useRef(null),m=l.useCallback(h=>{f.current=h,typeof s=="function"?s(h):s&&(s.current=h)},[s]),p=l.useCallback(h=>{n==null||n(h),h.defaultPrevented||a()},[n,a]),b=l.useCallback(h=>{r==null||r(h),h.defaultPrevented||c()},[r,c]),g=i==="loaded";return mW(g,f),d.jsx("img",{ref:m,className:xW(g,R(u.image,e)),alt:o.alt??"",onLoad:p,onError:b,...o})});Kf.displayName="AvatarImage";const qf=l.forwardRef(function({className:e="",children:n,...r},o){const{label:s,imageStatus:i,size:a}=_v("Avatar.Fallback"),c=Xo(),u=i!=="loaded",m=n!=null&&n!==!1&&n!==""?n:oW(s),p=hW[a];return d.jsx("span",{ref:o,className:CW(u,R(c.fallback,e)),"aria-hidden":fW,...r,children:d.jsx(ee,{as:"span",variant:p.variant,inheritColor:!0,className:p.className,children:m})})});qf.displayName="AvatarFallback";function yW({src:t,alt:e="",loading:n}){return d.jsxs(d.Fragment,{children:[t?d.jsx(Kf,{src:t,alt:e,loading:n}):null,d.jsx(qf,{})]})}const yv=l.forwardRef(function({className:e="",classNames:n,children:r,...o},s){const i=Xo(),a=l.Children.toArray(r).filter(l.isValidElement);return d.jsx(Sv,{classNames:n,children:d.jsx("div",{ref:s,role:dW(),className:_W(R(i.group,e)),...o,children:a.map((c,u)=>d.jsx(TW,{stackIndex:u,children:c},c.key??u))})})});yv.displayName="AvatarGroup";function TW({stackIndex:t,children:e}){const n=l.useRef(null),r=Xo(),{applyLift:o,applyRest:s}=pW(n);return d.jsx("div",{ref:n,style:{transformOrigin:vW},className:SW(t,r.groupItem),onPointerEnter:o,onPointerLeave:s,children:e})}const Tv=l.forwardRef(function({size:e,className:n,role:r,children:o,...s},i){const a=Xo();return d.jsx("div",{ref:i,role:r,className:vv(e,!1,R(a.root,n)),...s,children:o})});Tv.displayName="AvatarDefaultShell";const Av=l.forwardRef(function({size:e,className:n,role:r,children:o,...s},i){const a=Xo(),{"aria-label":c,...u}=s;return d.jsxs("div",{ref:i,className:gW(e,a.glossWrap),...u,children:[d.jsx("div",{className:bW,"aria-hidden":!0}),d.jsx("div",{role:r,className:vv(e,!0,R(a.root,n)),"aria-label":c,children:o})]})});Av.displayName="AvatarGlossShell";function AW({variant:t,size:e,label:n,nickname:r,tooltipSize:o="base",tooltipVariant:s="default",tooltipSide:i="top",children:a,role:c}){const u=sW(t),f=iW(e),[m,p]=l.useState("idle"),b=l.useCallback(()=>{p("loaded")},[]),g=l.useCallback(()=>{p("error")},[]),h=l.useMemo(()=>({size:f,label:n,imageStatus:m,onImageLoad:b,onImageError:g}),[f,n,m,b,g]),x=qt(a),C=lW(n),_=aW(r),S=u==="gloss",y=cW(c),v=uW(n);return{variant:u,size:f,ctx:h,isCompound:x,hasLabel:C,isGloss:S,rootRole:y,ariaLabel:v,tooltip:_?{size:o,variant:s,side:i,content:_}:null}}const Ev=l.forwardRef(function({variant:e,size:n,label:r,src:o,alt:s="",loading:i,nickname:a,tooltipSize:c="base",tooltipVariant:u="default",tooltipSide:f="top",classNames:m,className:p="",children:b,role:g,...h},x){const{size:C,ctx:_,isCompound:S,isGloss:y,rootRole:v,ariaLabel:A,tooltip:E}=AW({variant:e,size:n,label:r,nickname:a,tooltipSize:c,tooltipVariant:u,tooltipSide:f,children:b,role:g}),L={size:C,className:p,role:v,"aria-label":A,children:S?b:d.jsx(yW,{src:o,alt:s,loading:i}),...h},w=y?d.jsx(Av,{ref:x,...L}):d.jsx(Tv,{ref:x,...L}),I=E?d.jsxs(Si,{size:E.size,variant:E.variant,side:E.side,children:[d.jsx(Si.Trigger,{children:w}),d.jsx(Si.Content,{children:E.content})]}):w;return d.jsx(Cv.Provider,{value:_,children:d.jsx(Sv,{classNames:m,children:I})})});Ev.displayName="AvatarRoot";const EW=Object.assign(Ev,{Image:Kf,Fallback:qf}),Lv=l.createContext(!0),vc=l.createContext({});function LW({collapse:t,children:e}){return d.jsx(Lv.Provider,{value:t,children:e})}function wv(){return l.useContext(Lv)}function Iv({classNames:t,children:e}){const n=l.useContext(vc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(vc.Provider,{value:r,children:e})}function Yo(){return l.useContext(vc)}const wW="Breadcrumbs";function IW(t){return t??wW}function RW(t){return`Show ${t} hidden sections`}const NW="Hidden sections",DW="Breadcrumbs.Item",kW="Breadcrumbs.List";function Rv(t){if(l.isValidElement(t))return t.type.displayName}function Nv(t){return l.isValidElement(t)?t.props.children:null}function Dv(t,e){return l.Children.toArray(t).some(n=>l.isValidElement(n)?Rv(n)===e?!0:Dv(Nv(n),e):!1)}function kv(t,e){l.Children.forEach(t,n=>{if(l.isValidElement(n)){if(Rv(n)===DW){const r=n.props;e.push({label:r.children,href:r.href,onClick:r.onClick,current:r.current,className:r.className});return}kv(Nv(n),e)}})}function OW(t){return Dv(t,kW)}function PW(t){const e=[];return kv(t,e),e}function BW(t){return t.length<=3?[]:t.slice(1,-2)}function jW(t){const e=t.length;return e===0?[]:e<=3?t.map((n,r)=>({kind:"segment",item:n,isLast:n.current??r===e-1})):[{kind:"segment",item:t[0],isLast:!1},{kind:"ellipsis",hiddenItems:BW(t)},{kind:"segment",item:t[e-2],isLast:!1},{kind:"segment",item:t[e-1],isLast:!0}]}function MW(t){return t.map((e,n)=>({kind:"segment",item:e,isLast:e.current??n===t.length-1}))}function FW(t,e){if(t.kind==="ellipsis")return"ellipsis";const n=t.item.label;return`segment-${e}-${typeof n=="string"?n:e}`}function er(t,e,n){return R(t,e,n)}function Ov(){const t=l.useRef(null),{handlePointerDown:e}=lr({isDisabled:!1,enabled:!0,textMotionRef:t});return{textRef:t,handlePointerDown:e}}const Pv=R("inline-flex max-w-[min(12rem,46vw)] min-w-0 cursor-pointer truncate rounded-mid px-xsmall py-xsmall text-muted no-underline outline-none",gn,"hover:text-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"),GW=R(Pv,"border-0 bg-transparent font-[inherit]"),HW=R("inline-flex min-w-0 cursor-pointer rounded-mid border-0 bg-transparent px-xsmall py-xsmall font-[inherit] text-muted outline-none",gn,"hover:text-foreground aria-expanded:text-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary");function zW(t){return R("m-0 flex list-none flex-wrap items-center gap-xsmall gap-y-xsmall p-0 text-left",t)}function VW(t){return R(t)}function UW(t){return R("flex items-center gap-xsmall",t)}function $W(t){return R("min-w-0 max-w-[min(14rem,50vw)] truncate px-xsmall py-xsmall font-w-mid text-foreground",t)}function WW(t){return R("max-w-[min(12rem,46vw)] truncate px-xsmall py-xsmall text-muted",t)}function Bv(t){return R("shrink-0 text-muted opacity-75 icon-small",t)}function XW(t){return R(Pv,t)}function YW(t){return R(GW,t)}function KW(t){return R("inline-flex min-w-0",t)}function Bp(t){return R("inline-flex origin-center min-w-0 truncate will-change-transform",t)}function qW(t){return R(HW,t)}function ZW(t){return R("inline-flex origin-center will-change-transform",t)}function QW(t){return R("tabular-nums",t)}function JW(t){return R("text-small",t)}function e5(t){return R("p-small",t)}function t5(t){return R("inline-flex",t)}function jv(t){const e=wv();return l.useMemo(()=>e?jW(t):MW(t),[e,t])}function n5({children:t}={}){return{isCompound:OW(t)}}function r5(t){const e=wv(),n=l.useMemo(()=>PW(t),[t]),r=jv(n);return{collapse:e,items:n,pieces:r}}function o5(t){return{pieces:jv(t)}}function Mv(t){return null}Mv.displayName="Breadcrumbs.Item";const Fv=l.forwardRef(function({className:e,classNames:n,children:r,...o},s){const{pieces:i}=r5(r);return d.jsx(Iv,{classNames:n,children:d.jsx(Zf,{ref:s,pieces:i,className:e,...o})})});Fv.displayName="Breadcrumbs.List";const Zf=l.forwardRef(function({pieces:e,className:n,...r},o){const s=Yo();return d.jsx("ol",{ref:o,className:zW(er("",s.list,n)),...r,children:e.map((i,a)=>d.jsx(s5,{piece:i,showSeparator:a>0},FW(i,a)))})});Zf.displayName="BreadcrumbsPiecesList";function s5({piece:t,showSeparator:e}){const n=Yo();return d.jsxs("li",{className:UW(n.listItem),children:[e?d.jsx(a5,{}):null,t.kind==="ellipsis"?d.jsx(l5,{hiddenItems:t.hiddenItems}):d.jsx(i5,{piece:t})]})}function Gv({className:t,iconClassName:e,...n}){const r=Yo();return d.jsx("span",{className:t5(er("",r.separatorWrapper,t)),...n,children:d.jsx(we.IoChevronForward,{className:Bv(er("",r.separator,e)),"aria-hidden":!0})})}Gv.displayName="Breadcrumbs.Separator";function i5({piece:t}){const e=Yo(),{item:n,isLast:r}=t;return r?d.jsx(ee,{as:"span",variant:"small","aria-current":"page",className:$W(er("",e.current,n.className)),children:n.label}):n.href||n.onClick?d.jsx(Hv,{href:n.href,onClick:n.onClick,className:e.linkWrapper,innerClassName:er("",e.link,n.className),textClassName:e.linkText,children:n.label}):d.jsx(ee,{as:"span",variant:"small",className:WW(er("",e.static,n.className)),children:n.label})}function a5(){const t=Yo();return d.jsx(we.IoChevronForward,{className:Bv(t.separator),"aria-hidden":!0})}const Hv=l.forwardRef(function({href:e,onClick:n,children:r,className:o="",innerClassName:s,textClassName:i,"aria-current":a},c){const{textRef:u,handlePointerDown:f}=Ov(),m=l.useCallback(b=>{u.current=b,dt(c,b)},[c,u]),p=e?XW(s):YW(s);return d.jsx("span",{className:KW(o),children:e?d.jsx("a",{href:e,onClick:n,"aria-current":a,className:p,onPointerDown:f,children:d.jsx(ee,{ref:m,variant:"small",inheritColor:!0,as:"span",className:Bp(i),children:r})}):d.jsx("button",{type:"button",onClick:n,"aria-current":a,className:p,onPointerDown:f,children:d.jsx(ee,{ref:m,variant:"small",inheritColor:!0,as:"span",className:Bp(i),children:r})})})});Hv.displayName="BreadcrumbsInteractiveCrumb";function l5({hiddenItems:t}){const e=Yo(),n=t.length,{textRef:r,handlePointerDown:o}=Ov();return n===0?null:d.jsxs(Ir,{children:[d.jsx(Ir.Trigger,{"aria-label":RW(n),className:qW(e.ellipsisTrigger),onPointerDown:o,children:d.jsx("span",{ref:r,className:ZW(e.ellipsisLiftWrapper),children:d.jsx(ee,{as:"span",variant:"small",className:QW(e.ellipsisText),children:"…"})})}),d.jsx(Ir.Popover,{"aria-label":NW,bodyClassName:e5(e.ellipsisPopover),children:t.map(s=>{const i=s.href??`hidden-${String(s.label)}`;return d.jsx(c5,{item:s,className:JW(er("",e.dropdownItem,s.className))},i)})})]})}function c5({item:t,className:e}){const n=t.href??`hidden-${String(t.label)}`;return t.href?d.jsx(Ir.Item,{href:t.href,selection:!1,onClick:t.onClick,className:e,children:t.label}):d.jsx(Ir.Item,{value:n,selection:!1,onClick:t.onClick,className:e,children:t.label})}function u5({items:t,className:e,...n}){const{pieces:r}=o5(t);return d.jsx(Zf,{pieces:r,className:e,...n})}const zv=l.forwardRef(function({collapse:e=!0,className:n,classNames:r,items:o,children:s,"aria-label":i,...a},c){const{isCompound:u}=n5({children:s});return d.jsx(LW,{collapse:e,children:d.jsx(Iv,{classNames:r,children:d.jsx("nav",{ref:c,"aria-label":IW(i),className:VW(er("",r==null?void 0:r.root,n)),...a,children:u?s:o!=null?d.jsx(u5,{items:o}):s})})})});zv.displayName="Breadcrumbs";const d5=Object.assign(zv,{List:Fv,Item:Mv,Separator:Gv}),Qf=l.createContext(null),yc=l.createContext({});function f5({value:t,children:e}){return d.jsx(Qf.Provider,{value:t,children:e})}function m5({classNames:t,children:e}){const n=l.useContext(yc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(yc.Provider,{value:r,children:e})}function p5(){const t=l.useContext(Qf);if(!t)throw new Error("Pagination components must be inside <Pagination>.");return t}function Jf(){return l.useContext(Qf)}function an(){return l.useContext(yc)}const h5="Pagination",g5=!0,Vv=!0,b5="Back",x5="Forward";function C5({ariaLabel:t,children:e,pageNumber:n}){if(t!=null)return t;if(e!=null)return`Page ${n}`}function Zt(...t){return R(...t)}function _5(t,e,n){if(e<=0)return[];if(e===1)return[1];if(e<=7)return Array.from({length:e},(i,a)=>a+1);const r=Math.max(t-n,2),o=Math.min(t+n,e-1),s=[1];if(r>2)s.push("ellipsis");else for(let i=2;i<r;i++)s.push(i);for(let i=r;i<=o;i++)s.push(i);if(o<e-1)s.push("ellipsis");else for(let i=o+1;i<e;i++)s.push(i);return s.push(e),s}function S5({disabled:t,page:e}){return t??(e!=null?e<=1:!1)}function v5({disabled:t,page:e,totalPages:n}){return t??(e!=null&&n!=null?e>=n:!1)}function y5(t){const e=l.useRef(null);e.current||(e.current=new Map);const n=l.useRef(!0);l.useLayoutEffect(()=>{const r=t.current;if(!r)return;const o=Array.from(r.children).filter(f=>f instanceof HTMLElement);let s=0;const i=f=>f.dataset.flipKey??`__keyless_${s++}`,a=de(),c=new Map,u=e.current;for(const f of o){const m=i(f),p=f.getBoundingClientRect(),b={x:p.left,y:p.top};if(c.set(m,b),a||n.current)continue;const g=u.get(m);if(g){const h=g.x-b.x;Math.abs(h)>.5&&(V(f),f.style.willChange="transform",X.fromTo(f,{x:h},{x:0,...ve(),overwrite:"auto",onComplete:()=>{f.style.willChange=""}}))}else V(f),X.fromTo(f,{autoAlpha:0,scale:.82},{autoAlpha:1,scale:1,...ve(),overwrite:"auto"})}e.current=c,n.current=!1}),l.useLayoutEffect(()=>{const r=t.current;return()=>{if(r)for(const o of Array.from(r.children))o instanceof HTMLElement&&V(o)}},[t])}function T5(t){const e=l.useRef(null),n=l.useCallback(r=>{e.current=r,dt(t,r)},[t]);return y5(e),{olRef:e,setRefs:n}}const A5="flex w-full min-w-0 flex-wrap items-center justify-between gap-xsmall gap-y-xsmall text-left",E5="flex min-w-0 flex-1 basis-[12rem]",L5="min-w-0 truncate text-muted",w5="m-0 ms-auto flex max-w-full min-w-0 list-none flex-wrap items-center justify-start gap-xsmall p-0",I5="flex shrink-0 items-center",R5="inline-flex min-w-0 origin-center cursor-pointer items-center justify-center gap-xsmall rounded-mid border-0 bg-transparent px-xsmall py-xsmall font-[inherit] text-muted no-underline outline-none hover:text-foreground focus-ring disabled:cursor-not-allowed disabled:opacity-48 disabled:hover:text-muted disabled:hover:bg-transparent motion-reduce:animate-none",N5="inline-flex min-w-[1.75rem] items-center justify-center px-xsmall py-xsmall font-w-mid text-foreground tabular-nums text-base",D5="min-w-[1.75rem] tabular-nums",k5="inline-flex min-w-[1.75rem] items-center justify-center px-xsmall py-xsmall text-muted tabular-nums",O5="",P5="shrink-0 icon-small opacity-75",B5="shrink-0 icon-small opacity-75";function j5({slotClass:t,className:e}){return Zt(A5,t,e)}function M5({slotClass:t,className:e}){return Zt(E5,t,e)}function F5({slotClass:t,className:e}){return Zt(L5,t,e)}function G5({slotClass:t,className:e}){return Zt(w5,t,e)}function H5({slotClass:t,className:e}){return Zt(I5,t,e)}function z5({slotClass:t,className:e}){return Zt(R5,et(),t,e)}function V5({slotClass:t,className:e}){return Zt(N5,t,e)}function U5({slotClass:t,className:e}){return Zt(D5,t,e)}function $5({slotClass:t,className:e}){return Zt(k5,t,e)}function Uv({slotClass:t,className:e}){return Zt(O5,t,e)}function W5({slotClass:t,className:e}){return Zt(P5,t,e)}function X5({slotClass:t,className:e}){return Zt(B5,t,e)}const $v=l.forwardRef(function({children:e,className:n,page:r,totalPages:o,onPageChange:s,siblingCount:i,"aria-label":a,...c},u){const f=an();return d.jsx("nav",{ref:u,"aria-label":a,className:j5({slotClass:f.root,className:n}),...c,children:e})});$v.displayName="Pagination";const Ma=l.forwardRef(function({children:e,className:n,disabled:r,onPointerDown:o,...s},i){const a=an(),c=l.useRef(null),u=l.useCallback(m=>{c.current=m,dt(i,m)},[i]),{handlePointerDown:f}=lr({isDisabled:!!r,enabled:!r,textMotionRef:c,onPointerDown:o});return d.jsx("button",{ref:u,type:"button",disabled:r,className:z5({slotClass:a.interactive,className:n}),onPointerDown:f,...s,children:e})});Ma.displayName="PaginationInteractive";const Wv=l.forwardRef(function({className:e,children:n,...r},o){const s=an();return d.jsx("div",{ref:o,className:M5({slotClass:s.summary,className:e}),...r,children:d.jsx(ee,{as:"span",variant:"small",className:F5({slotClass:s.summaryText}),children:n})})});Wv.displayName="Pagination.Summary";const Xv=l.forwardRef(function({className:e,children:n,...r},o){const s=an(),{setRefs:i}=T5(o);return d.jsx("ol",{ref:i,className:G5({slotClass:s.content,className:e}),...r,children:n})});Xv.displayName="Pagination.Content";const qi=l.forwardRef(function({className:e,children:n,...r},o){const s=an();return d.jsx("li",{ref:o,className:H5({slotClass:s.item,className:e}),...r,children:n})});qi.displayName="Pagination.Item";const Yv=l.forwardRef(function({disabled:e,onClick:n,children:r,"aria-label":o,...s},i){const a=Jf(),c=an(),u=a==null?void 0:a.page,f=S5({disabled:e,page:u}),m=l.useCallback(p=>{n==null||n(p),!(p.defaultPrevented||f)&&a!=null&&a.onPageChange&&u!=null&&u>1&&a.onPageChange(u-1)},[a,n,u,f]);return d.jsx(Ma,{ref:i,disabled:f,...o!=null?{"aria-label":o}:{},onClick:m,...s,children:r??d.jsxs(d.Fragment,{children:[d.jsx(em,{}),d.jsx(ee,{variant:"small",inheritColor:!0,as:"span",className:Uv({slotClass:c.navText}),children:b5})]})})});Yv.displayName="Pagination.Previous";const Kv=l.forwardRef(function({disabled:e,onClick:n,children:r,"aria-label":o,...s},i){const a=Jf(),c=an(),u=a==null?void 0:a.page,f=a==null?void 0:a.totalPages,m=v5({disabled:e,page:u,totalPages:f}),p=l.useCallback(b=>{n==null||n(b),!(b.defaultPrevented||m)&&a!=null&&a.onPageChange&&u!=null&&f!=null&&u<f&&a.onPageChange(u+1)},[a,n,u,m,f]);return d.jsx(Ma,{ref:i,disabled:m,...o!=null?{"aria-label":o}:{},onClick:p,...s,children:r??d.jsxs(d.Fragment,{children:[d.jsx(ee,{variant:"small",inheritColor:!0,as:"span",className:Uv({slotClass:c.navText}),children:x5}),d.jsx(tm,{})]})})});Kv.displayName="Pagination.Next";function em({className:t}){const e=an();return d.jsx(we.IoChevronBack,{"aria-hidden":Vv,className:W5({slotClass:e.previousIcon,className:t})})}em.displayName="Pagination.PreviousIcon";function tm({className:t}){const e=an();return d.jsx(we.IoChevronForward,{"aria-hidden":Vv,className:X5({slotClass:e.nextIcon,className:t})})}tm.displayName="Pagination.NextIcon";const nm=l.forwardRef(function({page:e,isActive:n,children:r,onClick:o,className:s,"aria-label":i,...a},c){const u=Jf(),f=an(),m=n??((u==null?void 0:u.page)!=null?u.page===e:!1),p=l.useCallback(h=>{var x;o==null||o(h),!(h.defaultPrevented||m)&&((x=u==null?void 0:u.onPageChange)==null||x.call(u,e))},[m,u,o,e]),b=r??e;if(m)return d.jsx(ee,{as:"span",variant:"small","aria-current":"page",className:V5({slotClass:f.pageActive,className:s}),children:b});const g=C5({ariaLabel:i,children:r,pageNumber:e});return d.jsx(Ma,{ref:c,...g!=null?{"aria-label":g}:{},onClick:p,className:s,...a,children:d.jsx(ee,{variant:"small",inheritColor:!0,as:"span",className:U5({slotClass:f.pageText}),children:b})})});nm.displayName="Pagination.Page";const rm=l.forwardRef(function({className:e,...n},r){const o=an();return d.jsx(ee,{ref:r,as:"span",variant:"small","aria-hidden":g5,className:$5({slotClass:o.ellipsis,className:e}),...n,children:"…"})});rm.displayName="Pagination.Ellipsis";function qv(){const{page:t,totalPages:e,siblingCount:n}=p5();if(t==null||e==null)throw new Error("Pagination.Pages requires `page` and `totalPages` on the root <Pagination>.");const r=l.useMemo(()=>_5(t,e,n),[t,n,e]);let o=0;return d.jsx(d.Fragment,{children:r.map(s=>{if(s==="ellipsis"){const i=o===0?"left":"right";o+=1;const a=`ellipsis-${i}`;return d.jsx(qi,{"data-flip-key":a,children:d.jsx(rm,{})},a)}return d.jsx(qi,{"data-flip-key":`page-${s}`,children:d.jsx(nm,{page:s})},s)})})}qv.displayName="Pagination.Pages";function Y5({page:t,totalPages:e,onPageChange:n,siblingCount:r=1,"aria-label":o=h5}){return{contextValue:l.useMemo(()=>({page:t,totalPages:e,onPageChange:n,siblingCount:r}),[n,t,r,e]),ariaLabel:o}}const Zv=l.forwardRef(function({children:e,className:n,classNames:r,page:o,totalPages:s,onPageChange:i,siblingCount:a,"aria-label":c,...u},f){const{contextValue:m,ariaLabel:p}=Y5({page:o,totalPages:s,onPageChange:i,siblingCount:a,"aria-label":c});return d.jsx(f5,{value:m,children:d.jsx(m5,{classNames:r,children:d.jsx($v,{ref:f,className:n,page:o,totalPages:s,onPageChange:i,siblingCount:a,"aria-label":p,...u,children:e})})})});Zv.displayName="Pagination";const K5=Object.assign(Zv,{Summary:Wv,Content:Xv,Item:qi,Previous:Yv,Next:Kv,PreviousIcon:em,NextIcon:tm,Page:nm,Pages:qv,Ellipsis:rm}),q5={default:"bg-surface",secondary:"bg-secondary",tertiary:"bg-tertiary"},jp={none:"",base:"shadow-token-base",mid:"shadow-token-mid",large:"shadow-token-large"},Mp={none:"",small:"p-small",base:"p-base",plus:"p-plus",mid:"p-mid"},Fp={base:"rounded-base",mid:"rounded-mid",large:"rounded-large"},Qv=l.forwardRef(function({className:e="",variant:n="default",shadow:r="none",padding:o="none",radius:s="mid",children:i,...a},c){const u=Ro(c,n==="gloss");return n==="gloss"?d.jsx("div",{ref:u,className:R("gloss-panel min-w-0 text-left text-foreground",Fp[s],jp[r],Mp[o],e),...a,children:d.jsx("div",{className:"gloss-content",children:i})}):d.jsx("div",{ref:c,className:R("min-w-0 text-left text-foreground",q5[n],Fp[s],jp[r],Mp[o],e),...a,children:i})});Qv.displayName="Surface";const Jv=l.createContext(null);function Z5(){return l.useContext(Jv)}function Q5({value:t,children:e}){return d.jsx(Jv.Provider,{value:t,children:e})}const ey=l.createContext(!1);function J5(){return l.useContext(ey)}function eX({children:t}){return d.jsx(ey.Provider,{value:!0,children:t})}const Tc=l.createContext({});function ty({classNames:t,children:e}){const n=l.useContext(Tc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Tc.Provider,{value:r,children:e})}function Fa(){return l.useContext(Tc)}function tX({variant:t,hoverLift:e=!0,forwardedRef:n,isDirectAnchorChild:r,placement:o,onPointerOver:s,onPointerOut:i,syncDeps:a}){const c=Z5(),u=l.useRef(null),f=l.useRef(null),m=t==="gloss",p=!!(r&&(c!=null&&c.hoverLift)&&!m),b=e&&!p,g=l.useMemo(()=>Mt(u,b&&m),[m,b]),h=Do(u,b&&m),x=Oo(u,b&&!m),C=l.useMemo(()=>({onPointerOver:I=>{s==null||s(I),!I.defaultPrevented&&b&&(m?h.onPointerOver(I):x.onPointerEnter(I))},onPointerOut:I=>{i==null||i(I),b&&(m?h.onPointerOut(I):x.onPointerLeave(I))}}),[h.onPointerOut,h.onPointerOver,m,i,s,b,x.onPointerEnter,x.onPointerLeave]),_=b?m?nn:x.motionClass:"",S=p&&!m?ir:"",y=l.useCallback(()=>{if(!c||!r||!c.hoverLift){c==null||c.registerLiftTarget(null);return}c.registerLiftTarget(f.current)},[r,c]),v=l.useCallback(I=>{g(I),u.current=I,I===null&&(c==null||c.registerLiftTarget(null)),dt(n,I)},[g,n,c]),{meaningChild:A,icon:E,dot:T,iconOnly:L,children:w}=a;return l.useLayoutEffect(()=>{y(),queueMicrotask(()=>{y()})},[r,c==null?void 0:c.anchorCommitGen,c==null?void 0:c.hoverLift,o,y,A,E,T,L,w]),{isGloss:m,splitLift:p,selfLiftEnabled:b,innerLiftRef:f,setMergedRef:v,pointerHandlers:C,selfLiftMotionCls:_,splitLiftMotionCls:S}}function nX(t,e){return du(t,e,{liftScale:Se().badgeAnchorHoverLiftScale})}function rX(t,e){t&&e&&vs(t,bn())}function oX(t){return typeof t["aria-label"]=="string"||typeof t["aria-labelledby"]=="string"}function sX(t){return oX(t)?{role:"img"}:{"aria-hidden":!0,role:"presentation"}}function Ac(t){const e=t.props;return e["aria-hidden"]===!0||e["aria-label"]?t:l.cloneElement(t,{"aria-hidden":!0})}function om(t){const e=t.props["data-icon"];return e==="inline-start"||e==="start"?"inline-start":e==="inline-end"||e==="end"?"inline-end":null}function iX(t){return l.isValidElement(t)&&om(t)!=null}const aX={default:"bg-surface border-token text-foreground",primary:"bg-primary border-token text-primary-foreground",outline:"bg-transparent border-token text-foreground",secondary:"bg-secondary border-token text-secondary-foreground"},lX={"top-right":"absolute right-0 top-0 z-10 translate-x-[38%] -translate-y-[38%]","top-left":"absolute left-0 top-0 z-10 -translate-x-[38%] -translate-y-[38%]","bottom-right":"absolute bottom-0 right-0 z-10 translate-x-[38%] translate-y-[38%]","bottom-left":"absolute bottom-0 left-0 z-10 -translate-x-[38%] translate-y-[38%]"},cX={small:"gap-xsmall px-small py-xsmall",base:"gap-xsmall px-base py-xsmall",mid:"gap-xsmall px-plus py-xsmall",large:"gap-small px-plus py-xsmall"},sm={small:"min-h-3 min-w-3",base:"min-h-4 min-w-4",mid:"min-h-4 min-w-4",large:"min-h-5 min-w-5"},Ec={small:"tools",base:"small",mid:"base",large:"mid"},uX={small:"shrink-0 p-xsmall [&_svg]:icon-small",base:"shrink-0 p-small [&_svg]:icon-base",mid:"shrink-0 p-base [&_svg]:icon-base",large:"shrink-0 p-plus [&_svg]:icon-large"},dX={small:"icon-small shrink-0 p-0",base:"icon-small shrink-0 p-0",mid:"icon-base shrink-0 p-0",large:"icon-large shrink-0 p-0"},fX={small:"[&_svg]:icon-small",base:"[&_svg]:icon-small",mid:"[&_svg]:icon-base",large:"[&_svg]:icon-large"},mX="box-border isolate inline-flex max-w-full shrink-0 select-none items-center justify-center truncate rounded-full whitespace-nowrap motion-reduce:transition-none",pX="box-border isolate inline-flex items-center justify-center rounded-full whitespace-nowrap",hX="box-border isolate inline-flex shrink-0 rounded-full ring-2 ring-background motion-reduce:ring-1",ui={default:"bg-foreground",primary:"bg-primary",outline:"bg-transparent border-token",secondary:"bg-secondary",danger:"bg-danger",success:"bg-success",info:"bg-info",warning:"bg-warning"};function gX(t,e){return t==="gloss"?e!=="default"?ui[e]:ui.default:e!=="default"?ui[e]:ui[t]}function bX(t,e){if(t==="gloss")return R("gloss-panel border-0 text-foreground",e!=="default"?xt[e]:"");if(e==="default")return aX[t];switch(t){case"default":return R(Gc[e],xt[e]);case"primary":return gh[e];case"outline":return R("bg-transparent",Hc[e],xt[e]);case"secondary":return R("bg-secondary border-token",xt[e])}}function xX(t){return t!=="default"?xt[t]:""}function CX(t,e,n){return n?R("gloss-panel border-0",xX(e)):gX(t,e)}const _X="inline-flex shrink-0 [&_svg]:shrink-0";function ny(t){return R(_X,fX[t])}const SX="relative isolate inline-grid w-fit shrink-0 [&>*]:col-start-1 [&>*]:row-start-1",vX="pointer-events-none",yX="pointer-events-none";function TX(t,e,n,r,o=""){return R(hX,dX[t],sm[t],CX(e,n,r),o)}function AX(t,e,n=""){return R(pX,e,uX[t],sm[t],n)}function EX(t,e,n=""){return R(mX,e,cX[t],sm[t],n)}function LX(t,e){return t&&!e?yX:""}function wX({node:t,size:e}){return t==null||t===!1?null:typeof t=="string"?t.trim()?d.jsx(ee,{as:"span",variant:Ec[e],inheritColor:!0,children:t}):null:typeof t=="number"?d.jsx(ee,{as:"span",variant:Ec[e],inheritColor:!0,children:t}):l.isValidElement(t)?om(t)?d.jsx("span",{className:ny(e),children:Ac(t)}):t:null}function IX(t){return l.Children.toArray(t).some(iX)}function RX(t){return typeof t=="string"?t.trim().length>0:typeof t=="number"?!0:l.isValidElement(t)?om(t)==null:!1}function NX(t){return l.Children.toArray(t).some(RX)}function ry(t){return t==null||t===!1?!1:typeof t=="string"?t.trim().length>0:typeof t=="number"?!0:Array.isArray(t)?t.some(ry):l.isValidElement(t)}function DX(t,e){return l.Children.map(l.Children.toArray(t),(n,r)=>d.jsx(l.Fragment,{children:d.jsx(wX,{node:n,size:e})},r))}function kX(t){return t.type.displayName==="BadgeRoot"}function OX({size:t,children:e,icon:n,iconOnly:r,iconPosition:o,inlineIconMode:s,meaningChild:i,dot:a}){if(a)return{layoutKind:"dot",bodyContent:null,iconOnlyBody:null,dataIcon:void 0};const c=s?null:n,u=!!c&&!i,f=s&&!i&&l.Children.toArray(e).length>0,m=!i&&(u||!!(r&&c)||f),p=c?d.jsx("span",{className:ny(t),children:l.isValidElement(c)?Ac(c):c}):null,b=i&&!s?d.jsx(ee,{as:"span",variant:Ec[t],inheritColor:!0,children:e}):null,g=s?DX(e,t):null,h=s?g:d.jsxs(d.Fragment,{children:[o==="start"&&p,b,o==="end"&&p]}),x=f?g:c?l.isValidElement(c)?Ac(c):c:e,_=!!(!s&&p&&b)?o:void 0;return m?{layoutKind:"iconOnly",bodyContent:h,iconOnlyBody:x,dataIcon:_}:{layoutKind:"text",bodyContent:h,iconOnlyBody:x,dataIcon:_}}function im({setMergedRef:t,splitLift:e,placementClass:n,splitLiftMotionCls:r,selfLiftMotionCls:o,isDirectAnchorChild:s,isGloss:i,innerLiftRef:a,pointerHandlers:c,rest:u,className:f,dataIcon:m,children:p,withA11y:b=!1}){const g=b?sX(u):void 0,h=R(f,r,!e&&n);return e?d.jsx("span",{ref:t,"data-badge-root":!0,className:R(vX,n),...u,...g,children:d.jsx("span",{ref:a,"data-badge-lift-target":!0,"data-icon":m,className:h,children:p})}):d.jsx("span",{ref:t,"data-icon":m,"data-badge-root":!0,className:R(h,o,LX(s,i),n),...c,...u,...g,children:p})}function PX({size:t,variant:e,status:n,shell:r,className:o,rest:s}){const i=Fa(),a=TX(t,e,n,r.isGloss,R(i.root,i.dot,o));return d.jsx(im,{...r,className:a,rest:s,withA11y:!0,children:null})}function BX({size:t,surfaceClass:e,shell:n,className:r,rest:o,iconOnlyBody:s}){const i=Fa(),a=AX(t,e,R(i.root,i.iconOnly,r));return d.jsx(im,{...n,className:a,rest:o,withA11y:!0,children:s})}function jX({size:t,surfaceClass:e,shell:n,className:r,rest:o,bodyContent:s,dataIcon:i}){const a=Fa(),c=EX(t,e,R(a.root,a.text,r));return d.jsx(im,{...n,className:c,rest:o,dataIcon:i,children:s})}const oy=l.forwardRef(function({className:e="",classNames:n,children:r,hoverLift:o=!0,onPointerOver:s,onPointerOut:i,...a},c){const u=l.useRef(null),f=l.useRef(null),[m]=l.useState(1),p=l.useCallback(C=>{u.current=C,typeof c=="function"?c(C):c&&(c.current=C)},[c]),b=l.useCallback(C=>{f.current=C,rX(C,o)},[o]),g=l.useMemo(()=>({registerLiftTarget:b,anchorRef:u,anchorCommitGen:m,hoverLift:o}),[b,m,o]),h=nX(f,o),x=Fa();return d.jsx(ty,{classNames:n,children:d.jsx(Q5,{value:g,children:d.jsx("div",{ref:p,"data-badge-anchor":!0,className:R(SX,x.anchor,n==null?void 0:n.anchor,e),onPointerOver:C=>{s==null||s(C),C.defaultPrevented||h.onPointerOver(C)},onPointerOut:C=>{i==null||i(C),h.onPointerOut(C)},...a,children:l.Children.map(r,(C,_)=>l.isValidElement(C)&&kX(C)?d.jsx(eX,{children:C},C.key??`badge-anchor-child-${_}`):C)})})})});oy.displayName="BadgeAnchor";function MX({variant:t,status:e,size:n,children:r,icon:o,iconOnly:s,iconPosition:i,dot:a,placement:c}){const u=J5(),f=bX(t,e),m=IX(r),p=l.useMemo(()=>m?NX(r):ry(r),[r,m]),b=u?c??"top-right":void 0,g=b?lX[b]:"",h=l.useMemo(()=>OX({size:n,children:r,icon:o,iconOnly:s,iconPosition:i,inlineIconMode:m,meaningChild:p,dot:a}),[r,a,o,s,i,m,p,n]);return{size:n,surfaceClass:f,inlineIconMode:m,meaningChild:p,placementClass:g,isDirectAnchorChild:u,layoutKind:h.layoutKind,bodyContent:h.bodyContent,iconOnlyBody:h.iconOnlyBody,dataIcon:h.dataIcon}}const sy=l.forwardRef(function({variant:e="default",status:n="default",size:r="base",icon:o,iconPosition:s="start",iconOnly:i=!1,dot:a=!1,placement:c,classNames:u,className:f="",children:m,hoverLift:p=!0,onPointerOver:b,onPointerOut:g,...h},x){const C=a,{surfaceClass:_,meaningChild:S,placementClass:y,isDirectAnchorChild:v,layoutKind:A,bodyContent:E,iconOnlyBody:T,dataIcon:L}=MX({variant:e,status:n,size:r,children:m,icon:o,iconOnly:i,iconPosition:s,dot:C,placement:c}),w=tX({variant:e,hoverLift:p,forwardedRef:x,isDirectAnchorChild:v,placement:c,onPointerOver:b,onPointerOut:g,syncDeps:{meaningChild:S,icon:o,dot:C,iconOnly:i,children:m}}),I={setMergedRef:w.setMergedRef,splitLift:w.splitLift,placementClass:y,splitLiftMotionCls:w.splitLiftMotionCls,selfLiftMotionCls:w.selfLiftMotionCls,isDirectAnchorChild:v,isGloss:w.isGloss,innerLiftRef:w.innerLiftRef,pointerHandlers:w.pointerHandlers,rest:h},N=k=>d.jsx(ty,{classNames:u,children:k});return N(A==="dot"?d.jsx(PX,{size:r,variant:e,status:n,shell:I,className:f,rest:h}):A==="iconOnly"?d.jsx(BX,{size:r,surfaceClass:_,shell:I,className:f,rest:h,iconOnlyBody:T}):d.jsx(jX,{size:r,surfaceClass:_,shell:I,className:f,rest:h,bodyContent:E,dataIcon:L}))});sy.displayName="BadgeRoot";const FX=Object.assign(sy,{Anchor:oy});function iy(...t){return R(...t)}function GX(t){return t.type.displayName==="KbdRoot"}function HX(t){const e=[];for(const n of l.Children.toArray(t)){if(!l.isValidElement(n)){n!=null&&e.push(n);continue}if(GX(n)){e.push(n);continue}e.push(n)}return e}function zX({variant:t,hoverLift:e=!0,forwardedRef:n,onPointerOver:r,onPointerOut:o}){const s=l.useRef(null),i=t==="gloss",a=e,c=l.useMemo(()=>Mt(s,a&&i),[i,a]),u=Do(s,a&&i),f=Oo(s,a&&!i),m=l.useCallback(h=>{c(h),s.current=h,dt(n,h)},[c,n]),p=l.useMemo(()=>({onPointerOver:h=>{r==null||r(h),!(!a||h.defaultPrevented)&&(i?u.onPointerOver(h):f.onPointerEnter(h))},onPointerOut:h=>{o==null||o(h),a&&(i?u.onPointerOut(h):f.onPointerLeave(h))}}),[u.onPointerOut,u.onPointerOver,i,a,o,r,f.onPointerEnter,f.onPointerLeave]),b=a&&!i?f.motionClass:"";return{setMergedRef:m,motionClass:b,glossMotionClass:a&&i?nn:"",pointerHandlers:p}}const VX={default:"bg-surface border-token text-foreground",primary:"bg-primary border border-transparent text-primary-foreground",outline:"bg-transparent border-token text-foreground",secondary:"bg-secondary border-token text-secondary-foreground"},UX={small:"tools",base:"tools",mid:"small",large:"base"},$X={small:"min-h-4 px-xsmall py-0.5",base:"min-h-4 px-small py-xsmall",mid:"min-h-5 px-base py-xsmall",large:"min-h-5 px-base py-xsmall"},WX="box-border isolate inline-flex max-w-full shrink-0 select-none items-center justify-center whitespace-nowrap rounded-small font-mono motion-reduce:transition-none",XX="inline-flex items-center gap-xsmall",YX="select-none text-muted text-tools";function KX(t){return t==="gloss"?"gloss-panel gloss-deep border-0 text-foreground":VX[t]}function qX({variant:t,size:e,motionClass:n,slotRoot:r,className:o}){return iy(WX,KX(t),$X[e],n,r,o)}function ZX(t,e){return R(XX,e,t)}function QX(t){return R(YX,t)}function am({size:t,children:e}){return d.jsx(ee,{as:"span",variant:UX[t],inheritColor:!0,children:e})}am.displayName="KbdText";function ay({size:t,children:e}){return e==null||e===!1?null:l.isValidElement(e)?e:d.jsx(am,{size:t,children:e})}ay.displayName="KbdBody";const Lc=l.createContext({});function JX({classNames:t,children:e}){const n=l.useContext(Lc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Lc.Provider,{value:r,children:e})}function e3(){return l.useContext(Lc)}function t3({variant:t,size:e,className:n,classNames:r}){const o=l.useMemo(()=>qX({variant:t,size:e,slotRoot:r==null?void 0:r.root,className:n}),[n,r==null?void 0:r.root,e,t]);return{variant:t,size:e,rootClass:o}}const ly=l.forwardRef(function({variant:e="default",size:n="base",classNames:r,className:o="",children:s,hoverLift:i=!0,onPointerOver:a,onPointerOut:c,...u},f){const m=t3({variant:e,size:n,className:o,classNames:r}),p=zX({variant:m.variant,hoverLift:i,forwardedRef:f,onPointerOver:a,onPointerOut:c});return d.jsx(JX,{classNames:r,children:d.jsx("kbd",{ref:p.setMergedRef,className:iy(m.rootClass,p.motionClass,p.glossMotionClass),...p.pointerHandlers,...u,children:d.jsx(ay,{size:m.size,children:s})})})});ly.displayName="KbdRoot";const n3=!0;function cy({className:t,classNames:e,separator:n="+",children:r,...o}){const s=e3(),i=HX(r);return d.jsx("span",{className:ZX(t,(e==null?void 0:e.group)??s.group),...o,children:i.map((a,c)=>d.jsxs(l.Fragment,{children:[c>0&&n!=null?d.jsx(ee,{as:"span",variant:"tools","aria-hidden":n3,className:QX((e==null?void 0:e.separator)??s.separator),children:n}):null,a]},c))})}cy.displayName="KbdGroup";const r3=Object.assign(ly,{Group:cy,Text:am}),o3=new Set,Gp="secondary";function it(...t){return R(...t)}function s3(t,e){return t==="all"?!0:t.has(e)}function i3({selectionMode:t,selectedKeys:e,key:n}){if(t==="none")return null;if(t==="single")return new Set([n]);if(e==="all")return new Set([n]);const r=new Set(e);return r.has(n)?r.delete(n):r.add(n),r}function a3(t,e){if(!(!t||(e==null?void 0:e.column)!==t))return e.direction}function l3(t,e){return{column:t,direction:(e==null?void 0:e.column)===t&&e.direction==="ascending"?"descending":"ascending"}}function c3(t,e){if(t)return e==="ascending"?"ascending":e==="descending"?"descending":"none"}function u3(t,e){return t!=="none"?e:void 0}const uy=l.createContext("default"),wc=l.createContext({}),dy=l.createContext({selectionMode:"none",selectedKeys:new Set,onRowSelect:()=>{},isRowSelected:()=>!1,sortDescriptor:void 0,onSortChange:void 0}),fy=l.createContext(null);function d3({variant:t,children:e}){return d.jsx(uy.Provider,{value:t,children:e})}function f3({classNames:t,children:e}){const n=l.useContext(wc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(wc.Provider,{value:r,children:e})}function m3({value:t,children:e}){return d.jsx(dy.Provider,{value:t,children:e})}function p3({value:t,children:e}){return d.jsx(fy.Provider,{value:t,children:e})}function Us(){return l.useContext(uy)}function zn(){return l.useContext(wc)}function my(){return l.useContext(dy)}function h3(){return l.useContext(fy)}const g3="w-full",b3={default:"rounded-mid border-token bg-surface overflow-clip",secondary:"",toned:"overflow-visible bg-transparent",gloss:"gloss-panel gloss-deep rounded-mid overflow-clip border-0"},x3="gloss-content w-full min-w-0",C3="w-full overflow-x-auto",_3="w-full",S3={default:"border-collapse",secondary:"border-collapse",toned:"border-separate border-spacing-y-xsmall",gloss:"border-collapse"},v3={default:"border-b-token",secondary:"border-b-token",toned:"",gloss:"border-b-token"},y3="group/col",T3={default:"bg-secondary px-mid py-plus text-secondary-foreground whitespace-nowrap",secondary:"px-mid py-plus text-secondary-foreground whitespace-nowrap",toned:"px-mid py-plus text-muted whitespace-nowrap bg-transparent",gloss:"bg-transparent px-mid py-plus text-muted whitespace-nowrap"},A3="cursor-pointer select-none hover:text-foreground",E3="inline-flex items-center gap-xsmall",L3="min-w-0 text-small text-left font-w-mid",w3="shrink-0 origin-center",I3="text-primary opacity-100",R3="opacity-0 group-hover/col:opacity-40 text-muted",N3="px-mid py-mid text-center",D3="outline-none",k3={default:"border-b-token last:border-b-0",secondary:"border-b-token last:border-b-0",toned:"",gloss:"border-b-token last:border-b-0"},O3="cursor-pointer",P3="bg-default-hover",B3="bg-primary-tint hover:bg-primary-tint-strong",j3=R(Io,"hover:bg-primary-tint focus-visible:bg-primary-tint"),M3="focus-ring-inset",F3="text-small",G3={default:"px-mid py-plus",secondary:"px-mid py-plus",toned:"px-mid py-plus first:rounded-l-mid last:rounded-r-mid",gloss:"px-mid py-plus"},H3="ring-2 ring-inset ring-primary",z3="hover:brightness-[0.97] motion-reduce:hover:brightness-100",V3="flex flex-wrap items-center justify-between gap-base border-t-token px-mid py-plus",py={default:"bg-surface text-foreground",outline:"bg-transparent border-token text-foreground",secondary:"bg-secondary text-secondary-foreground",danger:"bg-surface-tint-danger text-foreground",success:"bg-surface-tint-success text-foreground",info:"bg-surface-tint-info text-foreground",warning:"bg-surface-tint-warning text-foreground"};function U3({variant:t,slotClass:e,className:n}){return it(g3,b3[t],e,n)}function $3({variant:t,slotClass:e,className:n}){return it(_3,S3[t],e,n)}function W3({variant:t,allowsSorting:e,slotClass:n,className:r}){return it(y3,T3[t],e&&it(A3,gn),n,r)}function X3({variant:t,isToned:e,isSelectable:n,isSelected:r,slotClass:o,className:s}){return it(D3,k3[t],n&&O3,t==="gloss"&&!e&&(r?B3:j3),t!=="gloss"&&!e&&(r?P3:et()),n&&M3,o,s)}function Y3({variant:t,tone:e,isSelected:n,slotClass:r,className:o}){const s=t==="toned",i=e?py[e]:void 0;return it(F3,G3[t],s&&i,s&&n&&H3,s&&!n&&z3,r,o)}function K3(t){return it(w3,t?I3:R3)}function q3({direction:t}){const e=zn(),n=l.useRef(null),r=Hr(t==="descending",n,()=>!0);return d.jsx("span",{ref:r,"aria-hidden":!0,className:it(K3(!!t),e.columnSortChevron),children:d.jsx(we.IoChevronUp,{className:"icon-xsmall"})})}function Z3({selectionMode:t="none",selectedKeys:e,onSelectionChange:n,sortDescriptor:r,onSortChange:o}){const s=e??o3,i=l.useCallback(c=>s3(s,c),[s]),a=l.useCallback(c=>{const u=i3({selectionMode:t,selectedKeys:s,key:c});u&&n&&n(u)},[n,s,t]);return l.useMemo(()=>({selectionMode:t,selectedKeys:s,onRowSelect:a,isRowSelected:i,sortDescriptor:r,onSortChange:o}),[i,a,o,s,t,r])}const hy=l.forwardRef(function({className:e,tabIndex:n=0,...r},o){const s=zn();return d.jsx("div",{ref:o,tabIndex:n,className:it(C3,s.scrollContainer,e),...r})});hy.displayName="TableScrollContainer";const gy=l.forwardRef(function({selectionMode:e="none",selectedKeys:n,onSelectionChange:r,sortDescriptor:o,onSortChange:s,className:i,children:a,...c},u){const f=Us(),m=zn(),p=Z3({selectionMode:e,selectedKeys:n,onSelectionChange:r,sortDescriptor:o,onSortChange:s});return d.jsx(m3,{value:p,children:d.jsx("table",{ref:u,className:$3({variant:f,slotClass:m.content,className:i}),...c,children:a})})});gy.displayName="TableContent";const by=l.forwardRef(function({columns:e,children:n,className:r,...o},s){const i=Us(),a=zn(),c=e&&typeof n=="function"?e.map(u=>n(u)):n;return d.jsx("thead",{ref:s,className:it(a.header,r),...o,children:d.jsx("tr",{className:it(v3[i],a.headerRow),children:c})})});by.displayName="TableHeader";const xy=l.forwardRef(function({id:e,allowsSorting:n=!1,isRowHeader:r=!1,children:o,className:s,onClick:i,...a},c){const u=Us(),f=zn(),{sortDescriptor:m,onSortChange:p}=my(),b=a3(e,m),g=l.useCallback(x=>{i==null||i(x),!(!n||!e||!p)&&p(l3(e,m))},[n,e,i,p,m]),h=typeof o=="function"?o({sortDirection:b}):o;return d.jsx("th",{ref:c,scope:r?"row":"col","aria-sort":c3(n,b),"data-allows-sorting":n||void 0,className:W3({variant:u,allowsSorting:n,slotClass:f.column,className:s}),onClick:g,...a,children:d.jsxs("span",{className:it(E3,f.columnInner),children:[d.jsx("span",{className:it(L3,f.columnLabel),children:h}),n?d.jsx(q3,{direction:b}):null]})})});xy.displayName="TableColumn";const Cy=l.forwardRef(function({items:e,children:n,renderEmptyState:r,className:o,...s},i){const a=zn();let c;if(e!==void 0)if(e.length===0&&r){const u=r();c=d.jsx("tr",{children:d.jsx("td",{colSpan:9999,className:it(N3,a.emptyCell),children:u})})}else typeof n=="function"&&(c=e.map(n));else c=n;return d.jsx("tbody",{ref:i,className:it(a.body,o),...s,children:c})});Cy.displayName="TableBody";const _y=l.forwardRef(function({id:e,tone:n,children:r,className:o,onClick:s,...i},a){const c=Us(),u=zn(),{selectionMode:f,isRowSelected:m,onRowSelect:p}=my(),b=e!==void 0?m(e):!1,g=f!=="none"&&e!==void 0,h=c==="toned",x=n??(h?Gp:void 0),C=l.useMemo(()=>({tone:x??Gp,isSelected:b}),[b,x]),_=l.useCallback(y=>{s==null||s(y),!y.defaultPrevented&&g&&p(e)},[e,g,s,p]),S=l.useCallback(y=>{g&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),p(e))},[e,g,p]);return d.jsx(p3,{value:h||x?C:null,children:d.jsx("tr",{ref:a,"data-selected":b||void 0,"data-tone":x,"aria-selected":u3(f,b),tabIndex:g?0:void 0,className:X3({variant:c,isToned:h,isSelectable:g,isSelected:b,slotClass:u.row,className:o}),onClick:_,onKeyDown:S,...i,children:r})})});_y.displayName="TableRow";const Sy=l.forwardRef(function({className:e,...n},r){const o=Us(),s=zn(),i=h3();return d.jsx("td",{ref:r,className:Y3({variant:o,tone:i==null?void 0:i.tone,isSelected:(i==null?void 0:i.isSelected)??!1,slotClass:s.cell,className:e}),...n})});Sy.displayName="TableCell";const vy=l.forwardRef(function({className:e,...n},r){const o=zn();return d.jsx("div",{ref:r,className:it(V3,o.footer,e),...n})});vy.displayName="TableFooter";function Q3({variant:t="default"}){return{variant:t,isGloss:t==="gloss"}}const yy=l.forwardRef(function({variant:e="default",className:n,classNames:r,children:o,...s},i){const{variant:a,isGloss:c}=Q3({variant:e}),u=Ro(i,c);return d.jsx(d3,{variant:a,children:d.jsx(f3,{classNames:r,children:d.jsx("div",{ref:u,className:U3({variant:a,slotClass:r==null?void 0:r.root,className:n}),...s,children:c?d.jsx("div",{className:it(x3,r==null?void 0:r.glossContent),children:o}):o})})})});yy.displayName="TableRoot";const J3=Object.assign(yy,{ScrollContainer:hy,Content:gy,Header:by,Column:xy,Body:Cy,Row:_y,Cell:Sy,Footer:vy});function eY(){return"Previous"}function tY(){return"Next"}function nY(t,e,n,r){return`${t} ${r.months[e]} ${n}`}function Xn(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}function Hp(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())}function rY(t,e){return new Date(t,e+1,0).getDate()}function oY(t,e){return(new Date(t,e,1).getDay()+6)%7}function sY(t,e,n){const r=e.getFullYear(),o=e.getMonth();if(t==="days")return`${n.months[o]} ${r}`;if(t==="months")return String(r);const s=Math.floor(r/10)*10;return`${s}–${s+9}`}function iY(t,e,n,r){if(t)return new Date(t.getFullYear(),t.getMonth(),1);let o=null;return e==="single"&&n instanceof Date?o=n:e==="range"?o=(n==null?void 0:n.start)??null:e==="multiple"&&(o=(n==null?void 0:n[0])??null),o?new Date(o.getFullYear(),o.getMonth(),1):new Date(r.getFullYear(),r.getMonth(),1)}function aY(t,e){if(t==="single"){const n=e;return n?[n]:[]}if(t==="multiple"){const n=e;return Array.isArray(n)?n:[]}return[]}function lY(t,e,n){return t!=="range"?null:e||((n==null?void 0:n.start)??null)}function cY(t,e,n){return t!=="range"||e?null:(n==null?void 0:n.end)??null}function uY(t,e,n){return e==="days"?new Date(t.getFullYear(),t.getMonth()+n,1):e==="months"?new Date(t.getFullYear()+n,t.getMonth(),1):new Date(t.getFullYear()+n*10,t.getMonth(),1)}function dY({viewDate:t,selectedDates:e,rangeStart:n,rangeEnd:r,hoverDate:o,mode:s,locale:i,minDate:a,maxDate:c,today:u}){const f=t.getFullYear(),m=t.getMonth(),p=rY(f,m),b=oY(f,m),g=r??(n&&o?o:null),h=n&&g?n<=g?n:g:null,x=n&&g?n<=g?g:n:null,C=[...Array(b).fill(null),...Array.from({length:p},(S,y)=>y+1)],_=C.length%7;return _!==0&&C.push(...Array(7-_).fill(null)),C.map((S,y)=>{if(S===null)return{key:`empty-${f}-${m}-${y}`,day:null};const v=new Date(f,m,S),A=`${f}-${m}-${S}`,E=Xn(v,u),T=s!=="range"&&e.some(D=>Xn(D,v)),L=s==="range"&&!!n&&Xn(v,n),w=s==="range"&&!!g&&Xn(v,g),I=s==="range"&&h&&x?v>h&&v<x:!1,N=s==="range"&&!!n&&!!g&&Xn(n,g),k=!N&&(I||w),j=!N&&(I||L),P=!!a&&v<a||!!c&&v>c;return{key:A,day:S,date:v,isToday:E,isSelected:T,isRangeStart:L,isRangeEnd:w,showLeftBg:k,showRightBg:j,isDisabled:P,circleActive:T||L||w,ariaLabel:nY(S,m,f,i)}})}function fY(t,e,n,r){const o=t.getFullYear();return n.monthsShort.map((s,i)=>({month:i,name:s,isCurrentMonth:r.getFullYear()===o&&r.getMonth()===i,isSelected:e.some(a=>a.getFullYear()===o&&a.getMonth()===i)}))}function mY(t,e,n){const r=Math.floor(t.getFullYear()/10)*10;return Array.from({length:12},(s,i)=>r-1+i).map(s=>({year:s,isCurrentYear:n.getFullYear()===s,isSelected:e.some(i=>i.getFullYear()===s),outOfDecade:s<r||s>r+9}))}function pY(t,e){return e!==void 0?e:t==="range"?{start:null,end:null}:t==="multiple"?[]:null}function Ke(...t){return R(...t)}const Ty=l.createContext(null),Ic=l.createContext({});function hY({value:t,children:e}){return d.jsx(Ty.Provider,{value:t,children:e})}function gY({classNames:t,children:e}){const n=l.useContext(Ic),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Ic.Provider,{value:r,children:e})}function ro(){const t=l.useContext(Ty);if(!t)throw new Error("Calendar compound parts must be inside <Calendar>.");return t}function Vn(){return l.useContext(Ic)}function bY(t=!1){const e=l.useRef(null),n=l.useRef(!1),r=l.useCallback(i=>{if(t||i.defaultPrevented)return;n.current=!0;const a=e.current;!a||Re()||pt(a,!0)},[t]),o=l.useCallback(()=>{n.current=!1;const i=e.current;!i||Re()||pt(i,!1)},[]),s=l.useCallback(i=>{if(t||i.defaultPrevented)return;const a=e.current;!a||de()||We(a,{pointerInside:n.current})},[t]);return{ref:e,handlePointerEnter:r,handlePointerLeave:o,handlePointerDown:s}}function xY(t=!1){const e=l.useRef(null),n=l.useRef(!1),r=l.useCallback(i=>{if(t||i.defaultPrevented)return;n.current=!0;const a=e.current;!a||Re()||pt(a,!0)},[t]),o=l.useCallback(()=>{n.current=!1;const i=e.current;!i||Re()||pt(i,!1)},[]),s=l.useCallback(i=>{if(t||i.defaultPrevented)return;const a=e.current;!a||de()||We(a,{pointerInside:n.current})},[t]);return{btnRef:e,handlePointerEnter:r,handlePointerLeave:o,handlePointerDown:s}}const CY={small:"mx-auto flex aspect-square w-full max-w-control-small items-center justify-center text-xs",base:"mx-auto flex aspect-square w-full max-w-control-base items-center justify-center text-small",mid:"mx-auto flex aspect-square w-full max-w-control-mid items-center justify-center text-small",large:"mx-auto flex aspect-square w-full max-w-control-large items-center justify-center text-base"},_Y={small:"h-control-small w-control-small",base:"h-control-base w-control-base",mid:"h-control-mid w-control-mid",large:"h-control-large w-control-large"},SY={small:"p-small gap-xsmall",base:"p-mid gap-small",mid:"p-mid gap-small",large:"p-large gap-base"},vY={small:"min-w-[15.5rem]",base:"min-w-[18rem]",mid:"min-w-[21rem]",large:"min-w-[24rem]"},yY={small:"text-small",base:"text-base",mid:"text-mid",large:"text-mid"},TY={default:"rounded-large border-token bg-surface shadow-token-base",secondary:"rounded-large border-token bg-secondary shadow-token-base",outline:"rounded-large bg-transparent border-token shadow-token-base",gloss:"rounded-large border-0"},Ay={small:"gap-xsmall",base:"gap-xsmall",mid:"gap-small",large:"gap-small"},AY={small:"small",base:"base",mid:"mid",large:"mid"},Ey={small:"mx-auto aspect-square w-full max-w-control-small",base:"mx-auto aspect-square w-full max-w-control-base",mid:"mx-auto aspect-square w-full max-w-control-mid",large:"mx-auto aspect-square w-full max-w-control-large"},EY={small:"small",base:"base",mid:"mid",large:"mid"},LY={small:"min-h-control-small w-full px-small py-xsmall",base:"min-h-control-base w-full px-plus py-small",mid:"min-h-control-mid w-full px-mid py-plus",large:"min-h-control-large w-full px-mid py-plus"},wY="inline-flex flex-col select-none text-left text-foreground",IY="gloss-panel gloss-deep rounded-large",RY="gloss-content flex flex-col",NY="pointer-events-none absolute inset-y-0 bg-default-hover",DY="flex items-center gap-xsmall",kY="flex-1 rounded-base py-xsmall text-center font-w-mid",OY="cursor-pointer hover:text-primary focus-ring",PY="cursor-default",BY="min-w-0",jY="grid grid-cols-7 gap-xsmall",MY="grid grid-cols-7 gap-xsmall",FY="flex items-center justify-center font-w-mid text-muted",GY="relative flex items-center justify-center",HY="relative z-10",zY="grid grid-cols-3",VY="grid grid-cols-4",UY="flex items-center justify-between border-t-token pt-small",$Y=R(et(),"flex shrink-0 origin-center items-center justify-center rounded-base will-change-transform","text-muted focus-ring","disabled:cursor-not-allowed disabled:opacity-40"),WY="group/calendar-cell relative inline-flex origin-center items-center justify-center overflow-hidden outline-none will-change-transform focus-ring rounded-mid",XY=R("pointer-events-none absolute -inset-px z-0 origin-center will-change-transform bg-primary",Io,"motion-reduce:transition-none group-hover/calendar-cell:bg-primary-hover rounded-mid"),YY=R(kY,gn),KY="relative z-[1] min-w-0 shrink-0 leading-none",qY="absolute bottom-[3px] left-1/2 z-[1] h-[3px] w-[3px] -translate-x-1/2 rounded-full bg-primary",zp="icon-xsmall",ZY="bg-transparent font-w-mid text-primary-foreground",QY="font-w-mid text-primary",JY="text-foreground",eK="cursor-not-allowed opacity-35",tK="cursor-pointer",nK="text-muted",rK="text-muted",oK={opacity:0};function sK(t){return R($Y,_Y[t])}function iK(t,e,n,r){return R(wY,n?IY:TY[t],SY[e],vY[e],r)}function aK(t){return t==="left"?"left-0 right-1/2":"left-1/2 right-0"}function lK(t,e){return e==="day"?Ey[t]:LY[t]}function cK(t,e){return e==="day"?AY[t]:EY[t]}function uK({selected:t,isToday:e,isCurrent:n}){return t?ZY:e||n?QY:JY}function dK(t,e,n,r){return R(WY,lK(t,e),uK({selected:n.selected,isToday:n.isToday,isCurrent:n.isCurrent}),!n.selected&&!n.disabled&&et(),n.disabled?eK:tK,r)}function fK(t){return R(FY,CY[t])}function mK(t){return R(zY,Ay[t])}function pK(t){return R(VY,Ay[t])}function hK(t,e){return t&&!e?nK:void 0}function gK(t,e){return R(YY,yY[t],e!=="years"?OY:PY)}function Vp({visible:t,side:e}){const n=Vn(),r=l.useRef(null),o=l.useRef(!0);return l.useLayoutEffect(()=>{const s=r.current;if(!s)return;const i=a=>{s.style.opacity=a?"1":"0"};if(de()){V(s),i(t);return}if(o.current){o.current=!1,V(s),i(t);return}V(s),X.to(s,{autoAlpha:t?1:0,...Cg(),overwrite:"auto"})},[t]),d.jsx("div",{ref:r,"aria-hidden":!0,className:Ke(R(NY,aK(e)),n.rangeHalfFill),style:oK})}function Up({direction:t,size:e,onClick:n,disabled:r}){const o=Vn(),s=bY(r),i=t==="prev"?eY():tY(),a=t==="prev"?o.navPrev:o.navNext;return d.jsx("button",{ref:s.ref,type:"button","aria-label":i,disabled:r,onClick:n,onPointerEnter:s.handlePointerEnter,onPointerLeave:s.handlePointerLeave,onPointerDown:s.handlePointerDown,className:Ke(sK(e),a),children:t==="prev"?d.jsx(we.IoChevronBack,{className:zp}):d.jsx(we.IoChevronForward,{className:zp})})}const bK=l.forwardRef(function({selected:e,disabled:n=!1,size:r,ariaLabel:o,ariaSelected:s,rounded:i="day",cellKind:a="day",isToday:c=!1,isCurrent:u=!1,className:f="",onPress:m,onMouseEnter:p,onMouseLeave:b,children:g},h){const x=l.useRef(null),C=l.useRef(m),_=l.useRef(p),S=l.useRef(b);C.current=m,_.current=p,S.current=b;const{bindFillRef:y}=TC(e,x),v=xY(n),A=Vn(),E=a==="month"?A.monthCell:a==="year"?A.yearCell:A.dayCell,T=cK(r,i),L=l.useCallback(k=>{v.btnRef.current=k,typeof h=="function"?h(k):h&&(h.current=k)},[v.btnRef,h]),w=l.useCallback(()=>{n||C.current()},[n]),I=l.useCallback(k=>{var j;(j=_.current)==null||j.call(_),v.handlePointerEnter(k)},[v]),N=l.useCallback(()=>{var k;(k=S.current)==null||k.call(S),v.handlePointerLeave()},[v]);return d.jsxs("button",{ref:L,type:"button","aria-label":o,"aria-pressed":s,"aria-disabled":n,disabled:n,onClick:w,onPointerEnter:I,onPointerLeave:N,onPointerDown:v.handlePointerDown,className:dK(r,i,{selected:e,disabled:n,isToday:c,isCurrent:u},Ke(A.cell,E,f)),children:[d.jsx("span",{ref:y,"aria-hidden":!0,[vC]:"","data-pressed":e?"true":"false",className:Ke(XY,A.cellFill)}),d.jsx(ee,{variant:T,as:"span",inheritColor:!0,className:Ke(KY,A.cellText),children:g}),c&&!e&&d.jsx("span",{"aria-hidden":!0,className:Ke(qY,A.cellTodayDot)})]})});function xK(t,e){return t.selected===e.selected&&t.disabled===e.disabled&&t.size===e.size&&t.rounded===e.rounded&&t.cellKind===e.cellKind&&t.isToday===e.isToday&&t.isCurrent===e.isCurrent&&t.ariaLabel===e.ariaLabel&&t.ariaSelected===e.ariaSelected&&t.className===e.className&&t.children===e.children}const Ga=l.memo(bK,xK);function CK(){const t=Vn(),{viewDate:e,selectedDates:n,rangeStart:r,rangeEnd:o,hoverDate:s,setHoverDate:i,onDayPress:a,size:c,mode:u,locale:f,minDate:m,maxDate:p,today:b}=ro(),g=l.useMemo(()=>dY({viewDate:e,selectedDates:n,rangeStart:r,rangeEnd:o,hoverDate:s,mode:u,locale:f,minDate:m,maxDate:p,today:b}),[e,n,r,o,s,u,f,m,p,b]);return d.jsxs("div",{children:[d.jsx("div",{className:Ke(jY,t.weekdayGrid),children:f.weekDays.map(h=>d.jsx("div",{className:Ke(fK(c),t.weekdayCell),children:h},h))}),d.jsx("div",{className:Ke(MY,t.daysGrid),children:g.map(h=>h.day===null?d.jsx("div",{className:Ey[c]},h.key):d.jsxs("div",{className:Ke(GY,t.dayCellWrapper),children:[h.showLeftBg?d.jsx(Vp,{visible:!0,side:"left"}):null,h.showRightBg?d.jsx(Vp,{visible:!0,side:"right"}):null,d.jsx(Ga,{selected:!!h.circleActive,disabled:h.isDisabled,isToday:h.isToday,size:c,cellKind:"day",ariaLabel:h.ariaLabel,ariaSelected:h.circleActive,onPress:()=>h.date&&a(h.date),onMouseEnter:()=>u==="range"&&!h.isDisabled&&h.date&&i(h.date),onMouseLeave:()=>u==="range"&&i(null),className:HY,children:h.day})]},h.key))})]})}function _K(){const t=Vn(),{viewDate:e,onMonthPress:n,selectedDates:r,size:o,locale:s,today:i}=ro(),a=l.useMemo(()=>fY(e,r,s,i),[e,r,s,i]);return d.jsx("div",{className:Ke(mK(o),t.monthsGrid),children:a.map(c=>d.jsx(Ga,{selected:c.isSelected,isCurrent:c.isCurrentMonth,size:o,cellKind:"month",rounded:"picker",onPress:()=>n(c.month),children:c.name},c.month))})}function SK(){const t=Vn(),{viewDate:e,onYearPress:n,selectedDates:r,size:o,today:s}=ro(),i=l.useMemo(()=>mY(e,r,s),[e,r,s]);return d.jsx("div",{className:Ke(pK(o),t.yearsGrid),children:i.map(a=>d.jsx(Ga,{selected:a.isSelected,isCurrent:a.isCurrentYear,size:o,cellKind:"year",rounded:"picker",onPress:()=>n(a.year),className:hK(a.outOfDecade,a.isSelected),children:a.year},a.year))})}const lm=l.forwardRef(function({className:e="",...n},r){const o=Vn(),{view:s,setView:i,viewDate:a,navigate:c,size:u,locale:f}=ro(),m=l.useMemo(()=>sY(s,a,f),[s,a,f]);return d.jsxs("div",{ref:r,className:Ke(DY,o.header,e),...n,children:[d.jsx(Up,{direction:"prev",size:u,onClick:()=>c(-1)}),d.jsx("button",{type:"button",disabled:s==="years",onClick:()=>{s==="days"?i("months"):s==="months"&&i("years")},className:Ke(gK(u,s),o.headerTitle),children:m}),d.jsx(Up,{direction:"next",size:u,onClick:()=>c(1)})]})}),cm=l.forwardRef(function({className:e="",...n},r){const o=Vn(),{view:s}=ro();return d.jsxs("div",{ref:r,className:Ke(BY,o.grid,e),...n,children:[s==="days"&&d.jsx(CK,{}),s==="months"&&d.jsx(_K,{}),s==="years"&&d.jsx(SK,{})]})}),Ly=l.forwardRef(function({className:e="",...n},r){const o=Vn(),{onClear:s,onToday:i,locale:a}=ro();return d.jsxs("div",{ref:r,className:Ke(UY,o.footer,e),...n,children:[d.jsx(yo,{variant:"ghost",size:"small",className:Ke(rK,o.footerToday),onClick:i,children:a.today}),d.jsx(yo,{variant:"ghost",size:"small",status:"danger",className:o.footerClear,onClick:s,children:a.clear})]})});lm.displayName="Calendar.Header";cm.displayName="Calendar.Grid";Ly.displayName="Calendar.Footer";Ga.displayName="CalendarInteractiveCell";function vK(){return d.jsxs(d.Fragment,{children:[d.jsx(lm,{}),d.jsx(cm,{})]})}const wy={weekDays:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"};function yK(t){const{mode:e="single",variant:n="default",size:r="base",defaultMonth:o,initialView:s="days",locale:i=wy,minDate:a,maxDate:c,value:u,defaultValue:f,onValueChange:m}=t,p=n==="gloss",b=l.useMemo(()=>Hp(new Date),[]),g=u!==void 0,[h,x]=l.useState(()=>pY(e,f)),C=g?u:h,_=l.useRef(C);_.current=C;const S=l.useCallback(W=>{const M=_.current,z=typeof W=="function"?W(M):W;_.current=z,g||x(z),m==null||m(z)},[g,m]),[y,v]=l.useState(s),[A,E]=l.useState(()=>iY(o,e,C,b)),[T,L]=l.useState(null),[w,I]=l.useState(null),N=l.useMemo(()=>aY(e,C),[e,C]),k=l.useMemo(()=>lY(e,T,C),[e,T,C]),j=l.useMemo(()=>cY(e,T,C),[e,T,C]),P=l.useCallback(W=>{E(M=>uY(M,y,W))},[y]),G=l.useCallback(W=>{const M=Hp(W);if(e==="single")S(z=>{const H=z instanceof Date?z:null;return H&&Xn(H,M)?null:M});else if(e==="multiple")S(z=>{const H=Array.isArray(z)?z:[],oe=H.findIndex(pe=>Xn(pe,M));return oe>=0?H.filter((pe,ce)=>ce!==oe):[...H,M]});else if(!T)L(M),S({start:null,end:null});else if(Xn(M,T))L(null);else{const z=M<=T?M:T,H=M<=T?T:M;L(null),I(null),S({start:z,end:H})}},[e,T,S]),D=l.useCallback(W=>{E(new Date(A.getFullYear(),W,1)),v("days")},[A]),O=l.useCallback(W=>{E(new Date(W,A.getMonth(),1)),v("months")},[A]),F=l.useCallback(()=>{L(null),I(null),S(e==="single"?null:e==="multiple"?[]:{start:null,end:null})},[e,S]),B=l.useCallback(()=>{E(new Date(b.getFullYear(),b.getMonth(),1)),v("days")},[b]),$=l.useMemo(()=>({mode:e,view:y,setView:v,viewDate:A,navigate:P,selectedDates:N,rangeStart:k,rangeEnd:j,hoverDate:w,setHoverDate:I,onDayPress:G,onMonthPress:D,onYearPress:O,onClear:F,onToday:B,size:r,variant:n,locale:i,minDate:a,maxDate:c,today:b}),[e,y,A,P,N,k,j,w,G,D,O,F,B,r,n,i,a,c,b]);return{isGloss:p,variant:n,size:r,contextValue:$,today:b}}const Iy=l.forwardRef(function(e,n){const{mode:r,variant:o,size:s,defaultMonth:i,initialView:a,locale:c,minDate:u,maxDate:f,value:m,defaultValue:p,onValueChange:b,classNames:g,children:h,className:x="",...C}=e,{isGloss:_,contextValue:S}=yK(e),y=Ro(n,_),v=h??d.jsx(vK,{});return d.jsx(hY,{value:S,children:d.jsx(gY,{classNames:g,children:d.jsx("div",{ref:y,className:iK(S.variant,S.size,_,Ke("",g==null?void 0:g.root,x)),...C,children:_?d.jsx("div",{className:R(RY,g==null?void 0:g.glossContent),children:v}):v})})})});Iy.displayName="Calendar";const TK=Object.assign(Iy,{Header:lm,Grid:cm,Footer:Ly}),Ry=l.createContext(null),Rc=l.createContext({});function AK({value:t,children:e}){return d.jsx(Ry.Provider,{value:t,children:e})}function EK({classNames:t,children:e}){const n=l.useContext(Rc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Rc.Provider,{value:r,children:e})}function Ha(){const t=l.useContext(Ry);if(!t)throw new Error("ColorPicker compound parts must be inside <ColorPicker>.");return t}function Ko(){return l.useContext(Rc)}const LK="Saturation and brightness",wK="Color selection",IK="Hex code of the color",RK="Transparency (%)";function NK(t){return`Selected color: ${t}`}function xs(t,e,n){return Math.max(e,Math.min(n,t))}function Dr({h:t,s:e,v:n,a:r}){const o=e/100,s=n/100,a=(t%360+360)%360/60,c=Math.floor(a),u=a-c,f=s*(1-o),m=s*(1-o*u),p=s*(1-o*(1-u));let b=0,g=0,h=0;switch(c%6){case 0:b=s,g=p,h=f;break;case 1:b=m,g=s,h=f;break;case 2:b=f,g=s,h=p;break;case 3:b=f,g=m,h=s;break;case 4:b=p,g=f,h=s;break;case 5:b=s,g=f,h=m;break}return{r:Math.round(b*255),g:Math.round(g*255),b:Math.round(h*255),a:r}}function Ny({r:t,g:e,b:n,a:r}){const o=t/255,s=e/255,i=n/255,a=Math.max(o,s,i),c=Math.min(o,s,i),u=a-c;let f=0;return u>0&&(a===o?f=((s-i)/u+6)%6:a===s?f=(i-o)/u+2:f=(o-s)/u+4,f=Math.round(f*60)),{h:f,s:a===0?0:Math.round(u/a*100),v:Math.round(a*100),a:r}}function Dy({r:t,g:e,b:n,a:r}){const o=i=>Math.round(xs(i,0,255)).toString(16).padStart(2,"0"),s=`#${o(t)}${o(e)}${o(n)}`;return r<100?s+o(Math.round(r/100*255)):s}function ky(t){const e=t.replace(/^#/,"");return e.length===3?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:100}:e.length===6?{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:100}:e.length===8?{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:Math.round(parseInt(e.slice(6,8),16)/255*100)}:null}function Nc(t){return Dy(Dr(t))}function $s(t){const e=ky(t);return e?Ny(e):null}function Oy(t){const{r:e,g:n,b:r}=Dr(t);return t.a<100?`rgba(${e},${n},${r},${(t.a/100).toFixed(2)})`:`rgb(${e},${n},${r})`}function Zi(t){const{r:e,g:n,b:r}=Dr({h:t,s:100,v:100,a:100});return`rgb(${e},${n},${r})`}function DK(t,e){const n=e?"to right":"to top",{r,g:o,b:s}=Dr(t);return{background:`linear-gradient(${n}, rgba(${r},${o},${s},0), rgb(${r},${o},${s}))`}}function kK({hsva:t,setHsva:e}){const n=l.useRef(null),r=l.useRef(!1),o=l.useCallback((i,a)=>{const c=n.current;if(!c)return;const u=c.getBoundingClientRect(),f=xs((i-u.left)/u.width*100,0,100),m=xs(100-(a-u.top)/u.height*100,0,100);e({...t,s:Math.round(f),v:Math.round(m)})},[t,e]);l.useEffect(()=>{const i=c=>{r.current&&o(c.clientX,c.clientY)},a=()=>{r.current=!1};return window.addEventListener("pointermove",i),window.addEventListener("pointerup",a),window.addEventListener("pointercancel",a),()=>{window.removeEventListener("pointermove",i),window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a)}},[o]);const s=l.useCallback(i=>{i.preventDefault(),r.current=!0,o(i.clientX,i.clientY)},[o]);return{areaRef:n,handlePointerDown:s}}function mt(...t){return R(...t)}const Py="#3b82f6",OK={h:217,s:90,v:96,a:100};function PK(t,e){return $s(t??e??Py)??OK}const By={small:"small",base:"base",mid:"mid"},BK={small:"small",base:"base",mid:"mid"},jK={small:"w-52",base:"w-64",mid:"w-72"},MK={small:"h-32",base:"h-40",mid:"h-48"},FK={small:"p-small gap-small",base:"p-plus gap-plus",mid:"p-mid gap-mid"},GK="relative w-full touch-none select-none rounded-small cursor-crosshair overflow-hidden",HK="pointer-events-none absolute z-10 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-token-mid",zK="flex items-center gap-small",VK="flex min-w-0 flex-1 flex-col gap-xsmall",UK="flex items-center gap-small",$K="flex items-center gap-xsmall rounded-small border-token bg-secondary px-small py-xsmall",WK="text-small text-muted select-none",XK=`min-w-0 flex-1 bg-transparent text-small font-mono uppercase text-foreground outline-none ${Et}`,YK="flex items-center gap-xsmall rounded-small border-token bg-secondary px-small py-xsmall",KK=`w-8 bg-transparent text-right text-small font-mono text-foreground outline-none ${Et}`,qK="text-small text-muted select-none",ZK="flex flex-wrap gap-xsmall border-t-token pt-small",QK="flex flex-col rounded-mid text-foreground";function JK(t,e){return mt(QK,jK[t],FK[t],e)}function e4(t,e){return mt(GK,MK[t],e)}const t4="overflow-hidden rounded-full",n4="opacity-48",$p="flex flex-col gap-xsmall",r4="flex items-center justify-between",o4={hue:"Hue",saturation:"Saturation",value:"Value",alpha:"Alpha",red:"Red",green:"Green",blue:"Blue"};function s4({size:t,orientation:e,disabled:n,className:r}){return R(IS({isHorizontal:e==="horizontal",size:t,className:r}),t4,n&&n4)}function i4(t,e,n){const r=n==="horizontal";if(t==="alpha")return DK(e,r);const o=r?"to right":"to top",{r:s,g:i,b:a}=Dr(e);switch(t){case"hue":return{background:`linear-gradient(${o}, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)`};case"saturation":{const c=Dr({...e,s:0}),u=Zi(e.h);return{background:`linear-gradient(${o}, rgb(${c.r},${c.g},${c.b}), ${u})`}}case"value":{const c=Zi(e.h);return{background:`linear-gradient(${o}, #000, ${c})`}}case"red":return{background:`linear-gradient(${o}, rgb(0,${i},${a}), rgb(255,${i},${a}))`};case"green":return{background:`linear-gradient(${o}, rgb(${s},0,${a}), rgb(${s},255,${a}))`};case"blue":return{background:`linear-gradient(${o}, rgb(${s},${i},0), rgb(${s},${i},255))`}}}const a4={hue:{min:0,max:360,step:1},saturation:{min:0,max:100,step:1},value:{min:0,max:100,step:1},alpha:{min:0,max:100,step:1},red:{min:0,max:255,step:1},green:{min:0,max:255,step:1},blue:{min:0,max:255,step:1}},jy={hue:0,saturation:100,value:100,alpha:100,red:255,green:0,blue:0};function l4(t,e,n){const r=t!==void 0,[o,s]=l.useState(e??n),i=r?t:o,a=l.useCallback(c=>{r||s(c)},[r]);return[i,a]}const Eo=l.forwardRef(function({channel:e,color:n={h:0,s:100,v:100,a:100},value:r,defaultValue:o,onValueChange:s,size:i="base",orientation:a="horizontal",disabled:c=!1,className:u="",...f},m){const{min:p,max:b,step:g}=a4[e],[h,x]=l4(r,o,jy[e]),C=l.useRef(!1),_=l.useRef(null),[S,y]=l.useState(!1),[v,A]=l.useState(0),E=l.useMemo(()=>wS(void 0,i),[i]),[T,L]=l.useState(E);l.useLayoutEffect(()=>{const O=_.current;if(!O)return;const F=()=>{const $=O.getBoundingClientRect(),{trackSpanPx:W,thumbSpanPx:M}=Ci($,a);A(W),M>0&&L(z=>z===M?z:M)};F();const B=new ResizeObserver(F);return B.observe(O),()=>B.disconnect()},[a]);const w=l.useCallback(O=>{_.current=O,typeof m=="function"?m(O):m&&(m.current=O)},[m]),I=l.useCallback(O=>{const F=xs(Math.round(O/g)*g,p,b);x(F),s==null||s(F)},[p,b,g,x,s]),N=T>0?T:E,k=l.useCallback((O,F)=>{const B=_.current;if(!B||c)return;const $=B.getBoundingClientRect();I(fc(O,F,$,a,p,b,N))},[c,N,I,b,p,a]);l.useEffect(()=>{const O=B=>{C.current&&k(B.clientX,B.clientY)},F=()=>{C.current=!1,y(!1)};return window.addEventListener("pointermove",O),window.addEventListener("pointerup",F),window.addEventListener("pointercancel",F),()=>{window.removeEventListener("pointermove",O),window.removeEventListener("pointerup",F),window.removeEventListener("pointercancel",F)}},[k]);const j=l.useCallback(O=>{c||O.button!==0||(O.preventDefault(),C.current=!0,y(!0),k(O.clientX,O.clientY))},[c,k]),P=l.useCallback(O=>{c||O.button!==0||(O.stopPropagation(),C.current=!0,y(!0),O.currentTarget.setPointerCapture(O.pointerId))},[c]),G=l.useCallback(O=>{if(c)return;let F=0;if(a==="horizontal"){if(O.key==="ArrowRight")F=g;else if(O.key==="ArrowLeft")F=-g;else if(O.key==="PageUp")F=g*10;else if(O.key==="PageDown")F=-g*10;else if(O.key==="Home"){I(p);return}else if(O.key==="End"){I(b);return}}else if(O.key==="ArrowUp")F=g;else if(O.key==="ArrowDown")F=-g;else if(O.key==="Home"){I(p);return}else if(O.key==="End"){I(b);return}F!==0&&(O.preventDefault(),I(h+F))},[c,a,g,p,b,h,I]),D=dc(h,p,b,v,N);return d.jsx("div",{ref:w,role:"presentation",className:s4({size:i,orientation:a,disabled:c,className:u}),style:i4(e,n,a),onPointerDown:j,...f,children:d.jsx(_i,{size:i,percent:D,orientation:a,disabled:c,active:S,ariaLabel:o4[e],ariaValueNow:h,ariaValueMin:p,ariaValueMax:b,onPointerDown:P,onKeyDown:G})})});Eo.displayName="ColorSliderTrack";const My=l.forwardRef(function({channel:e,color:n,label:r,size:o="base",orientation:s="horizontal",className:i="",children:a,...c},u){return a?d.jsx("div",{ref:u,className:R($p,i),children:a}):d.jsxs("div",{ref:u,className:R($p,i),children:[r?d.jsxs("div",{className:r4,children:[d.jsx(ee,{as:"span",variant:"small",className:"text-muted",children:r}),d.jsx(ee,{as:"span",variant:"small",className:"font-w-mid text-foreground",children:c.value??c.defaultValue??jy[e]})]}):null,d.jsx(Eo,{channel:e,color:n,size:o,orientation:s,...c})]})});My.displayName="ColorSliderRoot";const Wp={xsmall:"h-4 w-4",small:"h-5 w-5",base:"h-6 w-6",mid:"h-7 w-7",large:"h-8 w-8",xlarge:"h-10 w-10"},Xp={circle:"rounded-full",rounded:"rounded-small",square:"rounded-none"};function c4(t,e){if(typeof e["aria-label"]=="string")return e["aria-label"];if(typeof e["aria-labelledby"]!="string")return`Select color ${t}`}const Ws=l.forwardRef(function({color:e="transparent",size:n="base",shape:r="rounded",selected:o=!1,disabled:s=!1,className:i="",onClick:a,onPointerEnter:c,onPointerLeave:u,onPointerDown:f,...m},p){const{setRefs:b,handlePointerEnter:g,handlePointerLeave:h,handlePointerDown:x}=aa({isGloss:!1,animated:!0,enabled:!s,hasHoverShadow:!0,forwardedRef:p,onPointerEnter:c,onPointerLeave:u,onPointerDown:f}),{"aria-label":C,..._}=m,S=!!a,y=typeof C=="string"||typeof _["aria-labelledby"]=="string";if(!S&&!y)return d.jsx("span",{"aria-hidden":!0,className:R("relative shrink-0 overflow-hidden",Wp[n],Xp[r],i),style:{backgroundColor:e}});const v=C??(S?c4(e,m):void 0);return d.jsx("button",{ref:b,type:"button",disabled:s,onClick:a,onPointerEnter:g,onPointerLeave:h,onPointerDown:x,"aria-label":v,className:R("relative shrink-0 origin-center overflow-hidden will-change-transform","outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-1",ir,Wp[n],Xp[r],o&&"ring-2 ring-primary ring-offset-2 ring-offset-background",s?"cursor-not-allowed opacity-40":a?"cursor-pointer":"cursor-default",i),style:{backgroundColor:e},..._})});Ws.displayName="ColorSwatch";function u4({size:t}){const{hsva:e,setHsva:n}=Ha(),r=Ko(),{areaRef:o,handlePointerDown:s}=kK({hsva:e,setHsva:n}),i=Zi(e.h),a=Oy(e);return d.jsx("div",{ref:o,role:"group","aria-label":LK,className:e4(t,r.area),style:{background:`linear-gradient(to bottom, transparent, #000), linear-gradient(to right, #fff, ${i})`},onPointerDown:s,children:d.jsx("div",{"aria-hidden":!0,className:mt(HK,r.areaThumb),style:{left:`${e.s}%`,top:`${100-e.v}%`,width:"14px",height:"14px",backgroundColor:a}})})}function d4({hex:t,setHsva:e}){const n=Ko(),[r,o]=l.useState(!1),[s,i]=l.useState(""),a=l.useCallback(u=>{const f=`#${u}`,m=$s(f);m&&e(m)},[e]),c=r?s:t.slice(1);return d.jsxs("div",{className:mt($K,n.hexInput),children:[d.jsx("span",{className:mt(WK,n.hexPrefix),children:"#"}),d.jsx("input",{type:"text",value:c,maxLength:8,spellCheck:!1,"aria-label":IK,className:mt(XK,n.hexInputField,Et),onFocus:()=>{o(!0),i(t.slice(1))},onChange:u=>i(u.target.value.replace(/[^0-9a-fA-F]/g,"").toUpperCase()),onBlur:()=>{a(s),o(!1)},onKeyDown:u=>{u.key==="Enter"&&(a(s),o(!1))}})]})}function f4({hsva:t,setHsva:e}){const n=Ko();return d.jsxs("div",{className:mt(YK,n.alphaInput),children:[d.jsx("input",{type:"text",value:Math.round(t.a),"aria-label":RK,className:mt(KK,n.alphaInputField,Et),onChange:r=>{const o=parseInt(r.target.value,10);Number.isNaN(o)||e({...t,a:xs(o,0,100)})}}),d.jsx("span",{className:mt(qK,n.alphaSuffix),children:"%"})]})}function m4({presets:t,hex:e,setHsva:n,size:r}){const o=Ko();return d.jsx("div",{className:mt(ZK,o.presets),children:t.map(s=>d.jsx(Ws,{color:s,size:By[r],shape:"rounded",selected:e.toLowerCase()===s.toLowerCase(),className:o.presetSwatch,onClick:()=>{const i=$s(s);i&&n(i)}},s))})}const Fy=l.forwardRef(function({swatchSize:e,className:n,...r},o){const{hex:s,disabled:i,size:a}=Ha(),c=Ko();return d.jsx(kt.Trigger,{ref:o,className:mt(c.trigger,n),...r,children:d.jsx(Ws,{color:s,size:e??By[a],shape:"rounded",disabled:i,"aria-label":NK(s)})})});Fy.displayName="ColorPickerTrigger";const Gy=l.forwardRef(function({showAlpha:e=!1,presets:n,className:r,...o},s){const{hsva:i,setHsva:a,hex:c,size:u}=Ha(),f=Ko(),m=BK[u];return d.jsx(kt.Content,{ref:s,unstyled:!0,offset:Rs,align:"start","aria-label":wK,className:mt(f.content,r),children:d.jsxs("div",{className:JK(u,f.contentPanel),...o,children:[d.jsx(u4,{size:u}),d.jsxs("div",{className:mt(zK,f.slidersRow),children:[d.jsx(Ws,{color:c,size:"mid",shape:"circle",className:mt("shrink-0",f.previewSwatch)}),d.jsxs("div",{className:VK,children:[d.jsx(Eo,{channel:"hue",color:i,value:i.h,size:m,className:f.hueSlider,onValueChange:p=>a({...i,h:p})}),e?d.jsx(Eo,{channel:"alpha",color:i,value:i.a,size:m,className:f.alphaSlider,onValueChange:p=>a({...i,a:p})}):null]})]}),d.jsxs("div",{className:mt(UK,f.inputsRow),children:[d.jsx(d4,{hex:c,setHsva:a}),e?d.jsx(f4,{hsva:i,setHsva:a}):null]}),n&&n.length>0?d.jsx(m4,{presets:n,hex:c,setHsva:a,size:u}):null]})})});Gy.displayName="ColorPickerContent";function p4({value:t,defaultValue:e=Py,onValueChange:n,size:r="base",disabled:o=!1}){const s=t!==void 0,[i,a]=l.useState(()=>PK(t,e)),c=l.useMemo(()=>s&&t!=null?$s(t)??i:i,[i,s,t]),u=l.useCallback(p=>{s||a(p),n==null||n(Nc(p))},[s,n]),f=Nc(c);return{contextValue:l.useMemo(()=>({hsva:c,setHsva:u,hex:f,disabled:o,size:r}),[c,u,f,o,r])}}function Hy({children:t,value:e,defaultValue:n,onValueChange:r,open:o,defaultOpen:s=!1,onOpenChange:i,size:a="base",variant:c="default",side:u="bottom",disabled:f=!1,classNames:m}){const{contextValue:p}=p4({value:e,defaultValue:n,onValueChange:r,size:a,disabled:f});return d.jsx(AK,{value:p,children:d.jsx(EK,{classNames:m,children:d.jsx(kt,{open:o,defaultOpen:s,onOpenChange:i,side:u,variant:c==="gloss"?"gloss":"default",children:t})})})}Hy.displayName="ColorPickerRoot";const h4=Object.assign(Hy,{Trigger:Fy,Content:Gy}),g4=Object.assign(My,{Track:Eo}),um=l.createContext(null),Dc=l.createContext({});function b4({value:t,children:e}){return d.jsx(um.Provider,{value:t,children:e})}function x4({classNames:t,children:e}){const n=l.useContext(Dc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Dc.Provider,{value:r,children:e})}function zy(){const t=l.useContext(um);if(!t)throw new Error("Components TimeField must be inside <TimeField>.");return t}function C4(){return l.useContext(um)}function Xs(){return l.useContext(Dc)}const _4="Time",S4={h:"hours",m:"minutes",s:"seconds"};function v4({labelConnected:t,labelId:e}){return{"aria-label":t?void 0:_4,"aria-labelledby":t?e:void 0}}function y4({seg:t,value:e,isRequired:n,isDanger:r,isFirstSegment:o,disabled:s}){return{role:"spinbutton","aria-label":S4[t],"aria-valuemin":0,"aria-valuemax":t==="h"?23:59,"aria-valuenow":e,"aria-valuetext":String(e).padStart(2,"0"),"aria-required":o&&n?!0:void 0,"aria-invalid":o&&r?!0:void 0,tabIndex:s?-1:0}}function T4(t){return t==="danger"||t==="default"?"default":t}function jt(...t){return R(...t)}const kc={h:23,m:59,s:59};function Yp(t){const e=t.split(":").map(Number);return{h:Number.isFinite(e[0])?Math.max(0,Math.min(23,e[0])):0,m:Number.isFinite(e[1])?Math.max(0,Math.min(59,e[1])):0,s:Number.isFinite(e[2])?Math.max(0,Math.min(59,e[2])):0}}function A4(t,e){const n=String(t.h).padStart(2,"0"),r=String(t.m).padStart(2,"0"),o=String(t.s).padStart(2,"0");return e==="HH:mm:ss"?`${n}:${r}:${o}`:`${n}:${r}`}function Kp(t,e){return t[e]}function Wn(t,e,n){const r=Math.max(0,Math.min(kc[e],n));return{...t,[e]:r}}function E4(t,e,n,r){const o=t!==void 0,[s,i]=l.useState(()=>Yp(t??e)),a=o?Yp(t):s,c=l.useCallback(u=>{o||i(u),r==null||r(A4(u,n))},[n,o,r]);return[a,c,o]}function L4(t){return t==="HH:mm:ss"?["h","m","s"]:["h","m"]}function w4(t){return t==="segmented"||t==="gloss"?"default":t}const I4={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},R4={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},N4="bg-primary-tint",D4="border-r-token",k4="border-l-token",O4=`pointer-events-none absolute h-px w-px opacity-0 ${Et}`,P4="inline-flex min-w-[2ch] select-none items-center justify-center outline-none",B4="h-[1.65em] min-w-[2.25ch] rounded-small px-[3px] bg-default-hover",j4="rounded-[3px] px-[2px]",M4="bg-primary text-primary-foreground",F4="cursor-not-allowed",G4="cursor-default",H4="inline-flex w-[0.45em] shrink-0 select-none items-center justify-center self-center text-muted",z4="mx-[1px]",V4="relative flex min-w-0 flex-1 items-center font-mono tabular-nums leading-none",U4="flex min-w-0 w-full items-stretch",$4="gap-xsmall",W4={small:In("small"),base:In("base"),mid:In("mid"),large:In("large")};function X4(t){return t==="default"?N4:R4[t]}function Y4({side:t,status:e,size:n,slotClass:r}){return jt(W4[n],X4(e),t==="prefix"?D4:k4,r)}function K4({variant:t,status:e,statusTinted:n}){return Ns({variant:t==="segmented"?"default":t,statusTinted:n&&e!=="default",statusTintClass:e!=="default"?I4[e]:""})}function q4({variant:t,status:e,disabled:n,compact:r,shellSurface:o,glossShellHoverMotionClass:s,standardShellHoverMotionClass:i,slotClass:a,className:c}){const u=t==="gloss";return jt("m-0 min-w-0 overflow-hidden rounded-base p-0",u?"relative":jt("border-1"),r?"w-fit shrink-0":"w-full min-w-0",o,Vr,Ur,u?"":zr(!n,e,w4(t)),u?s:i,n?"cursor-not-allowed opacity-55 shadow-token-base":"",a,c)}function Z4({variant:t}){return jt(U4,!(t==="gloss")&&jt("min-h-full"))}function Q4({variant:t,size:e,compact:n,slotClass:r}){const o=le[e],s=o.controlText==="small"?"text-small":o.controlText==="mid"?"text-mid":"text-base";return jt(V4,n?"justify-center px-small":o.padX,o.padY,t==="segmented"&&$4,s,r)}function J4({variant:t,focused:e,disabled:n,slotClass:r}){return jt(P4,t==="segmented"?B4:j4,e&&M4,n?F4:G4,r)}function eq({variant:t,slotClass:e}){return jt(H4,t==="segmented"&&z4,e)}function tq({compact:t,slotClass:e,className:n}){return jt(t&&"w-fit",e,n)}function nq({shellRef:t,disabled:e,variant:n,onPointerDown:r,onPointerEnter:o,onPointerLeave:s}){const i=n==="gloss",a=Fo(t,!e&&!i),c=ko(t,!e&&i),u=l.useCallback((b,g)=>{g(b),!e&&i&&c.bindShellRef(b)},[e,c,i]),f=l.useCallback(b=>{if(r==null||r(b),b.defaultPrevented||e||i)return;const g=t.current;!g||de()||We(g)},[e,i,r,t]),m=l.useCallback(b=>{o==null||o(b),!b.defaultPrevented&&(i?c.onShellPointerEnter(b):a.onShellPointerEnter(b))},[c,i,o,a]),p=l.useCallback(b=>{s==null||s(b),i?c.onShellPointerLeave(b):a.onShellPointerLeave(b)},[c,i,s,a]);return{isGloss:i,bindShellRef:u,shellPointerDown:i&&!e?c.onShellPointerDown:f,shellPointerEnter:m,shellPointerLeave:p,shellFocusCapture:i&&!e?c.onShellFocusIn:void 0,shellBlurCapture:i&&!e?c.onShellFocusOut:void 0,glossShellHoverMotionClass:c.shellHoverMotionClass,standardShellHoverMotionClass:a.shellHoverMotionClass}}function rq({value:t,defaultValue:e="00:00",onValueChange:n,format:r="HH:mm",disabled:o=!1,size:s,status:i,variant:a,compact:c,id:u,onPointerDown:f,onPointerEnter:m,onPointerLeave:p,ref:b}){const g=C4(),h=s??(g==null?void 0:g.size)??"base",x=i??(g==null?void 0:g.status)??"default",C=a??(g==null?void 0:g.variant)??"default",_=c??(g==null?void 0:g.compact)??!1,S=C==="gloss",y=g==null?void 0:g.fieldId,v=(g==null?void 0:g.labelId)??"",A=(g==null?void 0:g.labelConnected)??!1,E=(g==null?void 0:g.isRequired)??!1,[T,L]=E4(t,e,r,n),w=l.useRef(null),[I,N]=l.useState(null),k=l.useRef(null),j=l.useRef(null),P=l.useRef(null),G=l.useRef(null),D=l.useRef(null),O=l.useMemo(()=>({h:P,m:G,s:D}),[]),F=l.useMemo(()=>L4(r),[r]),B=l.useCallback(q=>{k.current=q,typeof b=="function"?b(q):b&&(b.current=q)},[b]),$=nq({shellRef:k,disabled:o,variant:C,onPointerDown:f,onPointerEnter:m,onPointerLeave:p}),W=l.useCallback(q=>{$.bindShellRef(q,B)},[B,$]),M=l.useCallback(q=>{var se,ue;w.current=null,N(q),(se=k.current)==null||se.scrollIntoView({block:"nearest",inline:"center"}),(ue=j.current)==null||ue.focus({preventScroll:!0})},[]),z=l.useCallback((q,se)=>{const ue=F.indexOf(q);se==="next"&&ue<F.length-1&&M(F[ue+1]),se==="prev"&&ue>0&&M(F[ue-1])},[F,M]),H=l.useCallback(()=>{const q=w.current;q&&(L(Wn(T,q.seg,q.digit)),w.current=null)},[T,L]),oe=l.useCallback((q,se)=>{const ue=kc[q],Pe=w.current;if(Pe&&Pe.seg===q){const ft=Pe.digit*10+se;ft>ue?(L(Wn(T,q,Pe.digit)),se*10>ue?(L(Wn(T,q,Math.min(se,ue))),w.current=null,z(q,"next")):w.current={seg:q,digit:se}):(L(Wn(T,q,ft)),w.current=null,z(q,"next"))}else se*10>ue?(L(Wn(T,q,Math.min(se,ue))),w.current=null,z(q,"next")):(w.current={seg:q,digit:se},L(Wn(T,q,se)))},[T,z,L]),pe=l.useCallback((q,se)=>{if(o)return;const ue=kc[se],Pe=parseInt(q.key,10);if(!Number.isNaN(Pe))q.preventDefault(),oe(se,Pe);else if(q.key==="ArrowUp"){q.preventDefault(),w.current=null;const ft=Kp(T,se);L(Wn(T,se,ft>=ue?0:ft+1))}else if(q.key==="ArrowDown"){q.preventDefault(),w.current=null;const ft=Kp(T,se);L(Wn(T,se,ft<=0?ue:ft-1))}else q.key==="ArrowLeft"||q.key==="Backspace"?(q.preventDefault(),H(),z(se,"prev")):q.key==="ArrowRight"?(q.preventDefault(),H(),z(se,"next")):q.key==="Tab"&&H()},[oe,H,o,T,z,L]),ce=l.useCallback(q=>{const se=k.current,ue=q.relatedTarget;if(!(se&&ue&&se.contains(ue))){if(se&&ue==null){requestAnimationFrame(()=>{const Pe=document.activeElement;se.contains(Pe)||(H(),N(null))});return}H(),N(null)}},[H]),Y=l.useCallback(q=>{w.current=null,N(q)},[]),ne=l.useCallback(q=>{const se=q.currentTarget.value;if(q.currentTarget.value="",!(o||!I))for(const ue of se){const Pe=parseInt(ue,10);Number.isNaN(Pe)||oe(I,Pe)}},[oe,o,I]),me=l.useCallback(q=>{o||!I||pe(q,I)},[o,I,pe]),re=l.useCallback((q,se)=>{q.stopPropagation(),M(se)},[M]),xe=l.useCallback(q=>{if(o)return;const se=F[0];se&&(q.target instanceof Element&&q.target.closest('[role="spinbutton"]')||M(se))},[o,M,F]),te=q=>{var se;return((se=w.current)==null?void 0:se.seg)===q&&I===q},U=q=>te(q)?String(w.current.digit):String(T[q]).padStart(2,"0"),he=K4({variant:C,status:x,statusTinted:x==="danger"||x==="success"||x==="warning"}),Ne=v4({labelConnected:A,labelId:v}),Ye=Ft(g!=null&&g.hintConnected?g.hintId:void 0,g!=null&&g.errorConnected?g.errorId:void 0);return{size:h,status:x,variant:C,compact:_,disabled:o,isGloss:S,format:r,fieldId:y,controlId:u??y,shellAria:Ne,ariaDescribedBy:Ye,isRequired:E,hms:T,segments:F,segRefById:O,keyboardInputRef:j,bindShellRef:W,shellMotion:$,shellSurface:he,focusedSeg:I,handleSegKeyDown:pe,handleFieldBlur:ce,handleSegFocus:Y,handleKeyboardInput:ne,handleKeyboardInputKeyDown:me,handleSegClick:re,handleShellClick:xe,segDisplay:U}}function qp({side:t,status:e,size:n,className:r,children:o}){return d.jsx("span",{className:Y4({side:t,status:e,size:n,slotClass:r}),children:o})}const za=l.forwardRef(function(e,n){const{value:r,defaultValue:o,onValueChange:s,format:i,disabled:a,size:c,status:u,variant:f,compact:m,prefix:p,suffix:b,className:g,id:h,onPointerDown:x,onPointerEnter:C,onPointerLeave:_,...S}=e,y=Xs(),v=rq({value:r,defaultValue:o,onValueChange:s,format:i,disabled:a,size:c,status:u,variant:f,compact:m,id:h,onPointerDown:x,onPointerEnter:C,onPointerLeave:_,ref:n});return d.jsx("fieldset",{ref:v.bindShellRef,id:v.controlId,"aria-label":v.shellAria["aria-label"],"aria-labelledby":v.shellAria["aria-labelledby"],"aria-describedby":v.ariaDescribedBy,"data-slot":"timefield-shell",onPointerDown:v.shellMotion.shellPointerDown,onPointerEnter:v.shellMotion.shellPointerEnter,onPointerLeave:v.shellMotion.shellPointerLeave,onFocusCapture:v.shellMotion.shellFocusCapture,onBlurCapture:v.shellMotion.shellBlurCapture,...v.disabled&&v.isGloss?{"data-gloss-disabled":""}:{},className:q4({variant:v.variant,status:v.status,disabled:v.disabled,size:v.size,compact:v.compact,shellSurface:v.shellSurface,glossShellHoverMotionClass:v.shellMotion.glossShellHoverMotionClass,standardShellHoverMotionClass:v.shellMotion.standardShellHoverMotionClass,slotClass:y.shell,className:g}),...S,children:d.jsxs("div",{className:Z4({variant:v.variant}),onClick:v.handleShellClick,children:[p!=null?d.jsx(qp,{side:"prefix",status:v.status,size:v.size,className:y.prefix,children:p}):null,d.jsxs("div",{className:Q4({variant:v.variant,size:v.size,compact:v.compact,slotClass:y.segments}),children:[d.jsx("input",{ref:v.keyboardInputRef,type:"text",inputMode:"numeric",pattern:"[0-9]*",autoComplete:"off","aria-hidden":!0,tabIndex:-1,disabled:v.disabled,className:jt(O4,y.keyboardInput,Et),onInput:v.handleKeyboardInput,onKeyDown:v.handleKeyboardInputKeyDown,onBlur:v.handleFieldBlur}),v.segments.map((A,E)=>d.jsxs("span",{className:"inline-flex items-center",children:[E>0&&d.jsx("span",{"aria-hidden":!0,className:eq({variant:v.variant,slotClass:y.segmentSeparator}),children:":"}),d.jsx("span",{ref:v.segRefById[A],...y4({seg:A,value:v.hms[A],isRequired:v.isRequired,isDanger:v.status==="danger",isFirstSegment:A===v.segments[0],disabled:v.disabled}),className:J4({variant:v.variant,focused:v.focusedSeg===A,disabled:v.disabled,slotClass:y.segment}),onKeyDown:T=>v.handleSegKeyDown(T,A),onFocus:()=>v.handleSegFocus(A),onBlur:v.handleFieldBlur,onClick:T=>v.handleSegClick(T,A),children:v.segDisplay(A)})]},A))]}),b!=null?d.jsx(qp,{side:"suffix",status:v.status,size:v.size,className:y.suffix,children:b}):null]})})});za.displayName="TimeFieldControl";function Vy({className:t,classNames:e,...n}){const r=Xs();return d.jsx(Ue,{className:t,classNames:{...e,root:jt(r.label,e==null?void 0:e.root)},...n})}Vy.displayName="TimeFieldLabel";function Va({children:t,id:e,className:n,...r}){const o=zy(),s=Xs();return d.jsx(Xe,{id:e??o.hintId,status:T4(o.status),className:jt(s.hint,n),...r,children:t})}Va.displayName="TimeFieldHint";function Ua({children:t,id:e,className:n,...r}){const o=zy(),s=Xs();return d.jsx(Ze,{id:e??o.errorId,role:"alert",className:jt(s.error,n),...r,children:t})}Ua.displayName="TimeFieldError";function oq({label:t,hint:e,error:n,labelId:r,controlProps:o}){const s=Xs();return d.jsxs(d.Fragment,{children:[t!=null?d.jsx(Ue,{id:r,classNames:{root:s.label},children:t}):null,d.jsx(za,{...o}),e!=null&&d.jsx(Va,{children:e}),n!=null&&d.jsx(Ua,{children:n})]})}function sq({children:t,label:e,hint:n,error:r,id:o,isRequired:s=!1,status:i="default",size:a="base",variant:c="default",compact:u=!1}){const f=l.useId(),m=o??`timefield-${f}`,p=Yt(m),b=Kt(m),g=`${m}-label`,h=qt(t),x=e!=null||h&&Te(t,"Label"),C=n!=null||h&&Te(t,"TimeFieldHint"),_=r!=null||h&&Te(t,"TimeFieldError"),S=l.useMemo(()=>({fieldId:m,labelId:g,labelConnected:x,hintId:p,errorId:b,hintConnected:C,errorConnected:_,isRequired:s,status:i,size:a,variant:c,compact:u}),[u,b,m,_,C,x,p,s,g,a,i,c]),y=l.useMemo(()=>({controlId:m,labelId:g,isRequired:s}),[m,s,g]);return{fieldCtx:S,fieldLabelCtx:y,isCompound:h,fieldId:m,label:e,hint:n,error:r,status:i,size:a,variant:c,compact:u}}function Uy({children:t,label:e,hint:n,error:r,className:o,classNames:s,id:i,isRequired:a=!1,status:c="default",size:u="base",variant:f="default",value:m,defaultValue:p,onValueChange:b,format:g,disabled:h,compact:x=!1,prefix:C,suffix:_,...S}){const y=sq({children:t,label:e,hint:n,error:r,id:i,isRequired:a,status:c,size:u,variant:f,compact:x}),v=y.isCompound?t:d.jsx(oq,{label:y.label,hint:y.hint,error:y.error,labelId:y.fieldCtx.labelId,controlProps:{id:y.fieldId,value:m,defaultValue:p,onValueChange:b,format:g,disabled:h,size:y.size,status:y.status,variant:y.variant,compact:y.compact,prefix:C,suffix:_}});return d.jsx(b4,{value:y.fieldCtx,children:d.jsx(x4,{classNames:s,children:d.jsx(Xt.Provider,{value:y.fieldLabelCtx,children:d.jsx(pn,{className:tq({compact:y.compact,slotClass:s==null?void 0:s.root,className:o}),...S,children:v})})})})}Uy.displayName="TimeField";const iq=Object.assign(Uy,{Label:Vy,Control:za,Hint:Va,Error:Ua});function $a(){return{"aria-hidden":!0,role:"presentation"}}const Wa="relative overflow-hidden bg-primary-tint",aq="pointer-events-none absolute inset-0 -translate-x-full",lq="rounded-full",cq="h-control-base w-control-base",uq="flex flex-col gap-small",dq="h-[1em] rounded-small",fq="w-3/5",mq="w-full",pq="rounded-mid px-mid py-plus",hq={none:"rounded-none",small:"rounded-small",mid:"rounded-mid",full:"rounded-full"},gq="skeleton-pulse 1.6s ease-in-out infinite",bq="skeleton-wave-slide 2s linear 0.2s infinite",xq="skeleton-shimmer 2s linear infinite",Cq="linear-gradient(90deg, transparent 0%, var(--color-primary-tint-strong) 50%, transparent 100%)",_q="linear-gradient(90deg, var(--color-primary-tint) 0%, var(--color-primary-tint-strong) 50%, var(--color-primary-tint) 100%)";function Sq(){return{animation:gq}}function vq(){return{backgroundImage:_q,backgroundSize:"400% 100%",animation:xq}}function yq(){return{animation:bq,background:Cq}}function Tq(t){return hq[t]}function Aq(t){return`${t*.06}s`}function Lo(...t){return R(...t)}function Xa(t){return t==="pulse"?Sq():t==="shimmer"?vq():{}}function Ya({className:t,style:e}){return d.jsx("span",{"aria-hidden":!0,className:Lo(aq,t),style:{...yq(),...e}})}const $y=l.forwardRef(function({variant:e="wave",size:n=cq,className:r,classNames:o,style:s,...i},a){return d.jsx("div",{ref:a,className:Lo(Wa,lq,n,o==null?void 0:o.root,r),style:{...Xa(e),...s},...$a(),...i,children:e==="wave"?d.jsx(Ya,{className:o==null?void 0:o.wave}):null})});$y.displayName="SkeletonCircle";const Wy=l.forwardRef(function({variant:e="wave",lines:n=3,lastShort:r=!0,className:o,classNames:s,style:i,...a},c){const u=Array.from({length:n},(f,m)=>r&&m===n-1?fq:mq);return d.jsx("div",{ref:c,className:Lo(uq,s==null?void 0:s.root,o),style:i,...$a(),...a,children:u.map((f,m)=>d.jsx("div",{className:Lo(Wa,dq,f,s==null?void 0:s.line),style:{...Xa(e),animationDelay:Aq(m)},children:e==="wave"?d.jsx(Ya,{className:s==null?void 0:s.wave}):null},m))})});Wy.displayName="SkeletonText";const Xy=l.forwardRef(function({variant:e="wave",className:n,classNames:r,style:o,children:s,...i},a){return d.jsxs("div",{ref:a,className:Lo(Wa,pq,r==null?void 0:r.root,n),style:{...Xa(e),...o},...$a(),...i,children:[e==="wave"?d.jsx(Ya,{className:r==null?void 0:r.wave}):null,s]})});Xy.displayName="SkeletonBlock";function Eq({variant:t="wave",radius:e="small"}){return{variant:t,radius:e,isWave:t==="wave"}}const Yy=l.forwardRef(function({variant:e="wave",radius:n="small",className:r,classNames:o,style:s,children:i,...a},c){const{variant:u,radius:f,isWave:m}=Eq({variant:e,radius:n});return d.jsxs("div",{ref:c,className:Lo(Wa,Tq(f),o==null?void 0:o.root,r),style:{...Xa(u),...s},...$a(),...a,children:[m?d.jsx(Ya,{className:o==null?void 0:o.wave}):null,i]})});Yy.displayName="Skeleton";const Lq=Object.assign(Yy,{Circle:$y,Text:Wy,Block:Xy}),Ky=l.createContext(null);function wq({value:t,children:e}){return d.jsx(Ky.Provider,{value:t,children:e})}function Iq(){return l.useContext(Ky)}const qy=l.createContext(null);function Rq({value:t,children:e}){return d.jsx(qy.Provider,{value:t,children:e})}function dm(){const t=l.useContext(qy);if(!t)throw new Error("Disclosure parts must be inside <Disclosure>.");return t}const Oc=l.createContext({});function Zy({classNames:t,children:e}){const n=l.useContext(Oc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Oc.Provider,{value:r,children:e})}function fm(){return l.useContext(Oc)}function Ct(...t){return R(...t)}function Nq(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function Dq(t){return t==="outline"||t==="secondary"||t==="default"}function kq(t){return t.displayName}function Oq(t){const e=[],n=[],r=[],o=[];return l.Children.forEach(t,s=>{if(!l.isValidElement(s)){o.push(s);return}const i=kq(s.type);i==="DisclosureTrigger"?e.push(s):i==="DisclosureContent"?n.push(s):i==="DisclosureHandle"?r.push(s):o.push(s)}),[...e,...n,...r,...o]}const Qy={small:"p-base",base:"p-plus",mid:"p-mid",large:"p-large"},Pq={default:"flex flex-col",outline:"flex flex-col",secondary:"flex flex-col",card:"overflow-hidden rounded-base border-token bg-surface shadow-token-base",ghost:"flex flex-col",gloss:"flex flex-col"},Zp={outline:"bg-transparent border-token rounded-mid text-foreground",secondary:"bg-secondary border-token rounded-mid text-secondary-foreground"},so=R("bg-transparent text-foreground",et()),Bq={default:R("rounded-mid",so),outline:R("rounded-mid",so),secondary:R("rounded-mid",so),card:so,ghost:R("rounded-mid",so),gloss:R("rounded-mid",so)},jq="flex w-full select-none items-center gap-small text-left outline-none focus-ring py-base",Mq="cursor-not-allowed opacity-48",Fq="cursor-pointer",Gq="min-w-0 flex-1 origin-center will-change-transform",Hq="block",zq="inline-flex shrink-0 origin-center items-center justify-center text-muted",Vq="text-primary",Uq="overflow-hidden",$q="flex touch-none select-none shrink-0 cursor-grab items-center justify-center border-t-token py-xsmall active:cursor-grabbing",Wq="pointer-events-none opacity-48",Xq="h-1 w-10 rounded-full bg-tertiary",Yq="gloss-panel gloss-deep rounded-mid text-foreground",Kq="gloss-content text-muted";function Jy(t){const e=le[t];return{padX:e.padX,text:e.controlText,chevron:e.chevronIcon}}function qq({variant:t,groupedCardShell:e,className:n,slotClass:r}){const o=t==="card"&&e?"":Pq[t];return Ct(o,n,r)}function Zq({variant:t,size:e,disabled:n,className:r,slotClass:o}){const s=Jy(e);return Ct(jq,s.padX,Bq[t],n?Mq:Fq,r,o)}function Qq(t){if(t==="outline"||t==="secondary"||t==="gloss")return"pt-xsmall"}function Jq({variant:t,size:e,className:n,slotClass:r}){const o=Dq(t);return Ct(Qy[e],o&&t==="outline"&&Zp.outline,o&&t==="secondary"&&Zp.secondary,t==="card"&&"border-t-token",t==="ghost"&&"text-muted",t==="default"&&"text-muted",n,r)}function e8(t,e){return Ct(Kq,Qy[t],e)}function t8({separated:t,variant:e,className:n,slotClass:r}){return Ct("flex w-full flex-col",t&&"gap-mid",!t&&e==="default"&&"divide-y-token border-t-token border-b-token",!t&&e==="card"&&"overflow-hidden rounded-mid border-token bg-surface shadow-token-base divide-y-token",!t&&(e==="outline"||e==="secondary"||e==="ghost"||e==="gloss")&&"gap-small",n,r)}function n8(t){return t!=null&&!t.separated&&t.variant==="card"}function r8({open:t,disabled:e,setOpen:n,chevronRef:r,skipContentAnimRef:o,forwardedRef:s,onClick:i,onKeyDown:a,onPointerEnter:c,onPointerLeave:u,onPointerDown:f}){const m=l.useRef(null),p=l.useRef(null),b=l.useRef(!1),g=l.useCallback(v=>{m.current=v,dt(s,v)},[s]),h=Hr(t,r,()=>Se().enableExpandable,o);l.useEffect(()=>{const v=p.current;return()=>{v&&V(v)}},[]),l.useEffect(()=>{if(!e)return;b.current=!1;const v=p.current;v&&V(v)},[e]);const x=l.useCallback(v=>{i==null||i(v),!(v.defaultPrevented||e)&&n(!t)},[e,i,t,n]),C=l.useCallback(v=>{a==null||a(v),(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),e||n(!t))},[e,a,t,n]),_=l.useCallback(v=>{if(c==null||c(v),v.defaultPrevented||e)return;b.current=!0;const A=p.current;!A||Re()||pt(A,!0)},[e,c]),S=l.useCallback(v=>{u==null||u(v),b.current=!1;const A=p.current;!A||Re()||pt(A,!1)},[u]),y=l.useCallback(v=>{if(f==null||f(v),v.defaultPrevented||e)return;const A=p.current;!A||de()||We(A,{pointerInside:b.current})},[e,f]);return{setRefs:g,titleLiftRef:p,bindChevronRef:h,handleClick:x,handleKeyDown:C,handlePointerEnter:_,handlePointerLeave:S,handlePointerDown:y,mergeRefs:Nq}}const Qp=.38,o8=.45,s8=-.45;function i8(t){return t.getBoundingClientRect().height}function a8(t,e,n){if(!t||n<=0)return;const r=Math.min(Math.max(e/n,0),1);X.set(t,{rotation:r*180})}function l8(t,e,n,r,o,s,i){return{onPointerDown:l.useCallback(c=>{if(s)return;const u=t.current,f=e.current;if(!u||!f||de())return;c.preventDefault();const m=Fi(f);if(m<=0)return;const p=c.currentTarget;p.setPointerCapture(c.pointerId);const b=c.clientY,g=i8(u);let h=b,x=performance.now(),C=0;V(u,n.current),u.style.overflow="hidden",u.style.willChange="height";const _=y=>{if(y.pointerId!==c.pointerId)return;const v=y.clientY,A=v-b,E=performance.now(),T=E-x;T>0&&(C=(v-h)/T),h=v,x=E;const L=Math.max(0,Math.min(m,g+A));u.style.height=`${L}px`,a8(n.current,L,m)},S=y=>{if(y.pointerId!==c.pointerId)return;p.releasePointerCapture(y.pointerId),p.removeEventListener("pointermove",_),p.removeEventListener("pointerup",S),p.removeEventListener("pointercancel",S);const A=y.clientY-b,T=Math.max(0,Math.min(m,g+A))/m,L={...ve(),overwrite:"auto"},w=T>=Qp||C>o8,I=T<=1-Qp||C<s8;if(V(u,n.current),!r&&w){const P=X.timeline({onComplete:()=>{u.style.willChange="",u.style.height="auto",u.style.overflow="",i&&(i.current=!0),o(!0)}});P.to(u,{height:m,...L},0),n.current&&P.to(n.current,{rotation:180,...L},0);return}if(r&&I){const P=X.timeline({onComplete:()=>{u.style.willChange="",u.style.height="0px",u.style.overflow="hidden",i&&(i.current=!0),o(!1)}});P.to(u,{height:0,...L},0),n.current&&P.to(n.current,{rotation:0,...L},0);return}const N=T>=.5,k=N?m:0,j=X.timeline({onComplete:()=>{u.style.willChange="",N?(u.style.height="auto",u.style.overflow=""):(u.style.height="0px",u.style.overflow="hidden"),i&&(i.current=!0),o(N)}});j.to(u,{height:k,...L},0),n.current&&j.to(n.current,{rotation:N?180:0,...L},0)};p.addEventListener("pointermove",_),p.addEventListener("pointerup",S),p.addEventListener("pointercancel",S)},[n,s,e,r,o,t,i])}}function eT({className:t,onPointerDown:e,...n}){const r=fm(),{variant:o,disabled:s,dragHandle:i,shellRef:a,innerRef:c,chevronRef:u,open:f,setOpen:m,skipContentAnimRef:p}=dm(),{onPointerDown:b}=l8(a,c,u,f,m,s,p);return!i||o!=="card"?null:d.jsx("div",{"aria-hidden":!0,className:Ct($q,s&&Wq,r.handle,t),onPointerDown:g=>{e==null||e(g),b(g)},...n,children:d.jsx("span",{className:Xq})})}eT.displayName="DisclosureHandle";const tT=l.forwardRef(function({children:e,className:n,...r},o){const s=fm(),{open:i,panelId:a,triggerId:c,size:u,variant:f,shellRef:m,innerRef:p,skipContentAnimRef:b}=dm();Tx(i,m,p,{skipAnimRef:b});const g=yx(m,i),h=l.useCallback(_=>{g(_),typeof o=="function"?o(_):o&&(o.current=_)},[g,o]),x=Qq(f),C=f==="gloss";return d.jsx("div",{ref:h,"aria-hidden":!i,className:Ct(Uq,s.contentShell),children:d.jsx("div",{ref:p,className:Ct(x,s.contentWrap),children:C?d.jsx("section",{id:a,"aria-labelledby":c,className:Ct(s.contentPanel,n),...r,children:d.jsx("div",{className:Ct(Yq,s.glossPanel),children:d.jsx("div",{className:e8(u,s.glossContent),children:e})})}):d.jsx("section",{id:a,"aria-labelledby":c,className:Jq({variant:f,size:u,className:n,slotClass:s.contentPanel}),...r,children:e})})})});tT.displayName="DisclosureContent";const nT=l.forwardRef(function({children:e,icon:n,asChild:r,className:o,onKeyDown:s,onClick:i,onPointerEnter:a,onPointerLeave:c,onPointerDown:u,...f},m){const p=fm(),{open:b,setOpen:g,triggerId:h,panelId:x,variant:C,size:_,disabled:S,iconPos:y,chevronRef:v,skipContentAnimRef:A}=dm(),E=Jy(_),T=r8({open:b,disabled:S,setOpen:g,chevronRef:v,skipContentAnimRef:A,forwardedRef:m,onClick:i,onKeyDown:s,onPointerEnter:a,onPointerLeave:c,onPointerDown:u}),L=n!==null?d.jsx("span",{ref:T.bindChevronRef,"aria-hidden":!0,className:Ct(zq,E.chevron,gn,b&&Vq,p.triggerChevron),children:n??d.jsx(we.IoChevronDown,{className:"size-full"})}):null;if(r&&l.isValidElement(e)){const w=e;return l.cloneElement(w,{...f,id:h,ref:T.mergeRefs(m,T.setRefs,w.props.ref),className:Ct(w.props.className,o),disabled:S||w.props.disabled,"aria-expanded":b,"aria-controls":x,onClick:I=>{var N,k;(k=(N=w.props).onClick)==null||k.call(N,I),T.handleClick(I)},onKeyDown:I=>{var N,k;(k=(N=w.props).onKeyDown)==null||k.call(N,I),T.handleKeyDown(I)}})}return d.jsxs("button",{ref:T.setRefs,id:h,type:"button","aria-expanded":b,"aria-controls":x,disabled:S,className:Zq({variant:C,size:_,disabled:S,className:o,slotClass:p.trigger}),onClick:T.handleClick,onKeyDown:T.handleKeyDown,onPointerEnter:T.handlePointerEnter,onPointerLeave:T.handlePointerLeave,onPointerDown:T.handlePointerDown,...f,children:[y==="left"&&L,d.jsx("span",{ref:T.titleLiftRef,className:Ct(Gq,p.triggerTitleLift),children:d.jsx(ee,{as:"span",variant:E.text,className:Ct(Hq,b?"text-primary":"text-foreground",p.triggerTitle),children:e})}),y==="right"&&L]})});nT.displayName="DisclosureTrigger";function c8(t){return`disclosure-trigger-${t}`}function u8(t){return`disclosure-panel-${t}`}function d8({children:t,open:e,defaultOpen:n=!1,onOpenChange:r,value:o,variant:s,size:i,disabled:a=!1,iconPos:c="right",dragHandle:u=!1}){const f=Iq(),m=f!==null&&o!==void 0&&f.accordion,p=m?f.openValue===o:void 0,[b,g]=l.useState(n),h=m?p:e!==void 0?e:b,x=l.useCallback(k=>{m?f.setOpenValue(k?o??null:null):(e===void 0&&g(k),r==null||r(k))},[m,f,o,e,r]),C=l.useId(),_=c8(C),S=u8(C),y=l.useRef(null),v=l.useRef(null),A=l.useRef(null),E=l.useRef(!1),T=s??(f==null?void 0:f.variant)??"default",L=i??(f==null?void 0:f.size)??"base",w=n8(f),I=l.useMemo(()=>({open:h,setOpen:x,triggerId:_,panelId:S,variant:T,size:L,disabled:a,iconPos:c,dragHandle:u,shellRef:y,innerRef:v,chevronRef:A,skipContentAnimRef:E}),[a,u,c,h,S,x,L,_,T]),N=u&&T==="card"?Oq(t):t;return{contextValue:I,variant:T,groupedCardShell:w,orderedChildren:N}}const rT=l.forwardRef(function({children:e,className:n,classNames:r,open:o,defaultOpen:s,onOpenChange:i,value:a,variant:c,size:u,disabled:f,iconPos:m,dragHandle:p,...b},g){const h=d8({children:e,open:o,defaultOpen:s,onOpenChange:i,value:a,variant:c,size:u,disabled:f,iconPos:m,dragHandle:p});return d.jsx(Rq,{value:h.contextValue,children:d.jsx(Zy,{classNames:r,children:d.jsx("div",{ref:g,className:qq({variant:h.variant,groupedCardShell:h.groupedCardShell,className:n,slotClass:r==null?void 0:r.root}),...b,children:h.orderedChildren})})})});rT.displayName="Disclosure";function f8({accordion:t=!0,separated:e=!1,variant:n="default",size:r="base",value:o,defaultValue:s,onValueChange:i}){const a=o!==void 0,[c,u]=l.useState(s??null),f=a?o:c,m=l.useCallback(b=>{const g=t&&b===f?null:b;a||u(g),i==null||i(g)},[t,a,i,f]);return{contextValue:l.useMemo(()=>({openValue:f,setOpenValue:m,variant:n,size:r,separated:e,accordion:t}),[t,f,m,n,r,e]),separated:e,variant:n}}const oT=l.forwardRef(function({children:e,accordion:n,separated:r,variant:o,size:s,value:i,defaultValue:a,onValueChange:c,className:u,classNames:f,...m},p){const b=f8({accordion:n,separated:r,variant:o,size:s,value:i,defaultValue:a,onValueChange:c});return d.jsx(wq,{value:b.contextValue,children:d.jsx(Zy,{classNames:f,children:d.jsx("div",{ref:p,className:t8({separated:b.separated,variant:b.variant,className:u,slotClass:f==null?void 0:f.group}),...m,children:e})})})});oT.displayName="DisclosureGroup";const m8=Object.assign(rT,{Trigger:nT,Handle:eT,Content:tT}),p8={convergeRipplePrimaryFill:"color-mix(in oklab, var(--color-primary-foreground) 38%, transparent)",convergeRippleNeutral:"var(--color-primary-tint-strong)",convergeRippleNeutralMuted:"color-mix(in oklab, var(--color-primary) 14%, transparent)",convergeRippleDanger:"color-mix(in oklab, var(--color-danger-foreground) 38%, transparent)",convergeRippleSuccess:"color-mix(in oklab, var(--color-success-foreground) 38%, transparent)",convergeRippleInfo:"color-mix(in oklab, var(--color-info-foreground) 38%, transparent)",convergeRippleWarning:"color-mix(in oklab, var(--color-warning-foreground) 38%, transparent)"},h8={convergeRipplePrimaryFill:"color-mix(in oklab, var(--color-primary-foreground) 52%, var(--color-primary))",convergeRippleNeutral:"var(--color-primary-tint-strong)",convergeRippleNeutralMuted:"color-mix(in oklab, var(--color-primary) 14%, transparent)",convergeRippleDanger:"color-mix(in oklab, var(--color-danger-foreground) 38%, transparent)",convergeRippleSuccess:"color-mix(in oklab, var(--color-success-foreground) 38%, transparent)",convergeRippleInfo:"color-mix(in oklab, var(--color-info-foreground) 38%, transparent)",convergeRippleWarning:"color-mix(in oklab, var(--color-warning-foreground) 38%, transparent)"},sT={background:"#0c0d10",surface:"#171717",secondary:"#2D2D2D",secondaryForeground:"#f4f5f7",tertiary:"#454545",tertiaryForeground:"#f4f5f7",border:"color-mix(in oklab, var(--color-foreground) 12%, transparent)",foreground:"#f4f5f7",muted:"#8b90a0",primary:"#ebebef",primaryForeground:"#0c0c0e",primaryTint:"color-mix(in oklab, var(--color-primary) 20%, transparent)",primaryTintStrong:"color-mix(in oklab, var(--color-primary) 25%, transparent)",focusRing:"#ebebef",indicator:"#ebebef",indicatorForeground:"#0c0c0e",danger:"#dc2626",success:"#22c55e",info:"#0ea5e9",warning:"#f59e0b",dangerForeground:"#fafafa",successForeground:"#fafafa",infoForeground:"#fafafa",warningForeground:"#0c0c0e",primaryHover:"color-mix(in oklab, var(--color-primary) 80%, var(--color-surface))",defaultHover:"color-mix(in oklab, var(--color-foreground) 8%, var(--color-surface))",secondaryHover:"color-mix(in oklab, var(--color-foreground) 6%, var(--color-secondary))",tertiaryHover:"color-mix(in oklab, var(--color-foreground) 6%, var(--color-tertiary))",surfaceTintDanger:"color-mix(in oklab, var(--color-danger) 30%, black)",surfaceTintDangerHover:"color-mix(in oklab, var(--color-danger) 40%, black)",dangerFillHover:"color-mix(in oklab, var(--color-danger) 90%, black)",surfaceTintSuccess:"color-mix(in oklab, var(--color-success) 30%, black)",surfaceTintSuccessHover:"color-mix(in oklab, var(--color-success) 40%, black)",successFillHover:"color-mix(in oklab, var(--color-success) 90%, black)",surfaceTintInfo:"color-mix(in oklab, var(--color-info) 30%, black)",surfaceTintInfoHover:"color-mix(in oklab, var(--color-info) 40%, black)",infoFillHover:"color-mix(in oklab, var(--color-info) 90%, black)",surfaceTintWarning:"color-mix(in oklab, var(--color-warning) 30%, black)",surfaceTintWarningHover:"color-mix(in oklab, var(--color-warning) 40%, black)",warningFillHover:"color-mix(in oklab, var(--color-warning) 90%, black)",...p8},iT={background:"#f5f5f5",surface:"#ffffff",secondary:"#ebebec",secondaryForeground:"#18181b",tertiary:"#e2e2e4",tertiaryForeground:"#18181b",border:"color-mix(in oklab, var(--color-foreground) 12%, transparent)",foreground:"#18181b",muted:"#71717a",primary:"#18181b",primaryForeground:"#fafafa",primaryTint:"color-mix(in oklab, var(--color-primary) 20%, transparent)",primaryTintStrong:"color-mix(in oklab, var(--color-primary) 25%, transparent)",focusRing:"#18181b",indicator:"#18181b",indicatorForeground:"#fafafa",danger:"#dc2626",success:"#22c55e",info:"#0ea5e9",warning:"#f59e0b",dangerForeground:"#ffffff",successForeground:"#ffffff",infoForeground:"#ffffff",warningForeground:"#0c0c0e",primaryHover:"color-mix(in oklab, var(--color-primary) 80%, var(--color-surface))",defaultHover:"color-mix(in oklab, var(--color-foreground) 8%, var(--color-surface))",secondaryHover:"color-mix(in oklab, var(--color-foreground) 6%, var(--color-secondary))",tertiaryHover:"color-mix(in oklab, var(--color-foreground) 6%, var(--color-tertiary))",surfaceTintDanger:"color-mix(in oklab, var(--color-danger) 14%, white)",surfaceTintDangerHover:"color-mix(in oklab, var(--color-danger) 22%, white)",dangerFillHover:"color-mix(in oklab, var(--color-danger) 90%, black)",surfaceTintSuccess:"color-mix(in oklab, var(--color-success) 14%, white)",surfaceTintSuccessHover:"color-mix(in oklab, var(--color-success) 22%, white)",successFillHover:"color-mix(in oklab, var(--color-success) 90%, black)",surfaceTintInfo:"color-mix(in oklab, var(--color-info) 15%, white)",surfaceTintInfoHover:"color-mix(in oklab, var(--color-info) 22%, white)",infoFillHover:"color-mix(in oklab, var(--color-info) 90%, black)",surfaceTintWarning:"color-mix(in oklab, var(--color-warning) 14%, white)",surfaceTintWarningHover:"color-mix(in oklab, var(--color-warning) 22%, white)",warningFillHover:"color-mix(in oklab, var(--color-warning) 90%, black)",...h8},Ka={background:"--color-background",surface:"--color-surface",secondary:"--color-secondary",secondaryForeground:"--color-secondary-foreground",tertiary:"--color-tertiary",tertiaryForeground:"--color-tertiary-foreground",border:"--color-border",foreground:"--color-foreground",muted:"--color-muted",primary:"--color-primary",primaryForeground:"--color-primary-foreground",primaryTint:"--color-primary-tint",primaryTintStrong:"--color-primary-tint-strong",focusRing:"--color-focus-ring",indicator:"--color-indicator",indicatorForeground:"--color-indicator-foreground",danger:"--color-danger",success:"--color-success",info:"--color-info",warning:"--color-warning",dangerForeground:"--color-danger-foreground",successForeground:"--color-success-foreground",infoForeground:"--color-info-foreground",warningForeground:"--color-warning-foreground",primaryHover:"--color-primary-hover",defaultHover:"--color-default-hover",secondaryHover:"--color-secondary-hover",tertiaryHover:"--color-tertiary-hover",surfaceTintDanger:"--color-surface-tint-danger",surfaceTintDangerHover:"--color-surface-tint-danger-hover",dangerFillHover:"--color-danger-fill-hover",surfaceTintSuccess:"--color-surface-tint-success",surfaceTintSuccessHover:"--color-surface-tint-success-hover",successFillHover:"--color-success-fill-hover",surfaceTintInfo:"--color-surface-tint-info",surfaceTintInfoHover:"--color-surface-tint-info-hover",infoFillHover:"--color-info-fill-hover",surfaceTintWarning:"--color-surface-tint-warning",surfaceTintWarningHover:"--color-surface-tint-warning-hover",warningFillHover:"--color-warning-fill-hover",convergeRipplePrimaryFill:"--color-converge-ripple-primary-fill",convergeRippleNeutral:"--color-converge-ripple-neutral",convergeRippleNeutralMuted:"--color-converge-ripple-neutral-muted",convergeRippleDanger:"--color-converge-ripple-danger",convergeRippleSuccess:"--color-converge-ripple-success",convergeRippleInfo:"--color-converge-ripple-info",convergeRippleWarning:"--color-converge-ripple-warning"},aT={space:.5,size:1,radius:.5,borderWidth:1,textScale:1,shadowStrength:1,shadowSize:1,toastScrimSize:1,toastScrimDensity:1},lT={interactiveDuration:280,interactiveEase:"power2.out",hoverLiftEase:"sine.inOut",tooltipDuration:200,switchThumbDuration:340,switchThumbEase:"back.out(1.4)",selectionFillDuration:200,selectionFillEase:"back.out(1.25)",hoverLiftScale:1.025,badgeAnchorHoverLiftScale:1.052,pressSqueezeMid:.98,rippleDefaultDuration:700,rippleDefaultOpacityFrom:.42,rippleExpandableDuration:700,rippleExpandableOpacityFrom:.34,rippleEaseCss:"cubic-bezier(0.25, 0.55, 0.35, 0.95)",feedbackExpandDuration:720,expandDuration:200,expandOpenEase:"sine.inOut",progressFillDuration:600,progressFillEase:"power2.out",loadingDotsDuration:900,loadingDotsEaseUp:"power2.out",loadingDotsEaseDown:"power2.in",enableHoverLift:!0,enablePressSqueeze:!0,enableToggleButtonFill:!0,enableRipple:!0,enableExpandable:!0,enableToastStack:!0,enableAsyncButtonCrossfade:!0,enableContentFade:!0,enableFeedbackExpand:!0,enableProgressFill:!0,enableLoadingDots:!0},cT='ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',uT="ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",Qi={tools:{size:.6875,line:.875},xsmall:{size:.75,line:1},small:{size:.875,line:1.25},base:{size:1,line:1.5},mid:{size:1.125,line:1.75},large:{size:1.25,line:1.75},xlarge:{size:1.5,line:2},"2xlarge":{size:1.875,line:2.25},"3xlarge":{size:2.25,line:2.5}},g8={dark:{base:.15,mid:.2,large:.24},light:{base:.08,mid:.12,large:.16}},b8={base:[[0,2,4,-2]],mid:[[0,4,10,-6]],large:[[0,8,20,-12]]};function x8(t,e,n,r,o,s){const i=a=>a===0?"0":`${a*s}px`;return`${i(t)} ${i(e)} ${i(n)} ${i(r)} rgb(0 0 0 / ${o})`}function di(t,e,n,r){const o=g8[e][t]*n,[s,i,a,c]=b8[t][0];return x8(s,i,a,c,o,r)}function C8(t,e,n,r){t.style.setProperty("--shadow-size",String(r)),t.style.setProperty("--shadow-none",di("base",e,0,r)),t.style.setProperty("--shadow-base",di("base",e,n,r)),t.style.setProperty("--shadow-mid",di("mid",e,n,r)),t.style.setProperty("--shadow-large",di("large",e,n,r))}function _8(t,e){for(const n of Object.keys(Qi)){const{size:r,line:o}=Qi[n],s=r*e,i=o*e;t.style.setProperty(`--text-scale-${n}`,`${s}rem`),t.style.setProperty(`--text-scale-${n}--line-height`,`calc(${i}rem / ${s}rem)`)}}function S8(t,e){for(const[n,r]of Object.entries(ia))t.style.setProperty(r,String(e[n]))}function dT(){return{dark:{...sT},light:{...iT}}}function qa(t){var r,o;if((r=t.modePalettes)!=null&&r.dark&&((o=t.modePalettes)!=null&&o.light))return t;const e=dT(),n={...t.colors};return{...t,modePalettes:{dark:t.theme==="dark"?n:e.dark,light:t.theme==="light"?n:e.light}}}function v8(t,e){const n=qa(t),r=n.modePalettes[e];return{...n,theme:e,colors:{...r}}}function y8(t,e,n){const r=qa(t),o={...r.colors,[e]:n};return{...r,colors:o,modePalettes:{...r.modePalettes,[r.theme]:o}}}function wo(t="dark"){const e=dT(),n=e[t];return{theme:t,...aT,...lT,fontFamily:cT,fontFamilyMono:uT,fontWeights:{...Ag},colors:{...n},modePalettes:e}}const T8=["--space","--size","--radius","--border-width","--font-family-sans","--font-family-mono",...Object.values(ia),"--shadow-size","--shadow-none","--shadow-base","--shadow-mid","--shadow-large","--toast-scrim-size","--toast-scrim-density",...Object.keys(Qi).flatMap(t=>[`--text-scale-${t}`,`--text-scale-${t}--line-height`]),...Object.values(Ka)];function Pc(t=document.documentElement){for(const e of T8)t.style.removeProperty(e);delete t.dataset.theme}let Jp="";function A8(t){const e=JSON.stringify({interactiveDuration:t.interactiveDuration,interactiveEase:t.interactiveEase,hoverLiftEase:t.hoverLiftEase,tooltipDuration:t.tooltipDuration,switchThumbDuration:t.switchThumbDuration,switchThumbEase:t.switchThumbEase,selectionFillDuration:t.selectionFillDuration,selectionFillEase:t.selectionFillEase,hoverLiftScale:t.hoverLiftScale,badgeAnchorHoverLiftScale:t.badgeAnchorHoverLiftScale,pressSqueezeMid:t.pressSqueezeMid,rippleDefaultDuration:t.rippleDefaultDuration,rippleDefaultOpacityFrom:t.rippleDefaultOpacityFrom,rippleExpandableDuration:t.rippleExpandableDuration,rippleExpandableOpacityFrom:t.rippleExpandableOpacityFrom,rippleEaseCss:t.rippleEaseCss,feedbackExpandDuration:t.feedbackExpandDuration,expandDuration:t.expandDuration,expandOpenEase:t.expandOpenEase,progressFillDuration:t.progressFillDuration,progressFillEase:t.progressFillEase,loadingDotsDuration:t.loadingDotsDuration,loadingDotsEaseUp:t.loadingDotsEaseUp,loadingDotsEaseDown:t.loadingDotsEaseDown,enableHoverLift:t.enableHoverLift,enablePressSqueeze:t.enablePressSqueeze,enableToggleButtonFill:t.enableToggleButtonFill,enableRipple:t.enableRipple,enableExpandable:t.enableExpandable,enableToastStack:t.enableToastStack,enableAsyncButtonCrossfade:t.enableAsyncButtonCrossfade,enableContentFade:t.enableContentFade,enableFeedbackExpand:t.enableFeedbackExpand,enableProgressFill:t.enableProgressFill,enableLoadingDots:t.enableLoadingDots});e!==Jp&&(Jp=e,xg({interactiveDuration:t.interactiveDuration,interactiveEase:t.interactiveEase,hoverLiftEase:t.hoverLiftEase,tooltipDuration:t.tooltipDuration,switchThumbDuration:t.switchThumbDuration,switchThumbEase:t.switchThumbEase,selectionFillDuration:t.selectionFillDuration,selectionFillEase:t.selectionFillEase,hoverLiftScale:t.hoverLiftScale,badgeAnchorHoverLiftScale:t.badgeAnchorHoverLiftScale,pressSqueezeScale:[1,t.pressSqueezeMid,1],rippleDefaultDuration:t.rippleDefaultDuration,rippleDefaultOpacityFrom:t.rippleDefaultOpacityFrom,rippleExpandableDuration:t.rippleExpandableDuration,rippleExpandableOpacityFrom:t.rippleExpandableOpacityFrom,rippleEaseCss:t.rippleEaseCss,feedbackExpandDuration:t.feedbackExpandDuration,expandDuration:t.expandDuration,expandOpenEase:t.expandOpenEase,progressFillDuration:t.progressFillDuration,progressFillEase:t.progressFillEase,loadingDotsDuration:t.loadingDotsDuration,loadingDotsEaseUp:t.loadingDotsEaseUp,loadingDotsEaseDown:t.loadingDotsEaseDown,enableHoverLift:t.enableHoverLift,enablePressSqueeze:t.enablePressSqueeze,enableToggleButtonFill:t.enableToggleButtonFill,enableRipple:t.enableRipple,enableExpandable:t.enableExpandable,enableToastStack:t.enableToastStack,enableAsyncButtonCrossfade:t.enableAsyncButtonCrossfade,enableContentFade:t.enableContentFade,enableFeedbackExpand:t.enableFeedbackExpand,enableProgressFill:t.enableProgressFill,enableLoadingDots:t.enableLoadingDots}))}function Ji(t,e=document.documentElement){t.theme==="light"?e.dataset.theme="light":delete e.dataset.theme,e.style.setProperty("--space",`${t.space}rem`),e.style.setProperty("--size",`${t.size}rem`),e.style.setProperty("--radius",`${t.radius}rem`),e.style.setProperty("--border-width",t.borderWidth===0?"0px":`${t.borderWidth}px`),e.style.setProperty("--font-family-sans",t.fontFamily),e.style.setProperty("--font-family-mono",t.fontFamilyMono),S8(e,t.fontWeights),A8(t),_8(e,t.textScale),C8(e,t.theme,t.shadowStrength,t.shadowSize),e.style.setProperty("--toast-scrim-size",String(t.toastScrimSize)),e.style.setProperty("--toast-scrim-density",String(t.toastScrimDensity));for(const[n,r]of Object.entries(Ka))e.style.setProperty(r,t.colors[n])}function fT(t){const e=[":root {",` --space: ${t.space}rem;`,` --size: ${t.size}rem;`,` --radius: ${t.radius}rem;`,` --border-width: ${t.borderWidth===0?"0px":`${t.borderWidth}px`};`,` --font-family-sans: ${t.fontFamily};`,` --font-family-mono: ${t.fontFamilyMono};`,...Object.entries(ia).map(([n,r])=>` ${r}: ${t.fontWeights[n]};`),` --shadow-size: ${t.shadowSize};`,` --toast-scrim-size: ${t.toastScrimSize};`,` --toast-scrim-density: ${t.toastScrimDensity};`,` /* textScale: ${t.textScale} — set --text-scale-* manually or via applyThemeTokens */`,` /* shadowStrength: ${t.shadowStrength}, shadowSize: ${t.shadowSize} */`,` /* toastScrimSize: ${t.toastScrimSize}, toastScrimDensity: ${t.toastScrimDensity} */`];for(const[n,r]of Object.entries(Ka))e.push(` ${r}: ${t.colors[n]};`);return e.push("}"),t.theme==="light"&&(e.push("","/* Optional: light theme via data-attribute */"),e.push('/* <html data-theme="light"> */')),e.join(`
|
|
38
|
-
`)}function
|
|
39
|
-
`)}function
|
|
37
|
+
*/let Jm=typeof document<"u"?l.useLayoutEffect:l.useEffect,ep=t=>t&&!Array.isArray(t)&&typeof t=="object",ni=[],u0={},xg=X;const sa=(t,e=ni)=>{let n=u0;ep(t)?(n=t,t=null,e="dependencies"in n?n.dependencies:ni):ep(e)&&(n=e,e="dependencies"in n?n.dependencies:ni),t&&typeof t!="function"&&console.warn("First parameter must be a function or config object");const{scope:r,revertOnUpdate:o}=n,s=l.useRef(!1),i=l.useRef(xg.context(()=>{},r)),a=l.useRef(u=>i.current.add(null,u)),c=e&&e.length&&!o;return c&&Jm(()=>(s.current=!0,()=>i.current.revert()),ni),Jm(()=>{if(t&&i.current.add(t,r),!c||!s.current)return()=>i.current.revert()},e),{context:i.current,contextSafe:a.current}};sa.register=t=>{xg=t};sa.headless=!0;const d0={interactiveDuration:280,interactiveEase:"power2.out",hoverLiftEase:"sine.inOut",tooltipDuration:200,switchThumbDuration:340,switchThumbEase:"back.out(1.4)",selectionFillEase:"back.out(1.25)",selectionFillDuration:200,hoverLiftScale:1.025,badgeAnchorHoverLiftScale:1.052,pressSqueezeScale:[1,.98,1],rippleDefaultDuration:700,rippleDefaultOpacityFrom:.42,rippleExpandableDuration:700,rippleExpandableOpacityFrom:.34,rippleEaseCss:"cubic-bezier(0.25, 0.55, 0.35, 0.95)",feedbackExpandDuration:720,expandDuration:200,expandOpenEase:"sine.inOut",enableHoverLift:!0,enablePressSqueeze:!0,enableToggleButtonFill:!0,enableRipple:!0,enableExpandable:!0,enableToastStack:!0,enableAsyncButtonCrossfade:!0,enableContentFade:!0,enableFeedbackExpand:!0,progressFillDuration:600,progressFillEase:"power2.out",enableProgressFill:!0,loadingDotsDuration:900,loadingDotsEaseUp:"power2.out",loadingDotsEaseDown:"power2.in",enableLoadingDots:!0};let Fe={...d0},Cg=0;const Dl=new Set;function f0(t){return Dl.add(t),()=>{Dl.delete(t)}}function tp(){return Cg}function _g(t){Fe={...Fe,...t},Cg+=1;for(const e of Dl)e()}function Se(){return Fe}function ve(){return{duration:Fe.interactiveDuration/1e3,ease:Fe.interactiveEase}}function Ii(){return{duration:Fe.selectionFillDuration/1e3,ease:Fe.selectionFillEase}}function Co(){return{duration:Fe.tooltipDuration/1e3,ease:Fe.interactiveEase}}function m0(){return{duration:Fe.switchThumbDuration/1e3,ease:Fe.switchThumbEase}}function np(){return{duration:Fe.expandDuration/1e3,ease:Fe.expandOpenEase}}function Sg(){return{duration:Fe.tooltipDuration/1e3,ease:Fe.interactiveEase}}function p0(){return{duration:Fe.feedbackExpandDuration/1e3}}function h0(){return{duration:Fe.progressFillDuration/1e3,ease:Fe.progressFillEase}}const g0=3;function b0(){const t=Fe.loadingDotsDuration/1e3;return{cycleSec:t,staggerSec:t/g0,halfCycleSec:t/2,easeUp:Fe.loadingDotsEaseUp,easeDown:Fe.loadingDotsEaseDown,enabled:Fe.enableLoadingDots}}X.registerPlugin(Nr,sa);const al="brn-ripple";let rp="";function iu(){const t=Se().rippleEaseCss;if(rp!==t){const e=/cubic-bezier\(\s*([\d.]+),\s*([\d.]+),\s*([\d.]+),\s*([\d.]+)\s*\)/.exec(t);e?Nr.create(al,`${e[1]},${e[2]},${e[3]},${e[4]}`):Nr.create(al,"0.25,0.55,0.35,0.95"),rp=t}return al}function z(...t){X.killTweensOf(t)}function Ss(t){return typeof window>"u"?"none":getComputedStyle(document.documentElement).getPropertyValue(t).trim()||"none"}const _o=()=>Ss("--shadow-none"),bn=()=>Ss(Cs.base),vg=()=>Ss(Cs.mid),x0=()=>Ss(Cs.large);function C0(t){return t==="none"?_o():Ss(Cs[t])}function vs(t,e){t&&t.style.setProperty("--el-shadow",e)}function ue(){return typeof window>"u"||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}const _0="(max-width: 1024px), (hover: none), (pointer: coarse)";function S0(){return typeof window>"u"||!window.matchMedia?!1:window.matchMedia(_0).matches}function De(){return ue()||S0()||!Se().enableHoverLift}const v0=2.4,y0=.003,T0=1.8,A0=.002;function yg(t){const{width:e,height:n}=t.getBoundingClientRect(),r=Math.max(e,n,1),o=1-Se().pressSqueezeScale[1];return 1-Math.min(Math.max(v0/r,y0),o)}function au(t){return lu(t)}function E0(t){return yg(t)}function lu(t){const{width:e,height:n}=t.getBoundingClientRect(),r=Math.max(e,n,1);return 1+Math.min(Math.max(T0/r,A0),Se().hoverLiftScale-1)}function pt(t,e,n,r){if(De()){e||(z(t),X.set(t,{scale:1}),r&&t.style.setProperty("--el-shadow",r.idle??_o()));return}z(t);const o=e?n!==void 0?n:lu(t):1,s=Se();if(X.to(t,{scale:o,duration:s.interactiveDuration/1e3,ease:s.hoverLiftEase,overwrite:"auto"}),r){const i=r.idle??_o();t.style.setProperty("--el-shadow",e?r.hover:i)}}function Xe(t,e){var p;if(!Se().enablePressSqueeze)return(p=e==null?void 0:e.onReleaseStart)==null||p.call(e),Promise.resolve();z(t);const n=yg(t),r=Se(),o=r.interactiveDuration*1.15/1e3,s=o*.3,i=!De(),a=!!(e!=null&&e.pointerInside&&i),c=a?(e==null?void 0:e.liftScale)!==void 0?e.liftScale:lu(t):1,u=a?o:o*.5,f=a?r.hoverLiftEase:"sine.inOut",m=e==null?void 0:e.shadow;if(m){const b=m.idle??_o();t.style.setProperty("--el-shadow",a?m.hover:b)}return new Promise(b=>{X.timeline({onComplete:()=>{X.set(t,{scale:c}),b()}}).to(t,{scale:n,duration:s,ease:"power1.out",overwrite:"auto"}).add(()=>{var g;(g=e==null?void 0:e.onReleaseStart)==null||g.call(e)}).to(t,{scale:c,duration:u,ease:f,overwrite:"auto"})})}function L0(t,e){return e==null||!(e instanceof Node)?!0:!t.contains(e)}function Tg(t,e,n,r,o){return l.useEffect(()=>{const s=t.current;return()=>{s&&z(s)}},[t]),l.useMemo(()=>({onPointerOver:a=>{if(!e||a.defaultPrevented)return;const c=a.currentTarget;if(!(a.target instanceof Node)||!c.contains(a.target)||!L0(c,a.relatedTarget)||De())return;const u=t.current;u&&(n&&(n.current=!0),pt(u,!0,r,o))},onPointerOut:a=>{const c=a.currentTarget,u=a.relatedTarget;if(u instanceof Node&&c.contains(u)||(n&&(n.current=!1),!e)||De())return;const f=t.current;f&&pt(f,!1,r,o)}}),[t,e,n,r,o])}const kl="data-gloss-motion-init",nn="will-change-transform origin-center",op={rest:{angle1:-75,angle2:-45,shineX:0,shineY:50},hover:{angle1:-80,angle2:-45,shineX:10,shineY:50},press:{angle1:-75,angle2:-15,shineX:15,shineY:15}},w0=120,R0=.35;function I0(t){const{width:e,height:n}=t.getBoundingClientRect(),r=Math.max(e,n,1);return Math.min(1,Math.max(R0,w0/r))}function N0(t,e){const n=op.rest,r=op[e];if(e==="rest")return r;const o=I0(t);return{angle1:n.angle1+(r.angle1-n.angle1)*o,angle2:n.angle2+(r.angle2-n.angle2)*o,shineX:n.shineX+(r.shineX-n.shineX)*o,shineY:n.shineY+(r.shineY-n.shineY)*o}}function _r(t,e){const n=getComputedStyle(t).getPropertyValue(e).trim();return n||(typeof document>"u"?"":getComputedStyle(document.documentElement).getPropertyValue(e).trim())}function D0(t,e){const n=N0(t,e);return{"--gloss-angle-1":`${n.angle1}deg`,"--gloss-angle-2":`${n.angle2}deg`,"--gloss-shine-x":n.shineX,"--gloss-shine-y":n.shineY}}function k0(t,e){const n=_r(t,"--gloss-inset-top"),r=_r(t,"--gloss-inset-bottom"),o=_r(t,"--gloss-elevation"),s=_r(t,"--gloss-elevation-hover")||o,i=_r(t,"--gloss-inner-glow"),a=_r(t,"--gloss-glow-hover"),c=_r(t,"--gloss-press-inset"),u=`inset 0 0.425em 0.425em ${n}, inset 0 -0.225em 0.225em ${r}`,f=e==="hover"?`0 0.125em 0.3125em -0.1875em ${s}`:e==="press"?`0 0.04em 0.08em -0.0625em ${o}`:`0 0.0625em 0.125em -0.0625em ${o}`,m=e==="hover"?`inset 0 0 0.1em 0.25em ${a}`:`inset 0 0 0.05em 0.1em ${i}`,p=e==="press"?`inset 0 0.25em 0.06em 0 ${c}`:"inset 0 0.25em 0.06em 0 rgb(0 0 0 / 0)";return`${u}, ${f}, ${m}, ${p}`}function So(t,e){return{...D0(t,e),boxShadow:k0(t,e)}}function Ni(t){z(t),X.set(t,{scale:1,...So(t,"rest")})}let ll=null;function Ag(t){if(De()){Ni(t);return}const e=t.matches(":hover")||t.matches(":focus-within");if(z(t),e){X.set(t,{scale:au(t),...So(t,"hover")});return}Ni(t)}function O0(t=document){typeof document>"u"||t.querySelectorAll(`[${kl}]`).forEach(Ag)}function P0(){ll||typeof document>"u"||(ll=new MutationObserver(t=>{for(const e of t)if(e.type==="attributes"&&e.attributeName==="data-theme"){O0();return}}),ll.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}))}function Mt(t,e=!0){return n=>{t.current=n,n&&e&&(P0(),n.hasAttribute(kl)||(n.setAttribute(kl,""),Ni(n)))}}function Io(t,e=!0){const n=l.useRef(null),r=l.useMemo(()=>Mt(n,e),[e]);return l.useCallback(o=>{r(o),n.current=o,typeof t=="function"?t(o):t&&(t.current=o)},[r,t])}function vo(t,e,n){if(De()){e||(z(t),X.set(t,{scale:1,...So(t,"rest")}));return}z(t);const r=Se(),o=e?"hover":"rest",s=e?n!==void 0?n:au(t):1;X.to(t,{scale:s,...So(t,o),duration:r.interactiveDuration/1e3,ease:r.hoverLiftEase,overwrite:"auto"})}function No(t,e=!1,n,r){if(ue())return Promise.resolve();const o=Se();if(!o.enablePressSqueeze)return r==null||r(),De()||vo(t,e,n),Promise.resolve();z(t);const s=E0(t),i=o.interactiveDuration*1.15/1e3,a=i*.3,c=i*1,u=!De(),f=e&&u,m=f?"hover":"rest",p=f?au(t):1;return new Promise(b=>{X.timeline({onComplete:()=>b()}).to(t,{...So(t,"press"),scale:s,duration:a,ease:"power1.out",overwrite:"auto"}).add(()=>{r==null||r()}).to(t,{...So(t,m),scale:p,duration:c,ease:o.hoverLiftEase,overwrite:"auto"})})}function B0(t,e){return e==null||!(e instanceof Node)?!0:!t.contains(e)}function Do(t,e,n){const r=n==null?void 0:n.liftScale,o=n==null?void 0:n.pointerInsideRef;return l.useLayoutEffect(()=>{if(!e)return;const s=t.current;s&&Ni(s)},[e,t]),l.useEffect(()=>{const s=t.current;return()=>{s&&z(s)}},[t]),l.useMemo(()=>({onPointerOver:a=>{if(!e||a.defaultPrevented)return;const c=a.currentTarget;if(!(a.target instanceof Node)||!c.contains(a.target)||!B0(c,a.relatedTarget)||De())return;const u=t.current;u&&(o&&(o.current=!0),vo(u,!0,r))},onPointerOut:a=>{const c=a.currentTarget,u=a.relatedTarget;if(u instanceof Node&&c.contains(u)||(o&&(o.current=!1),!e||De()))return;const f=t.current;f&&vo(f,!1,r)}}),[e,r,o,t])}function ko(t,e){const n=l.useRef(!1),r=l.useRef(!1),o=l.useRef(!1),s=l.useMemo(()=>Mt(t,e),[t,e]),i=l.useCallback(()=>{const b=t.current;if(!b||!e||De())return;const g=n.current||r.current;vo(b,g)},[e,t]),a=Do(t,e,{pointerInsideRef:n});l.useLayoutEffect(()=>{if(!e)return;const b=t.current;if(!b||typeof ResizeObserver>"u")return;const g=new ResizeObserver(()=>{Ag(b)});return g.observe(b),()=>g.disconnect()},[e,t]);const c=l.useCallback(b=>{a.onPointerOver(b),r.current&&i()},[a,i]),u=l.useCallback(b=>{a.onPointerOut(b),r.current&&i()},[a,i]),f=l.useCallback(()=>{e&&(r.current=!0,!(o.current||n.current)&&i())},[e,i]),m=l.useCallback(b=>{if(!e)return;const g=t.current;g&&b.relatedTarget instanceof Node&&g.contains(b.relatedTarget)||(r.current=!1,i())},[e,t,i]),p=l.useCallback(()=>{if(!e)return;const b=t.current;!b||ue()||(n.current=!0,o.current=!0,No(b,!0).finally(()=>{o.current=!1}))},[e,t]);return{bindShellRef:s,shellHoverMotionClass:e?nn:"",onShellPointerEnter:c,onShellPointerLeave:u,onShellFocusIn:f,onShellFocusOut:m,onShellPointerDown:p}}const ir="animate-shadow will-change-transform origin-center";function Eg(){return{hover:bn()}}function cu(){return{idle:bn(),hover:vg()}}function uu(t,e,n=bn,r){l.useLayoutEffect(()=>{e&&vs(t.current,n())},[e,t,n,r])}function Oo(t,e,n){const r=l.useMemo(()=>cu(),[]),o=(n==null?void 0:n.resolveIdle)??bn;l.useLayoutEffect(()=>{e&&vs(t.current,o())},[e,t,o,n==null?void 0:n.idleSyncKey]);const s=l.useCallback(a=>{if(!e||a.defaultPrevented)return;const c=t.current;!c||De()||pt(c,!0,n==null?void 0:n.liftScale,r)},[e,n==null?void 0:n.liftScale,r,t]),i=l.useCallback(a=>{if(!e)return;const c=t.current;!c||De()||pt(c,!1,n==null?void 0:n.liftScale,r)},[e,n==null?void 0:n.liftScale,r,t]);return{motionClass:e?ir:"",shadow:r,onPointerEnter:s,onPointerLeave:i}}function du(t,e,n){const r=l.useMemo(()=>cu(),[]),o=(n==null?void 0:n.resolveIdle)??bn;l.useLayoutEffect(()=>{e&&vs(t.current,o())},[e,t,o,n==null?void 0:n.idleSyncKey]);const s=Tg(t,e,n==null?void 0:n.pointerInsideRef,n==null?void 0:n.liftScale,r);return{motionClass:e?ir:"",shadow:r,...s}}const j0=["small","base","mid","strong","bold"],ia={small:"--font-w-small",base:"--font-w-base",mid:"--font-w-mid",strong:"--font-w-strong",bold:"--font-w-bold"},Lg={small:400,base:500,mid:600,strong:700,bold:800};function M0(t){return`var(--font-w-${t})`}const F0=["--border-width","--color-background","--color-surface","--color-border","--color-foreground","--color-muted","--color-primary","--color-primary-foreground","--color-primary-hover","--color-default-hover","--color-primary-tint","--color-primary-tint-strong","--color-indicator","--color-indicator-foreground","--color-secondary","--color-secondary-foreground","--color-secondary-hover","--color-tertiary","--color-tertiary-foreground","--color-tertiary-hover","--color-focus-ring","--color-converge-ripple-primary-fill","--color-converge-ripple-neutral","--color-converge-ripple-neutral-muted","--color-converge-ripple-danger","--color-converge-ripple-info","--color-converge-ripple-success","--color-converge-ripple-warning","--color-danger","--color-danger-fill-hover","--color-danger-foreground","--color-success","--color-success-foreground","--color-success-fill-hover","--color-info","--color-info-foreground","--color-info-fill-hover","--color-warning","--color-warning-foreground","--color-warning-fill-hover","--color-surface-tint-danger","--color-surface-tint-success","--color-surface-tint-info","--color-surface-tint-warning","--color-surface-tint-danger-hover","--color-surface-tint-success-hover","--color-surface-tint-info-hover","--color-surface-tint-warning-hover","--font-family-sans","--font-family-mono","--font-w-small","--font-w-base","--font-w-mid","--font-w-strong","--font-w-bold","--space","--space-xsmall","--space-small","--space-base","--space-plus","--space-mid","--space-large","--space-xlarge","--size","--size-scale-xsmall","--size-scale-small","--size-scale-base","--size-scale-plus","--size-scale-mid","--size-scale-large","--size-scale-xlarge","--selection-indicator-small","--selection-indicator-base","--selection-indicator-mid","--selection-indicator-large","--radius","--radius-value-xsmall","--radius-value-small","--radius-value-base","--radius-value-mid","--radius-value-large","--text-scale-tools","--text-scale-tools--line-height","--text-scale-xsmall","--text-scale-xsmall--line-height","--text-scale-small","--text-scale-small--line-height","--text-scale-base","--text-scale-base--line-height","--text-scale-mid","--text-scale-mid--line-height","--text-scale-large","--text-scale-large--line-height","--text-scale-xlarge","--text-scale-xlarge--line-height","--text-scale-2xlarge","--text-scale-2xlarge--line-height","--text-scale-3xlarge","--text-scale-3xlarge--line-height","--text-accent-header-size","--text-accent-header-line-height","--text-accent-header-weight","--text-header-1-size","--text-header-1-line-height","--text-header-1-weight","--text-header-2-size","--text-header-2-line-height","--text-header-2-weight","--text-large-size","--text-large-line-height","--text-large-weight","--text-base-size","--text-base-line-height","--text-base-weight","--text-small-size","--text-small-line-height","--text-small-weight","--text-mid-size","--text-mid-line-height","--text-mid-weight","--text-tools-size","--text-tools-line-height","--text-tools-weight","--max-component-small","--max-component-base","--max-component-mid","--max-component-large","--button-min-width-small","--button-min-width-base","--button-min-width-mid","--button-min-width-large","--control-height-small","--control-height-base","--control-height-mid","--control-height-large","--avatar-size-small","--avatar-size-base","--avatar-size-mid","--avatar-size-large","--icon-size-xsmall","--icon-size-small","--icon-size-base","--icon-size-mid","--icon-size-large","--icon-size-xlarge","--icon-size-2xlarge","--shadow-size","--shadow-none","--shadow-base","--shadow-mid","--shadow-large","--toast-scrim-size","--toast-scrim-density"];function _e(t){return`var(--color-${t})`}const vr={default:"bg-surface text-foreground border-token",primary:"bg-primary text-primary-foreground border border-transparent",outline:"bg-transparent border-token text-foreground",secondary:"bg-secondary text-secondary-foreground border border-token",ghost:"bg-transparent text-foreground border border-transparent",gloss:""},G0=new Set(["default","primary","outline","secondary","ghost"]),wg={default:{root:vr.default,loaderText:"text-foreground"},primary:{root:vr.primary,loaderText:"text-primary-foreground"},outline:{root:vr.outline,loaderText:"text-foreground"},secondary:{root:vr.secondary,loaderText:"text-secondary-foreground"},ghost:{root:vr.ghost,loaderText:"text-foreground"},gloss:{root:vr.gloss,loaderText:"text-foreground"}},H0={default:"",danger:"gloss-btn-danger",success:"gloss-btn-success",info:"gloss-btn-info",warning:"gloss-btn-warning"},z0={default:"focus-visible:outline-primary",danger:"focus-visible:outline-danger",success:"focus-visible:outline-success",info:"focus-visible:outline-info",warning:"focus-visible:outline-warning"},V0={default:_e("converge-ripple-neutral"),danger:_e("converge-ripple-danger"),success:_e("converge-ripple-success"),info:_e("converge-ripple-info"),warning:_e("converge-ripple-warning")},U0={danger:_e("converge-ripple-danger"),success:_e("converge-ripple-success"),info:_e("converge-ripple-info"),warning:_e("converge-ripple-warning")},$0={small:"[&_svg]:icon-small",base:"[&_svg]:icon-base",mid:"[&_svg]:icon-large",large:"[&_svg]:icon-large"},W0={small:"small",base:"base",mid:"mid",large:"mid"},X0="relative overflow-hidden inline-flex items-center justify-center outline-none focus-ring disabled:pointer-events-none",Y0="pointer-events-none absolute inset-0 z-0 overflow-hidden",K0="relative z-[1] grid w-full min-w-0 place-items-center",q0="origin-center will-change-transform",Z0="col-start-1 row-start-1 inline-flex w-full min-w-0 items-center justify-center gap-xsmall",Q0="inline-flex shrink-0 items-center justify-center",J0="min-w-0 shrink",fu="col-start-1 row-start-1 flex items-center justify-center",eL="text-success",tL="text-danger",nL="animate-spin motion-reduce:animate-none",rL="cursor-pointer",oL="opacity-50";function sL(t,e){const{root:n}=wg[t];return t==="outline"&&e!=="default"?"bg-transparent text-foreground":n}function iL(t){return wg[t].loaderText}function aL(t,e){if(e==="default")switch(t){case"default":return"default";case"primary":return"primary";case"outline":return"default";case"secondary":return"secondary";case"ghost":return"default";case"gloss":return"default"}switch(t){case"default":return`${e}-tint-hover`;case"primary":return`${e}-fill`;case"outline":case"ghost":return e;case"secondary":return"secondary";case"gloss":return"default"}}function lL(t,e){if(e==="default")return"";switch(t){case"default":return I(Gc[e],xt[e]);case"primary":return xh[e];case"outline":return I(Hc[e],xt[e]);case"secondary":return xt[e];case"ghost":return xt[e];case"gloss":return""}}function cL(t,e,n){return n?"":et(aL(t,e))}function uL(t,e){return t==="primary"&&e!=="default"?RA[e]:iL(t)}function dL(t,e){return t==="primary"?e==="default"?_e("converge-ripple-primary-fill"):U0[e]:V0[e]}const fL={small:"h-control-small",base:"h-control-base",mid:"h-control-mid",large:"h-control-large"};function mL(t,e=le[t].minWButton){const n=le[t];return I(e,n.padX,n.padY)}function mu(t,e=!1){const n=le[t];return I(fL[t],e?"min-w-fit":n.minWButton,n.padX,n.padY)}function Rg(t){const e=le[t];return I(e.spinnerIcon,e.spinnerBorder)}function pL(){return"pointer-events-none absolute left-1/2 top-1/2 z-0 rounded-full will-change-[transform,opacity]"}function hL(){return"box-border inline-block rounded-full border-current border-t-transparent"}function gL({groupSegment:t,slotClass:e,className:n}){return I(K0,t&&q0,e,n)}function bL({slotClass:t,className:e,layoutClass:n}){return I(Z0,t,n,e)}function xL(t,e){return I(Q0,$0[t],e)}function CL(t,e){return I(J0,t,e)}function _L(t,e){return I(fu,t,e)}function SL(t){return I(fu,eL,t)}function vL(t){return I(fu,tL,t)}function Ig(){return"shrink-0"}const yL={default:_e("converge-ripple-neutral"),primary:_e("converge-ripple-primary-fill"),outline:_e("converge-ripple-neutral"),secondary:_e("converge-ripple-neutral"),ghost:_e("converge-ripple-neutral"),gloss:_e("converge-ripple-neutral")},TL={danger:_e("converge-ripple-danger"),success:_e("converge-ripple-success"),info:_e("converge-ripple-info"),warning:_e("converge-ripple-warning")};function AL(t,e="default"){return e!=="default"?TL[e]:yL[t]}function EL(t,e,n,r,o){return t?I("gloss-btn",nn,H0[e]):I(sL(n,e),lL(n,e),!r&&ir,cL(n,e,o))}const cl=.12;function LL({id:t,x:e,y:n,size:r,durationMs:o,opacityFrom:s,background:i,direction:a,onDone:c}){const u=l.useRef(null),f=l.useRef(c);return f.current=c,l.useLayoutEffect(()=>{const m=u.current;if(!m)return;let p=!1;z(m);const b=a==="out"?cl:1,g=a==="out"?1:cl,h=X.fromTo(m,{scale:b,autoAlpha:s},{scale:g,autoAlpha:0,duration:o/1e3,ease:iu(),onComplete:()=>{p||f.current(t)}});return()=>{p=!0,h.kill(),z(m)}},[t,e,n,r,o,s,i,a]),d.jsx("span",{ref:u,className:"pointer-events-none absolute z-0 rounded-full",style:{left:e-r/2,top:n-r/2,width:r,height:r,background:i,transformOrigin:"center center",transform:`scale(${a==="out"?cl:1})`},"aria-hidden":!0})}function Ng({ripples:t,tone:e,onDone:n,durationMs:r=Se().rippleDefaultDuration,opacityFrom:o=Se().rippleDefaultOpacityFrom,direction:s="in"}){return d.jsx(d.Fragment,{children:t.map(i=>d.jsx(LL,{...i,background:e,durationMs:r,opacityFrom:o,direction:s,onDone:n},i.id))})}function wL(t,e,n,r){return Math.max(...[[0,0],[n,0],[0,r],[n,r]].map(([s,i])=>Math.hypot(s-t,i-e)))}function pu(t,e,n,r){const o=t.getBoundingClientRect(),s=e-o.left,i=n-o.top,a=wL(s,i,o.width,o.height)*2;return{id:r,x:s,y:i,size:a}}function RL(t,e){const n=t.currentTarget;return n?pu(n,t.clientX,t.clientY,e):null}function Dg(){const t=l.useRef(0),[e,n]=l.useState([]),r=l.useCallback(i=>{n(a=>a.filter(c=>c.id!==i))},[]),o=l.useCallback((i,a,c)=>{const u=++t.current,f=pu(i,a,c,u);n(m=>[...m,f])},[]),s=l.useCallback(i=>{const a=i.currentTarget;a&&o(a,i.clientX,i.clientY)},[o]);return{ripples:e,pushFromPointer:s,pushAtClientCoords:o,dismiss:r}}const hi={primarySolid:_e("converge-ripple-primary-fill"),neutral:_e("converge-ripple-neutral"),neutralMuted:_e("converge-ripple-neutral-muted"),danger:_e("converge-ripple-danger"),success:_e("converge-ripple-success"),info:_e("converge-ripple-info"),warning:_e("converge-ripple-warning")};function IL(t){return t==null||t===""?hi.neutral:Object.hasOwn(hi,t)?hi[t]:t}function NL(t){return t.closest("button,a[href],[role='button']")??t.parentElement}function ys({color:t,disabled:e=!1,duration:n=Se().rippleDefaultDuration,direction:r="out",className:o=""}){const s=l.useRef(null),{ripples:i,pushAtClientCoords:a,dismiss:c}=Dg(),u=IL(t);return l.useLayoutEffect(()=>{const f=s.current;if(!f||e)return;const m=NL(f);if(!m)return;const p=b=>{e||ue()||!Se().enableRipple||b.defaultPrevented||b.pointerType==="mouse"&&b.button!==0||a(m,b.clientX,b.clientY)};return m.addEventListener("pointerdown",p),()=>m.removeEventListener("pointerdown",p)},[e,a]),d.jsx("span",{ref:s,className:I("pointer-events-none absolute inset-0 z-0 overflow-hidden rounded-[inherit]",o),"aria-hidden":!0,children:d.jsx(Ng,{ripples:i,tone:u,onDone:c,durationMs:n,opacityFrom:Se().rippleDefaultOpacityFrom,direction:r})})}function dt(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function aa({isGloss:t,animated:e,enabled:n,hasHoverShadow:r,useContentRef:o=!1,forwardedRef:s,onPointerEnter:i,onPointerLeave:a,onPointerDown:c,onPressReleaseStart:u}){const f=l.useRef(null),m=l.useRef(null),p=l.useRef(!1),b=l.useMemo(()=>Mt(f,t),[t]),g=l.useCallback(y=>{b(y),f.current=y,dt(s,y)},[b,s]),h=l.useCallback(()=>o?m.current:f.current,[o]);l.useEffect(()=>{if(n)return;const y=f.current,S=m.current;p.current=!1,y&&(z(y),y.style.removeProperty("--el-shadow")),S&&(z(S),S.style.transform="")},[n]);const x=l.useMemo(()=>r&&!t?Eg():void 0,[r,t]),C=l.useCallback(y=>{if(i==null||i(y),!e||!n||y.defaultPrevented||De())return;const S=h();S&&(p.current=!0,t&&!o?vo(S,!0):pt(S,!0,void 0,o?void 0:x))},[e,x,n,t,h,i,o]),_=l.useCallback(y=>{if(a==null||a(y),p.current=!1,!e||!n||De())return;const S=h();S&&(t&&!o?vo(S,!1):pt(S,!1,void 0,o?void 0:x))},[e,x,n,t,h,a,o]),v=l.useCallback(y=>{if(c==null||c(y),!e||!n||y.defaultPrevented||ue())return;const S=h();if(S){if(t&&!o){No(S,p.current,void 0,u);return}Xe(S,{pointerInside:p.current,shadow:o?void 0:x,onReleaseStart:u})}},[e,x,n,t,h,c,u,o]);return{setRefs:g,btnRef:f,contentMotionRef:m,hoverPointerInsideRef:p,handlePointerEnter:C,handlePointerLeave:_,handlePointerDown:v}}const kg=new Set(["ButtonContent","ButtonLabel","ButtonIcon","ButtonText","ButtonLoader","ButtonSuccess","ButtonError"]);function Og(t,e){let n=!1;const r=o=>{if(!n)for(const s of l.Children.toArray(o)){if(!l.isValidElement(s))continue;const i=s.type.displayName;if(e(i)){n=!0;return}r(s.props.children)}};return r(t),n}function DL(t){return Og(t,e=>e!=null&&kg.has(e))}function ri(t,e){return Og(t,n=>n===e)}function kL(t){if(t==null||t===!1)return!1;if(typeof t=="string"||typeof t=="number")return!0;const e=l.Children.toArray(t).filter(o=>o!=null);if(e.length!==1)return!1;const n=e[0];if(typeof n=="string"||typeof n=="number")return!0;if(!l.isValidElement(n))return!1;const r=n.type.displayName;return r==null||!kg.has(r)}function OL(t,e,n,r){return Math.max(...[[0,0],[n,0],[0,r],[n,r]].map(([s,i])=>Math.hypot(s-t,i-e)))}function PL(t,e){return 2*OL(t/2,e/2,t,e)}function BL(t,e){switch(e){case"label":return t==="idle";case"loader":return t==="loading";case"success":return t==="success";case"error":return t==="error"}}const sp="data-button-async-layer-init",jL={label:{in:1,out:.92},loader:{in:1,out:.85},success:{in:1,out:.85},error:{in:1,out:.85}};function ML(t,e,n){const r=BL(e,n),{in:o,out:s}=jL[n];X.set(t,{autoAlpha:r?1:0,scale:r?o:s})}function oi(t,e,n){return r=>{t.current=r,r&&!r.hasAttribute(sp)&&(r.setAttribute(sp,""),ML(r,e,n))}}function FL({variant:t,animated:e,asyncState:n,isControlled:r,blocked:o,groupSegment:s,forwardedRef:i,onPointerEnter:a,onPointerLeave:c,onPointerDown:u}){const f=l.useRef(null),m=l.useRef(null),p=l.useRef(null),b=l.useRef(null),g=l.useRef(0),h=l.useRef("idle"),x=l.useRef(void 0),C=l.useRef(!1),[_,v]=l.useState([]),y=l.useRef(n),S=l.useMemo(()=>oi(f,y.current,"label"),[]),A=l.useMemo(()=>oi(m,y.current,"loader"),[]),E=l.useMemo(()=>oi(p,y.current,"success"),[]),T=l.useMemo(()=>oi(b,y.current,"error"),[]),L=l.useCallback(D=>{const P=w.btnRef.current;if(!P)return;const j=P.getBoundingClientRect(),G=PL(j.width,j.height),k=++g.current;v(O=>[...O,{id:k,size:G,tone:D}])},[]),w=aa({isGloss:t==="gloss",animated:e,enabled:!o,hasHoverShadow:G0.has(t),useContentRef:!!s,forwardedRef:i,onPointerEnter:a,onPointerLeave:c,onPointerDown:u});l.useLayoutEffect(()=>{if(!r)return;const D=h.current;(n==="success"||n==="error")&&D==="loading"&&L(n==="success"?"success":"error"),h.current=n},[n,r,L]),l.useLayoutEffect(()=>{const D=f.current,P=m.current,j=p.current,G=b.current;if(!D||!P||!j||!G)return;const k=ue()||!Se().enableAsyncButtonCrossfade,O=ve(),M=[{el:D,active:n==="idle",scaleIn:1,scaleOut:.92},{el:P,active:n==="loading",scaleIn:1,scaleOut:.85},{el:j,active:n==="success",scaleIn:1,scaleOut:.85},{el:G,active:n==="error",scaleIn:1,scaleOut:.85}];if(x.current===void 0){x.current=n;for(const{el:B,active:U,scaleIn:W,scaleOut:F}of M)z(B),X.set(B,{autoAlpha:U?1:0,scale:U?W:F});return}if(x.current!==n){x.current=n;for(const{el:B,active:U,scaleIn:W,scaleOut:F}of M){if(z(B),k){X.set(B,{autoAlpha:U?1:0,scale:U?W:F});continue}X.to(B,{autoAlpha:U?1:0,scale:U?W:F,...O,overwrite:"auto"})}}},[n]);const R=l.useCallback(D=>{v(P=>P.filter(j=>j.id!==D))},[]),N=l.useCallback((D,P,j,G,k,O)=>M=>{D==null||D(M),!(j||!P||M.defaultPrevented)&&(C.current||G!=="idle"||(C.current=!0,k("loading"),Promise.resolve(P(M)).then(B=>{const U=B?"success":"error";k(U),L(U),O()}).catch(()=>{k("error"),L("error"),O()}).finally(()=>{C.current=!1})))},[L]);return{setRefs:w.setRefs,contentMotionRef:w.contentMotionRef,bindLabelRef:S,bindLoaderRef:A,bindSuccessRef:E,bindErrorRef:T,expandRipples:_,dismissExpand:R,pushExpandRipple:L,handlePointerEnter:w.handlePointerEnter,handlePointerLeave:w.handlePointerLeave,handlePointerDown:w.handlePointerDown,createAsyncClickHandler:N,asyncInFlight:C}}const Pg=l.createContext(null),Ol=l.createContext({});function GL({classNames:t,children:e}){const n=l.useContext(Ol),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Ol.Provider,{value:r,children:e})}function Br(){return l.useContext(Ol)}function jr(){return l.useContext(Pg)}function HL({value:t,children:e}){return d.jsx(Pg.Provider,{value:t,children:e})}const zL={"accent-header":"text-accent-header","header-1":"text-header-1","header-2":"text-header-2",large:"text-large",mid:"text-mid",base:"text-base",small:"text-small",tools:"text-tools"},VL={"accent-header":"h1","header-1":"h2","header-2":"h3",large:"p",mid:"p",base:"p",small:"p",tools:"p"},ee=l.forwardRef(function({variant:e,as:n,inheritColor:r,className:o,children:s,...i},a){const c=n??VL[e];return l.createElement(c,{...i,ref:a,className:I(zL[e],!r&&"text-foreground",o)},s)});function UL({className:t}){return d.jsx("span",{className:I(hL(),t),"aria-hidden":!0})}function $L({className:t}){return d.jsx("svg",{className:I(Ig(),t),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:d.jsx("path",{d:"M20 6L9 17l-5-5"})})}function WL({className:t}){return d.jsx("svg",{className:I(Ig(),t),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:d.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})}function XL({size:t,tone:e,onDone:n}){const r=l.useRef(null),o=l.useRef(n);return o.current=n,l.useLayoutEffect(()=>{const s=r.current;if(!s)return;let i=!1;if(z(s),ue()||!Se().enableFeedbackExpand){o.current();return}const c=X.fromTo(s,{scale:0,autoAlpha:.5},{scale:1,autoAlpha:0,...p0(),ease:iu(),overwrite:"auto",onComplete:()=>{i||o.current()}});return()=>{i=!0,c.kill(),z(s)}},[t,e]),d.jsx("span",{ref:r,className:pL(),style:{width:t,height:t,marginLeft:-t/2,marginTop:-t/2,background:e==="success"?"color-mix(in oklab, var(--color-success) 55%, transparent)":"color-mix(in oklab, var(--color-danger) 55%, transparent)",transform:"scale(0)"},"aria-hidden":!0})}const Di=l.forwardRef(function({className:e="",children:n,...r},o){const s=jr(),i=Br();return d.jsx("span",{ref:o??(s==null?void 0:s.contentMotionRef),className:gL({groupSegment:!!(s!=null&&s.groupSegment),slotClass:i.content,className:e}),...r,children:n})});Di.displayName="ButtonContent";const hu=l.forwardRef(function({className:e="",children:n,...r},o){const s=jr(),i=Br();return d.jsx("span",{ref:o??(s==null?void 0:s.bindLabelRef),className:bL({slotClass:i.label,className:e}),...r,children:n})});hu.displayName="ButtonLabel";function gu({className:t="",children:e,...n}){const r=jr(),o=Br(),s=(r==null?void 0:r.size)??"base";return d.jsx("span",{className:xL(s,I(o.icon,t)),"aria-hidden":!0,...n,children:e})}gu.displayName="ButtonIcon";function bu({className:t="",children:e,...n}){const r=jr(),o=Br(),s=(r==null?void 0:r.size)??"base";return d.jsx(ee,{variant:W0[s],as:"span",inheritColor:!0,className:CL(o.text,t),...n,children:e})}bu.displayName="ButtonText";const ki=l.forwardRef(function({className:e="",...n},r){const o=jr(),s=Br(),i=(o==null?void 0:o.size)??"base",a=(o==null?void 0:o.asyncState)??"idle",c=(o==null?void 0:o.loaderTextClass)??"";return d.jsx("span",{ref:r??(o==null?void 0:o.bindLoaderRef),"data-button-async-layer":!0,className:_L(c,I(s.loader,e)),"aria-hidden":a!=="loading",...n,children:d.jsx(UL,{className:I(Rg(i),nL)})})});ki.displayName="ButtonLoader";const Oi=l.forwardRef(function({className:e="",...n},r){const o=jr(),s=Br(),i=(o==null?void 0:o.size)??"base",a=(o==null?void 0:o.asyncState)??"idle",c=le[i];return d.jsx("span",{ref:r??(o==null?void 0:o.bindSuccessRef),"data-button-async-layer":!0,className:SL(I(s.success,e)),"aria-hidden":a!=="success",...n,children:d.jsx($L,{className:c.icon})})});Oi.displayName="ButtonSuccess";const Pi=l.forwardRef(function({className:e="",...n},r){const o=jr(),s=Br(),i=(o==null?void 0:o.size)??"base",a=(o==null?void 0:o.asyncState)??"idle",c=le[i];return d.jsx("span",{ref:r??(o==null?void 0:o.bindErrorRef),"data-button-async-layer":!0,className:vL(I(s.error,e)),"aria-hidden":a!=="error",...n,children:d.jsx(WL,{className:c.icon})})});Pi.displayName="ButtonError";function YL({clipClass:t,expandRipples:e,onDismiss:n}){return d.jsx("span",{className:I(Y0,t),"aria-hidden":!0,children:e.map(r=>d.jsx(XL,{size:r.size,tone:r.tone,onDone:()=>n(r.id)},r.id))})}function KL({leftIcon:t,children:e}){const n=kL(e);return d.jsxs(d.Fragment,{children:[t!=null?d.jsx(gu,{children:t}):null,n?d.jsx(bu,{children:e}):e]})}const Bg=l.createContext(null),jg=l.createContext(null);function qL({value:t,children:e}){return d.jsx(jg.Provider,{value:t,children:e})}function Mg({segment:t,buttonSize:e,variant:n,children:r}){const o=l.useMemo(()=>({segment:t,buttonSize:e,variant:n}),[e,t,n]);return d.jsx(Bg.Provider,{value:o,children:r})}function On(){return l.useContext(Bg)}function Po(){return l.useContext(jg)}const Pl=l.createContext({}),Fg=l.createContext(null),Gg=l.createContext(null);function ZL({classNames:t,children:e}){const r={...l.useContext(Pl),...t};return d.jsx(Pl.Provider,{value:r,children:e})}function QL({shellIds:t,children:e}){return d.jsx(Fg.Provider,{value:t,children:e})}function Mr(){return l.useContext(Pl)}function la(){return l.useContext(Fg)}function xn(){return l.useContext(Gg)}function JL(t){return t==="loading"}function ew({variant:t,status:e="default",size:n,type:r="button",animated:o=!0,asyncState:s,onAsyncStateChange:i,onAsyncClick:a,asyncFeedbackMs:c=2e3,disabled:u,leftIcon:f,ripple:m=!1,iconOnly:p=!1,groupSegment:b,className:g="",classNames:h,children:x,onClick:C}){const _=Po(),v=On(),y=xn(),S=_!=null&&_.segmented?void 0:b??(v==null?void 0:v.segment),A=n??(v==null?void 0:v.buttonSize)??(y==null?void 0:y.size)??"base",E=t??(v==null?void 0:v.variant)??"default",T=!!(u??(y==null?void 0:y.disabled)??(y==null?void 0:y.isSubmitting)),L=E==="gloss",[w,R]=l.useState("idle"),N=s!==void 0,D=N?s:w,P=l.useCallback(re=>{R(re),i==null||i(re)},[i]),j=l.useCallback(()=>{window.setTimeout(()=>{P("idle")},c)},[c,P]),G=D==="loading"||D==="success"||D==="error",k=T||G,O=S?hn(S):"rounded-base",M=S?$r(S):"",B=S?hn(S):"rounded-base",U=DL(x),W=U?void 0:g,F=I(X0,z0[e],mu(A,p),EL(L,e,E,!!S,k),T?oL:"",O,g,M,rL),V=dL(E,e),H=uL(E,e);return{type:r,size:A,variant:E,status:e,animated:o,ripple:m,blocked:k,busy:G,userDisabled:T,isGloss:L,groupSegment:S,clipClass:B,buttonClass:F,convergeRippleColor:V,loaderTextClass:H,asyncState:D,isControlled:N,internalAsync:w,leftIcon:f,children:x,classNames:h,isCompound:U,labelLayoutClass:W,onClick:C,onAsyncClick:a,setUncontrolledAsync:P,scheduleAsyncIdleReset:j,ariaBusy:JL(D)}}const Hg=l.forwardRef(function({className:e,classNames:n,variant:r,status:o,size:s,type:i,animated:a,asyncState:c,onAsyncStateChange:u,onAsyncClick:f,asyncFeedbackMs:m,disabled:p,leftIcon:b,ripple:g,iconOnly:h,groupSegment:x,children:C,onClick:_,onPointerDown:v,onPointerEnter:y,onPointerLeave:S,onMouseDown:A,...E},T){var k;const L=ew({className:e,classNames:n,variant:r,status:o,size:s,type:i,animated:a,asyncState:c,onAsyncStateChange:u,onAsyncClick:f,asyncFeedbackMs:m,disabled:p,leftIcon:b,ripple:g,iconOnly:h,groupSegment:x,children:C,onClick:_}),w=FL({variant:L.variant,animated:L.animated,asyncState:L.asyncState,isControlled:L.isControlled,blocked:L.blocked,groupSegment:L.groupSegment,forwardedRef:T,onPointerEnter:y,onPointerLeave:S,onPointerDown:v}),R=w.createAsyncClickHandler(L.onClick,L.onAsyncClick,L.isControlled,L.internalAsync,L.setUncontrolledAsync,L.scheduleAsyncIdleReset),N={size:L.size,variant:L.variant,status:L.status,asyncState:L.asyncState,groupSegment:L.groupSegment,loaderTextClass:L.loaderTextClass,bindLabelRef:w.bindLabelRef,bindLoaderRef:w.bindLoaderRef,bindSuccessRef:w.bindSuccessRef,bindErrorRef:w.bindErrorRef,contentMotionRef:w.contentMotionRef},D=ri(C,"ButtonContent"),P=ri(C,"ButtonLoader"),j=ri(C,"ButtonSuccess"),G=ri(C,"ButtonError");return d.jsx(HL,{value:N,children:d.jsx(GL,{classNames:L.classNames,children:d.jsxs("button",{ref:w.setRefs,...E,type:L.type,disabled:L.blocked,"aria-busy":L.ariaBusy,className:L.buttonClass,onPointerDown:w.handlePointerDown,onPointerEnter:w.handlePointerEnter,onPointerLeave:w.handlePointerLeave,onMouseDown:A,onClick:R,children:[L.ripple?d.jsx(ys,{color:L.convergeRippleColor,disabled:L.blocked||L.asyncState!=="idle",duration:Se().rippleDefaultDuration,className:L.clipClass}):null,d.jsx(YL,{clipClass:L.clipClass,expandRipples:w.expandRipples,onDismiss:w.dismissExpand}),L.isCompound?D?C:d.jsxs(Di,{children:[C,P?null:d.jsx(ki,{}),j?null:d.jsx(Oi,{}),G?null:d.jsx(Pi,{})]}):d.jsxs(Di,{children:[d.jsx(hu,{className:I((k=L.classNames)==null?void 0:k.label,L.labelLayoutClass),children:d.jsx(KL,{leftIcon:L.leftIcon,children:L.children})}),d.jsx(ki,{}),d.jsx(Oi,{}),d.jsx(Pi,{})]})]})})})});Hg.displayName="ButtonRoot";const yo=Object.assign(Hg,{Content:Di,Label:hu,Icon:gu,Text:bu,Loader:ki,Success:Oi,Error:Pi}),Xt=l.createContext(null),Bl=l.createContext({});function tw({classNames:t,children:e}){const n=l.useContext(Bl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Bl.Provider,{value:r,children:e})}function xu(){return l.useContext(Xt)}function zg(){return l.useContext(Bl)}function Cu(...t){return I(...t)}const nw="inline-flex flex-wrap items-baseline gap-x-xsmall gap-y-0",rw="font-w-mid",ow="text-danger";function sw({className:t,slotClass:e}){return Cu(nw,e,t)}function iw(t){return Cu(rw,t)}function aw(t){return Cu(ow,t)}const lw=!0;function Vg(t){return null}Vg.displayName="Label";function ip({children:t,isRequired:e}){const n=zg();return d.jsxs(d.Fragment,{children:[d.jsx(ee,{as:"span",variant:"base",className:iw(n.text),children:t}),e?d.jsx("span",{className:aw(n.required),"aria-hidden":lw,children:"*"}):null]})}function cw({isRequired:t,htmlFor:e,id:n}){const r=xu();return{htmlFor:e??(r==null?void 0:r.controlId),id:n??(r==null?void 0:r.labelId),isRequired:t??(r==null?void 0:r.isRequired)??!1}}function uw({children:t,className:e,isRequired:n,htmlFor:r,id:o,...s}){const{htmlFor:i,id:a,isRequired:c}=cw({isRequired:n,htmlFor:r,id:o}),u=zg(),f=sw({className:e,slotClass:u.root});if(i!=null)return d.jsx("label",{id:a,htmlFor:i,className:f,...s,children:d.jsx(ip,{isRequired:c,children:t})});const m=s;return d.jsx("span",{id:a,className:f,...m,children:d.jsx(ip,{isRequired:c,children:t})})}function dw({classNames:t,...e}){return d.jsx(tw,{classNames:t,children:d.jsx(uw,{...e})})}const $e=Object.assign(dw,{Slot:Vg}),fw=new Set(["FieldLegend","OptionGroupLegend","RadioGroup.Legend","CheckboxGroup.Legend"]);function Ft(...t){const e=t.filter(Boolean).join(" ");return e.length>0?e:void 0}function Yt(t){return`${t}-hint`}function Kt(t){return`${t}-error`}function Pn(...t){return I(...t)}function mw(t){return t.displayName}function _u(t){if(l.isValidElement(t))return mw(t.type)}function pw(t){if(!l.isValidElement(t))return!1;if(t.type==="legend")return!0;const e=_u(t);return e!=null&&fw.has(e)}function hw(t){return _u(t)==="FieldSetGroup"}function gw(t){return _u(t)==="FieldSetActions"}function bw(t){const e=l.Children.toArray(t),n=e.findIndex(pw);return n===-1?{legend:null,body:e}:{legend:e[n],body:[...e.slice(0,n),...e.slice(n+1)]}}function xw(t){const e=[],n=[];let r=null;for(const o of t)gw(o)?r=o:hw(o)?n.push(o):e.push(o);return{loose:e,groups:n,actions:r}}const jl=l.createContext({});function Cw({classNames:t,children:e}){const n=l.useContext(jl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(jl.Provider,{value:r,children:e})}function Su(){return l.useContext(jl)}const Ml=l.createContext({});function _w({classNames:t,children:e}){const n=l.useContext(Ml),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Ml.Provider,{value:r,children:e})}function Bo(){return l.useContext(Ml)}const Ug=l.createContext("base");function Sw({size:t,children:e}){return d.jsx(Ug.Provider,{value:t,children:e})}function vu(){return l.useContext(Ug)}const vw="flex w-full flex-col gap-xsmall",yw={default:"text-muted",danger:"text-danger",success:"text-success",warning:"text-warning"},Tw="m-0 min-w-0 border-0 p-0 disabled:pointer-events-none disabled:opacity-55",Aw="flex min-w-0 w-full flex-col",Ew="m-0 block w-full max-w-full border-0 p-0",Lw="flex flex-col w-fit",ww="flex min-w-0 w-full flex-col",Rw="flex flex-wrap w-fit items-center",yu={small:{legendGap:"mt-mid",stackGap:"gap-mid",groupGap:"gap-base",actionsGap:"gap-base"},base:{legendGap:"mt-large",stackGap:"gap-large",groupGap:"gap-plus",actionsGap:"gap-plus"},mid:{legendGap:"mt-xlarge",stackGap:"gap-xlarge",groupGap:"gap-mid",actionsGap:"gap-mid"},large:{legendGap:"mt-xlarge",stackGap:"gap-xlarge",groupGap:"gap-large",actionsGap:"gap-large"}};function Iw({status:t,className:e,slotClass:n}){return Pn(yw[t],n,e)}function Nw({size:t,hasLegend:e,slotClass:n}){const r=yu[t];return Pn(Aw,r.stackGap,e&&r.legendGap,n)}function Dw({size:t,className:e,slotClass:n}){return Pn(ww,yu[t].groupGap,n,e)}function kw({size:t,className:e,slotClass:n}){return Pn(Rw,yu[t].actionsGap,n,e)}function Ow({className:t,children:e,...n}){const r=Su();return d.jsx("div",{className:Pn(vw,r.root,t),...n,children:e})}function pn({classNames:t,...e}){return d.jsx(Cw,{classNames:t,children:d.jsx(Ow,{...e})})}function Ye({children:t,className:e,status:n="default",as:r="p",variant:o="small",...s}){const i=Su();return d.jsx(ee,{as:r,variant:o,inheritColor:r==="span",className:Iw({status:n,className:e,slotClass:i.hint}),...s,children:t})}const Pw=$e;function Ze({role:t="alert",className:e,...n}){const r=Su();return d.jsx(Ye,{status:"danger",role:t,className:Pn(r.error,e),...n})}const Ts=l.forwardRef(function({className:e,children:n,...r},o){const s=Bo();return d.jsx("legend",{ref:o,className:Pn(Ew,s.legend,e),...r,children:n})});Ts.displayName="FieldLegend";function ca({children:t,className:e,...n}){const r=Bo();return d.jsx("span",{className:Pn(Lw,r.legendHeader,e),...n,children:t})}const Fr=l.forwardRef(function({className:e,children:n,...r},o){const s=vu(),i=Bo();return d.jsx("div",{ref:o,className:Dw({size:s,className:e,slotClass:i.group}),...r,children:n})});Fr.displayName="FieldSetGroup";const jo=l.forwardRef(function({className:e,children:n,...r},o){const s=vu(),i=Bo();return d.jsx("div",{ref:o,className:kw({size:s,className:e,slotClass:i.actions}),...r,children:n})});jo.displayName="FieldSetActions";function Bw({legend:t,loose:e,groups:n,actions:r}){const o=vu(),s=Bo(),i=[];return n.length>0?i.push(...e,...n):e.length>0&&i.push(d.jsx(Fr,{children:e},"field-set-group")),r!=null&&i.push(r),i.length===0?null:d.jsx("div",{className:Nw({size:o,hasLegend:t!=null,slotClass:s.stack}),children:i})}const $g=l.forwardRef(function({className:e,hintId:n,errorId:r,disabled:o,state:s,...i},a){const c=Bo();return d.jsxs("fieldset",{ref:a,disabled:o,"aria-describedby":Ft(n,r),className:Pn(Tw,c.set,e),...i,children:[s.legend,d.jsx(Bw,{...s})]})});$g.displayName="FieldSetRootInner";function jw(t){const{legend:e,body:n}=bw(t),{loose:r,groups:o,actions:s}=xw(n);return{legend:e,loose:r,groups:o,actions:s}}const Tu=l.forwardRef(function({children:e,className:n,classNames:r,hintId:o,errorId:s,disabled:i,size:a="base",...c},u){const f=jw(e);return d.jsx(Sw,{size:a,children:d.jsx(_w,{classNames:r,children:d.jsx($g,{ref:u,className:n,hintId:o,errorId:s,disabled:i,state:f,...c})})})});Tu.displayName="FieldSet";function Au(t){const e=l.useId();return t??`${e}-hint`}function Eu(t){const e=l.useId();return t??`${e}-error`}const Wg=Object.assign(Tu,{Legend:Ts,LegendHeader:ca,Group:Fr,Actions:jo}),Mw=Object.assign(pn,{Root:pn,Hint:Ye,Label:Pw,Error:Ze,Set:Wg,Legend:Ts,LegendHeader:ca,Group:Fr,Actions:jo});function en(...t){return I(...t)}function Xg(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function Fw(t){const e=[t.value];return t.filterText&&e.push(t.filterText),typeof t.label=="string"&&e.push(t.label),typeof t.hint=="string"&&e.push(t.hint),e.join(" ").toLowerCase()}function Gw(t,e){const n=e.trim().toLowerCase();return n?Fw(t).includes(n):!0}function Yg(t,e){const n=[];for(const r of t)Gw(r,e)&&n.push(r.value);return n}function Hw(t){return new Map(t.map(e=>[e.value,e]))}function zw(t){return t?typeof t.label=="string"?t.label:t.filterText?t.filterText:t.value:""}function Vw({filteredValues:t,activeValue:e,optionsByValue:n,delta:r}){if(t.length===0)return e;const o=e?t.indexOf(e):-1;let s=o<0?0:o;for(let i=0;i<t.length;i+=1){s=(s+r+t.length)%t.length;const a=t[s],c=n.get(a);if(a&&c&&!c.disabled)return a}return e}function Uw(t,e){for(const n of t){const r=e.get(n);if(r&&!r.disabled)return n}return null}function $w(t,e){for(let n=t.length-1;n>=0;n-=1){const r=t[n],o=e.get(r);if(o&&!o.disabled)return r}return null}function Ww(t,e){return t||(e==="danger"||e==="default"?"default":e)}const Xw=[],Kg=l.createContext(null);function Yw({value:t,children:e}){return d.jsx(Kg.Provider,{value:t,children:e})}function As(){const t=l.useContext(Kg);if(!t)throw new Error("ComboBox.* must be inside <ComboBox>.");return t}const qg=l.createContext(null);function Kw({value:t,children:e}){return d.jsx(qg.Provider,{value:t,children:e})}function Zg(){const t=l.useContext(qg);if(!t)throw new Error("ComboBox compound-parts must be inside <ComboBox>.");return t}const Fl=l.createContext({});function qw({classNames:t,children:e}){const n=l.useContext(Fl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Fl.Provider,{value:r,children:e})}function ar(){return l.useContext(Fl)}const Zw="No matches";function Qw(t,e){return`${t}-opt-${e}`}function Jw({ariaLabel:t,ariaLabelledBy:e,label:n}){return{"aria-label":t??(e?void 0:n),"aria-labelledby":e}}const Qg=l.createContext(null);function eR({value:t,children:e}){return d.jsx(Qg.Provider,{value:t,children:e})}function Jg(t){const e=l.useContext(Qg);if(!e)throw new Error(`${t} must be inside <ListBox>.`);return e}const Gl=l.createContext({});function tR({classNames:t,children:e}){const n=l.useContext(Gl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Gl.Provider,{value:r,children:e})}function Cn(){return l.useContext(Gl)}const eb=l.createContext(null);function nR({value:t,children:e}){return d.jsx(eb.Provider,{value:t,children:e})}function rR(){return l.useContext(eb)}const tb=l.createContext(null);function oR({value:t,children:e}){return d.jsx(tb.Provider,{value:t,children:e})}function nb(){const t=l.useContext(tb);if(!t)throw new Error("SelectionIndicator.* parts must be inside <SelectionIndicator>.");return t}const sR={small:"selection-indicator-small",base:"selection-indicator-base",mid:"selection-indicator-mid",large:"selection-indicator-large"},Lu={small:"icon-xsmall",base:"icon-xsmall",mid:"icon-base",large:"icon-mid"},iR="pointer-events-none relative z-[2] inline-flex items-center justify-center";function aR(t){return I("[&_svg]:size-full",Lu[t])}function lR(t){return Lu[t]}const cR={small:"size-[calc(var(--selection-indicator-small)*0.333333)]",base:"size-[calc(var(--selection-indicator-base)*0.333333)]",mid:"size-[calc(var(--selection-indicator-mid)*0.333333)]",large:"size-[calc(var(--selection-indicator-large)*0.333333)]"},uR="shrink-0 rounded-full bg-indicator-foreground",dR="shrink-0 rounded-full bg-foreground",Hl="relative box-border inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full",rb="pointer-events-none absolute inset-px z-[0] flex origin-center items-center justify-center rounded-[inherit]",fR="bg-indicator text-indicator-foreground",mR="bg-secondary text-secondary-foreground",pR="pointer-events-none absolute inset-px z-[1] flex origin-center items-center justify-center rounded-[inherit] gloss-indicator-fill text-foreground",hR=I(rb,"z-[1] rounded-[inherit] bg-primary-tint"),gR={small:"--selection-indicator-small",base:"--selection-indicator-base",mid:"--selection-indicator-mid",large:"--selection-indicator-large"},bR={small:1,base:1.125,mid:1.5,large:1.75};function Ut(t,e=16){if(typeof document<"u"){const n=getComputedStyle(document.documentElement).getPropertyValue(gR[t]).trim(),r=/^([\d.]+)rem$/i.exec(n);if(r)return Number.parseFloat(r[1])*e;const o=/^([\d.]+)px$/i.exec(n);if(o)return Number.parseFloat(o[1])}return bR[t]*e}function xR(t){switch(t){case"gloss":case"outline":return dR;case"secondary":return"shrink-0 rounded-full bg-secondary-foreground";default:return uR}}function CR(t){return t!=="outline"}function ob(t){return t==="gloss"?pR:I(rb,t==="secondary"?mR:fR)}function _R(t){switch(t){case"gloss":case"outline":return"text-foreground";case"secondary":return"text-secondary-foreground";default:return"text-indicator-foreground"}}function SR(t,e){return I(Hl,sR[t],e)}function vR(t,e){switch(t){case"base":return"border border-primary bg-surface";case"secondary":return"border-token bg-secondary";case"outline":return"border border-primary bg-surface";case"gloss":return"gloss-indicator border-0"}}const sb="SelectionIndicatorFill",ib="SelectionIndicatorMark";function ul(...t){return I(...t)}function ab(t){return t.type.displayName===sb}function lb(t){return t.type.displayName===ib}function yR({resolvedIcon:t,showCheck:e,showDot:n,size:r,variant:o}){if(t!=null)return t;if(e)return l.createElement(Re.IoCheckmarkSharp,{"aria-hidden":!0,className:"size-full"});if(n)return l.createElement("span",{"aria-hidden":!0,className:I(cR[r],xR(o))})}function TR(t){return l.Children.toArray(t).some(e=>l.isValidElement(e)&&(ab(e)||lb(e)))}function AR(t){const e=l.Children.toArray(t);let n,r;const o=[];for(const s of e){if(l.isValidElement(s)&&ab(s)){n=s;continue}if(l.isValidElement(s)&&lb(s)){r=s;continue}o.push(s)}return{fillSlot:n,markSlot:r,legacyIcon:o.length===0?void 0:o.length===1?o[0]:o}}function ER({shell:t,fill:e,mark:n,classNames:r,className:o}){return{shell:ul(t,r==null?void 0:r.shell,o),fill:ul(e,r==null?void 0:r.fill),mark:ul(n,r==null?void 0:r.mark)}}const LR={transform:"scale(0)",opacity:0},wR={opacity:0},Bi=l.forwardRef(function({className:e,style:n,...r},o){const s=nb();return d.jsx("span",{ref:i=>{s.fillRef.current=i,dt(o,i)},"aria-hidden":!0,className:I(s.fillClassName,e),style:{...LR,...n},...r})});Bi.displayName=sb;const ji=l.forwardRef(function({className:e,children:n,style:r,...o},s){const i=nb(),a=n??i.markContent;return a==null?null:d.jsx("span",{ref:c=>{i.markRef.current=c,dt(s,c)},"aria-hidden":!0,className:I(i.markClassName,e),style:{...wR,...r},...o,children:a})});ji.displayName=ib;function cb(t,e,n){const r=l.useRef(!0),o=ue();l.useLayoutEffect(()=>{const s=e==null?void 0:e.current,i=n==null?void 0:n.current,a=f=>{s&&(s.style.transform=`scale(${f?1:0})`,s.style.opacity=f?"1":"0"),i&&(i.style.opacity=f?"1":"0",i.style.transform="scale(1)")};if(!s&&!i)return;if(o){s&&z(s),i&&z(i),a(t);return}if(r.current){r.current=!1,s&&z(s),i&&z(i),a(t);return}const c={...Ii(),overwrite:"auto"},u={...Ii(),overwrite:"auto"};s&&(z(s),t?X.fromTo(s,{scale:0,autoAlpha:0},{scale:1,autoAlpha:1,...c}):X.to(s,{scale:0,autoAlpha:0,...c})),i&&(z(i),t?X.fromTo(i,{scale:.88,autoAlpha:0},{scale:1,autoAlpha:1,...u}):X.to(i,{scale:.92,autoAlpha:0,...u}))},[t,e,n,o])}function RR({size:t="base",variant:e="base",selected:n,check:r=!1,dot:o=!1,icon:s,children:i,className:a,classNames:c}){const u=l.useRef(null),f=l.useRef(null),{fillSlot:m,markSlot:p,legacyIcon:b}=AR(i),g=TR(i),h=p!=null,x=s??(h?p.props.children:b),C=x!=null,_=r&&!C,y=yR({resolvedIcon:x,showCheck:_,showDot:o&&!C&&!_,size:t,variant:e}),S=h||y!=null,A=CR(e);cb(n,A?u:void 0,S?f:void 0);const E=ER({shell:vR(e),fill:ob(e),mark:I(iR,_&&aR(t),C&&lR(t),_R(e)),classNames:c,className:a}),T=l.useMemo(()=>({fillRef:u,markRef:f,fillClassName:E.fill,markClassName:E.mark,markContent:y}),[E.fill,E.mark,y]);return{shellClassName:SR(t,E.shell),contextValue:T,usesCompound:g,fillSlot:m,markSlot:p,hasMark:S,markContent:y,showsFill:A}}function ub({size:t="base",variant:e="base",selected:n,check:r=!1,dot:o=!1,icon:s,children:i,className:a,classNames:c,...u}){const{shellClassName:f,contextValue:m,usesCompound:p,fillSlot:b,markSlot:g,hasMark:h,markContent:x,showsFill:C}=RR({size:t,variant:e,selected:n,check:r,dot:o,icon:s,children:i,className:a,classNames:c}),_=p?d.jsxs(d.Fragment,{children:[C?b??d.jsx(Bi,{}):null,h?g??d.jsx(ji,{}):null]}):d.jsxs(d.Fragment,{children:[C?d.jsx(Bi,{}):null,h?d.jsx(ji,{children:x}):null]});return d.jsx(oR,{value:m,children:d.jsx("span",{className:f,"aria-hidden":!0,...u,children:_})})}ub.displayName="SelectionIndicator";const Bt=Object.assign(ub,{Fill:Bi,Mark:ji});function wu(t,e,n="right",r){const o=n==="left"?"grid-cols-[minmax(0,1fr)_auto]":"grid-cols-[auto_minmax(0,1fr)]",s=t>=2?"grid-rows-[auto_auto_auto]":t===1?"grid-rows-[auto_auto]":"grid-rows-[auto] items-center";return I("grid",o,s,e,r)}function ua(t="right"){return I("row-start-1 self-center justify-self-start",t==="left"?"col-start-2":"col-start-1")}function da(t="right"){return I("row-start-1 inline-flex min-w-0 max-w-full items-center justify-self-start [width:fit-content]",t==="left"?"col-start-1":"col-start-2")}function fa(t,e="right"){return I(t===2?"row-start-2":"row-start-3","min-w-0 max-w-full justify-self-start [width:fit-content]",e==="left"?"col-start-1":"col-start-2")}function Ru(t){return t?3:2}function db(t,e,n,r){return I("grid w-full min-w-0 text-left",n&&r?"grid-cols-[auto_minmax(0,1fr)_auto]":n?"grid-cols-[auto_minmax(0,1fr)]":r?"grid-cols-[minmax(0,1fr)_auto]":"grid-cols-[minmax(0,1fr)]",t?"grid-rows-[auto_auto] gap-y-xsmall":"grid-rows-[auto] items-center",e)}function IR(){return ua()}function NR(t){return t?da():I("row-start-1 col-start-1 inline-flex min-w-0 max-w-full items-center justify-self-start [width:fit-content]")}function DR(t){return t?fa(2):I("row-start-2 col-start-1 min-w-0 max-w-full justify-self-start [width:fit-content]")}function kR(t){return I("row-start-1 self-center shrink-0 justify-self-end",t?"col-start-3":"col-start-2")}const fb=l.createContext(null);function zl({value:t,children:e}){return d.jsx(fb.Provider,{value:t,children:e})}function Es(t){const e=l.useContext(fb);if(!e)throw new Error(`${t} must be used inside a list item (Dropdown.Item / ListBox.Item).`);return e}function mb({className:t,children:e,...n}){const r=Es("ItemLabel");return d.jsx("span",{ref:o=>{r.enableLabelMotion&&r.labelMotionRef&&(r.labelMotionRef.current=o)},className:I("inline-flex min-w-0 items-center",NR(r.showIndicatorSlot),r.hasHint&&"min-w-0",r.enableLabelMotion&&"origin-center will-change-transform",t),...n,children:d.jsx(ee,{as:"span",variant:"base",inheritColor:!0,className:I("font-w-mid",r.disabled&&"text-muted"),children:e})})}function pb({className:t,children:e,...n}){const r=Es("ItemHint");return d.jsx(ee,{as:"span",variant:"tools",inheritColor:!0,className:I(DR(r.showIndicatorSlot),r.mutedHint||r.disabled?"text-muted":"opacity-80",t),...n,children:e})}function hb({className:t,children:e,...n}){const r=Es("ItemIcon");return d.jsx("span",{className:I("inline-flex items-center [&_svg]:icon-base",kR(r.showIndicatorSlot),r.mutedHint||r.disabled?"text-muted":"opacity-80",t),...n,children:e})}function gb({className:t,children:e,...n}){return d.jsx("span",{className:I("relative inline-flex shrink-0 items-center justify-center",IR(),t),...n,children:e})}const OR=new Set(["ListBoxItemIndicator","DropdownItemIndicator"]),PR=new Set(["ListBoxLabel","DropdownItemLabel","Dropdown.ItemLabel"]),BR=new Set(["ListBoxHint","DropdownItemHint","Dropdown.ItemHint"]),jR=new Set(["ListBoxIcon","DropdownItemIcon","Dropdown.ItemIcon"]);function MR(t){return t.displayName}function bb(t){let e=null,n=null,r=null,o=null;const s=[];for(const i of l.Children.toArray(t)){if(!l.isValidElement(i)){s.push(i);continue}const a=MR(i.type);if(a&&OR.has(a)){e==null&&(e=i);continue}if(a&&PR.has(a)){n==null&&(n=i);continue}if(a&&BR.has(a)){r==null&&(r=i);continue}if(a&&jR.has(a)){o==null&&(o=i);continue}s.push(i)}return{indicator:e,label:n,hint:r,icon:o,rest:s}}function ut(...t){return I(...t)}function FR({slotClassNames:t,classNames:e}){return{shell:ut(t.itemIndicatorShell,e==null?void 0:e.shell,e==null?void 0:e.itemIndicatorShell),fill:ut(t.itemIndicatorFill,e==null?void 0:e.fill,e==null?void 0:e.itemIndicatorFill),mark:ut(t.itemIndicatorMark,e==null?void 0:e.mark,e==null?void 0:e.itemIndicatorMark)}}function ap(t){return t==null?[]:Array.isArray(t)?[...t]:[t]}function GR(t){return bb(t)}function HR({children:t,label:e,hint:n,icon:r,showIndicator:o}){const s=GR(t),i=s.indicator!=null,a=s.hint!=null||n!=null,c=s.icon!=null||r!=null,u=s.label!=null||s.hint!=null||s.icon!=null,f=e!=null||s.label!=null;return{parts:s,hasCompoundIndicator:i,hasHint:a,hasIcon:c,isCompound:u,hasLabel:f,showIndicatorSlot:u?o&&i:o}}function lr({isDisabled:t,enabled:e,textMotionRef:n,hoverLift:r=!1,onPointerEnter:o,onPointerLeave:s,onPointerDown:i}){const a=ue(),c=l.useRef(!1);l.useEffect(()=>{const p=n.current;return()=>{p&&z(p)}},[]),l.useEffect(()=>{const p=n.current;!p||!t||(c.current=!1,z(p),p.style.transform="")},[t,n]);const u=l.useCallback(p=>{if(o==null||o(p),!r||!e||t||p.defaultPrevented||De())return;c.current=!0;const b=n.current;b&&pt(b,!0,Se().hoverLiftScale)},[e,r,t,o,n]),f=l.useCallback(p=>{if(s==null||s(p),!r||(c.current=!1,De()))return;const b=n.current;b&&pt(b,!1,Se().hoverLiftScale)},[r,s,n]),m=l.useCallback(p=>{if(i==null||i(p),p.defaultPrevented||t||!e||a)return;const b=n.current;b&&(r?Xe(b,{pointerInside:c.current,liftScale:Se().hoverLiftScale}):Xe(b))},[e,r,t,i,a,n]);return{handlePointerEnter:u,handlePointerLeave:f,handlePointerDown:m}}function zR(t){return Io(void 0,t)}function VR({disabled:t,hasLabel:e,onPointerDown:n}){const r=l.useRef(null),o=!t&&e,{handlePointerDown:s}=lr({isDisabled:t,enabled:o,textMotionRef:r,onPointerDown:n});return{labelMotionRef:r,enableLabelMotion:o,handlePointerDown:s}}const UR="flex min-h-0 flex-col gap-xsmall text-left outline-none",$R="gloss-panel gloss-deep rounded-mid p-plus text-foreground",WR="flex min-w-0 flex-col gap-xsmall",XR="px-plus text-left",YR="text-muted",KR="my-xsmall h-0 w-full shrink-0 border-t-token",qR="px-mid py-small text-center text-muted",ZR="w-full min-w-0 rounded-mid px-plus py-base text-left outline-none",QR="cursor-pointer text-foreground focus-ring",JR="cursor-not-allowed bg-transparent text-muted opacity-45 hover:bg-transparent",eI="bg-default-hover";function tI({isGloss:t,slotClass:e,className:n}){return ut(UR,t&&$R,e,n)}function nI({slotClass:t,className:e}){return ut(WR,t,e)}function rI({slotClass:t,className:e}){return ut(XR,t,e)}function oI({slotClass:t,className:e}){return ut(YR,t,e)}function sI({slotClass:t,className:e}){return ut(KR,t,e)}function iI({slotClass:t,className:e}){return ut(qR,t,e)}function aI({disabled:t,isActive:e,slotClass:n,className:r}){return ut(ZR,!t&&ut(QR,et()),t&&JR,e&&!t&&eI,n,r)}function lI({children:t,label:e,hint:n,icon:r,value:o,disabled:s=!1}){const{listId:i,selected:a,activeValue:c,showIndicator:u,indicatorMode:f,disabled:m,selectItem:p,setActiveValue:b}=Jg("ListBox.Item"),g=s||!!m,h=a.has(o),x=c===o,C=Qw(i,o),_=HR({children:t,label:e,hint:n,icon:r,showIndicator:u});return{disabled:g,isSelected:h,isActive:x,optionId:C,indicatorMode:f,selectItem:p,setActiveValue:b,..._}}function xb({listId:t,variant:e="default",className:n,ariaLabel:r,ariaLabelledBy:o,children:s,...i}){const a=Cn(),c=e==="gloss",u=zR(c);return d.jsx("div",{ref:u,id:t,role:"listbox","aria-label":r,"aria-labelledby":o,className:tI({isGloss:c,slotClass:a.root,className:n}),...i,children:s})}xb.displayName="ListBox";function Cb({className:t,children:e,...n}){const r=Cn(),[o,s]=l.useState(),i=l.useCallback(a=>{s(a)},[]);return d.jsx(nR,{value:i,children:d.jsx("div",{role:"group","aria-labelledby":o,className:nI({slotClass:r.section,className:t}),...n,children:e})})}Cb.displayName="ListBoxSection";function _b({className:t,children:e,id:n,...r}){const o=l.useId(),s=n??o,i=Cn(),a=rR();return l.useEffect(()=>(a==null||a(s),()=>a==null?void 0:a(void 0)),[s,a]),d.jsx("div",{id:s,className:rI({slotClass:i.header,className:t}),...r,children:d.jsx(ee,{as:"span",variant:"small",className:oI({slotClass:i.headerText}),children:e})})}_b.displayName="ListBoxHeader";function Sb({className:t,...e}){const n=Cn();return d.jsx("div",{role:"presentation","aria-hidden":!0,className:sI({slotClass:n.separator,className:t}),...e})}Sb.displayName="ListBoxSeparator";function vb({className:t,children:e,...n}){const r=Cn();return d.jsx(ee,{as:"p",variant:"base",className:iI({slotClass:r.empty,className:t}),...n,children:e??Zw})}vb.displayName="ListBoxEmpty";const yb=l.forwardRef(function({children:e,className:n,value:r,disabled:o=!1,label:s,hint:i,icon:a,onClick:c,onPointerDown:u,onPointerEnter:f,...m},p){const b=Cn(),{disabled:g,isSelected:h,isActive:x,optionId:C,indicatorMode:_,isCompound:v,hasHint:y,hasIcon:S,hasLabel:A,showIndicatorSlot:E,selectItem:T,setActiveValue:L}=lI({children:e,label:s,hint:i,icon:a,value:r,disabled:o}),{labelMotionRef:w,enableLabelMotion:R,handlePointerDown:N}=VR({disabled:g,hasLabel:A,onPointerDown:u}),D=l.useCallback(k=>{c==null||c(k),!(k.defaultPrevented||g)&&T(r)},[g,c,T,r]),P=l.useCallback(k=>{f==null||f(k),!g&&L(r)},[g,f,L,r]),j={showIndicatorSlot:E,hasHint:y,hasIcon:S,selected:h,indicatorMode:_,disabled:g,mutedHint:g,enableLabelMotion:R,labelMotionRef:w},G=v?d.jsx(d.Fragment,{children:e}):d.jsxs(d.Fragment,{children:[E?d.jsx(ku,{}):null,s!=null?d.jsx(Iu,{children:s}):null,i!=null?d.jsx(Nu,{children:i}):null,a!=null?d.jsx(Du,{children:a}):null]});return d.jsx(zl,{value:j,children:d.jsx("button",{ref:p,type:"button",id:C,role:"option","aria-selected":h,disabled:g,tabIndex:-1,className:ut(aI({disabled:g,isActive:x,slotClass:b.item}),db(y,"gap-x-base",E,S),n),onClick:D,onPointerDown:N,onPointerEnter:P,...m,children:G})})});yb.displayName="ListBoxItem";function Iu({className:t,...e}){const n=Cn();return d.jsx(mb,{className:ut(n.label,t),...e})}Iu.displayName="ListBoxLabel";function Nu({className:t,...e}){const n=Cn();return d.jsx(pb,{className:ut(n.hint,t),...e})}Nu.displayName="ListBoxHint";function Du({className:t,...e}){const n=Cn();return d.jsx(hb,{className:ut(n.icon,t),...e})}Du.displayName="ListBoxIcon";function ku({variant:t="base",size:e="small",check:n,children:r,className:o,classNames:s,...i}){const a=Es("ListBox.ItemIndicator"),c=Cn();if(!a.showIndicatorSlot)return null;const u=n??a.indicatorMode==="multi";return d.jsx(gb,{className:ut(c.itemIndicator,s==null?void 0:s.itemIndicator,o),...i,children:d.jsx(Bt,{variant:t,size:e,selected:a.selected,check:u,classNames:FR({slotClassNames:c,classNames:s}),children:r})})}ku.displayName="ListBoxItemIndicator";function Ou(t,e,n){if(n){const r=[...t],o=r.indexOf(e);return o>=0?r.splice(o,1):r.push(e),r}return t.includes(e)?[]:[e]}function cI({size:t="base",multiple:e=!1,value:n,defaultValue:r,onValueChange:o,selectionIndicator:s=!0,disabled:i=!1,activeValue:a,onActiveValueChange:c,listId:u}){const f=l.useId(),m=u??`listbox-${f}`,p=n!==void 0,[b,g]=l.useState(()=>ap(r)),h=p?ap(n):b,x=l.useMemo(()=>new Set(h),[h]),C=l.useRef(h);C.current=h;const[_,v]=l.useState(null),y=a!==void 0,S=y?a:_,A=l.useCallback(w=>{y||v(w),c==null||c(w)},[y,c]),E=l.useCallback(w=>{p||g(w),o==null||o(e?w:w[0]??"")},[p,e,o]),T=l.useCallback(w=>{const R=Ou(C.current,w,e);C.current=R,E(R)},[e,E]),L=l.useMemo(()=>({listId:m,size:t,multiple:e,selected:x,selectItem:T,activeValue:S,setActiveValue:A,showIndicator:s,indicatorMode:e?"multi":"radio",disabled:i}),[S,i,m,e,T,x,s,A,t]);return{listId:m,contextValue:L}}function Tb({classNames:t,children:e,className:n,size:r,variant:o="default",multiple:s,value:i,defaultValue:a,onValueChange:c,selectionIndicator:u,disabled:f,activeValue:m,onActiveValueChange:p,listId:b,label:g,"aria-label":h,"aria-labelledby":x,...C}){const{listId:_,contextValue:v}=cI({size:r,multiple:s,value:i,defaultValue:a,onValueChange:c,selectionIndicator:u,disabled:f,activeValue:m,onActiveValueChange:p,listId:b}),y=Jw({ariaLabel:h,ariaLabelledBy:x,label:g});return d.jsx(eR,{value:v,children:d.jsx(tR,{classNames:t,children:d.jsx(xb,{listId:_,variant:o,className:n,ariaLabel:y["aria-label"],ariaLabelledBy:y["aria-labelledby"],...C,children:e})})})}Tb.displayName="ListBox";const uI=Object.assign(ku,{Fill:Bt.Fill,Mark:Bt.Mark}),wr=Object.assign(Tb,{Section:Cb,Header:_b,Separator:Sb,Empty:vb,Item:yb,Label:Iu,Hint:Nu,Icon:Du,ItemIndicator:uI}),Ab=l.createContext(null);function dI({value:t,children:e}){return d.jsx(Ab.Provider,{value:t,children:e})}function Ls(t){const e=l.useContext(Ab);if(!e)throw new Error(`${t} must be inside <Popover>.`);return e}const Vl=l.createContext({});function fI({classNames:t,children:e}){const n=l.useContext(Vl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Vl.Provider,{value:r,children:e})}function Gr(){return l.useContext(Vl)}const Eb=l.createContext("bottom");function mI({value:t,children:e}){return d.jsx(Eb.Provider,{value:t,children:e})}function pI(){return l.useContext(Eb)}function hI(t,e){if(t===e)return!0;const n=t==null?void 0:t.displayName;if(typeof e=="string")return n===e;const r=e==null?void 0:e.displayName;return r!=null&&n===r}function ye(t,...e){let n=!1;const r=o=>{if(!n){for(const s of l.Children.toArray(o))if(l.isValidElement(s)){if(e.some(i=>hI(s.type,i))){n=!0;return}r(s.props.children)}}};return r(t),n}function gI(t){return`${t}-label`}function bI(t){return`${t}-hint`}function xI({contentRole:t,labelConnected:e,hintConnected:n,labelId:r,hintId:o}){if(t==="dialog"){if(e&&n)return`${r} ${o}`;if(n)return o}}function CI({contentRole:t,labelConnected:e,labelId:n}){if(t==="dialog"&&e)return n}const Lb="PopoverArrow";function rn(...t){return I(...t)}function Ul(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function lp(t){return t.type.displayName===Lb}function _I(t){const e=l.Children.toArray(t),n=e.find(o=>l.isValidElement(o)&&lp(o)),r=e.filter(o=>!(l.isValidElement(o)&&lp(o)));return{customArrow:n,panelChildren:r}}function SI(t,e,n){const[r,o]=l.useState(e),s=t!==void 0,i=s?t:r,a=l.useCallback(c=>{s||o(c),n==null||n(c)},[s,n]);return[i,a]}function vI({children:t,size:e="base",variant:n="default",side:r="bottom",open:o,defaultOpen:s=!1,onOpenChange:i,anchorRef:a,shouldDismiss:c}){const[u,f]=SI(o,s,i),m=l.useRef(null),p=l.useRef(null),g=`popover-${l.useId()}`,h=gI(g),x=bI(g),C=ye(t,"PopoverLabel"),_=ye(t,"PopoverHint");return l.useEffect(()=>{if(!u)return;const y=S=>{S.key==="Escape"&&f(!1)};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[u,f]),l.useEffect(()=>{if(!u)return;const y=S=>{var T;const A=S.target,E=(a==null?void 0:a.current)??m.current;E!=null&&E.contains(A)||(T=p.current)!=null&&T.contains(A)||c&&!c(A)||f(!1)};return document.addEventListener("pointerdown",y),()=>document.removeEventListener("pointerdown",y)},[a,u,f,c]),{contextValue:l.useMemo(()=>({open:u,setOpen:f,popoverId:g,labelId:h,hintId:x,size:e,variant:n,side:r,labelConnected:C,hintConnected:_,triggerRef:m,anchorRef:a,contentRef:p}),[a,_,x,C,h,u,g,f,r,e,n])}}const Pu="data-theme",wb=`[${Pu}]`;function $l(t){const e=t.getAttribute(Pu);return e==="light"?"light":e?"dark":null}function yI(t){if(typeof document>"u")return!1;if(t){const e=t.closest(wb);if(e)return $l(e)==="light"}return $l(document.documentElement)==="light"}function Mo(t){if(typeof document>"u")return{};const e=(t==null?void 0:t.closest(wb))??document.documentElement;return $l(e)!=="light"?{}:e===document.documentElement?{}:{"data-theme":"light"}}function TI(t){if(typeof document>"u")return[];const e=new Set,n=[],r=o=>{let s=o;for(;s&&!e.has(s);)e.add(s),n.push(s),s=s.parentElement};return t&&r(t),r(document.documentElement),n}function AI(t,e){if(typeof document>"u")return()=>{};const n=new MutationObserver(e);for(const r of TI(t))n.observe(r,{attributes:!0,attributeFilter:[Pu]});return()=>n.disconnect()}function Bu(t){return l.useSyncExternalStore(l.useCallback(e=>AI(t,e),[t]),()=>yI(t),()=>!1)}function EI(t){return t?"current"in t?t.current:t:null}function ju(t,e){const n=EI(e),r=l.useRef(null);if(!t)r.current=null;else if(!n&&r.current===null){const o=typeof document<"u"?document.activeElement:null;r.current=o instanceof HTMLElement?o:null}return n??r.current}function ws({triggerRef:t,openingRef:e,setOpen:n}){if(e.current)return;if(ue()){n(!0);return}const r=t.current;if(!r){n(!0);return}e.current=!0,Xe(r).then(()=>{e.current=!1,n(!0)})}function Rs(){return l.useRef(!1)}const LI=8;function wI(t,e,n,r){return Math.max(r,Math.min(t,n-e-r))}function ma(t,e,n,r,o,s){const i=r==="start"?t:r==="end"?t+e-n:t+e/2-n/2;return wI(i,n,o,s)}function RI(t,e,n,r){return t.top-n-e>=r}function II(t,e,n,r){return t.bottom+n+e<=window.innerHeight-r}function NI(t,e,n,r){return t.left-n-e>=r}function DI(t,e,n,r){return t.right+n+e<=window.innerWidth-r}function kI(t,e,n,r,o){return{left:ma(t.left,t.width,e.width,o,window.innerWidth,r),top:t.top-n-e.height,resolvedSide:"top"}}function OI(t,e,n,r,o){return{left:ma(t.left,t.width,e.width,o,window.innerWidth,r),top:t.bottom+n,resolvedSide:"bottom"}}function PI(t,e,n,r,o){return{left:t.left-n-e.width,top:ma(t.top,t.height,e.height,o,window.innerHeight,r),resolvedSide:"left"}}function BI(t,e,n,r,o){return{left:t.right+n,top:ma(t.top,t.height,e.height,o,window.innerHeight,r),resolvedSide:"right"}}const cp={top:kI,bottom:OI,left:PI,right:BI},jI={top:(t,e,n,r,o)=>RI(t,n,r,o),bottom:(t,e,n,r,o)=>II(t,n,r,o),left:(t,e,n,r,o)=>NI(t,e,r,o),right:(t,e,n,r,o)=>DI(t,e,r,o)},MI={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]};function Rb(t,e,n,r,o){const s=r,i=LI,a=(o==null?void 0:o.align)??"center",c=MI[n];for(const u of c)if(jI[u](t,e.width,e.height,s,i))return cp[u](t,e,s,i,a);return cp[n](t,e,s,i,a)}const Ib={top:"bottom-0 left-1/2 -translate-x-1/2 translate-y-1/2",bottom:"top-0 left-1/2 -translate-x-1/2 -translate-y-1/2",left:"right-0 top-1/2 -translate-y-1/2 translate-x-1/2",right:"left-0 top-1/2 -translate-y-1/2 -translate-x-1/2"},Nb={top:"pb-1",bottom:"pt-1",left:"pr-1",right:"pl-1"},pa=.97;function $t(){return ue()}function Db(){return{opacity:$t()?1:0}}function Mu(t,e,n){t&&(t.style.opacity="1"),e&&(e.style.opacity="1",e.style.visibility="visible",X.set(e,{scale:1,clearProps:"transform"}),n!=null&&n.focusPanel&&e.focus())}function kb({overlay:t,panel:e,vars:n,panelFrom:r={scale:pa},panelTo:o={scale:1}}){z(t,e),X.fromTo(t,{opacity:0},{opacity:1,...n}),X.fromTo(e,r,{...o,...n})}function Ob({overlay:t,panel:e,vars:n,onComplete:r,panelExit:o={autoAlpha:0,scale:pa}}){z(t,e);const s=X.timeline({onComplete:r});return s.to(t,{opacity:0,...n},0),s.to(e,{...o,...n},0),s}function ha(t){t&&(t.style.opacity="",t.style.visibility="",X.set(t,{scale:1,clearProps:"transform"}))}function FI(t){t.style.opacity="1",t.style.visibility="visible"}function ga({surface:t,vars:e,from:n={scale:pa},to:r={scale:1}}){z(t),FI(t),X.fromTo(t,n,{...r,...e})}function ba({surface:t,vars:e,onComplete:n,exit:r={}}){z(t);const o=Number.parseFloat(getComputedStyle(t).opacity),s=Number.isFinite(o)&&o>0?o:1;return X.fromTo(t,{autoAlpha:s},{autoAlpha:0,...r,...e,onComplete:n})}function Fu(t){const e=typeof document<"u"?document.activeElement:null;return!(e instanceof HTMLElement)||e===t||t.contains(e)?null:e}function Gu({dialog:t,focusReturn:e,unmount:n}){t!=null&&t.open&&t.close(),n(),e&&document.contains(e)&&e.focus({preventScroll:!0})}function GI({open:t,side:e,offset:n,align:r,matchAnchorWidth:o,showArrow:s,isGloss:i,forwardedRef:a,contentRef:c,triggerRef:u,anchorRef:f}){const m=l.useRef(null),p=l.useRef(null),b=l.useMemo(()=>Mt(p,i),[i]),[g,h]=l.useState(!1),[x,C]=l.useState(e),_=l.useCallback(y=>{m.current=y,c.current=y,Ul(a)(y)},[c,a]),v=l.useCallback(()=>{const y=(f==null?void 0:f.current)??u.current,S=m.current;if(!y||!S)return;const A=y.getBoundingClientRect();o?S.style.minWidth=`${Math.max(A.width,192)}px`:S.style.minWidth="";const E=Rb(A,S.getBoundingClientRect(),e,n,{align:r});C(E.resolvedSide),S.style.position="fixed",S.style.left=`${E.left}px`,S.style.top=`${E.top}px`,S.style.transform=""},[r,f,o,n,e,u]);return l.useLayoutEffect(()=>{t&&h(!0)},[t]),uu(m,!i,bn),l.useLayoutEffect(()=>{if(!t)return;v();const y=window.requestAnimationFrame(()=>v()),S=()=>v();window.addEventListener("scroll",S,!0),window.addEventListener("resize",S);const A=m.current,E=A&&typeof ResizeObserver<"u"?new ResizeObserver(()=>v()):null;return A&&E&&E.observe(A),()=>{window.cancelAnimationFrame(y),window.removeEventListener("scroll",S,!0),window.removeEventListener("resize",S),E==null||E.disconnect()}},[t,v,s,n,r,o]),l.useLayoutEffect(()=>{if(!g)return;const y=m.current;if(!y)return;const S=$t();let A=!1;if(S)return z(y),t?ha(y):h(!1),()=>{A=!0};if(z(y),t)return ga({surface:y,vars:{...Co(),overwrite:"auto"}}),()=>{A=!0,z(y)};const E=ba({surface:y,vars:{...Co(),overwrite:"auto"},onComplete:()=>{A||h(!1)}});return()=>{A=!0,z(y),E.kill()}},[t,g]),{panelRef:m,setPanelRef:_,bindGlossPanelRef:b,portalMounted:g,resolvedSide:x}}function HI({alignProp:t,matchAnchorWidth:e}){return t??(e?"start":"center")}const Is=6,zI={small:"small",base:"base",mid:"mid",large:"mid"},VI={small:"tools",base:"small",mid:"small",large:"base"},Pb={small:"min-w-[12rem]",base:"min-w-[14rem]",mid:"min-w-[16rem]",large:"min-w-[18rem]"},Bb={small:"max-w-[16rem]",base:"max-w-xs",mid:"max-w-sm",large:"max-w-md"},jb={small:"px-small py-xsmall",base:"px-plus py-base",mid:"px-mid py-plus",large:"px-large py-mid"},Mb={small:"gap-small",base:"gap-base",plus:"gap-plus",mid:"gap-mid"},UI={small:"small",base:"base",mid:"plus",large:"mid"},$I="inline-flex shrink-0 border-0 bg-transparent p-0",WI="pointer-events-auto z-[10000] w-max min-w-0 overflow-visible text-left outline-none will-change-transform",XI="relative overflow-visible",YI="gloss-panel gloss-deep relative z-[1] flex min-w-0 origin-center flex-col overflow-hidden rounded-mid text-foreground",KI="gloss-content flex min-w-0 flex-col",qI="relative z-[1] flex min-w-0 flex-col overflow-hidden rounded-mid border-token bg-surface text-foreground animate-shadow",ZI="pointer-events-none absolute z-0 size-2 rotate-45",QI="border-0 bg-[var(--color-surface)]",JI="border-token bg-surface",eN="flex shrink-0 flex-col gap-xsmall text-left",tN="min-w-0 font-w-mid",nN="min-h-0 min-w-0 text-left";function rN({rootSlot:t,slotClass:e,className:n}){return rn($I,t,e,n)}function oN({resolvedSide:t,showArrow:e,slotClass:n,className:r}){return rn(WI,e&&Nb[t],n,r)}function sN({size:t,unstyled:e,contentGap:n,slotClass:r}){return rn(YI,nn,!e&&Pb[t],!e&&Bb[t],!e&&jb[t],!e&&Mb[n],r)}function iN(t){return rn(KI,t)}function aN({size:t,unstyled:e,contentGap:n,slotClass:r}){return rn(qI,!e&&Pb[t],!e&&Bb[t],!e&&jb[t],!e&&Mb[n],r)}function lN({isGloss:t,arrowSideClass:e,slotClass:n,className:r}){return rn(ZI,t?QI:JI,e,n,r)}function cN({slotClass:t,className:e}){return rn(eN,t,e)}function uN({slotClass:t,className:e}){return rn(tN,t,e)}function dN({slotClass:t,className:e}){return rn(nN,t,e)}function fN(t){return zI[t]}function mN(t){return VI[t]}const Fb=l.forwardRef(function({className:e="",children:n,asChild:r=!0,onClick:o,onPointerDown:s,onKeyDown:i,...a},c){const{open:u,setOpen:f,triggerRef:m,popoverId:p}=Ls("Popover.Trigger"),b=Gr(),g=Rs(),h=l.useCallback(y=>{m.current=y,Ul(c)(y)},[c,m]),x=l.useCallback(y=>{u||g.current||y.button!==0||(y.preventDefault(),ws({triggerRef:m,openingRef:g,setOpen:()=>f(!0)}))},[u,g,m,f]),C=l.useCallback(y=>{o==null||o(y),!y.defaultPrevented&&u&&f(!1)},[o,u,f]),_=l.useCallback(y=>{i==null||i(y),!y.defaultPrevented&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),u?f(!1):g.current||f(!0))},[i,u,g,f]),v=l.Children.count(n)===1&&l.isValidElement(n)?n:null;if(r&&v){const y=v;return l.cloneElement(y,{className:rn(b.root,b.trigger,y.props.className,e),onPointerDown:S=>{var A,E;x(S),(E=(A=y.props).onPointerDown)==null||E.call(A,S),s==null||s(S)},onClick:S=>{var A,E;(E=(A=y.props).onClick)==null||E.call(A,S),C(S)},onKeyDown:S=>{var A,E;(E=(A=y.props).onKeyDown)==null||E.call(A,S),_(S)},"aria-expanded":u,"aria-controls":u?p:void 0,ref:Ul(y.props.ref,h)})}return d.jsx("button",{type:"button",ref:h,className:rN({rootSlot:b.root,slotClass:b.trigger,className:e}),"aria-expanded":u,"aria-controls":u?p:void 0,onPointerDown:y=>{s==null||s(y),x(y)},onClick:C,onKeyDown:_,...a,children:n})});Fb.displayName="PopoverTrigger";function Hu({className:t,...e}){const n=pI(),{variant:r}=Ls("Popover.Arrow"),o=Gr(),s=r==="gloss";return d.jsx("span",{"aria-hidden":!0,className:lN({isGloss:s,arrowSideClass:Ib[n],slotClass:o.arrow,className:t}),...e})}Hu.displayName=Lb;function Gb({className:t,children:e,...n}){const r=Gr();return d.jsx("div",{className:cN({slotClass:r.header,className:t}),...n,children:e})}Gb.displayName="PopoverHeader";const Hb=l.forwardRef(function({className:e,children:n,id:r,...o},s){const{labelId:i,size:a}=Ls("Popover.Label"),c=Gr();return d.jsx(ee,{ref:s,as:"h2",variant:fN(a),id:r??i,className:uN({slotClass:c.label,className:e}),...o,children:n})});Hb.displayName="PopoverLabel";function zb({className:t,children:e,variant:n,...r}){const{hintId:o,size:s}=Ls("Popover.Hint"),i=Gr();return d.jsx(Ye,{as:"p",id:o,variant:n??mN(s),className:rn(i.hint,t),...r,children:e})}zb.displayName="PopoverHint";function Vb({className:t,children:e,...n}){const r=Gr();return d.jsx("div",{className:dN({slotClass:r.body,className:t}),...n,children:e})}Vb.displayName="PopoverBody";const Ub=l.forwardRef(function({className:e="",children:n,showArrow:r=!1,offset:o=Is,gap:s,matchAnchorWidth:i=!1,align:a,unstyled:c=!1,contentRole:u="dialog",...f},m){const{open:p,popoverId:b,size:g,variant:h,side:x,labelConnected:C,hintConnected:_,labelId:v,hintId:y,triggerRef:S,anchorRef:A,contentRef:E}=Ls("Popover.Content"),T=Gr(),L=h==="gloss",w=HI({alignProp:a,matchAnchorWidth:i}),R=s??UI[g],{customArrow:N,panelChildren:D}=_I(n),{setPanelRef:P,bindGlossPanelRef:j,portalMounted:G,resolvedSide:k}=GI({open:p,side:x,offset:o,align:w,matchAnchorWidth:i,showArrow:r,isGloss:L,forwardedRef:m,contentRef:E,triggerRef:S,anchorRef:A});if(!G||typeof document>"u")return null;const O=Mo((A==null?void 0:A.current)??S.current),M=xI({contentRole:u,labelConnected:C,hintConnected:_,labelId:v,hintId:y}),B=CI({contentRole:u,labelConnected:C,labelId:v}),U=d.jsx(mI,{value:k,children:d.jsx("div",{ref:P,...O,id:b,role:u,"aria-modal":u==="dialog"?"false":void 0,"aria-labelledby":B,"aria-describedby":M,"data-side":k,className:oN({resolvedSide:k,showArrow:r,slotClass:T.content,className:e}),...f,children:d.jsxs("div",{className:XI,children:[r?N??d.jsx(Hu,{}):null,L?d.jsx("div",{ref:j,className:sN({size:g,unstyled:c,contentGap:R,slotClass:T.glossPanel}),children:d.jsx("div",{className:iN(T.glossContent),children:D})}):d.jsx("div",{className:aN({size:g,unstyled:c,contentGap:R,slotClass:T.panel}),children:D})]})})});return kr.createPortal(U,document.body)});Ub.displayName="PopoverContent";function $b({children:t,classNames:e,size:n="base",variant:r="default",side:o="bottom",open:s,defaultOpen:i=!1,onOpenChange:a,anchorRef:c,shouldDismiss:u}){const{contextValue:f}=vI({children:t,size:n,variant:r,side:o,open:s,defaultOpen:i,onOpenChange:a,anchorRef:c,shouldDismiss:u});return d.jsx(dI,{value:f,children:d.jsx(fI,{classNames:e,children:t})})}$b.displayName="PopoverRoot";const kt=Object.assign($b,{Trigger:Fb,Content:Ub,Header:Gb,Label:Hb,Hint:zb,Body:Vb,Arrow:Hu}),up="data-chevron-init";function gi(t,e){X.set(t,{rotation:e?180:0})}function pN(t,e){return n=>{t.current=n,n&&!n.hasAttribute(up)&&(n.setAttribute(up,""),gi(n,e))}}function Hr(t,e,n=()=>!0,r){const o=l.useRef(t),s=l.useRef(void 0),i=l.useMemo(()=>pN(e,o.current),[e]);return l.useLayoutEffect(()=>{const a=e.current;if(!a)return;if(r!=null&&r.current){r.current=!1,s.current=t,gi(a,t);return}const c=ue()||!n();if(s.current===void 0){s.current=t,gi(a,t);return}if(s.current!==t){if(s.current=t,z(a),c){gi(a,t);return}X.to(a,{rotation:t?180:0,...ve(),overwrite:"auto"})}},[t,e,n,r]),i}const zu={default:"bg-surface",outline:"bg-transparent",secondary:"bg-secondary"};function hN(t){return t==="secondary"?"secondary":"default"}function Vu(t){return t==="gloss"?"gloss":t==="outline"?"outline":t==="secondary"?"secondary":"default"}function Ns({variant:t,statusTinted:e,statusTintClass:n}){return t==="gloss"?"gloss-control":e?I(n,"border-token"):t==="outline"?"bg-transparent border-token":I(zu[t],"border-token")}const gN={default:"default",danger:"danger-tint-hover",success:"success-tint-hover",warning:"warning-tint-hover"};function zr(t,e="default",n="default"){if(!t)return"";const r=e!=="default"?gN[e]:hN(n);return Ch(r,"focus-within")}const Vr="field-shell-transition motion-reduce:transition-none",Ur="focus-within-ring";function Fo(t,e){const n=Oo(t,e);return{shellHoverMotionClass:n.motionClass,onShellPointerEnter:n.onPointerEnter,onShellPointerLeave:n.onPointerLeave}}function bN(t){return`${t}-label`}function xN(t){return`${t}-listbox`}function CN(t){return{hintId:Yt(t),errorId:Kt(t),labelId:bN(t),listId:xN(t)}}function _N(t,e,n){return e&&n?`${t}-opt-${n}`:void 0}function SN(t){return t?"Close list":"Open list"}function Wb({anchorRef:t,disabled:e,isGloss:n,groupSegment:r,setOpen:o,onOpened:s,openingRef:i,preferStandardSqueeze:a=!1}){if(e||i.current)return;i.current=!0;const c=t.current;if(!c){i.current=!1;return}if(ue()){i.current=!1,o(!0),s==null||s();return}(!a&&n&&r==null?No(c,!0):Xe(c)).then(()=>{i.current=!1,!e&&(o(!0),s==null||s())})}function Xb(){return l.useRef(!1)}const Et="field-control-mobile-no-zoom",vN={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},yN={small:le.small.controlPad,base:le.base.controlPad,mid:le.mid.controlPad,large:le.large.controlPad},TN={small:le.small.chevronIcon,base:le.base.chevronIcon,mid:le.mid.chevronIcon,large:le.large.chevronIcon},AN="relative z-0 flex min-w-0 items-stretch border-1 text-left overflow-hidden motion-reduce:transition-none",EN=`min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted ${Et}`,LN="text-muted",wN="flex shrink-0 origin-center items-center justify-center self-stretch px-small outline-none text-muted hover:text-foreground focus-ring",RN="pointer-events-none",IN="z-[100]",NN="gap-0 p-base",DN="overflow-y-auto overflow-x-hidden",kN="cursor-not-allowed opacity-55 shadow-token-base",ON="cursor-pointer";function PN({variant:t,status:e}){const n=e==="danger"||e==="success"||e==="warning";return Ns({variant:t,statusTinted:n,statusTintClass:n?vN[e]:""})}function BN(t){return t?I(hn(t),$r(t)):"rounded-base"}function jN({variant:t,status:e,disabled:n,groupSegment:r,shellHoverMotionClass:o,className:s,slotClass:i}){const a=t==="gloss";return en(AN,(r==null?void 0:r.orientation)==="horizontal"?"flex-1":"w-full",BN(r),PN({variant:t,status:e}),Vr,Ur,a?"":zr(!n,e,t),o,n?kN:ON,i,s)}function MN({size:t,muted:e,className:n,slotClass:r}){return en(EN,yN[t],e&&LN,Et,r,n)}function FN({disabled:t,className:e,slotClass:n}){return en(wN,t&&RN,n,e)}const Uu=l.forwardRef(function({className:e,children:n,groupSegment:r,onPointerEnter:o,onPointerLeave:s,...i},a){const c=Po(),u=On(),f=ar(),m=As(),{open:p,setOpen:b,disabled:g,variant:h,status:x,size:C,anchorRef:_,listId:v}=m,y=Xb(),S=h==="gloss",A=c!=null&&c.segmented?void 0:r??(u==null?void 0:u.segment),E=Fo(_,!g&&!S&&A==null),T=ko(_,!g&&S&&A==null),L=l.useCallback(N=>{_.current=N,!g&&S&&T.bindShellRef(N)},[_,g,T,S]),w=l.useCallback(()=>{Wb({anchorRef:_,disabled:g,isGloss:S,groupSegment:A,setOpen:b,openingRef:y})},[_,g,A,S,b,y]),R=l.useCallback(N=>{g||p||N.button===0&&w()},[g,p,w]);return d.jsx("div",{ref:Xg(a,L),role:"combobox","aria-expanded":p,"aria-controls":p?v:void 0,"aria-haspopup":"listbox","aria-disabled":g||void 0,onPointerDown:R,onPointerEnter:N=>{o==null||o(N),!N.defaultPrevented&&(S&&A==null?T.onShellPointerEnter(N):E.onShellPointerEnter(N))},onPointerLeave:N=>{s==null||s(N),S&&A==null?T.onShellPointerLeave(N):E.onShellPointerLeave(N)},onFocusCapture:S&&!g&&A==null?T.onShellFocusIn:void 0,onBlurCapture:S&&!g&&A==null?T.onShellFocusOut:void 0,...g&&S?{"data-gloss-disabled":""}:{},className:jN({variant:h,status:x,disabled:g,groupSegment:A,shellHoverMotionClass:S?T.shellHoverMotionClass:E.shellHoverMotionClass,className:e,slotClass:f.inputGroup}),...i,children:n})});Uu.displayName="ComboBoxInputGroup";const $u=l.forwardRef(function({className:e,onKeyDown:n,onChange:r,onBlur:o,...s},i){const a=ar(),c=As(),{comboBoxId:u,open:f,setOpen:m,value:p,setValue:b,filterQuery:g,setFilterQuery:h,listId:x,activeValue:C,setActiveValue:_,inputRef:v,anchorRef:y,options:S,filteredValues:A,disabled:E,placeholder:T,size:L,status:w,isRequired:R,hintConnected:N,errorConnected:D,hintId:P,errorId:j,variant:G,formInputRef:k,formOnBlur:O}=c,M=Xb(),B=l.useRef(null),U=G==="gloss",W=l.useMemo(()=>Hw(S),[S]),F=l.useMemo(()=>W.get(p),[W,p]),V=l.useMemo(()=>zw(F),[F]),H=_N(x,f,C),re=Ft(N?P:void 0,D?j:void 0),me=l.useCallback(()=>{const $=B.current;B.current=null;const se=$??"";h(se);const be=Yg(S,se),Ie=be.indexOf(p);_(Ie>=0?p:be[0]??null),requestAnimationFrame(()=>{const Ae=v.current;if(!Ae)return;Ae.focus();const q=se.length;Ae.setSelectionRange(q,q)})},[v,S,_,h,p]),pe=l.useCallback(()=>{Wb({anchorRef:y,disabled:E,isGloss:U,setOpen:m,onOpened:me,openingRef:M,preferStandardSqueeze:!0})},[y,E,me,U,m,M]),Y=l.useCallback($=>{const se=Vw({filteredValues:A,activeValue:C,optionsByValue:W,delta:$});se&&_(se)},[C,A,W,_]),te=l.useCallback($=>{var be;const se=W.get($);!se||se.disabled||(b($),m(!1),h(""),(be=v.current)==null||be.focus())},[v,W,h,m,b]),de=l.useCallback($=>{r==null||r($),f&&h($.target.value)},[r,f,h]),oe=l.useCallback($=>{if(n==null||n($),!($.defaultPrevented||E)&&!$.nativeEvent.isComposing){if(!f){if($.key==="ArrowDown"||$.key==="ArrowUp"){$.preventDefault(),pe();return}if($.key==="Enter"||$.key===" "){$.preventDefault(),pe();return}$.key.length===1&&!$.ctrlKey&&!$.metaKey&&!$.altKey&&$.key!=="Tab"&&($.preventDefault(),B.current=$.key,pe());return}if($.key==="ArrowDown"){$.preventDefault(),Y(1);return}if($.key==="ArrowUp"){$.preventDefault(),Y(-1);return}if($.key==="Enter"){$.preventDefault(),C&&te(C);return}if($.key==="Home"){$.preventDefault();const se=Uw(A,W);se&&_(se);return}if($.key==="End"){$.preventDefault();const se=$w(A,W);se&&_(se)}}},[C,Y,E,A,n,f,pe,W,te,_]);l.useEffect(()=>{f||h("")},[f,h]);const xe=f?g:V,ne=l.useCallback($=>{o==null||o($),O==null||O()},[O,o]);return d.jsx("input",{ref:Xg(i,v,k),id:u,type:"text","aria-autocomplete":"list","aria-activedescendant":H,"aria-required":R||void 0,"aria-invalid":w==="danger"?!0:void 0,"aria-describedby":re,disabled:E,readOnly:!f,autoComplete:"off",placeholder:T,value:xe,onChange:de,onKeyDown:oe,onBlur:ne,className:MN({size:L,muted:!f&&!F,className:e,slotClass:a.input}),...s})});$u.displayName="ComboBoxInput";const Wu=l.forwardRef(function({className:e,onPointerDown:n,...r},o){const s=ar(),{open:i,setOpen:a,setFilterQuery:c,disabled:u,size:f,inputRef:m}=As(),p=l.useRef(null),b=Hr(i,p),g=l.useCallback(x=>{b(x),typeof o=="function"?o(x):o&&(o.current=x)},[b,o]),h=l.useCallback(x=>{if(n==null||n(x),x.stopPropagation(),!u){if(i){a(!1),c("");return}x.button===0&&(a(!0),requestAnimationFrame(()=>{var C;return(C=m.current)==null?void 0:C.focus()}))}},[u,m,n,i,c,a]);return d.jsx("button",{type:"button",ref:g,tabIndex:-1,disabled:u,"aria-label":SN(i),className:FN({disabled:u,className:e,slotClass:s.trigger}),onPointerDown:h,...r,children:d.jsx(Re.IoChevronDown,{className:en(TN[f],s.triggerIcon),"aria-hidden":!0})})});Wu.displayName="ComboBoxTrigger";function Xu({children:t,className:e,offset:n=Is,...r}){const o=ar(),{open:s,setOpen:i,anchorRef:a,listId:c,labelId:u,labelConnected:f,placeholder:m,menuMaxHeight:p,options:b,filteredValues:g,value:h,setValue:x,activeValue:C,setActiveValue:_,setFilterQuery:v,variant:y}=As(),S=l.useCallback(E=>{const T=Array.isArray(E)?E[0]??"":E;x(T),v(""),i(!1)},[v,i,x]),A=t??(g.length===0?d.jsx(wr.Empty,{}):g.map(E=>{const T=b.find(L=>L.value===E);return d.jsx(wr.Item,{value:E,disabled:T.disabled,label:T.label,hint:T.hint,icon:T.icon},E)}));return d.jsx(kt,{open:s,onOpenChange:i,side:"bottom",anchorRef:a,variant:y==="gloss"?"gloss":"default",children:d.jsx(kt.Content,{matchAnchorWidth:!0,unstyled:!0,contentRole:void 0,offset:n,className:en(IN,o.popover,e),...r,children:d.jsx(kt.Body,{className:en(NN,o.popoverBody),children:d.jsx(wr,{listId:c,"aria-labelledby":f?u:void 0,"aria-label":f?void 0:m,value:h,onValueChange:S,activeValue:C,onActiveValueChange:_,selectionIndicator:!0,className:en(DN,o.listBox),style:{maxHeight:p},children:A})})})})}Xu.displayName="ComboBoxPopover";function Yb({className:t,classNames:e,...n}){const r=ar();return d.jsx($e,{className:t,classNames:{...e,root:en(r.label,e==null?void 0:e.root)},...n})}Yb.displayName="ComboBoxLabel";function Yu({children:t,status:e,className:n,id:r,...o}){const s=Zg(),i=ar(),a=Ww(e,s.status);return d.jsx(Ye,{id:r??s.hintId,status:a,className:en(i.hint,n),...o,children:t})}Yu.displayName="ComboBoxHint";function Ku({children:t,className:e,id:n,...r}){const o=Zg(),s=ar();return d.jsx(Ze,{id:n??o.errorId,className:en(s.error,e),...r,children:t??o.errorMessage})}Ku.displayName="ComboBox.Error";function GN({label:t,hint:e,error:n,labelId:r}){const o=ar();return d.jsxs(d.Fragment,{children:[t!=null?d.jsx($e,{id:r,classNames:{root:o.label},children:t}):null,d.jsxs(Uu,{children:[d.jsx($u,{}),d.jsx(Wu,{})]}),d.jsx(Xu,{}),e!=null?d.jsx(Yu,{children:e}):null,n!=null?d.jsx(Ku,{children:n}):null]})}function cr(...t){return I(...t)}function dl(t){return Object.keys(t).length}function HN(t){return Object.entries(t)}function zN(t,e,n){if(!e.includes("."))return{...t,[e]:n};const r=e.split("."),o={...t};let s=o;for(let i=0;i<r.length-1;i+=1){const a=r[i],c=s[a],u=c!=null&&typeof c=="object"&&!Array.isArray(c)?{...c}:{};s[a]=u,s=u}return s[r[r.length-1]]=n,o}function VN(t){return t==null?!0:typeof t=="string"?t.trim().length===0:Array.isArray(t)?t.length===0:!1}function fl(t,e,n){if(n!=null){if(n.required){const r=typeof n.required=="string"?n.required:"Required field";if(typeof t=="boolean"){if(!t)return r}else if(VN(t))return r}if(typeof t=="string"){if(n.minLength&&t.length<n.minLength.value)return n.minLength.message;if(n.maxLength&&t.length>n.maxLength.value)return n.maxLength.message;if(n.pattern&&!n.pattern.value.test(t))return n.pattern.message}if(n.validate)return n.validate(t,e)}}function Kb(...t){const e={};for(const n of t)n!=null&&Object.assign(e,n);return Object.keys(e).length>0?e:void 0}function UN(t,e){if(t==null||typeof t!="object"||!("target"in t))return t;const n=t.target;if(n instanceof HTMLInputElement)return e==="checkbox"?n.checked:e==="number"?n.value===""?void 0:Number(n.value):n.value}function qb(t){return t?!0:void 0}function $N({descriptionId:t,errorSummaryId:e,hasErrors:n}){const r=[t,n?e:void 0].filter(Boolean);return r.length>0?r.join(" "):void 0}function WN(t){return t<=0?"":t===1?"Fix the error in the form":`Fix ${t} errors in the form`}function XN(){return"Form submitted successfully"}function dp(t,e){const n=Object.keys(e)[0];if(n==null)return;const r=t.get(n);r==null||r.focus()}function Zb({name:t,value:e,onChange:n,disabled:r,readOnly:o,rules:s}){const i=xn(),a=e!==void 0,c=i!=null&&t!=null&&!a,u=l.useRef(null),f=l.useCallback(v=>{u.current=v,c&&t&&i.registerRef(t,v)},[c,i,t]),m=r??(i==null?void 0:i.disabled)??!1,p=o??(i==null?void 0:i.readOnly)??!1,b=c&&t?i.getError(t):void 0,g=l.useMemo(()=>Kb(t?i==null?void 0:i.getFieldRules(t):void 0,s),[i,t,s]),h=c&&t?i.getValue(t):e,x=c?h??"":h,C=l.useCallback(v=>{n==null||n(v),!(!c||!t||!i)&&i.setValue(t,v,{shouldValidate:i.validateMode==="onChange"})},[c,i,t,n]),_=l.useCallback(()=>{!c||!t||!i||(i.setTouched(t,!0),i.validateMode==="onBlur"&&i.validateField(t))},[c,i,t]);return{bound:c,name:t,value:x,setValue:C,onBlur:_,disabled:m||(i==null?void 0:i.isSubmitting),readOnly:p,ref:f,"aria-invalid":qb(b),error:b,rules:g}}function qt(t){return l.Children.toArray(t).some(e=>l.isValidElement(e))}function YN({children:t,label:e,hint:n,error:r,id:o,name:s,isRequired:i=!1,status:a="default",size:c="base",options:u=Xw,value:f,defaultValue:m,onValueChange:p,variant:b,disabled:g=!1,placeholder:h="Select a value",menuMaxHeight:x="min(24rem, 70vh)"}){const C=Zb({name:s,value:f,disabled:g}),_=C.bound,v=C.disabled??g,y=l.useId(),S=On(),A=b??((S==null?void 0:S.variant)!=null?Vu(S.variant):"default"),E=o??`combobox-${y}`,{hintId:T,errorId:L,labelId:w,listId:R}=CN(E),N=qt(t),D=e!=null||N&&ye(t,"Label"),P=n!=null||N&&ye(t,"ComboBoxHint"),j=r!=null||N&&ye(t,"ComboBoxError"),G=f!==void 0||_,[k,O]=l.useState(m??""),M=_?String(C.value??""):G?f??"":k,B=l.useCallback(xe=>{G||O(xe),p==null||p(xe),_&&C.setValue(xe)},[_,C,G,p]),[U,W]=l.useState(!1),[F,V]=l.useState(""),[H,re]=l.useState(null),me=l.useRef(null),pe=l.useRef(null);l.useEffect(()=>{var xe;!U||!H||(xe=document.getElementById(`${R}-opt-${H}`))==null||xe.scrollIntoView({block:"nearest"})},[H,R,U]);const Y=l.useMemo(()=>Yg(u,F),[F,u]),te=l.useMemo(()=>({comboBoxId:E,hintId:T,errorId:L,labelId:w,labelConnected:D,hintConnected:P,errorConnected:j,isRequired:i,status:a,size:c,errorMessage:r}),[E,r,L,j,P,D,T,i,w,c,a]),de=l.useMemo(()=>({...te,open:U,setOpen:W,value:M,setValue:B,filterQuery:F,setFilterQuery:V,listId:R,activeValue:H,setActiveValue:re,anchorRef:me,inputRef:pe,variant:A,disabled:v,placeholder:h,menuMaxHeight:x,options:u,filteredValues:Y,formInputRef:_?C.ref:void 0,formOnBlur:_?C.onBlur:void 0}),[H,v,te,F,Y,_,C,R,x,U,u,h,B,M,A]),oe=l.useMemo(()=>({controlId:E,labelId:w,isRequired:i}),[E,i,w]);return{isCompound:N,label:e,hint:n,error:r,children:t,fieldCtx:te,comboCtx:de,fieldLabelCtx:oe}}function Qb({children:t,label:e,hint:n,error:r,className:o,classNames:s,id:i,isRequired:a,status:c,size:u,options:f,value:m,defaultValue:p,onValueChange:b,variant:g,disabled:h,placeholder:x,menuMaxHeight:C,name:_,...v}){const y=xn(),S=typeof _=="string"?_:void 0,A=S?y==null?void 0:y.getError(S):void 0,E=r??A,T=c==="default"&&A?"danger":c,L=u??(y==null?void 0:y.size)??"base",w=YN({children:t,label:e,hint:n,error:E,id:i,name:_,isRequired:a,status:T,size:L,options:f,value:m,defaultValue:p,onValueChange:b,variant:g,disabled:h,placeholder:x,menuMaxHeight:C});return d.jsx(Kw,{value:w.fieldCtx,children:d.jsx(Yw,{value:w.comboCtx,children:d.jsx(qw,{classNames:s,children:d.jsx(Xt.Provider,{value:w.fieldLabelCtx,children:d.jsx(pn,{className:en(o,s==null?void 0:s.root),...v,children:w.isCompound?t:d.jsx(GN,{label:w.label,hint:w.hint,error:w.error,labelId:w.fieldCtx.labelId})})})})})})}Qb.displayName="ComboBox";const Jb=Object.assign(Qb,{Label:Yb,InputGroup:Uu,Input:$u,Trigger:Wu,Popover:Xu,Hint:Yu,Error:Ku});function Te(...t){return I(...t)}function KN({slotClassNames:t,classNames:e}){return{shell:Te(t.itemIndicatorShell,e==null?void 0:e.shell,e==null?void 0:e.itemIndicatorShell),fill:Te(t.itemIndicatorFill,e==null?void 0:e.fill,e==null?void 0:e.itemIndicatorFill),mark:Te(t.itemIndicatorMark,e==null?void 0:e.mark,e==null?void 0:e.itemIndicatorMark)}}function To(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function fp(t){return t==null?[]:Array.isArray(t)?[...t]:[t]}function qN(t){return bb(t)}const ex=l.createContext(null),Wl=l.createContext({}),tx=l.createContext(!1),nx=l.createContext(null),rx=l.createContext(null);function ZN({value:t,children:e}){return d.jsx(ex.Provider,{value:t,children:e})}function QN({classNames:t,children:e}){const n=l.useContext(Wl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Wl.Provider,{value:r,children:e})}function ox({value:t,children:e}){return d.jsx(tx.Provider,{value:t,children:e})}function JN({value:t,children:e}){return d.jsx(nx.Provider,{value:t,children:e})}function eD({value:t,children:e}){return d.jsx(rx.Provider,{value:t,children:e})}function Ds(){const t=l.useContext(ex);if(!t)throw new Error("Dropdown.* components must be inside <Dropdown>.");return t}function Gt(){return l.useContext(Wl)}function sx(){return l.useContext(tx)}function tD(){return l.useContext(nx)}function ix(){const t=l.useContext(rx);if(!t)throw new Error("DropdownSub.* components must be inside <DropdownSub>.");return t}const qu=l.forwardRef(function({orientation:e="horizontal",className:n="",...r},o){const s=I("box-border shrink-0",e==="horizontal"?"my-xsmall h-0 w-full min-w-0 max-w-full border-t-token":"mx-xsmall min-h-[1.5rem] w-0 self-stretch border-l-token",n);return e==="horizontal"?d.jsx("hr",{ref:o,className:s,...r}):d.jsx("div",{ref:o,role:"separator","aria-orientation":"vertical",className:s,...r})});qu.displayName="Separator";const nD='[role="menuitem"]:not([aria-disabled="true"]), [role="menuitemcheckbox"]:not([disabled]), [role="menuitemradio"]:not([disabled])';function mp(t){return Array.from(t.querySelectorAll(nD)).filter(e=>!e.hasAttribute("disabled"))}function si(t,e){const n=t[e];n&&n.focus()}function rD({open:t,setOpen:e,triggerRef:n,contentRef:r}){l.useLayoutEffect(()=>{var i;if(!t)return;const o=r.current;if(!o)return;(i=mp(o)[0])==null||i.focus()},[r,t]),l.useEffect(()=>{if(!t)return;const o=r.current;if(!o)return;const s=i=>{var f;if(i.key==="Escape"){i.preventDefault(),e(!1),(f=n.current)==null||f.focus();return}const a=mp(o);if(a.length===0)return;const c=document.activeElement,u=c?a.indexOf(c):-1;if(i.key==="ArrowDown"){i.preventDefault(),si(a,u<a.length-1?u+1:0);return}if(i.key==="ArrowUp"){i.preventDefault(),si(a,u>0?u-1:a.length-1);return}if(i.key==="Home"){i.preventDefault(),si(a,0);return}i.key==="End"&&(i.preventDefault(),si(a,a.length-1))};return o.addEventListener("keydown",s),()=>o.removeEventListener("keydown",s)},[r,t,e,n])}function oD({subOpen:t,triggerRef:e,menuTriggerRef:n,subPanelRootsRef:r,popoverVariant:o}){const s=o==="gloss",i=l.useRef(null),[a,c]=l.useState({top:0,left:0,minW:0}),[u,f]=l.useState(t),m=l.useCallback(()=>{const p=e.current;if(!p)return;const b=p.getBoundingClientRect(),g=6,h=Math.max(b.width,160);let x=b.right+g,C=b.top;const _=h;x+_>window.innerWidth-12&&(x=Math.max(12,b.left-_-g));const v=i.current,y=(v==null?void 0:v.offsetHeight)??0;y>0&&C+y>window.innerHeight-8&&(C=Math.max(8,window.innerHeight-y-8)),c({top:C,left:x,minW:h})},[e]);return l.useLayoutEffect(()=>{t&&f(!0)},[t]),l.useLayoutEffect(()=>{t&&m()},[t,m]),l.useEffect(()=>{if(!t)return;const p=()=>m();return window.addEventListener("scroll",p,!0),window.addEventListener("resize",p),()=>{window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}},[t,m]),l.useLayoutEffect(()=>{const p=i.current,b=r.current;if(!(!u||!p))return b.add(p),()=>{b.delete(p)}},[u,r]),l.useLayoutEffect(()=>{if(!u)return;const p=i.current;if(!p)return;const b=$t();let g=!1;if(b)return z(p),t?ha(p):f(!1),()=>{g=!0};if(z(p),t)return ga({surface:p,vars:{...Co(),overwrite:"auto"}}),()=>{g=!0,z(p)};const h=ba({surface:p,vars:{...Co(),overwrite:"auto"},onComplete:()=>{g||f(!1)}});return()=>{g=!0,z(p),h.kill()}},[t,u]),{isGlossPanel:s,panelRef:i,pos:a,portalMounted:u,menuTriggerRef:n}}const sD="relative inline-flex",pp="inline-flex",iD="z-[100]",aD="max-h-[min(24rem,70vh)] gap-xsmall overflow-y-auto overflow-x-hidden p-base text-left outline-none",lD="flex min-w-0 flex-col gap-xsmall text-left",cD="px-base text-left",uD="text-muted",dD="relative min-w-0",fD="flex w-full min-w-0 cursor-pointer items-center gap-base rounded-mid px-base py-small text-left outline-none text-base text-foreground focus-ring",mD="min-w-0 flex-1",pD="shrink-0 text-muted icon-base",hD="fixed z-[110] outline-none will-change-transform",gD="flex max-h-[min(22rem,65vh)] flex-col overflow-y-auto overflow-x-hidden rounded-mid border-token bg-surface p-base text-left shadow-token-mid",bD="gloss-panel gloss-deep flex max-h-[min(22rem,65vh)] min-w-0 origin-center flex-col overflow-hidden rounded-mid text-foreground",xD="gloss-content flex min-h-0 flex-col overflow-y-auto overflow-x-hidden p-base text-left",CD="w-full min-w-0 origin-center rounded-mid px-base py-small text-left no-underline outline-none text-base",_D="cursor-not-allowed bg-transparent text-muted opacity-45 hover:bg-transparent",SD={default:Te("text-foreground",et(),"focus-ring"),danger:Te("text-danger",et("danger"),"focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-danger"),warning:Te("text-warning",et("warning"),"focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-warning"),info:Te("text-info",et("info"),"focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-info"),success:Te("text-success",et("success"),"focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-success")};function vD({variant:t,disabled:e,hasHint:n,showIndicatorSlot:r,hasIcon:o,className:s,slotClass:i}){return Te(CD,db(n,"gap-x-base",r,o),!e&&Te("cursor-pointer",SD[t]),e&&_D,i,s)}function yD({className:t,slotClass:e}){return Te(fD,et(),e,t)}function TD({isGlossPanel:t,subOpen:e,portalMounted:n,className:r,slotClass:o}){return Te(hD,!t&&gD,!e&&n&&"pointer-events-none",o,r)}function AD(t){const[e,n]=l.useState(!1),r=l.useRef(null),o=l.useRef(void 0);l.useEffect(()=>{t||n(!1)},[t]);const s=l.useCallback(()=>{window.clearTimeout(o.current),o.current=void 0},[]),i=l.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(()=>{n(!1)},160)},[]);return{contextValue:l.useMemo(()=>({open:e,setOpen:n,triggerRef:r,scheduleClose:i,cancelClose:s}),[e,i,s])}}const Zu=l.forwardRef(function({children:e,className:n,asChild:r,onClick:o,onPointerDown:s,...i},a){const{open:c,setOpen:u,triggerRef:f,contentId:m}=Ds(),p=Gt(),b=Rs(),g=l.useCallback(x=>{c||b.current||x.button!==0||(x.preventDefault(),ws({triggerRef:f,openingRef:b,setOpen:()=>u(!0)}))},[c,b,f,u]),h=l.useCallback(x=>{o==null||o(x),!x.defaultPrevented&&c&&u(!1)},[o,c,u]);if(r&&l.isValidElement(e)){const x=e;return l.cloneElement(x,{...i,ref:To(a,f,x.props.ref),className:Te(x.props.className,pp,p.trigger,n),onPointerDown:C=>{var _,v;g(C),(v=(_=x.props).onPointerDown)==null||v.call(_,C),s==null||s(C)},onClick:C=>{var _,v;(v=(_=x.props).onClick)==null||v.call(_,C),h(C)},"aria-expanded":c,"aria-haspopup":"menu","aria-controls":c?m:void 0})}return d.jsx("button",{type:"button",ref:To(a,f),className:Te(pp,p.trigger,n),"aria-expanded":c,"aria-haspopup":"menu","aria-controls":c?m:void 0,onPointerDown:x=>{s==null||s(x),g(x)},onClick:h,...i,children:e})});Zu.displayName="Dropdown.Trigger";const Mi=l.forwardRef(function({children:e,className:n,bodyClassName:r,variant:o,...s},i){const{open:a,setOpen:c,triggerRef:u,contentRef:f,contentId:m,subPanelRootsRef:p,popoverVariant:b}=Ds(),g=Gt(),h=o??b,x=l.useCallback(C=>{for(const _ of p.current)if(_.contains(C))return!1;return!0},[p]);return rD({open:a,setOpen:c,triggerRef:u,contentRef:f}),d.jsx(kt,{open:a,onOpenChange:c,side:"bottom",variant:h,anchorRef:u,shouldDismiss:x,children:d.jsx(kt.Content,{ref:To(i,f),matchAnchorWidth:!0,unstyled:!0,contentRole:void 0,offset:Is,id:m,className:Te(iD,g.popover,n),...s,children:d.jsx(kt.Body,{role:"menu",className:Te(aD,g.popoverBody,r),children:e})})})});Mi.displayName="Dropdown.Popover";function Qu({className:t,children:e,selectionIndicator:n,...r}){const o=sx(),s=Gt(),i=n!==void 0?n:o,[a,c]=l.useState(),u=l.useCallback(f=>{c(f)},[]);return d.jsx(ox,{value:i,children:d.jsx(JN,{value:u,children:d.jsx("div",{role:"group","aria-labelledby":a,className:Te(lD,s.group,t),...r,children:e})})})}Qu.displayName="Dropdown.Group";function Ju({className:t,children:e,id:n,...r}){const o=l.useId(),s=n??o,i=tD(),a=Gt();return l.useLayoutEffect(()=>(i==null||i(s),()=>i==null?void 0:i(void 0)),[s,i]),d.jsx("div",{id:s,className:Te(cD,a.label,t),...r,children:d.jsx(ee,{as:"span",variant:"small",className:uD,children:e})})}Ju.displayName="Dropdown.Label";function ed({className:t,...e}){const n=Gt();return d.jsx(qu,{className:Te(n.separator,t),...e})}ed.displayName="Dropdown.Separator";function td({className:t,children:e,...n}){const{open:r}=Ds(),o=Gt(),{contextValue:s}=AD(r);return d.jsx(eD,{value:s,children:d.jsx("div",{className:Te(dD,o.sub,t),...n,children:e})})}td.displayName="Dropdown.Sub";const nd=l.forwardRef(function({className:e,children:n,asChild:r,onPointerEnter:o,onPointerLeave:s,onClick:i,onKeyDown:a,...c},u){const{open:f,setOpen:m,triggerRef:p,scheduleClose:b,cancelClose:g}=ix(),h=Gt(),x=l.useCallback(S=>{o==null||o(S),!S.defaultPrevented&&(g(),m(!0))},[g,o,m]),C=l.useCallback(S=>{s==null||s(S),!S.defaultPrevented&&b()},[s,b]),_=l.useCallback(S=>{i==null||i(S),!S.defaultPrevented&&(g(),m(!0))},[g,i,m]),v=l.useCallback(S=>{a==null||a(S),!S.defaultPrevented&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),g(),m(!0))},[g,a,m]),y=yD({className:e,slotClass:h.subTrigger});if(r&&l.isValidElement(n)){const S=n;return l.cloneElement(S,{...c,ref:To(u,p,S.props.ref),className:Te(S.props.className,y),onPointerEnter:A=>{var E,T;(T=(E=S.props).onPointerEnter)==null||T.call(E,A),x(A)},onPointerLeave:A=>{var E,T;(T=(E=S.props).onPointerLeave)==null||T.call(E,A),C(A)},onClick:A=>{var E,T;(T=(E=S.props).onClick)==null||T.call(E,A),_(A)},onKeyDown:A=>{var E,T;(T=(E=S.props).onKeyDown)==null||T.call(E,A),v(A)},role:"menuitem","aria-expanded":f,"aria-haspopup":"menu"})}return d.jsxs("div",{ref:To(u,p),role:"menuitem",tabIndex:-1,"aria-expanded":f,"aria-haspopup":"menu",className:y,onPointerEnter:x,onPointerLeave:C,onClick:_,onKeyDown:v,...c,children:[d.jsx("span",{className:Te(mD,h.subTriggerLabelWrap),children:n}),d.jsx(Re.IoChevronForward,{className:Te(pD,h.subTriggerChevron),"aria-hidden":!0})]})});nd.displayName="Dropdown.SubTrigger";const rd=l.forwardRef(function({children:e,className:n,style:r,onPointerEnter:o,onPointerLeave:s,...i},a){const{open:c,triggerRef:u,scheduleClose:f,cancelClose:m}=ix(),{subPanelRootsRef:p,triggerRef:b,popoverVariant:g}=Ds(),h=Gt(),x=oD({subOpen:c,triggerRef:u,menuTriggerRef:b,subPanelRootsRef:p,popoverVariant:g}),C=l.useCallback(S=>{o==null||o(S),!S.defaultPrevented&&m()},[m,o]),_=l.useCallback(S=>{s==null||s(S),!S.defaultPrevented&&f()},[s,f]);if(!x.portalMounted)return null;const v=Mo(b.current),y=d.jsx("div",{ref:To(a,x.panelRef),...v,role:"menu",className:TD({isGlossPanel:x.isGlossPanel,subOpen:c,portalMounted:x.portalMounted,className:n,slotClass:h.subContent}),style:{top:x.pos.top,left:x.pos.left,minWidth:x.pos.minW,...r},...i,onPointerEnter:C,onPointerLeave:_,children:x.isGlossPanel?d.jsx("div",{className:Te(bD,h.subContentGlossPanel),children:d.jsx("div",{className:Te(xD,h.subContentGlossContent),children:e})}):e});return typeof document<"u"?kr.createPortal(y,document.body):null});rd.displayName="Dropdown.SubContent";function od({className:t,...e}){const n=Gt();return d.jsx(mb,{className:Te(n.itemLabel,t),...e})}od.displayName="DropdownItemLabel";function sd({className:t,...e}){const n=Gt();return d.jsx(pb,{className:Te(n.itemHint,t),...e})}sd.displayName="DropdownItemHint";function id({className:t,...e}){const n=Gt();return d.jsx(hb,{className:Te(n.itemIcon,t),...e})}id.displayName="DropdownItemIcon";function xa({variant:t="base",size:e="small",check:n,children:r,className:o,classNames:s,...i}){const a=Es("Dropdown.ItemIndicator"),c=Gt();if(!a.showIndicatorSlot)return null;const u=n??a.indicatorMode==="multi";return d.jsx(gb,{className:Te(c.itemIndicator,s==null?void 0:s.itemIndicator,o),...i,children:d.jsx(Bt,{variant:t,size:e,selected:a.selected,check:u,classNames:KN({slotClassNames:c,classNames:s}),children:r})})}xa.displayName="DropdownItemIndicator";const ad=l.forwardRef(function({children:e,className:n,value:r,href:o,disabled:s=!1,selection:i,variant:a="default",onClick:c,onPointerDown:u,...f},m){const{selected:p,selectItem:b,multiple:g,indicatorMode:h,setOpen:x}=Ds(),C=sx(),_=Gt(),v=qN(e),y=v.indicator!=null,S=v.hint!=null,A=v.icon!=null,E=!!o,T=!E&&i!==!1,L=T&&(g||C||y),w=L?h==="multi"?"menuitemcheckbox":"menuitemradio":"menuitem",R=T&&r!=null&&p.has(r),N=l.useCallback(O=>{typeof m=="function"?m(O):m&&(m.current=O)},[m]),D=vD({variant:a,disabled:s,hasHint:S,showIndicatorSlot:L,hasIcon:A,className:n,slotClass:_.item}),P=l.useCallback(O=>{if(u==null||u(O),O.defaultPrevented||s)return;const M=O.currentTarget;!M||ue()||Xe(M)},[s,u]),j=l.useCallback(O=>{if(c==null||c(O),!(O.defaultPrevented||s)){if(!T){x(!1);return}r!=null&&b(r)}},[s,T,c,b,x,r]),G=d.jsxs(d.Fragment,{children:[L&&!y?d.jsx(xa,{}):null,v.indicator,v.label,v.hint,v.icon,v.rest]}),k={showIndicatorSlot:L,hasHint:S,hasIcon:A,selected:R,indicatorMode:h,disabled:s,mutedHint:s||a==="default"};return E?d.jsx(zl,{value:k,children:d.jsx("a",{ref:N,role:w,href:s?void 0:o,tabIndex:-1,"aria-disabled":s||void 0,className:D,onClick:j,onPointerDown:P,...f,children:G})}):d.jsx(zl,{value:k,children:d.jsx("button",{ref:N,type:"button",role:w,disabled:s,tabIndex:-1,"aria-checked":L?R:void 0,className:D,onClick:j,onPointerDown:P,...f,children:G})})});ad.displayName="Dropdown.Item";function ED({open:t,defaultOpen:e=!1,onOpenChange:n,multiple:r=!1,value:o,defaultValue:s,onValueChange:i,closeOnSelect:a,popoverVariant:c="default"}){const u=t!==void 0,[f,m]=l.useState(e),p=u?t:f,b=l.useCallback(N=>{u||m(N),n==null||n(N)},[u,n]),g=o!==void 0,[h,x]=l.useState(()=>fp(s)),C=g?fp(o):h,_=l.useMemo(()=>new Set(C),[C]),v=l.useRef(C);v.current=C;const y=l.useCallback(N=>{g||x(N),i==null||i(r?N:N[0]??"")},[g,r,i]),S=l.useCallback(N=>{const D=Ou(v.current,N,r);v.current=D,y(D),(a??!r)&&b(!1)},[a,r,b,y]),A=l.useRef(null),E=l.useRef(null),T=l.useRef(null);T.current||(T.current=new Set);const L=l.useId(),w=r?"multi":"radio";return{contextValue:l.useMemo(()=>({open:p,setOpen:b,multiple:r,selected:_,selectItem:S,indicatorMode:w,closeOnSelect:a??!r,popoverVariant:c,triggerRef:A,contentRef:E,contentId:L,subPanelRootsRef:T}),[p,b,r,_,S,w,a,c,L,T])}}function ax({children:t,className:e,classNames:n,open:r,defaultOpen:o,onOpenChange:s,multiple:i,value:a,defaultValue:c,onValueChange:u,selectionIndicator:f=!1,closeOnSelect:m,popoverVariant:p,...b}){const{contextValue:g}=ED({open:r,defaultOpen:o,onOpenChange:s,multiple:i,value:a,defaultValue:c,onValueChange:u,closeOnSelect:m,popoverVariant:p});return d.jsx(ZN,{value:g,children:d.jsx(QN,{classNames:n,children:d.jsx(ox,{value:f,children:d.jsx("div",{className:Te(sD,n==null?void 0:n.root,e),...b,children:t})})})})}ax.displayName="Dropdown";const LD=Object.assign(xa,{Fill:Bt.Fill,Mark:Bt.Mark}),Rr=Object.assign(ax,{Trigger:Zu,Popover:Mi,Content:Mi,Group:Qu,Label:Ju,Separator:ed,Item:ad,ItemLabel:od,ItemHint:sd,ItemIcon:id,ItemIndicator:LD,Sub:td,SubTrigger:nd,SubContent:rd});function je(...t){return I(...t)}function wD(t,e){const n=new DataTransfer;e.forEach(r=>n.items.add(r)),t.files=n.files}const ld=l.createContext(null),Xl=l.createContext({});function RD({value:t,children:e}){return d.jsx(ld.Provider,{value:t,children:e})}function ID({classNames:t,children:e}){const n=l.useContext(Xl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Xl.Provider,{value:r,children:e})}function lx(){const t=l.useContext(ld);if(!t)throw new Error("Input compound parts must be used inside <Input>.");return t}function ND(){return l.useContext(ld)}function Bn(){return l.useContext(Xl)}function cd({name:t,value:e,onChange:n,onBlur:r,disabled:o,readOnly:s,type:i,rules:a}){const c=xn(),u=e!==void 0,f=c!=null&&t!=null&&!u,m=l.useRef(null),p=l.useCallback(y=>{m.current=y,f&&t&&c.registerRef(t,y)},[f,c,t]),b=o??(c==null?void 0:c.disabled)??!1,g=s??(c==null?void 0:c.readOnly)??!1,h=f&&t?c.getError(t):void 0,x=l.useMemo(()=>Kb(t?c==null?void 0:c.getFieldRules(t):void 0,a),[c,t,a]),C=f&&t?c.getValue(t):e,_=l.useCallback(y=>{if(n==null||n(y),!f||!t||!c)return;const S=UN(y,i);c.setValue(t,S,{shouldValidate:c.validateMode==="onChange"})},[f,c,t,n,i]),v=l.useCallback(y=>{r==null||r(y),!(!f||!t||!c)&&(c.setTouched(t,!0),c.validateMode==="onBlur"&&c.validateField(t))},[f,c,t,r]);return{bound:f,name:t,value:f&&i==="checkbox"?!!C:f?C??"":C,checked:f&&i==="checkbox"?!!C:void 0,onChange:_,onBlur:v,disabled:b||(c==null?void 0:c.isSubmitting),readOnly:g,ref:p,"aria-invalid":qb(h),error:h,rules:x}}function DD(t,e){return cd({name:t,rules:e})}function kD(t){return z(t),new Promise(e=>{X.to(t,{scale:.94,y:"-0.5rem",autoAlpha:0,...ve(),overwrite:"auto",onComplete:()=>{z(t),e()}})})}function OD({shellRef:t,blocked:e,variant:n,groupSegment:r,onPointerDown:o}){const s=n==="gloss",i=Fo(t,!e&&!s&&r==null),a=ko(t,!e&&s&&r==null),c=l.useCallback(f=>{t.current=f,!e&&s&&a.bindShellRef(f)},[e,a,s,t]),u=l.useCallback(f=>{if(o==null||o(f),f.defaultPrevented||e||s||r!=null)return;const m=t.current;!m||ue()||Xe(m)},[e,r,s,o,t]);return{isGloss:s,setShellRef:c,handleShellPointerDown:u,shellPointerDown:s&&!e?a.onShellPointerDown:u,shellPointerEnter:s&&!e?a.onShellPointerEnter:i.onShellPointerEnter,shellPointerLeave:s&&!e?a.onShellPointerLeave:i.onShellPointerLeave,shellFocusCapture:s&&!e?a.onShellFocusIn:void 0,shellBlurCapture:s&&!e?a.onShellFocusOut:void 0,shellHoverMotionClass:s?a.shellHoverMotionClass:i.shellHoverMotionClass,glossDisabledAttr:e&&s?{"data-gloss-disabled":""}:{}}}const PD="Show password",BD="Hide password",hp="Remove file",cx={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},jD={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},MD="bg-primary-tint",FD="flex items-stretch overflow-hidden",GD="relative",HD=`min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted ${Et}`,zD=`absolute inset-0 cursor-pointer opacity-0 disabled:cursor-not-allowed ${Et}`,VD="pointer-events-none size-12 shrink-0 text-muted",UD="pointer-events-none max-w-[18rem] text-center text-muted",gp="size-9 shrink-0 rounded-base border-token object-cover",$D="flex min-w-0 items-center gap-base",WD="flex h-full min-w-0 flex-1 items-center gap-base",bp="min-w-0 flex-1 truncate",XD="relative z-10 flex size-8 shrink-0 items-center justify-center rounded-base text-danger outline-none",YD="flex self-stretch shrink-0 items-stretch border-l-token",KD="relative z-10 flex h-full items-center justify-center text-muted outline-none hover:text-foreground focus-ring-inset",qD="border-r-token",ZD="border-l-token",QD={small:Rn("small"),base:Rn("base"),mid:Rn("mid"),large:Rn("large")},JD={small:le.small.controlPad,base:le.base.controlPad,mid:le.mid.controlPad,large:le.large.controlPad},ux={small:{icon:"icon-small",pad:"px-xsmall"},base:{icon:"icon-base",pad:"px-small"},mid:{icon:"icon-mid",pad:"px-base"},large:{icon:"icon-large",pad:"px-base"}};function dx(t){return t==="default"?MD:jD[t]}function ek({side:t,status:e,size:n,slotClass:r}){return je(QD[n],dx(e),t==="prefix"?qD:ZD,r)}function tk({variant:t,status:e,statusTinted:n}){return Ns({variant:t,statusTinted:n&&e!=="default",statusTintClass:e!=="default"?cx[e]:""})}function nk({variant:t,status:e,statusTinted:n}){return t==="gloss"?"gloss-control":n&&e!=="default"?cx[e]:zu[t]}function rk(t){return t!=null?je(hn(t),$r(t),"relative focus-within:z-[2]"):"rounded-base"}function ok({variant:t,status:e,blocked:n,groupSegment:r,fileListEmpty:o,shellSurface:s,shellFileEmptySurface:i,shellHoverMotionClass:a,className:c,slotClass:u}){const f=t==="gloss";return je(FD,f&&GD,(r==null?void 0:r.orientation)==="horizontal"?"min-w-0 flex-1":"w-full",o?"min-h-[7.25rem]":je(f?"":"border-1"),rk(r),i??s,Vr,Ur,!f&&zr(!n,e,t),a,n&&"cursor-not-allowed opacity-55 shadow-token-base",u,c)}function sk(t){return je("relative flex min-h-[6.5rem] min-w-0 flex-1 flex-col items-center justify-center gap-plus px-large py-xlarge",t)}function ik({multipleFiles:t,slotClass:e}){return je("relative min-w-0 flex-1 px-large py-base",t?"flex flex-col gap-base":"flex h-full items-center gap-plus",e)}function ak({size:t,disabled:e,slotClass:n}){const r=ux[t];return je(KD,gn,bh(t),r.pad,e?"cursor-not-allowed opacity-45":"cursor-pointer",n)}function lk({disabled:t,slotClass:e}){return je(XD,gn,et("danger"),"focus-ring",t&&"pointer-events-none opacity-40",e)}function xp({side:t,status:e,controlSize:n,children:r}){const o=Bn();return d.jsx("span",{className:ek({side:t,status:e,size:n,slotClass:t==="prefix"?o.prefix:o.suffix}),children:r})}function ck({status:t,controlSize:e,visible:n,disabled:r,onToggle:o}){const s=Bn(),i=ux[e];return d.jsx("span",{className:je(YD,dx(t)),children:d.jsx("button",{type:"button",disabled:r,"aria-label":n?BD:PD,"aria-pressed":n,onClick:a=>{a.preventDefault(),a.stopPropagation(),o()},onPointerDown:a=>a.stopPropagation(),className:ak({size:e,disabled:r,slotClass:s.passwordToggle}),children:n?d.jsx(Re.IoEyeOff,{className:I("shrink-0",i.icon),"aria-hidden":!0}):d.jsx(Re.IoEye,{className:I("shrink-0",i.icon),"aria-hidden":!0})})})}function Cp({className:t}){const e=Bn();return d.jsx("span",{className:je("flex size-9 shrink-0 items-center justify-center rounded-base bg-surface text-muted border-token",e.fileGlyph,t),"aria-hidden":!0,children:d.jsx(Re.IoFolderOpen,{className:"icon-mid shrink-0","aria-hidden":!0})})}function _p({disabled:t,onRemove:e}){const n=Bn();return d.jsx("button",{type:"button",disabled:t,title:hp,"aria-label":hp,onClick:r=>{r.preventDefault(),r.stopPropagation(),e(r)},onPointerDown:r=>r.stopPropagation(),className:lk({disabled:t,slotClass:n.fileRemove}),children:d.jsx(Re.IoClose,{className:"icon-mid shrink-0","aria-hidden":!0})})}const Ca=l.forwardRef(function({variant:e="default",status:n,size:r,inputType:o="text",placeholder:s,prefix:i,suffix:a,id:c,disabled:u,readOnly:f,className:m="",groupSegment:p,onPointerDown:b,onChange:g,onBlur:h,"aria-describedby":x,name:C,value:_,...v},y){const S=cd({name:typeof C=="string"?C:void 0,value:_,onChange:g,onBlur:h,disabled:u,readOnly:f,type:o}),A=S.name??C,E=S.bound?S.value:_,T=S.onChange,L=S.onBlur,w=S.disabled??u,R=S.readOnly??f,N=S.ref,D=ND(),P=xn(),j=Bn(),G=Po(),k=On(),O=l.useId(),M=c??(D==null?void 0:D.inputId)??O,B=n??(D==null?void 0:D.status)??"default",U=r??(D==null?void 0:D.size)??(P==null?void 0:P.size)??((k==null?void 0:k.buttonSize)??"base"),W=(D==null?void 0:D.isRequired)??!1,F=(D==null?void 0:D.hintConnected)??!1,V=(D==null?void 0:D.errorConnected)??!1,H=D==null?void 0:D.hintId,re=D==null?void 0:D.errorId,me=x??Ft(F?H:void 0,V?re:void 0),pe=G!=null&&G.segmented?void 0:p??(k==null?void 0:k.segment),Y=l.useRef(null),te=l.useRef(null),de=l.useCallback(K=>{te.current=K,N(K),typeof y=="function"?y(K):y&&(y.current=K)},[y,N]),oe=!!(w||R),xe=B==="danger"||B==="success"||B==="warning",ne=e==="gloss",$=OD({shellRef:Y,blocked:oe,variant:e,groupSegment:pe,onPointerDown:b}),se=o==="file",be=o==="password",[Ie,Ae]=l.useState(!1),[q,ie]=l.useState([]);l.useEffect(()=>{be||Ae(!1)},[be]);const ce=l.useMemo(()=>q.map(K=>({file:K,previewUrl:K.type.startsWith("image/")?URL.createObjectURL(K):null})),[q]);l.useEffect(()=>{const K=ce.map(Z=>Z.previewUrl).filter(Z=>Z!=null);return()=>{for(const Z of K)URL.revokeObjectURL(Z)}},[ce]),l.useEffect(()=>{if(!se)return;const K=te.current,Z=K==null?void 0:K.form;if(!Z)return;const fe=()=>ie([]);return Z.addEventListener("reset",fe),()=>Z.removeEventListener("reset",fe)},[se]);const Be=l.useCallback(K=>{const Z=K.target.files;ie(Z?Array.from(Z):[]),T==null||T(K)},[T]),ft=l.useCallback((K,Z)=>{if(oe)return;const fe=()=>{ie(we=>{const ze=we.filter(Je=>Je!==K),Qe=te.current;return Qe&&wD(Qe,ze),Qe&&(g==null||g({target:Qe,currentTarget:Qe})),ze})};if(!Z||ue()){fe();return}kD(Z).then(fe)},[oe,g]),vn=K=>Z=>{const fe=Z.currentTarget.closest("[data-file-row]");ft(K,fe instanceof HTMLElement?fe:null)},hr=q.length>1,yn=se&&q.length===0,ln=!se,qo=tk({variant:e,status:B,statusTinted:xe}),Zo=yn?je(nk({variant:e,status:B,statusTinted:xe}),!ne&&"border-2 border-dashed border-token"):null;return d.jsxs("div",{ref:$.setShellRef,"data-slot":"input-shell",role:"presentation",onPointerDown:$.shellPointerDown,onPointerEnter:$.shellPointerEnter,onPointerLeave:$.shellPointerLeave,onFocusCapture:$.shellFocusCapture,onBlurCapture:$.shellBlurCapture,...$.glossDisabledAttr,className:ok({variant:e,status:B,blocked:oe,groupSegment:pe,fileListEmpty:yn,shellSurface:qo,shellFileEmptySurface:Zo,shellHoverMotionClass:$.shellHoverMotionClass,className:m,slotClass:j.shell}),children:[ln&&i!=null?d.jsx(xp,{side:"prefix",status:B,controlSize:U,children:i}):null,se?d.jsxs("div",{className:yn?sk(j.fileArea):ik({multipleFiles:hr,slotClass:j.fileArea}),children:[yn?d.jsxs(d.Fragment,{children:[d.jsx(Re.IoFolderOpen,{className:je(VD,j.fileEmpty),"aria-hidden":!0}),d.jsx(ee,{as:"span",variant:"base",className:je(UD,j.fileEmpty),children:s??"Select file"})]}):hr?ce.map(({file:K,previewUrl:Z})=>d.jsxs("div",{"data-file-row":"",className:je($D,j.fileRow),children:[Z?d.jsx("img",{src:Z,alt:"",className:je(gp,j.filePreview)}):d.jsx(Cp,{}),d.jsx(ee,{as:"span",variant:"base",className:bp,children:K.name}),oe?null:d.jsx(_p,{onRemove:vn(K)})]},`${K.name}-${K.size}-${K.lastModified}`)):d.jsxs("div",{"data-file-row":"",className:je(WD,j.fileRow),children:[ce[0].previewUrl?d.jsx("img",{src:ce[0].previewUrl,alt:"",className:je(gp,j.filePreview)}):d.jsx(Cp,{}),d.jsx(ee,{as:"span",variant:"base",className:bp,children:ce[0].file.name}),oe?null:d.jsx(_p,{onRemove:vn(ce[0].file)})]}),d.jsx("input",{ref:de,id:M,name:A,type:"file",disabled:w,readOnly:R,onChange:Be,onBlur:L,"aria-required":W||void 0,"aria-invalid":S["aria-invalid"]??(B==="danger"?!0:void 0),"aria-describedby":me,className:zD,...v})]}):d.jsx("input",{ref:de,id:M,name:A,type:be?Ie?"text":"password":o,disabled:w,readOnly:R,placeholder:s,value:E,onChange:T,onBlur:L,"aria-required":W||void 0,"aria-invalid":S["aria-invalid"]??(B==="danger"?!0:void 0),"aria-describedby":me,className:je(HD,JD[U],j.control,Et),...v}),ln&&a!=null?d.jsx(xp,{side:"suffix",status:B,controlSize:U,children:a}):null,ln&&be?d.jsx(ck,{status:B,controlSize:U,visible:Ie,disabled:u,onToggle:()=>Ae(K=>!K)}):null]})});Ca.displayName="InputControl";function fx({className:t,classNames:e,...n}){const r=Bn();return d.jsx($e,{className:t,classNames:{...e,root:je(r.label,e==null?void 0:e.root)},...n})}fx.displayName="InputLabel";function ud({children:t,status:e,className:n,id:r,...o}){const s=lx(),i=Bn(),a=e??(s.status==="danger"||s.status==="default"?"default":s.status);return d.jsx(Ye,{id:r??s.hintId,status:a,className:je(i.hint,n),...o,children:t})}ud.displayName="InputHint";function dd({children:t,className:e,id:n,...r}){const o=lx(),s=Bn();return d.jsx(Ze,{id:n??o.errorId,className:je(s.error,e),...r,children:t})}dd.displayName="InputError";function uk({label:t,hint:e,error:n,inputId:r,labelId:o,size:s,status:i,controlProps:a}){const c=Bn();return d.jsxs(d.Fragment,{children:[t!=null?d.jsx($e,{id:o,classNames:{root:c.label},children:t}):null,d.jsx(Ca,{id:r,size:s,status:i,...a}),e!=null?d.jsx(ud,{children:e}):null,n!=null?d.jsx(dd,{children:n}):null]})}function dk({children:t,label:e,hint:n,error:r,id:o,isRequired:s=!1,status:i="default",size:a="base"}){const c=l.useId(),u=o??`input-${c}`,f=Yt(u),m=Kt(u),p=`${u}-label`,b=qt(t),g=n!=null||b&&ye(t,"InputHint"),h=r!=null||b&&ye(t,"InputError"),x=l.useMemo(()=>({inputId:u,hintId:f,errorId:m,labelId:p,hintConnected:g,errorConnected:h,isRequired:s,status:i,size:a}),[m,h,g,f,u,s,p,a,i]),C=l.useMemo(()=>({controlId:u,labelId:p,isRequired:s}),[u,s,p]);return{fieldCtx:x,fieldLabelCtx:C,isCompound:b,inputId:u,label:e,hint:n,error:r,status:i,size:a}}function fk({children:t,label:e,hint:n,error:r,className:o,classNames:s,id:i,isRequired:a=!1,status:c="default",size:u="base",...f}){const m=xn(),p=typeof f.name=="string"?f.name:void 0,b=p?m==null?void 0:m.getError(p):void 0,g=r??b,h=c==="default"&&b?"danger":c,x=u??(m==null?void 0:m.size)??"base",C=dk({children:t,label:e,hint:n,error:g,id:i,isRequired:a,status:h,size:x}),_=C.isCompound?t:d.jsx(uk,{label:C.label,hint:C.hint,error:C.error,inputId:C.inputId,labelId:C.fieldCtx.labelId,size:C.size,status:C.status,controlProps:f});return d.jsx(RD,{value:C.fieldCtx,children:d.jsx(ID,{classNames:s,children:d.jsx(Xt.Provider,{value:C.fieldLabelCtx,children:d.jsx(pn,{className:je(s==null?void 0:s.root,o),children:_})})})})}const mk=Object.assign(fk,{Label:fx,Control:Ca,Hint:ud,Error:dd}),pk={xsmall:"--radius-value-xsmall",small:"--radius-value-small",base:"--radius-value-base",mid:"--radius-value-mid",large:"--radius-value-large"},hk={xsmall:.5,small:.75,base:1,mid:1.25,large:1.5},gk={small:"small",base:"base",mid:"mid",large:"large"},bk={small:"rounded-small",base:"rounded-base",mid:"rounded-mid",large:"rounded-large"};function xk(t,e){const n=/^([\d.]+)rem$/i.exec(t);if(n)return Number.parseFloat(n[1])*e;const r=/^([\d.]+)px$/i.exec(t);if(r)return Number.parseFloat(r[1])}function Ck(t,e=16){if(typeof document<"u"){const n=getComputedStyle(document.documentElement).getPropertyValue(pk[t]).trim(),r=xk(n,e);if(r!=null)return r}return e*.5*hk[t]}function _k(t,e=16){return Ck(gk[t],e)}const Sk={small:"w-control-small",base:"w-control-base",mid:"w-control-mid",large:"w-control-large"},vk={small:8,base:12,mid:16,large:20},yk={small:14,base:16,mid:20,large:20},Tk={small:20,base:24,mid:28,large:32},Ak={small:240,base:280,mid:320,large:360};function ii(t){const e=le[t];return{defaultExpandedW:Ak[t],iconBox:yk[t],padX:vk[t],iconClass:e.icon,controlPad:e.controlPad,shellWCollapsed:Sk[t],clearTap:Tk[t],clearIconClass:e.chevronIcon,textGapClear:t==="small"?4:6}}const Ek={small:ii("small"),base:ii("base"),mid:ii("mid"),large:ii("large")};function Lk(t){return Ek[t]}const fd=l.forwardRef(function({className:e="",size:n="base",variant:r,expandedWidth:o,defaultExpanded:s=!1,expanded:i,onExpandedChange:a,collapseOnBlur:c=!0,disabled:u,readOnly:f,placeholder:m="Search…",value:p,defaultValue:b,onChange:g,onBlur:h,onKeyDown:x,id:C,"aria-label":_,onValueChange:v,ripple:y=!1,groupSegment:S,...A},E){const T=Po(),L=On(),w=T!=null&&T.segmented?void 0:S??(L==null?void 0:L.segment),R=r??((L==null?void 0:L.variant)!=null?Vu(L.variant):"default"),N=l.useId(),D=C??N,P=i!==void 0,[j,G]=l.useState(s),k=P?i:j,O=l.useCallback(ae=>{P||G(ae),a==null||a(ae)},[P,a]),M=l.useRef(null),B=l.useRef(null),U=l.useRef(null),W=l.useRef(null),F=l.useRef(!1),V=l.useRef(k),H=p!==void 0,[re,me]=l.useState(()=>b!=null&&String(b).trim().length>0||p!=null&&String(p).trim().length>0);l.useEffect(()=>{H&&me(String(p??"").trim().length>0)},[H,p]);const pe=l.useCallback(ae=>{U.current=ae,typeof E=="function"?E(ae):E&&(E.current=ae)},[E]),Y=!!(u||f),te=l.useCallback(ae=>{g==null||g(ae),v==null||v(ae.target.value),H||me(ae.target.value.trim().length>0)},[H,g,v]),de=l.useCallback(ae=>{var Qo;if(ae.preventDefault(),ae.stopPropagation(),Y)return;const he=U.current;if(!he)return;H||me(!1);const Ge=(Qo=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:Qo.set;Ge==null||Ge.call(he,""),he.dispatchEvent(new Event("input",{bubbles:!0})),g==null||g({target:he,currentTarget:he}),v==null||v(""),requestAnimationFrame(()=>he.focus())},[Y,H,g,v]),oe=Lk(n),xe=o??oe.defaultExpandedW,ne=Fc(n),$=R==="gloss",se=l.useCallback(()=>k?bn():_o(),[k]),be=Oo(M,!Y&&!$&&w==null,{resolveIdle:se,idleSyncKey:k}),Ie=ko(M,!Y&&$&&w==null),Ae=l.useCallback(ae=>{M.current=ae,!Y&&$&&w==null&&Ie.bindShellRef(ae)},[Y,Ie,w,$]),q=l.useCallback(ae=>ae.offsetWidth-ae.clientWidth,[]),ie=l.useCallback((ae,he)=>(ae-he-oe.iconBox)/2,[oe.iconBox]),ce=`calc(50% - ${oe.iconBox/2}px)`,Be=l.useRef(k),ft=l.useCallback(ae=>{if(B.current=ae,ae&&!ae.hasAttribute("data-search-icon-init")){ae.setAttribute("data-search-icon-init","");const he=Be.current;ae.style.left=he?`${oe.padX}px`:ce}},[ce,oe.padX]),vn=l.useCallback(ae=>{const he=M.current,Ge=B.current;!he||!Ge||(ae?he.style.width=`${xe}px`:he.style.removeProperty("width"),he.style.removeProperty("height"),he.style.removeProperty("borderRadius"),Ge.style.left=ae?`${oe.padX}px`:ce)},[ce,oe.padX,xe]),hr=l.useCallback(ae=>{const he=M.current,Ge=B.current;if(!he||!Ge)return;if(ue()){vn(ae);return}z(he),z(Ge),he.style.removeProperty("borderRadius");const Qo=_k(n);if(ae){he.style.width=`${ne}px`,he.style.borderRadius=`${ne/2}px`;const TT=(he.clientWidth-oe.iconBox)/2;Ge.style.left=`${TT}px`;const vm=ve();X.timeline({onComplete:()=>{he.style.removeProperty("borderRadius")}}).to(he,{width:xe,borderRadius:Qo,...vm,overwrite:"auto"},0).to(Ge,{left:oe.padX,...vm,overwrite:"auto"},0);return}const vT=q(he),yT=ie(ne,vT);Ge.style.left=`${oe.padX}px`;const Sm=ve();X.timeline({onComplete:()=>{he.style.removeProperty("width"),he.style.removeProperty("borderRadius"),Ge.style.left=ce}}).to(he,{width:ne,borderRadius:ne/2,...Sm,overwrite:"auto"},0).to(Ge,{left:yT,...Sm,overwrite:"auto"},0)},[vn,ne,ie,ce,oe.iconBox,oe.padX,q,n,xe]);l.useLayoutEffect(()=>{if(!F.current){F.current=!0,vn(k),V.current=k;return}V.current!==k&&(V.current=k,hr(k))},[vn,k,hr]);const yn=l.useCallback(()=>{requestAnimationFrame(()=>{var ae;return(ae=U.current)==null?void 0:ae.focus()})},[]),ln=l.useCallback(async()=>{Y||k||(await(W.current??Promise.resolve()),W.current=null,O(!0),yn())},[Y,k,yn,O]),qo=l.useCallback(ae=>{if(Y||k)return;const he=M.current;if(!he||ue()){W.current=Promise.resolve();return}W.current=$&&w==null?No(he):Xe(he).then(()=>{})},[Y,k,w,$]),Zo=l.useCallback(ae=>{Y||k||(ae.preventDefault(),ln())},[Y,k,ln]),K=$&&w==null?Ie.onShellPointerEnter:be.onPointerEnter,Z=$&&w==null?Ie.onShellPointerLeave:be.onPointerLeave,fe=l.useCallback(ae=>{h==null||h(ae),!(!c||Y)&&window.setTimeout(()=>{const he=M.current;if(!(he!=null&&he.contains(document.activeElement))){const Ge=U.current;((Ge==null?void 0:Ge.value)??"").trim().length===0&&O(!1)}},0)},[Y,c,h,O]),we=l.useCallback(ae=>{k||Y||(ae.key==="Enter"||ae.key===" ")&&(ae.preventDefault(),ln())},[Y,k,ln]),ze=l.useCallback(ae=>{var he,Ge;x==null||x(ae),!ae.defaultPrevented&&ae.key==="Escape"&&c&&(((he=U.current)==null?void 0:he.value)??"").length===0&&(ae.stopPropagation(),O(!1),(Ge=M.current)==null||Ge.focus())},[c,x,O]),Qe=oe.padX+oe.iconBox+6,Je=k&&re&&!Y,Qt=oe.padX+(Je?oe.clearTap+oe.textGapClear:0),Jt=_??"Open search",gr=_??(m?String(m):"Search"),ST=w?I(hn(w),$r(w)):null;return d.jsxs("div",{ref:Ae,...k?{role:"search",tabIndex:-1}:{role:"button",tabIndex:Y?-1:0,onClick:Zo,onKeyDown:we},"aria-expanded":k,"aria-disabled":Y||void 0,"aria-label":k?void 0:Jt,"data-search-expanded":k?"":void 0,onFocusCapture:$&&w==null?Ie.onShellFocusIn:void 0,onBlurCapture:$&&w==null?Ie.onShellFocusOut:void 0,className:I(w?ST:k?bk[n]:I("rounded-full",oe.shellWCollapsed),"relative box-border inline-block overflow-hidden text-left",$?"gloss-control border-0":I("border-1 border-token",zu[R]),Vr,Ur,$?Ie.shellHoverMotionClass:zr(!Y,"default",R),!$&&!Y&&be.motionClass,k?"cursor-text":"",!k&&!Y?"cursor-pointer":"",Y?"pointer-events-none opacity-55":"",e),onPointerDown:qo,onPointerEnter:K,onPointerLeave:Z,children:[y?d.jsx(ys,{color:"neutral",disabled:Y}):null,d.jsx("span",{ref:ft,className:"pointer-events-none absolute inset-y-0 z-[1] flex items-center justify-center text-muted",style:{width:oe.iconBox},"aria-hidden":!0,children:d.jsx(Re.IoSearch,{className:I("shrink-0",oe.iconClass),"aria-hidden":!0})}),d.jsx("input",{ref:pe,id:D,type:"search",disabled:u,readOnly:f,placeholder:m,value:p,defaultValue:b,onChange:te,onBlur:fe,onKeyDown:ze,tabIndex:k?0:-1,"aria-label":gr,className:I("box-border min-h-0 w-full border-0 bg-transparent text-foreground outline-none placeholder:text-muted","[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none","disabled:cursor-not-allowed disabled:opacity-100",oe.controlPad,Et,k?"relative z-[2] opacity-100":"pointer-events-none absolute inset-0 opacity-0"),style:k?{paddingLeft:Qe,paddingRight:Qt}:void 0,...A}),Je?d.jsx("button",{type:"button","aria-label":"Clear field",onClick:de,onPointerDown:ae=>ae.stopPropagation(),className:I("absolute top-1/2 z-[3] flex -translate-y-1/2 items-center justify-center rounded-full border-0 bg-transparent p-0","text-foreground outline-none",gn,et(),"focus-ring-inset","cursor-pointer"),style:{right:oe.padX,width:oe.clearTap,height:oe.clearTap},children:d.jsx(Re.IoClose,{className:`shrink-0 ${oe.clearIconClass}`,"aria-hidden":!0})}):null]})});fd.displayName="SearchInput";function md(...t){return I(...t)}function pd(t){const e=[];return l.Children.forEach(t,n=>{if(l.isValidElement(n)){if(n.type===l.Fragment){const{children:r}=n.props;e.push(...pd(r));return}e.push(n)}}),e}function mx(t){return t.type===yo||t.type===Ca||t.type===Jb||t.type===fd||t.type===Rr||t.type.displayName==="ButtonGroupText"}function px(t,e){return e<=1?"only":t===0?"first":t===e-1?"last":"middle"}function hx(t,e){return{orientation:t,position:e}}function wk(t){return t.reduce((e,n)=>e+(mx(n)?1:0),0)}const Rk={small:"small",base:"base",mid:"mid",large:"mid"},Ik={small:"h-control-small",base:"h-control-base",mid:"h-control-mid",large:"h-control-large"};function gx(t){const{padX:e,padY:n}=le[t];return I(Ik[t],e,n)}function hn(t){if(t==null)return"";const{orientation:e,position:n}=t;return n==="only"?"rounded-base":e==="horizontal"?n==="first"?"rounded-l-base rounded-r-none":n==="middle"?"rounded-none":"rounded-r-base rounded-l-none":n==="first"?"rounded-t-base rounded-b-none":n==="middle"?"rounded-none":"rounded-b-base rounded-t-none"}function Nk(t){const{orientation:e,position:n}=t;return n==="only"?"!rounded-base":e==="horizontal"?n==="first"?"!rounded-l-base !rounded-r-none":n==="middle"?"!rounded-none":"!rounded-r-base !rounded-l-none":n==="first"?"!rounded-t-base !rounded-b-none":n==="middle"?"!rounded-none":"!rounded-b-base !rounded-t-none"}function $r(t){return t==null?"":I(hn(t),Nk(t),"!border-0 [border:0!important] !shadow-none [box-shadow:none!important]","z-0 focus-visible:z-[2]")}function Dk(t){return I("relative inline-flex shrink-0 select-none items-center justify-center border-token bg-surface text-muted",hn(t),t!=null&&$r(t),"z-0")}function bx({orientation:t,segmented:e,variant:n,className:r}){return md("inline-flex text-left w-fit",!e&&I("relative rounded-base",n==="gloss"?"gloss-panel gloss-deep border-0 text-foreground":"after:pointer-events-none after:absolute after:inset-0 after:rounded-base after:border-token after:content-['']"),I(t==="horizontal"?"flex-row flex-nowrap items-stretch":"flex-col flex-nowrap items-stretch",e&&"gap-xsmall"),r)}function xx(t){return md("pointer-events-none shrink-0",t==="horizontal"?"my-[var(--border-width)] self-stretch border-r-token":"mx-[var(--border-width)] self-stretch border-b-token")}function kk({groupSegment:t,groupVariant:e,buttonSize:n,className:r}){return md(Dk(t),e==="gloss"&&"bg-transparent text-foreground","inline-flex items-center",gx(n),r)}const Ok="max-w-[12rem] truncate font-w-base whitespace-nowrap md:max-w-[18rem]";function hd(...t){return I(...t)}const Pk=new Set(["default","primary","outline","secondary","ghost"]),Bk={default:"default",primary:"primary",outline:"default",secondary:"secondary",ghost:"default",gloss:"default"},Cx={default:{focusOutline:"focus-visible:outline-primary",convergeBg:_e("converge-ripple-neutral")},primary:{focusOutline:"focus-visible:outline-primary",convergeBg:_e("converge-ripple-primary-fill")},outline:{focusOutline:"focus-visible:outline-primary",convergeBg:_e("converge-ripple-neutral")},secondary:{focusOutline:"focus-visible:outline-primary",convergeBg:_e("converge-ripple-neutral")},ghost:{focusOutline:"focus-visible:outline-primary",convergeBg:_e("converge-ripple-neutral")},gloss:{focusOutline:"focus-visible:outline-primary",convergeBg:_e("converge-ripple-neutral")}},_x={small:{root:"h-control-xsmall w-control-xsmall",icon:"icon-small"},base:{root:"h-control-small w-control-small",icon:"icon-base"},mid:{root:"h-control-base w-control-base",icon:"icon-mid"},large:{root:"h-control-mid w-control-mid",icon:"icon-large"}},jk="relative z-0 flex shrink-0 cursor-pointer items-center justify-center rounded-full outline-none overflow-hidden",Mk="cursor-not-allowed opacity-50",Fk="relative z-[1] shrink-0 text-current",Gk="rounded-full";function Hk(t){return Cx[t]}function zk({variant:t,size:e,disabled:n,className:r,slotRoot:o}){const s=t==="gloss",i=Cx[t],a=_x[e];return hd(jk,s?I("gloss-btn",nn):ir,!n&&!s&&et(Bk[t]),!s&&vr[t],i.focusOutline,a.root,n&&Mk,r,o)}function Vk(t,e){return hd(Fk,_x[t].icon,e)}function Uk({variant:t,animated:e,disabled:n,forwardedRef:r,onPointerDown:o,onPointerEnter:s,onPointerLeave:i}){const a=aa({isGloss:t==="gloss",animated:e,enabled:!n,hasHoverShadow:Pk.has(t),useContentRef:!1,forwardedRef:r,onPointerEnter:s,onPointerLeave:i,onPointerDown:o});return{setRefs:a.setRefs,handlePointerEnter:a.handlePointerEnter,handlePointerLeave:a.handlePointerLeave,handlePointerDown:a.handlePointerDown}}const Yl=l.createContext({});function $k({classNames:t,children:e}){const n=l.useContext(Yl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Yl.Provider,{value:r,children:e})}function Sx(){return l.useContext(Yl)}function Wk({color:t,disabled:e,className:n}){const r=Sx();return d.jsx(ys,{color:t,disabled:e,duration:Se().rippleDefaultDuration,className:hd(Gk,r.ripple,n)})}function Xk({size:t}){const e=Sx();return d.jsx(Re.IoClose,{"aria-hidden":!0,className:Vk(t,e.icon)})}function Yk(t){return t??"Close"}function Kk({variant:t="default",size:e="base",animated:n=!0,ripple:r=!1,className:o,disabled:s,type:i="button","aria-label":a,classNames:c}){const u=!!s,f=Hk(t),m=zk({variant:t,size:e,disabled:u,className:o,slotRoot:c==null?void 0:c.root});return{variant:t,size:e,animated:n,ripple:r,disabled:u,type:i,ariaLabel:Yk(a),buttonClass:m,convergeRippleColor:f.convergeBg,classNames:c}}const Go=l.forwardRef(function({variant:e,size:n,animated:r,ripple:o,className:s,classNames:i,disabled:a,type:c,"aria-label":u,onPointerDown:f,onPointerEnter:m,onPointerLeave:p,...b},g){const h=Kk({variant:e,size:n,animated:r,ripple:o,className:s,classNames:i,disabled:a,type:c,"aria-label":u}),x=Uk({variant:h.variant,animated:h.animated,disabled:h.disabled,forwardedRef:g,onPointerDown:f,onPointerEnter:m,onPointerLeave:p});return d.jsx($k,{classNames:h.classNames,children:d.jsxs("button",{ref:x.setRefs,type:h.type,disabled:h.disabled,"aria-label":h.ariaLabel,className:h.buttonClass,onPointerEnter:x.handlePointerEnter,onPointerLeave:x.handlePointerLeave,onPointerDown:x.handlePointerDown,...b,children:[h.ripple?d.jsx(Wk,{color:h.convergeRippleColor,disabled:h.disabled}):null,d.jsx(Xk,{size:h.size})]})})});Go.displayName="CloseButton";const qk=new Set(["ExpandableIcon","Accordion.Icon"]),Zk=new Set(["ExpandableTitle","Accordion.Title"]),Qk=new Set(["ExpandableDescription","Accordion.Description"]),Jk=new Set(["ExpandableChevron","Accordion.Indicator"]),eO=new Set(["ExpandableMessage","Accordion.Message"]),tO=new Set(["ExpandableTrigger","ExpandablePanel","ExpandableMessage","Accordion.Trigger","Accordion.Panel","Accordion.Message","Accordion.Heading"]);function ot(...t){return I(...t)}function nO(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function gd(t){return t.displayName}function rO(t){const e=[],n=[];return l.Children.forEach(t,r=>{l.isValidElement(r)&&r.type===ys?e.push(r):n.push(r)}),{ripples:e,rest:n}}function oO(t){let e=!1;return l.Children.forEach(t,n=>{if(e||!l.isValidElement(n))return;const r=gd(n.type);r!=null&&eO.has(r)&&(e=!0)}),e}function sO(t){let e=!1;const n=r=>{if(!e)for(const o of l.Children.toArray(r)){if(!l.isValidElement(o))continue;const s=gd(o.type);if(s!=null&&tO.has(s)){e=!0;return}n(o.props.children)}};return n(t),e}function _a(t,e){let n=!1;const r=o=>{if(!n)for(const s of l.Children.toArray(o)){if(!l.isValidElement(s))continue;const i=gd(s.type);if(i!=null&&e.has(i)){n=!0;return}r(s.props.children)}};return r(t),n}function iO(t){return _a(t,qk)}function aO(t){return _a(t,Zk)}function lO(t){return _a(t,Qk)}function vx(t){return _a(t,Jk)}function cO({children:t,hideChevron:e,hasPanel:n}){const r=vx(t),o=n&&!e&&!r;return{hasIndicator:iO(t),hasTitle:aO(t),hasDescription:lO(t),hasAction:o||r,hasClose:!1}}const yx=l.createContext(null);function uO({value:t,children:e}){return d.jsx(yx.Provider,{value:t,children:e})}function Wr(){const t=l.useContext(yx);if(!t)throw new Error("Expandable components must be used inside <Expandable>.");return t}const Kl=l.createContext({});function dO({classNames:t,children:e}){const n=l.useContext(Kl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Kl.Provider,{value:r,children:e})}function ur(){return l.useContext(Kl)}const bd=l.createContext(null);function fO({gridSlots:t,children:e}){return d.jsx(bd.Provider,{value:t,children:e})}function mO(){const t=l.useContext(bd);if(!t)throw new Error("Expandable trigger parts must be inside <Expandable.Trigger>.");return t}function Sa(){return l.useContext(bd)}function va(t){return t?2:1}function pO(t){return t.hasAction?va(t.hasIndicator)+1:null}function hO(t){return t.hasClose?va(t.hasIndicator)+(t.hasAction?2:1):null}function gO(t){const{hasIndicator:e,hasAction:n,hasClose:r}=t;return e&&n&&r?"grid-cols-[auto_minmax(0,1fr)_auto_auto]":e&&(n||r)?"grid-cols-[auto_minmax(0,1fr)_auto]":e?"grid-cols-[auto_minmax(0,1fr)]":n&&r?"grid-cols-[minmax(0,1fr)_auto_auto]":n||r?"grid-cols-[minmax(0,1fr)_auto]":"grid-cols-[minmax(0,1fr)]"}const ya={1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4"};function Ho(t,e="gap-x-base"){const n=t.hasTitle&&t.hasDescription;return I("grid w-full min-w-0 text-left",gO(t),n?"grid-rows-[auto_auto] gap-y-xsmall":"grid-rows-[auto]",e)}function Ir(t){return t.hasIndicator?"col-start-1 row-start-1 self-center shrink-0":"hidden"}function zo(t){return I("row-start-1 self-center min-w-0 max-w-full justify-self-start",ya[va(t.hasIndicator)])}function ks(t){return I(t.hasTitle?"row-start-2":"row-start-1","min-w-0 w-full max-w-full justify-self-stretch self-start",ya[va(t.hasIndicator)])}function Os(t){const e=pO(t);return e==null?"hidden":I("row-start-1 self-center shrink-0 justify-self-end",ya[e])}function Tx(t){const e=hO(t);return e==null?"hidden":I("row-start-1 self-center shrink-0 justify-self-end",ya[e])}function Fi(t){return t.scrollHeight}function bO(t,e){const n=Fi(e),r=t.getBoundingClientRect().height;if(n<=0){X.set(t,{clearProps:"height"}),t.style.removeProperty("overflow");return}if(Math.abs(n-r)<=.5){requestAnimationFrame(()=>{requestAnimationFrame(()=>{X.set(t,{clearProps:"height"}),t.style.removeProperty("height"),t.style.removeProperty("overflow")})});return}t.style.height=`${n}px`,t.style.overflow="hidden",requestAnimationFrame(()=>{requestAnimationFrame(()=>{X.set(t,{clearProps:"height"}),t.style.removeProperty("height"),t.style.removeProperty("overflow")})})}function bi(t,e){e?(X.set(t,{clearProps:"height"}),t.style.removeProperty("height"),t.style.removeProperty("overflow")):(t.style.height="0px",t.style.overflow="hidden")}const Sp="data-collapsible-init";function Ax(t,e){const n=l.useRef(e);return l.useCallback(r=>{t.current=r,r&&!r.hasAttribute(Sp)&&(r.setAttribute(Sp,""),bi(r,n.current))},[t])}function Ex(t,e,n,r){const o=l.useRef((r==null?void 0:r.enabled)??(()=>Se().enableExpandable));o.current=(r==null?void 0:r.enabled)??(()=>Se().enableExpandable);const s=r==null?void 0:r.skipAnimRef,i=l.useRef(void 0);l.useLayoutEffect(()=>{const a=e.current,c=n.current;if(!a||!c)return;const u=ue()||!o.current();if(i.current===void 0){i.current=t,bi(a,t);return}if(s!=null&&s.current){s.current=!1,i.current=t,bi(a,t);return}if(i.current!==t){if(i.current=t,z(a),u){bi(a,t);return}if(t)a.style.overflow="hidden",X.fromTo(a,{height:0},{height:()=>Fi(c),...np(),overwrite:"auto",onComplete:()=>bO(a,c)});else{const f=a.getBoundingClientRect().height||Fi(c);a.style.height=`${f}px`,a.style.overflow="hidden",X.to(a,{height:0,...np(),overwrite:"auto",onComplete:()=>{a.style.height="0px",a.style.overflow="hidden"}})}}},[t,e,n,s])}function xO({open:t,disabled:e,toggle:n,forwardedRef:r,onClick:o,onKeyDown:s,onPointerDown:i}){const a=l.useRef(null),c=l.useRef(null),u=Hr(t,c,()=>Se().enableExpandable),f=l.useCallback(g=>{dt(r,g)},[r]),m=l.useCallback(g=>{o==null||o(g),!(g.defaultPrevented||e)&&n()},[e,o,n]),p=l.useCallback(g=>{s==null||s(g),!(g.defaultPrevented||e)&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),n())},[e,s,n]),b=l.useCallback(g=>{if(!e){const h=a.current;h&&!ue()&&Xe(h)}i==null||i(g)},[e,i]);return{liftSpanRef:a,bindChevronRef:u,setTriggerRef:f,handleClick:m,handleKeyDown:p,handlePointerDown:b}}function CO(t){const e=l.useRef(null),n=l.useRef(null),r=Ax(e,t);return Ex(t,e,n),{shellRef:e,innerRef:n,bindShellRef:r}}const _O={small:"small",base:"small",mid:"base",large:"base"},SO={small:"px-base pb-base pt-small",base:"px-plus pb-plus pt-small",mid:"px-mid pb-mid pt-base",large:"px-large pb-large pt-base"},vO="rounded-mid text-left text-foreground",yO="border-token bg-surface shadow-token-base",TO="gloss-panel gloss-deep border-0",AO="gloss-content flex min-w-0 flex-col",EO="relative w-full overflow-hidden py-base text-left outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary focus-visible:outline-offset-2",LO="cursor-not-allowed opacity-50",wO="cursor-pointer",RO="relative z-[1] w-full min-w-0 origin-center will-change-transform",Lx="contents",wx="relative z-[1] flex shrink-0 origin-center self-center",IO=Lx,NO="shrink-0 text-primary [&_svg]:size-full",DO=Lx,kO="text-muted",OO="font-w-mid",PO=wx,BO="overflow-hidden",jO="pointer-events-none absolute inset-0 z-0 overflow-hidden rounded-[inherit]";function MO({variant:t,className:e,slotClass:n}){return ot(vO,t==="gloss"?TO:yO,n,e)}function FO({size:t,disabled:e,className:n,slotClass:r}){const o=le[t];return ot(EO,o.padX,e?LO:wO,r,n)}function GO({gridSlots:t,slotClass:e}){return ot(RO,Ho(t),e)}function HO({size:t,className:e,slotClass:n}){return ot(NO,le[t].icon,n,e)}function zO({size:t,className:e,slotClass:n}){return ot(SO[t],"text-left",n,e)}function VO(t){return le[t].chevronIcon}function UO(t){return le[t].chevronIcon}function $O(t){return le[t].controlText}function Rx({className:t}){return d.jsx("svg",{className:ot("shrink-0",t),width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:d.jsx("path",{d:"m6 9 6 6 6-6"})})}const xd=l.forwardRef(function({className:e,...n},r){const o=ur();return d.jsx("div",{ref:r,className:ot(IO,o.message,e),...n})});xd.displayName="ExpandableMessage";const Cd=l.forwardRef(function({hideChevron:e=!1,asChild:n,className:r,onClick:o,onKeyDown:s,onPointerDown:i,children:a,type:c="button",...u},f){const{open:m,disabled:p,hasPanel:b,size:g,toggle:h,headerId:x,panelId:C}=Wr(),_=ur(),v=xO({open:m,disabled:p,toggle:h,forwardedRef:f,onClick:o,onKeyDown:s,onPointerDown:i}),{ripples:y,rest:S}=rO(a),A=l.useMemo(()=>cO({children:S,hideChevron:e,hasPanel:b}),[S,e,b]),E=oO(S)?d.jsx(d.Fragment,{children:S}):d.jsx(xd,{children:S}),T=b&&!e&&!vx(S),L=y.length>0?d.jsx("span",{className:ot(jO,_.triggerRippleOverlay),"aria-hidden":!0,children:y}):null,w=d.jsxs(d.Fragment,{children:[E,T?d.jsx("span",{ref:v.bindChevronRef,className:ot(Os(A),wx,_.chevron),"aria-hidden":!0,children:d.jsx(Rx,{className:UO(g)})}):null]});if(n&&l.isValidElement(a)){const R=a;return l.cloneElement(R,{...u,id:x,ref:nO(f,R.props.ref),className:ot(R.props.className,r),disabled:p||R.props.disabled,"aria-expanded":b?m:void 0,"aria-controls":b?C:void 0,onClick:N=>{var D,P;(P=(D=R.props).onClick)==null||P.call(D,N),v.handleClick(N)},onKeyDown:N=>{var D,P;(P=(D=R.props).onKeyDown)==null||P.call(D,N),v.handleKeyDown(N)}})}return d.jsxs("button",{ref:v.setTriggerRef,type:c,id:x,className:FO({size:g,disabled:p,className:r,slotClass:_.trigger}),"aria-expanded":b?m:void 0,"aria-controls":b?C:void 0,disabled:p,onPointerDown:v.handlePointerDown,onClick:v.handleClick,onKeyDown:v.handleKeyDown,...u,children:[L,d.jsx(fO,{gridSlots:A,children:d.jsx("span",{ref:v.liftSpanRef,className:GO({gridSlots:A,slotClass:_.triggerLift}),children:w})})]})});Cd.displayName="ExpandableTrigger";function _d({className:t,children:e,...n}){const{size:r}=Wr(),o=ur(),s=Sa();return e==null?null:d.jsx("span",{"aria-hidden":!0,className:ot(HO({size:r,className:t,slotClass:o.icon}),s&&Ir(s)),...n,children:e})}_d.displayName="ExpandableIcon";function Ix({className:t,...e}){const n=ur();return d.jsx("div",{className:ot(DO,n.content,t),...e})}Ix.displayName="ExpandableContent";function Sd({className:t,...e}){const{size:n}=Wr(),r=ur(),o=Sa();return d.jsx(ee,{as:"div",variant:$O(n),className:ot(OO,o&&zo(o),r.title,t),...e})}Sd.displayName="ExpandableTitle";function vd({className:t,...e}){const{size:n}=Wr(),r=ur(),o=Sa();return d.jsx(ee,{as:"div",variant:_O[n],className:ot(kO,o&&ks(o),r.description,t),...e})}vd.displayName="ExpandableDescription";function Nx({className:t,...e}){const{open:n,hasPanel:r,size:o}=Wr(),s=ur(),i=mO(),a=l.useRef(null),c=Hr(n,a,()=>Se().enableExpandable);return r?d.jsx("span",{ref:c,className:ot(Os(i),PO,s.chevron,t),"aria-hidden":!0,...e,children:d.jsx(Rx,{className:VO(o)})}):null}Nx.displayName="ExpandableChevron";const yd=l.forwardRef(function({className:e,children:n,...r},o){const{open:s,headerId:i,panelId:a,size:c,setHasPanel:u}=Wr(),f=ur(),m=CO(s);l.useLayoutEffect(()=>(u(!0),()=>u(!1)),[u]);const p=l.useCallback(b=>{typeof o=="function"?o(b):o&&(o.current=b)},[o]);return d.jsx("div",{ref:m.bindShellRef,className:ot(BO,f.panelShell),children:d.jsx("div",{ref:m.innerRef,children:d.jsx("section",{ref:p,id:a,"aria-labelledby":i,"aria-hidden":!s,inert:!s,className:zO({size:c,className:e,slotClass:f.panel}),...r,children:n})})})});yd.displayName="ExpandablePanel";function WO({title:t,description:e,icon:n,panelChildren:r}){return d.jsxs(d.Fragment,{children:[d.jsxs(Cd,{children:[n!=null?d.jsx(_d,{children:n}):null,t!=null?d.jsx(Sd,{children:t}):null,e!=null?d.jsx(vd,{children:e}):null]}),r!=null?d.jsx(yd,{children:r}):null]})}function XO({children:t,compound:e,defaultOpen:n=!1,open:r,onOpenChange:o,disabled:s=!1,size:i="base",variant:a="default"}){const c=l.useId(),u=l.useId(),f=r!==void 0,[m,p]=l.useState(n),[b,g]=l.useState(!1),h=l.useCallback(y=>{g(y)},[]),x=f?r:m,C=l.useCallback(()=>{if(s||!b)return;const y=!x;f||p(y),o==null||o(y)},[f,s,b,x,o]),_={open:x,disabled:s,hasPanel:b,size:i,variant:a,toggle:C,headerId:u,panelId:c,setHasPanel:h},v=e===!0||sO(t);return{contextValue:_,isCompound:v,isGloss:a==="gloss"}}const Dx=l.forwardRef(function({children:e,compound:n,title:r,description:o,icon:s,variant:i="default",size:a="base",defaultOpen:c=!1,open:u,onOpenChange:f,disabled:m=!1,className:p,classNames:b,...g},h){const x=XO({children:e,compound:n,defaultOpen:c,open:u,onOpenChange:f,disabled:m,size:a,variant:i}),C=Io(h,x.isGloss),_=x.isCompound?e:d.jsx(WO,{title:r,description:o,icon:s,panelChildren:e});return d.jsx(uO,{value:x.contextValue,children:d.jsx(dO,{classNames:b,children:d.jsx("div",{ref:C,className:MO({variant:i,className:p,slotClass:b==null?void 0:b.root}),...g,children:x.isGloss?d.jsx("div",{className:ot(AO,b==null?void 0:b.glossContent),children:_}):_})})})});Dx.displayName="ExpandableRoot";const jn=Object.assign(Dx,{Trigger:Cd,Message:xd,Icon:_d,Content:Ix,Title:Sd,Description:vd,Chevron:Nx,Panel:yd}),Ps=l.createContext(null),ql=l.createContext({});function YO({classNames:t,children:e}){const n=l.useContext(ql),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(ql.Provider,{value:r,children:e})}function Vo(){return l.useContext(ql)}const KO={small:{maxWidthClass:"max-w-component-small",shellPadding:"rounded-mid py-small px-base",gridGap:"gap-x-base gap-y-xsmall",iconSvgClass:"[&_svg]:icon-small",titleVariant:"small",descVariant:"tools",loadingSize:"small",toastWidthPx:280},base:{maxWidthClass:"max-w-component-base",shellPadding:"rounded-mid py-base px-plus",gridGap:"gap-x-base gap-y-xsmall",iconSvgClass:"[&_svg]:icon-mid",titleVariant:"base",descVariant:"small",loadingSize:"small",toastWidthPx:360},mid:{maxWidthClass:"max-w-component-mid",shellPadding:"rounded-mid py-base px-plus",gridGap:"gap-x-base gap-y-xsmall",iconSvgClass:"[&_svg]:icon-large",titleVariant:"mid",descVariant:"base",loadingSize:"base",toastWidthPx:400},large:{maxWidthClass:"max-w-component-large",shellPadding:"rounded-mid py-plus px-plus",gridGap:"gap-x-base gap-y-xsmall",iconSvgClass:"[&_svg]:icon-large",titleVariant:"large",descVariant:"base",loadingSize:"mid",toastWidthPx:440}};function Td(t){return t??"base"}function Dn(t){return KO[Td(t)]}function qO(t){const e=Dn(t);return`w-fit ${e.maxWidthClass} ${e.shellPadding}`}function ZO(t,e="base"){const n=Dn(e).toastWidthPx;return t.length===0?n:Math.max(n,...t.map(r=>Dn(r.size??e).toastWidthPx))}const Ad={danger:Re.IoCloseCircleOutline,success:Re.IoCheckmarkCircleOutline,info:Re.IoInformationCircleOutline,warning:Re.IoWarning};function Ed(t){return t??"default"}function Ld(t){return t??"default"}function Bs(t,e){let n=!1;const r=o=>{if(!n)for(const s of l.Children.toArray(o)){if(!l.isValidElement(s))continue;const i=s.type.displayName;if(e(i)){n=!0;return}r(s.props.children)}};return r(t),n}function QO(t){return Bs(t,e=>e==="AlertTitle")}function JO(t){return Bs(t,e=>e==="AlertDescription")}function eP(t){return Bs(t,e=>e==="AlertIndicator")}function kx(t,e){for(const n of l.Children.toArray(t)){if(!l.isValidElement(n))continue;n.type.displayName==="AlertIndicator"&&e(n.props),kx(n.props.children,e)}}function tP(t,e,n,r){const o=r??e;return n===null?!1:n!==void 0||o!=="default"?!0:t==="outline"}function nP(t,e,n){if(!eP(t))return!1;let r=!1;return kx(t,o=>{tP(e,n,o.children,o.status)&&(r=!0)}),r}function rP(t){return Bs(t,e=>e==="AlertAction")}const oP=new Set(["AlertMessage","AlertIndicator","AlertContent","AlertTitle","AlertDescription","AlertAction"]);function sP(t){return Bs(t,e=>e!=null&&oP.has(e))}function wd(t,e){return e!=="default"?!0:t==="outline"}function Rd(t,e){return e!=="default"?Ad[e]:t==="outline"?Re.IoHelpCircleOutline:null}function iP(t,e,n,r,o){return r?nP(o,t,e):n===null?!1:n!==void 0?!0:wd(t,e)&&Rd(t,e)!==null}const aP={default:"bg-surface border-token text-foreground",outline:"bg-transparent border-token text-foreground",secondary:"bg-secondary border-token text-secondary-foreground"};function Ox(t,e){if(t==="gloss")return I("gloss-panel border-0 text-foreground",e!=="default"?xt[e]:"");if(e==="default")return aP[t];switch(t){case"default":return I(Gc[e],xt[e]);case"outline":return I("bg-transparent",Hc[e],xt[e]);case"secondary":return I("bg-secondary border-token",xt[e])}}function Px(t){return t!=="default"?xt[t]:"text-primary"}const lP="inline-flex shrink-0 items-center justify-center";function cP(t,e){return I(lP,e,Px(t))}const Bx="contents",uP="font-w-mid",dP="text-muted";function Id({status:t,className:e="",children:n,...r}){const o=l.useContext(Ps),s=Vo(),i=(o==null?void 0:o.variant)??"default",a=t??(o==null?void 0:o.status)??"default",c=(o==null?void 0:o.sizePreset)??Dn("base"),u=o==null?void 0:o.gridSlots;if(n===null)return null;const f=Rd(i,a),m=n!==void 0?n:wd(i,a)&&f!==null?d.jsx(f,{"aria-hidden":!0}):null;return m===null?null:d.jsx("span",{className:I(cP(a,c.iconSvgClass),u&&Ir(u),s.indicator,e),...r,children:m})}Id.displayName="AlertIndicator";function jx({className:t="",...e}){const n=Vo();return d.jsx("div",{className:I(Bx,n.content,t),...e})}jx.displayName="AlertContent";const Mx=l.forwardRef(function({className:e="",...n},r){const o=Vo();return d.jsx("div",{ref:r,className:I(Bx,o.message,e),...n})});Mx.displayName="AlertMessage";function Nd({className:t="",id:e,...n}){const r=l.useContext(Ps),o=Vo(),s=(r==null?void 0:r.sizePreset)??Dn("base");return d.jsx(ee,{as:"div",id:e??(r==null?void 0:r.titleId),variant:s.titleVariant,className:I(uP,(r==null?void 0:r.gridSlots)&&zo(r.gridSlots),o.title,t),...n})}Nd.displayName="AlertTitle";function Dd({className:t="",id:e,...n}){const r=l.useContext(Ps),o=Vo(),s=(r==null?void 0:r.sizePreset)??Dn("base");return d.jsx(ee,{as:"div",id:e??(r==null?void 0:r.descriptionId),variant:s.descVariant,className:I(dP,(r==null?void 0:r.gridSlots)&&ks(r.gridSlots),o.description,t),...n})}Dd.displayName="AlertDescription";function kd({className:t="",...e}){const n=l.useContext(Ps),r=Vo();return d.jsx("div",{className:I((n==null?void 0:n.gridSlots)&&Os(n.gridSlots),r.action,t),...e})}kd.displayName="AlertAction";function fP({gridSlots:t,title:e,description:n,icon:r,action:o,children:s}){return d.jsxs(d.Fragment,{children:[t.hasIndicator?d.jsx(Id,{children:r}):null,e!=null?d.jsx(Nd,{children:e}):null,n!=null?d.jsx(Dd,{children:n}):null,s,o!=null?d.jsx(kd,{children:o}):null]})}function mP({variant:t,status:e,hoverLift:n=!0,ref:r,onPointerOver:o,onPointerOut:s}){const i=t==="gloss",a=n,c=l.useRef(null),u=l.useMemo(()=>Mt(c,a&&i),[i,a]),f=l.useCallback(x=>{u(x),c.current=x,typeof r=="function"?r(x):r&&(r.current=x)},[u,r]),m=Do(c,a&&i),p=Oo(c,a&&!i),b=a?i?nn:p.motionClass:"",g=I(Ox(t,e),b),h=l.useMemo(()=>({onPointerOver:x=>{o==null||o(x),!(x.defaultPrevented||!a)&&(i?m.onPointerOver(x):p.onPointerEnter(x))},onPointerOut:x=>{s==null||s(x),a&&(i?m.onPointerOut(x):p.onPointerLeave(x))}}),[m.onPointerOut,m.onPointerOver,i,a,s,o,p.onPointerEnter,p.onPointerLeave]);return{setRootRef:f,surfaceClass:g,pointerHandlers:h}}function Fx(t,e){return e??(t==="danger"||t==="warning"?"alert":"status")}function pP(t,e,n,r){if(n)return t;if(r)return e}function hP(t,e,n){if(e&&n)return t}function gP(t,e,n,r,o,s,i,a){return{hasIndicator:iP(t,e,n,o,s),hasTitle:i,hasDescription:a,hasAction:o?rP(s):r!=null,hasClose:!1}}function bP({variant:t,status:e,size:n,role:r,title:o,description:s,icon:i,action:a,children:c,ariaLabelledByProp:u,ariaDescribedByProp:f}){const m=Ed(t),p=Ld(e),b=Td(n),g=Dn(b),h=l.useId(),x=`${h}-title`,C=`${h}-description`,_=sP(c),v=l.useMemo(()=>o!=null||QO(c),[c,o]),y=l.useMemo(()=>s!=null||JO(c),[c,s]),S=l.useMemo(()=>gP(m,p,i,a,_,c,v,y),[a,c,y,v,i,_,p,m]),A=Fx(p,r),E=u??pP(x,C,v,y),T=f??hP(C,v,y),L=l.useMemo(()=>({variant:m,status:p,size:b,sizePreset:g,titleId:x,descriptionId:C,gridSlots:S}),[C,S,b,g,p,x,m]);return{variant:m,status:p,size:b,sizePreset:g,isCompound:_,gridSlots:S,liveRole:A,ariaLabelledBy:E,ariaDescribedBy:T,contextValue:L}}const Gx=l.forwardRef(function({variant:e="default",status:n,size:r="base",role:o,title:s,description:i,icon:a,action:c,classNames:u,hoverLift:f=!0,className:m="",children:p,onPointerOver:b,onPointerOut:g,"aria-labelledby":h,"aria-describedby":x,...C},_){const{isCompound:v,gridSlots:y,sizePreset:S,liveRole:A,ariaLabelledBy:E,ariaDescribedBy:T,contextValue:L}=bP({variant:e,status:n,size:r,role:o,title:s,description:i,icon:a,action:c,children:p,ariaLabelledByProp:h,ariaDescribedByProp:x}),{setRootRef:w,surfaceClass:R,pointerHandlers:N}=mP({variant:L.variant,status:L.status,hoverLift:f,ref:_,onPointerOver:b,onPointerOut:g});return d.jsx(Ps.Provider,{value:L,children:d.jsx(YO,{classNames:u,children:d.jsx("div",{ref:w,role:A,"aria-labelledby":E,"aria-describedby":T,className:I(Ho(y,S.gridGap),qO(r),R,u==null?void 0:u.root,m),...N,...C,children:v?p:d.jsx(fP,{gridSlots:y,title:s,description:i,icon:a,action:c,children:p})})})})});Gx.displayName="AlertRoot";const xP=Object.assign(Gx,{Indicator:Id,Message:Mx,Content:jx,Title:Nd,Description:Dd,Action:kd}),Hx=l.createContext(null);function CP(){const t=l.useContext(Hx);if(!t)throw new Error("Accordion components must be inside <Accordion>.");return t}function _P(t){const e=l.useRef(null);return Hr(t,e,()=>Se().enableExpandable)}function Xr(...t){return I(...t)}function SP(t,e){return t??(e!=null?String(e):null)}function vP(t){return Xr("flex w-full flex-col text-left","[&>[data-accordion-item]:first-child]:!rounded-t-mid","[&>[data-accordion-item]:last-child]:!rounded-b-mid","[&>[data-accordion-item]:not(:first-child)]:-mt-px",t)}function yP(t){return Xr("relative !rounded-none",t)}function TP(t){return Xr("m-0 font-[inherit] text-[inherit]",t)}function AP(t){return Xr("relative z-[1] flex shrink-0 origin-center self-center",t)}function EP(t){return Xr("text-muted",t)}const LP="shrink-0";function wP({className:t=""}){return d.jsx("svg",{className:Xr(LP,t),width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:d.jsx("path",{d:"m6 9 6 6 6-6"})})}const zx=l.forwardRef(function({value:e,disabled:n,className:r,children:o,...s},i){const{openId:a,setOpenId:c,getItemId:u,size:f}=CP(),m=u(e),p=a===m;return d.jsx(jn,{ref:i,compound:!0,size:f,"data-accordion-item":!0,disabled:n,open:p,onOpenChange:b=>c(b?m:null),className:yP(r),...s,children:o})});zx.displayName="Accordion.Item";function Vx({className:t,children:e,...n}){return d.jsx("h3",{className:TP(t),...n,children:e})}Vx.displayName="Accordion.Heading";const Ux=l.forwardRef(function({hideChevron:e=!0,className:n,...r},o){return d.jsx(jn.Trigger,{ref:o,hideChevron:e,className:n,...r})});Ux.displayName="Accordion.Trigger";function $x(t){return d.jsx(jn.Message,{...t})}$x.displayName="Accordion.Message";function Wx(t){return d.jsx(jn.Icon,{...t})}Wx.displayName="Accordion.Icon";function Xx(t){return d.jsx(jn.Content,{...t})}Xx.displayName="Accordion.Content";function Yx(t){return d.jsx(jn.Title,{...t})}Yx.displayName="Accordion.Title";function Kx(t){return d.jsx(jn.Description,{...t})}Kx.displayName="Accordion.Description";function qx({className:t,children:e,...n}){const{open:r,hasPanel:o}=Wr(),s=_P(r),i=Sa();return o?d.jsx("span",{ref:s,className:Xr(i&&Os(i),AP(t)),"aria-hidden":!0,...n,children:e??d.jsx(wP,{})}):null}qx.displayName="Accordion.Indicator";const Zx=l.forwardRef(function(e,n){return d.jsx(jn.Panel,{ref:n,...e})});Zx.displayName="Accordion.Panel";function Qx({className:t,...e}){return d.jsx(ee,{as:"div",variant:"base",className:EP(t),...e})}Qx.displayName="Accordion.Body";function RP({defaultOpenId:t=null,defaultOpenIndex:e=null,openId:n,onOpenIdChange:r,size:o="base"}){const s=n!==void 0,i=SP(t,e),[a,c]=l.useState(i),u=s?n:a,f=l.useRef(0);f.current=0;const m=l.useCallback(g=>{if(g!=null)return g;const h=String(f.current);return f.current+=1,h},[]),p=l.useCallback(g=>{s||c(g),r==null||r(g)},[s,r]);return{contextValue:l.useMemo(()=>({openId:u,setOpenId:p,getItemId:m,size:o}),[m,u,p,o])}}const Jx=l.forwardRef(function({defaultOpenId:e=null,defaultOpenIndex:n=null,openId:r,onOpenIdChange:o,size:s="base",className:i,children:a,...c},u){const{contextValue:f}=RP({defaultOpenId:e,defaultOpenIndex:n,openId:r,onOpenIdChange:o,size:s});return d.jsx(Hx.Provider,{value:f,children:d.jsx("div",{ref:u,className:vP(i),...c,children:a})})});Jx.displayName="Accordion";const IP=Object.assign(Jx,{Item:zx,Heading:Vx,Trigger:Ux,Message:$x,Icon:Wx,Content:Xx,Title:Yx,Description:Kx,Indicator:qx,Panel:Zx,Body:Qx});function NP(t,e){return cr("flex w-full max-w-full flex-col gap-mid text-left",e==null?void 0:e.root,t)}function DP(t,e){return cr("flex flex-col gap-base",e==null?void 0:e.section,t)}function kP(t,e){return cr("text-base font-w-mid text-foreground",e==null?void 0:e.title,t)}function OP(t,e){return cr("text-base text-muted",e==null?void 0:e.description,t)}function PP(t,e){return cr("flex flex-wrap items-center justify-end gap-small pt-small",e==null?void 0:e.actions,t)}function BP(t,e){return cr("sr-only",e==null?void 0:e.errorSummary,t)}function jP(t,e){return cr("sr-only",e==null?void 0:e.announce,t)}function MP(t,e){return cr(t,e==null?void 0:e.field)}function eC({className:t="",classNames:e,...n}){const r=Mr();return d.jsx("div",{className:DP(t,{...r,section:e==null?void 0:e.section}),...n})}eC.displayName="Form.Section";function tC({className:t="",id:e,...n}){const r=Mr(),o=la();return d.jsx(ee,{as:"h2",variant:"mid",id:e??(o==null?void 0:o.titleId),className:kP(t,r),...n})}tC.displayName="Form.Title";function nC({className:t="",id:e,...n}){const r=Mr(),o=la();return d.jsx("p",{id:e??(o==null?void 0:o.descriptionId),className:OP(t,r),...n})}nC.displayName="Form.Description";function rC({className:t="",...e}){const n=Mr();return d.jsx("div",{className:PP(t,n),...e})}rC.displayName="Form.Actions";function Od({className:t="",id:e,...n}){const r=Mr(),o=la(),s=xn(),i=(s==null?void 0:s.getErrors())??{},a=HN(i);if(a.length===0)return null;const c=a.map(([,u])=>u).join(". ");return d.jsx("div",{id:e??(o==null?void 0:o.errorSummaryId),role:"alert","aria-live":"polite",className:BP(t,r),...n,children:c})}Od.displayName="Form.ErrorSummary";function Pd({className:t="",id:e,message:n}){const r=Mr(),o=la();return n?d.jsx("div",{id:e??(o==null?void 0:o.announceId),role:"status","aria-live":"polite","aria-atomic":"true",className:jP(t,r),children:n}):null}Pd.displayName="Form.Announce";function oC({name:t,rules:e,className:n="",classNames:r,children:o}){const s=Mr(),i=xn();return l.useEffect(()=>{if(!(!i||!e))return i.registerFieldRules(t,e),()=>i.unregisterFieldRules(t)},[i,t,e]),d.jsx("div",{className:MP(n,{...s,field:r==null?void 0:r.field}),children:o})}oC.displayName="Form.Field";function FP({defaultValues:t,values:e,onValuesChange:n,rules:r,resolver:o,validateMode:s="onSubmit",disabled:i=!1,readOnly:a=!1,size:c,onSubmit:u,onSubmitError:f}){const m=l.useId(),p=l.useId(),b=l.useId(),g=l.useId(),h={titleId:m,descriptionId:p,errorSummaryId:b,announceId:g},x=e!==void 0,[C,_]=l.useState(t??{}),v=x?e:C,[y,S]=l.useState({}),[A,E]=l.useState({}),[T,L]=l.useState(0),[w,R]=l.useState(!1),[N,D]=l.useState(null),P=l.useRef(new Map),j=l.useRef(r??{});j.current=r??{};const G=l.useCallback(ne=>{x||_(ne),n==null||n(ne)},[x,n]),k=l.useCallback(ne=>ne.split(".").reduce((se,be)=>{if(!(se==null||typeof se!="object"))return se[be]},v),[v]),O=l.useCallback((ne,$,se)=>{const be=zN(v,ne,$);if(G(be),se!=null&&se.shouldValidate){const Ie=fl($,be,j.current[ne]);S(Ae=>{const q={...Ae};return Ie?q[ne]=Ie:delete q[ne],q})}},[G,v]),M=l.useCallback(ne=>y[ne],[y]),B=l.useCallback(()=>y,[y]),U=l.useCallback(ne=>j.current[ne],[]),W=l.useCallback((ne,$)=>{E(se=>({...se,[ne]:$}))},[]),F=l.useCallback(ne=>!!A[ne],[A]),V=l.useCallback((ne,$)=>{$?P.current.set(ne,$):P.current.delete(ne)},[]),H=l.useCallback((ne,$)=>{$!=null&&(j.current={...j.current,[ne]:$})},[]),re=l.useCallback(ne=>{const $={...j.current};delete $[ne],j.current=$},[]),me=l.useCallback(ne=>{const $=fl(k(ne),v,j.current[ne]);return S(se=>{const be={...se};return $?be[ne]=$:delete be[ne],be}),$},[k,v]),pe=l.useCallback(()=>{const ne={};for(const $ of Object.keys(j.current)){const se=fl(k($),v,j.current[$]);se&&(ne[$]=se)}return S(ne),ne},[k,v]),Y=l.useCallback(()=>{dp(P.current,y)},[y]),te=l.useCallback(()=>D(null),[]),de=l.useMemo(()=>({disabled:i,readOnly:a,size:c,validateMode:s,isSubmitting:w,submitCount:T,getValue:k,setValue:O,getError:M,getErrors:B,getFieldRules:U,setTouched:W,isTouched:F,registerRef:V,registerFieldRules:H,unregisterFieldRules:re,validateField:me,validateForm:pe,focusFirstInvalid:Y,announce:N,clearAnnounce:te}),[N,te,i,Y,M,B,U,k,w,F,a,V,H,re,W,O,c,T,me,pe,s]),oe=l.useCallback(async ne=>{ne.preventDefault(),L(se=>se+1),D(null);let $=pe();if(o){const se=await o(v);se.errors&&($={...$,...se.errors},S($))}if(dl($)>0){D(WN(dl($))),dp(P.current,$),f==null||f($);return}if(u)try{R(!0),await u(v),D(XN())}finally{R(!1)}},[u,f,o,pe,v]),xe=dl(y)>0;return{shellIds:h,bindingValue:de,handleSubmit:oe,errors:y,hasErrors:xe,isSubmitting:w,announce:N}}const sC=l.forwardRef(function({children:e,className:n="",classNames:r,defaultValues:o,values:s,onValuesChange:i,rules:a,resolver:c,validateMode:u,readOnly:f,size:m,disabled:p,onSubmit:b,onSubmitError:g,...h},x){const{shellIds:C,bindingValue:_,handleSubmit:v,hasErrors:y,announce:S}=FP({defaultValues:o,values:s,onValuesChange:i,rules:a,resolver:c,validateMode:u,readOnly:f,size:m,disabled:p,onSubmit:b,onSubmitError:g,classNames:r});return d.jsx(ZL,{classNames:r,children:d.jsx(Gg.Provider,{value:_,children:d.jsx(QL,{shellIds:C,children:d.jsxs("form",{ref:x,noValidate:!0,onSubmit:v,"aria-labelledby":C.titleId,"aria-describedby":$N({descriptionId:C.descriptionId,errorSummaryId:C.errorSummaryId,hasErrors:y}),className:NP(n,r),...h,children:[d.jsx(Pd,{message:S}),d.jsx(Od,{}),e]})})})})});sC.displayName="Form";const GP=Object.assign(sC,{Section:eC,Title:tC,Description:nC,Actions:rC,ErrorSummary:Od,Announce:Pd,Field:oC}),HP={vertical:"flex flex-col gap-plus",horizontal:"flex flex-row flex-wrap items-start gap-x-mid gap-y-plus"},iC=l.forwardRef(function({size:e="small",...n},r){return d.jsx(Tu,{ref:r,size:e,...n})}),Bd=l.forwardRef(function({children:e,...n},r){return d.jsx(Ts,{ref:r,...n,children:e})});Bd.displayName="OptionGroupLegend";function aC({children:t,className:e,id:n,...r}){return d.jsx(Ye,{as:"span",variant:"small",id:n,className:e,...r,children:t})}function lC({children:t,className:e,...n}){return d.jsx(ca,{className:e,...n,children:t})}const cC=l.forwardRef(function({className:e,orientation:n="vertical",children:r,...o},s){return d.jsx("div",{ref:s,className:I("text-left",HP[n],e),...o,children:r})});function uC({children:t,...e}){return d.jsx(Bd,{...e,children:d.jsx(lC,{children:t})})}uC.displayName="CheckboxGroup.Legend";const jd=l.createContext(null);function zP({value:t,children:e}){return d.jsx(jd.Provider,{value:t,children:e})}function dC(){const t=l.useContext(jd);if(!t)throw new Error("CheckboxGroup components must be inside <CheckboxGroup>.");return t}function VP(){return l.useContext(jd)}function fC({id:t,...e}){const{hintId:n}=dC();return d.jsx(aC,{id:t??n,...e})}fC.displayName="CheckboxGroup.Hint";function mC({id:t,...e}){const{errorId:n}=dC();return d.jsx(Ze,{id:t??n,...e})}mC.displayName="CheckboxGroup.Error";const pC=l.forwardRef(function(e,n){return d.jsx(cC,{ref:n,...e})});pC.displayName="CheckboxGroup.List";function UP({isRequired:t=!1,selection:e="multiple",value:n,defaultValue:r,onValueChange:o,disabled:s=!1,hintId:i,errorId:a}){const c=Au(i),u=Eu(a),f=n!==void 0,[m,p]=l.useState(r),b=e==="single"?f?n==null?void 0:String(n):m:void 0,g=l.useCallback((v,y)=>{if(e!=="single")return;const S=y?v:void 0;f||p(S),o==null||o(S)},[f,o,e]),h=l.useRef(!1);l.useEffect(()=>{h.current=!1},[t,e]);const x=l.useCallback(()=>e!=="single"||!t||h.current?!1:(h.current=!0,!0),[t,e]),C=l.useMemo(()=>({selection:e,disabled:s,isRequired:t,hintId:c,errorId:u,selectedValue:b,selectSingleValue:g,claimRequiredAnchor:x}),[x,s,u,c,t,g,b,e]),_=l.useMemo(()=>({isRequired:t}),[t]);return{contextValue:C,fieldLabelCtx:_,hintId:c,errorId:u,disabled:s}}const hC=l.forwardRef(function(e,n){const{children:r,className:o,size:s,disabled:i=!1,isRequired:a,selection:c,value:u,defaultValue:f,onValueChange:m,hintId:p,errorId:b,...g}=e,{contextValue:h,fieldLabelCtx:x,hintId:C,errorId:_}=UP(e);return d.jsx(zP,{value:h,children:d.jsx(Xt.Provider,{value:x,children:d.jsx(iC,{ref:n,disabled:i,hintId:C,errorId:_,size:s,className:o,...g,children:r})})})});hC.displayName="CheckboxGroup";const $P=Object.assign(hC,{Legend:uC,Label:$e,Hint:fC,Error:mC,List:pC,Group:Fr,Actions:jo}),Md=l.createContext(null);function WP({value:t,children:e}){return d.jsx(Md.Provider,{value:t,children:e})}function gC(){const t=l.useContext(Md);if(!t)throw new Error("RadioGroup components must be inside <RadioGroup>.");return t}function XP(){return l.useContext(Md)}function bC({children:t,...e}){return d.jsx(Bd,{...e,children:d.jsx(lC,{children:t})})}bC.displayName="RadioGroup.Legend";function xC({id:t,...e}){const{hintId:n}=gC();return d.jsx(aC,{id:t??n,...e})}xC.displayName="RadioGroup.Hint";function CC({id:t,...e}){const{errorId:n}=gC();return d.jsx(Ze,{id:t??n,...e})}CC.displayName="RadioGroup.Error";const _C=l.forwardRef(function(e,n){return d.jsx(cC,{ref:n,...e})});_C.displayName="RadioGroup.List";function YP({isRequired:t=!1,value:e,defaultValue:n,onValueChange:r,disabled:o=!1,name:s,hintId:i,errorId:a}){const c=l.useId(),u=s??`radio-group-${c}`,f=Au(i),m=Eu(a),p=e!==void 0,[b,g]=l.useState(n),h=p?e==null?void 0:String(e):b,x=l.useCallback(S=>{t&&S===void 0||(p||g(S),r==null||r(S))},[p,t,r]),C=l.useRef(!1);l.useEffect(()=>{C.current=!1},[t,u]);const _=l.useCallback(()=>!t||C.current?!1:(C.current=!0,!0),[t]),v=l.useMemo(()=>({name:u,disabled:o,isRequired:t,hintId:f,errorId:m,selectedValue:h,selectValue:x,claimRequiredAnchor:_}),[_,o,m,u,f,t,x,h]),y=l.useMemo(()=>({isRequired:t}),[t]);return{contextValue:v,fieldLabelCtx:y,hintId:f,errorId:m,disabled:o}}const SC=l.forwardRef(function(e,n){const{children:r,className:o,size:s,disabled:i=!1,name:a,isRequired:c,value:u,defaultValue:f,onValueChange:m,hintId:p,errorId:b,...g}=e,{contextValue:h,fieldLabelCtx:x,hintId:C,errorId:_}=YP(e);return d.jsx(WP,{value:h,children:d.jsx(Xt.Provider,{value:x,children:d.jsx(iC,{ref:n,disabled:i,hintId:C,errorId:_,size:s,className:o,...g,children:r})})})});SC.displayName="RadioGroup";const KP=Object.assign(SC,{Legend:bC,Label:$e,Hint:xC,Error:CC,List:_C,Group:Fr,Actions:jo}),vC=l.forwardRef(function({children:e,className:n="",buttonSize:r,groupSegment:o,...s},i){const a=Po(),c=On(),u=r??(c==null?void 0:c.buttonSize)??"base",f=a!=null&&a.segmented?void 0:o??(c==null?void 0:c.segment),m=c==null?void 0:c.variant;return d.jsx("span",{ref:i,...s,className:kk({groupSegment:f,groupVariant:m,buttonSize:u,className:n}),children:d.jsx(ee,{variant:Rk[u],inheritColor:!0,as:"span",className:Ok,children:e})})});vC.displayName="ButtonGroupText";function qP({children:t,orientation:e="horizontal",segmented:n=!1,buttonSize:r="base",variant:o="default"}){const s=l.useMemo(()=>pd(t),[t]),i=l.useMemo(()=>wk(s),[s]),a=l.useMemo(()=>({segmented:n}),[n]);return{flat:s,segmentCount:i,layoutValue:a,orientation:e,segmented:n,buttonSize:r,variant:o}}function ZP({orientation:t}){return d.jsx("span",{"aria-hidden":!0,className:xx(t)})}const yC=l.forwardRef(function({children:e,className:n="",orientation:r="horizontal",segmented:o=!1,buttonSize:s="base",variant:i="default",...a},c){const{flat:u,segmentCount:f,layoutValue:m}=qP({children:e,orientation:r,segmented:o,buttonSize:s,variant:i});let p=-1;return d.jsx(qL,{value:m,children:d.jsx("div",{ref:c,role:"group",className:bx({orientation:r,segmented:o,variant:i,className:n}),...a,children:u.map((b,g)=>{if(!mx(b))return d.jsx(l.Fragment,{children:b},b.key??`bg-wrap-${g}`);if(o)return d.jsx(l.Fragment,{children:b},b.key??`bg-item-${g}`);p+=1;const h=px(p,f),x=hx(r,h);return d.jsxs(l.Fragment,{children:[d.jsx(Mg,{segment:x,buttonSize:s,variant:i,children:b}),i!=="gloss"&&h!=="last"&&h!=="only"?d.jsx(ZP,{orientation:r}):null]},b.key??`bg-seg-${g}`)})})})});yC.displayName="ButtonGroup";const QP=yC;function JP(t){return Array.from(t.querySelectorAll("[data-toggle-button-value]:not([disabled])")).filter(e=>e instanceof HTMLButtonElement)}function e1(t,e,n,r){if(t)return n!=null?n===e?0:-1:e===r?0:-1}function t1(t,e,n,r){if(r===0)return null;const o=e==="horizontal";switch(t){case"ArrowRight":return o?n<0?0:(n+1)%r:null;case"ArrowLeft":return o?n<0?r-1:(n-1+r)%r:null;case"ArrowDown":return o?null:n<0?0:(n+1)%r;case"ArrowUp":return o?null:n<0?r-1:(n-1+r)%r;default:return null}}function n1(t){return t?-1:0}function r1({disabled:t,isSingle:e,orientation:n,onKeyDown:r,select:o}){return s=>{if(r==null||r(s),s.defaultPrevented||t||!e)return;const i=JP(s.currentTarget);if(i.length===0)return;const a=i.findIndex(m=>m===document.activeElement),c=t1(s.key,n,a,i.length);if(c==null)return;s.preventDefault();const u=i[c];u.focus();const f=u.dataset.toggleButtonValue;f&&o(f)}}const TC="data-selection-fill",Fd="data-selection-fill-ready";function AC(t,e){z(t),t.setAttribute(Fd,""),t.dataset.pressed=e?"true":"false",X.set(t,{scale:e?1:0,autoAlpha:e?1:0})}function o1(t,e){return n=>{t.current=n,n&&!n.hasAttribute(Fd)&&AC(n,e)}}function vp(t,e,n=ue()||!Se().enableToggleButtonFill){if(z(t),t.setAttribute(Fd,""),t.dataset.pressed=e?"true":"false",n){X.set(t,{scale:e?1:0,autoAlpha:e?1:0});return}e?X.fromTo(t,{scale:0,autoAlpha:0},{scale:1,autoAlpha:1,...Ii(),overwrite:"auto"}):X.to(t,{scale:0,autoAlpha:0,...Ii(),overwrite:"auto"})}function EC(t,e,n){const r=n==null?void 0:n.deferFillFromPressRef,o=n==null?void 0:n.onFillStart,s=l.useRef(t),i=l.useRef(void 0),a=ue(),c=l.useMemo(()=>o1(e,s.current),[e]),u=l.useCallback(f=>{const m=e.current;m&&i.current!==f&&(i.current=f,o==null||o(f),vp(m,f,a))},[e,o,a]);return l.useLayoutEffect(()=>{const f=e.current;if(f){if(i.current===void 0){i.current=t,AC(f,t);return}i.current!==t&&(r!=null&&r.current||(i.current=t,o==null||o(t),vp(f,t,a)))}},[r,o,t,e,a]),{animateTo:u,bindFillRef:c}}function s1({animated:t,disabled:e,variant:n,groupSegment:r,forwardedRef:o,pressed:s,onFillStart:i,onPointerEnter:a,onPointerLeave:c,onPointerDown:u}){const f=l.useRef(null),m=l.useRef(!1),p=l.useRef(null),b=l.useRef(!1),{animateTo:g,bindFillRef:h}=EC(s,f,{deferFillFromPressRef:m,onFillStart:i}),x=l.useCallback(()=>{m.current=!1,p.current=null,b.current=!1},[]),C=l.useCallback(()=>{const T=p.current;T!==null&&(p.current=null,m.current=!1,g(T))},[g]),_=l.useCallback(()=>{b.current=!0,C()},[C]),v=t&&!e&&!ue(),y=aa({isGloss:n==="gloss",animated:t,enabled:!e,hasHoverShadow:n!=="gloss",useContentRef:!!r,forwardedRef:o,onPointerEnter:a,onPointerLeave:c,onPointerDown:u,onPressReleaseStart:v?_:void 0}),S=l.useCallback(T=>{v&&(m.current=!0,b.current=!1,p.current=!s),y.handlePointerDown(T)},[y,s,v]),A=l.useCallback(T=>{y.handlePointerLeave(T),x()},[x,y]),E=l.useCallback(T=>{if(!v){g(T);return}p.current=T,b.current&&C()},[g,C,v]);return{setRefs:y.setRefs,contentMotionRef:y.contentMotionRef,handlePointerEnter:y.handlePointerEnter,handlePointerLeave:A,handlePointerDown:S,bindFillRef:h,queueFillOnClick:E}}const LC=new Set(["ToggleButtonContent","ToggleButtonFill","ToggleButtonLabel","ToggleButtonIcon","ToggleButtonTrailing","ToggleButtonText"]);function wC(t,e){let n=!1;const r=o=>{if(!n)for(const s of l.Children.toArray(o)){if(!l.isValidElement(s))continue;const i=s.type.displayName;if(e(i)){n=!0;return}r(s.props.children)}};return r(t),n}function i1(t){return wC(t,e=>e!=null&&LC.has(e))}function yp(t,e){return wC(t,n=>n===e)}function a1(t){if(t==null||t===!1)return!1;if(typeof t=="string"||typeof t=="number")return!0;const e=l.Children.toArray(t).filter(o=>o!=null);if(e.length!==1)return!1;const n=e[0];if(typeof n=="string"||typeof n=="number")return!0;if(!l.isValidElement(n))return!1;const r=n.type.displayName;return r==null||!LC.has(r)}function Jn(...t){return I(...t)}function l1(t,e){const n=t!==void 0,[r,o]=l.useState(!!e),s=n?!!t:r,i=l.useCallback(a=>{n||o(a)},[n]);return[s,i,n]}const RC=l.createContext(null),IC=l.createContext(null),Zl=l.createContext({});function c1(){return l.useContext(RC)}function u1({classNames:t,children:e}){const n=l.useContext(Zl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Zl.Provider,{value:r,children:e})}function Uo(){return l.useContext(Zl)}function js(){return l.useContext(IC)}function d1({value:t,children:e}){return d.jsx(IC.Provider,{value:t,children:e})}const f1={default:"border-token bg-surface text-foreground",outline:"bg-transparent border-token text-foreground",ghost:"bg-transparent border-token border-transparent text-foreground",gloss:"border-0 bg-transparent text-foreground"},m1="group/toggle relative inline-flex origin-center items-center justify-center overflow-hidden outline-none text-foreground focus-ring",p1="gloss-btn",h1="bg-transparent",g1="cursor-not-allowed opacity-50",b1="cursor-pointer",x1="pointer-events-none absolute -inset-px z-0 origin-center motion-reduce:transition-none",C1="relative z-[1] inline-flex w-full min-w-0 items-center justify-center gap-xsmall",_1="origin-center will-change-transform",S1="inline-flex shrink-0 items-center justify-center [&_svg]:size-full",v1="inline-flex w-full min-w-0 items-center gap-xsmall",y1="min-w-0 shrink";function T1({slotClass:t,className:e}){return Jn(v1,t,e)}function A1(t,e){return Jn(y1,t,e)}function E1(t){return f1[t]}function L1({fillColor:t,pressed:e,roundingClass:n,slotClass:r}){return Jn(x1,t,Ro,e?`group-hover/toggle:${t}/80`:"group-hover/toggle:bg-default-hover",n,r)}function NC(t,e){return Jn(S1,le[t].icon,e)}function w1({variant:t,pressed:e,disabled:n,size:r,groupSegment:o,slotClass:s,className:i}){const a=t==="gloss",c=o?hn(o):"rounded-base",u=o?$r(o):"";return Jn(m1,a?Jn(p1,!o&&nn):Jn(!o&&ir),!a&&!e&&!n&&et(),!a&&E1(t),e&&h1,n?g1:b1,mu(r,!0),c,u,s,i)}function R1({groupSegment:t,slotClass:e}){return Jn(C1,t&&_1,e)}function I1(t){return t?hn(t):"rounded-base"}const N1={small:"small",base:"base",mid:"mid",large:"mid"},Gd=l.forwardRef(function({className:e="",...n},r){const o=js(),s=Uo();return o?d.jsx("span",{ref:r??o.bindFillRef,"aria-hidden":!0,className:L1({fillColor:o.fillColor,pressed:o.pressed,roundingClass:o.roundingClass,slotClass:I(s.fill,e)}),...n,[TC]:"","data-pressed":o.pressed?"true":"false"}):null});Gd.displayName="ToggleButtonFill";const Gi=l.forwardRef(function({className:e="",children:n,...r},o){const s=js(),i=Uo();return d.jsx("span",{ref:o??(s==null?void 0:s.contentMotionRef),className:R1({groupSegment:s==null?void 0:s.groupSegment,slotClass:I(i.content,e)}),...r,children:n})});Gi.displayName="ToggleButtonContent";const DC=l.forwardRef(function({className:e="",children:n,...r},o){const s=Uo();return d.jsx("span",{ref:o,className:T1({slotClass:s.label,className:e}),...r,children:n})});DC.displayName="ToggleButtonLabel";function Hd({className:t="",children:e,...n}){const r=js(),o=Uo(),s=(r==null?void 0:r.size)??"base";return d.jsx("span",{className:NC(s,I(o.leftIcon,t)),"aria-hidden":!0,...n,children:e})}Hd.displayName="ToggleButtonIcon";function zd({className:t="",children:e,...n}){const r=js(),o=Uo(),s=(r==null?void 0:r.size)??"base";return d.jsx("span",{className:NC(s,I(o.rightIcon,t)),"aria-hidden":!0,...n,children:e})}zd.displayName="ToggleButtonTrailing";function Vd({className:t="",children:e,...n}){const r=js(),o=Uo(),s=(r==null?void 0:r.size)??"base";return d.jsx(ee,{variant:N1[s],as:"span",inheritColor:!0,className:A1(o.text,t),...n,children:e})}Vd.displayName="ToggleButtonText";function D1({leftIcon:t,rightIcon:e,children:n}){const r=a1(n);return d.jsxs(d.Fragment,{children:[t!=null?d.jsx(Hd,{children:t}):null,r?d.jsx(Vd,{children:n}):n,e!=null?d.jsx(zd,{children:e}):null]})}function k1({inGroup:t,isSingleGroup:e}){return t&&e?"radio":void 0}function O1({inGroup:t,isSingleGroup:e,pressed:n}){return!t||!e?n:void 0}function P1({inGroup:t,isSingleGroup:e,pressed:n}){return t&&e?n:void 0}function B1({value:t,groupSegment:e,pressed:n,defaultPressed:r=!1,onPressedChange:o,onFillStart:s,variant:i,fillColor:a="bg-primary-tint",size:c,animated:u=!0,disabled:f=!1,className:m,classNames:p,children:b,onClick:g}){const h=c1(),x=On(),C=e??(x==null?void 0:x.segment),_=h!=null&&t!=null,v=(h==null?void 0:h.type)==="single",y=c??(h==null?void 0:h.size)??(x==null?void 0:x.buttonSize)??"base",S=i??(h==null?void 0:h.variant)??"default",A=f||!!(h!=null&&h.disabled),[E,T]=l1(_?void 0:n,_?!1:r),L=_?h.isSelected(t):E,w=_?n!==void 0?!!n:L:n!==void 0?!!n:E,R=I1(C),N=i1(b),D=N?void 0:m,P=w1({variant:S,pressed:w,disabled:A,size:y,groupSegment:C,slotClass:p==null?void 0:p.root,className:m}),j=l.useCallback((G,k)=>{if(g==null||g(G),G.defaultPrevented||A)return;if(_&&t!=null){h.select(t);return}const O=!w;k(O),T(O),o==null||o(O)},[A,h,_,t,g,o,w,T]);return{itemValue:t,groupCtx:h,groupSegment:C,inGroup:_,isSingleGroup:v,size:y,variant:S,disabled:A,pressed:w,onFillStart:s,fillColor:a,animated:u,classNames:p,roundingClass:R,buttonClass:P,role:k1({inGroup:_,isSingleGroup:v}),ariaPressed:O1({inGroup:_,isSingleGroup:v,pressed:w}),ariaChecked:P1({inGroup:_,isSingleGroup:v,pressed:w}),tabIndex:_&&v?h.tabIndexFor(t):void 0,isCompound:N,contentLayoutClass:D,children:b,handleClick:j}}const kC=l.forwardRef(function({className:e,classNames:n,value:r,groupSegment:o,pressed:s,defaultPressed:i,onPressedChange:a,onFillStart:c,variant:u,fillColor:f,size:m,type:p="button",leftIcon:b,rightIcon:g,animated:h,disabled:x,children:C,onClick:_,onPointerDown:v,onPointerEnter:y,onPointerLeave:S,...A},E){var D;const T=B1({value:r,groupSegment:o,pressed:s,defaultPressed:i,onPressedChange:a,onFillStart:c,variant:u,fillColor:f,size:m,animated:h,disabled:x,className:e,classNames:n,children:C,onClick:_}),L=s1({animated:T.animated,disabled:T.disabled,variant:T.variant,groupSegment:T.groupSegment,pressed:T.pressed,onFillStart:T.onFillStart,forwardedRef:E,onPointerEnter:y,onPointerLeave:S,onPointerDown:v}),w={size:T.size,groupSegment:T.groupSegment,contentMotionRef:L.contentMotionRef,bindFillRef:L.bindFillRef,fillColor:T.fillColor,pressed:T.pressed,roundingClass:T.roundingClass},R=yp(C,"ToggleButtonFill"),N=yp(C,"ToggleButtonContent");return d.jsx(d1,{value:w,children:d.jsx(u1,{classNames:T.classNames,children:d.jsxs("button",{ref:L.setRefs,type:p,disabled:T.disabled,"data-toggle-button-value":T.itemValue,role:T.role,"aria-pressed":T.ariaPressed,"aria-checked":T.ariaChecked,tabIndex:T.tabIndex,className:T.buttonClass,onPointerEnter:L.handlePointerEnter,onPointerLeave:L.handlePointerLeave,onPointerDown:L.handlePointerDown,onClick:P=>T.handleClick(P,L.queueFillOnClick),...A,children:[R?null:d.jsx(Gd,{}),T.isCompound?N?C:d.jsx(Gi,{children:C}):d.jsx(Gi,{className:I((D=T.classNames)==null?void 0:D.content,T.contentLayoutClass),children:d.jsx(D1,{leftIcon:b,rightIcon:g,children:T.children})})]})})})});kC.displayName="ToggleButtonRoot";const OC=Object.assign(kC,{Content:Gi,Fill:Gd,Label:DC,Icon:Hd,Trailing:zd,Text:Vd});function Ud(t){return t.type===OC}function j1(t){return t.reduce((e,n)=>e+(Ud(n)?1:0),0)}function M1(t){return t.reduce((e,n)=>{if(!Ud(n))return e;const r=n.props.value;return typeof r=="string"&&e.push(r),e},[])}function Tp(t){return t==null?[]:Array.isArray(t)?t:[t]}function Ap(t){if(t!=null)return Array.isArray(t)?t[0]:t}function F1(t,e,n,r){return t==="single"?n===e:r.includes(e)}function G1(t,e,n,r){return t==="single"?n===e?null:{kind:"single",value:e}:{kind:"multiple",value:r.includes(e)?r.filter(s=>s!==e):[...r,e]}}function H1({value:t,children:e}){return d.jsx(RC.Provider,{value:t,children:e})}function z1({orientation:t,separated:e,variant:n,className:r}){return bx({orientation:t,segmented:e,variant:n,className:r})}function V1(t){return xx(t)}function U1({orientation:t}){return d.jsx("span",{"aria-hidden":!0,className:V1(t)})}function $1({children:t,type:e="multiple",disabled:n=!1,size:r="base",variant:o="default",value:s,defaultValue:i,onValueChange:a,onKeyDown:c,orientation:u="horizontal"}){const f=e==="single",m=s!==void 0,[p,b]=l.useState(()=>Ap(i)),[g,h]=l.useState(()=>Tp(i)),x=f?m?Ap(s):p:void 0,C=l.useMemo(()=>f?[]:m?Tp(s):g,[g,m,f,s]),_=l.useRef(C);_.current=C;const v=l.useCallback(R=>F1(e,R,x,C),[C,x,e]),y=l.useCallback(R=>{if(n)return;if(f){const D=G1(e,R,x,C);if(D==null||D.kind!=="single")return;m||b(D.value),a==null||a(D.value);return}const N=Ou(_.current,R,!0);_.current=N,m||h(N),a==null||a(N)},[n,m,f,C,a,x,e]),S=l.useMemo(()=>pd(t),[t]),A=l.useMemo(()=>j1(S),[S]),E=l.useMemo(()=>M1(S)[0],[S]),T=l.useCallback(R=>e1(f,R,x,E),[E,f,x]),L=l.useMemo(()=>({type:e,disabled:n,size:r,variant:o,isSelected:v,select:y,tabIndexFor:T}),[n,v,y,r,T,e,o]),w=l.useMemo(()=>r1({disabled:n,isSingle:f,orientation:u,onKeyDown:c,select:y}),[n,f,c,u,y]);return{flat:S,segmentCount:A,contextValue:L,handleKeyDown:w,isSingle:f}}const PC=l.forwardRef(function(e,n){const{children:r,className:o="",orientation:s="horizontal",separated:i=!1,disabled:a=!1,size:c="base",variant:u="default",type:f="multiple",value:m,defaultValue:p,onValueChange:b,onKeyDown:g,...h}=e,{flat:x,segmentCount:C,contextValue:_,handleKeyDown:v,isSingle:y}=$1(e);let S=-1;return d.jsx(H1,{value:_,children:d.jsx("div",{ref:n,role:"toolbar",tabIndex:n1(a),"aria-orientation":s,"aria-disabled":a||void 0,className:z1({orientation:s,separated:i,variant:u,className:o}),...y?{onKeyDown:v}:{},...h,children:x.map((A,E)=>{if(!Ud(A))return d.jsx(l.Fragment,{children:A},A.key??`tbg-wrap-${E}`);if(i)return d.jsx(l.Fragment,{children:A},A.key??`tbg-item-${E}`);S+=1;const T=px(S,C),L=hx(s,T);return d.jsxs(l.Fragment,{children:[d.jsx(Mg,{segment:L,buttonSize:c,children:A}),u!=="gloss"&&T!=="last"&&T!=="only"?d.jsx(U1,{orientation:s}):null]},A.key??`tbg-seg-${E}`)})})})});PC.displayName="ToggleButtonGroup";const W1=PC,BC=l.createContext(null);function X1({value:t,children:e}){return d.jsx(BC.Provider,{value:t,children:e})}function Mn(){const t=l.useContext(BC);if(!t)throw new Error("AlertDialog.* components must be used inside <AlertDialog>.");return t}const Ql=l.createContext({});function Y1({classNames:t,children:e}){const n=l.useContext(Ql),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Ql.Provider,{value:r,children:e})}function on(){return l.useContext(Ql)}const $d=l.createContext(null);function K1({value:t,children:e}){return d.jsx($d.Provider,{value:t,children:e})}function q1(t){const e=l.useContext($d);if(!e)throw new Error(`${t} must be used inside <AlertDialog.Header>.`);return e}function Wd(){return l.useContext($d)}function st(...t){return I(...t)}function Z1(t){return"primary"}function Q1(t){switch(t){case"danger":case"success":case"info":case"warning":return t;default:return"default"}}function Ta(t,e){let n=!1;const r=o=>{if(!n)for(const s of l.Children.toArray(o)){if(!l.isValidElement(s))continue;const i=s.type.displayName;if(e(i)){n=!0;return}r(s.props.children)}};return r(t),n}function J1(t){return Ta(t,e=>e==="AlertDialogTitle")}function eB(t){return Ta(t,e=>e==="AlertDialogDescription")}function jC(t){return Ta(t,e=>e==="AlertDialogIndicator")}function MC(t){return Ta(t,e=>e==="AlertDialogClose")}function FC(t,e){return wd(t,e)}function GC(t,e){return Rd(t,e)}function tB(t,e,n,r){return r?!0:n===null?!1:n!==void 0?!0:FC(t,e)&&GC(t,e)!==null}function nB(t,e,n,r,o){const s=jC(o),i=MC(o);return{hasIndicator:tB(t,e,n,s),hasTitle:J1(o),hasDescription:eB(o),hasAction:!1,hasClose:i||r}}function HC(t,e){return l.Children.map(t,n=>{if(!l.isValidElement(n))return n;if(n.type===yo){const r=n.props;return l.cloneElement(n,{size:r.size??e})}if(n.type===l.Fragment){const r=n;return l.cloneElement(r,{key:r.key??void 0},HC(r.props.children,e))}return n})}function rB({open:t,variant:e}){const[n,r]=l.useState(!1),o=l.useRef(null),s=l.useRef(null),i=l.useRef(null),a=l.useRef(null),c=l.useRef(null),u=l.useMemo(()=>Mt(a,e==="gloss"),[e]);return l.useLayoutEffect(()=>{t&&r(!0)},[t]),l.useEffect(()=>{if(!n)return;const f=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=f}},[n]),l.useLayoutEffect(()=>{if(t||!n)return;const f=s.current,m=i.current;let p=!1;const b=()=>{p||(Gu({dialog:o.current,focusReturn:c.current,unmount:()=>r(!1)}),c.current=null)};if(!f||!m||$t()){b();return}z(f,m);const g={...ve(),overwrite:"auto"},h=Ob({overlay:f,panel:m,vars:g,onComplete:b});return()=>{p=!0,h.kill(),z(f,m)}},[t,n]),l.useLayoutEffect(()=>{if(!t||!n)return;const f=o.current;f&&!f.open&&(c.current=Fu(f),f.showModal());const m=s.current,p=i.current;if(!(!m||!p)){if($t()){Mu(m,p,{focusPanel:!0});return}kb({overlay:m,panel:p,vars:{...ve(),overwrite:"auto"}}),p.focus()}},[t,n]),{mounted:n,dialogRef:o,overlayRef:s,panelRef:i,bindGlossPanelRef:u}}function ht(...t){return I(...t)}function zC(t,e){return l.Children.map(t,n=>{if(!l.isValidElement(n))return n;if(n.type===yo){const r=n.props;return l.cloneElement(n,{size:r.size??e})}if(n.type===l.Fragment){const r=n;return l.cloneElement(r,{key:r.key??void 0},zC(r.props.children,e))}return n})}const oB="flex min-h-0 flex-1 flex-col gap-mid text-left",sB={headerPadding:"px-plus pt-base",bodyPadding:"px-plus py-small",footerPadding:"px-plus pb-base"},ml={headerPadding:"px-mid pt-plus",bodyPadding:"px-mid py-small",footerPadding:"px-mid pb-plus"},iB={small:{panelMax:"max-w-component-small",maxHeight:"max-h-[min(85dvh,26rem)]",headerGap:"gap-base",...sB,headingBlockGap:"flex min-w-0 flex-1 flex-col gap-xsmall text-left",titleVariant:"base",descVariant:"small",descClassName:"text-muted",bodyVariant:"small"},base:{panelMax:"max-w-component-base",maxHeight:"max-h-[min(90dvh,36rem)]",headerGap:"gap-plus",...ml,headingBlockGap:"flex min-w-0 flex-1 flex-col gap-base text-left",titleVariant:"mid",descVariant:"base",descClassName:"text-muted",bodyVariant:"base"},mid:{panelMax:"max-w-component-mid",maxHeight:"max-h-[min(90dvh,40rem)]",headerGap:"gap-plus",...ml,headingBlockGap:"flex min-w-0 flex-1 flex-col gap-base text-left",titleVariant:"mid",descVariant:"base",descClassName:"text-muted",bodyVariant:"base"},large:{panelMax:"max-w-component-large",maxHeight:"max-h-[min(90dvh,44rem)]",headerGap:"gap-plus",...ml,headingBlockGap:"flex min-w-0 flex-1 flex-col gap-base text-left",titleVariant:"mid",descVariant:"base",descClassName:"text-muted",bodyVariant:"mid"}},aB={small:"small",base:"base",mid:"base",large:"base"},lB="fixed inset-0 z-[100] m-0 flex h-full w-full max-h-none max-w-none items-center justify-center border-0 bg-transparent p-mid open:flex [&::backdrop]:bg-transparent",cB="bg-[color-mix(in_oklab,var(--color-foreground)_14%,transparent)] backdrop-blur-[14px] backdrop-saturate-150 motion-reduce:backdrop-blur-none",uB="bg-[color-mix(in_oklab,black_58%,transparent)]",dB="relative z-10 w-full outline-none",fB="flex min-h-0 flex-col overflow-hidden rounded-mid border-token bg-surface text-left text-foreground shadow-token-large",mB="gloss-panel gloss-deep flex min-h-0 w-full flex-col rounded-mid text-foreground",pB="flex shrink-0 items-start",hB="min-w-0",gB="min-w-0",bB="min-h-0 flex-1 overflow-y-auto py-small",xB="flex shrink-0 flex-wrap items-center justify-end gap-base",CB="shrink-0",VC="gloss-content";function UC(){return Db()}function $C(t,e){return ht("absolute inset-0",t?cB:uB,e)}function _B({variant:t,sizePreset:e,className:n,slotClass:r}){const o=t==="gloss";return ht(dB,e.panelMax,!o&&fB,!o&&e.maxHeight,r,n)}function SB(t,e){return ht(mB,t,e)}function WC(t,e=!1){return ht(oB,e&&VC,t)}function vB(t,e){return ht(bB,t,e)}function yB(t){return aB[t]}const TB="flex min-h-0 flex-1 flex-col gap-mid text-left",AB={headerPadding:"px-plus pt-base",bodyPadding:"px-plus py-small",footerPadding:"px-plus pb-base"},pl={headerPadding:"px-mid pt-plus",bodyPadding:"px-mid py-small",footerPadding:"px-mid pb-plus"},EB={small:{panelMax:"max-w-component-small",maxHeight:"max-h-[min(85dvh,26rem)]",headerGap:"gap-x-base",...AB,headingBlockGap:"flex min-w-0 flex-col gap-xsmall",iconClass:"icon-mid",titleVariant:"base",descVariant:"small",descClassName:"text-muted",bodyVariant:"small"},base:{panelMax:"max-w-component-base",maxHeight:"max-h-[min(90dvh,36rem)]",headerGap:"gap-x-plus gap-y-xsmall",...pl,headingBlockGap:"flex min-w-0 flex-col gap-base",iconClass:"icon-large",titleVariant:"mid",descVariant:"base",descClassName:"text-muted",bodyVariant:"base"},mid:{panelMax:"max-w-component-mid",maxHeight:"max-h-[min(90dvh,40rem)]",headerGap:"gap-x-plus gap-y-small",...pl,headingBlockGap:"flex min-w-0 flex-col gap-base",iconClass:"icon-large",titleVariant:"mid",descVariant:"base",descClassName:"text-muted",bodyVariant:"base"},large:{panelMax:"max-w-component-large",maxHeight:"max-h-[min(90dvh,44rem)]",headerGap:"gap-x-plus gap-y-small",...pl,headingBlockGap:"flex min-w-0 flex-col gap-base",iconClass:"icon-large",titleVariant:"mid",descVariant:"base",descClassName:"text-muted",bodyVariant:"mid"}},LB={small:"small",base:"base",mid:"base",large:"base"},wB="fixed inset-0 z-[100] m-0 flex h-full w-full max-h-none max-w-none items-center justify-center border-0 bg-transparent p-mid open:flex [&::backdrop]:bg-transparent",RB="relative z-10 w-full outline-none",IB="flex min-h-0 flex-col overflow-hidden rounded-mid text-left",NB="gloss-panel gloss-deep flex min-h-0 w-full flex-col rounded-mid text-left text-foreground",DB="gloss-content",kB="shrink-0",OB="shrink-0 [&_svg]:block",PB="shrink-0",BB="contents",jB="font-w-mid",MB="min-h-0 flex-1 overflow-y-auto py-small",FB="flex shrink-0 flex-wrap items-center justify-end gap-base";function GB(t){return I(Ox(t,"default"),"shadow-token-large")}function HB(t,e){return $C(t,e)}function zB(){return UC()}function VB(t,e){return st(MB,t,"text-left",e)}function XC(t){return st(TB,t)}function UB({variant:t,sizePreset:e,className:n,slotClass:r}){const o=t==="gloss";return st(RB,e.panelMax,!o&&IB,!o&&e.maxHeight,!o&&GB(t),r,n)}function $B(t,e){return st(NB,t,e)}function WB(t){return Px(t)}function YC(t){return LB[t]}function Xd({className:t,...e}){const n=on();return d.jsx("div",{className:XC(st(n.content,t)),...e})}Xd.displayName="AlertDialogContent";const Yd=l.forwardRef(function({className:e,onClick:n,...r},o){const{onOpenChange:s}=Mn(),i=Wd(),a=on();return d.jsx(Go,{ref:o,variant:"secondary",className:st(kB,i&&Tx(i.gridSlots),a.close,e),onClick:c=>{n==null||n(c),c.defaultPrevented||s(!1)},...r})});Yd.displayName="AlertDialogClose";function Kd({className:t,children:e,...n}){const{variant:r,status:o,sizePreset:s,gridSlots:i,headerIcon:a}=q1("AlertDialog.Indicator"),c=on();if(e===null)return null;const u=GC(r,o),f=e!==void 0?e:a!==void 0?a:FC(r,o)&&u!==null?d.jsx(u,{"aria-hidden":!0,className:s.iconClass}):null;return f===null?null:d.jsx("span",{className:st(OB,WB(o),Ir(i),c.indicator,t),...n,children:f})}Kd.displayName="AlertDialogIndicator";function KC({icon:t,showClose:e=!0,className:n,children:r,...o}){const{variant:s,status:i,sizePreset:a}=Mn(),c=on(),u=jC(r),f=MC(r),m=l.useMemo(()=>nB(s,i,t,e,r),[r,t,e,i,s]),p=l.useMemo(()=>({variant:s,status:i,sizePreset:a,gridSlots:m,headerIcon:t}),[m,t,a,i,s]),b=m.hasIndicator&&!u,g=e&&!f;return d.jsx(K1,{value:p,children:d.jsxs("div",{className:st(PB,a.headerPadding,Ho(m,a.headerGap),c.header,n),...o,children:[b?d.jsx(Kd,{}):null,r,g?d.jsx(Yd,{}):null]})})}KC.displayName="AlertDialogHeader";const qC=l.forwardRef(function({className:e,id:n,...r},o){const{titleId:s,sizePreset:i}=Mn(),a=Wd(),c=on();return d.jsx(ee,{ref:o,as:"h2",variant:i.titleVariant,id:n??s,className:st(jB,a&&zo(a.gridSlots),c.title,e),...r})});qC.displayName="AlertDialogTitle";function ZC({className:t,id:e,...n}){const{descriptionId:r,setHasDescription:o,sizePreset:s}=Mn(),i=Wd(),a=on();return l.useLayoutEffect(()=>(o(!0),()=>o(!1)),[o]),d.jsx(ee,{as:"p",variant:s.descVariant,id:e??r,className:st(s.descClassName,i&&ks(i.gridSlots),a.description,t),...n})}ZC.displayName="AlertDialogDescription";function QC({className:t,...e}){const n=on();return d.jsx("div",{className:st(BB,n.headingBlock,t),...e})}QC.displayName="AlertDialogHeadingBlock";function JC({className:t,children:e,...n}){const{sizePreset:r}=Mn(),o=on();return d.jsx("div",{className:VB(r.bodyPadding,st(o.body,t)),...n,children:d.jsx(ee,{variant:r.bodyVariant,as:"div",children:e})})}JC.displayName="AlertDialogBody";function e_({className:t,children:e,...n}){const{footerButtonSize:r,sizePreset:o}=Mn(),s=on(),i=l.useMemo(()=>HC(e,r),[e,r]);return d.jsx("div",{className:st(FB,o.footerPadding,s.footer,t),...n,children:i})}e_.displayName="AlertDialogFooter";const t_=l.forwardRef(function({children:e,asChild:n,className:r,onClick:o,onPointerDown:s,...i},a){const{open:c,onOpenChange:u}=Mn(),f=on(),m=l.useRef(null),p=Rs(),b=l.useCallback(x=>{m.current=x,dt(a,x)},[a]),g=l.useCallback(x=>{var C;c||p.current||x.button!==0||(x.preventDefault(),(C=m.current)==null||C.focus({preventScroll:!0}),ws({triggerRef:m,openingRef:p,setOpen:()=>u(!0)}))},[c,p,u]),h=l.useCallback(x=>{o==null||o(x),!x.defaultPrevented&&!c&&!p.current&&u(!0)},[o,c,p,u]);if(n&&l.isValidElement(e)){const x=l.Children.count(e)===1?e:null;if(x){const C=x;return l.cloneElement(C,{ref:(_=>{m.current=_}),className:st(f.trigger,C.props.className,r),onPointerDown:_=>{var v,y;g(_),(y=(v=C.props).onPointerDown)==null||y.call(v,_),s==null||s(_)},onClick:_=>{var v,y;(y=(v=C.props).onClick)==null||y.call(v,_),h(_)},"aria-haspopup":"dialog","aria-expanded":c})}}return d.jsx("button",{type:"button",ref:b,"aria-haspopup":"dialog","aria-expanded":c,className:st(f.trigger,r),onPointerDown:x=>{s==null||s(x),g(x)},onClick:h,...i,children:e})});t_.displayName="AlertDialog.Trigger";function n_({className:t,themeAnchor:e,children:n}){const{open:r,titleId:o,descriptionId:s,hasDescription:i,variant:a,sizePreset:c}=Mn(),u=rB({open:r,variant:a}),f=ju(r,e??null),m=Bu(f),p=Mo(f);return typeof document>"u"||!u.mounted?null:kr.createPortal(d.jsx(XB,{className:t,variant:a,sizePreset:c,portalTheme:p,lightUi:m,titleId:o,descriptionId:s,hasDescription:i,dialogRef:u.dialogRef,overlayRef:u.overlayRef,panelRef:u.panelRef,bindGlossPanelRef:u.bindGlossPanelRef,children:n}),document.body)}n_.displayName="AlertDialog.Panel";function XB({children:t,className:e,variant:n,sizePreset:r,portalTheme:o,lightUi:s,titleId:i,descriptionId:a,hasDescription:c,dialogRef:u,overlayRef:f,panelRef:m,bindGlossPanelRef:p}){const b=n==="gloss",g=on();return d.jsxs("dialog",{...o,ref:u,role:"alertdialog",onCancel:h=>h.preventDefault(),"aria-labelledby":i,"aria-describedby":c?a:void 0,className:st(wB,g.dialog),children:[d.jsx("div",{ref:f,className:HB(s,g.overlay),style:zB(),"aria-hidden":!0}),d.jsx("div",{ref:m,tabIndex:-1,className:UB({variant:n,sizePreset:r,className:e,slotClass:g.panel}),children:b?d.jsx("div",{ref:p,className:$B(r.maxHeight,g.glossPanel),children:d.jsx("div",{className:XC(st(DB,g.glossContent)),children:t})}):d.jsx(Xd,{children:t})})]})}function YB({open:t,onOpenChange:e,status:n,variant:r="default",size:o="base"}){const s=l.useId(),i=l.useId(),[a,c]=l.useState(!1),u=l.useCallback(g=>{c(g)},[]),f=Ed(r),m=Ld(n),p=EB[o];return{contextValue:{open:t,titleId:s,descriptionId:i,hasDescription:a,setHasDescription:u,onOpenChange:e,variant:f,status:m,size:o,sizePreset:p,footerButtonSize:YC(o)}}}function r_({open:t,onOpenChange:e,children:n,status:r,variant:o="default",size:s="base",classNames:i}){const a=YB({open:t,onOpenChange:e,status:r,variant:o,size:s});return d.jsx(Y1,{classNames:i,children:d.jsx(X1,{value:a.contextValue,children:n})})}r_.displayName="AlertDialog";const KB=Object.assign(r_,{Trigger:t_,Panel:n_,Content:Xd,Header:KC,Indicator:Kd,HeadingBlock:QC,Title:qC,Description:ZC,Body:JC,Footer:e_,Close:Yd}),o_=l.createContext(null),Jl=l.createContext({});function qB({value:t,children:e}){return d.jsx(o_.Provider,{value:t,children:e})}function ZB({classNames:t,children:e}){const n=l.useContext(Jl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Jl.Provider,{value:r,children:e})}function Fn(){const t=l.useContext(o_);if(!t)throw new Error("Dialog.* components must be used inside <Dialog>.");return t}function Gn(){return l.useContext(Jl)}const QB="Close";function JB({open:t,onOpenChange:e,variant:n,dismissOnBackdrop:r=!0}){const[o,s]=l.useState(!1),i=l.useRef(null),a=l.useRef(null),c=l.useRef(null),u=l.useRef(null),f=l.useRef(null),m=l.useMemo(()=>Mt(u,n==="gloss"),[n]);l.useLayoutEffect(()=>{t&&s(!0)},[t]),l.useEffect(()=>{if(!o)return;const b=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=b}},[o]),l.useLayoutEffect(()=>{if(t||!o)return;const b=a.current,g=c.current;let h=!1;const x=()=>{h||(Gu({dialog:i.current,focusReturn:f.current,unmount:()=>s(!1)}),f.current=null)};if(!b||!g||$t()){x();return}z(b,g);const C={...ve(),overwrite:"auto"},_=Ob({overlay:b,panel:g,vars:C,onComplete:x});return()=>{h=!0,_.kill(),z(b,g)}},[t,o]),l.useLayoutEffect(()=>{if(!t||!o)return;const b=i.current;b&&!b.open&&(f.current=Fu(b),b.showModal());const g=a.current,h=c.current;if(!(!g||!h)){if($t()){Mu(g,h,{focusPanel:!0});return}kb({overlay:g,panel:h,vars:{...ve(),overwrite:"auto"}}),h.focus()}},[t,o]);const p=l.useCallback(b=>{r&&b.target===b.currentTarget&&e(!1)},[r,e]);return{mounted:o,dialogRef:i,overlayRef:a,panelRef:c,bindGlossPanelRef:m,handleBackdropPointerDown:p}}function qd({className:t,...e}){const n=Gn();return d.jsx("div",{className:WC(ht(n.content,t)),...e})}qd.displayName="DialogContent";function s_({className:t,...e}){const{sizePreset:n}=Fn(),r=Gn();return d.jsx("div",{className:ht(pB,n.headerGap,n.headerPadding,r.header,t),...e})}s_.displayName="DialogHeader";const i_=l.forwardRef(function({className:e,id:n,...r},o){const{titleId:s,sizePreset:i}=Fn(),a=Gn();return d.jsx(ee,{ref:o,as:"h2",variant:i.titleVariant,id:n??s,className:ht(gB,a.title,e),...r})});i_.displayName="DialogTitle";function a_({className:t,id:e,...n}){const{descriptionId:r,setHasDescription:o,sizePreset:s}=Fn(),i=Gn();return l.useLayoutEffect(()=>(o(!0),()=>o(!1)),[o]),d.jsx(ee,{as:"p",variant:s.descVariant,id:e??r,className:ht(s.descClassName,i.description,t),...n})}a_.displayName="DialogDescription";function l_({className:t,...e}){const{sizePreset:n}=Fn(),r=Gn();return d.jsx("div",{className:ht(hB,n.headingBlockGap,r.headingBlock,t),...e})}l_.displayName="DialogHeadingBlock";const c_=l.forwardRef(function({className:e,onClick:n,"aria-label":r=QB,...o},s){const{onOpenChange:i}=Fn(),a=Gn();return d.jsx(Go,{ref:s,variant:"secondary","aria-label":r,className:ht(CB,a.close,e),onClick:c=>{n==null||n(c),c.defaultPrevented||i(!1)},...o})});c_.displayName="DialogClose";function u_({className:t,...e}){const{sizePreset:n}=Fn(),r=Gn();return d.jsx("div",{className:vB(n.bodyPadding,ht(r.body,t)),...e})}u_.displayName="DialogBody";function d_({className:t,children:e,...n}){const{footerButtonSize:r,sizePreset:o}=Fn(),s=Gn(),i=l.useMemo(()=>zC(e,r),[e,r]);return d.jsx("div",{className:ht(xB,o.footerPadding,s.footer,t),...n,children:i})}d_.displayName="DialogFooter";const f_=l.forwardRef(function({children:e,asChild:n,onClick:r,onPointerDown:o,...s},i){const{open:a,onOpenChange:c}=Fn(),u=l.useRef(null),f=Rs(),m=l.useCallback(g=>{u.current=g,dt(i,g)},[i]),p=l.useCallback(g=>{var h;a||f.current||g.button!==0||(g.preventDefault(),(h=u.current)==null||h.focus({preventScroll:!0}),ws({triggerRef:u,openingRef:f,setOpen:()=>c(!0)}))},[a,f,u,c]),b=l.useCallback(g=>{r==null||r(g),!g.defaultPrevented&&!a&&!f.current&&c(!0)},[r,a,f,c]);if(n&&l.isValidElement(e)){const g=l.Children.count(e)===1?e:null;if(g){const h=g;return l.cloneElement(h,{ref:(x=>{u.current=x}),onPointerDown:x=>{var C,_;p(x),(_=(C=h.props).onPointerDown)==null||_.call(C,x),o==null||o(x)},onClick:x=>{var C,_;(_=(C=h.props).onClick)==null||_.call(C,x),b(x)},"aria-haspopup":"dialog","aria-expanded":a})}}return d.jsx("button",{type:"button",ref:m,"aria-haspopup":"dialog","aria-expanded":a,onPointerDown:g=>{o==null||o(g),p(g)},onClick:b,...s,children:e})});f_.displayName="Dialog.Trigger";function m_({variant:t="default",dismissOnBackdrop:e=!0,className:n,themeAnchor:r,children:o}){const{open:s,onOpenChange:i,titleId:a,descriptionId:c,hasDescription:u,sizePreset:f}=Fn(),m=JB({open:s,onOpenChange:i,variant:t,dismissOnBackdrop:e}),p=ju(s,r??null),b=Bu(p),g=Mo(p);return typeof document>"u"||!m.mounted?null:kr.createPortal(d.jsx(ej,{className:n,variant:t,sizePreset:f,portalTheme:g,lightUi:b,titleId:a,descriptionId:c,hasDescription:u,dialogRef:m.dialogRef,overlayRef:m.overlayRef,panelRef:m.panelRef,bindGlossPanelRef:m.bindGlossPanelRef,onBackdropMouseDown:m.handleBackdropPointerDown,onDialogClose:()=>i(!1),onDialogCancel:h=>{h.preventDefault(),i(!1)},children:o}),document.body)}m_.displayName="Dialog.Panel";function ej({children:t,className:e,variant:n,sizePreset:r,portalTheme:o,lightUi:s,titleId:i,descriptionId:a,hasDescription:c,dialogRef:u,overlayRef:f,panelRef:m,bindGlossPanelRef:p,onBackdropMouseDown:b,onDialogClose:g,onDialogCancel:h}){const x=n==="gloss",C=Gn();return d.jsxs("dialog",{...o,ref:u,onClose:g,onCancel:h,"aria-labelledby":i,"aria-describedby":c?a:void 0,className:ht(lB,C.dialog),children:[d.jsx("div",{ref:f,className:$C(s,C.overlay),style:UC(),"aria-hidden":!0,onMouseDown:b}),d.jsx("div",{ref:m,tabIndex:-1,className:_B({variant:n,sizePreset:r,className:e,slotClass:C.panel}),children:x?d.jsx("div",{ref:p,className:SB(r.maxHeight,C.glossPanel),children:d.jsx("div",{className:WC(ht(VC,C.glossContent),!0),children:t})}):d.jsx(qd,{children:t})})]})}function tj({open:t,onOpenChange:e,size:n="base"}){const r=l.useId(),o=l.useId(),[s,i]=l.useState(!1),a=l.useCallback(f=>{i(f)},[]),c=iB[n];return{contextValue:{open:t,titleId:r,descriptionId:o,hasDescription:s,setHasDescription:a,onOpenChange:e,size:n,sizePreset:c,footerButtonSize:yB(n)}}}function p_({open:t,onOpenChange:e,size:n="base",children:r,classNames:o}){const s=tj({open:t,onOpenChange:e,size:n});return d.jsx(qB,{value:s.contextValue,children:d.jsx(ZB,{classNames:o,children:r})})}p_.displayName="Dialog";const nj=Object.assign(p_,{Trigger:f_,Panel:m_,Content:qd,Header:s_,HeadingBlock:l_,Title:i_,Description:a_,Close:c_,Body:u_,Footer:d_}),Zd=l.createContext(null),h_=l.createContext(null),ec=l.createContext({});function g_({classNames:t,children:e}){const n=l.useContext(ec),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(ec.Provider,{value:r,children:e})}function rj({value:t,children:e}){return d.jsx(h_.Provider,{value:t,children:e})}function b_(){const t=l.useContext(Zd);if(!t)throw new Error("Components Toast must be used inside <Toast.Provider>.");return t}function Ms(){const t=l.useContext(h_);if(!t)throw new Error("Toast.* must be inside <Toast>.");return t}function dr(){return l.useContext(ec)}const oj={small:{icon:le.small.spinnerIcon,border:le.small.spinnerBorder},base:{icon:le.base.spinnerIcon,border:le.base.spinnerBorder},mid:{icon:le.mid.spinnerIcon,border:le.mid.spinnerBorder},large:{icon:le.large.spinnerIcon,border:le.large.spinnerBorder}},sj={primary:"text-primary",foreground:"text-foreground",muted:"text-muted",secondary:"text-primary",danger:"text-danger",success:"text-success",info:"text-info",warning:"text-warning"},ij="inline-flex shrink-0 items-center justify-center",aj="box-border inline-block rounded-full border-current border-t-transparent animate-spin motion-reduce:animate-none",lj="flex items-end",cj="block shrink-0 rounded-full origin-bottom",Aa={small:{dotClass:"size-[calc(var(--icon-size-xsmall)*0.45)]",dotSizeVar:"calc(var(--icon-size-xsmall) * 0.45)",gapClass:"gap-[calc(var(--space-xsmall)*0.75)]",jumpPx:5,scalePeak:1.25},base:{dotClass:"size-[calc(var(--icon-size-xsmall)*0.6)]",dotSizeVar:"calc(var(--icon-size-xsmall) * 0.6)",gapClass:"gap-xsmall",jumpPx:7,scalePeak:1.3},mid:{dotClass:"size-[calc(var(--icon-size-xsmall)*0.75)]",dotSizeVar:"calc(var(--icon-size-xsmall) * 0.75)",gapClass:"gap-xsmall",jumpPx:9,scalePeak:1.35},large:{dotClass:"size-[calc(var(--icon-size-small)*0.75)]",dotSizeVar:"calc(var(--icon-size-small) * 0.75)",gapClass:"gap-small",jumpPx:12,scalePeak:1.4}},uj={primary:"bg-primary",foreground:"bg-foreground",muted:"bg-muted",secondary:"bg-primary",danger:"bg-danger",success:"bg-success",info:"bg-info",warning:"bg-warning"};function dj(t,e,n){const r=oj[t];return I(aj,r.icon,r.border,sj[e],n)}function fj(t,e){const n=Aa[t];return I(lj,n.gapClass,e)}function mj(t,e,n){return I(cj,Aa[t].dotClass,uj[e],n)}function pj(t){const{jumpPx:e,dotSizeVar:n}=Aa[t];return{height:`calc(${n} + ${e}px)`}}const hj=3;function gj(t,e){const{jumpPx:n,scalePeak:r}=Aa[e],{staggerSec:o,halfCycleSec:s,easeUp:i,easeDown:a,enabled:c}=b0();for(const u of t)z(u),X.set(u,{y:0,scale:1,transformOrigin:"50% 100%"});return c?t.map((u,f)=>X.to(u,{keyframes:[{y:-n,scale:r,duration:s,ease:i},{y:0,scale:1,duration:s,ease:a}],repeat:-1,delay:o*f,transformOrigin:"50% 100%"})):[]}function bj(t,e){const n=l.useSyncExternalStore(f0,tp,tp);l.useLayoutEffect(()=>{const r=t.current;if(!r)return;const o=Array.from(r.querySelectorAll("[data-loading-dot]")).slice(0,hj);if(o.length===0)return;const s=ue();let i=[];return s||(i=gj(o,e)),()=>{for(const a of i)a.kill();for(const a of o)z(a)}},[e,t,n])}const xj=[0,1,2];function x_({size:t,color:e,className:n}){return d.jsx("span",{"aria-hidden":!0,className:dj(t,e,n)})}function C_({size:t,color:e,className:n}){const r=l.useRef(null);return bj(r,t),d.jsx("span",{ref:r,className:I(fj(t),n),style:pj(t),"aria-hidden":!0,children:xj.map(o=>d.jsx("span",{"data-loading-dot":!0,className:mj(t,e)},o))})}C_.displayName="LoadingDots";x_.displayName="LoadingSpinner";const Qd=l.forwardRef(function({variant:e="spinner",size:n="base",color:r="primary",label:o="Loading",className:s="",...i},a){return d.jsx("span",{ref:a,role:"status","aria-live":"polite","aria-label":o,className:I(ij,s),...i,children:e==="dots"?d.jsx(C_,{size:n,color:r}):d.jsx(x_,{size:n,color:r})})});Qd.displayName="Loading";const Cj="Close";function _j(t){return t==="danger"||t==="warning"?"alert":"status"}function Sj(t){return`Notifications (${t})`}function Tt(...t){return I(...t)}const tc=8,vj=.04,xi=3,nc=4e3,ai=24;function yj(){return`toast-${Math.random().toString(36).slice(2)}`}function Fs(t,e){let n=!1;const r=o=>{if(!n)for(const s of l.Children.toArray(o)){if(!l.isValidElement(s))continue;const i=s.type.displayName;if(e(i)){n=!0;return}r(s.props.children)}};return r(t),n}function Tj(t){return Fs(t,e=>e==="ToastTitle")}function Aj(t){return Fs(t,e=>e==="ToastDescription")}function Ej(t){return Fs(t,e=>e==="ToastIndicator")}function Lj(t){return Fs(t,e=>e==="ToastActionButton")}function wj(t){return Fs(t,e=>e==="ToastCloseButton")}function Rj(t,e,n,r){return n?r:e?!0:t!=="default"}function Ij(t,e,n,r,o,s,i,a){const c=e!=null||Tj(a),u=n!=null||Aj(a);return{hasIndicator:Rj(t,s,i,Ej(a)),hasTitle:c,hasDescription:u,hasAction:i?Lj(a):r!=null,hasClose:i?wj(a):o!=null}}const Nj={default:"bg-surface border-token text-foreground",success:"bg-surface-tint-success border-token text-foreground",danger:"bg-surface-tint-danger border-token text-foreground",info:"bg-surface-tint-info border-token text-foreground",warning:"bg-surface-tint-warning border-token text-foreground"},Dj={default:"text-primary",success:"text-success",danger:"text-danger",info:"text-info",warning:"text-warning"},__="contents",kj="font-w-mid",Oj="text-muted",Pj="-mx-xsmall",Bj="inline-flex shrink-0 items-center justify-center";function jj(t,e,n){return Tt(Bj,e,Dj[t],n)}const Mj={default:"primary",success:"success",danger:"danger",info:"info",warning:"warning"},Fj="fixed z-[300] pointer-events-none",Gj="relative grid",Hj="pointer-events-none absolute",zj={"top-left":"top-4 left-4","top-center":"top-4 left-1/2 -translate-x-1/2","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-center":"bottom-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4"};function Vj(t){return zj[t]}function Uj(t){return Mj[t]}function $j({variant:t,status:e,size:n,gridSlots:r,slotClass:o,className:s}){const i=t==="gloss",a=Dn(n);return Tt(Ho(r,a.gridGap),`w-full ${a.shellPadding}`,i?I("gloss-panel gloss-deep border-0 text-foreground",nn):I("shadow-token-mid",Nj[e]),o,s)}function Wj({placement:t,slotClass:e}){return Tt(Fj,Vj(t),e)}function Xj(t){return Tt(Gj,t)}function Yj(t){return Tt(Hj,t)}function Jd({className:t,children:e,...n}){const{status:r,isLoading:o,gridSlots:s,sizePreset:i}=Ms(),a=dr(),c=jj(r,i.iconSvgClass);if(e!==void 0)return d.jsx("span",{className:Tt(c,Ir(s),a.indicator,t),...n,children:e});if(o)return d.jsx("span",{className:Tt(c,Ir(s),a.indicator,t),...n,children:d.jsx(Qd,{size:i.loadingSize,color:Uj(r)})});if(r==="default")return null;const u=Ad[r];return u?d.jsx("span",{className:Tt(c,Ir(s),a.indicator,t),...n,children:d.jsx(u,{"aria-hidden":!0})}):null}Jd.displayName="ToastIndicator";function S_({className:t,...e}){const n=dr();return d.jsx("div",{className:Tt(__,n.message,t),...e})}S_.displayName="ToastMessage";function v_({className:t,...e}){const n=dr();return d.jsx("div",{className:Tt(__,n.content,t),...e})}v_.displayName="ToastContent";function ef({className:t,id:e,...n}){const{titleId:r,gridSlots:o,sizePreset:s}=Ms(),i=dr();return d.jsx(ee,{as:"div",variant:s.titleVariant,id:e??r,className:Tt(kj,zo(o),i.title,t),...n})}ef.displayName="ToastTitle";function tf({className:t,id:e,...n}){const{descriptionId:r,gridSlots:o,sizePreset:s}=Ms(),i=dr();return d.jsx(ee,{as:"div",variant:s.descVariant,id:e??r,className:Tt(Oj,ks(o),i.description,t),...n})}tf.displayName="ToastDescription";function nf({className:t,...e}){const{gridSlots:n}=Ms(),r=dr();return d.jsx("div",{className:Tt(Os(n),r.action,t),...e})}nf.displayName="ToastActionButton";const rf=l.forwardRef(function({className:e,onClick:n,"aria-label":r=Cj,...o},s){const{dismiss:i,gridSlots:a}=Ms(),c=dr();return d.jsx(Go,{ref:s,size:"small",variant:"ghost","aria-label":r,className:Tt(Pj,Tx(a),c.close,e),onClick:u=>{n==null||n(u),u.defaultPrevented||i()},...o})});rf.displayName="ToastCloseButton";function Kj({gridSlots:t,title:e,description:n,action:r,onClose:o}){return d.jsxs(d.Fragment,{children:[t.hasIndicator?d.jsx(Jd,{}):null,e!=null?d.jsx(ef,{children:e}):null,n!=null?d.jsx(tf,{children:n}):null,r!=null?d.jsx(nf,{children:r}):null,o!=null?d.jsx(rf,{}):null]})}function qj({status:t="default",size:e,title:n,description:r,action:o,isLoading:s=!1,onClose:i,children:a}){const c=l.useId(),u=`${c}-title`,f=`${c}-description`,m=!!a,p=Td(e),b=Dn(p),g=l.useMemo(()=>Ij(t,n,r,o,i,s,m,a),[o,a,r,m,s,i,t,n]),h=_j(t),x=l.useMemo(()=>({status:t,size:p,sizePreset:b,titleId:u,descriptionId:f,isLoading:s,dismiss:i??(()=>{}),gridSlots:g}),[f,g,s,i,p,b,t,u]);return{isCompound:m,liveRole:h,titleId:u,size:p,itemCtx:x,gridSlots:g}}function Zj({entry:t,reverseIdx:e,total:n,isTop:r,isDismissing:o,onDismiss:s,onRemoveFinal:i,onHeightChange:a,providerClassNames:c}){const u=l.useRef(null),f=l.useRef(null),m=l.useRef(null),p=l.useRef(!1),b=Math.min(e,xi-1),g=1-b*vj,h=r?b*tc:-b*tc,x=e>=xi?0:1;l.useLayoutEffect(()=>{const y=m.current;if(!y)return;const S=ue()||!Se().enableToastStack,A=!p.current;if(p.current=!0,z(y),S){X.set(y,{y:h,scale:g,autoAlpha:x});return}A&&t.variant!=="gloss"?X.fromTo(y,{opacity:0},{opacity:x,...ve(),overwrite:"auto"}):X.to(y,{y:h,scale:g,autoAlpha:x,...ve(),overwrite:"auto"})},[t.variant,h,x,g]),l.useLayoutEffect(()=>{const y=f.current;if(!y)return;a(t.id,y.offsetHeight);const S=new ResizeObserver(()=>{a(t.id,y.offsetHeight)});return S.observe(y),()=>S.disconnect()},[t.id,a]),l.useLayoutEffect(()=>{const y=u.current;if(!y)return;if($t()){ha(y);return}const S=r?-ai:ai;ga({surface:y,vars:{...ve(),overwrite:"auto"},from:{y:S,scale:pa},to:{y:0,scale:1}})},[r]),l.useEffect(()=>{if(!o)return;const y=u.current;if(!y)return;if($t()){i(t.id);return}const S=r?-ai:ai;z(y),ba({surface:y,vars:{duration:.22,ease:"power2.in",overwrite:"auto"},exit:{y:S},onComplete:()=>i(t.id)})},[o,r,t.id,i]),l.useEffect(()=>{if(t.timeout===0||o||t.isLoading)return;const y=setTimeout(()=>s(t.id),t.timeout);return()=>clearTimeout(y)},[t.id,t.timeout,o,t.isLoading,s]);const C=l.useCallback(()=>s(t.id),[t.id,s]),_=e<n,v={...c,...t.classNames};return d.jsx("div",{ref:m,"aria-hidden":!_||void 0,className:"will-change-transform",style:{gridColumn:1,gridRow:1,transformOrigin:r?"top center":"bottom center",zIndex:xi+1-e,pointerEvents:e===0?"auto":"none"},children:d.jsx("div",{ref:u,children:d.jsx(g_,{classNames:v,children:d.jsx(of,{ref:f,status:t.status,variant:t.variant,size:t.size,title:t.title,description:t.description,action:t.action,isLoading:t.isLoading,onClose:C})})})})}function Qj({placement:t,sorted:e,dismissingIds:n,onDismiss:r,onRemoveFinal:o,classNames:s,defaultSize:i="base"}){const a=t.startsWith("top"),[c,u]=l.useState(new Map),f=l.useRef(null),m=l.useRef(null),p=l.useRef(0),b=l.useCallback((_,v)=>{u(y=>{const S=new Map(y);return S.set(_,v),S})},[]),g=(e[0]&&c.get(e[0].id))??0,h=Math.min(e.length-1,xi-1)*tc,x=g+h,C=x>0?x:p.current;return x>0&&(p.current=x),l.useLayoutEffect(()=>{const _=f.current;if(!_||C<=0)return;const v=ue()||!Se().enableToastStack;if(z(_),v){_.style.height=`${C}px`;return}X.to(_,{height:C,...ve(),overwrite:"auto"})},[C]),l.useLayoutEffect(()=>{const _=m.current;_&&X.set(_,{opacity:0})},[]),l.useLayoutEffect(()=>{var S;const _=m.current;if(!_)return;const v=ue(),y=e.length===1&&n.has(((S=e[0])==null?void 0:S.id)??"");if(z(_),v){X.set(_,{opacity:y?0:1});return}y?X.to(_,{opacity:0,duration:.22,ease:"power2.in",overwrite:"auto"}):X.to(_,{opacity:1,...ve(),overwrite:"auto"})},[e,n]),d.jsxs("div",{role:"region","aria-label":Sj(t),className:Wj({placement:t,slotClass:s==null?void 0:s.viewport}),style:{width:ZO(e,i)},children:[d.jsx("div",{ref:m,"aria-hidden":!0,className:Yj(s==null?void 0:s.scrim),style:{[a?"top":"bottom"]:`calc(-1 * ${En(An.offsetY)})`,left:`calc(-1 * ${En(An.insetX)})`,right:`calc(-1 * ${En(An.insetX)})`,height:En(An.height),background:En(a?An.gradientTop:An.gradientBottom),maskImage:En(An.mask),WebkitMaskImage:En(An.mask)}}),d.jsx("div",{ref:f,className:Xj(s==null?void 0:s.stack),style:{height:C||void 0,alignItems:a?"start":"end"},children:e.map((_,v)=>d.jsx(Zj,{entry:_,reverseIdx:v,total:e.length,isTop:a,isDismissing:n.has(_.id),onDismiss:r,onRemoveFinal:o,onHeightChange:b,providerClassNames:s},_.id))})]})}function Jj({defaultPlacement:t="bottom-center",defaultVariant:e="default",defaultSize:n="base",classNames:r}){const[o,s]=l.useState([]),[i,a]=l.useState(new Set),c=l.useRef(0),u=l.useCallback(x=>{const C=x.id??yj(),_={id:C,status:x.status??"default",variant:x.variant??e,size:x.size??n,title:x.title,description:x.description,action:x.action,timeout:x.timeout??nc,placement:x.placement??t,createdAt:++c.current,isLoading:x.isLoading??!1,classNames:{...r,...x.classNames}};return s(v=>[...v,_]),C},[t,n,e,r]),f=l.useCallback((x,C)=>{s(_=>_.map(v=>v.id===x?{...v,...C}:v))},[]),m=l.useCallback(x=>{a(C=>new Set([...C,x]))},[]),p=l.useCallback(x=>{s(C=>C.filter(_=>_.id!==x)),a(C=>{const _=new Set(C);return _.delete(x),_})},[]),b=l.useMemo(()=>[...new Set(o.map(x=>x.placement))],[o]),g=l.useMemo(()=>({add:u,update:f,dismiss:m}),[u,m,f]),h=l.useCallback(x=>o.filter(C=>C.placement===x).toSorted((C,_)=>_.createdAt-C.createdAt),[o]);return{toasts:o,dismissingIds:i,placements:b,ctx:g,sortedByPlacement:h,dismiss:m,removeFinal:p,providerClassNames:r,defaultSize:n}}function eM({children:t,defaultPlacement:e="bottom-center",defaultVariant:n="default",defaultSize:r="base",classNames:o}){const s=Jj({defaultPlacement:e,defaultVariant:n,defaultSize:r,classNames:o});return d.jsxs(Zd.Provider,{value:s.ctx,children:[t,typeof document<"u"&&s.placements.map(i=>kr.createPortal(d.jsx(Qj,{placement:i,sorted:s.sortedByPlacement(i),dismissingIds:s.dismissingIds,onDismiss:s.dismiss,onRemoveFinal:s.removeFinal,classNames:o,defaultSize:s.defaultSize}),document.body,i))]})}const of=l.forwardRef(function({status:e="default",variant:n="default",size:r="base",title:o,description:s,action:i,isLoading:a=!1,onClose:c,className:u,classNames:f,children:m,onPointerOver:p,onPointerOut:b,...g},h){const x=qj({status:e,size:r,title:o,description:s,action:i,isLoading:a,onClose:c,children:m}),C=n==="gloss",_=l.useRef(null),v=l.useMemo(()=>Mt(_,C),[C]),y=l.useCallback(E=>{v(E),_.current=E,typeof h=="function"?h(E):h&&(h.current=E)},[v,h]),S=Do(_,C),A=dr();return d.jsx(rj,{value:x.itemCtx,children:d.jsx(g_,{classNames:f,children:d.jsx("div",{ref:y,role:x.liveRole,"aria-labelledby":x.titleId,"aria-live":x.liveRole==="alert"?"assertive":"polite",className:$j({variant:n,status:e,size:x.size,gridSlots:x.gridSlots,slotClass:A.root,className:u}),onPointerOver:E=>{p==null||p(E),!E.defaultPrevented&&C&&S.onPointerOver(E)},onPointerOut:E=>{b==null||b(E),C&&S.onPointerOut(E)},...g,children:x.isCompound?m:d.jsx(Kj,{gridSlots:x.gridSlots,title:o,description:s,action:i,onClose:c})})})})});of.displayName="ToastRoot";function tM(){const t=b_(),e=l.useCallback(s=>t.add(s),[t]),n=l.useCallback(s=>(i,a)=>t.add({...a,status:s,title:i}),[t]),r=l.useCallback((s,i)=>{const a=t.add({status:"default",title:i.loading??"Loading…",timeout:0,isLoading:!0,placement:i.placement,classNames:i.classNames});return s.then(c=>{const u=typeof i.success=="function"?i.success(c):i.success;t.update(a,{status:"success",title:u,isLoading:!1,timeout:i.timeout??nc})},c=>{const u=i.error==null?"An error occurred":typeof i.error=="function"?i.error(c):i.error;t.update(a,{status:"danger",title:u,isLoading:!1,timeout:i.timeout??nc})}),a},[t]);return{toast:{show:e,success:n("success"),danger:n("danger"),info:n("info"),warning:n("warning"),promise:r,dismiss:t.dismiss}}}const y_=Object.assign(of,{Provider:eM,Message:S_,Indicator:Jd,Content:v_,Title:ef,Description:tf,ActionButton:nf,CloseButton:rf}),T_=l.createContext(null),rc=l.createContext({});function A_({value:t,children:e}){return d.jsx(T_.Provider,{value:t,children:e})}function nM({classNames:t,children:e}){const n=l.useContext(rc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(rc.Provider,{value:r,children:e})}function $o(){const t=l.useContext(T_);if(!t)throw new Error("Drawer.* components must be used inside <Drawer>.");return t}function sn(){return l.useContext(rc)}const rM="Close";function oM(t){switch(t){case"bottom":return"Drag down to close";case"top":return"Drag up to close";case"left":return"Drag left to close";case"right":return"Drag right to close"}}function at(...t){return I(...t)}function sM(t){return t.displayName}function iM(t){let e=!0;const n=[];let r=[];const o=()=>{if(r.length===0)return;const s=r;r=[],n.push({kind:"content",children:s})};return l.Children.forEach(t,s=>{if(!l.isValidElement(s)){r.push(s);return}const i=sM(s.type);if(i==="DrawerBackdrop"){s.props.isDismissable===!1&&(e=!1);return}if(i==="DrawerHandle"){o(),n.push({kind:"handle",node:s});return}r.push(s)}),o(),{backdropIsDismissable:e,panelSegments:n}}function aM(t,e){return e==="left"||e==="right"?t.offsetWidth:t.offsetHeight}function E_(t,e){const n=aM(t,e);switch(e){case"left":return{x:-n,y:0};case"right":return{x:n,y:0};case"top":return{x:0,y:-n};case"bottom":return{x:0,y:n}}}function lM(){return{x:0,y:0}}function cM(t,e){return E_(t,e)}function uM(t){X.set(t,{xPercent:0,yPercent:0,x:0,y:0})}function dM({overlay:t,panel:e,placement:n,vars:r}){z(t,e),uM(e),X.fromTo(t,{opacity:0},{opacity:1,...r}),X.fromTo(e,E_(e,n),{...lM(),...r})}function fM({overlay:t,panel:e,placement:n,vars:r,onComplete:o}){z(t,e);const s=X.timeline({onComplete:o});return s.to(t,{opacity:0,...r},0),s.to(e,{...cM(e,n),...r},0),s}function mM({open:t,onOpenChange:e,variant:n,placement:r,backdropIsDismissable:o}){const[s,i]=l.useState(!1),a=l.useRef(null),c=l.useRef(null),u=l.useRef(null),f=l.useRef(null),m=l.useRef(!1),p=l.useRef(null),b=t||s,g=l.useMemo(()=>Mt(f,n==="gloss"),[n]);l.useLayoutEffect(()=>{t&&(m.current=!1,i(!0))},[t]),l.useEffect(()=>{if(!b)return;const x=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=x}},[b]),l.useLayoutEffect(()=>{if(t||!s)return;const x=c.current,C=u.current;let _=!1;const v=()=>{_||(Gu({dialog:a.current,focusReturn:p.current,unmount:()=>i(!1)}),p.current=null)};if(m.current){m.current=!1,v();return}if(!x||!C||$t()){v();return}z(x,C);const y={...ve(),overwrite:"auto"},S=fM({overlay:x,panel:C,placement:r,vars:y,onComplete:v});return()=>{_=!0,S.kill(),z(x,C)}},[t,s,r]),l.useLayoutEffect(()=>{if(!t)return;const x=a.current;x&&!x.open&&(p.current=Fu(x),x.showModal());const C=c.current,_=u.current;if(!(!C||!_)){if($t()){Mu(C,_);return}dM({overlay:C,panel:_,placement:r,vars:{...ve(),overwrite:"auto"}})}},[t,r]),l.useLayoutEffect(()=>{!t||!u.current||u.current.focus()},[t]);const h=l.useCallback(x=>{o&&x.target===x.currentTarget&&e(!1)},[o,e]);return{showPortal:b,mounted:s,dialogRef:a,overlayRef:c,panelRef:u,skipCloseAnimRef:m,bindGlossPanelRef:g,handleBackdropMouseDown:h}}const pM={left:"left-0 top-0 h-full",right:"right-0 top-0 h-full",bottom:"bottom-0 inset-x-0 w-full",top:"top-0 inset-x-0 w-full"},hM={default:{horizontal:"max-w-[min(100vw,24rem)] w-full",vertical:"max-h-[90dvh]"},mid:{horizontal:"w-[50vw] max-w-full",vertical:"max-h-[50dvh]"},full:{horizontal:"w-screen",vertical:"h-dvh"}},L_={left:"rounded-r-mid",right:"rounded-l-mid",bottom:"rounded-t-mid",top:"rounded-b-mid"},gM={bottom:"pt-plus",top:"pb-plus",left:"pr-plus",right:"pl-plus"},bM="flex min-h-0 flex-1 flex-col gap-mid text-left",xM="px-mid pt-plus",CM="px-mid py-base",_M="px-mid pb-plus",SM="fixed inset-0 z-[100] m-0 h-full w-full max-h-none max-w-none border-0 bg-transparent p-0 open:block [&::backdrop]:bg-transparent",vM="bg-[color-mix(in_oklab,var(--color-foreground)_14%,transparent)] backdrop-blur-[14px] backdrop-saturate-150 motion-reduce:backdrop-blur-none",yM="bg-[color-mix(in_oklab,black_55%,transparent)]",TM="absolute z-10 flex flex-col outline-none overflow-hidden",AM="border-token bg-surface text-foreground shadow-token-large",EM="gloss-panel gloss-deep flex min-h-0 flex-1 flex-col text-foreground",LM="gloss-content flex min-h-0 min-w-0 flex-1 flex-col",wM="flex shrink-0 items-start gap-plus text-left",RM="flex min-w-0 flex-1 flex-col gap-xsmall text-left",IM="min-w-0",NM="text-muted",DM="min-h-0 flex-1 overflow-y-auto",kM="flex shrink-0 flex-wrap items-center justify-end gap-base",OM="shrink-0",PM="flex touch-none select-none shrink-0 items-center justify-center cursor-grab active:cursor-grabbing box-content",BM="h-1 w-10",jM="h-10 w-1",MM="rounded-full bg-tertiary";function FM(t,e){const n=hM[e];return t==="left"||t==="right"?n.horizontal:n.vertical}function GM(){return Db()}function HM({lightUi:t,dismissable:e,slotClass:n}){return at("absolute inset-0",t?vM:yM,e?"cursor-pointer":"cursor-default",n)}function zM({variant:t,placement:e,size:n,className:r,slotClass:o}){const s=n!=="full"?L_[e]:void 0;return at(TM,t!=="gloss"&&AM,pM[e],FM(e,n),s,o,r)}function VM({placement:t,size:e,slotClass:n}){const r=e!=="full"?L_[t]:void 0;return at(EM,r,n)}function UM(t){return at(bM,t)}function $M(t){return at(LM,t)}function WM(t){return at(DM,CM,t)}function XM({placement:t,slotClass:e,className:n}){return at(PM,t==="left"||t==="right"?"self-stretch w-xsmall":"h-xsmall w-full",gM[t],e,n)}function YM({placement:t,slotClass:e}){return at(MM,t==="left"||t==="right"?jM:BM,e)}const KM=.38,Ep=.45;function qM(t,e){return t==="left"?-e.offsetWidth:t==="right"?e.offsetWidth:t==="top"?-e.offsetHeight:e.offsetHeight}function ZM(t){return t==="left"||t==="right"?"x":"y"}function QM(t,e,n){X.set(t,{[e]:n})}function JM(t,e){return 1-Math.min(Math.abs(t)/Math.abs(e),1)}function eF(t,e,n,r,o,s){return{onPointerDown:l.useCallback(a=>{const c=t.current,u=e.current;if(!c||ue())return;const f=ZM(n),m=f==="x",p=m?a.clientX:a.clientY;let b=p,g=performance.now(),h=0;const x=qM(n,c),C=a.currentTarget;C.setPointerCapture(a.pointerId),z(c,u),c.style.willChange="transform";const _=y=>{if(y.pointerId!==a.pointerId)return;const S=m?y.clientX:y.clientY,A=S-p,E=performance.now(),T=E-g;T>0&&(h=(S-b)/T),b=S,g=E;const w=(n==="left"||n==="top"?-1:1)>0?Math.max(0,A):Math.min(0,A);QM(c,f,w),u&&X.set(u,{opacity:JM(w,x)})},v=y=>{if(y.pointerId!==a.pointerId)return;C.releasePointerCapture(a.pointerId),C.removeEventListener("pointermove",_),C.removeEventListener("pointerup",v),C.removeEventListener("pointercancel",v);const A=(m?y.clientX:y.clientY)-p,E=Math.abs(A)/Math.abs(x),T=n==="right"||n==="bottom"?h>Ep:h<-Ep,L={...ve(),overwrite:"auto"};if(E>=KM||T){z(c,u);const w=X.timeline({onComplete:()=>{c.style.willChange="",s&&(s.current=!0),r()}});w.fromTo(c,{[f]:A},{[f]:x,...L},0),u&&w.to(u,{opacity:0,...L},0)}else{z(c,u);const w=X.timeline({onComplete:()=>{c.style.willChange="",X.set(c,{clearProps:f}),u&&X.set(u,{opacity:1})}});w.fromTo(c,{[f]:A},{[f]:0,...L},0),u&&w.to(u,{opacity:1,...L},0)}};C.addEventListener("pointermove",_),C.addEventListener("pointerup",v),C.addEventListener("pointercancel",v)},[o,r,e,t,n,s])}}function w_(t){return null}w_.displayName="DrawerBackdrop";function Hi({className:t,...e}){const n=sn();return d.jsx("div",{className:UM(at(n.content,t)),...e})}Hi.displayName="DrawerContent";function tF({segment:t,variant:e}){const n=sn();return t.kind==="handle"?t.node:e==="gloss"?d.jsx("div",{className:$M(n.glossContent),children:d.jsx(Hi,{children:t.children})}):d.jsx(Hi,{children:t.children})}function R_({className:t,onPointerDown:e,...n}){const{onOpenChange:r,placement:o,overlayRef:s,panelRef:i,skipCloseAnimRef:a}=$o(),c=sn(),{onPointerDown:u}=eF(i,s,o,()=>r(!1),!1,a);return d.jsx("div",{"aria-label":oM(o),className:XM({placement:o,slotClass:c.handle,className:t}),onPointerDown:f=>{e==null||e(f),u(f)},...n,children:d.jsx("span",{"aria-hidden":!0,className:YM({placement:o,slotClass:c.handleGrip})})})}R_.displayName="DrawerHandle";function I_({className:t,...e}){const n=sn();return d.jsx("div",{className:at(wM,xM,n.header,t),...e})}I_.displayName="DrawerHeader";function N_({className:t,...e}){const n=sn();return d.jsx("div",{className:at(RM,n.headingBlock,t),...e})}N_.displayName="DrawerHeadingBlock";const D_=l.forwardRef(function({className:e,id:n,...r},o){const{titleId:s}=$o(),i=sn();return d.jsx(ee,{ref:o,as:"h2",variant:"mid",id:n??s,className:at(IM,i.title,e),...r})});D_.displayName="DrawerTitle";function k_({className:t,id:e,...n}){const{descriptionId:r,setHasDescription:o}=$o(),s=sn();return l.useLayoutEffect(()=>(o(!0),()=>o(!1)),[o]),d.jsx(ee,{as:"p",variant:"base",id:e??r,className:at(NM,s.description,t),...n})}k_.displayName="DrawerDescription";const O_=l.forwardRef(function({className:e,onClick:n,"aria-label":r=rM,...o},s){const{onOpenChange:i}=$o(),a=sn();return d.jsx(Go,{ref:s,variant:"secondary","aria-label":r,className:at(OM,a.close,e),onClick:c=>{n==null||n(c),c.defaultPrevented||i(!1)},...o})});O_.displayName="DrawerClose";function P_({className:t,...e}){const n=sn();return d.jsx("div",{className:WM(at(n.body,t)),...e})}P_.displayName="DrawerBody";function B_({className:t,...e}){const n=sn();return d.jsx("div",{className:at(kM,_M,n.footer,t),...e})}B_.displayName="DrawerFooter";const j_=l.forwardRef(function({children:e,asChild:n,onClick:r,onPointerDown:o,...s},i){const{open:a,onOpenChange:c}=$o(),u=l.useRef(null),f=Rs(),m=l.useCallback(g=>{u.current=g,dt(i,g)},[i]),p=l.useCallback(g=>{var h;a||f.current||g.button!==0||(g.preventDefault(),(h=u.current)==null||h.focus({preventScroll:!0}),ws({triggerRef:u,openingRef:f,setOpen:()=>c(!0)}))},[a,f,u,c]),b=l.useCallback(g=>{r==null||r(g),!g.defaultPrevented&&!a&&!f.current&&c(!0)},[r,a,f,c]);if(n&&l.isValidElement(e)){const g=l.Children.count(e)===1?e:null;if(g){const h=g;return l.cloneElement(h,{ref:(x=>{u.current=x}),onPointerDown:x=>{var C,_;p(x),(_=(C=h.props).onPointerDown)==null||_.call(C,x),o==null||o(x)},onClick:x=>{var C,_;(_=(C=h.props).onClick)==null||_.call(C,x),b(x)},"aria-haspopup":"dialog","aria-expanded":a})}}return d.jsx("button",{type:"button",ref:m,"aria-haspopup":"dialog","aria-expanded":a,onPointerDown:g=>{o==null||o(g),p(g)},onClick:b,...s,children:e})});j_.displayName="Drawer.Trigger";function M_({size:t="default",variant:e="default",className:n,themeAnchor:r,children:o}){const s=$o(),{open:i,onOpenChange:a,placement:c}=s,{backdropIsDismissable:u,panelSegments:f}=l.useMemo(()=>iM(o),[o]),m=mM({open:i,onOpenChange:a,variant:e,placement:c,backdropIsDismissable:u}),p=ju(i,r??null),b=Bu(p),g=Mo(p),h=l.useMemo(()=>({...s,overlayRef:m.overlayRef,panelRef:m.panelRef,skipCloseAnimRef:m.skipCloseAnimRef}),[s,m.overlayRef,m.panelRef,m.skipCloseAnimRef]);return typeof document>"u"||!m.showPortal?null:kr.createPortal(d.jsx(A_,{value:h,children:d.jsx(nF,{className:n,variant:e,placement:c,size:t,portalTheme:g,lightUi:b,titleId:s.titleId,descriptionId:s.descriptionId,hasDescription:s.hasDescription,backdropIsDismissable:u,panelSegments:f,dialogRef:m.dialogRef,overlayRef:m.overlayRef,panelRef:m.panelRef,bindGlossPanelRef:m.bindGlossPanelRef,onBackdropMouseDown:m.handleBackdropMouseDown,onDialogClose:()=>a(!1),onDialogCancel:x=>{x.preventDefault(),a(!1)}})}),document.body)}M_.displayName="Drawer.Panel";function nF({className:t,variant:e,placement:n,size:r,portalTheme:o,lightUi:s,titleId:i,descriptionId:a,hasDescription:c,backdropIsDismissable:u,panelSegments:f,dialogRef:m,overlayRef:p,panelRef:b,bindGlossPanelRef:g,onBackdropMouseDown:h,onDialogClose:x,onDialogCancel:C}){const _=sn(),v=f.map((y,S)=>d.jsx(tF,{segment:y,variant:e},y.kind==="handle"?`handle-${S}`:`content-${S}`));return d.jsxs("dialog",{...o,ref:m,onClose:x,onCancel:C,"aria-labelledby":i,"aria-describedby":c?a:void 0,className:at(SM,_.dialog),children:[d.jsx("div",{ref:p,className:HM({lightUi:s,dismissable:u,slotClass:_.overlay}),style:GM(),"aria-hidden":!0,onMouseDown:h}),d.jsx("div",{ref:b,tabIndex:-1,className:zM({variant:e,placement:n,size:r,className:t,slotClass:_.panel}),children:e==="gloss"?d.jsx("div",{ref:g,className:VM({placement:n,size:r,slotClass:_.glossPanel}),children:v}):v})]})}const rF="right";function oF({open:t,onOpenChange:e,placement:n=rF}){const r=l.useId(),o=l.useId(),[s,i]=l.useState(!1),a=l.useRef(null),c=l.useRef(null),u=l.useRef(!1),f=l.useCallback(p=>{i(p)},[]);return{contextValue:{open:t,titleId:r,descriptionId:o,hasDescription:s,setHasDescription:f,onOpenChange:e,placement:n,overlayRef:a,panelRef:c,skipCloseAnimRef:u}}}function F_({open:t,onOpenChange:e,placement:n="right",children:r,classNames:o}){const s=oF({open:t,onOpenChange:e,placement:n});return d.jsx(A_,{value:s.contextValue,children:d.jsx(nM,{classNames:o,children:r})})}F_.displayName="Drawer";const sF=Object.assign(F_,{Trigger:j_,Panel:M_,Backdrop:w_,Handle:R_,Content:Hi,Header:I_,HeadingBlock:N_,Title:D_,Description:k_,Close:O_,Body:P_,Footer:B_});function iF({forwardedRef:t,onPointerEnter:e,onPointerLeave:n,onPointerDown:r}){const o=l.useRef(null),s=l.useCallback(u=>{o.current=u,dt(t,u)},[t]),{handlePointerEnter:i,handlePointerLeave:a,handlePointerDown:c}=lr({isDisabled:!1,enabled:!0,textMotionRef:o,hoverLift:!0,onPointerEnter:e,onPointerLeave:n,onPointerDown:r});return{setAnchorRef:s,handlePointerEnter:i,handlePointerLeave:a,handlePointerDown:c}}const oc=l.createContext({});function aF({classNames:t,children:e}){const n=l.useContext(oc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(oc.Provider,{value:r,children:e})}function lF(){return l.useContext(oc)}const cF=!0,uF=!0,G_="Link.Icon";function Ea(...t){return I(...t)}function H_(t){if(l.isValidElement(t))return t.type.displayName}function z_(t){return l.Children.toArray(t).some(e=>{if(!l.isValidElement(e))return!1;if(H_(e)===G_)return!0;const n=e.props.children;return n!=null&&z_(n)})}function dF(t){const e=t.children!==void 0&&t.children!==null;return{node:e?t.children:"default",muted:!e}}function fF(t){const e=[];let n,r;return l.Children.forEach(t,o=>{if(l.isValidElement(o)&&H_(o)===G_){const s=o.props,i=dF(s);(s.position??"end")==="start"?n=i:r=i;return}e.push(o)}),{textChildren:e.length===1?e[0]:l.createElement(l.Fragment,null,...e),startIcon:n,endIcon:r}}function Lp(t,e,n,r){return t?{node:t.node==="default"?null:t.node,muted:t.muted}:{node:null,muted:!1}}function mF({leftIcon:t,rightIcon:e,showDefaultIcon:n=!1,defaultIconPosition:r="end"}){const o=n&&!t&&!e;return{usesDefaultIcon:o,defaultIconAtStart:o&&r==="start",defaultIconAtEnd:o&&r==="end"}}function pF({leftIcon:t,rightIcon:e,showDefaultIcon:n,defaultIconPosition:r,children:o}){var a,c;if(o!=null&&z_(o)){const u=fF(o),f=Lp(u.startIcon),m=Lp(u.endIcon);return{textChildren:u.textChildren,startIcon:f.node,endIcon:m.node,startIconMuted:f.muted,endIconMuted:m.muted,usesDefaultAtStart:((a=u.startIcon)==null?void 0:a.node)==="default",usesDefaultAtEnd:((c=u.endIcon)==null?void 0:c.node)==="default"}}const i=mF({leftIcon:t,rightIcon:e,showDefaultIcon:n,defaultIconPosition:r});return{textChildren:o??null,startIcon:t??null,endIcon:e??null,startIconMuted:i.defaultIconAtStart,endIconMuted:i.defaultIconAtEnd,usesDefaultAtStart:i.defaultIconAtStart,usesDefaultAtEnd:i.defaultIconAtEnd}}const hF="group/link inline-flex max-w-full min-w-0 items-center gap-xsmall rounded-mid no-underline outline-none w-fit text-primary focus-ring",gF="min-w-0 truncate font-w-mid",bF="underline decoration-current/70 underline-offset-[0.2em]",xF="text-muted group-hover/link:text-primary group-focus-visible/link:text-primary",CF="text-primary",_F="rotate-[-45deg]",SF={small:"small",base:"base",mid:"mid",large:"large"},V_={small:"icon-small",base:"icon-base",mid:"icon-mid",large:"icon-large"};function vF({slotClass:t,className:e}){return Ea(hF,t,e)}function yF({underline:t,slotClass:e}){return Ea(gF,t&&bF,e)}function TF({size:t,muted:e,slotClass:n}){return Ea(gn,V_[t],"[&_svg]:size-full",e?xF:CF,n)}function AF(t){return Ea(V_[t],_F)}function wp({size:t}){return d.jsx(Re.IoArrowForward,{"aria-hidden":cF,className:AF(t)})}function Rp({children:t,size:e,muted:n=!1,slotClass:r}){return d.jsx("span",{className:TF({size:e,muted:n,slotClass:r}),"aria-hidden":uF,children:t})}function EF({href:t,size:e,underline:n,textVariant:r,textChildren:o,startIcon:s,endIcon:i,startIconMuted:a,endIconMuted:c,usesDefaultAtStart:u,usesDefaultAtEnd:f,className:m="",setAnchorRef:p,handlePointerEnter:b,handlePointerLeave:g,handlePointerDown:h,...x}){const C=lF(),_=s??(u?d.jsx(wp,{size:e}):null),v=i??(f?d.jsx(wp,{size:e}):null);return d.jsxs("a",{ref:p,href:t,className:vF({slotClass:C.anchor,className:m}),onPointerEnter:b,onPointerLeave:g,onPointerDown:h,...x,children:[_?d.jsx(Rp,{size:e,muted:a,slotClass:C.iconStart,children:_}):null,d.jsx(ee,{as:"span",variant:r,inheritColor:!0,className:yF({underline:n,slotClass:C.text}),children:o}),v?d.jsx(Rp,{size:e,muted:c,slotClass:C.iconEnd,children:v}):null]})}function sf(t){return null}sf.displayName="Link.Icon";function LF({size:t="base",underline:e=!1,leftIcon:n,rightIcon:r,showDefaultIcon:o=!1,defaultIconPosition:s="end",children:i}){const a=pF({leftIcon:n,rightIcon:r,showDefaultIcon:o,defaultIconPosition:s,children:i});return{size:t,underline:e,textVariant:SF[t],...a}}const af=l.forwardRef(function({href:e,children:n,className:r="",size:o,underline:s,leftIcon:i,rightIcon:a,showDefaultIcon:c,defaultIconPosition:u,onPointerEnter:f,onPointerLeave:m,onPointerDown:p,...b},g){const h=LF({size:o,underline:s,leftIcon:i,rightIcon:a,showDefaultIcon:c,defaultIconPosition:u,children:n}),x=iF({forwardedRef:g,onPointerEnter:f,onPointerLeave:m,onPointerDown:p});return d.jsx(EF,{href:e,size:h.size,underline:h.underline,textVariant:h.textVariant,textChildren:h.textChildren,startIcon:h.startIcon,endIcon:h.endIcon,startIconMuted:h.startIconMuted,endIconMuted:h.endIconMuted,usesDefaultAtStart:h.usesDefaultAtStart,usesDefaultAtEnd:h.usesDefaultAtEnd,className:r,setAnchorRef:x.setAnchorRef,handlePointerEnter:x.handlePointerEnter,handlePointerLeave:x.handlePointerLeave,handlePointerDown:x.handlePointerDown,...b})});af.displayName="Link";const U_=l.forwardRef(function({classNames:e,...n},r){return d.jsx(aF,{classNames:e,children:d.jsx(af,{ref:r,...n})})});U_.displayName="Link";const wF=Object.assign(U_,{Icon:sf,Root:af});function Yr(...t){return I(...t)}const lf=l.createContext(null),sc=l.createContext({});function RF({value:t,children:e}){return d.jsx(lf.Provider,{value:t,children:e})}function IF({classNames:t,children:e}){const n=l.useContext(sc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(sc.Provider,{value:r,children:e})}function $_(){const t=l.useContext(lf);if(!t)throw new Error("TextArea compound parts must be inside <TextArea>.");return t}function NF(){return l.useContext(lf)}function Gs(){return l.useContext(sc)}const DF="Resize height";function kF({shellRef:t,blocked:e,variant:n,resizable:r,onPointerDown:o}){const s=n==="gloss",i=Fo(t,!e&&!s),a=ko(t,!e&&s),c=l.useCallback(f=>{t.current=f,f&&!r&&f.style.removeProperty("height"),!e&&s&&a.bindShellRef(f)},[e,a,s,r,t]),u=l.useCallback(f=>{if(o==null||o(f),f.defaultPrevented||e)return;const m=f.target;if(m instanceof HTMLElement&&m.closest("[data-textarea-resize-handle]"))return;const p=t.current;if(!(!p||ue())){if(s){a.onShellPointerDown();return}Xe(p)}},[e,a,s,o,t]);return{isGloss:s,setShellRef:c,shellPointerDown:u,shellPointerEnter:s?a.onShellPointerEnter:i.onShellPointerEnter,shellPointerLeave:s?a.onShellPointerLeave:i.onShellPointerLeave,shellFocusCapture:s?a.onShellFocusIn:void 0,shellBlurCapture:s?a.onShellFocusOut:void 0,glossShellHoverMotionClass:a.shellHoverMotionClass,standardShellHoverMotionClass:i.shellHoverMotionClass}}const OF={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},PF={small:"min-h-control-small",base:"min-h-control-base",mid:"min-h-control-mid",large:"min-h-control-large"},BF="flex flex-col items-stretch",jF=`box-border block min-h-0 w-full flex-1 resize-none overflow-auto bg-transparent font-inherit text-foreground outline-none placeholder:text-muted appearance-none [field-sizing:content] ${Et}`,MF="absolute bottom-[2px] right-0 block h-px w-[9px] origin-bottom-right rotate-[135deg] bg-muted",FF="absolute bottom-[6px] right-0 block h-px w-[6px] origin-bottom-right rotate-[135deg] bg-muted",GF="relative block size-3 shrink-0",HF="absolute bottom-0 right-0 z-[2] m-0 flex touch-none select-none appearance-none border-0 bg-transparent items-end justify-end p-xsmall",zF="cursor-not-allowed opacity-45",VF="cursor-ns-resize";function UF(t){return le[t].controlPad}function $F({variant:t,status:e,statusTinted:n}){return Ns({variant:t,statusTinted:n&&e!=="default",statusTintClass:e!=="default"?OF[e]:""})}function WF({variant:t,status:e,blocked:n,size:r,shellSurface:o,glossShellHoverMotionClass:s,standardShellHoverMotionClass:i,slotClass:a,className:c}){const u=t==="gloss";return Yr("relative w-full overflow-hidden rounded-base border-1",BF,u&&"relative",PF[r],o,Vr,Ur,u?s:zr(!n,e,t),!u&&i,n?"cursor-not-allowed opacity-55 shadow-token-base":"",a,c)}function XF({size:t,resizable:e,slotClass:n}){return Yr(jF,e&&"pr-mid",UF(t),n,Et)}function YF({disabled:t,slotClass:e}){return Yr(HF,t?zF:VF,e)}const KF=640;function qF(t,e,n,r){const o=l.useCallback(i=>{const a=t.current;a&&(i!=null?a.style.height=`${i}px`:a.style.removeProperty("height"))},[t]);return{onResizePointerDown:l.useCallback(i=>{if(n||!e)return;i.preventDefault(),i.stopPropagation();const a=t.current,c=i.currentTarget;if(!a)return;const u=i.clientY,f=a.getBoundingClientRect().height,m=Fc(r);c.setPointerCapture(i.pointerId);const p=g=>{if(g.pointerId!==i.pointerId)return;const h=Math.min(KF,Math.max(m,f+(g.clientY-u)));o(h)},b=g=>{g.pointerId===i.pointerId&&(c.releasePointerCapture(i.pointerId),c.removeEventListener("pointermove",p),c.removeEventListener("pointerup",b),c.removeEventListener("pointercancel",b))};c.addEventListener("pointermove",p),c.addEventListener("pointerup",b),c.addEventListener("pointercancel",b)},[n,e,o,t,r])}}function ZF(){return d.jsxs("span",{"aria-hidden":!0,className:GF,children:[d.jsx("span",{className:MF}),d.jsx("span",{className:FF})]})}function QF({disabled:t,className:e,onPointerDown:n}){return d.jsx("button",{type:"button","data-textarea-resize-handle":!0,"aria-label":DF,disabled:t,onPointerDown:n,className:YF({disabled:t,slotClass:e}),children:d.jsx(ZF,{})})}const cf=l.forwardRef(function({variant:e="default",status:n,size:r,rows:o=1,resizable:s=!0,placeholder:i,id:a,disabled:c,readOnly:u,className:f,onPointerDown:m,"aria-describedby":p,...b},g){const h=NF(),x=Gs(),C=l.useId(),_=a??(h==null?void 0:h.textareaId)??C,v=n??(h==null?void 0:h.status)??"default",y=r??(h==null?void 0:h.size)??"base",S=(h==null?void 0:h.isRequired)??!1,A=(h==null?void 0:h.hintConnected)??!1,E=(h==null?void 0:h.errorConnected)??!1,T=h==null?void 0:h.hintId,L=h==null?void 0:h.errorId,w=p??Ft(A?T:void 0,E?L:void 0),R=l.useRef(null),N=l.useRef(null),D=l.useCallback(M=>{N.current=M,typeof g=="function"?g(M):g&&(g.current=M)},[g]),P=!!(c||u),G=$F({variant:e,status:v,statusTinted:v==="danger"||v==="success"||v==="warning"}),k=kF({shellRef:R,blocked:P,variant:e,resizable:s,onPointerDown:m}),{onResizePointerDown:O}=qF(R,s,P,y);return d.jsxs("div",{ref:k.setShellRef,"data-slot":"textarea-shell",onPointerDown:k.shellPointerDown,onPointerEnter:k.shellPointerEnter,onPointerLeave:k.shellPointerLeave,onFocusCapture:k.shellFocusCapture,onBlurCapture:k.shellBlurCapture,className:WF({variant:e,status:v,blocked:P,size:y,shellSurface:G,glossShellHoverMotionClass:k.glossShellHoverMotionClass,standardShellHoverMotionClass:k.standardShellHoverMotionClass,slotClass:x.shell,className:f}),children:[d.jsx("textarea",{ref:D,id:_,rows:o,disabled:c,readOnly:u,placeholder:i,"aria-required":S||void 0,"aria-invalid":v==="danger"?!0:void 0,"aria-describedby":w,className:XF({size:y,resizable:s,slotClass:x.control}),...b}),s?d.jsx(QF,{disabled:P,className:x.resizeHandle,onPointerDown:O}):null]})});cf.displayName="TextAreaControl";function W_({className:t,classNames:e,...n}){const r=Gs();return d.jsx($e,{className:t,classNames:{...e,root:Yr(r.label,e==null?void 0:e.root)},...n})}W_.displayName="TextAreaLabel";function uf({children:t,status:e,className:n,id:r,...o}){const s=$_(),i=Gs(),a=e??(s.status==="danger"||s.status==="default"?"default":s.status);return d.jsx(Ye,{id:r??s.hintId,status:a,className:Yr(i.hint,n),...o,children:t})}uf.displayName="TextAreaHint";function df({children:t,className:e,id:n,...r}){const o=$_(),s=Gs();return d.jsx(Ze,{id:n??o.errorId,className:Yr(s.error,e),...r,children:t})}df.displayName="TextAreaError";function JF({label:t,hint:e,error:n,textareaId:r,labelId:o,size:s,status:i,controlProps:a}){const c=Gs();return d.jsxs(d.Fragment,{children:[t!=null?d.jsx($e,{id:o,classNames:{root:c.label},children:t}):null,d.jsx(cf,{id:r,size:s,status:i,...a}),e!=null?d.jsx(uf,{children:e}):null,n!=null?d.jsx(df,{children:n}):null]})}function eG({children:t,label:e,hint:n,error:r,id:o,isRequired:s=!1,status:i="default",size:a="base"}){const c=l.useId(),u=o??`textarea-${c}`,f=Yt(u),m=Kt(u),p=`${u}-label`,b=qt(t),g=n!=null||b&&ye(t,"TextAreaHint"),h=r!=null||b&&ye(t,"TextAreaError"),x=l.useMemo(()=>({textareaId:u,hintId:f,errorId:m,labelId:p,hintConnected:g,errorConnected:h,isRequired:s,status:i,size:a}),[m,h,g,f,s,p,a,i,u]),C=l.useMemo(()=>({controlId:u,labelId:p,isRequired:s}),[s,p,u]);return{fieldCtx:x,fieldLabelCtx:C,isCompound:b,textareaId:u,label:e,hint:n,error:r,status:i,size:a}}function X_({children:t,label:e,hint:n,error:r,className:o,classNames:s,id:i,isRequired:a=!1,status:c="default",size:u="base",...f}){const m=eG({children:t,label:e,hint:n,error:r,id:i,isRequired:a,status:c,size:u}),p=m.isCompound?t:d.jsx(JF,{label:m.label,hint:m.hint,error:m.error,textareaId:m.textareaId,labelId:m.fieldCtx.labelId,size:m.size,status:m.status,controlProps:f});return d.jsx(RF,{value:m.fieldCtx,children:d.jsx(IF,{classNames:s,children:d.jsx(Xt.Provider,{value:m.fieldLabelCtx,children:d.jsx(pn,{className:Yr(s==null?void 0:s.root,o),children:p})})})})}X_.displayName="TextArea";const tG=Object.assign(X_,{Label:W_,Control:cf,Hint:uf,Error:df});function tn(...t){return I(...t)}function Y_(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function nG(t){return new Map(t.map(e=>[e.value,e]))}function rG(t){return t.map(e=>e.value)}function oG({optionValues:t,activeValue:e,optionsByValue:n,delta:r}){if(t.length===0)return e;const o=e?t.indexOf(e):-1;let s=o<0?0:o;for(let i=0;i<t.length;i+=1){s=(s+r+t.length)%t.length;const a=t[s],c=n.get(a);if(a&&c&&!c.disabled)return a}return e}function sG(t,e){for(const n of t){const r=e.get(n);if(r&&!r.disabled)return n}return null}function iG(t,e){for(let n=t.length-1;n>=0;n-=1){const r=t[n],o=e.get(r);if(o&&!o.disabled)return r}return null}function aG(t,e){return t||(e==="danger"||e==="default"?"default":e)}const lG=[],K_=l.createContext(null);function cG({value:t,children:e}){return d.jsx(K_.Provider,{value:t,children:e})}function q_(){const t=l.useContext(K_);if(!t)throw new Error("Select compound-parts must be inside <Select>.");return t}const Z_=l.createContext(null);function uG({value:t,children:e}){return d.jsx(Z_.Provider,{value:t,children:e})}function La(){const t=l.useContext(Z_);if(!t)throw new Error("Select.* must be inside <Select>.");return t}const ic=l.createContext({});function dG({classNames:t,children:e}){const n=l.useContext(ic),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(ic.Provider,{value:r,children:e})}function fr(){return l.useContext(ic)}function fG(t){return`${t}-label`}function mG(t){return`${t}-listbox`}function pG(t){return{hintId:Yt(t),errorId:Kt(t),labelId:fG(t),listId:mG(t)}}function hG(t,e,n){return e&&n?`${t}-opt-${n}`:void 0}function gG(t){return t?"Close list":"Open list"}function Q_({anchorRef:t,disabled:e,isGloss:n,groupSegment:r,setOpen:o,onOpened:s,openingRef:i}){if(e||i.current)return;i.current=!0;const a=t.current;if(!a){i.current=!1;return}if(ue()){i.current=!1,o(!0),s==null||s();return}(n&&r==null?No(a,!0):Xe(a)).then(()=>{i.current=!1,!e&&(o(!0),s==null||s())})}function J_(){return l.useRef(!1)}const bG={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},xG={small:le.small.controlPad,base:le.base.controlPad,mid:le.mid.controlPad,large:le.large.controlPad},CG={small:le.small.chevronIcon,base:le.base.chevronIcon,mid:le.mid.chevronIcon,large:le.large.chevronIcon},_G="relative z-0 flex min-w-0 items-stretch border-1 text-left overflow-hidden motion-reduce:transition-none",SG="min-w-0 flex-1 truncate bg-transparent text-left text-foreground outline-none focus-ring",vG="text-muted",yG="flex shrink-0 origin-center items-center justify-center self-stretch px-small outline-none text-muted hover:text-foreground focus-ring",TG="pointer-events-none",AG="z-[110]",EG="gap-0 p-base",LG="overflow-y-auto overflow-x-hidden",wG="cursor-not-allowed opacity-55 shadow-token-base",RG="cursor-pointer";function IG({variant:t,status:e}){const n=e==="danger"||e==="success"||e==="warning";return Ns({variant:t,statusTinted:n,statusTintClass:n?bG[e]:""})}function NG(t){return t?I(hn(t),$r(t)):"rounded-base"}function DG({variant:t,status:e,disabled:n,groupSegment:r,shellHoverMotionClass:o,className:s,slotClass:i}){const a=t==="gloss";return tn(_G,(r==null?void 0:r.orientation)==="horizontal"?"flex-1":"w-full",NG(r),IG({variant:t,status:e}),Vr,Ur,a?"":zr(!n,e,t),o,n?wG:RG,i,s)}function kG({size:t,muted:e,className:n,slotClass:r}){return tn(SG,xG[t],e&&vG,r,n)}function OG({disabled:t,className:e,slotClass:n}){return tn(yG,t&&TG,n,e)}const ff=l.forwardRef(function({className:e,children:n,groupSegment:r,onPointerEnter:o,onPointerLeave:s,...i},a){const c=Po(),u=On(),f=fr(),m=La(),{open:p,setOpen:b,disabled:g,variant:h,status:x,anchorRef:C,listId:_,valueRef:v,value:y,optionValues:S,setActiveValue:A,activeValue:E,isRequired:T,hintConnected:L,errorConnected:w,hintId:R,errorId:N}=m,D=hG(_,p,E),P=Ft(L?R:void 0,w?N:void 0),j=J_(),G=h==="gloss",k=c!=null&&c.segmented?void 0:r??(u==null?void 0:u.segment),O=Fo(C,!g&&!G&&k==null),M=ko(C,!g&&G&&k==null),B=l.useCallback(V=>{C.current=V,!g&&G&&M.bindShellRef(V)},[C,g,M,G]),U=l.useCallback(()=>{const V=S.indexOf(y);A(V>=0?y:S[0]??null),requestAnimationFrame(()=>{var H;return(H=v.current)==null?void 0:H.focus()})},[S,A,y,v]),W=l.useCallback(()=>{Q_({anchorRef:C,disabled:g,isGloss:G,groupSegment:k,setOpen:b,onOpened:U,openingRef:j})},[C,g,U,k,G,b,j]),F=l.useCallback(V=>{g||p||V.button===0&&W()},[g,p,W]);return d.jsx("div",{ref:Y_(a,B),role:"combobox","aria-expanded":p,"aria-controls":p?_:void 0,"aria-haspopup":"listbox","aria-activedescendant":p?D:void 0,"aria-required":T||void 0,"aria-invalid":x==="danger"?!0:void 0,"aria-describedby":P,"aria-disabled":g||void 0,tabIndex:g?-1:0,onPointerDown:F,onPointerEnter:V=>{o==null||o(V),!V.defaultPrevented&&(G&&k==null?M.onShellPointerEnter(V):O.onShellPointerEnter(V))},onPointerLeave:V=>{s==null||s(V),G&&k==null?M.onShellPointerLeave(V):O.onShellPointerLeave(V)},onFocusCapture:G&&!g&&k==null?M.onShellFocusIn:void 0,onBlurCapture:G&&!g&&k==null?M.onShellFocusOut:void 0,...g&&G?{"data-gloss-disabled":""}:{},className:DG({variant:h,status:x,disabled:g,groupSegment:k,shellHoverMotionClass:G?M.shellHoverMotionClass:O.shellHoverMotionClass,className:e,slotClass:f.triggerGroup}),...i,children:n})});ff.displayName="SelectTriggerGroup";const mf=l.forwardRef(function({className:e,onKeyDown:n,onBlur:r,children:o,placeholder:s,...i},a){const c=fr(),u=La(),{selectId:f,open:m,setOpen:p,value:b,setValue:g,activeValue:h,setActiveValue:x,valueRef:C,anchorRef:_,options:v,optionValues:y,disabled:S,placeholder:A,size:E,variant:T,formValueRef:L,formOnBlur:w}=u,R=s??A,N=J_(),D=T==="gloss",P=l.useMemo(()=>nG(v),[v]),j=l.useMemo(()=>P.get(b),[P,b]),G=l.useCallback(()=>{const F=y.indexOf(b);x(F>=0?b:y[0]??null),requestAnimationFrame(()=>{var V;return(V=C.current)==null?void 0:V.focus()})},[y,x,b,C]),k=l.useCallback(()=>{Q_({anchorRef:_,disabled:S,isGloss:D,setOpen:p,onOpened:G,openingRef:N})},[_,S,G,D,p,N]),O=l.useCallback(F=>{const V=oG({optionValues:y,activeValue:h,optionsByValue:P,delta:F});V&&x(V)},[h,y,P,x]),M=l.useCallback(F=>{var H;const V=P.get(F);!V||V.disabled||(g(F),p(!1),(H=C.current)==null||H.focus())},[P,p,g,C]),B=l.useCallback(F=>{if(n==null||n(F),!(F.defaultPrevented||S)){if(!m){if(F.key==="ArrowDown"||F.key==="ArrowUp"){F.preventDefault(),k();return}if(F.key==="Enter"||F.key===" "){F.preventDefault(),k();return}return}if(F.key==="ArrowDown"){F.preventDefault(),O(1);return}if(F.key==="ArrowUp"){F.preventDefault(),O(-1);return}if(F.key==="Enter"||F.key===" "){F.preventDefault(),h&&M(h);return}if(F.key==="Escape"){F.preventDefault(),p(!1);return}if(F.key==="Home"){F.preventDefault();const V=sG(y,P);V&&x(V);return}if(F.key==="End"){F.preventDefault();const V=iG(y,P);V&&x(V)}}},[h,O,S,n,m,k,y,P,M,x,p]),U=l.useCallback(F=>{r==null||r(F),w==null||w()},[w,r]),W=o??(j?j.label:R);return d.jsx("button",{ref:Y_(a,C,L),id:f,type:"button",disabled:S,className:kG({size:E,muted:!j,className:e,slotClass:c.value}),onKeyDown:B,onBlur:U,...i,children:W})});mf.displayName="SelectValue";const pf=l.forwardRef(function({className:e,onPointerDown:n,...r},o){const s=fr(),{open:i,setOpen:a,disabled:c,size:u,valueRef:f}=La(),m=l.useRef(null),p=Hr(i,m),b=l.useCallback(h=>{p(h),typeof o=="function"?o(h):o&&(o.current=h)},[p,o]),g=l.useCallback(h=>{if(n==null||n(h),h.stopPropagation(),!c){if(i){a(!1);return}h.button===0&&(a(!0),requestAnimationFrame(()=>{var x;return(x=f.current)==null?void 0:x.focus()}))}},[c,n,i,a,f]);return d.jsx("button",{type:"button",ref:b,tabIndex:-1,disabled:c,"aria-label":gG(i),className:OG({disabled:c,className:e,slotClass:s.trigger}),onPointerDown:g,...r,children:d.jsx(Re.IoChevronDown,{className:tn(CG[u],s.triggerIcon),"aria-hidden":!0})})});pf.displayName="SelectTrigger";function hf({children:t,className:e,offset:n=Is,...r}){const o=fr(),{open:s,setOpen:i,anchorRef:a,listId:c,labelId:u,labelConnected:f,placeholder:m,menuMaxHeight:p,options:b,optionValues:g,value:h,setValue:x,activeValue:C,setActiveValue:_,variant:v}=La(),y=l.useCallback(A=>{const E=Array.isArray(A)?A[0]??"":A;x(E),i(!1)},[i,x]),S=t??(g.length===0?d.jsx(wr.Empty,{}):g.map(A=>{const E=b.find(T=>T.value===A);return d.jsx(wr.Item,{value:A,disabled:E.disabled,label:E.label,hint:E.hint,icon:E.icon},A)}));return d.jsx(kt,{open:s,onOpenChange:i,side:"bottom",anchorRef:a,variant:v==="gloss"?"gloss":"default",children:d.jsx(kt.Content,{matchAnchorWidth:!0,unstyled:!0,contentRole:void 0,offset:n,className:tn(AG,o.popover,e),...r,children:d.jsx(kt.Body,{className:tn(EG,o.popoverBody),children:d.jsx(wr,{listId:c,"aria-labelledby":f?u:void 0,"aria-label":f?void 0:m,value:h,onValueChange:y,activeValue:C,onActiveValueChange:_,selectionIndicator:!0,className:tn(LG,o.listBox),style:{maxHeight:p},children:S})})})})}hf.displayName="SelectPopover";function eS({className:t,classNames:e,...n}){const r=fr();return d.jsx($e,{className:t,classNames:{...e,root:tn(r.label,e==null?void 0:e.root)},...n})}eS.displayName="SelectLabel";function gf({children:t,status:e,className:n,id:r,...o}){const s=q_(),i=fr(),a=aG(e,s.status);return d.jsx(Ye,{id:r??s.hintId,status:a,className:tn(i.hint,n),...o,children:t})}gf.displayName="SelectHint";function bf({children:t,className:e,id:n,...r}){const o=q_(),s=fr();return d.jsx(Ze,{id:n??o.errorId,className:tn(s.error,e),...r,children:t??o.errorMessage})}bf.displayName="Select.Error";function PG({label:t,hint:e,error:n,labelId:r}){const o=fr();return d.jsxs(d.Fragment,{children:[t!=null?d.jsx($e,{id:r,classNames:{root:o.label},children:t}):null,d.jsxs(ff,{children:[d.jsx(mf,{}),d.jsx(pf,{})]}),d.jsx(hf,{}),e!=null?d.jsx(gf,{children:e}):null,n!=null?d.jsx(bf,{children:n}):null]})}function BG({children:t,label:e,hint:n,error:r,id:o,name:s,isRequired:i=!1,status:a="default",size:c="base",options:u=lG,value:f,defaultValue:m,onValueChange:p,variant:b,disabled:g=!1,placeholder:h="Select a value",menuMaxHeight:x="min(24rem, 70vh)"}){const C=Zb({name:s,value:f,disabled:g}),_=C.bound,v=C.disabled??g,y=l.useId(),S=On(),A=b??((S==null?void 0:S.variant)!=null?Vu(S.variant):"default"),E=o??`select-${y}`,{hintId:T,errorId:L,labelId:w,listId:R}=pG(E),N=qt(t),D=e!=null||N&&ye(t,"Label"),P=n!=null||N&&ye(t,"SelectHint"),j=r!=null||N&&ye(t,"SelectError"),G=f!==void 0||_,[k,O]=l.useState(m??""),M=_?String(C.value??""):G?f??"":k,B=l.useCallback(de=>{G||O(de),p==null||p(de),_&&C.setValue(de)},[_,C,G,p]),[U,W]=l.useState(!1),[F,V]=l.useState(null),H=l.useRef(null),re=l.useRef(null),me=l.useMemo(()=>rG(u),[u]);l.useEffect(()=>{var de;!U||!F||(de=document.getElementById(`${R}-opt-${F}`))==null||de.scrollIntoView({block:"nearest"})},[F,R,U]);const pe=l.useMemo(()=>({selectId:E,hintId:T,errorId:L,labelId:w,labelConnected:D,hintConnected:P,errorConnected:j,isRequired:i,status:a,size:c,errorMessage:r}),[E,r,L,j,P,D,T,i,w,c,a]),Y=l.useMemo(()=>({...pe,open:U,setOpen:W,value:M,setValue:B,listId:R,activeValue:F,setActiveValue:V,anchorRef:H,valueRef:re,variant:A,disabled:v,placeholder:h,menuMaxHeight:x,options:u,optionValues:me,formValueRef:_?C.ref:void 0,formOnBlur:_?C.onBlur:void 0}),[F,v,pe,_,C,R,x,U,me,u,h,B,M,A]),te=l.useMemo(()=>({controlId:E,labelId:w,isRequired:i}),[E,i,w]);return{isCompound:N,label:e,hint:n,error:r,children:t,fieldCtx:pe,selectCtx:Y,fieldLabelCtx:te}}function tS({children:t,label:e,hint:n,error:r,className:o,classNames:s,id:i,isRequired:a,status:c,size:u,options:f,value:m,defaultValue:p,onValueChange:b,variant:g,disabled:h,placeholder:x,menuMaxHeight:C,name:_,...v}){const y=xn(),S=typeof _=="string"?_:void 0,A=S?y==null?void 0:y.getError(S):void 0,E=r??A,T=c==="default"&&A?"danger":c,L=u??(y==null?void 0:y.size)??"base",w=BG({children:t,label:e,hint:n,error:E,id:i,name:_,isRequired:a,status:T,size:L,options:f,value:m,defaultValue:p,onValueChange:b,variant:g,disabled:h,placeholder:x,menuMaxHeight:C});return d.jsx(cG,{value:w.fieldCtx,children:d.jsx(uG,{value:w.selectCtx,children:d.jsx(dG,{classNames:s,children:d.jsx(Xt.Provider,{value:w.fieldLabelCtx,children:d.jsx(pn,{className:tn(o,s==null?void 0:s.root),...v,children:w.isCompound?t:d.jsx(PG,{label:w.label,hint:w.hint,error:w.error,labelId:w.fieldCtx.labelId})})})})})})}tS.displayName="Select";const jG=Object.assign(tS,{Label:eS,TriggerGroup:ff,Value:mf,Trigger:pf,Popover:hf,Hint:gf,Error:bf});function Ue(...t){return I(...t)}function MG(t){return t==="default"?"base":t}function FG({slotClassNames:t,classNames:e,className:n}){return{shell:Ue(t.indicator,e==null?void 0:e.shell,e==null?void 0:e.indicator,n),fill:Ue(t.indicatorFill,e==null?void 0:e.fill,e==null?void 0:e.indicatorFill),mark:Ue(t.indicatorMark,e==null?void 0:e.mark,e==null?void 0:e.indicatorMark)}}function GG(t){let e=!1;const n=r=>{if(!e)for(const o of l.Children.toArray(r)){if(!l.isValidElement(o))continue;const s=o.props;if(s.htmlFor!=null){e=!0;return}n(s.children)}};return n(t),e}function HG(t){return!/\bflex-col\b/.test(t??"")}function zG(t,e){const n=t!==void 0,[r,o]=l.useState(!!e),s=n?!!t:r,i=l.useCallback(a=>{n||o(a)},[n]);return[s,i,n]}const nS=l.createContext(null),ac=l.createContext({});function Ip({value:t,children:e}){return d.jsx(nS.Provider,{value:t,children:e})}function Np({classNames:t,children:e}){const n=l.useContext(ac),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(ac.Provider,{value:r,children:e})}function Kr(){const t=l.useContext(nS);if(!t)throw new Error("Checkbox.* parts must be used inside <Checkbox>.");return t}function qr(){return l.useContext(ac)}function VG(){const t=Kr(),e=l.useRef(null),n=l.useRef(!0),r=ue();return l.useLayoutEffect(()=>{const o=e.current;if(!o)return;if(r){z(o),o.style.opacity=t.isDisabled?"0.48":"1";return}if(n.current){n.current=!1,o.style.opacity=t.isDisabled?"0.48":"1";return}z(o);const s=Number.parseFloat(getComputedStyle(o).opacity),i=Number.isFinite(s)?s:1;X.fromTo(o,{autoAlpha:i},{autoAlpha:t.isDisabled?.48:1,...ve(),overwrite:"auto"})},[t.isDisabled,r]),e}function UG({isDisabled:t,enableTextMotion:e,textMotionRef:n,onPointerDown:r}){return lr({isDisabled:t,enabled:e,textMotionRef:n,onPointerDown:r})}const Hs={small:{title:"small",desc:"tools",gridGap:"gap-x-small gap-y-xsmall"},base:{title:"base",desc:"small",gridGap:"gap-x-base gap-y-xsmall"},mid:{title:"mid",desc:"small",gridGap:"gap-x-plus gap-y-xsmall"},large:{title:"large",desc:"base",gridGap:"gap-x-plus gap-y-xsmall"}},$G="absolute m-[-1px] h-px w-px overflow-hidden border-0 p-0 opacity-0 [clip:rect(0,0,0,0)]",WG="absolute inset-0 z-[2] m-0 h-full w-full cursor-pointer opacity-0",XG="relative inline-flex shrink-0 items-center justify-center",YG="relative inline-flex items-center justify-center",KG="min-w-0",qG="cursor-pointer",ZG="inline-flex flex-wrap items-center gap-x-xsmall gap-y-0 font-w-mid",QG="min-w-0",JG="origin-center will-change-transform",rS="text-muted",oS="text-danger",eH="text-danger",sS="text-muted",iS="text-muted",tH="origin-center will-change-transform",nH="min-w-0 font-w-mid",rH="relative cursor-pointer select-none rounded-small text-left",oH="cursor-not-allowed",sH="has-[:focus-visible]:outline has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-primary",iH="m-0 min-w-0 border-0 p-0",aH="contents";function lH(){return ua()}function cH(t,e,n){return I(rH,wu(t,e),sH,n)}function aS(){return da()}function zi(t){return fa(t)}function lS(t){return Ru(t)}const xf=l.forwardRef(function({className:e,children:n,...r},o){const s=Kr(),i=qr(),a=VG();return d.jsx("span",{ref:o,className:Ue(XG,lH(),i.control,e),...r,children:d.jsxs("span",{ref:a,className:Ue(YG,i.controlTrack),children:[d.jsx("input",{ref:s.inputProps.inputRef,id:s.inputId,type:"checkbox",className:s.isCompound?Ue(WG,i.input):Ue($G,i.input),disabled:s.isDisabled,name:s.inputProps.name,value:s.inputProps.value,required:s.inputProps.required,form:s.inputProps.form,autoFocus:s.inputProps.autoFocus,tabIndex:s.inputProps.tabIndex,readOnly:s.inputProps.readOnly,onBlur:s.inputProps.onBlur,onFocus:s.inputProps.onFocus,"aria-invalid":s.inputProps.ariaInvalid,"aria-describedby":Ft(s.hintConnected?s.hintId:void 0,s.errorConnected?s.errorId:void 0),"aria-labelledby":s.labelConnected?s.labelId:void 0,"aria-label":s.labelConnected?void 0:s.accessibleName,...s.isControlled?{checked:s.mergedChecked,onChange:s.onChange}:{defaultChecked:s.inputProps.defaultChecked,onChange:s.onChange}}),n??d.jsx(Cf,{})]})})});xf.displayName="CheckboxControl";function Cf({children:t,className:e,classNames:n,size:r,...o}){const s=Kr(),i=qr();return d.jsx(Bt,{variant:MG(s.variant),size:r??s.size,selected:s.mergedChecked,icon:s.checkIcon??void 0,check:!0,classNames:FG({slotClassNames:i,classNames:n,className:e}),...o,children:t})}Cf.displayName="CheckboxIndicator";const cS=l.forwardRef(function({className:e,children:n,...r},o){const s=Kr(),i=qr(),a=Ue(aH,s.isCompound&&KG,i.content,e);return s.isCompound&&!GG(n)?d.jsx("label",{ref:o,htmlFor:s.inputId,id:s.labelId,className:Ue(a,!s.isDisabled&&qG),...r,children:n}):d.jsx("div",{ref:o,className:a,...r,children:n})});cS.displayName="CheckboxContent";function uS({children:t,className:e,isRequired:n,id:r,...o}){const s=Kr(),i=qr(),a=xu(),c=n??(a==null?void 0:a.isRequired)??!1,u=Hs[s.size];return d.jsxs("span",{id:r,ref:f=>{s.isCompound&&s.useInlineCompoundMotion&&(s.textMotionRef.current=f)},className:Ue(ZG,s.isCompound&&aS(),s.isCompound&&(s.hasCompoundHint||s.hasCompoundError)&&QG,s.isCompound&&s.useInlineCompoundMotion&&JG,i.label,e),...o,children:[d.jsx(ee,{as:"span",variant:u.title,inheritColor:!0,className:Ue(s.isDisabled&&rS,!s.isDisabled&&s.danger&&oS,i.labelText),children:t}),c?d.jsx("span",{className:Ue(eH,i.requiredMark),"aria-hidden":!0,children:"*"}):null]})}uS.displayName="CheckboxLabel";function dS({children:t,className:e,variant:n,...r}){const o=Kr(),s=qr();return d.jsx(Ye,{as:"span",id:o.hintId,variant:n??Hs[o.size].desc,className:Ue(o.isCompound&&zi(2),o.isDisabled&&sS,s.hint,e),...r,children:t})}dS.displayName="CheckboxHint";function fS({children:t,className:e,...n}){const r=Kr(),o=qr();return d.jsx(Ze,{as:"span",id:r.errorId,variant:Hs[r.size].desc,className:Ue(r.isCompound&&zi(lS(r.hasCompoundHint)),r.isDisabled&&iS,o.error,e),...n,children:t})}fS.displayName="CheckboxError";function uH({label:t,hint:e,error:n,hasHint:r,hasError:o,secondaryLines:s,textColRef:i,size:a,isDisabled:c,danger:u,hintId:f,errorId:m}){const p=qr(),b=Hs[a];return d.jsxs(d.Fragment,{children:[d.jsx(xf,{}),d.jsx("span",{ref:i,className:Ue(aS(),!s&&tH,p.simpleLabelWrap,p.label),children:d.jsx(ee,{as:"span",variant:b.title,inheritColor:!0,className:Ue(nH,c&&rS,!c&&u&&oS,p.simpleLabelText,p.labelText),children:t})}),r?d.jsx(Ye,{as:"span",id:f,variant:b.desc,className:Ue(zi(2),c&&sS,p.hint),children:e}):null,o?d.jsx(Ze,{as:"span",id:m,variant:b.desc,className:Ue(zi(lS(r)),c&&iS,p.error),children:n}):null]})}function dH(t,e){return t??`checkbox-${e}`}function fH(t){return Yt(t)}function mH(t){return Kt(t)}function pH(t){return`${t}-label`}function hH({size:t="base",variant:e="default",checkIcon:n,danger:r=!1,disabled:o,checked:s,defaultChecked:i,onChange:a,id:c,name:u,value:f,required:m,form:p,autoFocus:b,tabIndex:g,readOnly:h,onBlur:x,onFocus:C,"aria-label":_,label:v,hint:y,error:S},A,E){const T=VP(),L=f!=null?String(f):void 0,w=(T==null?void 0:T.selection)==="single"&&T!=null&&L!=null,R=cd({name:u,value:s,onChange:a,onBlur:x,disabled:o,readOnly:h,type:"checkbox"}),N=R.bound&&T==null,D=l.useId(),P=dH(c,D),j=fH(P),G=mH(P),k=pH(P),O=s!==void 0,M=w?T.selectedValue===L:void 0,B=N?!!R.checked:void 0,U=O?s:B!==void 0?B:M!==void 0?M:void 0,[W,F,V]=zG(U,w||O||N?void 0:i),H=!!(o??(T==null?void 0:T.disabled)??R.disabled),re=qt(A),me=re&&ye(A,"Label"),pe=re?ye(A,"CheckboxHint"):!1,Y=re?ye(A,"CheckboxError"):!1,te=re&&HG(E),de=!H&&(!re||te),oe=Hs[t],xe=y!=null,ne=S!=null,$=re?(pe?1:0)+(Y?1:0):(xe?1:0)+(ne?1:0),se=l.useRef(null),be=l.useCallback(ce=>{const Be=ce.target.checked;if(!V&&!w&&!N&&F(Be),a==null||a(ce),!ce.defaultPrevented){if(w){T.selectSingleValue(L,Be);return}N&&R.onChange(ce)}},[N,R,T,w,V,a,L,F]),Ie=l.useCallback(ce=>{x==null||x(ce),N&&R.onBlur(ce)},[N,R,x]),Ae=m??(w&&T.isRequired?T.claimRequiredAnchor():void 0),q=l.useMemo(()=>({inputId:P,hintId:j,errorId:G,labelId:k,size:t,variant:e,mergedChecked:W,isDisabled:H,isControlled:V,isCompound:re,hasCompoundHint:pe,hasCompoundError:Y,hintConnected:re?pe:xe,errorConnected:re?Y:ne,labelConnected:me,accessibleName:_,useInlineCompoundMotion:te,textMotionRef:se,danger:r,checkIcon:n,onChange:be,inputProps:{name:R.name??u,value:f,defaultChecked:!V&&!N?i:void 0,required:Ae,form:p,autoFocus:b,tabIndex:g,readOnly:R.readOnly??h,onBlur:Ie,onFocus:C,inputRef:N?R.ref:void 0,ariaInvalid:N?R["aria-invalid"]:void 0}}),[_,n,r,i,p,R,N,b,G,Ie,be,j,Y,pe,me,ne,xe,P,re,V,H,k,W,u,C,Ae,h,t,g,te,f,e]),ie=l.useMemo(()=>({controlId:P,labelId:k,isRequired:!!m}),[P,k,m]);return{contextValue:q,fieldLabelContext:ie,isCompound:re,isDisabled:H,mergedChecked:W,enableTextMotion:de,textColRef:se,secondaryLines:$,sz:oe,hasHint:xe,hasError:ne,label:v,hint:y,error:S,hintId:j,errorId:G,danger:r}}const mS=l.forwardRef(function({children:e,label:n,hint:r,error:o,size:s,variant:i,checkIcon:a,danger:c,disabled:u,checked:f,defaultChecked:m,onChange:p,id:b,name:g,value:h,required:x,form:C,autoFocus:_,tabIndex:v,readOnly:y,onBlur:S,onFocus:A,className:E,classNames:T,onPointerDown:L,"aria-label":w,...R},N){const D=xn(),P=typeof g=="string"?g:void 0,j=P?D==null?void 0:D.getError(P):void 0,O=hH({size:s,variant:i,checkIcon:a,danger:c||!!j,disabled:u,checked:f,defaultChecked:m,onChange:p,id:b,name:g,value:h,required:x,form:C,autoFocus:_,tabIndex:v,readOnly:y,onBlur:S,onFocus:A,"aria-label":w,label:n,hint:r,error:o??j},e,E),{handlePointerDown:M}=UG({isDisabled:O.isDisabled,enableTextMotion:O.enableTextMotion,textMotionRef:O.textColRef,onPointerDown:L}),B=Ue(cH(O.secondaryLines,O.sz.gridGap,E),O.isDisabled&&oH,T==null?void 0:T.root);return O.isCompound?d.jsx(Ip,{value:O.contextValue,children:d.jsx(Np,{classNames:T,children:d.jsx(Xt.Provider,{value:O.fieldLabelContext,children:d.jsx("fieldset",{ref:N,"aria-labelledby":O.contextValue.labelConnected?O.contextValue.labelId:void 0,"data-checked":O.mergedChecked?!0:void 0,className:Ue(B,iH),onPointerDown:M,...R,children:e})})})}):d.jsx(Ip,{value:O.contextValue,children:d.jsx(Np,{classNames:T,children:d.jsx("label",{ref:N,htmlFor:O.contextValue.inputId,"data-checked":O.mergedChecked?!0:void 0,className:B,...R,onPointerDown:M,children:d.jsx(uH,{label:O.label,hint:O.hint,error:O.error,hasHint:O.hasHint,hasError:O.hasError,secondaryLines:O.secondaryLines,textColRef:O.textColRef,size:O.contextValue.size,isDisabled:O.isDisabled,danger:O.danger,hintId:O.hintId,errorId:O.errorId})})})})});mS.displayName="CheckboxRoot";const gH=Object.assign(Cf,{Fill:Bt.Fill,Mark:Bt.Mark}),bH=Object.assign(mS,{Control:xf,Indicator:gH,Content:cS,Label:uS,Hint:dS,Error:fS});function wa({active:t,size:e="base",gloss:n=!1,shellRef:r,fillRef:o,className:s,children:i,...a}){const c=l.useRef(null),u=o??c;cb(t,u);const f=n?I(Hl,"gloss-indicator size-full min-h-0 min-w-0 origin-center border-0",s):I(Hl,"size-full min-h-0 min-w-0 origin-center border border-primary bg-surface",s),m=n?hR:ob("base");return d.jsxs("span",{ref:r,className:f,"aria-hidden":!0,...a,children:[d.jsx("span",{ref:u,"aria-hidden":!0,className:m,style:{transform:"scale(0)",opacity:0}}),i]})}wa.displayName="SelectionThumb";function Ra({size:t="base",highlighted:e=!1,gloss:n=!1,iconRef:r,className:o,children:s,style:i,...a}){const c=n?"text-foreground":e?"text-indicator-foreground":"text-primary";return d.jsx("span",{ref:r,"aria-hidden":!0,className:I("pointer-events-none z-[2] flex items-center justify-center",c,o),style:i,...a,children:d.jsx("span",{className:I("inline-flex shrink-0 items-center justify-center [&_svg]:size-full",Lu[t]),children:s})})}Ra.displayName="SelectionThumbIcon";function tt(...t){return I(...t)}function xH(t){return t==="gloss"?"gloss":"base"}function CH({slotClassNames:t,classNames:e,className:n}){return{shell:tt(t.indicator,e==null?void 0:e.shell,e==null?void 0:e.indicator,n),fill:tt(t.indicatorFill,e==null?void 0:e.fill,e==null?void 0:e.indicatorFill),mark:tt(t.indicatorMark,e==null?void 0:e.mark,e==null?void 0:e.indicatorMark)}}function _H(t){return!/\bflex-col\b/.test(t??"")}function SH(t,e){const n=t!==void 0,[r,o]=l.useState(!!e),s=n?!!t:r,i=l.useCallback(a=>{n||o(a)},[n]);return[s,i,n]}const pS=l.createContext(null),lc=l.createContext({});function vH({value:t,children:e}){return d.jsx(pS.Provider,{value:t,children:e})}function yH({classNames:t,children:e}){const n=l.useContext(lc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(lc.Provider,{value:r,children:e})}function Zr(){const t=l.useContext(pS);if(!t)throw new Error("Radio.* parts must be used inside <Radio>.");return t}function Qr(){return l.useContext(lc)}function TH(){const t=Zr(),e=l.useRef(null),n=l.useRef(!0),r=ue();return l.useLayoutEffect(()=>{const o=e.current;if(!o)return;if(r){z(o),o.style.opacity=t.isDisabled?"0.48":"1";return}if(n.current){n.current=!1,o.style.opacity=t.isDisabled?"0.48":"1";return}z(o);const s=Number.parseFloat(getComputedStyle(o).opacity),i=Number.isFinite(s)?s:1;X.fromTo(o,{autoAlpha:i},{autoAlpha:t.isDisabled?.48:1,...ve(),overwrite:"auto"})},[t.isDisabled,r]),e}function AH({isDisabled:t,enableTextMotion:e,textMotionRef:n,onPointerDown:r}){return lr({isDisabled:t,enabled:e,textMotionRef:n,onPointerDown:r})}function EH(t,e){return t??`radio-${e}`}function LH(t){return Yt(t)}function wH(t){return Kt(t)}function RH(t,e){if(!e)return t!=null?String(t):"Option"}const zs={small:{title:"small",desc:"tools",gridGap:"gap-x-small gap-y-xsmall"},base:{title:"base",desc:"small",gridGap:"gap-x-base gap-y-xsmall"},mid:{title:"mid",desc:"small",gridGap:"gap-x-plus gap-y-xsmall"},large:{title:"large",desc:"base",gridGap:"gap-x-plus gap-y-xsmall"}},IH="absolute m-[-1px] h-px w-px overflow-hidden border-0 p-0 opacity-0 [clip:rect(0,0,0,0)]",NH="relative inline-flex shrink-0 items-center justify-center",DH="relative inline-flex items-center justify-center",kH="min-w-0",OH="inline-flex flex-wrap items-center gap-x-xsmall gap-y-0",PH="min-w-0",BH="origin-center will-change-transform",hS="text-muted",gS="text-danger",jH="text-danger",bS="text-muted",xS="text-muted",MH="origin-center will-change-transform",FH="min-w-0",GH="relative cursor-pointer select-none rounded-small text-left",HH="cursor-not-allowed",zH="has-[:focus-visible]:outline has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-primary",VH="contents";function UH(){return ua()}function $H(t,e,n){return I(GH,wu(t,e),zH,n)}function CS(){return da()}function Vi(t){return fa(t)}function _S(t){return Ru(t)}const _f=l.forwardRef(function({className:e,children:n,...r},o){const s=Zr(),i=Qr(),a=TH();return d.jsxs("span",{ref:o,className:tt(NH,UH(),i.control,e),...r,children:[d.jsx("input",{id:s.inputId,type:"radio",className:tt(IH,i.input),checked:s.mergedChecked,disabled:s.isDisabled,name:s.inputName,value:s.inputProps.value,required:s.inputProps.required,form:s.inputProps.form,autoFocus:s.inputProps.autoFocus,tabIndex:s.inputProps.tabIndex,readOnly:s.inputProps.readOnly,onBlur:s.inputProps.onBlur,onFocus:s.inputProps.onFocus,"aria-describedby":Ft(s.hintConnected?s.hintId:void 0,s.errorConnected?s.errorId:void 0),"aria-label":RH(s.inputProps.value,s.hasLabel),onChange:s.onChange,onClick:s.onActivate}),d.jsx("span",{ref:a,className:tt(DH,i.controlTrack),children:n??d.jsx(Sf,{})})]})});_f.displayName="RadioControl";function Sf({children:t,className:e,classNames:n,size:r,...o}){const s=Zr(),i=Qr();return d.jsx(Bt,{size:r??s.size,variant:xH(s.variant),selected:s.mergedChecked,dot:!0,classNames:CH({slotClassNames:i,classNames:n,className:e}),...o,children:t})}Sf.displayName="RadioIndicator";const SS=l.forwardRef(function({className:e,children:n,...r},o){const s=Zr(),i=Qr();return d.jsx("div",{ref:o,className:tt(VH,s.isCompound&&kH,i.content,e),...r,children:n})});SS.displayName="RadioContent";function vS({children:t,className:e,isRequired:n,...r}){const o=Zr(),s=Qr(),i=xu(),a=n??(i==null?void 0:i.isRequired)??!1,c=zs[o.size];return d.jsxs("span",{ref:u=>{o.isCompound&&o.useInlineCompoundMotion&&(o.textMotionRef.current=u)},className:tt(OH,o.isCompound&&CS(),o.isCompound&&(o.hasCompoundHint||o.hasCompoundError)&&PH,o.isCompound&&o.useInlineCompoundMotion&&BH,s.label,e),...r,children:[d.jsx(ee,{as:"span",variant:c.title,inheritColor:!0,className:tt(o.isDisabled&&hS,!o.isDisabled&&o.danger&&gS,s.labelText),children:t}),a?d.jsx("span",{className:tt(jH,s.requiredMark),"aria-hidden":!0,children:"*"}):null]})}vS.displayName="RadioLabel";function yS({children:t,className:e,variant:n,...r}){const o=Zr(),s=Qr();return d.jsx(Ye,{as:"span",id:o.hintId,variant:n??zs[o.size].desc,className:tt(o.isCompound&&Vi(2),o.isDisabled&&bS,s.hint,e),...r,children:t})}yS.displayName="RadioHint";function TS({children:t,className:e,...n}){const r=Zr(),o=Qr();return d.jsx(Ze,{as:"span",id:r.errorId,variant:zs[r.size].desc,className:tt(r.isCompound&&Vi(_S(r.hasCompoundHint)),r.isDisabled&&xS,o.error,e),...n,children:t})}TS.displayName="RadioError";function WH({label:t,hint:e,error:n,hasHint:r,hasError:o,secondaryLines:s,textColRef:i,size:a,isDisabled:c,danger:u,hintId:f,errorId:m}){const p=Qr(),b=zs[a];return d.jsxs(d.Fragment,{children:[d.jsx(_f,{}),d.jsx("span",{ref:i,className:tt(CS(),!s&&MH,p.simpleLabelWrap,p.label),children:d.jsx(ee,{as:"span",variant:b.title,inheritColor:!0,className:tt(FH,c&&hS,!c&&u&&gS,p.simpleLabelText,p.labelText),children:t})}),r?d.jsx(Ye,{as:"span",id:f,variant:b.desc,className:tt(Vi(2),c&&bS,p.hint),children:e}):null,o?d.jsx(Ze,{as:"span",id:m,variant:b.desc,className:tt(Vi(_S(r)),c&&xS,p.error),children:n}):null]})}function XH({size:t="base",variant:e="default",danger:n=!1,disabled:r,checked:o,defaultChecked:s,onChange:i,id:a,name:c,value:u,required:f,form:m,autoFocus:p,tabIndex:b,readOnly:g,onBlur:h,onFocus:x,label:C,hint:_,error:v},y,S,A){const E=XP(),T=u!=null?String(u):void 0,L=E!=null&&T!=null,w=l.useId(),R=EH(a,w),N=LH(R),D=wH(R),P=o!==void 0,j=L?E.selectedValue===T:void 0,G=P?o:j!==void 0?j:void 0,[k,O,M]=SH(G,L||P?void 0:s),B=c??(E==null?void 0:E.name),U=!!(r??(E==null?void 0:E.disabled)),W=qt(y),F=W?ye(y,"RadioLabel"):!1,V=W?ye(y,"RadioHint"):!1,H=W?ye(y,"RadioError"):!1,re=W?F:!!C,me=W&&_H(S),pe=!U&&(!W||me),Y=zs[t],te=_!=null,de=v!=null,oe=W?(V?1:0)+(H?1:0):(te?1:0)+(de?1:0),xe=l.useRef(null),ne=l.useCallback(Ae=>{!P&&!L&&O(Ae.target.checked),i==null||i(Ae),!Ae.defaultPrevented&&L&&Ae.target.checked&&T!=null&&E.selectValue(T)},[E,L,P,i,T,O]),$=!U&&!g&&!f&&!(L&&E.isRequired),se=f??(L&&E.isRequired?E.claimRequiredAnchor():void 0),be=l.useCallback(Ae=>{if(A==null||A(Ae),!(Ae.defaultPrevented||!$||!k)){if(Ae.preventDefault(),L){E.selectValue(void 0);return}P||O(!1)}},[$,E,L,P,k,A,O]);return{contextValue:l.useMemo(()=>({inputId:R,hintId:N,errorId:D,size:t,variant:e,mergedChecked:k,isDisabled:U,isControlled:M,isCompound:W,hasCompoundHint:V,hasCompoundError:H,hintConnected:W?V:te,errorConnected:W?H:de,hasLabel:re,useInlineCompoundMotion:me,textMotionRef:xe,danger:n,inputName:B,onChange:ne,onActivate:be,inputProps:{value:u,defaultChecked:M?void 0:s,required:se,form:m,autoFocus:p,tabIndex:b,readOnly:g,onBlur:h,onFocus:x}}),[n,s,m,p,D,ne,be,H,V,de,te,re,N,R,B,W,me,M,U,k,h,x,se,g,t,b,u,e]),isCompound:W,isDisabled:U,mergedChecked:k,enableTextMotion:pe,textColRef:xe,secondaryLines:oe,sz:Y,hasHint:te,hasError:de,label:C,hint:_,error:v,hintId:N,errorId:D,danger:n}}const AS=l.forwardRef(function({children:e,label:n,hint:r,error:o,size:s,variant:i,danger:a,disabled:c,checked:u,defaultChecked:f,onChange:m,id:p,name:b,value:g,required:h,form:x,autoFocus:C,tabIndex:_,readOnly:v,onBlur:y,onFocus:S,className:A,classNames:E,onPointerDown:T,onClick:L,...w},R){const N=XH({size:s,variant:i,danger:a,disabled:c,checked:u,defaultChecked:f,onChange:m,id:p,name:b,value:g,required:h,form:x,autoFocus:C,tabIndex:_,readOnly:v,onBlur:y,onFocus:S,label:n,hint:r,error:o},e,A,L),{handlePointerDown:D}=AH({isDisabled:N.isDisabled,enableTextMotion:N.enableTextMotion,textMotionRef:N.textColRef,onPointerDown:T}),P=tt($H(N.secondaryLines,N.sz.gridGap,A),N.isDisabled&&HH,E==null?void 0:E.root);return d.jsx(vH,{value:N.contextValue,children:d.jsx(yH,{classNames:E,children:d.jsx("label",{ref:R,"data-selected":N.mergedChecked?!0:void 0,className:P,...w,onPointerDown:D,children:N.isCompound?e:d.jsx(WH,{label:N.label,hint:N.hint,error:N.error,hasHint:N.hasHint,hasError:N.hasError,secondaryLines:N.secondaryLines,textColRef:N.textColRef,size:N.contextValue.size,isDisabled:N.isDisabled,danger:N.danger,hintId:N.hintId,errorId:N.errorId})})})})});AS.displayName="RadioRoot";const YH=Object.assign(Sf,{Fill:Bt.Fill,Mark:Bt.Mark}),KH=Object.assign(AS,{Control:_f,Indicator:YH,Content:SS,Label:vS,Hint:yS,Error:TS});function nt(...t){return I(...t)}function qH(t,e){const n=t!==void 0,[r,o]=l.useState(!!e),s=n?!!t:r,i=l.useCallback(a=>{n||o(a)},[n]);return[s,i,n]}function ZH(t){return!/\bflex-col\b/.test(t??"")}function QH(t,e){return l.Children.map(t,n=>l.isValidElement(n)&&n.type.displayName==="SwitchControl"?l.cloneElement(n,{...e,...n.props}):n)}function JH(t){let e=!1;const n=r=>{if(!e)for(const o of l.Children.toArray(r)){if(!l.isValidElement(o))continue;const s=o.type.displayName;if(s==="SwitchLabel"||s==="SwitchContent"){e=!0;return}n(o.props.children)}};return n(t),e}function e2(t,e,n,r,o){return t?(r?1:0)+(o?1:0):(e?1:0)+(n?1:0)}function t2(t){let e=null;const n=[];for(const r of l.Children.toArray(t)){if(l.isValidElement(r)&&r.type.displayName==="SwitchTrack"){e==null&&(e=r);continue}n.push(r)}return n.length===0?{track:e,content:null}:n.length===1?{track:e,content:n[0]}:{track:e,content:n}}function n2(t){let e=!1;const n=r=>{if(!e)for(const o of l.Children.toArray(r)){if(!l.isValidElement(o))continue;if(o.type.displayName==="SwitchThumb"){e=!0;return}n(o.props.children)}};return n(t),e}const Dp={small:Ut("small"),base:Ut("base"),mid:Ut("mid"),large:Ut("large")};function r2(t,e){if(t==null)return Dp[e];if(typeof t=="number")return t;const n=t.trim(),r=/^([\d.]+)px$/i.exec(n);if(r)return Number.parseFloat(r[1]);const o=/^([\d.]+)rem$/i.exec(n);if(o&&typeof document<"u"){const s=Number.parseFloat(getComputedStyle(document.documentElement).fontSize)||16;return Number.parseFloat(o[1])*s}return Dp[e]}function o2(t,e){const n=t.getBoundingClientRect().width,r=e.getBoundingClientRect().width;return Math.max(0,n-r)}const li={small:"h-[var(--selection-indicator-small)] min-h-[var(--selection-indicator-small)] w-[calc(2*var(--selection-indicator-small))] min-w-[calc(2*var(--selection-indicator-small))]",base:"h-[var(--selection-indicator-base)] min-h-[var(--selection-indicator-base)] w-[calc(2*var(--selection-indicator-base))] min-w-[calc(2*var(--selection-indicator-base))]",mid:"h-[var(--selection-indicator-mid)] min-h-[var(--selection-indicator-mid)] w-[calc(2*var(--selection-indicator-mid))] min-w-[calc(2*var(--selection-indicator-mid))]",large:"h-[var(--selection-indicator-large)] min-h-[var(--selection-indicator-large)] w-[calc(2*var(--selection-indicator-large))] min-w-[calc(2*var(--selection-indicator-large))]"},Wo={small:{track:li.small,travelPx:Ut("small"),title:"small",desc:"tools",gap:"gap-x-small gap-y-xsmall"},base:{track:li.base,travelPx:Ut("base"),title:"base",desc:"small",gap:"gap-x-base gap-y-xsmall"},mid:{track:li.mid,travelPx:Ut("mid"),title:"mid",desc:"small",gap:"gap-x-plus gap-y-xsmall"},large:{track:li.large,travelPx:Ut("large"),title:"large",desc:"base",gap:"gap-x-plus gap-y-xsmall"}};function s2({isDisabled:t,enableTextMotion:e,textMotionRef:n,onPointerDown:r}){return lr({isDisabled:!!t,enabled:e,textMotionRef:n,onPointerDown:r})}function i2({checked:t,disabled:e,size:n,thickness:r,squeezeToken:o,trackRef:s,trackFillRef:i,thumbRef:a,thumbShellRef:c,thumbFillRef:u,iconOffRef:f,iconOnRef:m}){const p=ue(),b=r2(r,n),g=l.useRef(b),h=l.useRef(!0),x=l.useRef(!0),C=l.useCallback((_,v)=>{const y=a.current;if(!y)return;const S=_?v:0;if(p||x.current){x.current=!1,z(y),y.style.transform=`translate(${S}px, 0)`;return}z(y),X.to(y,{x:S,...m0(),overwrite:"auto"})},[p,a]);l.useLayoutEffect(()=>{g.current=b,C(t,g.current)},[t,b,C]),l.useLayoutEffect(()=>{const _=s.current,v=c.current;if(!_||!v)return;const y=()=>{g.current=o2(_,v),C(t,g.current)};y();const S=new ResizeObserver(y);return S.observe(_),S.observe(v),()=>S.disconnect()},[t,n,C,r,b,s,c]),l.useEffect(()=>{const _=[i.current,a.current,c.current,u.current,f.current,m.current,s.current];return()=>{for(const v of _)v&&z(v)}},[f,m,u,a,c,i,s]),l.useLayoutEffect(()=>{const _=i.current;if(_){if(p){z(_),_.style.opacity=t?"1":"0";return}if(h.current){h.current=!1,z(_),_.style.opacity=t?"1":"0";return}z(_),t?X.fromTo(_,{autoAlpha:0},{autoAlpha:1,...ve(),overwrite:"auto"}):X.to(_,{autoAlpha:0,...ve(),overwrite:"auto"})}},[t,p,i]),l.useLayoutEffect(()=>{if(!(!f.current&&!m.current)){if(p){f.current&&(z(f.current),f.current.style.opacity=t?"0":"1"),m.current&&(z(m.current),m.current.style.opacity=t?"1":"0");return}f.current&&(z(f.current),t?X.to(f.current,{autoAlpha:0,scale:.88,...ve(),overwrite:"auto"}):X.fromTo(f.current,{autoAlpha:0,scale:.88},{autoAlpha:1,scale:1,...ve(),overwrite:"auto"})),m.current&&(z(m.current),t?X.fromTo(m.current,{autoAlpha:0,scale:.88},{autoAlpha:1,scale:1,...ve(),overwrite:"auto"}):X.to(m.current,{autoAlpha:0,scale:.88,...ve(),overwrite:"auto"}))}},[t,f,m,p]),l.useLayoutEffect(()=>{const _=s.current;_&&(z(_),_.style.opacity=e?"0.48":"1")},[e,s]),l.useLayoutEffect(()=>{if(o===0||p)return;const _=c.current;_&&Xe(_)},[p,o,c])}const vf=l.createContext(null);function a2({value:t,children:e}){return d.jsx(vf.Provider,{value:t,children:e})}function Ia(){const t=l.useContext(vf);if(!t)throw new Error("Switch components must be inside <Switch>.");return t}function l2(){return l.useContext(vf)}const cc=l.createContext({});function c2({classNames:t,children:e}){const n=l.useContext(cc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(cc.Provider,{value:r,children:e})}function _n(){return l.useContext(cc)}const ES=l.createContext(null);function u2({value:t,children:e}){return d.jsx(ES.Provider,{value:t,children:e})}function yf(){const t=l.useContext(ES);if(!t)throw new Error("Switch.Track, Switch.Fill, Switch.Thumb, Switch.Icon must be inside <Switch.Track>");return t}function d2(t,e,n){return t??n??`switch-${e}`}function f2(t){return Yt(t)}function m2(t){return Kt(t)}function p2(t){return t?void 0:"Switch"}const Tf=l.createContext(null);function h2({value:t,children:e}){return d.jsx(Tf.Provider,{value:t,children:e})}function Na(){const t=l.useContext(Tf);if(!t)throw new Error("Slider components must be inside <Slider>.");return t}function g2(){return l.useContext(Tf)}const uc=l.createContext({});function b2({classNames:t,children:e}){const n=l.useContext(uc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(uc.Provider,{value:r,children:e})}function Sn(){return l.useContext(uc)}const LS=l.createContext(null);function x2({value:t,children:e}){return d.jsx(LS.Provider,{value:t,children:e})}function Af(){const t=l.useContext(LS);if(!t)throw new Error("Slider.Rail, Slider.Fill, Slider.Thumb, Slider.Icon must be inside Slider.Track");return t}function C2({children:t,className:e,orientation:n="horizontal",...r}){return d.jsx("div",{className:I("flex items-baseline justify-between gap-xsmall",n==="horizontal"?"w-full":"min-w-[8rem]",e),...r,children:t})}function _2({children:t,fallback:e,className:n,...r}){const o=t??e;return o==null?null:d.jsx(ee,{as:"span",variant:"base",className:I("tabular-nums text-muted",n),...r,children:o})}function S2({label:t,labelClassName:e,showValue:n,valueText:r,hint:o,hintId:s,error:i,errorId:a,Header:c,Value:u,track:f}){const m=t!=null||n||r!=null;return d.jsxs(d.Fragment,{children:[m?d.jsxs(c,{children:[t!=null?d.jsx($e,{classNames:e?{root:e}:void 0,children:t}):null,r!=null?d.jsx(u,{children:r}):n?d.jsx(u,{}):null]}):null,f,o!=null?d.jsx(Ye,{id:s,children:o}):null,i!=null?d.jsx(Ze,{id:a,children:i}):null]})}function Lt(...t){return I(...t)}function Vs(t){return typeof t=="number"?`${t}px`:t}const kp={small:Ut("small"),base:Ut("base"),mid:Ut("mid"),large:Ut("large")};function Ao(t,e,n){return Math.min(n,Math.max(e,t))}function wS(t,e,n){return n<=e?0:(t-e)/(n-e)*100}function RS(t,e,n){return n<=e?0:(t-e)/(n-e)}function dc(t,e,n,r,o){if(r<=0)return wS(t,e,n);if(r<=o)return 50;const s=o/2,i=r-o;return(s+RS(t,e,n)*i)/r*100}function hl(t,e,n,r,o){return r<=o?r/2:o/2+RS(t,e,n)*(r-o)}function v2(t,e,n,r,o,s,i){if(t<=0)return{start:0,end:wS(s,n,r)};const a=e/2;if(o){const u=hl(i[0],n,r,t,e),f=hl(i[1],n,r,t,e);return{start:Math.max(0,u-a)/t*100,end:Math.min(t,f+a)/t*100}}const c=hl(s,n,r,t,e);return{start:0,end:Math.min(t,c+a)/t*100}}function y2(t,e){const n=t.end-t.start;return e==="horizontal"?{left:`${t.start}%`,width:`${n}%`}:{bottom:`${t.start}%`,height:`${n}%`}}function T2(t,e,n,r){if(r<=0)return Ao(t,e,n);const o=Math.round((t-e)/r);return Ao(e+o*r,e,n)}function A2(t,e){if(e.length===0)return t;let n=e[0],r=Math.abs(t-n);for(const o of e){const s=Math.abs(t-o);s<r&&(r=s,n=o)}return n}function E2(t,e,n){if(t!=null&&t.length)return[...new Set(t.map(r=>Ao(r,e,n)))].toSorted((r,o)=>r-o)}function fc(t,e,n,r,o,s,i){const a=r==="horizontal"?n.width:n.height,c=i/2,u=a-i;if(u<=0)return o;const f=Ao(r==="horizontal"?(t-n.left-c)/u:1-(e-n.top-c)/u,0,1);return o+f*(s-o)}function L2(t,e,n){const r=e.findIndex(o=>o===t);if(r>=0){const o=e[r+n];return o!==void 0?o:t}return n>0?e.find(o=>o>t)??e[e.length-1]:[...e].reverse().find(o=>o<t)??e[0]}function w2(t,e,n,r){const o=r==="horizontal";if(t!=null&&t.length)switch(n){case"ArrowRight":return o?"mark-next":0;case"ArrowLeft":return o?"mark-prev":0;case"ArrowUp":return o?0:"mark-next";case"ArrowDown":return o?0:"mark-prev";case"Home":return"home";case"End":return"end";default:return 0}const s=e>0?e*10:10;switch(n){case"ArrowRight":return o?e:0;case"ArrowLeft":return o?-e:0;case"ArrowUp":return o?0:e;case"ArrowDown":return o?0:-e;case"PageUp":return s;case"PageDown":return-s;case"Home":return"home";case"End":return"end";default:return 0}}function R2(t){return Number.isInteger(t)?String(t):t.toFixed(1)}function Ci(t,e){const n=e==="horizontal"?t.width:t.height,r=e==="horizontal"?t.height:t.width;return{trackSpanPx:n,thumbSpanPx:r}}function IS(t,e){if(t==null)return kp[e];if(typeof t=="number")return t;const n=t.trim(),r=/^([\d.]+)px$/i.exec(n);if(r)return Number.parseFloat(r[1]);const o=/^([\d.]+)rem$/i.exec(n);if(o&&typeof document<"u"){const s=Number.parseFloat(getComputedStyle(document.documentElement).fontSize)||16;return Number.parseFloat(o[1])*s}return kp[e]}function I2(t,e){return t===e?!0:t==null||e==null?!1:t.valueLabel===e.valueLabel&&t.min===e.min&&t.max===e.max&&t.range===e.range&&t.singleValue===e.singleValue&&t.rangeValue[0]===e.rangeValue[0]&&t.rangeValue[1]===e.rangeValue[1]&&t.label===e.label}function N2(t){let e=!1;const n=[];for(const r of l.Children.toArray(t)){if(!l.isValidElement(r)){n.push(r);continue}const o=r.type.displayName;(o==="SliderRail"||o==="SliderFill"||o==="SliderThumb"||o==="SliderIcon")&&(e=!0),n.push(r)}return e?{body:n,hasCompoundParts:!0}:{body:null,hasCompoundParts:!1}}function D2(t,e,n){const r=t!==void 0,[o,s]=l.useState(e??n),i=r?t:o,a=l.useCallback(c=>{r||s(c)},[r]);return[i,a,r]}function k2(t,e,n,r){const o=t!==void 0,[s,i]=l.useState(e??[n,r]),a=o?t:s,c=l.useCallback(u=>{o||i(u)},[o]);return[a,c,o]}function O2(t,e){if(t==null)return e;const n=l.Children.toArray(t);return n.length===0?e:n.length===1&&l.isValidElement(n[0])&&n[0].type.displayName==="SliderIcon"?n[0].props.children??e:t}function P2(t){return`${t}-label`}function B2({kind:t,explicitLabel:e,labelConnected:n,labelId:r,hintConnected:o,hintId:s,errorConnected:i,errorId:a}){const c=Ft(o?s:void 0,i?a:void 0);return e?t==="start"?{ariaLabel:`${e}, minimum`,ariaLabelledBy:void 0,ariaDescribedBy:c}:t==="end"?{ariaLabel:`${e}, maximum`,ariaLabelledBy:void 0,ariaDescribedBy:c}:{ariaLabel:e,ariaLabelledBy:void 0,ariaDescribedBy:c}:t==="start"?{ariaLabel:"Minimum range",ariaLabelledBy:void 0,ariaDescribedBy:c}:t==="end"?{ariaLabel:"Maximum range",ariaLabelledBy:void 0,ariaDescribedBy:c}:n&&r?{ariaLabel:void 0,ariaLabelledBy:r,ariaDescribedBy:c}:{ariaLabel:e??"Value",ariaLabelledBy:void 0,ariaDescribedBy:c}}function j2(t){const e=l.useRef(null);return l.useLayoutEffect(()=>{const n=e.current;n&&(z(n),n.style.opacity=t?"0.48":"1")},[t]),e}function M2({disabled:t,onPointerDown:e}){const n=l.useRef(null),r=ue();l.useEffect(()=>{const s=n.current;return()=>{s&&z(s)}},[]);const o=l.useCallback(s=>{if(e(s),s.defaultPrevented||t||r)return;const i=n.current;i&&Xe(i)},[t,e,r]);return{squeezeRef:n,handlePointerDown:o}}function F2(t){l.useEffect(()=>{const e=t.current;return()=>{e&&z(e)}},[t])}function G2(t,e,n){z(t),t.style.left=e.left??"",t.style.width=e.width??"",t.style.bottom=e.bottom??"",t.style.height=e.height??"",n==="horizontal"?(t.style.bottom="",t.style.height=""):(t.style.left="",t.style.width="")}function Ef(t,e){return I(t==="horizontal"?"w-full":"w-auto items-center",e)}const H2={small:"h-[var(--selection-indicator-small)] min-h-[var(--selection-indicator-small)]",base:"h-[var(--selection-indicator-base)] min-h-[var(--selection-indicator-base)]",mid:"h-[var(--selection-indicator-mid)] min-h-[var(--selection-indicator-mid)]",large:"h-[var(--selection-indicator-large)] min-h-[var(--selection-indicator-large)]"},z2={small:"w-[var(--selection-indicator-small)] min-w-[var(--selection-indicator-small)]",base:"w-[var(--selection-indicator-base)] min-w-[var(--selection-indicator-base)]",mid:"w-[var(--selection-indicator-mid)] min-w-[var(--selection-indicator-mid)]",large:"w-[var(--selection-indicator-large)] min-w-[var(--selection-indicator-large)]"},V2="pointer-events-none absolute inset-0 overflow-hidden rounded-full",U2="bg-primary-tint",$2="gloss-indicator border-0",W2="overflow-hidden rounded-full",X2="opacity-48",Y2="absolute rounded-full",K2="bg-primary",q2="bg-primary-tint",Z2="z-[1]",Q2="inset-y-0",J2="inset-x-0",ez="relative touch-none select-none",tz="w-full",nz="h-48",rz="pointer-events-none absolute z-[1] size-1 rounded-full bg-primary/30",oz="absolute z-[2] box-border flex shrink-0 origin-center items-center justify-center m-0 appearance-none border-0 bg-transparent p-0 focus-ring",sz="top-0 h-full w-auto -translate-x-1/2 aspect-square",iz="left-0 w-full h-auto -translate-y-1/2 aspect-square",az="cursor-not-allowed",lz="cursor-grab active:cursor-grabbing";function cz({orientation:t,slotClass:e,className:n}){return Lt(Ef(t,n),e)}function uz({disabled:t,gloss:e=!1,slotClass:n,className:r}){return Lt(V2,!e&&U2,t&&X2,n,r)}function dz({isHorizontal:t,gloss:e=!1,slotClass:n,className:r}){return Lt(Y2,t?Q2:J2,e?q2:K2,e&&Z2,n,r)}function NS({isHorizontal:t,size:e,thickness:n,gloss:r=!1,slotClass:o,className:s}){return Lt(ez,t?tz:nz,n==null&&(t?H2[e]:z2[e]),r&&W2,r&&$2,o,s)}function fz({orientation:t,disabled:e,slotClass:n,className:r}){return Lt(oz,t==="horizontal"?sz:iz,e?az:lz,n,r)}function mz(t,e){return e==="horizontal"?{left:`${t}%`}:{top:`${100-t}%`}}function pz(t,e){return e==="horizontal"?{left:`${t}%`,top:"50%",transform:"translate(-50%, -50%)"}:{bottom:`${t}%`,left:"50%",top:"auto",transform:"translate(-50%, 50%)"}}function hz({isHorizontal:t,thickness:e}){if(e==null)return;const n=Vs(e);return t?{height:n,minHeight:n}:{width:n,minWidth:n}}function _i({size:t,icon:e,gloss:n=!1,thumbClassName:r,percent:o,orientation:s,disabled:i,active:a,ariaValueNow:c,ariaValueMin:u,ariaValueMax:f,ariaValueText:m,ariaLabel:p,ariaLabelledBy:b,ariaDescribedBy:g,onPointerDown:h,onKeyDown:x}){const C=Sn(),_=j2(i),{squeezeRef:v,handlePointerDown:y}=M2({disabled:i,onPointerDown:h});return d.jsx("button",{ref:v,type:"button",role:"slider",...b!=null?{"aria-labelledby":b}:p!=null?{"aria-label":p}:{},...g!=null?{"aria-describedby":g}:{},"aria-valuemin":u,"aria-valuemax":f,"aria-valuenow":c,"aria-valuetext":m,"aria-orientation":s,disabled:i,tabIndex:i?-1:0,className:fz({orientation:s,disabled:i,slotClass:C.thumb}),style:mz(o,s),onPointerDown:y,onKeyDown:x,children:d.jsx(wa,{active:a,size:t,gloss:n,shellRef:_,className:Lt(C.thumbShell,r),children:e!=null?d.jsx(Ra,{size:t,highlighted:a,gloss:n,children:e}):null})})}function gz(t,e){const{orientation:n,size:r="base",thickness:o,min:s=0,max:i=100,step:a=1,marks:c,formatValue:u=R2,icon:f,gloss:m=!1,thumbClassName:p,disabled:b=!1,className:g,classNames:h,ariaLabel:x,range:C=!1,children:_}=t,v=g2(),y=Sn(),S=l.useMemo(()=>({...y,...h}),[y,h]),A=n??(v==null?void 0:v.orientation)??"horizontal",E=v==null?void 0:v.labelId,T=(v==null?void 0:v.labelConnected)??!1,L=x,w=l.useCallback(K=>B2({kind:K,explicitLabel:L,labelConnected:T,labelId:E,hintConnected:(v==null?void 0:v.hintConnected)??!1,hintId:(v==null?void 0:v.hintId)??"",errorConnected:(v==null?void 0:v.errorConnected)??!1,errorId:(v==null?void 0:v.errorId)??""}),[L,v==null?void 0:v.errorConnected,v==null?void 0:v.errorId,v==null?void 0:v.hintConnected,v==null?void 0:v.hintId,T,E]),R=l.useRef(null),N=l.useRef(null),[D,P]=l.useState(0),j=l.useMemo(()=>IS(o,r),[o,r]),[G,k]=l.useState(j),O=l.useRef(null),[M,B]=l.useState(null),U=l.useMemo(()=>E2(c,s,i),[c,s,i]),W=l.useCallback(K=>{const Z=Ao(K,s,i);return U!=null&&U.length?A2(Z,U):T2(Z,s,i,a)},[U,s,i,a]),[F,V]=D2(C?void 0:t.value,C?void 0:t.defaultValue,s),[H,re]=k2(C?t.value:void 0,C?t.defaultValue:void 0,s,i),me=C?void 0:t.onValueChange,pe=C?t.onValueChange:void 0,Y=l.useCallback(K=>{const Z=W(K);Z!==F&&(V(Z),me==null||me(Z))},[me,V,F,W]),te=l.useCallback(K=>{let[Z,fe]=K.map(W);Z>fe&&([Z,fe]=[fe,Z]);const[we,ze]=H;Z===we&&fe===ze||(re([Z,fe]),pe==null||pe([Z,fe]))},[pe,H,re,W]),de=l.useCallback((K=F,Z=H)=>{const fe=R.current,we=N.current;if(!fe||!we)return;const ze=fe.getBoundingClientRect(),{trackSpanPx:Qe,thumbSpanPx:Je}=Ci(ze,A);P(Jt=>Jt===Qe?Jt:Qe),Je>0&&k(Jt=>Jt===Je?Jt:Je);const Qt=v2(Qe,Je>0?Je:j,s,i,C,K,Z);G2(we,y2(Qt,A),A)},[j,i,s,A,C,H,F]);l.useLayoutEffect(()=>{de()},[de]),l.useEffect(()=>{const K=R.current;if(!K)return;const Z=new ResizeObserver(()=>de());return Z.observe(K),()=>Z.disconnect()},[A,de]),F2(N);const oe=l.useCallback((K,Z,fe)=>{const we=R.current;if(!we||b)return;const ze=we.getBoundingClientRect(),{thumbSpanPx:Qe}=Ci(ze,A),Je=fc(K,Z,ze,A,s,i,Qe>0?Qe:j);if(C){const[Qt,Jt]=H;if(fe==="start"){const gr=W(Math.min(Je,Jt));te([gr,Jt]),de(F,[gr,Jt])}else if(fe==="end"){const gr=W(Math.max(Je,Qt));te([Qt,gr]),de(F,[Qt,gr])}}else{const Qt=W(Je);Y(Je),de(Qt,H)}},[b,te,Y,j,i,s,A,C,H,F,W,de]),xe=l.useCallback((K,Z)=>{const fe=R.current;if(!fe)return"start";const we=fe.getBoundingClientRect(),{thumbSpanPx:ze}=Ci(we,A),Qe=fc(K,Z,we,A,s,i,ze>0?ze:j),[Je,Qt]=H;return Math.abs(Qe-Je)<=Math.abs(Qe-Qt)?"start":"end"},[j,i,s,A,H]);l.useEffect(()=>{const K=fe=>{const we=O.current;we&&oe(fe.clientX,fe.clientY,we)},Z=()=>{O.current=null,B(null)};return window.addEventListener("pointermove",K),window.addEventListener("pointerup",Z),window.addEventListener("pointercancel",Z),()=>{window.removeEventListener("pointermove",K),window.removeEventListener("pointerup",Z),window.removeEventListener("pointercancel",Z)}},[oe]);const ne=l.useCallback(K=>{if(b||K.button!==0)return;K.preventDefault();const Z=C?xe(K.clientX,K.clientY):"single";O.current=Z,B(Z),oe(K.clientX,K.clientY,Z)},[b,xe,C,oe]),$=l.useCallback(K=>Z=>{b||Z.button!==0||(Z.preventDefault(),Z.stopPropagation(),O.current=K,B(K),Z.currentTarget.setPointerCapture(Z.pointerId))},[b]),se=l.useCallback((K,Z)=>{if(C){const[fe,we]=H;te(K==="start"?[fe+Z,we]:[fe,we+Z])}else Y(F+Z)},[te,Y,C,H,F]),be=l.useCallback(K=>Z=>{if(b)return;const fe=w2(U,a,Z.key,A);if(fe===0)return;Z.preventDefault();const we=K==="start"?H[0]:K==="end"?H[1]:F;if(fe==="home"){C?te(K==="start"?[s,H[1]]:[H[0],s]):Y(s);return}if(fe==="end"){C?te(K==="start"?[i,H[1]]:[H[0],i]):Y(i);return}if(fe==="mark-next"||fe==="mark-prev"){if(!(U!=null&&U.length))return;const ze=L2(we,U,fe==="mark-next"?1:-1);C?te(K==="start"?[ze,H[1]]:[H[0],ze]):Y(ze);return}typeof fe=="number"&&fe!==0&&se(K,fe)},[b,te,Y,U,i,s,se,A,C,H,F,a]),Ie=l.useCallback((K,Z)=>{const fe=Z??f,we=ze=>dc(ze,s,i,D,G);return K==="start"?d.jsx(_i,{size:r,icon:fe,gloss:m,thumbClassName:p,percent:we(H[0]),orientation:A,disabled:b,active:M==="start",ariaValueNow:H[0],ariaValueMin:s,ariaValueMax:H[1],ariaValueText:u(H[0]),...w("start"),onPointerDown:$("start"),onKeyDown:be("start")}):K==="end"?d.jsx(_i,{size:r,icon:fe,gloss:m,thumbClassName:p,percent:we(H[1]),orientation:A,disabled:b,active:M==="end",ariaValueNow:H[1],ariaValueMin:H[0],ariaValueMax:i,ariaValueText:u(H[1]),...w("end"),onPointerDown:$("end"),onKeyDown:be("end")}):d.jsx(_i,{size:r,icon:fe,gloss:m,thumbClassName:p,percent:we(F),orientation:A,disabled:b,active:M==="single",ariaValueNow:F,ariaValueMin:s,ariaValueMax:i,ariaValueText:u(F),...w("single"),onPointerDown:$("single"),onKeyDown:be("single")})},[M,b,u,m,be,$,f,i,s,A,H,F,r,w,p,G,D]),Ae=l.useMemo(()=>{if(C){const[K,Z]=H;return`${u(K)} — ${u(Z)}`}return u(F)},[u,C,H,F]),q=v==null?void 0:v.setDisplay;l.useLayoutEffect(()=>{q==null||q({valueLabel:Ae,min:s,max:i,range:C,singleValue:F,rangeValue:H,label:L})},[L,i,s,C,H,q,F,Ae]);const ie=A==="horizontal",ce=dz({isHorizontal:ie,gloss:m,slotClass:S.fill}),Be=uz({disabled:b,gloss:m,slotClass:S.rail}),ft=U==null?void 0:U.map(K=>{const Z=dc(K,s,i,D,G);return d.jsx("span",{"aria-hidden":!0,className:Lt(rz,S.mark),style:pz(Z,A)},K)}),vn=l.useCallback(K=>{R.current=K,typeof e=="function"?e(K):e&&(e.current=K)},[e]),hr=l.useMemo(()=>({fillRef:N,fillClassResolved:ce,railClass:Be,markNodes:ft,size:r,orientation:A,disabled:b,icon:f,range:C,renderThumb:Ie}),[b,ce,f,ft,A,Be,C,Ie,r]),{body:yn,hasCompoundParts:ln}=N2(_),qo=l.useMemo(()=>hz({isHorizontal:ie,thickness:o}),[ie,o]),Zo=NS({isHorizontal:ie,size:r,thickness:o,gloss:m,slotClass:S.track,className:g});return{setTrackRef:vn,trackHitClass:Zo,trackCrossStyle:qo,handleTrackPointerDown:ne,trackContextValue:hr,compoundBody:yn,hasCompoundParts:ln,range:C,icon:f}}function bz({label:t,showValue:e,valueText:n,hint:r,error:o,hintId:s,errorId:i,trackProps:a}){const c=Sn();return S2({label:t,labelClassName:c.label,showValue:e,valueText:n,hint:r,hintId:s,error:o,errorId:i,Header:Lf,Value:wf,track:d.jsx(Rf,{...a})})}function DS({className:t,classNames:e,...n}){const r=Sn();return d.jsx($e,{className:t,classNames:{...e,root:Lt(r.label,e==null?void 0:e.root)},...n})}DS.displayName="SliderLabel";function Lf({children:t,className:e,...n}){const{orientation:r}=Na(),o=Sn();return d.jsx(C2,{orientation:r,className:Lt(o.header,e),...n,children:t})}Lf.displayName="Slider.Header";function wf({children:t,className:e,...n}){const{display:r}=Na(),o=Sn();return d.jsx(_2,{fallback:r==null?void 0:r.valueLabel,className:Lt(o.value,e),...n,children:t})}wf.displayName="Slider.Value";function kS({children:t,className:e,id:n,...r}){const o=Na(),s=Sn();return d.jsx(Ye,{id:n??o.hintId,className:Lt(s.hint,e),...r,children:t})}kS.displayName="Slider.Hint";function OS({children:t,className:e,id:n,...r}){const o=Na(),s=Sn();return d.jsx(Ze,{id:n??o.errorId,className:Lt(s.error,e),...r,children:t})}OS.displayName="Slider.Error";const Rf=l.forwardRef(function(e,n){const r=gz(e,n),o=d.jsxs(d.Fragment,{children:[d.jsx(Nf,{}),r.range?d.jsxs(d.Fragment,{children:[d.jsx(ls,{thumb:"start",children:r.icon!=null?d.jsx(cs,{children:r.icon}):null}),d.jsx(ls,{thumb:"end",children:r.icon!=null?d.jsx(cs,{children:r.icon}):null})]}):d.jsx(ls,{thumb:"single",children:r.icon!=null?d.jsx(cs,{children:r.icon}):null})]});return d.jsx("div",{ref:r.setTrackRef,role:"presentation",className:r.trackHitClass,style:r.trackCrossStyle,onPointerDown:r.handleTrackPointerDown,children:d.jsx(x2,{value:r.trackContextValue,children:r.hasCompoundParts?r.compoundBody:o})})});Rf.displayName="SliderTrack";function If({className:t,...e}){const n=Af(),r=Sn();return d.jsx("span",{ref:n.fillRef,className:Lt(n.fillClassResolved,r.fill,t),...e})}If.displayName="SliderFill";function Nf({className:t,children:e,...n}){const r=Af(),o=Sn();return d.jsx("div",{className:Lt(r.railClass,o.rail,t),"aria-hidden":!0,...n,children:e??d.jsxs(d.Fragment,{children:[d.jsx(If,{}),r.markNodes]})})}Nf.displayName="SliderRail";function ls({thumb:t="single",children:e}){const n=Af(),r=O2(e,n.icon);return n.renderThumb(t,r)}ls.displayName="SliderThumb";function cs({children:t}){return t}cs.displayName="SliderIcon";function xz({children:t,id:e,orientation:n="horizontal",label:r,showValue:o,valueText:s,hint:i,error:a,range:c,value:u,defaultValue:f,onValueChange:m,min:p,max:b,step:g,marks:h,size:x,thickness:C,formatValue:_,icon:v,disabled:y,ariaLabel:S,gloss:A,thumbClassName:E}){const T=l.useId(),L=e??`slider-${T}`,w=Yt(L),R=Kt(L),N=P2(L),[D,P]=l.useState(null),j=l.useCallback(F=>{P(V=>I2(V,F)?V:F)},[]),G=qt(t),k=r!=null||G&&ye(t,"Label"),O=i!=null||G&&ye(t,"Slider.Hint"),M=a!=null||G&&ye(t,"Slider.Error"),B=l.useMemo(()=>({sliderId:L,labelId:N,hintId:w,errorId:R,hintConnected:O,errorConnected:M,labelConnected:k,orientation:n,display:D,setDisplay:j}),[D,R,M,O,k,w,N,n,j,L]),U=l.useMemo(()=>({labelId:N,isRequired:!1}),[N]);return{sliderId:L,isCompound:G,fieldCtx:B,fieldLabelCtx:U,trackProps:{range:c,value:u,defaultValue:f,onValueChange:m,min:p,max:b,step:g,marks:h,size:x,thickness:C,formatValue:_,icon:v,disabled:y,ariaLabel:S,gloss:A,thumbClassName:E,orientation:n},label:r,showValue:o,valueText:s,hint:i,error:a,hasHint:O,hasError:M,hintId:w,errorId:R}}function PS({children:t,className:e,classNames:n,id:r,orientation:o,label:s,showValue:i,valueText:a,hint:c,error:u,range:f,value:m,defaultValue:p,onValueChange:b,min:g,max:h,step:x,marks:C,size:_,thickness:v,formatValue:y,icon:S,disabled:A,ariaLabel:E,gloss:T,thumbClassName:L,...w}){const R=xz({children:t,id:r,orientation:o,label:s,showValue:i,valueText:a,hint:c,error:u,range:f,value:m,defaultValue:p,onValueChange:b,min:g,max:h,step:x,marks:C,size:_,thickness:v,formatValue:y,icon:S,disabled:A,ariaLabel:E,gloss:T,thumbClassName:L}),N=R.isCompound?t:d.jsx(bz,{label:R.label,showValue:R.showValue,valueText:R.valueText,hint:R.hint,error:R.error,hintId:R.hasHint?R.hintId:void 0,errorId:R.hasError?R.errorId:void 0,trackProps:R.trackProps});return d.jsx(h2,{value:R.fieldCtx,children:d.jsx(b2,{classNames:n,children:d.jsx(Xt.Provider,{value:R.fieldLabelCtx,children:d.jsx(pn,{id:R.sliderId,className:cz({orientation:R.fieldCtx.orientation,slotClass:n==null?void 0:n.root,className:e}),...w,children:N})})})})}PS.displayName="Slider";const Cz=Object.assign(PS,{Header:Lf,Label:DS,Value:wf,Hint:kS,Error:OS,Track:Rf,Rail:Nf,Fill:If,Thumb:ls,Icon:cs}),_z="absolute m-[-1px] h-px w-px overflow-hidden border-0 p-0 opacity-0 [clip:rect(0,0,0,0)]",Sz="relative inline-flex shrink-0 items-center justify-center",vz="min-w-0",yz="contents",Tz="inline-flex flex-wrap items-center gap-x-xsmall gap-y-0",Az="min-w-0",Ez="origin-center will-change-transform",Lz="font-w-mid",BS="text-muted",jS="text-muted",MS="text-muted",wz="origin-center will-change-transform",Rz="min-w-0 font-w-mid",Iz="relative cursor-pointer select-none rounded-small text-left",Nz="cursor-not-allowed",Dz="has-[:focus-visible]:outline has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-primary",kz="inline-grid grid-cols-[auto] grid-rows-[auto]",Oz="relative box-border inline-flex shrink-0 rounded-full",Pz="gloss-indicator border-0",Bz="bg-primary-tint",jz="pointer-events-none absolute inset-0 rounded-full",Mz="z-[1]",Fz="bg-primary",Gz="bg-primary-tint",Hz="absolute inset-y-0 left-0 aspect-square h-full w-auto will-change-transform flex",zz="z-[2]",Vz="absolute inset-0 flex items-center justify-center";function Da(t){return t==="left"?"left":"right"}function FS(t){return ua(Da(t))}function GS(t){return da(Da(t))}function Ui(t,e){return fa(t,Da(e))}function Uz(t){return Ru(t)}function $z({hasTextColumn:t,secondaryLines:e,gap:n,labelPosition:r,slotClass:o,className:s}){return nt(Iz,t?wu(e,n,Da(r),"inline-grid"):kz,Dz,o,s)}function Wz({size:t,thickness:e,gloss:n,slotClass:r,className:o}){return nt(Oz,e==null&&Wo[t].track,n?Pz:Bz,r,o)}function Xz(t){if(t==null)return;const e=Vs(t);return{height:e,minHeight:e,width:`calc(2 * (${e}))`,minWidth:`calc(2 * (${e}))`}}function Yz(t){if(t)return{background:t}}const Df=l.forwardRef(function({size:e,iconOff:n,iconOn:r,color:o,gloss:s=!1,thickness:i,className:a,classNames:c,disabled:u,checked:f,defaultChecked:m,onChange:p,id:b,name:g,value:h,required:x,form:C,autoFocus:_,tabIndex:v,readOnly:y,onBlur:S,onFocus:A,onPointerDown:E,children:T,...L},w){const R=l2(),N=_n(),D=l.useMemo(()=>({...N,...c}),[c,N]),P=l.useId(),j=d2(b,P,R==null?void 0:R.switchId),G=(R==null?void 0:R.hintId)??`${j}-hint`,k=(R==null?void 0:R.errorId)??`${j}-error`,O=e??(R==null?void 0:R.size)??"base",[M,B,U]=qH(f,m),[W,F]=l.useState(0),V=l.useCallback(de=>{const oe=de.target.checked;U||B(oe),p==null||p(de)},[U,p,B]),H=l.useCallback(de=>{E==null||E(de),!(de.defaultPrevented||u)&&(F(oe=>oe+1),R==null||R.setSqueezeToken(oe=>oe+1))},[u,R,E]),{"aria-label":re,...me}=L,pe={size:O,thickness:i,checked:M,disabled:u,color:o,gloss:s,squeezeToken:W,iconOff:n,iconOn:r,classNames:{track:D.track,fill:D.fill,thumb:D.thumb,thumbShell:D.thumbShell,icon:D.icon}},{track:Y}=t2(T);let te;return Y!=null?te=l.isValidElement(Y)?l.cloneElement(Y,pe):Y:T!=null&&n2(T)?te=d.jsxs($i,{...pe,children:[d.jsx(ka,{}),T]}):T!=null?te=T:te=d.jsx($i,{...pe}),d.jsxs("span",{className:nt(Sz,R!=null?FS(R.labelPosition):void 0,D.control,a),children:[d.jsx("input",{ref:w,id:j,type:"checkbox",role:"switch","aria-checked":M,className:nt(_z,D.input),disabled:u,name:g,value:h,required:x,form:C,autoFocus:_,tabIndex:v,readOnly:y??(U&&p===void 0),onBlur:S,onFocus:A,"aria-describedby":Ft(R!=null&&R.hintConnected?G:void 0,R!=null&&R.errorConnected?k:void 0),"aria-label":re??p2((R==null?void 0:R.hasTextColumn)??!1),onPointerDown:H,...U?{checked:M,onChange:V}:{defaultChecked:m,onChange:V},...me}),te]})});Df.displayName="SwitchControl";function $i({size:t,thickness:e,checked:n=!1,disabled:r,color:o,gloss:s=!1,squeezeToken:i=0,iconOff:a,iconOn:c,className:u,classNames:f,children:m,...p}){const b=_n(),g=l.useMemo(()=>({...b,...f}),[b,f]),h=l.useRef(null),x=l.useRef(null),C=l.useRef(null),_=l.useRef(null),v=l.useRef(null),y=l.useRef(null),S=l.useRef(null);i2({checked:n,disabled:r,size:t,thickness:e,squeezeToken:i,trackRef:h,trackFillRef:x,thumbRef:C,thumbShellRef:_,thumbFillRef:v,iconOffRef:y,iconOnRef:S});const A=l.useMemo(()=>({checked:n,disabled:r,size:t,color:o,gloss:s,trackFillRef:x,thumbRef:C,thumbShellRef:_,thumbFillRef:v,iconOffRef:y,iconOnRef:S}),[n,o,r,s,t]),E=d.jsxs(d.Fragment,{children:[d.jsx(ka,{}),d.jsxs(kf,{children:[a!=null?d.jsx(Wi,{when:"off",children:a}):null,c!=null?d.jsx(Wi,{when:"on",children:c}):null]})]});return d.jsx(u2,{value:A,children:d.jsx("span",{ref:h,className:Wz({size:t,thickness:e,gloss:s,slotClass:g.track,className:u}),style:Xz(e),"aria-hidden":!0,...p,children:m??E})})}$i.displayName="SwitchTrack";function ka({className:t,style:e,...n}){const r=yf(),o=_n(),s=Yz(r.color);return d.jsx("span",{ref:r.trackFillRef,"aria-hidden":!0,className:nt(jz,r.gloss&&Mz,!r.color&&(r.gloss?Gz:Fz),o.fill,t),style:{opacity:0,...s,...e},...n})}ka.displayName="SwitchFill";function kf({className:t,children:e,...n}){const r=yf(),o=_n();return d.jsx("span",{ref:r.thumbRef,className:nt(Hz,r.gloss&&zz,o.thumb,t),...n,children:d.jsx(wa,{active:r.checked,size:r.size,gloss:r.gloss,shellRef:r.thumbShellRef,fillRef:r.thumbFillRef,className:o.thumbShell,children:e})})}kf.displayName="SwitchThumb";function Wi({when:t,children:e,className:n,...r}){const o=yf(),s=_n(),i=t==="off"?o.iconOffRef:o.iconOnRef,a=t==="on",c=t==="off"?!o.checked:o.checked;return d.jsx(Ra,{iconRef:i,size:o.size,highlighted:a,gloss:o.gloss,className:nt(Vz,s.icon,n),style:{opacity:c?1:0},...r,children:e})}Wi.displayName="SwitchIcon";const HS=l.forwardRef(function({className:e,children:n,...r},o){const s=Ia(),i=_n();return d.jsx("div",{ref:o,className:nt(yz,s.isCompound&&vz,i.content,e),...r,children:n})});HS.displayName="SwitchContent";function zS({children:t,className:e,...n}){const r=Ia(),o=_n(),s=Wo[r.size];return d.jsx("span",{ref:i=>{r.isCompound&&r.useInlineCompoundMotion&&(r.textMotionRef.current=i)},className:nt(Tz,r.isCompound&&GS(r.labelPosition),r.isCompound&&(r.hasCompoundHint||r.hasCompoundError)&&Az,r.isCompound&&r.useInlineCompoundMotion&&Ez,o.label,e),...n,children:d.jsx(ee,{as:"span",variant:s.title,inheritColor:!0,className:nt(Lz,r.disabled&&BS,o.labelText),children:t})})}zS.displayName="SwitchLabel";function VS({children:t,className:e,variant:n,...r}){const o=Ia(),s=_n();return d.jsx(Ye,{as:"span",id:o.hintId,variant:n??Wo[o.size].desc,className:nt(o.isCompound&&Ui(2,o.labelPosition),o.disabled&&jS,s.hint,e),...r,children:t})}VS.displayName="Switch.Hint";function US({children:t,className:e,...n}){const r=Ia(),o=_n();return d.jsx(Ze,{as:"span",id:r.errorId,variant:Wo[r.size].desc,className:nt(r.isCompound&&Ui(Uz(r.hasCompoundHint),r.labelPosition),r.disabled&&MS,o.error,e),...n,children:t})}US.displayName="Switch.Error";function Kz({label:t,hint:e,error:n,hasTextColumn:r,hasHint:o,hasError:s,secondaryLines:i,textColRef:a,size:c,disabled:u,labelPosition:f,hintId:m,errorId:p,controlProps:b}){const g=_n(),h=Wo[c];return d.jsxs(d.Fragment,{children:[d.jsx(Df,{size:c,disabled:u,className:FS(f),...b}),r?d.jsxs(d.Fragment,{children:[d.jsx("span",{ref:a,className:nt(GS(f),!i&&wz,g.simpleLabelWrap,g.label),children:d.jsx(ee,{as:"span",variant:h.title,inheritColor:!0,className:nt(Rz,u&&BS,g.simpleLabelText,g.labelText),children:t})}),o?d.jsx(Ye,{as:"span",id:m,variant:h.desc,className:nt(Ui(2,f),u&&jS,g.hint),children:e}):null,s?d.jsx(Ze,{as:"span",id:p,variant:h.desc,className:nt(Ui(o?3:2,f),u&&MS,g.error),children:n}):null]}):null]})}function qz({children:t,label:e,hint:n,error:r,labelPosition:o="right",size:s="base",disabled:i,className:a,...c}){const f=`switch-${l.useId()}`,m=f2(f),p=m2(f),[,b]=l.useState(0),g=qt(t),h=g?ye(t,"Switch.Hint"):!1,x=g?ye(t,"Switch.Error"):!1,C=g?JH(t):!1,_=g&&ZH(a),v=n!=null,y=r!=null,S=e2(g,v,y,h,x),A=g?C:e!=null,E=i,T=!E&&A&&(!g||_),L=l.useRef(null),w=Wo[s];return{fieldCtx:l.useMemo(()=>({switchId:f,hintId:m,errorId:p,size:s,labelPosition:o,disabled:E,isCompound:g,hasCompoundHint:h,hasCompoundError:x,hasTextColumn:A,hintConnected:g?h:v,errorConnected:g?x:y,useInlineCompoundMotion:_,textMotionRef:L,setSqueezeToken:b}),[E,h,x,v,y,A,m,p,g,o,s,f,_]),isCompound:g,hasTextColumn:A,secondaryLines:S,sz:w,label:e,hint:n,error:r,hasHint:v,hasError:y,hintId:m,errorId:p,disabled:E,enableTextMotion:T,textColRef:L,labelPosition:o,controlRest:c}}const $S=l.forwardRef(function({children:e,label:n,hint:r,error:o,labelPosition:s="right",size:i="base",disabled:a,className:c,classNames:u,onPointerDown:f,...m},p){const b=qz({children:e,label:n,hint:r,error:o,labelPosition:s,size:i,disabled:a,className:c,...m}),{handlePointerDown:g}=s2({isDisabled:b.disabled,enableTextMotion:b.enableTextMotion,textMotionRef:b.textColRef,onPointerDown:f}),h=nt($z({hasTextColumn:b.hasTextColumn,secondaryLines:b.secondaryLines,gap:b.sz.gap,labelPosition:b.labelPosition,slotClass:u==null?void 0:u.root,className:c}),b.disabled&&Nz);return d.jsx(a2,{value:b.fieldCtx,children:d.jsx(c2,{classNames:u,children:d.jsx("label",{ref:p,className:h,onPointerDown:g,children:b.isCompound?QH(e,b.controlRest):d.jsx(Kz,{label:b.label,hint:b.hint,error:b.error,hasTextColumn:b.hasTextColumn,hasHint:b.hasHint,hasError:b.hasError,secondaryLines:b.secondaryLines,textColRef:b.textColRef,size:b.fieldCtx.size,disabled:b.disabled,labelPosition:b.labelPosition,hintId:b.hintId,errorId:b.errorId,controlProps:b.controlRest})})})})});$S.displayName="SwitchRoot";const Zz=Object.assign($S,{Control:Df,Track:$i,Fill:ka,Thumb:kf,Icon:Wi,Content:HS,Label:zS,Hint:VS,Error:US}),WS=l.createContext(null),mc=l.createContext({});function Qz({classNames:t,children:e}){const n=l.useContext(mc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(mc.Provider,{value:r,children:e})}function Oa(){const t=l.useContext(WS);if(!t)throw new Error("Components Tabs must be inside <Tabs>.");return t}function Of(){return l.useContext(mc)}function Jr(...t){return I(...t)}function Jz(t,e){const n=t!==void 0,[r,o]=l.useState(e??""),s=n?t:r,i=l.useCallback(a=>{n||o(a)},[n]);return[s,i,n]}function eV(t){return le[t].controlText}function XS(t){return Array.from(t.querySelectorAll('[role="tab"]:not([disabled])')).filter(e=>e instanceof HTMLButtonElement)}function tV(t,e){const n=XS(t);if(n.length===0)return null;const r=n[Math.max(0,Math.min(e,n.length-1))];return r.focus(),r}function nV(...t){return e=>{for(const n of t)typeof n=="function"?n(e):n&&(n.current=e)}}const rV={default:"",outline:"bg-transparent border-token rounded-mid p-xsmall",secondary:"bg-secondary border-token rounded-mid p-xsmall",gloss:"border-0 p-small"},oV={default:"bg-primary",outline:"bg-secondary",secondary:"bg-tertiary",gloss:"bg-tertiary"};function sV({orientation:t,slotClass:e,className:n}){return Jr("flex min-w-0 text-left",t==="horizontal"?"flex-col gap-mid":"flex-row gap-mid",e,n)}function iV({orientation:t,variant:e,slotClass:n,className:r}){const o=e==="gloss",s=e==="outline"||e==="secondary"||e==="gloss";return Jr("relative box-border min-w-0 w-fit",t==="horizontal"?I("flex flex-row flex-wrap gap-xsmall",s?"items-center":"items-stretch border-b-token"):I("flex flex-col gap-xsmall",s?"items-start":"items-stretch border-l-token"),o&&"gloss-panel rounded-mid text-foreground",rV[e],n,r)}function aV({variant:t,slotClass:e}){return Jr("pointer-events-none absolute z-0 motion-reduce:transition-none",t==="default"?"rounded-full":"rounded-mid",oV[t],e)}function lV({size:t,variant:e,isSelected:n,isDisabled:r,slotClass:o,className:s}){const i=le[t],a=e==="outline"||e==="secondary"||e==="gloss";return Jr("relative z-[1] m-0 inline-flex shrink-0 appearance-none items-center justify-center border-0 bg-transparent outline-none",i.padX,i.padY,a&&"rounded-mid","focus-ring",r?"cursor-not-allowed opacity-45":"cursor-pointer",n?"text-primary":"text-muted hover:text-primary",!n&&!r&&gn,o,s)}const cV="relative z-[1] shrink-0";function uV(t){return Jr("inline-flex origin-center items-center gap-xsmall will-change-transform",t)}function dV({slotClass:t,className:e}){return Jr("min-w-0 outline-none focus-ring",t,e)}function fV(t){const e=getComputedStyle(t);return{borderTop:Number.parseFloat(e.borderTopWidth)||0,borderLeft:Number.parseFloat(e.borderLeftWidth)||0}}function mV(t,e){const n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),{borderTop:o,borderLeft:s}=fV(t),i=n.left+s,a=n.top+o;return{left:r.left-i+t.scrollLeft,top:r.top-a+t.scrollTop,width:r.width,height:r.height}}function pV(t,e,n,r){const o=t.getBoundingClientRect(),s=e.getBoundingClientRect(),i=s.left-o.left+t.scrollLeft,a=s.top-o.top+t.scrollTop,c=s.width,u=s.height;return r==="default"?n==="horizontal"?{left:i,top:a+u-2,width:c,height:2}:{left:i,top:a,width:2,height:u}:mV(t,e)}function hV(t,e){t.style.left=`${e.left}px`,t.style.top=`${e.top}px`,t.style.width=`${e.width}px`,t.style.height=`${e.height}px`}function gV(t,e,n,r,o,s,i){const a=l.useRef(!0),c=l.useCallback(()=>{var _;const u=t.current,f=e.current,m=(_=s.current)==null?void 0:_.get(n);if(!u||!f||!m){f&&(f.style.opacity="0");return}const p=pV(u,m,r,o),b=ue();if(f.style.opacity="1",b||a.current){z(f),hV(f,p);return}const g=f.offsetLeft,h=f.offsetTop,x=f.offsetWidth,C=f.offsetHeight;z(f),X.fromTo(f,{left:g,top:h,width:x,height:C},{...p,...ve(),overwrite:"auto"})},[n,e,t,r,s,o]);l.useLayoutEffect(()=>{c(),a.current=!1},[c]),l.useLayoutEffect(()=>{var m;const u=t.current;if(!u||typeof ResizeObserver>"u")return;const f=new ResizeObserver(()=>c());f.observe(u);for(const p of((m=s.current)==null?void 0:m.values())??[])f.observe(p);return()=>f.disconnect()},[n,i,t,s,c])}function YS(t,e){return`${t}-tab-${e}`}function KS(t,e){return`${t}-panel-${e}`}function bV({isSelected:t,isDisabled:e,panelId:n}){return{"aria-selected":t,"aria-controls":n,tabIndex:t?0:-1,disabled:e}}function xV({isSelected:t,tabId:e}){return{"aria-labelledby":e,hidden:!t,tabIndex:t?0:-1}}function CV({motionRef:t,isDisabled:e,isSelected:n,onPointerEnter:r,onPointerLeave:o,onPointerDown:s}){return lr({isDisabled:!!e,enabled:!e&&!n,textMotionRef:t,hoverLift:!0,onPointerEnter:r,onPointerLeave:o,onPointerDown:s})}const qS=l.forwardRef(function({value:e,children:n,asChild:r,className:o,disabled:s,onClick:i,onPointerDown:a,onPointerEnter:c,onPointerLeave:u,...f},m){const{value:p,setValue:b,size:g,variant:h,baseId:x,disabled:C,tabElementsRef:_,notifyTabLayout:v}=Oa(),y=Of(),S=l.useRef(null),A=p===e,E=C||s,T=YS(x,e),L=KS(x,e),w=bV({isSelected:A,isDisabled:E,panelId:L}),R=l.useCallback(k=>{k?_.current.set(e,k):_.current.delete(e),v(),typeof m=="function"?m(k):m&&(m.current=k)},[v,m,_,e]);l.useLayoutEffect(()=>{const k=_.current;return()=>{k.delete(e),v()}},[v,_,e]);const N=l.useCallback(k=>{i==null||i(k),!(k.defaultPrevented||E)&&b(e)},[E,i,b,e]),{handlePointerEnter:D,handlePointerLeave:P,handlePointerDown:j}=CV({motionRef:S,isDisabled:E,isSelected:A,onPointerEnter:c,onPointerLeave:u,onPointerDown:a}),G=lV({size:g,variant:h,isSelected:A,isDisabled:E,slotClass:y.tab,className:o});if(r&&l.isValidElement(n)){const k=n;return l.cloneElement(k,{...f,role:"tab",id:T,"data-tab-value":e,"aria-selected":w["aria-selected"],"aria-controls":w["aria-controls"],tabIndex:w.tabIndex,disabled:E||k.props.disabled,ref:nV(R,k.props.ref),className:Jr(k.props.className,cV,o),onClick:O=>{var M,B;(B=(M=k.props).onClick)==null||B.call(M,O),N(O)},onPointerEnter:O=>{var M,B;(B=(M=k.props).onPointerEnter)==null||B.call(M,O),D(O)},onPointerLeave:O=>{var M,B;(B=(M=k.props).onPointerLeave)==null||B.call(M,O),P(O)},onPointerDown:O=>{var M,B;(B=(M=k.props).onPointerDown)==null||B.call(M,O),j(O)}})}return d.jsx("button",{ref:R,type:"button",role:"tab",id:T,"data-tab-value":e,"aria-selected":w["aria-selected"],"aria-controls":w["aria-controls"],tabIndex:w.tabIndex,disabled:w.disabled,className:G,onClick:N,onPointerEnter:D,onPointerLeave:P,onPointerDown:j,...f,children:d.jsx(ee,{as:"span",inheritColor:!0,ref:S,variant:eV(g),className:uV(y.tabText),children:n})})});qS.displayName="TabsTab";const ZS=l.forwardRef(function({value:e,children:n,className:r,...o},s){const{value:i,baseId:a}=Oa(),c=Of(),u=i===e,f=YS(a,e),m=KS(a,e),p=xV({isSelected:u,tabId:f});return d.jsx("div",{ref:s,role:"tabpanel",id:m,"aria-labelledby":p["aria-labelledby"],hidden:p.hidden,tabIndex:p.tabIndex,className:dV({slotClass:c.panel,className:r}),...o,children:n})});ZS.displayName="TabsPanel";const QS=l.forwardRef(function({className:e,children:n,onKeyDown:r,...o},s){const{value:i,setValue:a,orientation:c,variant:u,disabled:f,tabElementsRef:m,layoutEpoch:p}=Oa(),b=Of(),g=l.useRef(null),h=l.useRef(null),C=Io(s,u==="gloss"),_=l.useCallback(y=>{C(y),g.current=y},[C]);gV(g,h,i,c,u,m,p);const v=l.useCallback(y=>{if(r==null||r(y),y.defaultPrevented||f)return;const S=g.current;if(!S)return;const A=XS(S);if(A.length===0)return;const E=A.findIndex(N=>N===document.activeElement),T=c==="horizontal";let L=null;switch(y.key){case"ArrowRight":T&&(L=E<0?0:(E+1)%A.length);break;case"ArrowLeft":T&&(L=E<0?A.length-1:(E-1+A.length)%A.length);break;case"ArrowDown":T||(L=E<0?0:(E+1)%A.length);break;case"ArrowUp":T||(L=E<0?A.length-1:(E-1+A.length)%A.length);break;case"Home":L=0;break;case"End":L=A.length-1;break;default:return}if(L==null)return;y.preventDefault();const w=tV(S,L),R=w==null?void 0:w.dataset.tabValue;R&&a(R)},[f,r,c,a]);return d.jsxs("div",{ref:_,role:"tablist",tabIndex:f?-1:0,"aria-orientation":c,"aria-disabled":f||void 0,className:iV({orientation:c,variant:u,slotClass:b.list,className:e}),onKeyDown:v,...o,children:[d.jsx("span",{ref:h,"aria-hidden":!0,className:aV({variant:u,slotClass:b.indicator}),style:{left:0,top:0,width:0,height:0,opacity:0}}),n]})});QS.displayName="TabsList";function _V({value:t,defaultValue:e,onValueChange:n,orientation:r="horizontal",size:o="base",variant:s="default",disabled:i=!1}){const a=l.useId(),[c,u]=Jz(t,e),f=l.useRef(null);f.current||(f.current=new Map);const[m,p]=l.useState(0),b=l.useCallback(x=>{u(x),n==null||n(x)},[n,u]),g=l.useCallback(()=>{p(x=>x+1)},[]);return{contextValue:l.useMemo(()=>({value:c,setValue:b,orientation:r,size:o,variant:s,baseId:a,disabled:i,tabElementsRef:f,layoutEpoch:m,notifyTabLayout:g}),[c,b,r,o,s,a,i,f,m,g])}}const pc=l.forwardRef(function({children:e,className:n,classNames:r,value:o,defaultValue:s,onValueChange:i,orientation:a="horizontal",size:c="base",variant:u="default",disabled:f=!1,...m},p){const{contextValue:b}=_V({value:o,defaultValue:s,onValueChange:i,orientation:a,size:c,variant:u,disabled:f});return d.jsx(WS.Provider,{value:b,children:d.jsx(Qz,{classNames:r,children:d.jsx("div",{ref:p,className:sV({orientation:b.orientation,slotClass:r==null?void 0:r.root,className:n}),"data-orientation":b.orientation,...m,children:e})})})});pc.displayName="Tabs";const SV=Object.assign(pc,{Root:pc,List:QS,Tab:qS,Panel:ZS}),Pf=l.createContext(null),hc=l.createContext({});function vV({value:t,children:e}){return d.jsx(Pf.Provider,{value:t,children:e})}function yV({classNames:t,children:e}){const n=l.useContext(hc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(hc.Provider,{value:r,children:e})}function Pa(){const t=l.useContext(Pf);if(!t)throw new Error("Meter.* components must be inside <Meter>.");return t}function TV(){return l.useContext(Pf)}function eo(){return l.useContext(hc)}function mr(...t){return I(...t)}function AV(t,e,n){return Math.min(n,Math.max(e,t))}function EV(t,e,n){return n<=e?0:(t-e)/(n-e)*100}function LV(t){return Number.isInteger(t)?String(t):t.toFixed(1)}function wV(t,e){return t===e?!0:t==null||e==null?!1:t.clampedValue===e.clampedValue&&t.statusText===e.statusText&&t.min===e.min&&t.max===e.max}function RV({fillTargetStyle:t,isHorizontal:e}){const n=l.useRef(null),r=l.useRef(!0),o=ue();return l.useLayoutEffect(()=>{const s=n.current;if(s){if(o||r.current){r.current=!1,z(s),s.style.width=t.width!=null?String(t.width):"",s.style.height=t.height!=null?String(t.height):"";return}z(s),X.to(s,{...e?{width:t.width}:{height:t.height},...ve(),overwrite:"auto"})}},[t.height,t.width,e,o]),l.useEffect(()=>{const s=n.current;return()=>{s&&z(s)}},[]),{fillRef:n}}const IV={small:"h-small",base:"h-base",mid:"h-plus",large:"h-mid"},NV={small:"w-small",base:"w-base",mid:"w-plus",large:"w-mid"},DV="relative overflow-hidden rounded-full bg-primary-tint",kV="w-full",OV="h-48",PV="absolute rounded-full",BV="inset-y-0 left-0",jV="inset-x-0 bottom-0",MV="bg-primary",FV="flex items-baseline justify-between gap-xsmall",GV="w-full",HV="min-w-[8rem]",zV="tabular-nums text-muted";function VV({orientation:t,slotClass:e,className:n}){return mr(Ef(t),e,n)}function UV({orientation:t,slotClass:e,className:n}){return mr(FV,t==="horizontal"?GV:HV,e,n)}function $V({slotClass:t,className:e}){return mr(zV,t,e)}function WV({isHorizontal:t,size:e,thickness:n,slotClass:r,className:o}){return mr(DV,t?kV:OV,n==null&&(t?IV[e]:NV[e]),r,o)}function XV({isHorizontal:t,hasCustomColor:e,slotClass:n}){return mr(PV,t?BV:jV,!e&&MV,n)}function YV({isHorizontal:t,thickness:e}){if(e==null)return;const n=Vs(e);return t?{height:n}:{width:n}}function KV(t){if(t)return{background:t}}function qV({isHorizontal:t,percent:e}){return t?{width:`${e}%`,height:"100%"}:{width:"100%",height:`${e}%`}}function ZV({isHorizontal:t,percent:e,fillColorStyle:n}){return{width:t?`${e}%`:"100%",height:t?"100%":`${e}%`,...n}}function JS(t){return`${t}-label`}function QV({clampedValue:t,min:e,max:n,statusText:r,labelConnected:o,labelId:s,ariaDescribedBy:i}){return{"aria-valuenow":t,"aria-valuemin":e,"aria-valuemax":n,"aria-valuetext":r,"aria-labelledby":o?s:void 0,"aria-describedby":i,"aria-label":o?void 0:r}}function JV({ariaDescribedByProp:t,hintConnected:e,hintId:n,errorConnected:r,errorId:o}){return t??Ft(e?n:void 0,r?o:void 0)}function eU({value:t,min:e=0,max:n=100,size:r="base",thickness:o,color:s,formatValue:i=LV,orientation:a,"aria-describedby":c}){const u=TV(),f=a??(u==null?void 0:u.orientation)??"horizontal",m=u==null?void 0:u.meterId,p=m!=null?JS(m):void 0,b=(u==null?void 0:u.labelConnected)??!1,g=(u==null?void 0:u.hintConnected)??!1,h=(u==null?void 0:u.errorConnected)??!1,x=l.useMemo(()=>AV(t,e,n),[n,e,t]),C=l.useMemo(()=>EV(x,e,n),[x,n,e]),_=f==="horizontal",v=l.useMemo(()=>i(x),[x,i]),y=JV({ariaDescribedByProp:c,hintConnected:g,hintId:u==null?void 0:u.hintId,errorConnected:h,errorId:u==null?void 0:u.errorId}),S=QV({clampedValue:x,min:e,max:n,statusText:v,labelConnected:b,labelId:p,ariaDescribedBy:y}),A=l.useMemo(()=>YV({isHorizontal:_,thickness:o}),[_,o]),E=l.useMemo(()=>KV(s),[s]),T=l.useMemo(()=>qV({isHorizontal:_,percent:C}),[_,C]),L=l.useMemo(()=>ZV({isHorizontal:_,percent:C,fillColorStyle:E}),[E,_,C]),w=u==null?void 0:u.setDisplay;return l.useLayoutEffect(()=>{w==null||w({clampedValue:x,statusText:v,min:e,max:n})},[x,n,e,w,v]),{size:r,thickness:o,color:s,isHorizontal:_,percent:C,aria:S,trackCrossStyle:A,fillColorStyle:E,fillTargetStyle:T,fillInitialStyle:L}}function tU({label:t,showValue:e,valueText:n,hint:r,error:o,trackProps:s}){const i=eo(),a=t!=null||e||n!=null;return d.jsxs(d.Fragment,{children:[a?d.jsxs(Bf,{children:[t!=null?d.jsx($e,{classNames:{root:i.label},children:t}):null,n!=null?d.jsx(Xi,{children:n}):e?d.jsx(Xi,{}):null]}):null,s.value!=null?d.jsx(Ff,{...s,value:s.value}):null,r!=null?d.jsx(jf,{children:r}):null,o!=null?d.jsx(Mf,{children:o}):null]})}function ev({className:t,classNames:e,...n}){const r=eo();return d.jsx($e,{className:t,classNames:{...e,root:mr(r.label,e==null?void 0:e.root)},...n})}ev.displayName="MeterLabel";function Bf({children:t,className:e,...n}){const{orientation:r}=Pa(),o=eo();return d.jsx("div",{className:UV({orientation:r,slotClass:o.header,className:e}),...n,children:t})}Bf.displayName="Meter.Header";function Xi({children:t,className:e,...n}){const{display:r}=Pa(),o=eo(),s=t??(r==null?void 0:r.statusText);return s==null?null:d.jsx(ee,{as:"span",variant:"base",className:$V({slotClass:o.value,className:e}),...n,children:s})}Xi.displayName="Meter.Value";function jf({children:t,className:e,id:n,...r}){const o=Pa(),s=eo();return d.jsx(Ye,{id:n??o.hintId,className:mr(s.hint,e),...r,children:t})}jf.displayName="Meter.Hint";function Mf({children:t,className:e,id:n,...r}){const o=Pa(),s=eo();return d.jsx(Ze,{id:n??o.errorId,className:mr(s.error,e),...r,children:t})}Mf.displayName="Meter.Error";const Ff=l.forwardRef(function({value:e,min:n,max:r,size:o,thickness:s,color:i,formatValue:a,orientation:c,className:u,"aria-describedby":f,...m},p){const b=eo(),{size:g,isHorizontal:h,aria:x,trackCrossStyle:C,fillTargetStyle:_,fillInitialStyle:v}=eU({value:e,min:n,max:r,size:o,thickness:s,color:i,formatValue:a,orientation:c,"aria-describedby":f}),{fillRef:y}=RV({fillTargetStyle:_,isHorizontal:h});return d.jsx("div",{ref:p,role:"meter","aria-valuenow":x["aria-valuenow"],"aria-valuemin":x["aria-valuemin"],"aria-valuemax":x["aria-valuemax"],"aria-valuetext":x["aria-valuetext"],"aria-labelledby":x["aria-labelledby"],"aria-describedby":x["aria-describedby"],"aria-label":x["aria-label"],className:WV({isHorizontal:h,size:g??"base",thickness:s,slotClass:b.track,className:u}),style:C,...m,children:d.jsx("span",{ref:y,"aria-hidden":!0,className:XV({isHorizontal:h,hasCustomColor:!!i,slotClass:b.fill}),style:v})})});Ff.displayName="Meter.Track";function nU({children:t,id:e,orientation:n="horizontal",label:r,showValue:o,valueText:s,hint:i,error:a,value:c,min:u,max:f,size:m,thickness:p,color:b,formatValue:g}){const h=l.useId(),x=e??`meter-${h}`,C=Yt(x),_=Kt(x),v=JS(x),[y,S]=l.useState(null),A=l.useCallback(P=>{S(j=>wV(j,P)?j:P)},[]),E=qt(t),T=r!=null||E&&ye(t,"Label"),L=i!=null||E&&ye(t,"Meter.Hint"),w=a!=null||E&&ye(t,"Meter.Error"),R=l.useMemo(()=>({meterId:x,hintId:C,errorId:_,hintConnected:L,errorConnected:w,labelConnected:T,orientation:n,display:y,setDisplay:A}),[y,_,w,L,T,C,x,n,A]),N=l.useMemo(()=>({labelId:v}),[v]);return{meterId:x,isCompound:E,fieldCtx:R,fieldLabelCtx:N,trackProps:{value:c,min:u,max:f,size:m,thickness:p,color:b,formatValue:g,orientation:n},label:r,showValue:o,valueText:s,hint:i,error:a}}function tv({children:t,className:e,classNames:n,id:r,orientation:o,label:s,showValue:i,valueText:a,hint:c,error:u,value:f,min:m,max:p,size:b,thickness:g,color:h,formatValue:x,...C}){const _=nU({children:t,id:r,orientation:o,label:s,showValue:i,valueText:a,hint:c,error:u,value:f,min:m,max:p,size:b,thickness:g,color:h,formatValue:x}),v=_.isCompound?t:d.jsx(tU,{label:_.label,showValue:_.showValue,valueText:_.valueText,hint:_.hint,error:_.error,trackProps:_.trackProps});return d.jsx(vV,{value:_.fieldCtx,children:d.jsx(yV,{classNames:n,children:d.jsx(Xt.Provider,{value:_.fieldLabelCtx,children:d.jsx(pn,{id:_.meterId,className:VV({orientation:_.fieldCtx.orientation,slotClass:n==null?void 0:n.root,className:e}),...C,children:v})})})})}tv.displayName="Meter";const rU=Object.assign(tv,{Header:Bf,Label:ev,Value:Xi,Hint:jf,Error:Mf,Track:Ff}),Gf=l.createContext(null),gc=l.createContext({});function oU({value:t,children:e}){return d.jsx(Gf.Provider,{value:t,children:e})}function sU({classNames:t,children:e}){const n=l.useContext(gc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(gc.Provider,{value:r,children:e})}function Ba(){const t=l.useContext(Gf);if(!t)throw new Error("ProgressBar.* components must be inside <ProgressBar>.");return t}function iU(){return l.useContext(Gf)}function to(){return l.useContext(gc)}const aU=1500,lU="expo.inOut";function Hn(...t){return I(...t)}function cU(t,e,n){return Math.min(n,Math.max(e,t))}function uU(t,e,n){return n<=e?0:(t-e)/(n-e)*100}function dU(t){return Number.isInteger(t)?String(t):t.toFixed(1)}function fU(t,e){return t===e?!0:t==null||e==null?!1:t.clampedValue===e.clampedValue&&t.statusText===e.statusText&&t.min===e.min&&t.max===e.max&&t.indeterminate===e.indeterminate}function mU({indeterminate:t,fillTargetStyle:e,isHorizontal:n}){const r=l.useRef(null),o=l.useRef(!0),s=ue();return l.useLayoutEffect(()=>{if(t)return;const i=r.current;if(!i)return;const a=Se(),c=n?"width":"height",u=e[c]!=null?String(e[c]):"",f=()=>{z(i),i.style.transform="",n?(i.style.width=u,i.style.height="100%"):(i.style.width="100%",i.style.height=u)};if(s||!a.enableProgressFill||o.current){o.current=!1,f();return}o.current=!1,z(i),i.style.transform="",X.to(i,{[c]:u,...h0(),overwrite:"auto"})},[e.height,e.width,t,n,s]),l.useLayoutEffect(()=>{if(!t)return;const i=r.current,a=i==null?void 0:i.parentElement;if(!i||!a)return;if(z(i),s){X.set(i,{clearProps:"transform"});return}const c=()=>{const f=n?a.offsetWidth:a.offsetHeight,m=n?i.offsetWidth:i.offsetHeight;f<=0||m<=0||(z(i),X.fromTo(i,n?{x:-m}:{y:m},{...n?{x:f}:{y:-f},duration:aU/1e3,ease:lU,repeat:-1,overwrite:"auto"}))};if(c(),typeof ResizeObserver>"u")return;const u=new ResizeObserver(()=>c());return u.observe(a),u.observe(i),()=>u.disconnect()},[t,n,s]),l.useEffect(()=>{const i=r.current;return()=>{i&&z(i)}},[]),{fillRef:r,reduceMotion:s}}const pU={small:"h-small",base:"h-base",mid:"h-plus",large:"h-mid"},hU={small:"w-small",base:"w-base",mid:"w-plus",large:"w-mid"},gU="relative overflow-hidden rounded-full bg-primary-tint",bU="w-full",xU="h-48",CU="absolute rounded-full",_U="inset-y-0 left-0",SU="inset-x-0 bottom-0",nv="bg-primary",vU="absolute rounded-full will-change-transform",yU="inset-y-0 left-0 w-1/4",TU="inset-x-0 bottom-0 h-1/4",AU="left-1/4 w-1/2",EU="bottom-1/4 h-1/2",LU="flex items-baseline justify-between gap-xsmall",wU="w-full",RU="min-w-[8rem]",IU="tabular-nums text-muted";function NU({orientation:t,slotClass:e,className:n}){return Hn(Ef(t),e,n)}function DU({orientation:t,slotClass:e,className:n}){return Hn(LU,t==="horizontal"?wU:RU,e,n)}function kU({slotClass:t,className:e}){return Hn(IU,t,e)}function OU({isHorizontal:t,size:e,thickness:n,slotClass:r,className:o}){return Hn(gU,t?bU:xU,n==null&&(t?pU[e]:hU[e]),r,o)}function PU({isHorizontal:t,hasCustomColor:e,slotClass:n}){return Hn(CU,t?_U:SU,!e&&nv,n)}function BU({isHorizontal:t,hasCustomColor:e,reduceMotion:n,slotClass:r}){return Hn(vU,t?yU:TU,!e&&nv,n&&(t?AU:EU),r)}function jU({isHorizontal:t,thickness:e}){if(e==null)return;const n=Vs(e);return t?{height:n}:{width:n}}function MU(t){if(t)return{background:t}}function FU({isHorizontal:t,percent:e}){return t?{width:`${e}%`,height:"100%"}:{width:"100%",height:`${e}%`}}function GU({isHorizontal:t,fillColorStyle:e}){return{...t?{height:"100%"}:{width:"100%"},...e}}const HU="Loading…";function rv(t){return`${t}-label`}function zU({clampedValue:t,min:e,max:n,statusText:r,indeterminate:o,labelId:s,ariaDescribedBy:i}){return{"aria-valuenow":o?void 0:t,"aria-valuemin":o?void 0:e,"aria-valuemax":o?void 0:n,"aria-valuetext":r,"aria-busy":o||void 0,"aria-labelledby":s,"aria-describedby":i,"aria-label":s==null?r:void 0}}function VU({ariaDescribedByProp:t,hintConnected:e,hintId:n,errorConnected:r,errorId:o}){return t??Ft(e?n:void 0,r?o:void 0)}function UU({value:t=0,indeterminate:e=!1,min:n=0,max:r=100,size:o="base",thickness:s,color:i,formatValue:a=dU,orientation:c,"aria-describedby":u}){const f=iU(),m=c??(f==null?void 0:f.orientation)??"horizontal",p=f==null?void 0:f.progressId,b=p!=null?rv(p):void 0,g=(f==null?void 0:f.hintConnected)??!1,h=(f==null?void 0:f.errorConnected)??!1,x=l.useMemo(()=>cU(t,n,r),[r,n,t]),C=l.useMemo(()=>uU(x,n,r),[x,r,n]),_=m==="horizontal",v=l.useMemo(()=>e?HU:a(x),[x,a,e]),y=VU({ariaDescribedByProp:u,hintConnected:g,hintId:f==null?void 0:f.hintId,errorConnected:h,errorId:f==null?void 0:f.errorId}),S=zU({clampedValue:x,min:n,max:r,statusText:v,indeterminate:e,labelId:b,ariaDescribedBy:y}),A=l.useMemo(()=>jU({isHorizontal:_,thickness:s}),[_,s]),E=l.useMemo(()=>MU(i),[i]),T=l.useMemo(()=>FU({isHorizontal:_,percent:C}),[_,C]),L=f==null?void 0:f.setDisplay;return l.useLayoutEffect(()=>{L==null||L({clampedValue:x,statusText:v,min:n,max:r,indeterminate:e})},[x,e,r,n,L,v]),{size:o,thickness:s,color:i,indeterminate:e,isHorizontal:_,aria:S,trackCrossStyle:A,fillColorStyle:E,fillTargetStyle:T}}function $U({label:t,showValue:e,valueText:n,hint:r,error:o,trackProps:s}){const i=to(),a=t!=null||e||n!=null;return d.jsxs(d.Fragment,{children:[a?d.jsxs(Hf,{children:[t!=null?d.jsx($e,{classNames:{root:i.label},children:t}):null,n!=null?d.jsx(Yi,{children:n}):e?d.jsx(Yi,{}):null]}):null,d.jsx(Uf,{...s}),r!=null?d.jsx(zf,{children:r}):null,o!=null?d.jsx(Vf,{children:o}):null]})}function ov({className:t,classNames:e,...n}){const r=to();return d.jsx($e,{className:t,classNames:{...e,root:Hn(r.label,e==null?void 0:e.root)},...n})}ov.displayName="ProgressBarLabel";function Hf({children:t,className:e,...n}){const{orientation:r}=Ba(),o=to();return d.jsx("div",{className:DU({orientation:r,slotClass:o.header,className:e}),...n,children:t})}Hf.displayName="ProgressBar.Header";function Yi({children:t,className:e,...n}){const{display:r}=Ba(),o=to(),s=t??(r==null?void 0:r.statusText);return s==null?null:d.jsx(ee,{as:"span",variant:"base",className:kU({slotClass:o.value,className:e}),...n,children:s})}Yi.displayName="ProgressBar.Value";function zf({children:t,className:e,id:n,...r}){const o=Ba(),s=to();return d.jsx(Ye,{id:n??o.hintId,className:Hn(s.hint,e),...r,children:t})}zf.displayName="ProgressBar.Hint";function Vf({children:t,className:e,id:n,...r}){const o=Ba(),s=to();return d.jsx(Ze,{id:n??o.errorId,className:Hn(s.error,e),...r,children:t})}Vf.displayName="ProgressBar.Error";const Uf=l.forwardRef(function({value:e,indeterminate:n,min:r,max:o,size:s,thickness:i,color:a,formatValue:c,orientation:u,className:f,"aria-describedby":m,...p},b){const g=to(),{size:h,indeterminate:x,isHorizontal:C,aria:_,trackCrossStyle:v,fillColorStyle:y,fillTargetStyle:S}=UU({value:e,indeterminate:n,min:r,max:o,size:s,thickness:i,color:a,formatValue:c,orientation:u,"aria-describedby":m}),{fillRef:A,reduceMotion:E}=mU({indeterminate:x,fillTargetStyle:S,isHorizontal:C});return d.jsx("div",{ref:b,role:"progressbar","aria-valuenow":_["aria-valuenow"],"aria-valuemin":_["aria-valuemin"],"aria-valuemax":_["aria-valuemax"],"aria-valuetext":_["aria-valuetext"],"aria-busy":_["aria-busy"],"aria-labelledby":_["aria-labelledby"],"aria-describedby":_["aria-describedby"],"aria-label":_["aria-label"],className:OU({isHorizontal:C,size:h??"base",thickness:i,slotClass:g.track,className:f}),style:v,...p,children:x?d.jsx("span",{ref:A,"aria-hidden":!0,className:BU({isHorizontal:C,hasCustomColor:!!a,reduceMotion:E,slotClass:g.indeterminateFill}),style:y}):d.jsx("span",{ref:A,"aria-hidden":!0,className:PU({isHorizontal:C,hasCustomColor:!!a,slotClass:g.fill}),style:GU({isHorizontal:C,fillColorStyle:y})})})});Uf.displayName="ProgressBar.Track";function WU({children:t,id:e,orientation:n="horizontal",label:r,showValue:o,valueText:s,hint:i,error:a,value:c,indeterminate:u,min:f,max:m,size:p,thickness:b,color:g,formatValue:h}){const x=l.useId(),C=e??`progress-${x}`,_=Yt(C),v=Kt(C),y=rv(C),[S,A]=l.useState(null),E=l.useCallback(P=>{A(j=>fU(j,P)?j:P)},[]),T=qt(t),L=i!=null||T&&ye(t,"ProgressBar.Hint"),w=a!=null||T&&ye(t,"ProgressBar.Error"),R=l.useMemo(()=>({progressId:C,hintId:_,errorId:v,hintConnected:L,errorConnected:w,orientation:n,display:S,setDisplay:E}),[S,v,w,L,_,n,C,E]),N=l.useMemo(()=>({labelId:y}),[y]);return{progressId:C,isCompound:T,fieldCtx:R,fieldLabelCtx:N,trackProps:{value:c,indeterminate:u,min:f,max:m,size:p,thickness:b,color:g,formatValue:h,orientation:n},label:r,showValue:o,valueText:s,hint:i,error:a}}function sv({children:t,className:e,classNames:n,id:r,orientation:o,label:s,showValue:i,valueText:a,hint:c,error:u,value:f,indeterminate:m,min:p,max:b,size:g,thickness:h,color:x,formatValue:C,..._}){const v=WU({children:t,id:r,orientation:o,label:s,showValue:i,valueText:a,hint:c,error:u,value:f,indeterminate:m,min:p,max:b,size:g,thickness:h,color:x,formatValue:C}),y=v.isCompound?t:d.jsx($U,{label:v.label,showValue:v.showValue,valueText:v.valueText,hint:v.hint,error:v.error,trackProps:v.trackProps});return d.jsx(oU,{value:v.fieldCtx,children:d.jsx(sU,{classNames:n,children:d.jsx(Xt.Provider,{value:v.fieldLabelCtx,children:d.jsx(pn,{id:v.progressId,className:NU({orientation:v.fieldCtx.orientation,slotClass:n==null?void 0:n.root,className:e}),..._,children:y})})})})}sv.displayName="ProgressBar";const XU=Object.assign(sv,{Header:Hf,Label:ov,Value:Yi,Hint:zf,Error:Vf,Track:Uf});function kn(...t){return I(...t)}function YU(t,e){return t||e}function KU(t){return!!(t.onClick||t.onKeyDown||t.onPointerDown)}function qU({pressable:t,isGloss:e,animated:n,onPress:r,onClick:o,onKeyDown:s,onPointerDown:i,onPointerOver:a,onPointerOut:c,forwardedRef:u}){const f=l.useRef(null),m=l.useRef(!1),p=t&&e,b=l.useMemo(()=>Mt(f,e),[e]),g=l.useCallback(A=>{b(A),f.current=A,dt(u,A)},[b,u]),h=Do(f,p,{pointerInsideRef:m}),x=du(f,t&&!e,{pointerInsideRef:m});l.useEffect(()=>{if(t)return;const A=f.current;A&&z(A),m.current=!1},[t]);const C=l.useCallback(A=>{if(i==null||i(A),!t||!n||A.defaultPrevented||ue())return;const E=f.current;if(E){if(e){No(E,m.current);return}Xe(E,{pointerInside:m.current,shadow:x.shadow})}},[n,e,i,t,x.shadow]),_=l.useCallback(A=>{o==null||o(A),!(!t||A.defaultPrevented)&&(r==null||r(A))},[o,r,t]),v=l.useCallback(A=>{s==null||s(A)},[s]),y=l.useCallback(A=>{a==null||a(A),!(!t||A.defaultPrevented||!n)&&(e?h.onPointerOver(A):x.onPointerOver(A))},[n,h,e,a,t,x]),S=l.useCallback(A=>{c==null||c(A),!(!t||!n)&&(e?h.onPointerOut(A):x.onPointerOut(A))},[n,h,e,c,t,x]);return{setRootRef:g,pressableLiftMotionClass:x.motionClass,handlePointerDown:C,handleClick:_,handleKeyDown:v,onPointerOver:y,onPointerOut:S,onPointerDownProp:i,onClickProp:o,onKeyDownProp:s}}function ZU(){return"h3"}const bc=l.createContext({});function QU({classNames:t,children:e}){const n=l.useContext(bc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(bc.Provider,{value:r,children:e})}function no(){return l.useContext(bc)}const JU={default:"bg-surface border-token",outline:"bg-transparent border-token",secondary:"bg-secondary border-token"},e$="shadow-token-base",t$="gloss-panel flex min-w-0 flex-col rounded-mid text-foreground outline-none",n$="gloss-content flex min-w-0 flex-1 flex-col",r$="flex min-w-0 flex-col overflow-hidden rounded-mid text-foreground outline-none",o$="relative cursor-pointer focus-ring",ci="w-full border-0 p-0 text-left",s$="relative flex min-w-0 flex-1 flex-col",i$="flex shrink-0 flex-col gap-small py-plus px-mid text-left",a$="flex min-w-0 flex-1 flex-col gap-xsmall text-left",l$="min-w-0 px-mid pb-mid",c$="min-w-0",u$="min-w-0 text-muted",d$="mt-auto border-t-token py-plus px-mid text-muted";function f$(t){return I(t$,Ro,t)}function m$(t){return t?I(nn,"cursor-pointer focus-ring"):""}function p$(t,e,n,r){return I(r$,e&&I(o$,n),Ro,JU[t],!e&&e$,r)}function h$({className:t="",...e}){const n=no();return d.jsx("div",{className:kn(i$,n.header,t),...e})}function g$({className:t="",...e}){const n=no();return d.jsx("div",{className:kn(a$,n.headingBlock,t),...e})}function b$({className:t="",...e}){const n=no();return d.jsx("div",{className:kn(l$,n.body,t),...e})}const iv=l.forwardRef(function({className:e="",...n},r){const o=no();return d.jsx(ee,{ref:r,as:ZU(),variant:"base",className:kn(c$,o.title,e),...n})}),av=l.forwardRef(function({className:e="",...n},r){const o=no();return d.jsx(ee,{ref:r,as:"p",variant:"base",className:kn(u$,o.description,e),...n})});function x$({className:t="",...e}){const n=no();return d.jsx("div",{className:kn(d$,n.footer,t),...e})}function C$({pressable:t,isGloss:e,renderAsButton:n,glossPanelClass:r,rootClassName:o,setRootRef:s,rest:i,children:a,onPointerOver:c,onPointerOut:u,onPointerDown:f,onClick:m,onKeyDown:p}){const b=no();if(e){const g=d.jsx("div",{className:I(n$,b.glossContent),children:a});return t?d.jsx("button",{type:"button",...i,ref:s,className:I(ci,r,m$(t)),onPointerOver:c,onPointerOut:u,onPointerDown:f,onClick:m,onKeyDown:p,children:g}):n?d.jsx("button",{type:"button",...i,ref:s,className:I(ci,r),onPointerOver:c,onPointerOut:u,onPointerDown:f,onClick:m,onKeyDown:p,children:g}):d.jsx("div",{...i,ref:s,className:r,onPointerOver:c,onPointerOut:u,children:g})}return t?d.jsx("button",{type:"button",...i,ref:s,className:I(ci,o),onPointerOver:c,onPointerOut:u,onPointerDown:f,onClick:m,onKeyDown:p,children:d.jsx("div",{className:kn(s$,b.content),children:a})}):n?d.jsx("button",{type:"button",...i,ref:s,className:I(ci,o),onPointerOver:c,onPointerOut:u,onPointerDown:f,onClick:m,onKeyDown:p,children:a}):d.jsx("div",{...i,ref:s,className:o,onPointerOver:c,onPointerOut:u,children:a})}iv.displayName="CardTitle";av.displayName="CardDescription";function _$({variant:t="default",pressable:e=!1,onClick:n,onKeyDown:r,onPointerDown:o}){const s=t==="gloss",i=e&&s,a=YU(e,KU({onClick:n,onKeyDown:r,onPointerDown:o}));return{variant:t,pressable:e,isGloss:s,glossPressable:i,renderAsButton:a}}const lv=l.forwardRef(function({className:e="",variant:n="default",pressable:r=!1,animated:o=!0,classNames:s,onPress:i,onPointerOver:a,onPointerOut:c,onPointerDown:u,onClick:f,onKeyDown:m,children:p,...b},g){const h=_$({variant:n,pressable:r,onClick:f,onKeyDown:m,onPointerDown:u}),x=qU({pressable:r,isGloss:h.isGloss,animated:o,onPress:i,onClick:f,onKeyDown:m,onPointerDown:u,onPointerOver:a,onPointerOut:c,forwardedRef:g}),C=f$(kn(s==null?void 0:s.root,e)),_=h.isGloss?"":p$(h.variant,r,x.pressableLiftMotionClass,kn(s==null?void 0:s.root,e));return d.jsx(QU,{classNames:s,children:d.jsx(C$,{pressable:r,isGloss:h.isGloss,renderAsButton:h.renderAsButton,glossPanelClass:C,rootClassName:_,setRootRef:x.setRootRef,rest:b,onPointerOver:x.onPointerOver,onPointerOut:x.onPointerOut,onPointerDown:r?x.handlePointerDown:x.onPointerDownProp,onClick:r?x.handleClick:x.onClickProp,onKeyDown:r?x.handleKeyDown:x.onKeyDownProp,children:p})})});lv.displayName="Card";const S$=Object.assign(lv,{Header:h$,HeadingBlock:g$,Title:iv,Description:av,Body:b$,Footer:x$}),cv=l.createContext(null),uv=l.createContext("top"),xc=l.createContext(null),Cc=l.createContext({});function v$({classNames:t,children:e}){const n=l.useContext(Cc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Cc.Provider,{value:r,children:e})}function pr(){return l.useContext(Cc)}function $f(t){const e=l.useContext(cv);if(!e)throw new Error(`${t} must be used inside <Tooltip>.`);return e}function y$(){return l.useContext(uv)}function Wf(t){const e=l.useContext(xc);if(!e)throw new Error(`${t} must be inside <Tooltip.Panel> or <Tooltip.Content>.`);return e}function T$(t,e,n){return n?t?t.split(/\s+/).includes(e)?t:`${t} ${e}`:e:t}function Op(t,e){return{onPointerEnter:n=>{var r,o;(r=t.onPointerEnter)==null||r.call(t,n),(o=e==null?void 0:e.onPointerEnter)==null||o.call(e,n)},onPointerLeave:n=>{var r,o;(r=t.onPointerLeave)==null||r.call(t,n),(o=e==null?void 0:e.onPointerLeave)==null||o.call(e,n)},onFocus:n=>{var r,o;(r=t.onFocus)==null||r.call(t,n),(o=e==null?void 0:e.onFocus)==null||o.call(e,n)},onBlur:n=>{var r,o;(r=t.onBlur)==null||r.call(t,n),(o=e==null?void 0:e.onBlur)==null||o.call(e,n)}}}function Wt(...t){return I(...t)}const A$=new Set(["TooltipIndicator","TooltipIcon","TooltipTitle","TooltipDescription","TooltipMessage"]);function ja(t,e){let n=!1;const r=o=>{if(!n)for(const s of l.Children.toArray(o)){if(!l.isValidElement(s))continue;const i=s.type.displayName;if(e(i)){n=!0;return}r(s.props.children)}};return r(t),n}function E$(t){return ja(t,e=>e!=null&&A$.has(e))}function L$(t){return ja(t,e=>e==="TooltipTitle")}function w$(t){return ja(t,e=>e==="TooltipDescription")}function R$(t){return ja(t,e=>e==="TooltipIndicator"||e==="TooltipIcon")}function dv(t,e){for(const n of l.Children.toArray(t)){if(!l.isValidElement(n))continue;const r=n.type.displayName;(r==="TooltipIndicator"||r==="TooltipIcon")&&e(n.props),dv(n.props.children,e)}}function I$(t,e,n,r){return n===!1||r===null?!1:r!==void 0||e!=null?!0:Xf(t)}function N$(t,e,n,r){if(!R$(t))return!1;let o=!1;return dv(t,s=>{I$(e,n,s.showIcon??r,s.children)&&(o=!0)}),o}function Xf(t){return t==="danger"||t==="success"||t==="info"||t==="warning"}function D$(t,e,n,r,o){return n===!1?!1:r?N$(o,t,e,n):e!=null?!0:Xf(t)}function k$({variant:t,icon:e,showIcon:n,title:r,description:o,isCompound:s,children:i}){const a=r!=null||(s?L$(i):i!=null&&o==null),c=o!=null||s&&w$(i);return{hasIndicator:D$(t,e,n,s,i),hasTitle:a,hasDescription:c,hasAction:!1,hasClose:!1}}function O$(...t){return e=>{for(const n of t)typeof n=="function"?n(e):n&&(n.current=e)}}function Pp(t){return t.type.displayName==="TooltipArrow"}function P$({open:t,portalMounted:e,setPortalMounted:n,tipRef:r}){l.useLayoutEffect(()=>{if(!e)return;const o=r.current;if(!o)return;const s=$t();let i=!1;if(s)return z(o),t?ha(o):n(!1),()=>{i=!0};if(z(o),t)return ga({surface:o,vars:{...Co(),overwrite:"auto"}}),()=>{i=!0,z(o)};const a=ba({surface:o,vars:{...Co(),overwrite:"auto"},onComplete:()=>{i||n(!1)}});return()=>{i=!0,z(o),a.kill()}},[t,e,n,r])}const B$=8,fv={default:"border-token bg-surface",outline:"bg-transparent border-token",secondary:"bg-secondary border-token",danger:"bg-surface-tint-danger border-token",success:"bg-surface-tint-success border-token",info:"bg-surface-tint-info border-token",warning:"bg-surface-tint-warning border-token"},mv={small:"max-w-[12rem] p-small",base:"max-w-[16rem] p-base",mid:"max-w-xs p-plus",large:"max-w-sm p-mid"},j$={small:"tools",base:"small",mid:"base",large:"mid"},M$={small:"tools",base:"tools",mid:"small",large:"base"},F$={small:"icon-small",base:"icon-base",mid:"icon-mid",large:"icon-large"},G$={small:"[&_svg]:icon-small",base:"[&_svg]:icon-base",mid:"[&_svg]:icon-mid",large:"[&_svg]:icon-large"},pv={default:"text-foreground",outline:"text-foreground",secondary:"text-secondary-foreground",danger:"text-danger",success:"text-success",info:"text-info",warning:"text-warning"},hv={small:"gap-x-xsmall gap-y-0",base:"gap-x-small gap-y-xsmall",mid:"gap-x-base gap-y-xsmall",large:"gap-x-plus gap-y-small"},H$="inline-flex shrink-0",z$="inline-flex shrink-0 [&_svg]:shrink-0",V$="text-muted",U$="pointer-events-none absolute z-0 size-2 rotate-45",$$="border-0 bg-[var(--color-surface)]",W$="pointer-events-none z-[10000] w-max min-w-0 overflow-visible text-left outline-none will-change-transform",X$="relative overflow-visible",Y$="gloss-panel gloss-deep relative z-[1] w-max min-w-0 origin-center overflow-hidden rounded-mid text-left text-foreground",K$="gloss-content",q$="contents",Z$="relative z-[1] w-max min-w-0 rounded-mid text-left animate-shadow";function Q$({size:t,slotClass:e,className:n}){return Wt(Y$,nn,mv[t],e,n)}function J$({gridSlots:t,size:e,slotClass:n}){return Wt(Ho(t,hv[e]),K$,n)}function eW({variant:t,surface:e,size:n,gridSlots:r,slotClass:o,className:s}){return e==="gloss"?Q$({size:n,slotClass:o,className:s}):Wt(Ho(r,hv[n]),Z$,fv[t],mv[n],o,s)}function tW({variant:t,surface:e,resolvedSide:n,slotClass:r,className:o}){return Wt(U$,e==="gloss"?$$:fv[t],Ib[n],r,o)}function nW({resolvedSide:t,showArrow:e,slotClass:n,className:r}){return Wt(W$,e&&Nb[t],n,r)}function rW({variant:t,size:e,showIcon:n,icon:r,children:o}){if(o===null)return null;if(o!==void 0)return o;if(n===!1)return null;if(r!=null)return r;if(!Xf(t))return null;const s=Ad[t];return d.jsx(s,{"aria-hidden":!0,className:Wt("shrink-0",F$[e],pv[t])})}function oW(t,e,n,r){return e!=null||n!=null?d.jsxs(d.Fragment,{children:[r.hasIndicator?d.jsx(mo,{}):null,e!=null?d.jsx(Ki,{children:e}):null,n!=null?d.jsx(Yf,{children:n}):null]}):t==null?null:typeof t=="string"||typeof t=="number"?d.jsxs(d.Fragment,{children:[r.hasIndicator?d.jsx(mo,{}):null,d.jsx(Ki,{children:t})]}):l.isValidElement(t)?d.jsxs(d.Fragment,{children:[r.hasIndicator?d.jsx(mo,{}):null,d.jsx("div",{className:zo(r),children:t})]}):t}function mo({className:t,children:e,showIcon:n,...r}){const o=pr(),{variant:s,size:i,icon:a,showIcon:c,gridSlots:u}=Wf("Tooltip.Indicator"),f=rW({variant:s,size:i,showIcon:n??c,icon:a,children:e});return f==null?null:d.jsx("span",{className:Wt(z$,G$[i],pv[s],Ir(u),o.indicator,o.icon,t),...r,children:f})}mo.displayName="TooltipIndicator";function gv(t){return d.jsx(mo,{...t})}gv.displayName="TooltipIcon";function bv({className:t,...e}){const n=pr();return d.jsx("div",{className:Wt(q$,n.message,t),...e})}bv.displayName="TooltipMessage";function Ki({className:t,...e}){const n=pr(),{size:r,gridSlots:o}=Wf("Tooltip.Title");return d.jsx(ee,{as:"div",variant:j$[r],className:Wt(zo(o),n.title,t),...e})}Ki.displayName="TooltipTitle";function Yf({className:t,...e}){const n=pr(),{size:r,gridSlots:o}=Wf("Tooltip.Description");return d.jsx(ee,{as:"div",variant:M$[r],className:Wt(V$,ks(o),n.description,t),...e})}Yf.displayName="TooltipDescription";function Kf({variant:t="default",surface:e="default",size:n="base",icon:r,showIcon:o,title:s,description:i,className:a,children:c,glossPanelRef:u,...f}){const m=pr(),p=e==="gloss",b=c!=null&&E$(c),g=l.useMemo(()=>k$({variant:t,icon:r,showIcon:o,title:s,description:i,isCompound:b,children:c}),[c,i,r,b,o,s,t]),h=l.useMemo(()=>({variant:t,size:n,icon:r,showIcon:o,gridSlots:g}),[g,r,o,n,t]),x=b?c:oW(c,s,i,g),C=eW({variant:t,surface:e,size:n,gridSlots:g,slotClass:m.panel,className:a});return p?d.jsx(xc.Provider,{value:h,children:d.jsx("div",{ref:u,className:C,...f,children:d.jsx("div",{className:J$({gridSlots:g,size:n,slotClass:m.glossContent}),children:x})})}):d.jsx(xc.Provider,{value:h,children:d.jsx("div",{className:C,...f,children:x})})}Kf.displayName="TooltipPanel";const xv=l.forwardRef(function({asChild:e=!0,className:n,children:r,onPointerEnter:o,onPointerLeave:s,onFocus:i,onBlur:a,...c},u){const f=pr(),{scheduleShow:m,hide:p,tooltipId:b,open:g,triggerRef:h}=$f("Tooltip.Trigger"),x=l.useMemo(()=>({onPointerEnter:()=>m(),onPointerLeave:()=>p(),onFocus:()=>m(),onBlur:()=>p()}),[p,m]),C=l.useCallback(v=>{h.current=v,typeof u=="function"?u(v):u&&(u.current=v)},[u,h]),_=l.Children.count(r)===1&&l.isValidElement(r)?r:null;if(e&&_){const v=_;return l.cloneElement(v,{...Op(x,{onPointerEnter:o,onPointerLeave:s,onFocus:i,onBlur:a}),className:Wt(f.root,f.trigger,v.props.className,n),"aria-describedby":T$(v.props["aria-describedby"],b,g),ref:O$(v.props.ref,C)})}return d.jsx("span",{ref:C,className:Wt(H$,f.root,f.trigger,n),"aria-describedby":g?b:void 0,tabIndex:c.tabIndex??0,...Op(x,{onPointerEnter:o,onPointerLeave:s,onFocus:i,onBlur:a}),...c,children:r})});xv.displayName="TooltipTrigger";function qf({className:t,...e}){const n=pr(),r=y$(),{variant:o,surface:s}=$f("Tooltip.Arrow");return d.jsx("span",{"aria-hidden":!0,className:tW({variant:o,surface:s,resolvedSide:r,slotClass:n.arrow,className:t}),...e})}qf.displayName="TooltipArrow";const Cv=l.forwardRef(function({className:e,children:n,showArrow:r=!1,offset:o=B$,...s},i){const a=pr(),{open:c,tooltipId:u,variant:f,surface:m,size:p,side:b,icon:g,showIcon:h,triggerRef:x}=$f("Tooltip.Content"),C=l.useRef(null),_=l.useRef(null),v=m==="gloss",y=l.useMemo(()=>Mt(_,v),[v]),[S,A]=l.useState(!1),[E,T]=l.useState(b),L=l.useCallback(k=>{C.current=k,dt(i,k)},[i]),w=l.Children.toArray(n),R=w.find(k=>l.isValidElement(k)&&Pp(k)),N=w.filter(k=>!(l.isValidElement(k)&&Pp(k))),D=l.useCallback(()=>{const k=x.current,O=C.current;if(!k||!O)return;const M=Rb(k.getBoundingClientRect(),O.getBoundingClientRect(),b,o);T(M.resolvedSide),O.style.position="fixed",O.style.left=`${M.left}px`,O.style.top=`${M.top}px`,O.style.transform=""},[o,b,x]);if(l.useLayoutEffect(()=>{c&&A(!0)},[c]),uu(C,!v,bn),l.useLayoutEffect(()=>{if(!c)return;D();const k=window.requestAnimationFrame(()=>D()),O=()=>D();return window.addEventListener("scroll",O,!0),window.addEventListener("resize",O),()=>{window.cancelAnimationFrame(k),window.removeEventListener("scroll",O,!0),window.removeEventListener("resize",O)}},[c,D,n,r,o]),P$({open:c,portalMounted:S,setPortalMounted:A,tipRef:C}),!S||typeof document>"u")return null;const P=Mo(x.current),j=d.jsx(Kf,{variant:f,surface:m,size:p,icon:g,showIcon:h,glossPanelRef:y,children:N.length===1?N[0]:N}),G=d.jsx(uv.Provider,{value:E,children:d.jsx("div",{ref:L,...P,role:"tooltip",id:u,"data-side":E,className:nW({resolvedSide:E,showArrow:r,slotClass:a.content,className:e}),...s,children:d.jsxs("div",{className:X$,children:[r?R??d.jsx(qf,{}):null,j]})})});return kr.createPortal(G,document.body)});Cv.displayName="TooltipContent";function sW({size:t="base",variant:e="default",surface:n="default",delayShowMs:r=240,side:o="top",icon:s,showIcon:i}){const[a,c]=l.useState(!1),u=l.useRef(null),f=l.useRef(null),m=l.useId(),p=l.useCallback(()=>{f.current!=null&&(clearTimeout(f.current),f.current=null)},[]),b=l.useCallback(()=>{p(),f.current=globalThis.setTimeout(()=>{f.current=null,c(!0)},r)},[p,r]),g=l.useCallback(()=>{p(),c(!1)},[p]);return l.useEffect(()=>()=>p(),[p]),l.useEffect(()=>{if(!a)return;const x=C=>{C.key==="Escape"&&g()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[g,a]),{contextValue:l.useMemo(()=>({open:a,tooltipId:m,variant:e,surface:n,size:t,side:o,icon:s,showIcon:i,triggerRef:u,scheduleShow:b,hide:g}),[g,s,a,b,i,o,t,n,m,e])}}function _v({children:t,classNames:e,size:n="base",variant:r="default",surface:o="default",delayShowMs:s=240,side:i="top",icon:a,showIcon:c}){const{contextValue:u}=sW({size:n,variant:r,surface:o,delayShowMs:s,side:i,icon:a,showIcon:c});return d.jsx(v$,{classNames:e,children:d.jsx(cv.Provider,{value:u,children:t})})}_v.displayName="TooltipRoot";const Si=Object.assign(_v,{Trigger:xv,Content:Cv,Arrow:qf,Panel:Kf,Indicator:mo,Icon:gv,Message:bv,Title:Ki,Description:Yf}),Sv=l.createContext(null),_c=l.createContext({});function vv(t){const e=l.useContext(Sv);if(!e)throw new Error(`${t} must be used inside <Avatar>`);return e}function yv({classNames:t,children:e}){const n=l.useContext(_c),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(_c.Provider,{value:r,children:e})}function Xo(){return l.useContext(_c)}function iW(t){const e=t==null?void 0:t.trim();if(!e)return"?";const n=[...e][0];return n?n.toLocaleUpperCase():"?"}function aW(t){return t??"default"}function lW(t){return t??"base"}function cW(t){return(t==null?void 0:t.trim())||void 0}function uW(t){return!!(t!=null&&t.trim())}function dW(t){return t??"group"}function fW(t){return(t==null?void 0:t.trim())||void 0}function mW(){return"group"}const pW=!0,Bp=-10,jp=1.08;function hW(t,e){l.useLayoutEffect(()=>{const n=e.current;if(!n)return;const r=ue()||!Se().enableContentFade;if(z(n),r){X.set(n,{autoAlpha:t?1:0});return}X.to(n,{autoAlpha:t?1:0,...Sg(),overwrite:"auto"})},[e,t])}function gW(t){const e=ue(),n=l.useCallback(()=>{const o=t.current;if(o){if(z(o),e){o.style.transform="";return}X.to(o,{y:0,scale:1,...ve(),overwrite:"auto"})}},[e,t]),r=l.useCallback(()=>{const o=t.current;if(o){if(z(o),e){o.style.transform=`translateY(${Bp}px) scale(${jp})`;return}X.to(o,{y:Bp,scale:jp,...ve(),overwrite:"auto"})}},[e,t]);return l.useEffect(()=>{const o=t.current;return()=>{o&&z(o)}},[t]),{applyLift:r,applyRest:n}}const Sc={small:{root:"avatar-size-small"},base:{root:"avatar-size-base"},mid:{root:"avatar-size-mid"},large:{root:"avatar-size-large"}},bW={small:{variant:"small",className:"font-w-strong uppercase"},base:{variant:"base",className:"font-w-strong uppercase"},mid:{variant:"mid",className:"font-w-strong uppercase"},large:{variant:"header-2",className:"font-w-strong uppercase"}};function Tv(t,e,n){return I("relative inline-flex shrink-0 select-none overflow-hidden text-left",I(e?"gloss-panel size-full rounded-full border-token":"rounded-full bg-surface border-token",Sc[t].root),!e&&n)}function xW(t,e){return I("gloss-wrap inline-flex shrink-0 rounded-full",Sc[t].root,e)}const CW="gloss-shadow rounded-full";function _W(t,e){return I("absolute inset-0 z-[1] size-full object-cover",!t&&"pointer-events-none",e)}function SW(t,e){return I("absolute inset-0 z-0 flex items-center justify-center bg-primary-tint text-primary",t?"opacity-100":"pointer-events-none opacity-0",e)}function vW(t){return I("flex flex-row flex-nowrap items-center text-left",t)}function yW(t,e){return I("relative inline-flex will-change-transform",t>0&&"-ml-plus",e)}const TW="center bottom",Zf=l.forwardRef(function({className:e="",onLoad:n,onError:r,...o},s){const{imageStatus:i,onImageLoad:a,onImageError:c}=vv("Avatar.Image"),u=Xo(),f=l.useRef(null),m=l.useCallback(h=>{f.current=h,typeof s=="function"?s(h):s&&(s.current=h)},[s]),p=l.useCallback(h=>{n==null||n(h),h.defaultPrevented||a()},[n,a]),b=l.useCallback(h=>{r==null||r(h),h.defaultPrevented||c()},[r,c]),g=i==="loaded";return hW(g,f),d.jsx("img",{ref:m,className:_W(g,I(u.image,e)),alt:o.alt??"",onLoad:p,onError:b,...o})});Zf.displayName="AvatarImage";const Qf=l.forwardRef(function({className:e="",children:n,...r},o){const{label:s,imageStatus:i,size:a}=vv("Avatar.Fallback"),c=Xo(),u=i!=="loaded",m=n!=null&&n!==!1&&n!==""?n:iW(s),p=bW[a];return d.jsx("span",{ref:o,className:SW(u,I(c.fallback,e)),"aria-hidden":pW,...r,children:d.jsx(ee,{as:"span",variant:p.variant,inheritColor:!0,className:p.className,children:m})})});Qf.displayName="AvatarFallback";function AW({src:t,alt:e="",loading:n}){return d.jsxs(d.Fragment,{children:[t?d.jsx(Zf,{src:t,alt:e,loading:n}):null,d.jsx(Qf,{})]})}const Av=l.forwardRef(function({className:e="",classNames:n,children:r,...o},s){const i=Xo(),a=l.Children.toArray(r).filter(l.isValidElement);return d.jsx(yv,{classNames:n,children:d.jsx("div",{ref:s,role:mW(),className:vW(I(i.group,e)),...o,children:a.map((c,u)=>d.jsx(EW,{stackIndex:u,children:c},c.key??u))})})});Av.displayName="AvatarGroup";function EW({stackIndex:t,children:e}){const n=l.useRef(null),r=Xo(),{applyLift:o,applyRest:s}=gW(n);return d.jsx("div",{ref:n,style:{transformOrigin:TW},className:yW(t,r.groupItem),onPointerEnter:o,onPointerLeave:s,children:e})}const Ev=l.forwardRef(function({size:e,className:n,role:r,children:o,...s},i){const a=Xo();return d.jsx("div",{ref:i,role:r,className:Tv(e,!1,I(a.root,n)),...s,children:o})});Ev.displayName="AvatarDefaultShell";const Lv=l.forwardRef(function({size:e,className:n,role:r,children:o,...s},i){const a=Xo(),{"aria-label":c,...u}=s;return d.jsxs("div",{ref:i,className:xW(e,a.glossWrap),...u,children:[d.jsx("div",{className:CW,"aria-hidden":!0}),d.jsx("div",{role:r,className:Tv(e,!0,I(a.root,n)),"aria-label":c,children:o})]})});Lv.displayName="AvatarGlossShell";function LW({variant:t,size:e,label:n,nickname:r,tooltipSize:o="base",tooltipVariant:s="default",tooltipSide:i="top",children:a,role:c}){const u=aW(t),f=lW(e),[m,p]=l.useState("idle"),b=l.useCallback(()=>{p("loaded")},[]),g=l.useCallback(()=>{p("error")},[]),h=l.useMemo(()=>({size:f,label:n,imageStatus:m,onImageLoad:b,onImageError:g}),[f,n,m,b,g]),x=qt(a),C=uW(n),_=cW(r),v=u==="gloss",y=dW(c),S=fW(n);return{variant:u,size:f,ctx:h,isCompound:x,hasLabel:C,isGloss:v,rootRole:y,ariaLabel:S,tooltip:_?{size:o,variant:s,side:i,content:_}:null}}const wv=l.forwardRef(function({variant:e,size:n,label:r,src:o,alt:s="",loading:i,nickname:a,tooltipSize:c="base",tooltipVariant:u="default",tooltipSide:f="top",classNames:m,className:p="",children:b,role:g,...h},x){const{size:C,ctx:_,isCompound:v,isGloss:y,rootRole:S,ariaLabel:A,tooltip:E}=LW({variant:e,size:n,label:r,nickname:a,tooltipSize:c,tooltipVariant:u,tooltipSide:f,children:b,role:g}),L={size:C,className:p,role:S,"aria-label":A,children:v?b:d.jsx(AW,{src:o,alt:s,loading:i}),...h},w=y?d.jsx(Lv,{ref:x,...L}):d.jsx(Ev,{ref:x,...L}),R=E?d.jsxs(Si,{size:E.size,variant:E.variant,side:E.side,children:[d.jsx(Si.Trigger,{children:w}),d.jsx(Si.Content,{children:E.content})]}):w;return d.jsx(Sv.Provider,{value:_,children:d.jsx(yv,{classNames:m,children:R})})});wv.displayName="AvatarRoot";const wW=Object.assign(wv,{Image:Zf,Fallback:Qf}),Rv=l.createContext(!0),vc=l.createContext({});function RW({collapse:t,children:e}){return d.jsx(Rv.Provider,{value:t,children:e})}function Iv(){return l.useContext(Rv)}function Nv({classNames:t,children:e}){const n=l.useContext(vc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(vc.Provider,{value:r,children:e})}function Yo(){return l.useContext(vc)}const IW="Breadcrumbs";function NW(t){return t??IW}function DW(t){return`Show ${t} hidden sections`}const kW="Hidden sections",OW="Breadcrumbs.Item",PW="Breadcrumbs.List";function Dv(t){if(l.isValidElement(t))return t.type.displayName}function kv(t){return l.isValidElement(t)?t.props.children:null}function Ov(t,e){return l.Children.toArray(t).some(n=>l.isValidElement(n)?Dv(n)===e?!0:Ov(kv(n),e):!1)}function Pv(t,e){l.Children.forEach(t,n=>{if(l.isValidElement(n)){if(Dv(n)===OW){const r=n.props;e.push({label:r.children,href:r.href,onClick:r.onClick,current:r.current,className:r.className});return}Pv(kv(n),e)}})}function BW(t){return Ov(t,PW)}function jW(t){const e=[];return Pv(t,e),e}function MW(t){return t.length<=3?[]:t.slice(1,-2)}function FW(t){const e=t.length;return e===0?[]:e<=3?t.map((n,r)=>({kind:"segment",item:n,isLast:n.current??r===e-1})):[{kind:"segment",item:t[0],isLast:!1},{kind:"ellipsis",hiddenItems:MW(t)},{kind:"segment",item:t[e-2],isLast:!1},{kind:"segment",item:t[e-1],isLast:!0}]}function GW(t){return t.map((e,n)=>({kind:"segment",item:e,isLast:e.current??n===t.length-1}))}function HW(t,e){if(t.kind==="ellipsis")return"ellipsis";const n=t.item.label;return`segment-${e}-${typeof n=="string"?n:e}`}function er(t,e,n){return I(t,e,n)}function Bv(){const t=l.useRef(null),{handlePointerDown:e}=lr({isDisabled:!1,enabled:!0,textMotionRef:t});return{textRef:t,handlePointerDown:e}}const jv=I("inline-flex max-w-[min(12rem,46vw)] min-w-0 cursor-pointer truncate rounded-mid px-xsmall py-xsmall text-muted no-underline outline-none",gn,"hover:text-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"),zW=I(jv,"border-0 bg-transparent font-[inherit]"),VW=I("inline-flex min-w-0 cursor-pointer rounded-mid border-0 bg-transparent px-xsmall py-xsmall font-[inherit] text-muted outline-none",gn,"hover:text-foreground aria-expanded:text-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary");function UW(t){return I("m-0 flex list-none flex-wrap items-center gap-xsmall gap-y-xsmall p-0 text-left",t)}function $W(t){return I(t)}function WW(t){return I("flex items-center gap-xsmall",t)}function XW(t){return I("min-w-0 max-w-[min(14rem,50vw)] truncate px-xsmall py-xsmall font-w-mid text-foreground",t)}function YW(t){return I("max-w-[min(12rem,46vw)] truncate px-xsmall py-xsmall text-muted",t)}function Mv(t){return I("shrink-0 text-muted opacity-75 icon-small",t)}function KW(t){return I(jv,t)}function qW(t){return I(zW,t)}function ZW(t){return I("inline-flex min-w-0",t)}function Mp(t){return I("inline-flex origin-center min-w-0 truncate will-change-transform",t)}function QW(t){return I(VW,t)}function JW(t){return I("inline-flex origin-center will-change-transform",t)}function e5(t){return I("tabular-nums",t)}function t5(t){return I("text-small",t)}function n5(t){return I("p-small",t)}function r5(t){return I("inline-flex",t)}function Fv(t){const e=Iv();return l.useMemo(()=>e?FW(t):GW(t),[e,t])}function o5({children:t}={}){return{isCompound:BW(t)}}function s5(t){const e=Iv(),n=l.useMemo(()=>jW(t),[t]),r=Fv(n);return{collapse:e,items:n,pieces:r}}function i5(t){return{pieces:Fv(t)}}function Gv(t){return null}Gv.displayName="Breadcrumbs.Item";const Hv=l.forwardRef(function({className:e,classNames:n,children:r,...o},s){const{pieces:i}=s5(r);return d.jsx(Nv,{classNames:n,children:d.jsx(Jf,{ref:s,pieces:i,className:e,...o})})});Hv.displayName="Breadcrumbs.List";const Jf=l.forwardRef(function({pieces:e,className:n,...r},o){const s=Yo();return d.jsx("ol",{ref:o,className:UW(er("",s.list,n)),...r,children:e.map((i,a)=>d.jsx(a5,{piece:i,showSeparator:a>0},HW(i,a)))})});Jf.displayName="BreadcrumbsPiecesList";function a5({piece:t,showSeparator:e}){const n=Yo();return d.jsxs("li",{className:WW(n.listItem),children:[e?d.jsx(c5,{}):null,t.kind==="ellipsis"?d.jsx(u5,{hiddenItems:t.hiddenItems}):d.jsx(l5,{piece:t})]})}function zv({className:t,iconClassName:e,...n}){const r=Yo();return d.jsx("span",{className:r5(er("",r.separatorWrapper,t)),...n,children:d.jsx(Re.IoChevronForward,{className:Mv(er("",r.separator,e)),"aria-hidden":!0})})}zv.displayName="Breadcrumbs.Separator";function l5({piece:t}){const e=Yo(),{item:n,isLast:r}=t;return r?d.jsx(ee,{as:"span",variant:"small","aria-current":"page",className:XW(er("",e.current,n.className)),children:n.label}):n.href||n.onClick?d.jsx(Vv,{href:n.href,onClick:n.onClick,className:e.linkWrapper,innerClassName:er("",e.link,n.className),textClassName:e.linkText,children:n.label}):d.jsx(ee,{as:"span",variant:"small",className:YW(er("",e.static,n.className)),children:n.label})}function c5(){const t=Yo();return d.jsx(Re.IoChevronForward,{className:Mv(t.separator),"aria-hidden":!0})}const Vv=l.forwardRef(function({href:e,onClick:n,children:r,className:o="",innerClassName:s,textClassName:i,"aria-current":a},c){const{textRef:u,handlePointerDown:f}=Bv(),m=l.useCallback(b=>{u.current=b,dt(c,b)},[c,u]),p=e?KW(s):qW(s);return d.jsx("span",{className:ZW(o),children:e?d.jsx("a",{href:e,onClick:n,"aria-current":a,className:p,onPointerDown:f,children:d.jsx(ee,{ref:m,variant:"small",inheritColor:!0,as:"span",className:Mp(i),children:r})}):d.jsx("button",{type:"button",onClick:n,"aria-current":a,className:p,onPointerDown:f,children:d.jsx(ee,{ref:m,variant:"small",inheritColor:!0,as:"span",className:Mp(i),children:r})})})});Vv.displayName="BreadcrumbsInteractiveCrumb";function u5({hiddenItems:t}){const e=Yo(),n=t.length,{textRef:r,handlePointerDown:o}=Bv();return n===0?null:d.jsxs(Rr,{children:[d.jsx(Rr.Trigger,{"aria-label":DW(n),className:QW(e.ellipsisTrigger),onPointerDown:o,children:d.jsx("span",{ref:r,className:JW(e.ellipsisLiftWrapper),children:d.jsx(ee,{as:"span",variant:"small",className:e5(e.ellipsisText),children:"…"})})}),d.jsx(Rr.Popover,{"aria-label":kW,bodyClassName:n5(e.ellipsisPopover),children:t.map(s=>{const i=s.href??`hidden-${String(s.label)}`;return d.jsx(d5,{item:s,className:t5(er("",e.dropdownItem,s.className))},i)})})]})}function d5({item:t,className:e}){const n=t.href??`hidden-${String(t.label)}`;return t.href?d.jsx(Rr.Item,{href:t.href,selection:!1,onClick:t.onClick,className:e,children:t.label}):d.jsx(Rr.Item,{value:n,selection:!1,onClick:t.onClick,className:e,children:t.label})}function f5({items:t,className:e,...n}){const{pieces:r}=i5(t);return d.jsx(Jf,{pieces:r,className:e,...n})}const Uv=l.forwardRef(function({collapse:e=!0,className:n,classNames:r,items:o,children:s,"aria-label":i,...a},c){const{isCompound:u}=o5({children:s});return d.jsx(RW,{collapse:e,children:d.jsx(Nv,{classNames:r,children:d.jsx("nav",{ref:c,"aria-label":NW(i),className:$W(er("",r==null?void 0:r.root,n)),...a,children:u?s:o!=null?d.jsx(f5,{items:o}):s})})})});Uv.displayName="Breadcrumbs";const m5=Object.assign(Uv,{List:Hv,Item:Gv,Separator:zv}),em=l.createContext(null),yc=l.createContext({});function p5({value:t,children:e}){return d.jsx(em.Provider,{value:t,children:e})}function h5({classNames:t,children:e}){const n=l.useContext(yc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(yc.Provider,{value:r,children:e})}function g5(){const t=l.useContext(em);if(!t)throw new Error("Pagination components must be inside <Pagination>.");return t}function tm(){return l.useContext(em)}function an(){return l.useContext(yc)}const b5="Pagination",x5=!0,$v=!0,C5="Back",_5="Forward";function S5({ariaLabel:t,children:e,pageNumber:n}){if(t!=null)return t;if(e!=null)return`Page ${n}`}function Zt(...t){return I(...t)}function v5(t,e,n){if(e<=0)return[];if(e===1)return[1];if(e<=7)return Array.from({length:e},(i,a)=>a+1);const r=Math.max(t-n,2),o=Math.min(t+n,e-1),s=[1];if(r>2)s.push("ellipsis");else for(let i=2;i<r;i++)s.push(i);for(let i=r;i<=o;i++)s.push(i);if(o<e-1)s.push("ellipsis");else for(let i=o+1;i<e;i++)s.push(i);return s.push(e),s}function y5({disabled:t,page:e}){return t??(e!=null?e<=1:!1)}function T5({disabled:t,page:e,totalPages:n}){return t??(e!=null&&n!=null?e>=n:!1)}function A5(t){const e=l.useRef(null);e.current||(e.current=new Map);const n=l.useRef(!0);l.useLayoutEffect(()=>{const r=t.current;if(!r)return;const o=Array.from(r.children).filter(f=>f instanceof HTMLElement);let s=0;const i=f=>f.dataset.flipKey??`__keyless_${s++}`,a=ue(),c=new Map,u=e.current;for(const f of o){const m=i(f),p=f.getBoundingClientRect(),b={x:p.left,y:p.top};if(c.set(m,b),a||n.current)continue;const g=u.get(m);if(g){const h=g.x-b.x;Math.abs(h)>.5&&(z(f),f.style.willChange="transform",X.fromTo(f,{x:h},{x:0,...ve(),overwrite:"auto",onComplete:()=>{f.style.willChange=""}}))}else z(f),X.fromTo(f,{autoAlpha:0,scale:.82},{autoAlpha:1,scale:1,...ve(),overwrite:"auto"})}e.current=c,n.current=!1}),l.useLayoutEffect(()=>{const r=t.current;return()=>{if(r)for(const o of Array.from(r.children))o instanceof HTMLElement&&z(o)}},[t])}function E5(t){const e=l.useRef(null),n=l.useCallback(r=>{e.current=r,dt(t,r)},[t]);return A5(e),{olRef:e,setRefs:n}}const L5="flex w-full min-w-0 flex-wrap items-center justify-between gap-xsmall gap-y-xsmall text-left",w5="flex min-w-0 flex-1 basis-[12rem]",R5="min-w-0 truncate text-muted",I5="m-0 ms-auto flex max-w-full min-w-0 list-none flex-wrap items-center justify-start gap-xsmall p-0",N5="flex shrink-0 items-center",D5="inline-flex min-w-0 origin-center cursor-pointer items-center justify-center gap-xsmall rounded-mid border-0 bg-transparent px-xsmall py-xsmall font-[inherit] text-muted no-underline outline-none hover:text-foreground focus-ring disabled:cursor-not-allowed disabled:opacity-48 disabled:hover:text-muted disabled:hover:bg-transparent motion-reduce:animate-none",k5="inline-flex min-w-[1.75rem] items-center justify-center px-xsmall py-xsmall font-w-mid text-foreground tabular-nums text-base",O5="min-w-[1.75rem] tabular-nums",P5="inline-flex min-w-[1.75rem] items-center justify-center px-xsmall py-xsmall text-muted tabular-nums",B5="",j5="shrink-0 icon-small opacity-75",M5="shrink-0 icon-small opacity-75";function F5({slotClass:t,className:e}){return Zt(L5,t,e)}function G5({slotClass:t,className:e}){return Zt(w5,t,e)}function H5({slotClass:t,className:e}){return Zt(R5,t,e)}function z5({slotClass:t,className:e}){return Zt(I5,t,e)}function V5({slotClass:t,className:e}){return Zt(N5,t,e)}function U5({slotClass:t,className:e}){return Zt(D5,et(),t,e)}function $5({slotClass:t,className:e}){return Zt(k5,t,e)}function W5({slotClass:t,className:e}){return Zt(O5,t,e)}function X5({slotClass:t,className:e}){return Zt(P5,t,e)}function Wv({slotClass:t,className:e}){return Zt(B5,t,e)}function Y5({slotClass:t,className:e}){return Zt(j5,t,e)}function K5({slotClass:t,className:e}){return Zt(M5,t,e)}const Xv=l.forwardRef(function({children:e,className:n,page:r,totalPages:o,onPageChange:s,siblingCount:i,"aria-label":a,...c},u){const f=an();return d.jsx("nav",{ref:u,"aria-label":a,className:F5({slotClass:f.root,className:n}),...c,children:e})});Xv.displayName="Pagination";const Ma=l.forwardRef(function({children:e,className:n,disabled:r,onPointerDown:o,...s},i){const a=an(),c=l.useRef(null),u=l.useCallback(m=>{c.current=m,dt(i,m)},[i]),{handlePointerDown:f}=lr({isDisabled:!!r,enabled:!r,textMotionRef:c,onPointerDown:o});return d.jsx("button",{ref:u,type:"button",disabled:r,className:U5({slotClass:a.interactive,className:n}),onPointerDown:f,...s,children:e})});Ma.displayName="PaginationInteractive";const Yv=l.forwardRef(function({className:e,children:n,...r},o){const s=an();return d.jsx("div",{ref:o,className:G5({slotClass:s.summary,className:e}),...r,children:d.jsx(ee,{as:"span",variant:"small",className:H5({slotClass:s.summaryText}),children:n})})});Yv.displayName="Pagination.Summary";const Kv=l.forwardRef(function({className:e,children:n,...r},o){const s=an(),{setRefs:i}=E5(o);return d.jsx("ol",{ref:i,className:z5({slotClass:s.content,className:e}),...r,children:n})});Kv.displayName="Pagination.Content";const qi=l.forwardRef(function({className:e,children:n,...r},o){const s=an();return d.jsx("li",{ref:o,className:V5({slotClass:s.item,className:e}),...r,children:n})});qi.displayName="Pagination.Item";const qv=l.forwardRef(function({disabled:e,onClick:n,children:r,"aria-label":o,...s},i){const a=tm(),c=an(),u=a==null?void 0:a.page,f=y5({disabled:e,page:u}),m=l.useCallback(p=>{n==null||n(p),!(p.defaultPrevented||f)&&a!=null&&a.onPageChange&&u!=null&&u>1&&a.onPageChange(u-1)},[a,n,u,f]);return d.jsx(Ma,{ref:i,disabled:f,...o!=null?{"aria-label":o}:{},onClick:m,...s,children:r??d.jsxs(d.Fragment,{children:[d.jsx(nm,{}),d.jsx(ee,{variant:"small",inheritColor:!0,as:"span",className:Wv({slotClass:c.navText}),children:C5})]})})});qv.displayName="Pagination.Previous";const Zv=l.forwardRef(function({disabled:e,onClick:n,children:r,"aria-label":o,...s},i){const a=tm(),c=an(),u=a==null?void 0:a.page,f=a==null?void 0:a.totalPages,m=T5({disabled:e,page:u,totalPages:f}),p=l.useCallback(b=>{n==null||n(b),!(b.defaultPrevented||m)&&a!=null&&a.onPageChange&&u!=null&&f!=null&&u<f&&a.onPageChange(u+1)},[a,n,u,m,f]);return d.jsx(Ma,{ref:i,disabled:m,...o!=null?{"aria-label":o}:{},onClick:p,...s,children:r??d.jsxs(d.Fragment,{children:[d.jsx(ee,{variant:"small",inheritColor:!0,as:"span",className:Wv({slotClass:c.navText}),children:_5}),d.jsx(rm,{})]})})});Zv.displayName="Pagination.Next";function nm({className:t}){const e=an();return d.jsx(Re.IoChevronBack,{"aria-hidden":$v,className:Y5({slotClass:e.previousIcon,className:t})})}nm.displayName="Pagination.PreviousIcon";function rm({className:t}){const e=an();return d.jsx(Re.IoChevronForward,{"aria-hidden":$v,className:K5({slotClass:e.nextIcon,className:t})})}rm.displayName="Pagination.NextIcon";const om=l.forwardRef(function({page:e,isActive:n,children:r,onClick:o,className:s,"aria-label":i,...a},c){const u=tm(),f=an(),m=n??((u==null?void 0:u.page)!=null?u.page===e:!1),p=l.useCallback(h=>{var x;o==null||o(h),!(h.defaultPrevented||m)&&((x=u==null?void 0:u.onPageChange)==null||x.call(u,e))},[m,u,o,e]),b=r??e;if(m)return d.jsx(ee,{ref:c,as:"span",variant:"small","aria-current":"page",className:$5({slotClass:f.pageActive,className:s}),onClick:o,...i!=null?{"aria-label":i}:{},...a,children:b});const g=S5({ariaLabel:i,children:r,pageNumber:e});return d.jsx(Ma,{ref:c,...g!=null?{"aria-label":g}:{},onClick:p,className:s,...a,children:d.jsx(ee,{variant:"small",inheritColor:!0,as:"span",className:W5({slotClass:f.pageText}),children:b})})});om.displayName="Pagination.Page";const sm=l.forwardRef(function({className:e,...n},r){const o=an();return d.jsx(ee,{ref:r,as:"span",variant:"small","aria-hidden":x5,className:X5({slotClass:o.ellipsis,className:e}),...n,children:"…"})});sm.displayName="Pagination.Ellipsis";function Qv(){const{page:t,totalPages:e,siblingCount:n}=g5();if(t==null||e==null)throw new Error("Pagination.Pages requires `page` and `totalPages` on the root <Pagination>.");const r=l.useMemo(()=>v5(t,e,n),[t,n,e]);let o=0;return d.jsx(d.Fragment,{children:r.map(s=>{if(s==="ellipsis"){const i=o===0?"left":"right";o+=1;const a=`ellipsis-${i}`;return d.jsx(qi,{"data-flip-key":a,children:d.jsx(sm,{})},a)}return d.jsx(qi,{"data-flip-key":`page-${s}`,children:d.jsx(om,{page:s})},s)})})}Qv.displayName="Pagination.Pages";function q5({page:t,totalPages:e,onPageChange:n,siblingCount:r=1,"aria-label":o=b5}){return{contextValue:l.useMemo(()=>({page:t,totalPages:e,onPageChange:n,siblingCount:r}),[n,t,r,e]),ariaLabel:o}}const Jv=l.forwardRef(function({children:e,className:n,classNames:r,page:o,totalPages:s,onPageChange:i,siblingCount:a,"aria-label":c,...u},f){const{contextValue:m,ariaLabel:p}=q5({page:o,totalPages:s,onPageChange:i,siblingCount:a,"aria-label":c});return d.jsx(p5,{value:m,children:d.jsx(h5,{classNames:r,children:d.jsx(Xv,{ref:f,className:n,page:o,totalPages:s,onPageChange:i,siblingCount:a,"aria-label":p,...u,children:e})})})});Jv.displayName="Pagination";const Z5=Object.assign(Jv,{Summary:Yv,Content:Kv,Item:qi,Previous:qv,Next:Zv,PreviousIcon:nm,NextIcon:rm,Page:om,Pages:Qv,Ellipsis:sm}),Q5={default:"bg-surface",secondary:"bg-secondary",tertiary:"bg-tertiary"},Fp={none:"",base:"shadow-token-base",mid:"shadow-token-mid",large:"shadow-token-large"},Gp={none:"",small:"p-small",base:"p-base",plus:"p-plus",mid:"p-mid"},Hp={base:"rounded-base",mid:"rounded-mid",large:"rounded-large"},ey=l.forwardRef(function({className:e="",variant:n="default",shadow:r="none",padding:o="none",radius:s="mid",children:i,...a},c){const u=Io(c,n==="gloss");return n==="gloss"?d.jsx("div",{ref:u,className:I("gloss-panel min-w-0 text-left text-foreground",Hp[s],Fp[r],Gp[o],e),...a,children:d.jsx("div",{className:"gloss-content",children:i})}):d.jsx("div",{ref:c,className:I("min-w-0 text-left text-foreground",Q5[n],Hp[s],Fp[r],Gp[o],e),...a,children:i})});ey.displayName="Surface";const ty=l.createContext(null);function J5(){return l.useContext(ty)}function eX({value:t,children:e}){return d.jsx(ty.Provider,{value:t,children:e})}const ny=l.createContext(!1);function tX(){return l.useContext(ny)}function nX({children:t}){return d.jsx(ny.Provider,{value:!0,children:t})}const Tc=l.createContext({});function ry({classNames:t,children:e}){const n=l.useContext(Tc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Tc.Provider,{value:r,children:e})}function Fa(){return l.useContext(Tc)}function rX({variant:t,hoverLift:e=!0,forwardedRef:n,isDirectAnchorChild:r,placement:o,onPointerOver:s,onPointerOut:i,syncDeps:a}){const c=J5(),u=l.useRef(null),f=l.useRef(null),m=t==="gloss",p=!!(r&&(c!=null&&c.hoverLift)&&!m),b=e&&!p,g=l.useMemo(()=>Mt(u,b&&m),[m,b]),h=Do(u,b&&m),x=Oo(u,b&&!m),C=l.useMemo(()=>({onPointerOver:R=>{s==null||s(R),!R.defaultPrevented&&b&&(m?h.onPointerOver(R):x.onPointerEnter(R))},onPointerOut:R=>{i==null||i(R),b&&(m?h.onPointerOut(R):x.onPointerLeave(R))}}),[h.onPointerOut,h.onPointerOver,m,i,s,b,x.onPointerEnter,x.onPointerLeave]),_=b?m?nn:x.motionClass:"",v=p&&!m?ir:"",y=l.useCallback(()=>{if(!c||!r||!c.hoverLift){c==null||c.registerLiftTarget(null);return}c.registerLiftTarget(f.current)},[r,c]),S=l.useCallback(R=>{g(R),u.current=R,R===null&&(c==null||c.registerLiftTarget(null)),dt(n,R)},[g,n,c]),{meaningChild:A,icon:E,dot:T,iconOnly:L,children:w}=a;return l.useLayoutEffect(()=>{y(),queueMicrotask(()=>{y()})},[r,c==null?void 0:c.anchorCommitGen,c==null?void 0:c.hoverLift,o,y,A,E,T,L,w]),{isGloss:m,splitLift:p,selfLiftEnabled:b,innerLiftRef:f,setMergedRef:S,pointerHandlers:C,selfLiftMotionCls:_,splitLiftMotionCls:v}}function oX(t,e){return du(t,e,{liftScale:Se().badgeAnchorHoverLiftScale})}function sX(t,e){t&&e&&vs(t,bn())}function iX(t){return typeof t["aria-label"]=="string"||typeof t["aria-labelledby"]=="string"}function aX(t){return iX(t)?{role:"img"}:{"aria-hidden":!0,role:"presentation"}}function Ac(t){const e=t.props;return e["aria-hidden"]===!0||e["aria-label"]?t:l.cloneElement(t,{"aria-hidden":!0})}function im(t){const e=t.props["data-icon"];return e==="inline-start"||e==="start"?"inline-start":e==="inline-end"||e==="end"?"inline-end":null}function lX(t){return l.isValidElement(t)&&im(t)!=null}const cX={default:"bg-surface border-token text-foreground",primary:"bg-primary border-token text-primary-foreground",outline:"bg-transparent border-token text-foreground",secondary:"bg-secondary border-token text-secondary-foreground"},uX={"top-right":"absolute right-0 top-0 z-10 translate-x-[38%] -translate-y-[38%]","top-left":"absolute left-0 top-0 z-10 -translate-x-[38%] -translate-y-[38%]","bottom-right":"absolute bottom-0 right-0 z-10 translate-x-[38%] translate-y-[38%]","bottom-left":"absolute bottom-0 left-0 z-10 -translate-x-[38%] translate-y-[38%]"},dX={small:"gap-xsmall px-small py-xsmall",base:"gap-xsmall px-base py-xsmall",mid:"gap-xsmall px-plus py-xsmall",large:"gap-small px-plus py-xsmall"},am={small:"min-h-3 min-w-3",base:"min-h-4 min-w-4",mid:"min-h-4 min-w-4",large:"min-h-5 min-w-5"},Ec={small:"tools",base:"small",mid:"base",large:"mid"},fX={small:"shrink-0 p-xsmall [&_svg]:icon-small",base:"shrink-0 p-small [&_svg]:icon-base",mid:"shrink-0 p-base [&_svg]:icon-base",large:"shrink-0 p-plus [&_svg]:icon-large"},mX={small:"icon-small shrink-0 p-0",base:"icon-small shrink-0 p-0",mid:"icon-base shrink-0 p-0",large:"icon-large shrink-0 p-0"},pX={small:"[&_svg]:icon-small",base:"[&_svg]:icon-small",mid:"[&_svg]:icon-base",large:"[&_svg]:icon-large"},hX="box-border isolate inline-flex max-w-full shrink-0 select-none items-center justify-center truncate rounded-full whitespace-nowrap motion-reduce:transition-none",gX="box-border isolate inline-flex items-center justify-center rounded-full whitespace-nowrap",bX="box-border isolate inline-flex shrink-0 rounded-full ring-2 ring-background motion-reduce:ring-1",ui={default:"bg-foreground",primary:"bg-primary",outline:"bg-transparent border-token",secondary:"bg-secondary",danger:"bg-danger",success:"bg-success",info:"bg-info",warning:"bg-warning"};function xX(t,e){return t==="gloss"?e!=="default"?ui[e]:ui.default:e!=="default"?ui[e]:ui[t]}function CX(t,e){if(t==="gloss")return I("gloss-panel border-0 text-foreground",e!=="default"?xt[e]:"");if(e==="default")return cX[t];switch(t){case"default":return I(Gc[e],xt[e]);case"primary":return xh[e];case"outline":return I("bg-transparent",Hc[e],xt[e]);case"secondary":return I("bg-secondary border-token",xt[e])}}function _X(t){return t!=="default"?xt[t]:""}function SX(t,e,n){return n?I("gloss-panel border-0",_X(e)):xX(t,e)}const vX="inline-flex shrink-0 [&_svg]:shrink-0";function oy(t){return I(vX,pX[t])}const yX="relative isolate inline-grid w-fit shrink-0 [&>*]:col-start-1 [&>*]:row-start-1",TX="pointer-events-none",AX="pointer-events-none";function EX(t,e,n,r,o=""){return I(bX,mX[t],am[t],SX(e,n,r),o)}function LX(t,e,n=""){return I(gX,e,fX[t],am[t],n)}function wX(t,e,n=""){return I(hX,e,dX[t],am[t],n)}function RX(t,e){return t&&!e?AX:""}function IX({node:t,size:e}){return t==null||t===!1?null:typeof t=="string"?t.trim()?d.jsx(ee,{as:"span",variant:Ec[e],inheritColor:!0,children:t}):null:typeof t=="number"?d.jsx(ee,{as:"span",variant:Ec[e],inheritColor:!0,children:t}):l.isValidElement(t)?im(t)?d.jsx("span",{className:oy(e),children:Ac(t)}):t:null}function NX(t){return l.Children.toArray(t).some(lX)}function DX(t){return typeof t=="string"?t.trim().length>0:typeof t=="number"?!0:l.isValidElement(t)?im(t)==null:!1}function kX(t){return l.Children.toArray(t).some(DX)}function sy(t){return t==null||t===!1?!1:typeof t=="string"?t.trim().length>0:typeof t=="number"?!0:Array.isArray(t)?t.some(sy):l.isValidElement(t)}function OX(t,e){return l.Children.map(l.Children.toArray(t),(n,r)=>d.jsx(l.Fragment,{children:d.jsx(IX,{node:n,size:e})},r))}function PX(t){return t.type.displayName==="BadgeRoot"}function BX({size:t,children:e,icon:n,iconOnly:r,iconPosition:o,inlineIconMode:s,meaningChild:i,dot:a}){if(a)return{layoutKind:"dot",bodyContent:null,iconOnlyBody:null,dataIcon:void 0};const c=s?null:n,u=!!c&&!i,f=s&&!i&&l.Children.toArray(e).length>0,m=!i&&(u||!!(r&&c)||f),p=c?d.jsx("span",{className:oy(t),children:l.isValidElement(c)?Ac(c):c}):null,b=i&&!s?d.jsx(ee,{as:"span",variant:Ec[t],inheritColor:!0,children:e}):null,g=s?OX(e,t):null,h=s?g:d.jsxs(d.Fragment,{children:[o==="start"&&p,b,o==="end"&&p]}),x=f?g:c?l.isValidElement(c)?Ac(c):c:e,_=!!(!s&&p&&b)?o:void 0;return m?{layoutKind:"iconOnly",bodyContent:h,iconOnlyBody:x,dataIcon:_}:{layoutKind:"text",bodyContent:h,iconOnlyBody:x,dataIcon:_}}function lm({setMergedRef:t,splitLift:e,placementClass:n,splitLiftMotionCls:r,selfLiftMotionCls:o,isDirectAnchorChild:s,isGloss:i,innerLiftRef:a,pointerHandlers:c,rest:u,className:f,dataIcon:m,children:p,withA11y:b=!1}){const g=b?aX(u):void 0;return e?d.jsx("span",{ref:t,"data-badge-root":!0,className:I(TX,n),...u,...g,children:d.jsx("span",{ref:a,"data-badge-lift-target":!0,"data-icon":m,className:I(r,f),children:p})}):d.jsx("span",{ref:t,"data-icon":m,"data-badge-root":!0,className:I(r,o,RX(s,i),n,f),...c,...u,...g,children:p})}function jX({size:t,variant:e,status:n,shell:r,className:o,rest:s}){const i=Fa(),a=EX(t,e,n,r.isGloss,I(i.root,i.dot,o));return d.jsx(lm,{...r,className:a,rest:s,withA11y:!0,children:null})}function MX({size:t,surfaceClass:e,shell:n,className:r,rest:o,iconOnlyBody:s}){const i=Fa(),a=LX(t,e,I(i.root,i.iconOnly,r));return d.jsx(lm,{...n,className:a,rest:o,withA11y:!0,children:s})}function FX({size:t,surfaceClass:e,shell:n,className:r,rest:o,bodyContent:s,dataIcon:i}){const a=Fa(),c=wX(t,e,I(a.root,a.text,r));return d.jsx(lm,{...n,className:c,rest:o,dataIcon:i,children:s})}const iy=l.forwardRef(function({className:e="",classNames:n,children:r,hoverLift:o=!0,onPointerOver:s,onPointerOut:i,...a},c){const u=l.useRef(null),f=l.useRef(null),[m]=l.useState(1),p=l.useCallback(C=>{u.current=C,typeof c=="function"?c(C):c&&(c.current=C)},[c]),b=l.useCallback(C=>{f.current=C,sX(C,o)},[o]),g=l.useMemo(()=>({registerLiftTarget:b,anchorRef:u,anchorCommitGen:m,hoverLift:o}),[b,m,o]),h=oX(f,o),x=Fa();return d.jsx(ry,{classNames:n,children:d.jsx(eX,{value:g,children:d.jsx("div",{ref:p,"data-badge-anchor":!0,className:I(yX,x.anchor,n==null?void 0:n.anchor,e),onPointerOver:C=>{s==null||s(C),C.defaultPrevented||h.onPointerOver(C)},onPointerOut:C=>{i==null||i(C),h.onPointerOut(C)},...a,children:l.Children.map(r,(C,_)=>l.isValidElement(C)&&PX(C)?d.jsx(nX,{children:C},C.key??`badge-anchor-child-${_}`):C)})})})});iy.displayName="BadgeAnchor";function GX({variant:t,status:e,size:n,children:r,icon:o,iconOnly:s,iconPosition:i,dot:a,placement:c}){const u=tX(),f=CX(t,e),m=NX(r),p=l.useMemo(()=>m?kX(r):sy(r),[r,m]),b=u?c??"top-right":void 0,g=b?uX[b]:"",h=l.useMemo(()=>BX({size:n,children:r,icon:o,iconOnly:s,iconPosition:i,inlineIconMode:m,meaningChild:p,dot:a}),[r,a,o,s,i,m,p,n]);return{size:n,surfaceClass:f,inlineIconMode:m,meaningChild:p,placementClass:g,isDirectAnchorChild:u,layoutKind:h.layoutKind,bodyContent:h.bodyContent,iconOnlyBody:h.iconOnlyBody,dataIcon:h.dataIcon}}const ay=l.forwardRef(function({variant:e="default",status:n="default",size:r="base",icon:o,iconPosition:s="start",iconOnly:i=!1,dot:a=!1,placement:c,classNames:u,className:f="",children:m,hoverLift:p=!0,onPointerOver:b,onPointerOut:g,...h},x){const C=a,{surfaceClass:_,meaningChild:v,placementClass:y,isDirectAnchorChild:S,layoutKind:A,bodyContent:E,iconOnlyBody:T,dataIcon:L}=GX({variant:e,status:n,size:r,children:m,icon:o,iconOnly:i,iconPosition:s,dot:C,placement:c}),w=rX({variant:e,hoverLift:p,forwardedRef:x,isDirectAnchorChild:S,placement:c,onPointerOver:b,onPointerOut:g,syncDeps:{meaningChild:v,icon:o,dot:C,iconOnly:i,children:m}}),R={setMergedRef:w.setMergedRef,splitLift:w.splitLift,placementClass:y,splitLiftMotionCls:w.splitLiftMotionCls,selfLiftMotionCls:w.selfLiftMotionCls,isDirectAnchorChild:S,isGloss:w.isGloss,innerLiftRef:w.innerLiftRef,pointerHandlers:w.pointerHandlers,rest:h},N=D=>d.jsx(ry,{classNames:u,children:D});return N(A==="dot"?d.jsx(jX,{size:r,variant:e,status:n,shell:R,className:f,rest:h}):A==="iconOnly"?d.jsx(MX,{size:r,surfaceClass:_,shell:R,className:f,rest:h,iconOnlyBody:T}):d.jsx(FX,{size:r,surfaceClass:_,shell:R,className:f,rest:h,bodyContent:E,dataIcon:L}))});ay.displayName="BadgeRoot";const HX=Object.assign(ay,{Anchor:iy});function ly(...t){return I(...t)}function zX(t){return t.type.displayName==="KbdRoot"}function VX(t){const e=[];for(const n of l.Children.toArray(t)){if(!l.isValidElement(n)){n!=null&&e.push(n);continue}if(zX(n)){e.push(n);continue}e.push(n)}return e}function UX({variant:t,hoverLift:e=!0,forwardedRef:n,onPointerOver:r,onPointerOut:o}){const s=l.useRef(null),i=t==="gloss",a=e,c=l.useMemo(()=>Mt(s,a&&i),[i,a]),u=Do(s,a&&i),f=Oo(s,a&&!i),m=l.useCallback(h=>{c(h),s.current=h,dt(n,h)},[c,n]),p=l.useMemo(()=>({onPointerOver:h=>{r==null||r(h),!(!a||h.defaultPrevented)&&(i?u.onPointerOver(h):f.onPointerEnter(h))},onPointerOut:h=>{o==null||o(h),a&&(i?u.onPointerOut(h):f.onPointerLeave(h))}}),[u.onPointerOut,u.onPointerOver,i,a,o,r,f.onPointerEnter,f.onPointerLeave]),b=a&&!i?f.motionClass:"";return{setMergedRef:m,motionClass:b,glossMotionClass:a&&i?nn:"",pointerHandlers:p}}const $X={default:"bg-surface border-token text-foreground",primary:"bg-primary border border-transparent text-primary-foreground",outline:"bg-transparent border-token text-foreground",secondary:"bg-secondary border-token text-secondary-foreground"},WX={small:"tools",base:"tools",mid:"small",large:"base"},XX={small:"min-h-4 px-xsmall py-0.5",base:"min-h-4 px-small py-xsmall",mid:"min-h-5 px-base py-xsmall",large:"min-h-5 px-base py-xsmall"},YX="box-border isolate inline-flex max-w-full shrink-0 select-none items-center justify-center whitespace-nowrap rounded-small font-mono motion-reduce:transition-none",KX="inline-flex items-center gap-xsmall",qX="select-none text-muted text-tools";function ZX(t){return t==="gloss"?"gloss-panel gloss-deep border-0 text-foreground":$X[t]}function QX({variant:t,size:e,motionClass:n,slotRoot:r,className:o}){return ly(YX,ZX(t),XX[e],n,r,o)}function JX(t,e){return I(KX,e,t)}function e3(t){return I(qX,t)}function cm({size:t,children:e}){return d.jsx(ee,{as:"span",variant:WX[t],inheritColor:!0,children:e})}cm.displayName="KbdText";function cy({size:t,children:e}){return e==null||e===!1?null:l.isValidElement(e)?e:d.jsx(cm,{size:t,children:e})}cy.displayName="KbdBody";const Lc=l.createContext({});function t3({classNames:t,children:e}){const n=l.useContext(Lc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Lc.Provider,{value:r,children:e})}function n3(){return l.useContext(Lc)}function r3({variant:t,size:e,className:n,classNames:r}){const o=l.useMemo(()=>QX({variant:t,size:e,slotRoot:r==null?void 0:r.root,className:n}),[n,r==null?void 0:r.root,e,t]);return{variant:t,size:e,rootClass:o}}const uy=l.forwardRef(function({variant:e="default",size:n="base",classNames:r,className:o="",children:s,hoverLift:i=!0,onPointerOver:a,onPointerOut:c,...u},f){const m=r3({variant:e,size:n,className:o,classNames:r}),p=UX({variant:m.variant,hoverLift:i,forwardedRef:f,onPointerOver:a,onPointerOut:c});return d.jsx(t3,{classNames:r,children:d.jsx("kbd",{ref:p.setMergedRef,className:ly(m.rootClass,p.motionClass,p.glossMotionClass),...p.pointerHandlers,...u,children:d.jsx(cy,{size:m.size,children:s})})})});uy.displayName="KbdRoot";const o3=!0;function dy({className:t,classNames:e,separator:n="+",children:r,...o}){const s=n3(),i=VX(r);return d.jsx("span",{className:JX(t,(e==null?void 0:e.group)??s.group),...o,children:i.map((a,c)=>d.jsxs(l.Fragment,{children:[c>0&&n!=null?d.jsx(ee,{as:"span",variant:"tools","aria-hidden":o3,className:e3((e==null?void 0:e.separator)??s.separator),children:n}):null,a]},c))})}dy.displayName="KbdGroup";const s3=Object.assign(uy,{Group:dy,Text:cm}),i3=new Set,zp="secondary";function it(...t){return I(...t)}function a3(t,e){return t==="all"?!0:t.has(e)}function l3({selectionMode:t,selectedKeys:e,key:n}){if(t==="none")return null;if(t==="single")return new Set([n]);if(e==="all")return new Set([n]);const r=new Set(e);return r.has(n)?r.delete(n):r.add(n),r}function c3(t,e){if(!(!t||(e==null?void 0:e.column)!==t))return e.direction}function u3(t,e){return{column:t,direction:(e==null?void 0:e.column)===t&&e.direction==="ascending"?"descending":"ascending"}}function d3(t,e){if(t)return e==="ascending"?"ascending":e==="descending"?"descending":"none"}function f3(t,e){return t!=="none"?e:void 0}const fy=l.createContext("default"),wc=l.createContext({}),my=l.createContext({selectionMode:"none",selectedKeys:new Set,onRowSelect:()=>{},isRowSelected:()=>!1,sortDescriptor:void 0,onSortChange:void 0}),py=l.createContext(null);function m3({variant:t,children:e}){return d.jsx(fy.Provider,{value:t,children:e})}function p3({classNames:t,children:e}){const n=l.useContext(wc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(wc.Provider,{value:r,children:e})}function h3({value:t,children:e}){return d.jsx(my.Provider,{value:t,children:e})}function g3({value:t,children:e}){return d.jsx(py.Provider,{value:t,children:e})}function Us(){return l.useContext(fy)}function zn(){return l.useContext(wc)}function hy(){return l.useContext(my)}function b3(){return l.useContext(py)}const x3="w-full",C3={default:"rounded-mid border-token bg-surface overflow-clip",secondary:"",toned:"overflow-visible bg-transparent",gloss:"gloss-panel gloss-deep rounded-mid overflow-clip border-0"},_3="gloss-content w-full min-w-0",S3="w-full overflow-x-auto",v3="w-full",y3={default:"border-collapse",secondary:"border-collapse",toned:"border-separate border-spacing-y-xsmall",gloss:"border-collapse"},T3={default:"border-b-token",secondary:"border-b-token",toned:"",gloss:"border-b-token"},A3="group/col",E3={default:"bg-secondary px-mid py-plus text-secondary-foreground whitespace-nowrap",secondary:"px-mid py-plus text-secondary-foreground whitespace-nowrap",toned:"px-mid py-plus text-muted whitespace-nowrap bg-transparent",gloss:"bg-transparent px-mid py-plus text-muted whitespace-nowrap"},L3="cursor-pointer select-none hover:text-foreground",w3="inline-flex items-center gap-xsmall",R3="min-w-0 text-small text-left font-w-mid",I3="shrink-0 origin-center",N3="text-primary opacity-100",D3="opacity-0 group-hover/col:opacity-40 text-muted",k3="px-mid py-mid text-center",O3="outline-none",P3={default:"border-b-token last:border-b-0",secondary:"border-b-token last:border-b-0",toned:"",gloss:"border-b-token last:border-b-0"},B3="cursor-pointer",j3="bg-default-hover",M3="bg-primary-tint hover:bg-primary-tint-strong",F3=I(Ro,"hover:bg-primary-tint focus-visible:bg-primary-tint"),G3="focus-ring-inset",H3="text-small",z3={default:"px-mid py-plus",secondary:"px-mid py-plus",toned:"px-mid py-plus first:rounded-l-mid last:rounded-r-mid",gloss:"px-mid py-plus"},V3="ring-2 ring-inset ring-primary",U3="hover:brightness-[0.97] motion-reduce:hover:brightness-100",$3="flex flex-wrap items-center justify-between gap-base border-t-token px-mid py-plus",gy={default:"bg-surface text-foreground",outline:"bg-transparent border-token text-foreground",secondary:"bg-secondary text-secondary-foreground",danger:"bg-surface-tint-danger text-foreground",success:"bg-surface-tint-success text-foreground",info:"bg-surface-tint-info text-foreground",warning:"bg-surface-tint-warning text-foreground"};function W3({variant:t,slotClass:e,className:n}){return it(x3,C3[t],e,n)}function X3({variant:t,slotClass:e,className:n}){return it(v3,y3[t],e,n)}function Y3({variant:t,allowsSorting:e,slotClass:n,className:r}){return it(A3,E3[t],e&&it(L3,gn),n,r)}function K3({variant:t,isToned:e,isSelectable:n,isSelected:r,slotClass:o,className:s}){return it(O3,P3[t],n&&B3,t==="gloss"&&!e&&(r?M3:F3),t!=="gloss"&&!e&&(r?j3:et()),n&&G3,o,s)}function q3({variant:t,tone:e,isSelected:n,slotClass:r,className:o}){const s=t==="toned",i=e?gy[e]:void 0;return it(H3,z3[t],s&&i,s&&n&&V3,s&&!n&&U3,r,o)}function Z3(t){return it(I3,t?N3:D3)}function Q3({direction:t}){const e=zn(),n=l.useRef(null),r=Hr(t==="descending",n,()=>!0);return d.jsx("span",{ref:r,"aria-hidden":!0,className:it(Z3(!!t),e.columnSortChevron),children:d.jsx(Re.IoChevronUp,{className:"icon-xsmall"})})}function J3({selectionMode:t="none",selectedKeys:e,onSelectionChange:n,sortDescriptor:r,onSortChange:o}){const s=e??i3,i=l.useCallback(c=>a3(s,c),[s]),a=l.useCallback(c=>{const u=l3({selectionMode:t,selectedKeys:s,key:c});u&&n&&n(u)},[n,s,t]);return l.useMemo(()=>({selectionMode:t,selectedKeys:s,onRowSelect:a,isRowSelected:i,sortDescriptor:r,onSortChange:o}),[i,a,o,s,t,r])}const by=l.forwardRef(function({className:e,tabIndex:n=0,...r},o){const s=zn();return d.jsx("div",{ref:o,tabIndex:n,className:it(S3,s.scrollContainer,e),...r})});by.displayName="TableScrollContainer";const xy=l.forwardRef(function({selectionMode:e="none",selectedKeys:n,onSelectionChange:r,sortDescriptor:o,onSortChange:s,className:i,children:a,...c},u){const f=Us(),m=zn(),p=J3({selectionMode:e,selectedKeys:n,onSelectionChange:r,sortDescriptor:o,onSortChange:s});return d.jsx(h3,{value:p,children:d.jsx("table",{ref:u,className:X3({variant:f,slotClass:m.content,className:i}),...c,children:a})})});xy.displayName="TableContent";const Cy=l.forwardRef(function({columns:e,children:n,className:r,...o},s){const i=Us(),a=zn(),c=e&&typeof n=="function"?e.map(u=>n(u)):n;return d.jsx("thead",{ref:s,className:it(a.header,r),...o,children:d.jsx("tr",{className:it(T3[i],a.headerRow),children:c})})});Cy.displayName="TableHeader";const _y=l.forwardRef(function({id:e,allowsSorting:n=!1,isRowHeader:r=!1,children:o,className:s,onClick:i,...a},c){const u=Us(),f=zn(),{sortDescriptor:m,onSortChange:p}=hy(),b=c3(e,m),g=l.useCallback(x=>{i==null||i(x),!(!n||!e||!p)&&p(u3(e,m))},[n,e,i,p,m]),h=typeof o=="function"?o({sortDirection:b}):o;return d.jsx("th",{ref:c,scope:r?"row":"col","aria-sort":d3(n,b),"data-allows-sorting":n||void 0,className:Y3({variant:u,allowsSorting:n,slotClass:f.column,className:s}),onClick:g,...a,children:d.jsxs("span",{className:it(w3,f.columnInner),children:[d.jsx("span",{className:it(R3,f.columnLabel),children:h}),n?d.jsx(Q3,{direction:b}):null]})})});_y.displayName="TableColumn";const Sy=l.forwardRef(function({items:e,children:n,renderEmptyState:r,className:o,...s},i){const a=zn();let c;if(e!==void 0)if(e.length===0&&r){const u=r();c=d.jsx("tr",{children:d.jsx("td",{colSpan:9999,className:it(k3,a.emptyCell),children:u})})}else typeof n=="function"&&(c=e.map(n));else c=n;return d.jsx("tbody",{ref:i,className:it(a.body,o),...s,children:c})});Sy.displayName="TableBody";const vy=l.forwardRef(function({id:e,tone:n,children:r,className:o,onClick:s,onKeyDown:i,...a},c){const u=Us(),f=zn(),{selectionMode:m,isRowSelected:p,onRowSelect:b}=hy(),g=e!==void 0?p(e):!1,h=m!=="none"&&e!==void 0,x=u==="toned",C=n??(x?zp:void 0),_=l.useMemo(()=>({tone:C??zp,isSelected:g}),[g,C]),v=l.useCallback(S=>{s==null||s(S),!S.defaultPrevented&&h&&b(e)},[e,h,s,b]),y=l.useCallback(S=>{i==null||i(S),!S.defaultPrevented&&h&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),b(e))},[e,h,i,b]);return d.jsx(g3,{value:x||C?_:null,children:d.jsx("tr",{ref:c,"data-selected":g||void 0,"data-tone":C,"aria-selected":f3(m,g),tabIndex:h?0:void 0,className:K3({variant:u,isToned:x,isSelectable:h,isSelected:g,slotClass:f.row,className:o}),onClick:v,onKeyDown:y,...a,children:r})})});vy.displayName="TableRow";const yy=l.forwardRef(function({className:e,...n},r){const o=Us(),s=zn(),i=b3();return d.jsx("td",{ref:r,className:q3({variant:o,tone:i==null?void 0:i.tone,isSelected:(i==null?void 0:i.isSelected)??!1,slotClass:s.cell,className:e}),...n})});yy.displayName="TableCell";const Ty=l.forwardRef(function({className:e,...n},r){const o=zn();return d.jsx("div",{ref:r,className:it($3,o.footer,e),...n})});Ty.displayName="TableFooter";function eY({variant:t="default"}){return{variant:t,isGloss:t==="gloss"}}const Ay=l.forwardRef(function({variant:e="default",className:n,classNames:r,children:o,...s},i){const{variant:a,isGloss:c}=eY({variant:e}),u=Io(i,c);return d.jsx(m3,{variant:a,children:d.jsx(p3,{classNames:r,children:d.jsx("div",{ref:u,className:W3({variant:a,slotClass:r==null?void 0:r.root,className:n}),...s,children:c?d.jsx("div",{className:it(_3,r==null?void 0:r.glossContent),children:o}):o})})})});Ay.displayName="TableRoot";const tY=Object.assign(Ay,{ScrollContainer:by,Content:xy,Header:Cy,Column:_y,Body:Sy,Row:vy,Cell:yy,Footer:Ty});function nY(){return"Previous"}function rY(){return"Next"}function oY(t,e,n,r){return`${t} ${r.months[e]} ${n}`}function Xn(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}function Vp(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())}function sY(t,e){return new Date(t,e+1,0).getDate()}function iY(t,e){return(new Date(t,e,1).getDay()+6)%7}function aY(t,e,n){const r=e.getFullYear(),o=e.getMonth();if(t==="days")return`${n.months[o]} ${r}`;if(t==="months")return String(r);const s=Math.floor(r/10)*10;return`${s}–${s+9}`}function lY(t,e,n,r){if(t)return new Date(t.getFullYear(),t.getMonth(),1);let o=null;return e==="single"&&n instanceof Date?o=n:e==="range"?o=(n==null?void 0:n.start)??null:e==="multiple"&&(o=(n==null?void 0:n[0])??null),o?new Date(o.getFullYear(),o.getMonth(),1):new Date(r.getFullYear(),r.getMonth(),1)}function cY(t,e){if(t==="single"){const n=e;return n?[n]:[]}if(t==="multiple"){const n=e;return Array.isArray(n)?n:[]}return[]}function uY(t,e,n){return t!=="range"?null:e||((n==null?void 0:n.start)??null)}function dY(t,e,n){return t!=="range"||e?null:(n==null?void 0:n.end)??null}function fY(t,e,n){return e==="days"?new Date(t.getFullYear(),t.getMonth()+n,1):e==="months"?new Date(t.getFullYear()+n,t.getMonth(),1):new Date(t.getFullYear()+n*10,t.getMonth(),1)}function mY({viewDate:t,selectedDates:e,rangeStart:n,rangeEnd:r,hoverDate:o,mode:s,locale:i,minDate:a,maxDate:c,today:u}){const f=t.getFullYear(),m=t.getMonth(),p=sY(f,m),b=iY(f,m),g=r??(n&&o?o:null),h=n&&g?n<=g?n:g:null,x=n&&g?n<=g?g:n:null,C=[...Array(b).fill(null),...Array.from({length:p},(v,y)=>y+1)],_=C.length%7;return _!==0&&C.push(...Array(7-_).fill(null)),C.map((v,y)=>{if(v===null)return{key:`empty-${f}-${m}-${y}`,day:null};const S=new Date(f,m,v),A=`${f}-${m}-${v}`,E=Xn(S,u),T=s!=="range"&&e.some(k=>Xn(k,S)),L=s==="range"&&!!n&&Xn(S,n),w=s==="range"&&!!g&&Xn(S,g),R=s==="range"&&h&&x?S>h&&S<x:!1,N=s==="range"&&!!n&&!!g&&Xn(n,g),D=!N&&(R||w),P=!N&&(R||L),j=!!a&&S<a||!!c&&S>c;return{key:A,day:v,date:S,isToday:E,isSelected:T,isRangeStart:L,isRangeEnd:w,showLeftBg:D,showRightBg:P,isDisabled:j,circleActive:T||L||w,ariaLabel:oY(v,m,f,i)}})}function pY(t,e,n,r){const o=t.getFullYear();return n.monthsShort.map((s,i)=>({month:i,name:s,isCurrentMonth:r.getFullYear()===o&&r.getMonth()===i,isSelected:e.some(a=>a.getFullYear()===o&&a.getMonth()===i)}))}function hY(t,e,n){const r=Math.floor(t.getFullYear()/10)*10;return Array.from({length:12},(s,i)=>r-1+i).map(s=>({year:s,isCurrentYear:n.getFullYear()===s,isSelected:e.some(i=>i.getFullYear()===s),outOfDecade:s<r||s>r+9}))}function gY(t,e){return e!==void 0?e:t==="range"?{start:null,end:null}:t==="multiple"?[]:null}function Ke(...t){return I(...t)}const Ey=l.createContext(null),Rc=l.createContext({});function bY({value:t,children:e}){return d.jsx(Ey.Provider,{value:t,children:e})}function xY({classNames:t,children:e}){const n=l.useContext(Rc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Rc.Provider,{value:r,children:e})}function ro(){const t=l.useContext(Ey);if(!t)throw new Error("Calendar compound parts must be inside <Calendar>.");return t}function Vn(){return l.useContext(Rc)}function CY(t=!1){const e=l.useRef(null),n=l.useRef(!1),r=l.useCallback(i=>{if(t||i.defaultPrevented)return;n.current=!0;const a=e.current;!a||De()||pt(a,!0)},[t]),o=l.useCallback(()=>{n.current=!1;const i=e.current;!i||De()||pt(i,!1)},[]),s=l.useCallback(i=>{if(t||i.defaultPrevented)return;const a=e.current;!a||ue()||Xe(a,{pointerInside:n.current})},[t]);return{ref:e,handlePointerEnter:r,handlePointerLeave:o,handlePointerDown:s}}function _Y(t=!1){const e=l.useRef(null),n=l.useRef(!1),r=l.useCallback(i=>{if(t||i.defaultPrevented)return;n.current=!0;const a=e.current;!a||De()||pt(a,!0)},[t]),o=l.useCallback(()=>{n.current=!1;const i=e.current;!i||De()||pt(i,!1)},[]),s=l.useCallback(i=>{if(t||i.defaultPrevented)return;const a=e.current;!a||ue()||Xe(a,{pointerInside:n.current})},[t]);return{btnRef:e,handlePointerEnter:r,handlePointerLeave:o,handlePointerDown:s}}const SY={small:"mx-auto flex aspect-square w-full max-w-control-small items-center justify-center text-xs",base:"mx-auto flex aspect-square w-full max-w-control-base items-center justify-center text-small",mid:"mx-auto flex aspect-square w-full max-w-control-mid items-center justify-center text-small",large:"mx-auto flex aspect-square w-full max-w-control-large items-center justify-center text-base"},vY={small:"h-control-small w-control-small",base:"h-control-base w-control-base",mid:"h-control-mid w-control-mid",large:"h-control-large w-control-large"},yY={small:"p-small gap-xsmall",base:"p-mid gap-small",mid:"p-mid gap-small",large:"p-large gap-base"},TY={small:"min-w-[15.5rem]",base:"min-w-[18rem]",mid:"min-w-[21rem]",large:"min-w-[24rem]"},AY={small:"text-small",base:"text-base",mid:"text-mid",large:"text-mid"},EY={default:"rounded-large border-token bg-surface shadow-token-base",secondary:"rounded-large border-token bg-secondary shadow-token-base",outline:"rounded-large bg-transparent border-token shadow-token-base",gloss:"rounded-large border-0"},Ly={small:"gap-xsmall",base:"gap-xsmall",mid:"gap-small",large:"gap-small"},LY={small:"small",base:"base",mid:"mid",large:"mid"},wy={small:"mx-auto aspect-square w-full max-w-control-small",base:"mx-auto aspect-square w-full max-w-control-base",mid:"mx-auto aspect-square w-full max-w-control-mid",large:"mx-auto aspect-square w-full max-w-control-large"},wY={small:"small",base:"base",mid:"mid",large:"mid"},RY={small:"min-h-control-small w-full px-small py-xsmall",base:"min-h-control-base w-full px-plus py-small",mid:"min-h-control-mid w-full px-mid py-plus",large:"min-h-control-large w-full px-mid py-plus"},IY="inline-flex flex-col select-none text-left text-foreground",NY="gloss-panel gloss-deep rounded-large",DY="gloss-content flex flex-col",kY="pointer-events-none absolute inset-y-0 bg-default-hover",OY="flex items-center gap-xsmall",PY="flex-1 rounded-base py-xsmall text-center font-w-mid",BY="cursor-pointer hover:text-primary focus-ring",jY="cursor-default",MY="min-w-0",FY="grid grid-cols-7 gap-xsmall",GY="grid grid-cols-7 gap-xsmall",HY="flex items-center justify-center font-w-mid text-muted",zY="relative flex items-center justify-center",VY="relative z-10",UY="grid grid-cols-3",$Y="grid grid-cols-4",WY="flex items-center justify-between border-t-token pt-small",XY=I(et(),"flex shrink-0 origin-center items-center justify-center rounded-base will-change-transform","text-muted focus-ring","disabled:cursor-not-allowed disabled:opacity-40"),YY="group/calendar-cell relative inline-flex origin-center items-center justify-center overflow-hidden outline-none will-change-transform focus-ring rounded-mid",KY=I("pointer-events-none absolute -inset-px z-0 origin-center will-change-transform bg-primary",Ro,"motion-reduce:transition-none group-hover/calendar-cell:bg-primary-hover rounded-mid"),qY=I(PY,gn),ZY="relative z-[1] min-w-0 shrink-0 leading-none",QY="absolute bottom-[3px] left-1/2 z-[1] h-[3px] w-[3px] -translate-x-1/2 rounded-full bg-primary",Up="icon-xsmall",JY="bg-transparent font-w-mid text-primary-foreground",eK="font-w-mid text-primary",tK="text-foreground",nK="cursor-not-allowed opacity-35",rK="cursor-pointer",oK="text-muted",sK="text-muted",iK={opacity:0};function aK(t){return I(XY,vY[t])}function lK(t,e,n,r){return I(IY,n?NY:EY[t],yY[e],TY[e],r)}function cK(t){return t==="left"?"left-0 right-1/2":"left-1/2 right-0"}function uK(t,e){return e==="day"?wy[t]:RY[t]}function dK(t,e){return e==="day"?LY[t]:wY[t]}function fK({selected:t,isToday:e,isCurrent:n}){return t?JY:e||n?eK:tK}function mK(t,e,n,r){return I(YY,uK(t,e),fK({selected:n.selected,isToday:n.isToday,isCurrent:n.isCurrent}),!n.selected&&!n.disabled&&et(),n.disabled?nK:rK,r)}function pK(t){return I(HY,SY[t])}function hK(t){return I(UY,Ly[t])}function gK(t){return I($Y,Ly[t])}function bK(t,e){return t&&!e?oK:void 0}function xK(t,e){return I(qY,AY[t],e!=="years"?BY:jY)}function $p({visible:t,side:e}){const n=Vn(),r=l.useRef(null),o=l.useRef(!0);return l.useLayoutEffect(()=>{const s=r.current;if(!s)return;const i=a=>{s.style.opacity=a?"1":"0"};if(ue()){z(s),i(t);return}if(o.current){o.current=!1,z(s),i(t);return}z(s),X.to(s,{autoAlpha:t?1:0,...Sg(),overwrite:"auto"})},[t]),d.jsx("div",{ref:r,"aria-hidden":!0,className:Ke(I(kY,cK(e)),n.rangeHalfFill),style:iK})}function Wp({direction:t,size:e,onClick:n,disabled:r}){const o=Vn(),s=CY(r),i=t==="prev"?nY():rY(),a=t==="prev"?o.navPrev:o.navNext;return d.jsx("button",{ref:s.ref,type:"button","aria-label":i,disabled:r,onClick:n,onPointerEnter:s.handlePointerEnter,onPointerLeave:s.handlePointerLeave,onPointerDown:s.handlePointerDown,className:Ke(aK(e),a),children:t==="prev"?d.jsx(Re.IoChevronBack,{className:Up}):d.jsx(Re.IoChevronForward,{className:Up})})}const CK=l.forwardRef(function({selected:e,disabled:n=!1,size:r,ariaLabel:o,ariaSelected:s,rounded:i="day",cellKind:a="day",isToday:c=!1,isCurrent:u=!1,className:f="",onPress:m,onMouseEnter:p,onMouseLeave:b,children:g},h){const x=l.useRef(null),C=l.useRef(m),_=l.useRef(p),v=l.useRef(b);C.current=m,_.current=p,v.current=b;const{bindFillRef:y}=EC(e,x),S=_Y(n),A=Vn(),E=a==="month"?A.monthCell:a==="year"?A.yearCell:A.dayCell,T=dK(r,i),L=l.useCallback(D=>{S.btnRef.current=D,typeof h=="function"?h(D):h&&(h.current=D)},[S.btnRef,h]),w=l.useCallback(()=>{n||C.current()},[n]),R=l.useCallback(D=>{var P;(P=_.current)==null||P.call(_),S.handlePointerEnter(D)},[S]),N=l.useCallback(()=>{var D;(D=v.current)==null||D.call(v),S.handlePointerLeave()},[S]);return d.jsxs("button",{ref:L,type:"button","aria-label":o,"aria-pressed":s,"aria-disabled":n,disabled:n,onClick:w,onPointerEnter:R,onPointerLeave:N,onPointerDown:S.handlePointerDown,className:mK(r,i,{selected:e,disabled:n,isToday:c,isCurrent:u},Ke(A.cell,E,f)),children:[d.jsx("span",{ref:y,"aria-hidden":!0,[TC]:"","data-pressed":e?"true":"false",className:Ke(KY,A.cellFill)}),d.jsx(ee,{variant:T,as:"span",inheritColor:!0,className:Ke(ZY,A.cellText),children:g}),c&&!e&&d.jsx("span",{"aria-hidden":!0,className:Ke(QY,A.cellTodayDot)})]})});function _K(t,e){return t.selected===e.selected&&t.disabled===e.disabled&&t.size===e.size&&t.rounded===e.rounded&&t.cellKind===e.cellKind&&t.isToday===e.isToday&&t.isCurrent===e.isCurrent&&t.ariaLabel===e.ariaLabel&&t.ariaSelected===e.ariaSelected&&t.className===e.className&&t.children===e.children}const Ga=l.memo(CK,_K);function SK(){const t=Vn(),{viewDate:e,selectedDates:n,rangeStart:r,rangeEnd:o,hoverDate:s,setHoverDate:i,onDayPress:a,size:c,mode:u,locale:f,minDate:m,maxDate:p,today:b}=ro(),g=l.useMemo(()=>mY({viewDate:e,selectedDates:n,rangeStart:r,rangeEnd:o,hoverDate:s,mode:u,locale:f,minDate:m,maxDate:p,today:b}),[e,n,r,o,s,u,f,m,p,b]);return d.jsxs("div",{children:[d.jsx("div",{className:Ke(FY,t.weekdayGrid),children:f.weekDays.map(h=>d.jsx("div",{className:Ke(pK(c),t.weekdayCell),children:h},h))}),d.jsx("div",{className:Ke(GY,t.daysGrid),children:g.map(h=>h.day===null?d.jsx("div",{className:wy[c]},h.key):d.jsxs("div",{className:Ke(zY,t.dayCellWrapper),children:[h.showLeftBg?d.jsx($p,{visible:!0,side:"left"}):null,h.showRightBg?d.jsx($p,{visible:!0,side:"right"}):null,d.jsx(Ga,{selected:!!h.circleActive,disabled:h.isDisabled,isToday:h.isToday,size:c,cellKind:"day",ariaLabel:h.ariaLabel,ariaSelected:h.circleActive,onPress:()=>h.date&&a(h.date),onMouseEnter:()=>u==="range"&&!h.isDisabled&&h.date&&i(h.date),onMouseLeave:()=>u==="range"&&i(null),className:VY,children:h.day})]},h.key))})]})}function vK(){const t=Vn(),{viewDate:e,onMonthPress:n,selectedDates:r,size:o,locale:s,today:i}=ro(),a=l.useMemo(()=>pY(e,r,s,i),[e,r,s,i]);return d.jsx("div",{className:Ke(hK(o),t.monthsGrid),children:a.map(c=>d.jsx(Ga,{selected:c.isSelected,isCurrent:c.isCurrentMonth,size:o,cellKind:"month",rounded:"picker",onPress:()=>n(c.month),children:c.name},c.month))})}function yK(){const t=Vn(),{viewDate:e,onYearPress:n,selectedDates:r,size:o,today:s}=ro(),i=l.useMemo(()=>hY(e,r,s),[e,r,s]);return d.jsx("div",{className:Ke(gK(o),t.yearsGrid),children:i.map(a=>d.jsx(Ga,{selected:a.isSelected,isCurrent:a.isCurrentYear,size:o,cellKind:"year",rounded:"picker",onPress:()=>n(a.year),className:bK(a.outOfDecade,a.isSelected),children:a.year},a.year))})}const um=l.forwardRef(function({className:e="",...n},r){const o=Vn(),{view:s,setView:i,viewDate:a,navigate:c,size:u,locale:f}=ro(),m=l.useMemo(()=>aY(s,a,f),[s,a,f]);return d.jsxs("div",{ref:r,className:Ke(OY,o.header,e),...n,children:[d.jsx(Wp,{direction:"prev",size:u,onClick:()=>c(-1)}),d.jsx("button",{type:"button",disabled:s==="years",onClick:()=>{s==="days"?i("months"):s==="months"&&i("years")},className:Ke(xK(u,s),o.headerTitle),children:m}),d.jsx(Wp,{direction:"next",size:u,onClick:()=>c(1)})]})}),dm=l.forwardRef(function({className:e="",...n},r){const o=Vn(),{view:s}=ro();return d.jsxs("div",{ref:r,className:Ke(MY,o.grid,e),...n,children:[s==="days"&&d.jsx(SK,{}),s==="months"&&d.jsx(vK,{}),s==="years"&&d.jsx(yK,{})]})}),Ry=l.forwardRef(function({className:e="",...n},r){const o=Vn(),{onClear:s,onToday:i,locale:a}=ro();return d.jsxs("div",{ref:r,className:Ke(WY,o.footer,e),...n,children:[d.jsx(yo,{variant:"ghost",size:"small",className:Ke(sK,o.footerToday),onClick:i,children:a.today}),d.jsx(yo,{variant:"ghost",size:"small",status:"danger",className:o.footerClear,onClick:s,children:a.clear})]})});um.displayName="Calendar.Header";dm.displayName="Calendar.Grid";Ry.displayName="Calendar.Footer";Ga.displayName="CalendarInteractiveCell";function TK(){return d.jsxs(d.Fragment,{children:[d.jsx(um,{}),d.jsx(dm,{})]})}const Iy={weekDays:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"};function AK(t){const{mode:e="single",variant:n="default",size:r="base",defaultMonth:o,initialView:s="days",locale:i=Iy,minDate:a,maxDate:c,value:u,defaultValue:f,onValueChange:m}=t,p=n==="gloss",b=l.useMemo(()=>Vp(new Date),[]),g=u!==void 0,[h,x]=l.useState(()=>gY(e,f)),C=g?u:h,_=l.useRef(C);_.current=C;const v=l.useCallback(W=>{const F=_.current,V=typeof W=="function"?W(F):W;_.current=V,g||x(V),m==null||m(V)},[g,m]),[y,S]=l.useState(s),[A,E]=l.useState(()=>lY(o,e,C,b)),[T,L]=l.useState(null),[w,R]=l.useState(null),N=l.useMemo(()=>cY(e,C),[e,C]),D=l.useMemo(()=>uY(e,T,C),[e,T,C]),P=l.useMemo(()=>dY(e,T,C),[e,T,C]),j=l.useCallback(W=>{E(F=>fY(F,y,W))},[y]),G=l.useCallback(W=>{const F=Vp(W);if(e==="single")v(V=>{const H=V instanceof Date?V:null;return H&&Xn(H,F)?null:F});else if(e==="multiple")v(V=>{const H=Array.isArray(V)?V:[],re=H.findIndex(me=>Xn(me,F));return re>=0?H.filter((me,pe)=>pe!==re):[...H,F]});else if(!T)L(F),v({start:null,end:null});else if(Xn(F,T))L(null);else{const V=F<=T?F:T,H=F<=T?T:F;L(null),R(null),v({start:V,end:H})}},[e,T,v]),k=l.useCallback(W=>{E(new Date(A.getFullYear(),W,1)),S("days")},[A]),O=l.useCallback(W=>{E(new Date(W,A.getMonth(),1)),S("months")},[A]),M=l.useCallback(()=>{L(null),R(null),v(e==="single"?null:e==="multiple"?[]:{start:null,end:null})},[e,v]),B=l.useCallback(()=>{E(new Date(b.getFullYear(),b.getMonth(),1)),S("days")},[b]),U=l.useMemo(()=>({mode:e,view:y,setView:S,viewDate:A,navigate:j,selectedDates:N,rangeStart:D,rangeEnd:P,hoverDate:w,setHoverDate:R,onDayPress:G,onMonthPress:k,onYearPress:O,onClear:M,onToday:B,size:r,variant:n,locale:i,minDate:a,maxDate:c,today:b}),[e,y,A,j,N,D,P,w,G,k,O,M,B,r,n,i,a,c,b]);return{isGloss:p,variant:n,size:r,contextValue:U,today:b}}const Ny=l.forwardRef(function(e,n){const{mode:r,variant:o,size:s,defaultMonth:i,initialView:a,locale:c,minDate:u,maxDate:f,value:m,defaultValue:p,onValueChange:b,classNames:g,children:h,className:x="",...C}=e,{isGloss:_,contextValue:v}=AK(e),y=Io(n,_),S=h??d.jsx(TK,{});return d.jsx(bY,{value:v,children:d.jsx(xY,{classNames:g,children:d.jsx("div",{ref:y,className:lK(v.variant,v.size,_,Ke("",g==null?void 0:g.root,x)),...C,children:_?d.jsx("div",{className:I(DY,g==null?void 0:g.glossContent),children:S}):S})})})});Ny.displayName="Calendar";const EK=Object.assign(Ny,{Header:um,Grid:dm,Footer:Ry}),Dy=l.createContext(null),Ic=l.createContext({});function LK({value:t,children:e}){return d.jsx(Dy.Provider,{value:t,children:e})}function wK({classNames:t,children:e}){const n=l.useContext(Ic),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Ic.Provider,{value:r,children:e})}function Ha(){const t=l.useContext(Dy);if(!t)throw new Error("ColorPicker compound parts must be inside <ColorPicker>.");return t}function Ko(){return l.useContext(Ic)}const RK="Saturation and brightness",IK="Color selection",NK="Hex code of the color",DK="Transparency (%)";function kK(t){return`Selected color: ${t}`}function xs(t,e,n){return Math.max(e,Math.min(n,t))}function Dr({h:t,s:e,v:n,a:r}){const o=e/100,s=n/100,a=(t%360+360)%360/60,c=Math.floor(a),u=a-c,f=s*(1-o),m=s*(1-o*u),p=s*(1-o*(1-u));let b=0,g=0,h=0;switch(c%6){case 0:b=s,g=p,h=f;break;case 1:b=m,g=s,h=f;break;case 2:b=f,g=s,h=p;break;case 3:b=f,g=m,h=s;break;case 4:b=p,g=f,h=s;break;case 5:b=s,g=f,h=m;break}return{r:Math.round(b*255),g:Math.round(g*255),b:Math.round(h*255),a:r}}function ky({r:t,g:e,b:n,a:r}){const o=t/255,s=e/255,i=n/255,a=Math.max(o,s,i),c=Math.min(o,s,i),u=a-c;let f=0;return u>0&&(a===o?f=((s-i)/u+6)%6:a===s?f=(i-o)/u+2:f=(o-s)/u+4,f=Math.round(f*60)),{h:f,s:a===0?0:Math.round(u/a*100),v:Math.round(a*100),a:r}}function Oy({r:t,g:e,b:n,a:r}){const o=i=>Math.round(xs(i,0,255)).toString(16).padStart(2,"0"),s=`#${o(t)}${o(e)}${o(n)}`;return r<100?s+o(Math.round(r/100*255)):s}function Py(t){const e=t.replace(/^#/,"");return e.length===3?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:100}:e.length===6?{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:100}:e.length===8?{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:Math.round(parseInt(e.slice(6,8),16)/255*100)}:null}function Nc(t){return Oy(Dr(t))}function $s(t){const e=Py(t);return e?ky(e):null}function By(t){const{r:e,g:n,b:r}=Dr(t);return t.a<100?`rgba(${e},${n},${r},${(t.a/100).toFixed(2)})`:`rgb(${e},${n},${r})`}function Zi(t){const{r:e,g:n,b:r}=Dr({h:t,s:100,v:100,a:100});return`rgb(${e},${n},${r})`}function OK(t,e){const n=e?"to right":"to top",{r,g:o,b:s}=Dr(t);return{background:`linear-gradient(${n}, rgba(${r},${o},${s},0), rgb(${r},${o},${s}))`}}function PK({hsva:t,setHsva:e}){const n=l.useRef(null),r=l.useRef(!1),o=l.useCallback((i,a)=>{const c=n.current;if(!c)return;const u=c.getBoundingClientRect(),f=xs((i-u.left)/u.width*100,0,100),m=xs(100-(a-u.top)/u.height*100,0,100);e({...t,s:Math.round(f),v:Math.round(m)})},[t,e]);l.useEffect(()=>{const i=c=>{r.current&&o(c.clientX,c.clientY)},a=()=>{r.current=!1};return window.addEventListener("pointermove",i),window.addEventListener("pointerup",a),window.addEventListener("pointercancel",a),()=>{window.removeEventListener("pointermove",i),window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a)}},[o]);const s=l.useCallback(i=>{i.preventDefault(),r.current=!0,o(i.clientX,i.clientY)},[o]);return{areaRef:n,handlePointerDown:s}}function mt(...t){return I(...t)}const jy="#3b82f6",BK={h:217,s:90,v:96,a:100};function jK(t,e){return $s(t??e??jy)??BK}const My={small:"small",base:"base",mid:"mid"},MK={small:"small",base:"base",mid:"mid"},FK={small:"w-52",base:"w-64",mid:"w-72"},GK={small:"h-32",base:"h-40",mid:"h-48"},HK={small:"p-small gap-small",base:"p-plus gap-plus",mid:"p-mid gap-mid"},zK="relative w-full touch-none select-none rounded-small cursor-crosshair overflow-hidden",VK="pointer-events-none absolute z-10 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-token-mid",UK="flex items-center gap-small",$K="flex min-w-0 flex-1 flex-col gap-xsmall",WK="flex items-center gap-small",XK="flex items-center gap-xsmall rounded-small border-token bg-secondary px-small py-xsmall",YK="text-small text-muted select-none",KK=`min-w-0 flex-1 bg-transparent text-small font-mono uppercase text-foreground outline-none ${Et}`,qK="flex items-center gap-xsmall rounded-small border-token bg-secondary px-small py-xsmall",ZK=`w-8 bg-transparent text-right text-small font-mono text-foreground outline-none ${Et}`,QK="text-small text-muted select-none",JK="flex flex-wrap gap-xsmall border-t-token pt-small",e4="flex flex-col rounded-mid text-foreground";function t4(t,e){return mt(e4,FK[t],HK[t],e)}function n4(t,e){return mt(zK,GK[t],e)}const r4="overflow-hidden rounded-full",o4="opacity-48",Xp="flex flex-col gap-xsmall",s4="flex items-center justify-between",i4={hue:"Hue",saturation:"Saturation",value:"Value",alpha:"Alpha",red:"Red",green:"Green",blue:"Blue"};function a4({size:t,orientation:e,disabled:n,className:r}){return I(NS({isHorizontal:e==="horizontal",size:t,className:r}),r4,n&&o4)}function l4(t,e,n){const r=n==="horizontal";if(t==="alpha")return OK(e,r);const o=r?"to right":"to top",{r:s,g:i,b:a}=Dr(e);switch(t){case"hue":return{background:`linear-gradient(${o}, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)`};case"saturation":{const c=Dr({...e,s:0}),u=Zi(e.h);return{background:`linear-gradient(${o}, rgb(${c.r},${c.g},${c.b}), ${u})`}}case"value":{const c=Zi(e.h);return{background:`linear-gradient(${o}, #000, ${c})`}}case"red":return{background:`linear-gradient(${o}, rgb(0,${i},${a}), rgb(255,${i},${a}))`};case"green":return{background:`linear-gradient(${o}, rgb(${s},0,${a}), rgb(${s},255,${a}))`};case"blue":return{background:`linear-gradient(${o}, rgb(${s},${i},0), rgb(${s},${i},255))`}}}const c4={hue:{min:0,max:360,step:1},saturation:{min:0,max:100,step:1},value:{min:0,max:100,step:1},alpha:{min:0,max:100,step:1},red:{min:0,max:255,step:1},green:{min:0,max:255,step:1},blue:{min:0,max:255,step:1}},Fy={hue:0,saturation:100,value:100,alpha:100,red:255,green:0,blue:0};function u4(t,e,n){const r=t!==void 0,[o,s]=l.useState(e??n),i=r?t:o,a=l.useCallback(c=>{r||s(c)},[r]);return[i,a]}const Eo=l.forwardRef(function({channel:e,color:n={h:0,s:100,v:100,a:100},value:r,defaultValue:o,onValueChange:s,size:i="base",orientation:a="horizontal",disabled:c=!1,className:u="",...f},m){const{min:p,max:b,step:g}=c4[e],[h,x]=u4(r,o,Fy[e]),C=l.useRef(!1),_=l.useRef(null),[v,y]=l.useState(!1),[S,A]=l.useState(0),E=l.useMemo(()=>IS(void 0,i),[i]),[T,L]=l.useState(E);l.useLayoutEffect(()=>{const O=_.current;if(!O)return;const M=()=>{const U=O.getBoundingClientRect(),{trackSpanPx:W,thumbSpanPx:F}=Ci(U,a);A(W),F>0&&L(V=>V===F?V:F)};M();const B=new ResizeObserver(M);return B.observe(O),()=>B.disconnect()},[a]);const w=l.useCallback(O=>{_.current=O,typeof m=="function"?m(O):m&&(m.current=O)},[m]),R=l.useCallback(O=>{const M=xs(Math.round(O/g)*g,p,b);x(M),s==null||s(M)},[p,b,g,x,s]),N=T>0?T:E,D=l.useCallback((O,M)=>{const B=_.current;if(!B||c)return;const U=B.getBoundingClientRect();R(fc(O,M,U,a,p,b,N))},[c,N,R,b,p,a]);l.useEffect(()=>{const O=B=>{C.current&&D(B.clientX,B.clientY)},M=()=>{C.current=!1,y(!1)};return window.addEventListener("pointermove",O),window.addEventListener("pointerup",M),window.addEventListener("pointercancel",M),()=>{window.removeEventListener("pointermove",O),window.removeEventListener("pointerup",M),window.removeEventListener("pointercancel",M)}},[D]);const P=l.useCallback(O=>{c||O.button!==0||(O.preventDefault(),C.current=!0,y(!0),D(O.clientX,O.clientY))},[c,D]),j=l.useCallback(O=>{c||O.button!==0||(O.stopPropagation(),C.current=!0,y(!0),O.currentTarget.setPointerCapture(O.pointerId))},[c]),G=l.useCallback(O=>{if(c)return;let M=0;if(a==="horizontal"){if(O.key==="ArrowRight")M=g;else if(O.key==="ArrowLeft")M=-g;else if(O.key==="PageUp")M=g*10;else if(O.key==="PageDown")M=-g*10;else if(O.key==="Home"){R(p);return}else if(O.key==="End"){R(b);return}}else if(O.key==="ArrowUp")M=g;else if(O.key==="ArrowDown")M=-g;else if(O.key==="Home"){R(p);return}else if(O.key==="End"){R(b);return}M!==0&&(O.preventDefault(),R(h+M))},[c,a,g,p,b,h,R]),k=dc(h,p,b,S,N);return d.jsx("div",{ref:w,role:"presentation",className:a4({size:i,orientation:a,disabled:c,className:u}),style:l4(e,n,a),onPointerDown:P,...f,children:d.jsx(_i,{size:i,percent:k,orientation:a,disabled:c,active:v,ariaLabel:i4[e],ariaValueNow:h,ariaValueMin:p,ariaValueMax:b,onPointerDown:j,onKeyDown:G})})});Eo.displayName="ColorSliderTrack";const Gy=l.forwardRef(function({channel:e,color:n,label:r,size:o="base",orientation:s="horizontal",className:i="",children:a,...c},u){return a?d.jsx("div",{ref:u,className:I(Xp,i),children:a}):d.jsxs("div",{ref:u,className:I(Xp,i),children:[r?d.jsxs("div",{className:s4,children:[d.jsx(ee,{as:"span",variant:"small",className:"text-muted",children:r}),d.jsx(ee,{as:"span",variant:"small",className:"font-w-mid text-foreground",children:c.value??c.defaultValue??Fy[e]})]}):null,d.jsx(Eo,{channel:e,color:n,size:o,orientation:s,...c})]})});Gy.displayName="ColorSliderRoot";const Yp={xsmall:"h-4 w-4",small:"h-5 w-5",base:"h-6 w-6",mid:"h-7 w-7",large:"h-8 w-8",xlarge:"h-10 w-10"},Kp={circle:"rounded-full",rounded:"rounded-small",square:"rounded-none"};function d4(t,e){if(typeof e["aria-label"]=="string")return e["aria-label"];if(typeof e["aria-labelledby"]!="string")return`Select color ${t}`}const Ws=l.forwardRef(function({color:e="transparent",size:n="base",shape:r="rounded",selected:o=!1,disabled:s=!1,className:i="",onClick:a,onPointerEnter:c,onPointerLeave:u,onPointerDown:f,...m},p){const{setRefs:b,handlePointerEnter:g,handlePointerLeave:h,handlePointerDown:x}=aa({isGloss:!1,animated:!0,enabled:!s,hasHoverShadow:!0,forwardedRef:p,onPointerEnter:c,onPointerLeave:u,onPointerDown:f}),{"aria-label":C,..._}=m,v=!!a,y=typeof C=="string"||typeof _["aria-labelledby"]=="string";if(!v&&!y)return d.jsx("span",{"aria-hidden":!0,className:I("relative shrink-0 overflow-hidden",Yp[n],Kp[r],i),style:{backgroundColor:e}});const S=C??(v?d4(e,m):void 0);return d.jsx("button",{ref:b,type:"button",disabled:s,onClick:a,onPointerEnter:g,onPointerLeave:h,onPointerDown:x,"aria-label":S,className:I("relative shrink-0 origin-center overflow-hidden will-change-transform","outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-1",ir,Yp[n],Kp[r],o&&"ring-2 ring-primary ring-offset-2 ring-offset-background",s?"cursor-not-allowed opacity-40":a?"cursor-pointer":"cursor-default",i),style:{backgroundColor:e},..._})});Ws.displayName="ColorSwatch";function f4({size:t}){const{hsva:e,setHsva:n}=Ha(),r=Ko(),{areaRef:o,handlePointerDown:s}=PK({hsva:e,setHsva:n}),i=Zi(e.h),a=By(e);return d.jsx("div",{ref:o,role:"group","aria-label":RK,className:n4(t,r.area),style:{background:`linear-gradient(to bottom, transparent, #000), linear-gradient(to right, #fff, ${i})`},onPointerDown:s,children:d.jsx("div",{"aria-hidden":!0,className:mt(VK,r.areaThumb),style:{left:`${e.s}%`,top:`${100-e.v}%`,width:"14px",height:"14px",backgroundColor:a}})})}function m4({hex:t,setHsva:e}){const n=Ko(),[r,o]=l.useState(!1),[s,i]=l.useState(""),a=l.useCallback(u=>{const f=`#${u}`,m=$s(f);m&&e(m)},[e]),c=r?s:t.slice(1);return d.jsxs("div",{className:mt(XK,n.hexInput),children:[d.jsx("span",{className:mt(YK,n.hexPrefix),children:"#"}),d.jsx("input",{type:"text",value:c,maxLength:8,spellCheck:!1,"aria-label":NK,className:mt(KK,n.hexInputField,Et),onFocus:()=>{o(!0),i(t.slice(1))},onChange:u=>i(u.target.value.replace(/[^0-9a-fA-F]/g,"").toUpperCase()),onBlur:()=>{a(s),o(!1)},onKeyDown:u=>{u.key==="Enter"&&(a(s),o(!1))}})]})}function p4({hsva:t,setHsva:e}){const n=Ko();return d.jsxs("div",{className:mt(qK,n.alphaInput),children:[d.jsx("input",{type:"text",value:Math.round(t.a),"aria-label":DK,className:mt(ZK,n.alphaInputField,Et),onChange:r=>{const o=parseInt(r.target.value,10);Number.isNaN(o)||e({...t,a:xs(o,0,100)})}}),d.jsx("span",{className:mt(QK,n.alphaSuffix),children:"%"})]})}function h4({presets:t,hex:e,setHsva:n,size:r}){const o=Ko();return d.jsx("div",{className:mt(JK,o.presets),children:t.map(s=>d.jsx(Ws,{color:s,size:My[r],shape:"rounded",selected:e.toLowerCase()===s.toLowerCase(),className:o.presetSwatch,onClick:()=>{const i=$s(s);i&&n(i)}},s))})}const Hy=l.forwardRef(function({swatchSize:e,className:n,...r},o){const{hex:s,disabled:i,size:a}=Ha(),c=Ko();return d.jsx(kt.Trigger,{ref:o,className:mt(c.trigger,n),...r,children:d.jsx(Ws,{color:s,size:e??My[a],shape:"rounded",disabled:i,"aria-label":kK(s)})})});Hy.displayName="ColorPickerTrigger";const zy=l.forwardRef(function({showAlpha:e=!1,presets:n,className:r,...o},s){const{hsva:i,setHsva:a,hex:c,size:u}=Ha(),f=Ko(),m=MK[u];return d.jsx(kt.Content,{ref:s,unstyled:!0,offset:Is,align:"start","aria-label":IK,className:mt(f.content,r),children:d.jsxs("div",{className:t4(u,f.contentPanel),...o,children:[d.jsx(f4,{size:u}),d.jsxs("div",{className:mt(UK,f.slidersRow),children:[d.jsx(Ws,{color:c,size:"mid",shape:"circle",className:mt("shrink-0",f.previewSwatch)}),d.jsxs("div",{className:$K,children:[d.jsx(Eo,{channel:"hue",color:i,value:i.h,size:m,className:f.hueSlider,onValueChange:p=>a({...i,h:p})}),e?d.jsx(Eo,{channel:"alpha",color:i,value:i.a,size:m,className:f.alphaSlider,onValueChange:p=>a({...i,a:p})}):null]})]}),d.jsxs("div",{className:mt(WK,f.inputsRow),children:[d.jsx(m4,{hex:c,setHsva:a}),e?d.jsx(p4,{hsva:i,setHsva:a}):null]}),n&&n.length>0?d.jsx(h4,{presets:n,hex:c,setHsva:a,size:u}):null]})})});zy.displayName="ColorPickerContent";function g4({value:t,defaultValue:e=jy,onValueChange:n,size:r="base",disabled:o=!1}){const s=t!==void 0,[i,a]=l.useState(()=>jK(t,e)),c=l.useMemo(()=>s&&t!=null?$s(t)??i:i,[i,s,t]),u=l.useCallback(p=>{s||a(p),n==null||n(Nc(p))},[s,n]),f=Nc(c);return{contextValue:l.useMemo(()=>({hsva:c,setHsva:u,hex:f,disabled:o,size:r}),[c,u,f,o,r])}}function Vy({children:t,value:e,defaultValue:n,onValueChange:r,open:o,defaultOpen:s=!1,onOpenChange:i,size:a="base",variant:c="default",side:u="bottom",disabled:f=!1,classNames:m}){const{contextValue:p}=g4({value:e,defaultValue:n,onValueChange:r,size:a,disabled:f});return d.jsx(LK,{value:p,children:d.jsx(wK,{classNames:m,children:d.jsx(kt,{open:o,defaultOpen:s,onOpenChange:i,side:u,variant:c==="gloss"?"gloss":"default",children:t})})})}Vy.displayName="ColorPickerRoot";const b4=Object.assign(Vy,{Trigger:Hy,Content:zy}),x4=Object.assign(Gy,{Track:Eo}),fm=l.createContext(null),Dc=l.createContext({});function C4({value:t,children:e}){return d.jsx(fm.Provider,{value:t,children:e})}function _4({classNames:t,children:e}){const n=l.useContext(Dc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Dc.Provider,{value:r,children:e})}function Uy(){const t=l.useContext(fm);if(!t)throw new Error("Components TimeField must be inside <TimeField>.");return t}function S4(){return l.useContext(fm)}function Xs(){return l.useContext(Dc)}const v4="Time",y4={h:"hours",m:"minutes",s:"seconds"};function T4({labelConnected:t,labelId:e}){return{"aria-label":t?void 0:v4,"aria-labelledby":t?e:void 0}}function A4({seg:t,value:e,isRequired:n,isDanger:r,isFirstSegment:o,disabled:s}){return{role:"spinbutton","aria-label":y4[t],"aria-valuemin":0,"aria-valuemax":t==="h"?23:59,"aria-valuenow":e,"aria-valuetext":String(e).padStart(2,"0"),"aria-required":o&&n?!0:void 0,"aria-invalid":o&&r?!0:void 0,tabIndex:s?-1:0}}function E4(t){return t==="danger"||t==="default"?"default":t}function jt(...t){return I(...t)}const kc={h:23,m:59,s:59};function qp(t){const e=t.split(":").map(Number);return{h:Number.isFinite(e[0])?Math.max(0,Math.min(23,e[0])):0,m:Number.isFinite(e[1])?Math.max(0,Math.min(59,e[1])):0,s:Number.isFinite(e[2])?Math.max(0,Math.min(59,e[2])):0}}function L4(t,e){const n=String(t.h).padStart(2,"0"),r=String(t.m).padStart(2,"0"),o=String(t.s).padStart(2,"0");return e==="HH:mm:ss"?`${n}:${r}:${o}`:`${n}:${r}`}function Zp(t,e){return t[e]}function Wn(t,e,n){const r=Math.max(0,Math.min(kc[e],n));return{...t,[e]:r}}function w4(t,e,n,r){const o=t!==void 0,[s,i]=l.useState(()=>qp(t??e)),a=o?qp(t):s,c=l.useCallback(u=>{o||i(u),r==null||r(L4(u,n))},[n,o,r]);return[a,c,o]}function R4(t){return t==="HH:mm:ss"?["h","m","s"]:["h","m"]}function I4(t){return t==="segmented"||t==="gloss"?"default":t}const N4={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},D4={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},k4="bg-primary-tint",O4="border-r-token",P4="border-l-token",B4=`pointer-events-none absolute h-px w-px opacity-0 ${Et}`,j4="inline-flex min-w-[2ch] select-none items-center justify-center outline-none",M4="h-[1.65em] min-w-[2.25ch] rounded-small px-[3px] bg-default-hover",F4="rounded-[3px] px-[2px]",G4="bg-primary text-primary-foreground",H4="cursor-not-allowed",z4="cursor-default",V4="inline-flex w-[0.45em] shrink-0 select-none items-center justify-center self-center text-muted",U4="mx-[1px]",$4="relative flex min-w-0 flex-1 items-center font-mono tabular-nums leading-none",W4="flex min-w-0 w-full items-stretch",X4="gap-xsmall",Y4={small:Rn("small"),base:Rn("base"),mid:Rn("mid"),large:Rn("large")};function K4(t){return t==="default"?k4:D4[t]}function q4({side:t,status:e,size:n,slotClass:r}){return jt(Y4[n],K4(e),t==="prefix"?O4:P4,r)}function Z4({variant:t,status:e,statusTinted:n}){return Ns({variant:t==="segmented"?"default":t,statusTinted:n&&e!=="default",statusTintClass:e!=="default"?N4[e]:""})}function Q4({variant:t,status:e,disabled:n,compact:r,shellSurface:o,glossShellHoverMotionClass:s,standardShellHoverMotionClass:i,slotClass:a,className:c}){const u=t==="gloss";return jt("m-0 min-w-0 overflow-hidden rounded-base p-0",u?"relative":jt("border-1"),r?"w-fit shrink-0":"w-full min-w-0",o,Vr,Ur,u?"":zr(!n,e,I4(t)),u?s:i,n?"cursor-not-allowed opacity-55 shadow-token-base":"",a,c)}function J4({variant:t}){return jt(W4,!(t==="gloss")&&jt("min-h-full"))}function eq({variant:t,size:e,compact:n,slotClass:r}){const o=le[e],s=o.controlText==="small"?"text-small":o.controlText==="mid"?"text-mid":"text-base";return jt($4,n?"justify-center px-small":o.padX,o.padY,t==="segmented"&&X4,s,r)}function tq({variant:t,focused:e,disabled:n,slotClass:r}){return jt(j4,t==="segmented"?M4:F4,e&&G4,n?H4:z4,r)}function nq({variant:t,slotClass:e}){return jt(V4,t==="segmented"&&U4,e)}function rq({compact:t,slotClass:e,className:n}){return jt(t&&"w-fit",e,n)}function oq({shellRef:t,disabled:e,variant:n,onPointerDown:r,onPointerEnter:o,onPointerLeave:s}){const i=n==="gloss",a=Fo(t,!e&&!i),c=ko(t,!e&&i),u=l.useCallback((b,g)=>{g(b),!e&&i&&c.bindShellRef(b)},[e,c,i]),f=l.useCallback(b=>{if(r==null||r(b),b.defaultPrevented||e||i)return;const g=t.current;!g||ue()||Xe(g)},[e,i,r,t]),m=l.useCallback(b=>{o==null||o(b),!b.defaultPrevented&&(i?c.onShellPointerEnter(b):a.onShellPointerEnter(b))},[c,i,o,a]),p=l.useCallback(b=>{s==null||s(b),i?c.onShellPointerLeave(b):a.onShellPointerLeave(b)},[c,i,s,a]);return{isGloss:i,bindShellRef:u,shellPointerDown:i&&!e?c.onShellPointerDown:f,shellPointerEnter:m,shellPointerLeave:p,shellFocusCapture:i&&!e?c.onShellFocusIn:void 0,shellBlurCapture:i&&!e?c.onShellFocusOut:void 0,glossShellHoverMotionClass:c.shellHoverMotionClass,standardShellHoverMotionClass:a.shellHoverMotionClass}}function sq({value:t,defaultValue:e="00:00",onValueChange:n,format:r="HH:mm",disabled:o=!1,size:s,status:i,variant:a,compact:c,id:u,onPointerDown:f,onPointerEnter:m,onPointerLeave:p,ref:b}){const g=S4(),h=s??(g==null?void 0:g.size)??"base",x=i??(g==null?void 0:g.status)??"default",C=a??(g==null?void 0:g.variant)??"default",_=c??(g==null?void 0:g.compact)??!1,v=C==="gloss",y=g==null?void 0:g.fieldId,S=(g==null?void 0:g.labelId)??"",A=(g==null?void 0:g.labelConnected)??!1,E=(g==null?void 0:g.isRequired)??!1,[T,L]=w4(t,e,r,n),w=l.useRef(null),[R,N]=l.useState(null),D=l.useRef(null),P=l.useRef(null),j=l.useRef(null),G=l.useRef(null),k=l.useRef(null),O=l.useMemo(()=>({h:j,m:G,s:k}),[]),M=l.useMemo(()=>R4(r),[r]),B=l.useCallback(q=>{D.current=q,typeof b=="function"?b(q):b&&(b.current=q)},[b]),U=oq({shellRef:D,disabled:o,variant:C,onPointerDown:f,onPointerEnter:m,onPointerLeave:p}),W=l.useCallback(q=>{U.bindShellRef(q,B)},[B,U]),F=l.useCallback(q=>{var ie,ce;w.current=null,N(q),(ie=D.current)==null||ie.scrollIntoView({block:"nearest",inline:"center"}),(ce=P.current)==null||ce.focus({preventScroll:!0})},[]),V=l.useCallback((q,ie)=>{const ce=M.indexOf(q);ie==="next"&&ce<M.length-1&&F(M[ce+1]),ie==="prev"&&ce>0&&F(M[ce-1])},[M,F]),H=l.useCallback(()=>{const q=w.current;q&&(L(Wn(T,q.seg,q.digit)),w.current=null)},[T,L]),re=l.useCallback((q,ie)=>{const ce=kc[q],Be=w.current;if(Be&&Be.seg===q){const ft=Be.digit*10+ie;ft>ce?(L(Wn(T,q,Be.digit)),ie*10>ce?(L(Wn(T,q,Math.min(ie,ce))),w.current=null,V(q,"next")):w.current={seg:q,digit:ie}):(L(Wn(T,q,ft)),w.current=null,V(q,"next"))}else ie*10>ce?(L(Wn(T,q,Math.min(ie,ce))),w.current=null,V(q,"next")):(w.current={seg:q,digit:ie},L(Wn(T,q,ie)))},[T,V,L]),me=l.useCallback((q,ie)=>{if(o)return;const ce=kc[ie],Be=parseInt(q.key,10);if(!Number.isNaN(Be))q.preventDefault(),re(ie,Be);else if(q.key==="ArrowUp"){q.preventDefault(),w.current=null;const ft=Zp(T,ie);L(Wn(T,ie,ft>=ce?0:ft+1))}else if(q.key==="ArrowDown"){q.preventDefault(),w.current=null;const ft=Zp(T,ie);L(Wn(T,ie,ft<=0?ce:ft-1))}else q.key==="ArrowLeft"||q.key==="Backspace"?(q.preventDefault(),H(),V(ie,"prev")):q.key==="ArrowRight"?(q.preventDefault(),H(),V(ie,"next")):q.key==="Tab"&&H()},[re,H,o,T,V,L]),pe=l.useCallback(q=>{const ie=D.current,ce=q.relatedTarget;if(!(ie&&ce&&ie.contains(ce))){if(ie&&ce==null){requestAnimationFrame(()=>{const Be=document.activeElement;ie.contains(Be)||(H(),N(null))});return}H(),N(null)}},[H]),Y=l.useCallback(q=>{w.current=null,N(q)},[]),te=l.useCallback(q=>{const ie=q.currentTarget.value;if(q.currentTarget.value="",!(o||!R))for(const ce of ie){const Be=parseInt(ce,10);Number.isNaN(Be)||re(R,Be)}},[re,o,R]),de=l.useCallback(q=>{o||!R||me(q,R)},[o,R,me]),oe=l.useCallback((q,ie)=>{q.stopPropagation(),F(ie)},[F]),xe=l.useCallback(q=>{if(o)return;const ie=M[0];ie&&(q.target instanceof Element&&q.target.closest('[role="spinbutton"]')||F(ie))},[o,F,M]),ne=q=>{var ie;return((ie=w.current)==null?void 0:ie.seg)===q&&R===q},$=q=>ne(q)?String(w.current.digit):String(T[q]).padStart(2,"0"),be=Z4({variant:C,status:x,statusTinted:x==="danger"||x==="success"||x==="warning"}),Ie=T4({labelConnected:A,labelId:S}),Ae=Ft(g!=null&&g.hintConnected?g.hintId:void 0,g!=null&&g.errorConnected?g.errorId:void 0);return{size:h,status:x,variant:C,compact:_,disabled:o,isGloss:v,format:r,fieldId:y,controlId:u??y,shellAria:Ie,ariaDescribedBy:Ae,isRequired:E,hms:T,segments:M,segRefById:O,keyboardInputRef:P,bindShellRef:W,shellMotion:U,shellSurface:be,focusedSeg:R,handleSegKeyDown:me,handleFieldBlur:pe,handleSegFocus:Y,handleKeyboardInput:te,handleKeyboardInputKeyDown:de,handleSegClick:oe,handleShellClick:xe,segDisplay:$}}function Qp({side:t,status:e,size:n,className:r,children:o}){return d.jsx("span",{className:q4({side:t,status:e,size:n,slotClass:r}),children:o})}const za=l.forwardRef(function(e,n){const{value:r,defaultValue:o,onValueChange:s,format:i,disabled:a,size:c,status:u,variant:f,compact:m,prefix:p,suffix:b,className:g,id:h,onPointerDown:x,onPointerEnter:C,onPointerLeave:_,...v}=e,y=Xs(),S=sq({value:r,defaultValue:o,onValueChange:s,format:i,disabled:a,size:c,status:u,variant:f,compact:m,id:h,onPointerDown:x,onPointerEnter:C,onPointerLeave:_,ref:n});return d.jsx("fieldset",{ref:S.bindShellRef,id:S.controlId,"aria-label":S.shellAria["aria-label"],"aria-labelledby":S.shellAria["aria-labelledby"],"aria-describedby":S.ariaDescribedBy,"data-slot":"timefield-shell",onPointerDown:S.shellMotion.shellPointerDown,onPointerEnter:S.shellMotion.shellPointerEnter,onPointerLeave:S.shellMotion.shellPointerLeave,onFocusCapture:S.shellMotion.shellFocusCapture,onBlurCapture:S.shellMotion.shellBlurCapture,...S.disabled&&S.isGloss?{"data-gloss-disabled":""}:{},className:Q4({variant:S.variant,status:S.status,disabled:S.disabled,size:S.size,compact:S.compact,shellSurface:S.shellSurface,glossShellHoverMotionClass:S.shellMotion.glossShellHoverMotionClass,standardShellHoverMotionClass:S.shellMotion.standardShellHoverMotionClass,slotClass:y.shell,className:g}),...v,children:d.jsxs("div",{className:J4({variant:S.variant}),onClick:S.handleShellClick,children:[p!=null?d.jsx(Qp,{side:"prefix",status:S.status,size:S.size,className:y.prefix,children:p}):null,d.jsxs("div",{className:eq({variant:S.variant,size:S.size,compact:S.compact,slotClass:y.segments}),children:[d.jsx("input",{ref:S.keyboardInputRef,type:"text",inputMode:"numeric",pattern:"[0-9]*",autoComplete:"off","aria-hidden":!0,tabIndex:-1,disabled:S.disabled,className:jt(B4,y.keyboardInput,Et),onInput:S.handleKeyboardInput,onKeyDown:S.handleKeyboardInputKeyDown,onBlur:S.handleFieldBlur}),S.segments.map((A,E)=>d.jsxs("span",{className:"inline-flex items-center",children:[E>0&&d.jsx("span",{"aria-hidden":!0,className:nq({variant:S.variant,slotClass:y.segmentSeparator}),children:":"}),d.jsx("span",{ref:S.segRefById[A],...A4({seg:A,value:S.hms[A],isRequired:S.isRequired,isDanger:S.status==="danger",isFirstSegment:A===S.segments[0],disabled:S.disabled}),className:tq({variant:S.variant,focused:S.focusedSeg===A,disabled:S.disabled,slotClass:y.segment}),onKeyDown:T=>S.handleSegKeyDown(T,A),onFocus:()=>S.handleSegFocus(A),onBlur:S.handleFieldBlur,onClick:T=>S.handleSegClick(T,A),children:S.segDisplay(A)})]},A))]}),b!=null?d.jsx(Qp,{side:"suffix",status:S.status,size:S.size,className:y.suffix,children:b}):null]})})});za.displayName="TimeFieldControl";function $y({className:t,classNames:e,...n}){const r=Xs();return d.jsx($e,{className:t,classNames:{...e,root:jt(r.label,e==null?void 0:e.root)},...n})}$y.displayName="TimeFieldLabel";function Va({children:t,id:e,className:n,...r}){const o=Uy(),s=Xs();return d.jsx(Ye,{id:e??o.hintId,status:E4(o.status),className:jt(s.hint,n),...r,children:t})}Va.displayName="TimeFieldHint";function Ua({children:t,id:e,className:n,...r}){const o=Uy(),s=Xs();return d.jsx(Ze,{id:e??o.errorId,role:"alert",className:jt(s.error,n),...r,children:t})}Ua.displayName="TimeFieldError";function iq({label:t,hint:e,error:n,labelId:r,controlProps:o}){const s=Xs();return d.jsxs(d.Fragment,{children:[t!=null?d.jsx($e,{id:r,classNames:{root:s.label},children:t}):null,d.jsx(za,{...o}),e!=null&&d.jsx(Va,{children:e}),n!=null&&d.jsx(Ua,{children:n})]})}function aq({children:t,label:e,hint:n,error:r,id:o,isRequired:s=!1,status:i="default",size:a="base",variant:c="default",compact:u=!1}){const f=l.useId(),m=o??`timefield-${f}`,p=Yt(m),b=Kt(m),g=`${m}-label`,h=qt(t),x=e!=null||h&&ye(t,"Label"),C=n!=null||h&&ye(t,"TimeFieldHint"),_=r!=null||h&&ye(t,"TimeFieldError"),v=l.useMemo(()=>({fieldId:m,labelId:g,labelConnected:x,hintId:p,errorId:b,hintConnected:C,errorConnected:_,isRequired:s,status:i,size:a,variant:c,compact:u}),[u,b,m,_,C,x,p,s,g,a,i,c]),y=l.useMemo(()=>({controlId:m,labelId:g,isRequired:s}),[m,s,g]);return{fieldCtx:v,fieldLabelCtx:y,isCompound:h,fieldId:m,label:e,hint:n,error:r,status:i,size:a,variant:c,compact:u}}function Wy({children:t,label:e,hint:n,error:r,className:o,classNames:s,id:i,isRequired:a=!1,status:c="default",size:u="base",variant:f="default",value:m,defaultValue:p,onValueChange:b,format:g,disabled:h,compact:x=!1,prefix:C,suffix:_,...v}){const y=aq({children:t,label:e,hint:n,error:r,id:i,isRequired:a,status:c,size:u,variant:f,compact:x}),S=y.isCompound?t:d.jsx(iq,{label:y.label,hint:y.hint,error:y.error,labelId:y.fieldCtx.labelId,controlProps:{id:y.fieldId,value:m,defaultValue:p,onValueChange:b,format:g,disabled:h,size:y.size,status:y.status,variant:y.variant,compact:y.compact,prefix:C,suffix:_}});return d.jsx(C4,{value:y.fieldCtx,children:d.jsx(_4,{classNames:s,children:d.jsx(Xt.Provider,{value:y.fieldLabelCtx,children:d.jsx(pn,{className:rq({compact:y.compact,slotClass:s==null?void 0:s.root,className:o}),...v,children:S})})})})}Wy.displayName="TimeField";const lq=Object.assign(Wy,{Label:$y,Control:za,Hint:Va,Error:Ua});function $a(){return{"aria-hidden":!0,role:"presentation"}}const Wa="relative overflow-hidden bg-primary-tint",cq="pointer-events-none absolute inset-0 -translate-x-full",uq="rounded-full",dq="h-control-base w-control-base",fq="flex flex-col gap-small",mq="h-[1em] rounded-small",pq="w-3/5",hq="w-full",gq="rounded-mid px-mid py-plus",bq={none:"rounded-none",small:"rounded-small",mid:"rounded-mid",full:"rounded-full"},xq="skeleton-pulse 1.6s ease-in-out infinite",Cq="skeleton-wave-slide 2s linear 0.2s infinite",_q="skeleton-shimmer 2s linear infinite",Sq="linear-gradient(90deg, transparent 0%, var(--color-primary-tint-strong) 50%, transparent 100%)",vq="linear-gradient(90deg, var(--color-primary-tint) 0%, var(--color-primary-tint-strong) 50%, var(--color-primary-tint) 100%)";function yq(){return{animation:xq}}function Tq(){return{backgroundImage:vq,backgroundSize:"400% 100%",animation:_q}}function Aq(){return{animation:Cq,background:Sq}}function Eq(t){return bq[t]}function Lq(t){return`${t*.06}s`}function Lo(...t){return I(...t)}function Xa(t){return t==="pulse"?yq():t==="shimmer"?Tq():{}}function Ya({className:t,style:e}){return d.jsx("span",{"aria-hidden":!0,className:Lo(cq,t),style:{...Aq(),...e}})}const Xy=l.forwardRef(function({variant:e="wave",size:n=dq,className:r,classNames:o,style:s,...i},a){return d.jsx("div",{ref:a,className:Lo(Wa,uq,n,o==null?void 0:o.root,r),style:{...Xa(e),...s},...$a(),...i,children:e==="wave"?d.jsx(Ya,{className:o==null?void 0:o.wave}):null})});Xy.displayName="SkeletonCircle";const Yy=l.forwardRef(function({variant:e="wave",lines:n=3,lastShort:r=!0,className:o,classNames:s,style:i,...a},c){const u=Array.from({length:n},(f,m)=>r&&m===n-1?pq:hq);return d.jsx("div",{ref:c,className:Lo(fq,s==null?void 0:s.root,o),style:i,...$a(),...a,children:u.map((f,m)=>d.jsx("div",{className:Lo(Wa,mq,f,s==null?void 0:s.line),style:{...Xa(e),animationDelay:Lq(m)},children:e==="wave"?d.jsx(Ya,{className:s==null?void 0:s.wave}):null},m))})});Yy.displayName="SkeletonText";const Ky=l.forwardRef(function({variant:e="wave",className:n,classNames:r,style:o,children:s,...i},a){return d.jsxs("div",{ref:a,className:Lo(Wa,gq,r==null?void 0:r.root,n),style:{...Xa(e),...o},...$a(),...i,children:[e==="wave"?d.jsx(Ya,{className:r==null?void 0:r.wave}):null,s]})});Ky.displayName="SkeletonBlock";function wq({variant:t="wave",radius:e="small"}){return{variant:t,radius:e,isWave:t==="wave"}}const qy=l.forwardRef(function({variant:e="wave",radius:n="small",className:r,classNames:o,style:s,children:i,...a},c){const{variant:u,radius:f,isWave:m}=wq({variant:e,radius:n});return d.jsxs("div",{ref:c,className:Lo(Wa,Eq(f),o==null?void 0:o.root,r),style:{...Xa(u),...s},...$a(),...a,children:[m?d.jsx(Ya,{className:o==null?void 0:o.wave}):null,i]})});qy.displayName="Skeleton";const Rq=Object.assign(qy,{Circle:Xy,Text:Yy,Block:Ky}),Zy=l.createContext(null);function Iq({value:t,children:e}){return d.jsx(Zy.Provider,{value:t,children:e})}function Nq(){return l.useContext(Zy)}const Qy=l.createContext(null);function Dq({value:t,children:e}){return d.jsx(Qy.Provider,{value:t,children:e})}function mm(){const t=l.useContext(Qy);if(!t)throw new Error("Disclosure parts must be inside <Disclosure>.");return t}const Oc=l.createContext({});function Jy({classNames:t,children:e}){const n=l.useContext(Oc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Oc.Provider,{value:r,children:e})}function pm(){return l.useContext(Oc)}function Ct(...t){return I(...t)}function kq(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function Oq(t){return t==="outline"||t==="secondary"||t==="default"}function Pq(t){return t.displayName}function Bq(t){const e=[],n=[],r=[],o=[];return l.Children.forEach(t,s=>{if(!l.isValidElement(s)){o.push(s);return}const i=Pq(s.type);i==="DisclosureTrigger"?e.push(s):i==="DisclosureContent"?n.push(s):i==="DisclosureHandle"?r.push(s):o.push(s)}),[...e,...n,...r,...o]}const eT={small:"p-base",base:"p-plus",mid:"p-mid",large:"p-large"},jq={default:"flex flex-col",outline:"flex flex-col",secondary:"flex flex-col",card:"overflow-hidden rounded-base border-token bg-surface shadow-token-base",ghost:"flex flex-col",gloss:"flex flex-col"},Jp={outline:"bg-transparent border-token rounded-mid text-foreground",secondary:"bg-secondary border-token rounded-mid text-secondary-foreground"},so=I("bg-transparent text-foreground",et()),Mq={default:I("rounded-mid",so),outline:I("rounded-mid",so),secondary:I("rounded-mid",so),card:so,ghost:I("rounded-mid",so),gloss:I("rounded-mid",so)},Fq="flex w-full select-none items-center gap-small text-left outline-none focus-ring py-base",Gq="cursor-not-allowed opacity-48",Hq="cursor-pointer",zq="min-w-0 flex-1 origin-center will-change-transform",Vq="block",Uq="inline-flex shrink-0 origin-center items-center justify-center text-muted",$q="text-primary",Wq="overflow-hidden",Xq="flex touch-none select-none shrink-0 cursor-grab items-center justify-center border-t-token py-xsmall active:cursor-grabbing",Yq="pointer-events-none opacity-48",Kq="h-1 w-10 rounded-full bg-tertiary",qq="gloss-panel gloss-deep rounded-mid text-foreground",Zq="gloss-content text-muted";function tT(t){const e=le[t];return{padX:e.padX,text:e.controlText,chevron:e.chevronIcon}}function Qq({variant:t,groupedCardShell:e,className:n,slotClass:r}){const o=t==="card"&&e?"":jq[t];return Ct(o,r,n)}function Jq({variant:t,size:e,disabled:n,className:r,slotClass:o}){const s=tT(e);return Ct(Fq,s.padX,Mq[t],n?Gq:Hq,o,r)}function e8(t){if(t==="outline"||t==="secondary"||t==="gloss")return"pt-xsmall"}function t8({variant:t,size:e,className:n,slotClass:r}){const o=Oq(t);return Ct(eT[e],o&&t==="outline"&&Jp.outline,o&&t==="secondary"&&Jp.secondary,t==="card"&&"border-t-token",t==="ghost"&&"text-muted",t==="default"&&"text-muted",r,n)}function n8(t,e){return Ct(Zq,eT[t],e)}function r8({separated:t,variant:e,className:n,slotClass:r}){return Ct("flex w-full flex-col",t&&"gap-mid",!t&&e==="default"&&"divide-y-token border-t-token border-b-token",!t&&e==="card"&&"overflow-hidden rounded-mid border-token bg-surface shadow-token-base divide-y-token",!t&&(e==="outline"||e==="secondary"||e==="ghost"||e==="gloss")&&"gap-small",r,n)}function o8(t){return t!=null&&!t.separated&&t.variant==="card"}function s8({open:t,disabled:e,setOpen:n,chevronRef:r,skipContentAnimRef:o,forwardedRef:s,onClick:i,onKeyDown:a,onPointerEnter:c,onPointerLeave:u,onPointerDown:f}){const m=l.useRef(null),p=l.useRef(null),b=l.useRef(!1),g=l.useCallback(S=>{m.current=S,dt(s,S)},[s]),h=Hr(t,r,()=>Se().enableExpandable,o);l.useEffect(()=>{const S=p.current;return()=>{S&&z(S)}},[]),l.useEffect(()=>{if(!e)return;b.current=!1;const S=p.current;S&&z(S)},[e]);const x=l.useCallback(S=>{i==null||i(S),!(S.defaultPrevented||e)&&n(!t)},[e,i,t,n]),C=l.useCallback(S=>{a==null||a(S),(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),e||n(!t))},[e,a,t,n]),_=l.useCallback(S=>{if(c==null||c(S),S.defaultPrevented||e)return;b.current=!0;const A=p.current;!A||De()||pt(A,!0)},[e,c]),v=l.useCallback(S=>{u==null||u(S),b.current=!1;const A=p.current;!A||De()||pt(A,!1)},[u]),y=l.useCallback(S=>{if(f==null||f(S),S.defaultPrevented||e)return;const A=p.current;!A||ue()||Xe(A,{pointerInside:b.current})},[e,f]);return{setRefs:g,titleLiftRef:p,bindChevronRef:h,handleClick:x,handleKeyDown:C,handlePointerEnter:_,handlePointerLeave:v,handlePointerDown:y,mergeRefs:kq}}const eh=.38,i8=.45,a8=-.45;function l8(t){return t.getBoundingClientRect().height}function c8(t,e,n){if(!t||n<=0)return;const r=Math.min(Math.max(e/n,0),1);X.set(t,{rotation:r*180})}function u8(t,e,n,r,o,s,i){return{onPointerDown:l.useCallback(c=>{if(s)return;const u=t.current,f=e.current;if(!u||!f||ue())return;c.preventDefault();const m=Fi(f);if(m<=0)return;const p=c.currentTarget;p.setPointerCapture(c.pointerId);const b=c.clientY,g=l8(u);let h=b,x=performance.now(),C=0;z(u,n.current),u.style.overflow="hidden",u.style.willChange="height";const _=y=>{if(y.pointerId!==c.pointerId)return;const S=y.clientY,A=S-b,E=performance.now(),T=E-x;T>0&&(C=(S-h)/T),h=S,x=E;const L=Math.max(0,Math.min(m,g+A));u.style.height=`${L}px`,c8(n.current,L,m)},v=y=>{if(y.pointerId!==c.pointerId)return;p.releasePointerCapture(y.pointerId),p.removeEventListener("pointermove",_),p.removeEventListener("pointerup",v),p.removeEventListener("pointercancel",v);const A=y.clientY-b,T=Math.max(0,Math.min(m,g+A))/m,L={...ve(),overwrite:"auto"},w=T>=eh||C>i8,R=T<=1-eh||C<a8;if(z(u,n.current),!r&&w){const j=X.timeline({onComplete:()=>{u.style.willChange="",u.style.height="auto",u.style.overflow="",i&&(i.current=!0),o(!0)}});j.to(u,{height:m,...L},0),n.current&&j.to(n.current,{rotation:180,...L},0);return}if(r&&R){const j=X.timeline({onComplete:()=>{u.style.willChange="",u.style.height="0px",u.style.overflow="hidden",i&&(i.current=!0),o(!1)}});j.to(u,{height:0,...L},0),n.current&&j.to(n.current,{rotation:0,...L},0);return}const N=T>=.5,D=N?m:0,P=X.timeline({onComplete:()=>{u.style.willChange="",N?(u.style.height="auto",u.style.overflow=""):(u.style.height="0px",u.style.overflow="hidden"),i&&(i.current=!0),o(N)}});P.to(u,{height:D,...L},0),n.current&&P.to(n.current,{rotation:N?180:0,...L},0)};p.addEventListener("pointermove",_),p.addEventListener("pointerup",v),p.addEventListener("pointercancel",v)},[n,s,e,r,o,t,i])}}function nT({className:t,onPointerDown:e,...n}){const r=pm(),{variant:o,disabled:s,dragHandle:i,shellRef:a,innerRef:c,chevronRef:u,open:f,setOpen:m,skipContentAnimRef:p}=mm(),{onPointerDown:b}=u8(a,c,u,f,m,s,p);return!i||o!=="card"?null:d.jsx("div",{"aria-hidden":!0,className:Ct(Xq,s&&Yq,r.handle,t),onPointerDown:g=>{e==null||e(g),b(g)},...n,children:d.jsx("span",{className:Kq})})}nT.displayName="DisclosureHandle";const rT=l.forwardRef(function({children:e,className:n,...r},o){const s=pm(),{open:i,panelId:a,triggerId:c,size:u,variant:f,shellRef:m,innerRef:p,skipContentAnimRef:b}=mm();Ex(i,m,p,{skipAnimRef:b});const g=Ax(m,i),h=l.useCallback(_=>{g(_),typeof o=="function"?o(_):o&&(o.current=_)},[g,o]),x=e8(f),C=f==="gloss";return d.jsx("div",{ref:h,"aria-hidden":!i,className:Ct(Wq,s.contentShell),children:d.jsx("div",{ref:p,className:Ct(x,s.contentWrap),children:C?d.jsx("section",{id:a,"aria-labelledby":c,className:Ct(s.contentPanel,n),...r,children:d.jsx("div",{className:Ct(qq,s.glossPanel),children:d.jsx("div",{className:n8(u,s.glossContent),children:e})})}):d.jsx("section",{id:a,"aria-labelledby":c,className:t8({variant:f,size:u,className:n,slotClass:s.contentPanel}),...r,children:e})})})});rT.displayName="DisclosureContent";const oT=l.forwardRef(function({children:e,icon:n,asChild:r,className:o,onKeyDown:s,onClick:i,onPointerEnter:a,onPointerLeave:c,onPointerDown:u,...f},m){const p=pm(),{open:b,setOpen:g,triggerId:h,panelId:x,variant:C,size:_,disabled:v,iconPos:y,chevronRef:S,skipContentAnimRef:A}=mm(),E=tT(_),T=s8({open:b,disabled:v,setOpen:g,chevronRef:S,skipContentAnimRef:A,forwardedRef:m,onClick:i,onKeyDown:s,onPointerEnter:a,onPointerLeave:c,onPointerDown:u}),L=n!==null?d.jsx("span",{ref:T.bindChevronRef,"aria-hidden":!0,className:Ct(Uq,E.chevron,gn,b&&$q,p.triggerChevron),children:n??d.jsx(Re.IoChevronDown,{className:"size-full"})}):null;if(r&&l.isValidElement(e)){const w=e;return l.cloneElement(w,{...f,id:h,ref:T.mergeRefs(m,T.setRefs,w.props.ref),className:Ct(w.props.className,o),disabled:v||w.props.disabled,"aria-expanded":b,"aria-controls":x,onClick:R=>{var N,D;(D=(N=w.props).onClick)==null||D.call(N,R),T.handleClick(R)},onKeyDown:R=>{var N,D;(D=(N=w.props).onKeyDown)==null||D.call(N,R),T.handleKeyDown(R)}})}return d.jsxs("button",{ref:T.setRefs,id:h,type:"button","aria-expanded":b,"aria-controls":x,disabled:v,className:Jq({variant:C,size:_,disabled:v,className:o,slotClass:p.trigger}),onClick:T.handleClick,onKeyDown:T.handleKeyDown,onPointerEnter:T.handlePointerEnter,onPointerLeave:T.handlePointerLeave,onPointerDown:T.handlePointerDown,...f,children:[y==="left"&&L,d.jsx("span",{ref:T.titleLiftRef,className:Ct(zq,p.triggerTitleLift),children:d.jsx(ee,{as:"span",variant:E.text,className:Ct(Vq,b?"text-primary":"text-foreground",p.triggerTitle),children:e})}),y==="right"&&L]})});oT.displayName="DisclosureTrigger";function d8(t){return`disclosure-trigger-${t}`}function f8(t){return`disclosure-panel-${t}`}function m8({children:t,open:e,defaultOpen:n=!1,onOpenChange:r,value:o,variant:s,size:i,disabled:a=!1,iconPos:c="right",dragHandle:u=!1}){const f=Nq(),m=f!==null&&o!==void 0&&f.accordion,p=m?f.openValue===o:void 0,[b,g]=l.useState(n),h=m?p:e!==void 0?e:b,x=l.useCallback(D=>{m?f.setOpenValue(D?o??null:null):(e===void 0&&g(D),r==null||r(D))},[m,f,o,e,r]),C=l.useId(),_=d8(C),v=f8(C),y=l.useRef(null),S=l.useRef(null),A=l.useRef(null),E=l.useRef(!1),T=s??(f==null?void 0:f.variant)??"default",L=i??(f==null?void 0:f.size)??"base",w=o8(f),R=l.useMemo(()=>({open:h,setOpen:x,triggerId:_,panelId:v,variant:T,size:L,disabled:a,iconPos:c,dragHandle:u,shellRef:y,innerRef:S,chevronRef:A,skipContentAnimRef:E}),[a,u,c,h,v,x,L,_,T]),N=u&&T==="card"?Bq(t):t;return{contextValue:R,variant:T,groupedCardShell:w,orderedChildren:N}}const sT=l.forwardRef(function({children:e,className:n,classNames:r,open:o,defaultOpen:s,onOpenChange:i,value:a,variant:c,size:u,disabled:f,iconPos:m,dragHandle:p,...b},g){const h=m8({children:e,open:o,defaultOpen:s,onOpenChange:i,value:a,variant:c,size:u,disabled:f,iconPos:m,dragHandle:p});return d.jsx(Dq,{value:h.contextValue,children:d.jsx(Jy,{classNames:r,children:d.jsx("div",{ref:g,className:Qq({variant:h.variant,groupedCardShell:h.groupedCardShell,className:n,slotClass:r==null?void 0:r.root}),...b,children:h.orderedChildren})})})});sT.displayName="Disclosure";function p8({accordion:t=!0,separated:e=!1,variant:n="default",size:r="base",value:o,defaultValue:s,onValueChange:i}){const a=o!==void 0,[c,u]=l.useState(s??null),f=a?o:c,m=l.useCallback(b=>{const g=t&&b===f?null:b;a||u(g),i==null||i(g)},[t,a,i,f]);return{contextValue:l.useMemo(()=>({openValue:f,setOpenValue:m,variant:n,size:r,separated:e,accordion:t}),[t,f,m,n,r,e]),separated:e,variant:n}}const iT=l.forwardRef(function({children:e,accordion:n,separated:r,variant:o,size:s,value:i,defaultValue:a,onValueChange:c,className:u,classNames:f,...m},p){const b=p8({accordion:n,separated:r,variant:o,size:s,value:i,defaultValue:a,onValueChange:c});return d.jsx(Iq,{value:b.contextValue,children:d.jsx(Jy,{classNames:f,children:d.jsx("div",{ref:p,className:r8({separated:b.separated,variant:b.variant,className:u,slotClass:f==null?void 0:f.group}),...m,children:e})})})});iT.displayName="DisclosureGroup";const h8=Object.assign(sT,{Trigger:oT,Handle:nT,Content:rT}),g8={convergeRipplePrimaryFill:"color-mix(in oklab, var(--color-primary-foreground) 38%, transparent)",convergeRippleNeutral:"var(--color-primary-tint-strong)",convergeRippleNeutralMuted:"color-mix(in oklab, var(--color-primary) 14%, transparent)",convergeRippleDanger:"color-mix(in oklab, var(--color-danger-foreground) 38%, transparent)",convergeRippleSuccess:"color-mix(in oklab, var(--color-success-foreground) 38%, transparent)",convergeRippleInfo:"color-mix(in oklab, var(--color-info-foreground) 38%, transparent)",convergeRippleWarning:"color-mix(in oklab, var(--color-warning-foreground) 38%, transparent)"},b8={convergeRipplePrimaryFill:"color-mix(in oklab, var(--color-primary-foreground) 52%, var(--color-primary))",convergeRippleNeutral:"var(--color-primary-tint-strong)",convergeRippleNeutralMuted:"color-mix(in oklab, var(--color-primary) 14%, transparent)",convergeRippleDanger:"color-mix(in oklab, var(--color-danger-foreground) 38%, transparent)",convergeRippleSuccess:"color-mix(in oklab, var(--color-success-foreground) 38%, transparent)",convergeRippleInfo:"color-mix(in oklab, var(--color-info-foreground) 38%, transparent)",convergeRippleWarning:"color-mix(in oklab, var(--color-warning-foreground) 38%, transparent)"},aT={background:"#0c0d10",surface:"#171717",secondary:"color-mix(in oklab, var(--color-foreground) 12%, var(--color-surface))",secondaryForeground:"var(--color-foreground)",tertiary:"color-mix(in oklab, var(--color-foreground) 24%, var(--color-surface))",tertiaryForeground:"var(--color-foreground)",border:"color-mix(in oklab, var(--color-foreground) 12%, transparent)",foreground:"#f4f5f7",muted:"#858994",primary:"#ebebef",primaryForeground:"#0c0c0e",primaryTint:"color-mix(in oklab, var(--color-primary) 20%, transparent)",primaryTintStrong:"color-mix(in oklab, var(--color-primary) 25%, transparent)",focusRing:"#ebebef",indicator:"#ebebef",indicatorForeground:"#0c0c0e",danger:"#e34848",success:"#22c55e",info:"#0ea5e9",warning:"#f59e0b",dangerForeground:"#fafafa",successForeground:"#fafafa",infoForeground:"#fafafa",warningForeground:"#0c0c0e",primaryHover:"color-mix(in oklab, var(--color-primary) 80%, var(--color-surface))",defaultHover:"color-mix(in oklab, var(--color-foreground) 8%, var(--color-surface))",secondaryHover:"color-mix(in oklab, var(--color-foreground) 6%, var(--color-secondary))",tertiaryHover:"color-mix(in oklab, var(--color-foreground) 6%, var(--color-tertiary))",surfaceTintDanger:"color-mix(in oklab, var(--color-danger) 30%, black)",surfaceTintDangerHover:"color-mix(in oklab, var(--color-danger) 40%, black)",dangerFillHover:"color-mix(in oklab, var(--color-danger) 90%, black)",surfaceTintSuccess:"color-mix(in oklab, var(--color-success) 30%, black)",surfaceTintSuccessHover:"color-mix(in oklab, var(--color-success) 40%, black)",successFillHover:"color-mix(in oklab, var(--color-success) 90%, black)",surfaceTintInfo:"color-mix(in oklab, var(--color-info) 30%, black)",surfaceTintInfoHover:"color-mix(in oklab, var(--color-info) 40%, black)",infoFillHover:"color-mix(in oklab, var(--color-info) 90%, black)",surfaceTintWarning:"color-mix(in oklab, var(--color-warning) 30%, black)",surfaceTintWarningHover:"color-mix(in oklab, var(--color-warning) 40%, black)",warningFillHover:"color-mix(in oklab, var(--color-warning) 90%, black)",...g8},lT={background:"#f5f5f5",surface:"#ffffff",secondary:"color-mix(in oklab, var(--color-foreground) 12%, var(--color-surface))",secondaryForeground:"var(--color-foreground)",tertiary:"color-mix(in oklab, var(--color-foreground) 24%, var(--color-surface))",tertiaryForeground:"var(--color-foreground)",border:"color-mix(in oklab, var(--color-foreground) 12%, transparent)",foreground:"#18181b",muted:"#646467",primary:"#18181b",primaryForeground:"#fafafa",primaryTint:"color-mix(in oklab, var(--color-primary) 20%, transparent)",primaryTintStrong:"color-mix(in oklab, var(--color-primary) 25%, transparent)",focusRing:"#18181b",indicator:"#18181b",indicatorForeground:"#fafafa",danger:"#dc2626",success:"#22c55e",info:"#0ea5e9",warning:"#f59e0b",dangerForeground:"#ffffff",successForeground:"#ffffff",infoForeground:"#ffffff",warningForeground:"#0c0c0e",primaryHover:"color-mix(in oklab, var(--color-primary) 90%, var(--color-surface))",defaultHover:"color-mix(in oklab, var(--color-foreground) 8%, var(--color-surface))",secondaryHover:"color-mix(in oklab, var(--color-foreground) 6%, var(--color-secondary))",tertiaryHover:"color-mix(in oklab, var(--color-foreground) 6%, var(--color-tertiary))",surfaceTintDanger:"color-mix(in oklab, var(--color-danger) 14%, white)",surfaceTintDangerHover:"color-mix(in oklab, var(--color-danger) 22%, white)",dangerFillHover:"color-mix(in oklab, var(--color-danger) 90%, black)",surfaceTintSuccess:"color-mix(in oklab, var(--color-success) 14%, white)",surfaceTintSuccessHover:"color-mix(in oklab, var(--color-success) 22%, white)",successFillHover:"color-mix(in oklab, var(--color-success) 90%, black)",surfaceTintInfo:"color-mix(in oklab, var(--color-info) 15%, white)",surfaceTintInfoHover:"color-mix(in oklab, var(--color-info) 22%, white)",infoFillHover:"color-mix(in oklab, var(--color-info) 90%, black)",surfaceTintWarning:"color-mix(in oklab, var(--color-warning) 14%, white)",surfaceTintWarningHover:"color-mix(in oklab, var(--color-warning) 22%, white)",warningFillHover:"color-mix(in oklab, var(--color-warning) 90%, black)",...b8},Ka={background:"--color-background",surface:"--color-surface",secondary:"--color-secondary",secondaryForeground:"--color-secondary-foreground",tertiary:"--color-tertiary",tertiaryForeground:"--color-tertiary-foreground",border:"--color-border",foreground:"--color-foreground",muted:"--color-muted",primary:"--color-primary",primaryForeground:"--color-primary-foreground",primaryTint:"--color-primary-tint",primaryTintStrong:"--color-primary-tint-strong",focusRing:"--color-focus-ring",indicator:"--color-indicator",indicatorForeground:"--color-indicator-foreground",danger:"--color-danger",success:"--color-success",info:"--color-info",warning:"--color-warning",dangerForeground:"--color-danger-foreground",successForeground:"--color-success-foreground",infoForeground:"--color-info-foreground",warningForeground:"--color-warning-foreground",primaryHover:"--color-primary-hover",defaultHover:"--color-default-hover",secondaryHover:"--color-secondary-hover",tertiaryHover:"--color-tertiary-hover",surfaceTintDanger:"--color-surface-tint-danger",surfaceTintDangerHover:"--color-surface-tint-danger-hover",dangerFillHover:"--color-danger-fill-hover",surfaceTintSuccess:"--color-surface-tint-success",surfaceTintSuccessHover:"--color-surface-tint-success-hover",successFillHover:"--color-success-fill-hover",surfaceTintInfo:"--color-surface-tint-info",surfaceTintInfoHover:"--color-surface-tint-info-hover",infoFillHover:"--color-info-fill-hover",surfaceTintWarning:"--color-surface-tint-warning",surfaceTintWarningHover:"--color-surface-tint-warning-hover",warningFillHover:"--color-warning-fill-hover",convergeRipplePrimaryFill:"--color-converge-ripple-primary-fill",convergeRippleNeutral:"--color-converge-ripple-neutral",convergeRippleNeutralMuted:"--color-converge-ripple-neutral-muted",convergeRippleDanger:"--color-converge-ripple-danger",convergeRippleSuccess:"--color-converge-ripple-success",convergeRippleInfo:"--color-converge-ripple-info",convergeRippleWarning:"--color-converge-ripple-warning"},cT={space:.5,size:1,radius:.5,borderWidth:1,textScale:1,shadowStrength:1,shadowSize:1,toastScrimSize:1,toastScrimDensity:1},uT={interactiveDuration:280,interactiveEase:"power2.out",hoverLiftEase:"sine.inOut",tooltipDuration:200,switchThumbDuration:340,switchThumbEase:"back.out(1.4)",selectionFillDuration:200,selectionFillEase:"back.out(1.25)",hoverLiftScale:1.025,badgeAnchorHoverLiftScale:1.052,pressSqueezeMid:.98,rippleDefaultDuration:700,rippleDefaultOpacityFrom:.42,rippleExpandableDuration:700,rippleExpandableOpacityFrom:.34,rippleEaseCss:"cubic-bezier(0.25, 0.55, 0.35, 0.95)",feedbackExpandDuration:720,expandDuration:200,expandOpenEase:"sine.inOut",progressFillDuration:600,progressFillEase:"power2.out",loadingDotsDuration:900,loadingDotsEaseUp:"power2.out",loadingDotsEaseDown:"power2.in",enableHoverLift:!0,enablePressSqueeze:!0,enableToggleButtonFill:!0,enableRipple:!0,enableExpandable:!0,enableToastStack:!0,enableAsyncButtonCrossfade:!0,enableContentFade:!0,enableFeedbackExpand:!0,enableProgressFill:!0,enableLoadingDots:!0},dT='ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',fT="ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",Qi={tools:{size:.6875,line:.875},xsmall:{size:.75,line:1},small:{size:.875,line:1.25},base:{size:1,line:1.5},mid:{size:1.125,line:1.75},large:{size:1.25,line:1.75},xlarge:{size:1.5,line:2},"2xlarge":{size:1.875,line:2.25},"3xlarge":{size:2.25,line:2.5}},x8={dark:{base:.15,mid:.2,large:.24},light:{base:.08,mid:.12,large:.16}},C8={base:[[0,2,4,-2]],mid:[[0,4,10,-6]],large:[[0,8,20,-12]]};function _8(t,e,n,r,o,s){const i=a=>a===0?"0":`${a*s}px`;return`${i(t)} ${i(e)} ${i(n)} ${i(r)} rgb(0 0 0 / ${o})`}function di(t,e,n,r){const o=x8[e][t]*n,[s,i,a,c]=C8[t][0];return _8(s,i,a,c,o,r)}function S8(t,e,n,r){t.style.setProperty("--shadow-size",String(r)),t.style.setProperty("--shadow-none",di("base",e,0,r)),t.style.setProperty("--shadow-base",di("base",e,n,r)),t.style.setProperty("--shadow-mid",di("mid",e,n,r)),t.style.setProperty("--shadow-large",di("large",e,n,r))}function v8(t,e){for(const n of Object.keys(Qi)){const{size:r,line:o}=Qi[n],s=r*e,i=o*e;t.style.setProperty(`--text-scale-${n}`,`${s}rem`),t.style.setProperty(`--text-scale-${n}--line-height`,`calc(${i}rem / ${s}rem)`)}}function y8(t,e){for(const[n,r]of Object.entries(ia))t.style.setProperty(r,String(e[n]))}function mT(){return{dark:{...aT},light:{...lT}}}function qa(t){var r,o;if((r=t.modePalettes)!=null&&r.dark&&((o=t.modePalettes)!=null&&o.light))return t;const e=mT(),n={...t.colors};return{...t,modePalettes:{dark:t.theme==="dark"?n:e.dark,light:t.theme==="light"?n:e.light}}}function T8(t,e){const n=qa(t),r=n.modePalettes[e];return{...n,theme:e,colors:{...r}}}function A8(t,e,n){const r=qa(t),o={...r.colors,[e]:n};return{...r,colors:o,modePalettes:{...r.modePalettes,[r.theme]:o}}}function wo(t="dark"){const e=mT(),n=e[t];return{theme:t,...cT,...uT,fontFamily:dT,fontFamilyMono:fT,fontWeights:{...Lg},colors:{...n},modePalettes:e}}const E8=["--space","--size","--radius","--border-width","--font-family-sans","--font-family-mono",...Object.values(ia),"--shadow-size","--shadow-none","--shadow-base","--shadow-mid","--shadow-large","--toast-scrim-size","--toast-scrim-density",...Object.keys(Qi).flatMap(t=>[`--text-scale-${t}`,`--text-scale-${t}--line-height`]),...Object.values(Ka)];function Pc(t=document.documentElement){for(const e of E8)t.style.removeProperty(e);delete t.dataset.theme}let th="";function L8(t){const e=JSON.stringify({interactiveDuration:t.interactiveDuration,interactiveEase:t.interactiveEase,hoverLiftEase:t.hoverLiftEase,tooltipDuration:t.tooltipDuration,switchThumbDuration:t.switchThumbDuration,switchThumbEase:t.switchThumbEase,selectionFillDuration:t.selectionFillDuration,selectionFillEase:t.selectionFillEase,hoverLiftScale:t.hoverLiftScale,badgeAnchorHoverLiftScale:t.badgeAnchorHoverLiftScale,pressSqueezeMid:t.pressSqueezeMid,rippleDefaultDuration:t.rippleDefaultDuration,rippleDefaultOpacityFrom:t.rippleDefaultOpacityFrom,rippleExpandableDuration:t.rippleExpandableDuration,rippleExpandableOpacityFrom:t.rippleExpandableOpacityFrom,rippleEaseCss:t.rippleEaseCss,feedbackExpandDuration:t.feedbackExpandDuration,expandDuration:t.expandDuration,expandOpenEase:t.expandOpenEase,progressFillDuration:t.progressFillDuration,progressFillEase:t.progressFillEase,loadingDotsDuration:t.loadingDotsDuration,loadingDotsEaseUp:t.loadingDotsEaseUp,loadingDotsEaseDown:t.loadingDotsEaseDown,enableHoverLift:t.enableHoverLift,enablePressSqueeze:t.enablePressSqueeze,enableToggleButtonFill:t.enableToggleButtonFill,enableRipple:t.enableRipple,enableExpandable:t.enableExpandable,enableToastStack:t.enableToastStack,enableAsyncButtonCrossfade:t.enableAsyncButtonCrossfade,enableContentFade:t.enableContentFade,enableFeedbackExpand:t.enableFeedbackExpand,enableProgressFill:t.enableProgressFill,enableLoadingDots:t.enableLoadingDots});e!==th&&(th=e,_g({interactiveDuration:t.interactiveDuration,interactiveEase:t.interactiveEase,hoverLiftEase:t.hoverLiftEase,tooltipDuration:t.tooltipDuration,switchThumbDuration:t.switchThumbDuration,switchThumbEase:t.switchThumbEase,selectionFillDuration:t.selectionFillDuration,selectionFillEase:t.selectionFillEase,hoverLiftScale:t.hoverLiftScale,badgeAnchorHoverLiftScale:t.badgeAnchorHoverLiftScale,pressSqueezeScale:[1,t.pressSqueezeMid,1],rippleDefaultDuration:t.rippleDefaultDuration,rippleDefaultOpacityFrom:t.rippleDefaultOpacityFrom,rippleExpandableDuration:t.rippleExpandableDuration,rippleExpandableOpacityFrom:t.rippleExpandableOpacityFrom,rippleEaseCss:t.rippleEaseCss,feedbackExpandDuration:t.feedbackExpandDuration,expandDuration:t.expandDuration,expandOpenEase:t.expandOpenEase,progressFillDuration:t.progressFillDuration,progressFillEase:t.progressFillEase,loadingDotsDuration:t.loadingDotsDuration,loadingDotsEaseUp:t.loadingDotsEaseUp,loadingDotsEaseDown:t.loadingDotsEaseDown,enableHoverLift:t.enableHoverLift,enablePressSqueeze:t.enablePressSqueeze,enableToggleButtonFill:t.enableToggleButtonFill,enableRipple:t.enableRipple,enableExpandable:t.enableExpandable,enableToastStack:t.enableToastStack,enableAsyncButtonCrossfade:t.enableAsyncButtonCrossfade,enableContentFade:t.enableContentFade,enableFeedbackExpand:t.enableFeedbackExpand,enableProgressFill:t.enableProgressFill,enableLoadingDots:t.enableLoadingDots}))}function Ji(t,e=document.documentElement){t.theme==="light"?e.dataset.theme="light":delete e.dataset.theme,e.style.setProperty("--space",`${t.space}rem`),e.style.setProperty("--size",`${t.size}rem`),e.style.setProperty("--radius",`${t.radius}rem`),e.style.setProperty("--border-width",t.borderWidth===0?"0px":`${t.borderWidth}px`),e.style.setProperty("--font-family-sans",t.fontFamily),e.style.setProperty("--font-family-mono",t.fontFamilyMono),y8(e,t.fontWeights),L8(t),v8(e,t.textScale),S8(e,t.theme,t.shadowStrength,t.shadowSize),e.style.setProperty("--toast-scrim-size",String(t.toastScrimSize)),e.style.setProperty("--toast-scrim-density",String(t.toastScrimDensity));for(const[n,r]of Object.entries(Ka))e.style.setProperty(r,t.colors[n])}function pT(t){const e=[":root {",` --space: ${t.space}rem;`,` --size: ${t.size}rem;`,` --radius: ${t.radius}rem;`,` --border-width: ${t.borderWidth===0?"0px":`${t.borderWidth}px`};`,` --font-family-sans: ${t.fontFamily};`,` --font-family-mono: ${t.fontFamilyMono};`,...Object.entries(ia).map(([n,r])=>` ${r}: ${t.fontWeights[n]};`),` --shadow-size: ${t.shadowSize};`,` --toast-scrim-size: ${t.toastScrimSize};`,` --toast-scrim-density: ${t.toastScrimDensity};`,` /* textScale: ${t.textScale} — set --text-scale-* manually or via applyThemeTokens */`,` /* shadowStrength: ${t.shadowStrength}, shadowSize: ${t.shadowSize} */`,` /* toastScrimSize: ${t.toastScrimSize}, toastScrimDensity: ${t.toastScrimDensity} */`];for(const[n,r]of Object.entries(Ka))e.push(` ${r}: ${t.colors[n]};`);return e.push("}"),t.theme==="light"&&(e.push("","/* Optional: light theme via data-attribute */"),e.push('/* <html data-theme="light"> */')),e.join(`
|
|
38
|
+
`)}function hm(t,e){var a;const n=wo(e),r=t.tokens??{},o=(a=t.colors)==null?void 0:a[e],s=o?{...n.colors,...o}:n.colors,i=r.shadowStrength??n.shadowStrength;return{...n,...xT({space:r.space,size:r.size,radius:r.radius,borderWidth:r.borderWidth,textScale:r.textScale,fontFamily:r.fontFamily,fontFamilyMono:r.fontFamilyMono,shadowSize:r.shadowSize,toastScrimSize:r.toastScrimSize,toastScrimDensity:r.toastScrimDensity}),shadowStrength:i,fontWeights:r.fontWeights?{...n.fontWeights,...r.fontWeights}:n.fontWeights,colors:s,modePalettes:{...n.modePalettes,[e]:{...s}}}}function hT(t){const e=qa(t),n={interactiveDuration:e.interactiveDuration,interactiveEase:e.interactiveEase,hoverLiftEase:e.hoverLiftEase,tooltipDuration:e.tooltipDuration,switchThumbDuration:e.switchThumbDuration,switchThumbEase:e.switchThumbEase,selectionFillDuration:e.selectionFillDuration,selectionFillEase:e.selectionFillEase,hoverLiftScale:e.hoverLiftScale,badgeAnchorHoverLiftScale:e.badgeAnchorHoverLiftScale,pressSqueezeScale:[1,e.pressSqueezeMid,1],rippleDefaultDuration:e.rippleDefaultDuration,rippleDefaultOpacityFrom:e.rippleDefaultOpacityFrom,rippleExpandableDuration:e.rippleExpandableDuration,rippleExpandableOpacityFrom:e.rippleExpandableOpacityFrom,rippleEaseCss:e.rippleEaseCss,feedbackExpandDuration:e.feedbackExpandDuration,expandDuration:e.expandDuration,expandOpenEase:e.expandOpenEase,progressFillDuration:e.progressFillDuration,progressFillEase:e.progressFillEase,loadingDotsDuration:e.loadingDotsDuration,loadingDotsEaseUp:e.loadingDotsEaseUp,loadingDotsEaseDown:e.loadingDotsEaseDown,enableHoverLift:e.enableHoverLift,enablePressSqueeze:e.enablePressSqueeze,enableToggleButtonFill:e.enableToggleButtonFill,enableRipple:e.enableRipple,enableExpandable:e.enableExpandable,enableToastStack:e.enableToastStack,enableAsyncButtonCrossfade:e.enableAsyncButtonCrossfade,enableContentFade:e.enableContentFade,enableFeedbackExpand:e.enableFeedbackExpand,enableProgressFill:e.enableProgressFill,enableLoadingDots:e.enableLoadingDots},r={space:e.space,size:e.size,radius:e.radius,borderWidth:e.borderWidth,textScale:e.textScale,fontFamily:e.fontFamily,fontFamilyMono:e.fontFamilyMono,fontWeights:{...e.fontWeights},shadowStrength:e.shadowStrength,shadowSize:e.shadowSize,toastScrimSize:e.toastScrimSize,toastScrimDensity:e.toastScrimDensity};return{theme:e.theme,tokens:r,colors:{dark:{...e.modePalettes.dark},light:{...e.modePalettes.light}},motion:n,toast:!0}}function w8(t,e){var r;if(typeof t=="string"||typeof t=="number"||typeof t=="boolean")return{value:t};const n=((r=t.values)==null?void 0:r[e])??t.value;return n===void 0?null:{value:n,unit:t.unit}}function gm(t,e){const n={};if(!t)return n;for(const[r,o]of Object.entries(t)){const s=w8(o,e);s&&(n[r]=typeof s.value=="number"&&s.unit?`${s.value}${s.unit}`:String(s.value))}return n}const ea=new WeakMap;function gT(t,e,n){const r=gm(t,n),o=new Set(Object.keys(r)),s=ea.get(e)??new Map;s.forEach((i,a)=>{o.has(a)||(i.value?e.style.setProperty(a,i.value,i.priority):e.style.removeProperty(a),s.delete(a))});for(const[i,a]of Object.entries(r))s.has(i)||s.set(i,{value:e.style.getPropertyValue(i),priority:e.style.getPropertyPriority(i)}),e.style.setProperty(i,a);ea.set(e,s)}function Bc(t=document.documentElement){var e;(e=ea.get(t))==null||e.forEach((n,r)=>{n.value?t.style.setProperty(r,n.value,n.priority):t.style.removeProperty(r)}),ea.delete(t)}function bT(t){return{...hT(wo((t==null?void 0:t.theme)??"dark")),storageKey:(t==null?void 0:t.storageKey)===void 0?"burne-ui-theme":t.storageKey}}function R8(t){const e=(t==null?void 0:t.exportName)??"burneTheme",n=ta(bT(),0);return["/**"," * Burne UI theme config (starter snapshot)."," *"," * - Edit `tokens` / `motion` (shared), `colors.light` / `colors.dark`,"," * and optional `customTokens` for project-specific CSS variables."," * - Or replace this file with docs site → Copy config."," *",' * import { BurneUIProvider } from "burne-ui";',` * import ${e} from "./burne-theme";`,` * <BurneUIProvider config={${e}}>{children}</BurneUIProvider>`," */",'import type { BurneThemeConfig } from "burne-ui";',"",`const ${e} = ${n} satisfies BurneThemeConfig;`,"",`export default ${e};`,""].join(`
|
|
39
|
+
`)}function I8(t,e="dark"){const n=wo(e);return t?{...n,...xT({space:t.space,size:t.size,radius:t.radius,borderWidth:t.borderWidth,textScale:t.textScale,fontFamily:t.fontFamily,fontFamilyMono:t.fontFamilyMono,shadowStrength:t.shadowStrength,shadowSize:t.shadowSize,toastScrimSize:t.toastScrimSize,toastScrimDensity:t.toastScrimDensity}),fontWeights:t.fontWeights?{...n.fontWeights,...t.fontWeights}:n.fontWeights}:n}function xT(t){const e={};for(const[n,r]of Object.entries(t))r!==void 0&&(e[n]=r);return e}function bm(t,e=document.documentElement,n=Za(t.theme)){const r=hm(t,n);if(t.motion){const o=t.motion;o.interactiveDuration!==void 0&&(r.interactiveDuration=o.interactiveDuration),o.interactiveEase!==void 0&&(r.interactiveEase=o.interactiveEase),o.hoverLiftEase!==void 0&&(r.hoverLiftEase=o.hoverLiftEase),o.tooltipDuration!==void 0&&(r.tooltipDuration=o.tooltipDuration),o.switchThumbDuration!==void 0&&(r.switchThumbDuration=o.switchThumbDuration),o.switchThumbEase!==void 0&&(r.switchThumbEase=o.switchThumbEase),o.selectionFillDuration!==void 0&&(r.selectionFillDuration=o.selectionFillDuration),o.selectionFillEase!==void 0&&(r.selectionFillEase=o.selectionFillEase),o.hoverLiftScale!==void 0&&(r.hoverLiftScale=o.hoverLiftScale),o.badgeAnchorHoverLiftScale!==void 0&&(r.badgeAnchorHoverLiftScale=o.badgeAnchorHoverLiftScale),o.pressSqueezeScale!==void 0&&(r.pressSqueezeMid=o.pressSqueezeScale[1]),o.rippleDefaultDuration!==void 0&&(r.rippleDefaultDuration=o.rippleDefaultDuration),o.rippleDefaultOpacityFrom!==void 0&&(r.rippleDefaultOpacityFrom=o.rippleDefaultOpacityFrom),o.rippleExpandableDuration!==void 0&&(r.rippleExpandableDuration=o.rippleExpandableDuration),o.rippleExpandableOpacityFrom!==void 0&&(r.rippleExpandableOpacityFrom=o.rippleExpandableOpacityFrom),o.rippleEaseCss!==void 0&&(r.rippleEaseCss=o.rippleEaseCss),o.feedbackExpandDuration!==void 0&&(r.feedbackExpandDuration=o.feedbackExpandDuration),o.expandDuration!==void 0&&(r.expandDuration=o.expandDuration),o.expandOpenEase!==void 0&&(r.expandOpenEase=o.expandOpenEase),o.progressFillDuration!==void 0&&(r.progressFillDuration=o.progressFillDuration),o.progressFillEase!==void 0&&(r.progressFillEase=o.progressFillEase),o.loadingDotsDuration!==void 0&&(r.loadingDotsDuration=o.loadingDotsDuration),o.loadingDotsEaseUp!==void 0&&(r.loadingDotsEaseUp=o.loadingDotsEaseUp),o.loadingDotsEaseDown!==void 0&&(r.loadingDotsEaseDown=o.loadingDotsEaseDown),o.enableHoverLift!==void 0&&(r.enableHoverLift=o.enableHoverLift),o.enablePressSqueeze!==void 0&&(r.enablePressSqueeze=o.enablePressSqueeze),o.enableToggleButtonFill!==void 0&&(r.enableToggleButtonFill=o.enableToggleButtonFill),o.enableRipple!==void 0&&(r.enableRipple=o.enableRipple),o.enableExpandable!==void 0&&(r.enableExpandable=o.enableExpandable),o.enableToastStack!==void 0&&(r.enableToastStack=o.enableToastStack),o.enableAsyncButtonCrossfade!==void 0&&(r.enableAsyncButtonCrossfade=o.enableAsyncButtonCrossfade),o.enableContentFade!==void 0&&(r.enableContentFade=o.enableContentFade),o.enableFeedbackExpand!==void 0&&(r.enableFeedbackExpand=o.enableFeedbackExpand),o.enableProgressFill!==void 0&&(r.enableProgressFill=o.enableProgressFill),o.enableLoadingDots!==void 0&&(r.enableLoadingDots=o.enableLoadingDots)}Ji(r,e),gT(t.customTokens,e,n)}function Za(t="system"){return t==="light"||t==="dark"?t:typeof window<"u"&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"}function N8(t,e=document.documentElement,n="dark"){bm({theme:n,tokens:t},e,n)}function D8(t){const e=Za(t.theme),n=hm(t,e),r=pT(n),o=gm(t.customTokens,e),s=Object.entries(o);if(s.length===0)return r;const i=s.map(([a,c])=>` ${a}: ${c};`).join(`
|
|
40
40
|
`);return r.replace(/\n}(\n|$)/,`
|
|
41
41
|
/* Custom project tokens */
|
|
42
42
|
${i}
|
|
@@ -44,7 +44,7 @@ ${i}
|
|
|
44
44
|
${t.map(s=>`${r}${ta(s,e+1)}`).join(`,
|
|
45
45
|
`)},
|
|
46
46
|
${n}]`;if(typeof t=="object"){const o=Object.entries(t).filter(([,i])=>i!==void 0);return o.length===0?"{}":`{
|
|
47
|
-
${o.map(([i,a])=>`${r}${
|
|
47
|
+
${o.map(([i,a])=>`${r}${k8(i)}: ${ta(a,e+1)}`).join(`,
|
|
48
48
|
`)},
|
|
49
|
-
${n}}`}return JSON.stringify(t)}function
|
|
50
|
-
`)}const
|
|
49
|
+
${n}}`}return JSON.stringify(t)}function k8(t){return/^[A-Za-z_$][\w$]*$/.test(t)?t:JSON.stringify(t)}function O8(t,e){const n=(e==null?void 0:e.exportName)??"burneTheme",r=ta(t,0);return["/**"," * Generated from the Burne UI theme playground."," * Save as `burne-theme.ts` and pass to BurneUIProvider:"," *",' * import { BurneUIProvider } from "burne-ui";',` * import ${n} from "./burne-theme";`," *",` * <BurneUIProvider config={${n}}>{children}</BurneUIProvider>`," *"," * `tokens` / `motion` are shared; `colors.light` / `colors.dark` hold palettes."," * Project-specific CSS variables and editor metadata live in `customTokens`."," */",'import type { BurneThemeConfig } from "burne-ui";',"",`const ${n} = ${r} satisfies BurneThemeConfig;`,"",`export default ${n};`,""].join(`
|
|
50
|
+
`)}const xm=l.createContext(null),P8="burne-ui-theme";function B8(t){if(!t||typeof window>"u")return null;try{const e=window.localStorage.getItem(t);if(e==="light"||e==="dark"||e==="system")return e}catch{}return null}function j8(t,e){if(!(!t||typeof window>"u"))try{window.localStorage.setItem(t,e)}catch{}}function Cm(t,e=document.documentElement){t==="light"?e.dataset.theme="light":delete e.dataset.theme}function CT({children:t,theme:e,defaultTheme:n="dark",storageKey:r=P8,root:o=null,onThemeChange:s}){const[i,a]=l.useState(()=>B8(r)??n),[c,u]=l.useState(0),f=e??i,m=l.useMemo(()=>Za(f),[f,c]),p=l.useCallback(g=>{e===void 0&&a(g),j8(r,g),s==null||s(g)},[e,r,s]);l.useLayoutEffect(()=>{const g=o??(typeof document<"u"?document.documentElement:null);g&&Cm(m,g)},[m,o]),l.useEffect(()=>{if(f!=="system"||typeof window>"u")return;const g=window.matchMedia("(prefers-color-scheme: light)"),h=()=>{u(x=>x+1)};return g.addEventListener("change",h),()=>g.removeEventListener("change",h)},[f]);const b=l.useMemo(()=>({theme:f,resolvedTheme:m,setTheme:p}),[f,m,p]);return l.createElement(xm.Provider,{value:b},t)}function _T(){const t=l.useContext(xm);if(!t)throw new Error("useBurneTheme must be used within ThemeProvider or BurneUIProvider.");return t}function M8(){return l.useContext(xm)}const _m=l.createContext(null);function F8({children:t,value:e}){return l.createElement(_m.Provider,{value:e},t)}function G8(){const t=l.useContext(_m);if(!t)throw new Error("useBurneThemeRuntime must be used within BurneUIProvider.");return t}function H8(){return l.useContext(_m)}function z8(t){const{config:e,theme:n,tokens:r,customTokens:o,motion:s,toast:i,storageKey:a}=t;return{theme:n??(e==null?void 0:e.theme)??"dark",storageKey:a!==void 0?a:(e==null?void 0:e.storageKey)??"burne-ui-theme",tokens:r??(e==null?void 0:e.tokens),colors:e==null?void 0:e.colors,customTokens:o??(e==null?void 0:e.customTokens),motion:s??(e==null?void 0:e.motion),toast:i!==void 0?i:(e==null?void 0:e.toast)??!0}}function V8({children:t,resolvedConfig:e,root:n}){const{resolvedTheme:r}=_T(),[o,s]=l.useState(null),i=l.useRef(!1),a=l.useCallback(()=>s(null),[]),c=o??e;l.useLayoutEffect(()=>{if(!c.tokens&&!c.motion&&!c.colors&&!c.customTokens){if(i.current){const m=n??document.documentElement;Ji(wo(r),m),Pc(m),Bc(m),Cm(r,m),i.current=!1}return}const f=n??document.documentElement;bm(c,f,r),i.current=!0},[c,r,n]),l.useLayoutEffect(()=>{const f=n??document.documentElement;return()=>{i.current&&(Ji(wo(r),f),Pc(f),Bc(f),i.current=!1)}},[n,r]);const u=l.useMemo(()=>({baseConfig:e,config:c,previewConfig:o,resolvedTheme:r,setPreviewConfig:s,clearPreview:a}),[e,c,o,r,a]);return d.jsx(F8,{value:u,children:t})}function U8(t){const{children:e,config:n,theme:r,tokens:o,customTokens:s,motion:i,toast:a,storageKey:c,defaultTheme:u,root:f,onThemeChange:m}=t,p=l.useMemo(()=>z8({config:n,theme:r,tokens:o,customTokens:s,motion:i,toast:a,storageKey:c}),[n,r,o,s,i,a,c]),b=p.theme??"dark",g=p.storageKey===void 0?"burne-ui-theme":p.storageKey;let h=d.jsx(V8,{resolvedConfig:p,root:f,children:e});const x=p.toast??!0;if(x){const C=typeof x=="object"?x:{};h=d.jsx(y_.Provider,{...C,children:h})}return d.jsx(CT,{theme:r,defaultTheme:u??(b==="system"?"system":b),storageKey:g,root:f,onThemeChange:m,children:h})}exports.Accordion=IP;exports.Alert=xP;exports.AlertDialog=KB;exports.Avatar=wW;exports.AvatarGroup=Av;exports.Badge=HX;exports.Breadcrumbs=m5;exports.BurneUIProvider=U8;exports.Button=yo;exports.ButtonGroup=QP;exports.ButtonGroupText=vC;exports.COLOR_CSS_VAR=Ka;exports.COMPONENT_SIZES=TA;exports.CONTROL_SIZE_LAYOUT=le;exports.Calendar=EK;exports.Card=S$;exports.Checkbox=bH;exports.CheckboxGroup=$P;exports.CloseButton=Go;exports.ColorPicker=b4;exports.ColorSlider=x4;exports.ColorSliderTrack=Eo;exports.ColorSwatch=Ws;exports.ComboBox=Jb;exports.ConvergeRippleLayer=Ng;exports.DARK_COLORS=aT;exports.DEFAULT_FONT=dT;exports.DEFAULT_FONT_MONO=fT;exports.Dialog=nj;exports.Disclosure=h8;exports.DisclosureGroup=iT;exports.Drawer=sF;exports.Dropdown=Rr;exports.DropdownGroup=Qu;exports.DropdownItem=ad;exports.DropdownItemHint=sd;exports.DropdownItemIcon=id;exports.DropdownItemIndicator=xa;exports.DropdownItemLabel=od;exports.DropdownLabel=Ju;exports.DropdownPopover=Mi;exports.DropdownSeparator=ed;exports.DropdownSub=td;exports.DropdownSubContent=rd;exports.DropdownSubTrigger=nd;exports.DropdownTrigger=Zu;exports.EN_LOCALE=Iy;exports.Expandable=jn;exports.FIELD_SHELL_FOCUS_CLASS=Ur;exports.FIELD_SHELL_TRANSITION_CLASS=Vr;exports.FONT_WEIGHT_CSS_VAR=ia;exports.FONT_WEIGHT_DEFAULTS=Lg;exports.Field=Mw;exports.FieldLegend=Ts;exports.FieldLegendHeader=ca;exports.FieldSet=Wg;exports.FieldSetActions=jo;exports.FieldSetGroup=Fr;exports.Form=GP;exports.Input=mk;exports.Kbd=s3;exports.LIGHT_COLORS=lT;exports.Label=$e;exports.Link=wF;exports.LinkIcon=sf;exports.ListBox=wr;exports.Loading=Qd;exports.MOTION_DEFAULTS=uT;exports.Meter=rU;exports.Pagination=Z5;exports.Popover=kt;exports.ProgressBar=XU;exports.RIPPLE_COLOR=hi;exports.Radio=KH;exports.RadioGroup=KP;exports.Ripple=ys;exports.SCALE_DEFAULTS=cT;exports.SHADOW_CSS_VAR=Cs;exports.SHADOW_LIFT_MOTION_CLASS=ir;exports.SearchInput=fd;exports.Select=jG;exports.SelectionIndicator=Bt;exports.SelectionThumb=wa;exports.SelectionThumbIcon=Ra;exports.Separator=qu;exports.Skeleton=Rq;exports.Slider=Cz;exports.Surface=ey;exports.Switch=Zz;exports.TABLE_ROW_TONE_SURFACE=gy;exports.TEXT_SCALE_BASES=Qi;exports.TOAST_SCRIM_CSS_VAR=An;exports.TOAST_SCRIM_DEFAULTS=xA;exports.Table=tY;exports.Tabs=SV;exports.Text=ee;exports.TextArea=tG;exports.ThemeProvider=CT;exports.TimeField=lq;exports.TimeFieldControl=za;exports.TimeFieldError=Ua;exports.TimeFieldHint=Va;exports.Toast=y_;exports.ToastContext=Zd;exports.ToggleButton=OC;exports.ToggleButtonGroup=W1;exports.Tooltip=Si;exports.activateThemeModePalette=T8;exports.affixSlotClass=Rn;exports.affixToggleMinWClass=bh;exports.animateInteractiveHoverLift=pt;exports.animateInteractivePressSqueeze=Xe;exports.applyBurneThemeConfig=bm;exports.applyCustomThemeTokens=gT;exports.applyThemeMode=Cm;exports.applyThemeTokens=Ji;exports.applyTokens=N8;exports.burneFontWeightScale=j0;exports.burneShadowScale=gA;exports.buttonGroupTextFrameClass=gx;exports.buttonRippleTone=AL;exports.buttonRootClass=mu;exports.buttonSpinnerClass=Rg;exports.clearCustomThemeTokens=Bc;exports.clearThemeInlineTokens=Pc;exports.cn=I;exports.colorToken=_e;exports.configureMotion=_g;exports.controlShellClass=mL;exports.createConvergeRippleAtPointer=pu;exports.createConvergeRippleFromPointer=RL;exports.createDefaultBurneThemeConfig=bT;exports.createDefaultThemeState=wo;exports.designTokenNames=F0;exports.ensureModePalettes=qa;exports.ensureRippleEase=iu;exports.exportBurneThemeConfigSource=O8;exports.exportBurneThemeCss=D8;exports.exportDefaultBurneThemeConfigSource=R8;exports.exportThemeCss=pT;exports.fieldErrorId=Kt;exports.fieldHintId=Yt;exports.fieldShellHoverClass=zr;exports.firstLevelHoverShadow=Eg;exports.fontWeightToken=M0;exports.footerButtonSizeForAlertDialog=YC;exports.getMotionConfig=Se;exports.gsap=X;exports.hexToHsva=$s;exports.hexToRgba=Py;exports.hsvaToColorString=By;exports.hsvaToHex=Nc;exports.hsvaToRgba=Dr;exports.hueToRgbString=Zi;exports.initElementShadow=vs;exports.joinFieldDescribedBy=Ft;exports.killMotion=z;exports.mergeThemeTokenOverrides=I8;exports.patchThemeColor=A8;exports.prefersReducedInteractiveHoverLift=ue;exports.primaryButtonStatusForAlertTone=Q1;exports.primaryButtonVariantForAlertTone=Z1;exports.readControlHeightPx=Fc;exports.readShadowSize=C0;exports.resolveAlertLiveRole=Fx;exports.resolveAlertStatus=Ld;exports.resolveAlertVariant=Ed;exports.resolveCustomThemeTokens=gm;exports.resolveTheme=Za;exports.resolveThemeTokenState=hm;exports.rgbaToHex=Oy;exports.rgbaToHsva=ky;exports.secondLevelShadow=cu;exports.shadowBase=bn;exports.shadowLarge=x0;exports.shadowMid=vg;exports.shadowNone=_o;exports.shadowToken=bA;exports.shouldSkipInteractiveHoverLift=De;exports.sliderThicknessToCss=Vs;exports.themeTokenStateToConfig=hT;exports.toastScrimToken=En;exports.tokensConfig=CA;exports.useAlertDialog=Mn;exports.useBurneTheme=_T;exports.useBurneThemeOptional=M8;exports.useBurneThemeRuntime=G8;exports.useBurneThemeRuntimeOptional=H8;exports.useCalendar=ro;exports.useColorPicker=Ha;exports.useComboBoxContext=As;exports.useConvergeRipples=Dg;exports.useFieldSetErrorId=Eu;exports.useFieldSetHintId=Au;exports.useFieldShellHoverLift=Fo;exports.useFormField=DD;exports.useGSAP=sa;exports.useInteractiveHoverLiftContainerHandlers=Tg;exports.useListBox=Jg;exports.usePersistentElShadow=uu;exports.useSecondLevelShadow=Oo;exports.useSecondLevelShadowContainer=du;exports.useTabsContext=Oa;exports.useToast=tM;exports.useToastContext=b_;
|