burne-ui 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/core/Input/inputStyles.d.ts +0 -1
- package/dist/components/core/Input/inputTypes.d.ts +1 -1
- package/dist/components/core/SearchInput/SearchInput.d.ts +1 -1
- package/dist/components/core/TextArea/textAreaStyles.d.ts +0 -1
- package/dist/components/core/TextArea/textAreaTypes.d.ts +1 -1
- package/dist/components/core/TimeField/timeFieldStyles.d.ts +0 -1
- package/dist/components/core/TimeField/timeFieldTypes.d.ts +1 -1
- package/dist/components/core/utils/fieldShellVariant.d.ts +12 -0
- package/dist/components/core/utils/useFieldShellHoverLift.d.ts +2 -1
- package/dist/index.cjs +6 -6
- package/dist/index.js +5357 -5351
- 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"),Ie=require("react-icons/io5"),Pr=require("react-dom");function Dp(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=Dp(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function My(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Dp(t))&&(r&&(r+=" "),r+=e);return r}const Fy=(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},Gy=(t,e)=>({classGroupId:t,validator:e}),Op=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),xi="-",Qf=[],Hy="arbitrary..",zy=t=>{const e=Uy(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Vy(i);const a=i.split(xi),c=a[0]===""&&a.length>1?1:0;return Pp(a,c,e)},getConflictingClassGroupIds:(i,a)=>{if(a){const c=r[i],u=n[i];return c?u?Fy(u,c):c:u||Qf}return n[i]||Qf}}},Pp=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],s=n.nextPart.get(o);if(s){const u=Pp(t,e+1,s);if(u)return u}const i=n.validators;if(i===null)return;const a=e===0?t.join(xi):t.slice(e).join(xi),c=i.length;for(let u=0;u<c;u++){const f=i[u];if(f.validator(a))return f.classGroupId}},Vy=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?Hy+r:void 0})(),Uy=t=>{const{theme:e,classGroups:n}=t;return $y(n,e)},$y=(t,e)=>{const n=Op();for(const r in t){const o=t[r];yc(o,n,r,e)}return n},yc=(t,e,n,r)=>{const o=t.length;for(let s=0;s<o;s++){const i=t[s];Wy(i,e,n,r)}},Wy=(t,e,n,r)=>{if(typeof t=="string"){Xy(t,e,n);return}if(typeof t=="function"){Yy(t,e,n,r);return}Ky(t,e,n,r)},Xy=(t,e,n)=>{const r=t===""?e:kp(e,t);r.classGroupId=n},Yy=(t,e,n,r)=>{if(qy(t)){yc(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(Gy(n,t))},Ky=(t,e,n,r)=>{const o=Object.entries(t),s=o.length;for(let i=0;i<s;i++){const[a,c]=o[i];yc(c,kp(e,a),n,r)}},kp=(t,e)=>{let n=t;const r=e.split(xi),o=r.length;for(let s=0;s<o;s++){const i=r[s];let a=n.nextPart.get(i);a||(a=Op(),n.nextPart.set(i,a)),n=a}return n},qy=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,Zy=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)}}},ol="!",Jf=":",Qy=[],em=(t,e,n,r,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Jy=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 C=o[h];if(i===0&&a===0){if(C===Jf){s.push(o.slice(c,h)),c=h+1;continue}if(C==="/"){u=h;continue}}C==="["?i++:C==="]"?i--:C==="("?a++:C===")"&&a--}const m=s.length===0?o:o.slice(c);let p=m,b=!1;m.endsWith(ol)?(p=m.slice(0,-1),b=!0):m.startsWith(ol)&&(p=m.slice(1),b=!0);const g=u&&u>c?u-c:void 0;return em(s,b,p,g)};if(e){const o=e+Jf,s=r;r=i=>i.startsWith(o)?s(i.slice(o.length)):em(Qy,!1,i,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},eA=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}},tA=t=>({cache:Zy(t.cacheSize),parseClassName:Jy(t),sortModifiers:eA(t),postfixLookupClassGroupIds:nA(t),...zy(t)}),nA=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},rA=/\s+/,oA=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s,postfixLookupClassGroupIds:i}=e,a=[],c=t.trim().split(rA);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:C}=n(m);if(p){u=m+(u.length>0?" "+u:u);continue}let x=!!C,_;if(x){const L=h.substring(0,C);_=r(L);const A=_&&i[_]?r(h):void 0;A&&A!==_&&(_=A,x=!1)}else _=r(h);if(!_){if(!x){u=m+(u.length>0?" "+u:u);continue}if(_=r(h),!_){u=m+(u.length>0?" "+u:u);continue}x=!1}const v=b.length===0?"":b.length===1?b[0]:s(b).join(":"),y=g?v+ol:v,S=y+_;if(a.indexOf(S)>-1)continue;a.push(S);const T=o(_,x);for(let L=0;L<T.length;++L){const A=T[L];a.push(y+A)}u=m+(u.length>0?" "+u:u)}return u},sA=(...t)=>{let e=0,n,r,o="";for(;e<t.length;)(n=t[e++])&&(r=Bp(n))&&(o&&(o+=" "),o+=r);return o},Bp=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=Bp(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=tA(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=oA(c,n);return o(c,f),f};return s=i,(...c)=>s(sA(...c))},iA=[],$e=t=>{const e=n=>n[t]||iA;return e.isThemeGetter=!0,e},jp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Mp=/^\((?:(\w[\w-]*):)?(.+)\)$/i,aA=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,lA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cA=/\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$/,uA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,dA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$n=t=>aA.test(t),be=t=>!!t&&!Number.isNaN(Number(t)),cn=t=>!!t&&Number.isInteger(Number(t)),Ga=t=>t.endsWith("%")&&be(t.slice(0,-1)),Tn=t=>lA.test(t),Fp=()=>!0,mA=t=>cA.test(t)&&!uA.test(t),Ac=()=>!1,pA=t=>dA.test(t),hA=t=>fA.test(t),gA=t=>!Q(t)&&!J(t),bA=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)),CA=t=>sr(t,zp,Ac),Q=t=>jp.test(t),Cr=t=>sr(t,Vp,mA),nm=t=>sr(t,LA,be),xA=t=>sr(t,$p,Fp),_A=t=>sr(t,Up,Ac),rm=t=>sr(t,Gp,Ac),SA=t=>sr(t,Hp,hA),Ws=t=>sr(t,Wp,pA),J=t=>Mp.test(t),Qo=t=>kr(t,Vp),vA=t=>kr(t,Up),om=t=>kr(t,Gp),yA=t=>kr(t,zp),AA=t=>kr(t,Hp),Xs=t=>kr(t,Wp,!0),TA=t=>kr(t,$p,!0),sr=(t,e,n)=>{const r=jp.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},kr=(t,e,n=!1)=>{const r=Mp.exec(t);return r?r[1]?e(r[1]):n:!1},Gp=t=>t==="position"||t==="percentage",Hp=t=>t==="image"||t==="url",zp=t=>t==="length"||t==="size"||t==="bg-size",Vp=t=>t==="length",LA=t=>t==="number",Up=t=>t==="family-name",$p=t=>t==="number"||t==="weight",Wp=t=>t==="shadow",sm=()=>{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"),C=$e("aspect"),x=$e("ease"),_=$e("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],T=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],A=()=>[J,Q,c],E=()=>[$n,"full","auto",...A()],I=()=>[cn,"none","subgrid",J,Q],w=()=>["auto",{span:["full",cn,J,Q]},cn,J,Q],N=()=>[cn,"auto",J,Q],O=()=>["auto","min","max","fr",J,Q],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],k=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...A()],D=()=>[$n,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],P=()=>[$n,"screen","full","dvw","lvw","svw","min","max","fit",...A()],F=()=>[$n,"screen","full","lh","dvh","lvh","svh","min","max","fit",...A()],B=()=>[t,J,Q],$=()=>[...y(),om,rm,{position:[J,Q]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",yA,CA,{size:[J,Q]}],z=()=>[Ga,Qo,Cr],H=()=>["","none","full",u,J,Q],oe=()=>["",be,Qo,Cr],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,Ga,om,rm],ne=()=>["","none",g,J,Q],me=()=>["none",be,J,Q],re=()=>["none",be,J,Q],Ce=()=>[be,J,Q],te=()=>[$n,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Tn],breakpoint:[Tn],color:[Fp],container:[Tn],"drop-shadow":[Tn],ease:["in","out","in-out"],font:[gA],"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",$n,Q,J,C]}],container:["container"],"container-type":[{"@container":["","normal","size",J,Q]}],"container-named":[bA],columns:[{columns:[be,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:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:E()}],"inset-x":[{"inset-x":E()}],"inset-y":[{"inset-y":E()}],start:[{"inset-s":E(),start:E()}],end:[{"inset-e":E(),end:E()}],"inset-bs":[{"inset-bs":E()}],"inset-be":[{"inset-be":E()}],top:[{top:E()}],right:[{right:E()}],bottom:[{bottom:E()}],left:[{left:E()}],visibility:["visible","invisible","collapse"],z:[{z:[cn,"auto",J,Q]}],basis:[{basis:[$n,"full","auto",a,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[be,$n,"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":I()}],"col-start-end":[{col:w()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:w()}],"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":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...k(),"normal"]}],"justify-self":[{"justify-self":["auto",...k()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...k(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...k(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...k(),"baseline"]}],"place-self":[{"place-self":["auto",...k()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pbs:[{pbs:A()}],pbe:[{pbe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],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":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],"inline-size":[{inline:["auto",...P()]}],"min-inline-size":[{"min-inline":["auto",...P()]}],"max-inline-size":[{"max-inline":["none",...P()]}],"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,Qo,Cr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,TA,xA]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ga,Q]}],"font-family":[{font:[vA,_A,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,nm]}],leading:[{leading:[s,...A()]}],"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,Cr]}],"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:A()}],"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]},AA,SA]}],"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,Qo,Cr]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",f,Xs,Ws]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",m,Xs,Ws]}],"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,Cr]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",p,Xs,Ws]}],"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,Xs,Ws]}],"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":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"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",x,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":S()}],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:Ce()}],"skew-x":[{"skew-x":Ce()}],"skew-y":[{"skew-y":Ce()}],transform:[{transform:[J,Q,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"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":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mbs":[{"scroll-mbs":A()}],"scroll-mbe":[{"scroll-mbe":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pbs":[{"scroll-pbs":A()}],"scroll-pbe":[{"scroll-pbe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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,Qo,Cr,nm]}],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"]}},EA=(t,{cacheSize:e,prefix:n,experimentalParseClassName:r,extend:o={},override:s={}})=>(io(t,"cacheSize",e),io(t,"prefix",n),io(t,"experimentalParseClassName",r),Ys(t.theme,s.theme),Ys(t.classGroups,s.classGroups),Ys(t.conflictingClassGroups,s.conflictingClassGroups),Ys(t.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),io(t,"postfixLookupClassGroups",s.postfixLookupClassGroups),io(t,"orderSensitiveModifiers",s.orderSensitiveModifiers),Ks(t.theme,o.theme),Ks(t.classGroups,o.classGroups),Ks(t.conflictingClassGroups,o.conflictingClassGroups),Ks(t.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),sl(t,o,"postfixLookupClassGroups"),sl(t,o,"orderSensitiveModifiers"),t),io=(t,e,n)=>{n!==void 0&&(t[e]=n)},Ys=(t,e)=>{if(e)for(const n in e)io(t,n,e[n])},Ks=(t,e)=>{if(e)for(const n in e)sl(t,e,n)},sl=(t,e,n)=>{const r=e[n];r!==void 0&&(t[n]=t[n]?t[n].concat(r):r)},IA=(t,...e)=>typeof t=="function"?tm(sm,t,...e):tm(()=>EA(sm(),t),...e),wA=["none","base","mid","large"],Cs={base:"--shadow-base",mid:"--shadow-mid",large:"--shadow-large"};function RA(t){return`var(--shadow-${t})`}const Ln={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 NA={size:1,density:1},DA={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","color-surface-tint-primary":"color-surface-tint-primary","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"}},OA=["xsmall","small","base","plus","mid","large","xlarge"],PA=["xsmall","small","base","mid","large"],kA=["small","mid","tools","accent-header","header-1","header-2","large"],BA=IA({extend:{theme:{spacing:[...OA],radius:[...PA],text:[...kA]}}});function R(...t){return BA(My(t))}const jA=["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]"}},MA={small:"--control-height-small",base:"--control-height-base",mid:"--control-height-mid",large:"--control-height-large"},FA={small:1.75,base:2.2,mid:2.5,large:3},im=new Map;function GA(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(${MA[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 Tc(t,e=16){return GA(t)??e*FA[t]}function Rn(t){const e=le[t];return R("flex self-stretch shrink-0 items-center text-muted",e.affixPadX,e.affixText)}const HA={small:"min-w-control-small",base:"min-w-control-base",mid:"min-w-control-mid",large:"min-w-control-large"};function Xp(t){return HA[t]}const xt={danger:"text-danger",success:"text-success",info:"text-info",warning:"text-warning"},Lc={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"},Yp={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"},zA={danger:"text-danger-foreground",success:"text-success-foreground",info:"text-info-foreground",warning:"text-warning-foreground"},Ec={danger:"border-token-danger",success:"border-token-success",info:"border-token-info",warning:"border-token-warning"},Io="surface-color-transition motion-reduce:transition-none",bn="text-color-transition motion-reduce:transition-none",VA={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 Kp(t="default",e="focus-visible"){return VA[t][e]}function et(t="default"){return R(Io,Kp(t,"focus-visible"))}function In(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function qp(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"),Ie=require("react-icons/io5"),Or=require("react-dom");function kp(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=kp(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Gy(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=kp(t))&&(r&&(r+=" "),r+=e);return r}const Hy=(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},zy=(t,e)=>({classGroupId:t,validator:e}),Bp=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),_i="-",tm=[],Vy="arbitrary..",Uy=t=>{const e=Wy(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return $y(i);const a=i.split(_i),c=a[0]===""&&a.length>1?1:0;return jp(a,c,e)},getConflictingClassGroupIds:(i,a)=>{if(a){const c=r[i],u=n[i];return c?u?Hy(u,c):c:u||tm}return n[i]||tm}}},jp=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],s=n.nextPart.get(o);if(s){const u=jp(t,e+1,s);if(u)return u}const i=n.validators;if(i===null)return;const a=e===0?t.join(_i):t.slice(e).join(_i),c=i.length;for(let u=0;u<c;u++){const f=i[u];if(f.validator(a))return f.classGroupId}},$y=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?Vy+r:void 0})(),Wy=t=>{const{theme:e,classGroups:n}=t;return Xy(n,e)},Xy=(t,e)=>{const n=Bp();for(const r in t){const o=t[r];Ac(o,n,r,e)}return n},Ac=(t,e,n,r)=>{const o=t.length;for(let s=0;s<o;s++){const i=t[s];Yy(i,e,n,r)}},Yy=(t,e,n,r)=>{if(typeof t=="string"){Ky(t,e,n);return}if(typeof t=="function"){qy(t,e,n,r);return}Zy(t,e,n,r)},Ky=(t,e,n)=>{const r=t===""?e:Mp(e,t);r.classGroupId=n},qy=(t,e,n,r)=>{if(Qy(t)){Ac(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(zy(n,t))},Zy=(t,e,n,r)=>{const o=Object.entries(t),s=o.length;for(let i=0;i<s;i++){const[a,c]=o[i];Ac(c,Mp(e,a),n,r)}},Mp=(t,e)=>{let n=t;const r=e.split(_i),o=r.length;for(let s=0;s<o;s++){const i=r[s];let a=n.nextPart.get(i);a||(a=Bp(),n.nextPart.set(i,a)),n=a}return n},Qy=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,Jy=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)}}},sl="!",nm=":",eA=[],rm=(t,e,n,r,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),tA=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 b=o[h];if(i===0&&a===0){if(b===nm){s.push(o.slice(c,h)),c=h+1;continue}if(b==="/"){u=h;continue}}b==="["?i++:b==="]"?i--:b==="("?a++:b===")"&&a--}const m=s.length===0?o:o.slice(c);let p=m,C=!1;m.endsWith(sl)?(p=m.slice(0,-1),C=!0):m.startsWith(sl)&&(p=m.slice(1),C=!0);const g=u&&u>c?u-c:void 0;return rm(s,C,p,g)};if(e){const o=e+nm,s=r;r=i=>i.startsWith(o)?s(i.slice(o.length)):rm(eA,!1,i,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},nA=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}},rA=t=>({cache:Jy(t.cacheSize),parseClassName:tA(t),sortModifiers:nA(t),postfixLookupClassGroupIds:oA(t),...Uy(t)}),oA=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},sA=/\s+/,iA=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s,postfixLookupClassGroupIds:i}=e,a=[],c=t.trim().split(sA);let u="";for(let f=c.length-1;f>=0;f-=1){const m=c[f],{isExternal:p,modifiers:C,hasImportantModifier:g,baseClassName:h,maybePostfixModifierPosition:b}=n(m);if(p){u=m+(u.length>0?" "+u:u);continue}let x=!!b,_;if(x){const L=h.substring(0,b);_=r(L);const A=_&&i[_]?r(h):void 0;A&&A!==_&&(_=A,x=!1)}else _=r(h);if(!_){if(!x){u=m+(u.length>0?" "+u:u);continue}if(_=r(h),!_){u=m+(u.length>0?" "+u:u);continue}x=!1}const v=C.length===0?"":C.length===1?C[0]:s(C).join(":"),y=g?v+sl:v,S=y+_;if(a.indexOf(S)>-1)continue;a.push(S);const T=o(_,x);for(let L=0;L<T.length;++L){const A=T[L];a.push(y+A)}u=m+(u.length>0?" "+u:u)}return u},aA=(...t)=>{let e=0,n,r,o="";for(;e<t.length;)(n=t[e++])&&(r=Fp(n))&&(o&&(o+=" "),o+=r);return o},Fp=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=Fp(t[r]))&&(n&&(n+=" "),n+=e);return n},om=(t,...e)=>{let n,r,o,s;const i=c=>{const u=e.reduce((f,m)=>m(f),t());return n=rA(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=iA(c,n);return o(c,f),f};return s=i,(...c)=>s(aA(...c))},lA=[],$e=t=>{const e=n=>n[t]||lA;return e.isThemeGetter=!0,e},Gp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Hp=/^\((?:(\w[\w-]*):)?(.+)\)$/i,cA=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,uA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dA=/\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$/,fA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,mA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Un=t=>cA.test(t),Ce=t=>!!t&&!Number.isNaN(Number(t)),cn=t=>!!t&&Number.isInteger(Number(t)),Ha=t=>t.endsWith("%")&&Ce(t.slice(0,-1)),An=t=>uA.test(t),zp=()=>!0,hA=t=>dA.test(t)&&!fA.test(t),Tc=()=>!1,gA=t=>mA.test(t),CA=t=>pA.test(t),bA=t=>!Q(t)&&!J(t),xA=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)),_A=t=>or(t,$p,Tc),Q=t=>Gp.test(t),Cr=t=>or(t,Wp,hA),sm=t=>or(t,IA,Ce),SA=t=>or(t,Yp,zp),vA=t=>or(t,Xp,Tc),im=t=>or(t,Vp,Tc),yA=t=>or(t,Up,CA),Xs=t=>or(t,Kp,gA),J=t=>Hp.test(t),Qo=t=>Pr(t,Wp),AA=t=>Pr(t,Xp),am=t=>Pr(t,Vp),TA=t=>Pr(t,$p),LA=t=>Pr(t,Up),Ys=t=>Pr(t,Kp,!0),EA=t=>Pr(t,Yp,!0),or=(t,e,n)=>{const r=Gp.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},Pr=(t,e,n=!1)=>{const r=Hp.exec(t);return r?r[1]?e(r[1]):n:!1},Vp=t=>t==="position"||t==="percentage",Up=t=>t==="image"||t==="url",$p=t=>t==="length"||t==="size"||t==="bg-size",Wp=t=>t==="length",IA=t=>t==="number",Xp=t=>t==="family-name",Yp=t=>t==="number"||t==="weight",Kp=t=>t==="shadow",lm=()=>{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"),C=$e("drop-shadow"),g=$e("blur"),h=$e("perspective"),b=$e("aspect"),x=$e("ease"),_=$e("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],T=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],A=()=>[J,Q,c],E=()=>[Un,"full","auto",...A()],I=()=>[cn,"none","subgrid",J,Q],w=()=>["auto",{span:["full",cn,J,Q]},cn,J,Q],N=()=>[cn,"auto",J,Q],O=()=>["auto","min","max","fr",J,Q],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],k=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...A()],D=()=>[Un,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],P=()=>[Un,"screen","full","dvw","lvw","svw","min","max","fit",...A()],F=()=>[Un,"screen","full","lh","dvh","lvh","svh","min","max","fit",...A()],B=()=>[t,J,Q],$=()=>[...y(),am,im,{position:[J,Q]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",TA,_A,{size:[J,Q]}],z=()=>[Ha,Qo,Cr],H=()=>["","none","full",u,J,Q],oe=()=>["",Ce,Qo,Cr],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=()=>[Ce,Ha,am,im],ne=()=>["","none",g,J,Q],me=()=>["none",Ce,J,Q],re=()=>["none",Ce,J,Q],be=()=>[Ce,J,Q],te=()=>[Un,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[An],breakpoint:[An],color:[zp],container:[An],"drop-shadow":[An],ease:["in","out","in-out"],font:[bA],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[An],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[An],shadow:[An],spacing:["px",Ce],text:[An],"text-shadow":[An],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Un,Q,J,b]}],container:["container"],"container-type":[{"@container":["","normal","size",J,Q]}],"container-named":[xA],columns:[{columns:[Ce,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:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:E()}],"inset-x":[{"inset-x":E()}],"inset-y":[{"inset-y":E()}],start:[{"inset-s":E(),start:E()}],end:[{"inset-e":E(),end:E()}],"inset-bs":[{"inset-bs":E()}],"inset-be":[{"inset-be":E()}],top:[{top:E()}],right:[{right:E()}],bottom:[{bottom:E()}],left:[{left:E()}],visibility:["visible","invisible","collapse"],z:[{z:[cn,"auto",J,Q]}],basis:[{basis:[Un,"full","auto",a,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ce,Un,"auto","initial","none",Q]}],grow:[{grow:["",Ce,J,Q]}],shrink:[{shrink:["",Ce,J,Q]}],order:[{order:[cn,"first","last","none",J,Q]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:w()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:w()}],"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":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...k(),"normal"]}],"justify-self":[{"justify-self":["auto",...k()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...k(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...k(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...k(),"baseline"]}],"place-self":[{"place-self":["auto",...k()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pbs:[{pbs:A()}],pbe:[{pbe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],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":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],"inline-size":[{inline:["auto",...P()]}],"min-inline-size":[{"min-inline":["auto",...P()]}],"max-inline-size":[{"max-inline":["none",...P()]}],"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,Qo,Cr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,EA,SA]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ha,Q]}],"font-family":[{font:[AA,vA,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":[Ce,"none",J,sm]}],leading:[{leading:[s,...A()]}],"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:[Ce,"from-font","auto",J,Cr]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[Ce,"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:A()}],"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]},LA,yA]}],"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":[Ce,J,Q]}],"outline-w":[{outline:["",Ce,Qo,Cr]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",f,Ys,Xs]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",m,Ys,Xs]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[Ce,Cr]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",p,Ys,Xs]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[Ce,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":[Ce]}],"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":[Ce]}],"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:[Ce,J,Q]}],contrast:[{contrast:[Ce,J,Q]}],"drop-shadow":[{"drop-shadow":["","none",C,Ys,Xs]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",Ce,J,Q]}],"hue-rotate":[{"hue-rotate":[Ce,J,Q]}],invert:[{invert:["",Ce,J,Q]}],saturate:[{saturate:[Ce,J,Q]}],sepia:[{sepia:["",Ce,J,Q]}],"backdrop-filter":[{"backdrop-filter":["","none",J,Q]}],"backdrop-blur":[{"backdrop-blur":ne()}],"backdrop-brightness":[{"backdrop-brightness":[Ce,J,Q]}],"backdrop-contrast":[{"backdrop-contrast":[Ce,J,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ce,J,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ce,J,Q]}],"backdrop-invert":[{"backdrop-invert":["",Ce,J,Q]}],"backdrop-opacity":[{"backdrop-opacity":[Ce,J,Q]}],"backdrop-saturate":[{"backdrop-saturate":[Ce,J,Q]}],"backdrop-sepia":[{"backdrop-sepia":["",Ce,J,Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"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:[Ce,"initial",J,Q]}],ease:[{ease:["linear","initial",x,J,Q]}],delay:[{delay:[Ce,J,Q]}],animate:[{animate:["none",_,J,Q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,J,Q]}],"perspective-origin":[{"perspective-origin":S()}],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:be()}],"skew-x":[{"skew-x":be()}],"skew-y":[{"skew-y":be()}],transform:[{transform:[J,Q,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"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":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mbs":[{"scroll-mbs":A()}],"scroll-mbe":[{"scroll-mbe":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pbs":[{"scroll-pbs":A()}],"scroll-pbe":[{"scroll-pbe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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:[Ce,Qo,Cr,sm]}],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"]}},wA=(t,{cacheSize:e,prefix:n,experimentalParseClassName:r,extend:o={},override:s={}})=>(io(t,"cacheSize",e),io(t,"prefix",n),io(t,"experimentalParseClassName",r),Ks(t.theme,s.theme),Ks(t.classGroups,s.classGroups),Ks(t.conflictingClassGroups,s.conflictingClassGroups),Ks(t.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),io(t,"postfixLookupClassGroups",s.postfixLookupClassGroups),io(t,"orderSensitiveModifiers",s.orderSensitiveModifiers),qs(t.theme,o.theme),qs(t.classGroups,o.classGroups),qs(t.conflictingClassGroups,o.conflictingClassGroups),qs(t.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),il(t,o,"postfixLookupClassGroups"),il(t,o,"orderSensitiveModifiers"),t),io=(t,e,n)=>{n!==void 0&&(t[e]=n)},Ks=(t,e)=>{if(e)for(const n in e)io(t,n,e[n])},qs=(t,e)=>{if(e)for(const n in e)il(t,e,n)},il=(t,e,n)=>{const r=e[n];r!==void 0&&(t[n]=t[n]?t[n].concat(r):r)},RA=(t,...e)=>typeof t=="function"?om(lm,t,...e):om(()=>wA(lm(),t),...e),NA=["none","base","mid","large"],bs={base:"--shadow-base",mid:"--shadow-mid",large:"--shadow-large"};function DA(t){return`var(--shadow-${t})`}const Tn={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 Ln(t){return`var(${t})`}const OA={size:1,density:1},PA={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","color-surface-tint-primary":"color-surface-tint-primary","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"}},kA=["xsmall","small","base","plus","mid","large","xlarge"],BA=["xsmall","small","base","mid","large"],jA=["small","mid","tools","accent-header","header-1","header-2","large"],MA=RA({extend:{theme:{spacing:[...kA],radius:[...BA],text:[...jA]}}});function R(...t){return MA(Gy(t))}const FA=["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]"}},GA={small:"--control-height-small",base:"--control-height-base",mid:"--control-height-mid",large:"--control-height-large"},HA={small:1.75,base:2.2,mid:2.5,large:3},cm=new Map;function zA(t){if(typeof document>"u")return null;const e=cm.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(${GA[t]})`,document.body.appendChild(n);const r=n.getBoundingClientRect().height;if(document.body.removeChild(n),r>0)return cm.set(t,r),r}catch{}return null}function Lc(t,e=16){return zA(t)??e*HA[t]}function wn(t){const e=le[t];return R("flex self-stretch shrink-0 items-center text-muted",e.affixPadX,e.affixText)}const VA={small:"min-w-control-small",base:"min-w-control-base",mid:"min-w-control-mid",large:"min-w-control-large"};function qp(t){return VA[t]}const bt={danger:"text-danger",success:"text-success",info:"text-info",warning:"text-warning"},Ec={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"},Zp={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"},UA={danger:"text-danger-foreground",success:"text-success-foreground",info:"text-info-foreground",warning:"text-warning-foreground"},Ic={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",$A={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 Qp(t="default",e="focus-visible"){return $A[t][e]}function et(t="default"){return R(Io,Qp(t,"focus-visible"))}function En(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Jp(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 Ot={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},cs={duration:.5,overwrite:!1,delay:0},Ic,rt,Re,zt=1e8,Le=1/zt,il=Math.PI*2,UA=il/4,$A=0,Zp=Math.sqrt,WA=Math.cos,XA=Math.sin,qe=function(e){return typeof e=="string"},je=function(e){return typeof e=="function"},Nn=function(e){return typeof e=="number"},wc=function(e){return typeof e>"u"},pn=function(e){return typeof e=="object"},St=function(e){return e!==!1},Rc=function(){return typeof window<"u"},qs=function(e){return je(e)||qe(e)},Qp=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},ct=Array.isArray,YA=/random\([^)]+\)/g,KA=/,\s*/g,am=/(?:-?\.?\d|\.)+/gi,Jp=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,ao=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Ha=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,eh=/[+-]=-?[.\d]+/,qA=/[^,'"\[\]\s]+/gi,ZA=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Pe,un,al,Nc,kt={},_i={},th,nh=function(e){return(_i=po(e,kt))&&Lt},Dc=function(e,n){return console.warn("Invalid property",e,"set to",n,"Missing plugin? gsap.registerPlugin()")},us=function(e,n){return!n&&console.warn(e)},rh=function(e,n){return e&&(kt[e]=n)&&_i&&(_i[e]=n)||kt},ds=function(){return 0},QA={suppressEvents:!0,isStart:!0,kill:!1},ci={suppressEvents:!0,kill:!1},JA={suppressEvents:!0},Oc={},Qn=[],ll={},oh,wt={},za={},lm=30,ui=[],Pc="",kc=function(e){var n=e[0],r,o;if(pn(n)||je(n)||(e=[e]),!(r=(n._gsap||{}).harness)){for(o=ui.length;o--&&!ui[o].targetTest(n););r=ui[o]}for(o=e.length;o--;)e[o]&&(e[o]._gsap||(e[o]._gsap=new Lh(e[o],r)))||e.splice(o,1);return e},Tr=function(e){return e._gsap||kc(Vt(e))[0]._gsap},sh=function(e,n,r){return(r=e[n])&&je(r)?e[n]():wc(r)&&e.getAttribute&&e.getAttribute(n)||r},vt=function(e,n){return(e=e.split(",")).forEach(n)||e},Ge=function(e){return Math.round(e*1e5)/1e5||0},Oe=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},eT=function(e,n){for(var r=n.length,o=0;e.indexOf(n[o])<0&&++o<r;);return o<r},Si=function(){var e=Qn.length,n=Qn.slice(0),r,o;for(ll={},Qn.length=0,r=0;r<e;r++)o=n[r],o&&o._lazy&&(o.render(o._lazy[0],o._lazy[1],!0)._lazy=0)},Bc=function(e){return!!(e._initted||e._startAt||e.add)},ih=function(e,n,r,o){Qn.length&&!rt&&Si(),e.render(n,r,!!(rt&&n<0&&Bc(e))),Qn.length&&!rt&&Si()},ah=function(e){var n=parseFloat(e);return(n||n===0)&&(e+"").match(qA).length<2?n:qe(e)?e.trim():e},lh=function(e){return e},Bt=function(e,n){for(var r in n)r in e||(e[r]=n[r]);return e},tT=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},cm=function t(e,n){for(var r in n)r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(e[r]=pn(n[r])?t(e[r]||(e[r]={}),n[r]):n[r]);return e},vi=function(e,n){var r={},o;for(o in e)o in n||(r[o]=e[o]);return r},rs=function(e){var n=e.parent||Pe,r=e.keyframes?tT(ct(e.keyframes)):Bt;if(St(e.inherit))for(;n;)r(e,n.vars.defaults),n=n.parent||n._dp;return e},nT=function(e,n){for(var r=e.length,o=r===n.length;o&&r--&&e[r]===n[r];);return r<0},ch=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},Yi=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},nr=function(e,n){e.parent&&(!n||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},Lr=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},rT=function(e){for(var n=e.parent;n&&n.parent;)n._dirty=1,n.totalDuration(),n=n.parent;return e},cl=function(e,n,r,o){return e._startAt&&(rt?e._startAt.revert(ci):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(n,!0,o))},oT=function t(e){return!e||e._ts&&t(e.parent)},um=function(e){return e._repeat?ho(e._tTime,e=e.duration()+e._rDelay)*e:0},ho=function(e,n){var r=Math.floor(e=Oe(e/n));return e&&r===e?r-1:r},yi=function(e,n){return(e-n._start)*n._ts+(n._ts>=0?0:n._dirty?n.totalDuration():n._tDur)},Ki=function(e){return e._end=Oe(e._start+(e._tDur/Math.abs(e._ts||e._rts||Le)||0))},qi=function(e,n){var r=e._dp;return r&&r.smoothChildTiming&&e._ts&&(e._start=Oe(r._time-(e._ts>0?n/e._ts:((e._dirty?e.totalDuration():e._tDur)-n)/-e._ts)),Ki(e),r._dirty||Lr(r,e)),e},uh=function(e,n){var r;if((n._time||!n._dur&&n._initted||n._start<e._time&&(n._dur||!n.add))&&(r=yi(e.rawTime(),n),(!n._dur||xs(0,n.totalDuration(),r)-n._tTime>Le)&&n.render(r,!0)),Lr(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&&nr(n),n._start=Oe((Nn(r)?r:r||e!==Pe?Ht(e,r,n):e._time)+n._delay),n._end=Oe(n._start+(n.totalDuration()/Math.abs(n.timeScale())||0)),ch(e,n,"_first","_last",e._sort?"_start":0),ul(n)||(e._recent=n),o||uh(e,n),e._ts<0&&qi(e,e._tTime),e},dh=function(e,n){return(kt.ScrollTrigger||Dc("scrollTrigger",n))&&kt.ScrollTrigger.create(n,e)},fh=function(e,n,r,o,s){if(Mc(e,n,s),!e._initted)return 1;if(!r&&e._pt&&!rt&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&oh!==Rt.frame)return Qn.push(e),e._lazy=[s,o],1},sT=function t(e){var n=e.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||t(n))},ul=function(e){var n=e.data;return n==="isFromStart"||n==="isStart"},iT=function(e,n,r,o){var s=e.ratio,i=n<0||!n&&(!e._start&&sT(e)&&!(!e._initted&&ul(e))||(e._ts<0||e._dp._ts<0)&&!ul(e))?0:1,a=e._rDelay,c=0,u,f,m;if(a&&e._repeat&&(c=xs(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&&fh(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&&cl(e,n,r,!0),e._onUpdate&&!r&&Nt(e,"onUpdate"),c&&e._repeat&&!r&&e.parent&&Nt(e,"onRepeat"),(n>=e._tDur||n<0)&&e.ratio===i&&(i&&nr(e,1),!r&&!rt&&(Nt(e,i?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=n)},aT=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=Oe(n)||0,a=e._tTime/e._tDur;return a&&!o&&(e._time*=i/e._dur),e._dur=i,e._tDur=s?s<0?1e10:Oe(i*(s+1)+e._rDelay*s):i,a>0&&!o&&qi(e,e._tTime=e._tDur*a),e.parent&&Ki(e),r||Lr(e.parent,e),e},dm=function(e){return e instanceof Ct?Lr(e):go(e,e._dur)},lT={_start:0,endTime:ds,totalDuration:ds},Ht=function t(e,n,r){var o=e.labels,s=e._recent||lT,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},os=function(e,n,r){var o=Nn(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=St(c.vars.inherit)&&c.parent;i.immediateRender=St(a.immediateRender),e<2?i.runBackwards=1:i.startAt=n[s-1]}return new ze(n[0],i,n[s+1])},ir=function(e,n){return e||e===0?n(e):n},xs=function(e,n,r){return r<e?e:r>n?n:r},lt=function(e,n){return!qe(e)||!(n=ZA.exec(e))?"":n[1]},cT=function(e,n,r){return ir(r,function(o){return xs(e,n,o)})},dl=[].slice,mh=function(e,n){return e&&pn(e)&&"length"in e&&(!n&&!e.length||e.length-1 in e&&pn(e[0]))&&!e.nodeType&&e!==un},uT=function(e,n,r){return r===void 0&&(r=[]),e.forEach(function(o){var s;return qe(o)&&!n||mh(o,1)?(s=r).push.apply(s,Vt(o)):r.push(o)})||r},Vt=function(e,n,r){return Re&&!n&&Re.selector?Re.selector(e):qe(e)&&!r&&(al||!bo())?dl.call((n||Nc).querySelectorAll(e),0):ct(e)?uT(e,r):mh(e)?dl.call(e,0):e?[e]:[]},fl=function(e){return e=Vt(e)[0]||us("Invalid scope")||{},function(n){var r=e.current||e.nativeElement||e;return Vt(n,r.querySelectorAll?r:r===e?us("Invalid scope")||Nc.createElement("div"):e)}},ph=function(e){return e.sort(function(){return .5-Math.random()})},hh=function(e){if(je(e))return e;var n=pn(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,C=i[h],x,_,v,y,S,T,L,A,E;if(!C){if(E=n.grid==="auto"?0:(n.grid||[1,zt])[1],!E){for(L=-zt;L<(L=g[E++].getBoundingClientRect().left)&&E<h;);E<h&&E--}for(C=i[h]=[],x=c?Math.min(E,h)*f-.5:o%E,_=E===zt?0:c?h*m/E-.5:o/E|0,L=0,A=zt,T=0;T<h;T++)v=T%E-x,y=_-(T/E|0),C[T]=S=u?Math.abs(u==="y"?y:v):Zp(v*v+y*y),S>L&&(L=S),S<A&&(A=S);o==="random"&&ph(C),C.max=L-A,C.min=A,C.v=h=(parseFloat(n.amount)||parseFloat(n.each)*(E>h?h-1:u?u==="y"?h/E:E:Math.max(E,h/E))||0)*(o==="edges"?-1:1),C.b=h<0?s-h:s,C.u=lt(n.amount||n.each)||0,r=r&&h<0?yT(r):r}return h=(C[p]-C.min)/C.max||0,Oe(C.b+(r?r(h):h)*C.v)+C.u}},ml=function(e){var n=Math.pow(10,((e+"").split(".")[1]||"").length);return function(r){var o=Oe(Math.round(parseFloat(r)/e)*e*n);return(o-o%1)/n+(Nn(r)?0:lt(r))}},gh=function(e,n){var r=ct(e),o,s;return!r&&pn(e)&&(o=r=e.radius||zt,e.values?(e=Vt(e.values),(s=!Nn(e[0]))&&(o*=o)):e=ml(e.increment)),ir(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||Nn(i)?f:f+lt(i)}:ml(e))},bh=function(e,n,r,o){return ir(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})},dT=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)}},fT=function(e,n){return function(r){return e(parseFloat(r))+(n||lt(r))}},mT=function(e,n,r){return xh(e,n,0,1,r)},Ch=function(e,n,r){return ir(r,function(o){return e[~~n(o)]})},pT=function t(e,n,r){var o=n-e;return ct(e)?Ch(e,t(0,e.length),n):ir(r,function(s){return(o+(s-e)%o)%o+e})},hT=function t(e,n,r){var o=n-e,s=o*2;return ct(e)?Ch(e,t(0,e.length-1),n):ir(r,function(i){return i=(s+(i-e)%s)%s||0,e+(i>o?s-i:i)})},fs=function(e){return e.replace(YA,function(n){var r=n.indexOf("[")+1,o=n.substring(r||7,r?n.indexOf("]"):n.length-1).split(KA);return bh(r?o:+o[0],r?0:+o[1],+o[2]||1e-5)})},xh=function(e,n,r,o,s){var i=n-e,a=o-r;return ir(s,function(c){return r+((c-e)/i*a||0)})},gT=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)jc.call(a,e,c,"get",n[c]);s=function(g){return Hc(g,a)||(i?e.p:e)}}}return ir(r,s)},fm=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},Nt=function(e,n,r){var o=e.vars,s=o[n],i=Re,a=e._ctx,c,u,f;if(s)return c=o[n+"Params"],u=o.callbackScope||e,r&&Qn.length&&Si(),a&&(Re=a),f=c?s.apply(u,c):s.call(u),Re=i,f},ts=function(e){return nr(e),e.scrollTrigger&&e.scrollTrigger.kill(!!rt),e.progress()<1&&Nt(e,"onInterrupt"),e},lo,_h=[],Sh=function(e){if(e)if(e=!e.name&&e.default||e,Rc()||e.headless){var n=e.name,r=je(e),o=n&&!r&&e.init?function(){this._props=[]}:e,s={init:ds,render:Hc,add:jc,kill:OT,modifier:DT,rawVars:0},i={targetTest:0,get:0,getSetter:Gc,aliases:{},register:0};if(bo(),e!==o){if(wt[n])return;Bt(o,Bt(vi(e,s),i)),po(o.prototype,po(s,vi(e,i))),wt[o.prop=n]=o,e.targetTest&&(ui.push(o),Oc[n]=1),n=(n==="css"?"CSS":n.charAt(0).toUpperCase()+n.substr(1))+"Plugin"}rh(n,o),e.register&&e.register(Lt,o,yt)}else _h.push(e)},Te=255,ns={aqua:[0,Te,Te],lime:[0,Te,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Te],navy:[0,0,128],white:[Te,Te,Te],olive:[128,128,0],yellow:[Te,Te,0],orange:[Te,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Te,0,0],pink:[Te,192,203],cyan:[0,Te,Te],transparent:[Te,Te,Te,0]},Va=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)*Te+.5|0},vh=function(e,n,r){var o=e?Nn(e)?[e>>16,e>>8&Te,e&Te]:0:ns.black,s,i,a,c,u,f,m,p,b,g;if(!o){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),ns[e])o=ns[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&Te,o&Te,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),o=[e>>16,e>>8&Te,e&Te]}else if(e.substr(0,3)==="hsl"){if(o=g=e.match(am),!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]=Va(c+1/3,s,i),o[1]=Va(c,s,i),o[2]=Va(c-1/3,s,i);else if(~e.indexOf("="))return o=e.match(Jp),r&&o.length<4&&(o[3]=1),o}else o=e.match(am)||ns.transparent;o=o.map(Number)}return n&&!g&&(s=o[0]/Te,i=o[1]/Te,a=o[2]/Te,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},yh=function(e){var n=[],r=[],o=-1;return e.split(Jn).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(Jn),i=n?"hsla(":"rgba(",a=0,c,u,f,m;if(!s)return e;if(s=s.map(function(p){return(p=vh(p,n,1))&&i+(n?p[0]+","+p[1]+"%,"+p[2]+"%,"+p[3]:p.join(","))+")"}),r&&(f=yh(e),c=r.c,c.join(o)!==f.c.join(o)))for(u=e.replace(Jn,"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(Jn),m=u.length-1;a<m;a++)o+=u[a]+s[a];return o+u[m]},Jn=(function(){var t="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in ns)t+="|"+e+"\\b";return new RegExp(t+")","gi")})(),bT=/hsl[a]?\(/,Ah=function(e){var n=e.join(" "),r;if(Jn.lastIndex=0,Jn.test(n))return r=bT.test(n),e[1]=mm(e[1],r),e[0]=mm(e[0],r,yh(e[1])),!0},ms,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(C){var x=t()-o,_=C===!0,v,y,S,T;if((x>e||x<0)&&(r+=x-n),o+=x,S=o-r,v=S-i,(v>0||_)&&(T=++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,T,C)};return m={time:0,frame:0,tick:function(){g(!0)},deltaRatio:function(C){return p/(1e3/(C||60))},wake:function(){th&&(!al&&Rc()&&(un=al=window,Nc=un.document||{},kt.gsap=Lt,(un.gsapVersions||(un.gsapVersions=[])).push(Lt.version),nh(_i||un.GreenSockGlobals||!un.gsap&&un||{}),_h.forEach(Sh)),f=typeof requestAnimationFrame<"u"&&requestAnimationFrame,c&&m.sleep(),u=f||function(C){return setTimeout(C,i-m.time*1e3+1|0)},ms=1,g(2))},sleep:function(){(f?cancelAnimationFrame:clearTimeout)(c),ms=0,u=ds},lagSmoothing:function(C,x){e=C||1/0,n=Math.min(x||33,e)},fps:function(C){s=1e3/(C||240),i=m.time*1e3+s},add:function(C,x,_){var v=x?function(y,S,T,L){C(y,S,T,L),m.remove(v)}:C;return m.remove(C),a[_?"unshift":"push"](v),bo(),v},remove:function(C,x){~(x=a.indexOf(C))&&a.splice(x,1)&&b>=x&&b--},_listeners:a},m})(),bo=function(){return!ms&&Rt.wake()},xe={},CT=/^[\d.\-M][\d.\-,\s]/,xT=/["']/g,_T=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(xT,"").trim():+u,o=c.substr(a+1).trim();return n},ST=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)},vT=function(e){var n=(e+"").split("("),r=xe[n[0]];return r&&n.length>1&&r.config?r.config.apply(null,~e.indexOf("{")?[_T(n[1])]:ST(e).split(",").map(ah)):xe._CE&&CT.test(e)?xe._CE("",e):r},yT=function(e){return function(n){return 1-e(1-n)}},Er=function(e,n){return e&&(je(e)?e:xe[e]||vT(e))||n},Br=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 vt(e,function(a){xe[a]=kt[a]=s,xe[i=a.toLowerCase()]=r;for(var c in s)xe[i+(c==="easeIn"?".in":c==="easeOut"?".out":".inOut")]=xe[a+"."+c]=s[c]}),s},Th=function(e){return function(n){return n<.5?(1-e(1-n*2))/2:.5+e((n-.5)*2)/2}},Ua=function t(e,n,r){var o=n>=1?n:1,s=(r||(e?.3:.45))/(n<1?n:1),i=s/il*(Math.asin(1/o)||0),a=function(f){return f===1?1:o*Math.pow(2,-10*f)*XA((f-i)*s)+1},c=e==="out"?a:e==="in"?function(u){return 1-a(1-u)}:Th(a);return s=il/s,c.config=function(u,f){return t(e,u,f)},c},$a=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)}:Th(r);return o.config=function(s){return t(e,s)},o};vt("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var n=e<5?e+1:e;Br(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})});xe.Linear.easeNone=xe.none=xe.Linear.easeIn;Br("Elastic",Ua("in"),Ua("out"),Ua());(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};Br("Bounce",function(i){return 1-s(1-i)},s)})(7.5625,2.75);Br("Expo",function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)});Br("Circ",function(t){return-(Zp(1-t*t)-1)});Br("Sine",function(t){return t===1?1:-WA(t*UA)+1});Br("Back",$a("in"),$a("out"),$a());xe.SteppedEase=xe.steps=kt.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*xs(0,i,a)|0)+s)*r}}};cs.ease=xe["quad.out"];vt("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return Pc+=t+","+t+"Params,"});var Lh=function(e,n){this.id=$A++,e._gsap=this,this.target=e,this.harness=n,this.get=n?n.get:sh,this.set=n?n.getSetter:Gc},ps=(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,Re&&(this._ctx=Re,Re.data.push(this)),ms||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(qi(this,r),!s._dp||s.parent||uh(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+um(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)+um(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?yi(this.parent._time,this):this._tTime;return this._rts=+r||0,this._ts=this._ps||r===-Le?0:this._rts,this.totalTime(xs(-Math.abs(this._delay),this.totalDuration(),s),o!==!1),Ki(this),rT(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=Oe(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+(St(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?yi(o.rawTime(r),this):this._tTime:this._tTime},e.revert=function(r){r===void 0&&(r=JA);var o=rt;return rt=r,Bc(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,dm(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(r){if(arguments.length){var o=this._time;return this._rDelay=r,dm(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),St(o))},e.restart=function(r,o){return this.play().totalTime(r?-this._delay:0,St(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=je(r)?r:lh,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(){ts(this)},t})();Bt(ps.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 Ct=(function(t){qp(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=St(r.sortChildren),Pe&&dn(r.parent||Pe,In(s),o),r.reversed&&s.reverse(),r.paused&&s.paused(!0),r.scrollTrigger&&dh(In(s),r.scrollTrigger),s}var n=e.prototype;return n.to=function(o,s,i){return os(0,arguments,this),this},n.from=function(o,s,i){return os(1,arguments,this),this},n.fromTo=function(o,s,i,a){return os(2,arguments,this),this},n.set=function(o,s,i){return s.duration=0,s.parent=this,rs(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,rs(i).immediateRender=St(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,rs(a).immediateRender=St(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:Oe(o),m=this._zTime<0!=o<0&&(this._initted||!u),p,b,g,h,C,x,_,v,y,S,T,L;if(this!==Pe&&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,x=!v,m&&(u||(a=this._zTime),(o||!s)&&(this._zTime=o)),this._repeat){if(T=this._yoyo,C=u+this._rDelay,this._repeat<-1&&o<0)return this.totalTime(C*100+o,s,i);if(p=Oe(f%C),f===c?(h=this._repeat,p=u):(S=Oe(f/C),h=~~S,h&&h===S&&(p=u,h--),p>u&&(p=u)),S=ho(this._tTime,C),!a&&this._tTime&&S!==h&&this._tTime-S*C-this._dur<=0&&(S=h),T&&h&1&&(p=u-p,L=1),h!==S&&!this._lock){var A=T&&S&1,E=A===(T&&h&1);if(h<S&&(A=!A),a=A?0:f%u?u:f,this._lock=1,this.render(a||(L?0:Oe(h*C)),s,!u)._lock=0,this._tTime=f,!s&&this.parent&&Nt(this,"onRepeat"),this.vars.repeatRefresh&&!L&&(this.invalidate()._lock=1,S=h),a&&a!==this._time||x!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,c=this._tDur,E&&(this._lock=2,a=A?u:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!L&&this.invalidate()),this._lock=0,!this._ts&&!x)return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(_=aT(this,Oe(a),Oe(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&&(Nt(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&&!x){_=0,g&&(f+=this._zTime=-Le);break}}b=g}else{b=this._last;for(var I=o<0?o:p;b;){if(g=b._prev,(b._act||I<=b._end)&&b._ts&&_!==b){if(b.parent!==this)return this.render(o,s,i);if(b.render(b._ts>0?(I-b._start)*b._ts:(b._dirty?b.totalDuration():b._tDur)+(I-b._start)*b._ts,s,i||rt&&Bc(b)),p!==this._time||!this._ts&&!x){_=0,g&&(f+=this._zTime=I?-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,Ki(this),this.render(o,s,i);this._onUpdate&&!s&&Nt(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)&&nr(this,1),!s&&!(o<0&&!a)&&(f||a||!c)&&(Nt(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(Nn(s)||(s=Ht(this,s,o)),!(o instanceof ps)){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&&Yi(this,o),o===this._recent&&(this._recent=this._last),Lr(this))},n.totalTime=function(o,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Oe(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=ze.delayedCall(0,s||ds,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"&&nr(s),s=s._next},n.killTweensOf=function(o,s,i){for(var a=this.getTweensOf(o,i),c=a.length;c--;)Kn!==a[c]&&a[c].kill(o,s);return this},n.getTweensOf=function(o,s){for(var i=[],a=Vt(o),c=this._first,u=Nn(s),f;c;)c instanceof ze?eT(c._targets,a)&&(u?(!Kn||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,Bt({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 C=s.duration||Math.abs((a-(u&&"time"in u?u.time:i._time))/i.timeScale());g._dur!==C&&go(g,C,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,Bt({startAt:{time:Ht(this,o)}},i))},n.recent=function(){return this._recent},n.nextLabel=function(o){return o===void 0&&(o=this._time),fm(this,Ht(this,o))},n.previousLabel=function(o){return o===void 0&&(o=this._time),fm(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=Oe(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 Lr(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={}),Lr(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+=Oe(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===Pe&&i._time>s?i._time:s,1,1),i._dirty=0}return i._tDur},e.updateRoot=function(o){if(Pe._ts&&(ih(Pe,yi(o,Pe)),oh=Rt.frame),Rt.frame>=lm){lm+=Ot.autoSleep||120;var s=Pe._first;if((!s||!s._ts)&&Ot.autoSleep&&Rt._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||Rt.sleep()}}},e})(ps);Bt(Ct.prototype,{_lock:0,_hasPause:0,_forcing:0});var AT=function(e,n,r,o,s,i,a){var c=new yt(this._pt,e,n,0,1,Dh,null,s),u=0,f=0,m,p,b,g,h,C,x,_;for(c.b=r,c.e=o,r+="",o+="",(x=~o.indexOf("random("))&&(o=fs(o)),i&&(_=[r,o],i(_,e,n),r=_[0],o=_[1]),p=r.match(Ha)||[];m=Ha.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++]&&(C=parseFloat(p[f-1])||0,c._pt={_next:c._pt,p:h||f===1?h:",",s:C,c:g.charAt(1)==="="?co(C,g)-C:parseFloat(g)-C,m:b&&b<4?Math.round:0},u=Ha.lastIndex);return c.c=u<o.length?o.substring(u,o.length):"",c.fp=a,(eh.test(o)||x)&&(c.e=0),this._pt=c,c},jc=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?wT:Rh:Fc,g;if(qe(o)&&(~o.indexOf("random(")&&(o=fs(o)),o.charAt(1)==="="&&(g=co(p,o)+(lt(p)||0),(g||g===0)&&(o=g))),!f||p!==o||pl)return!isNaN(p*o)&&o!==""?(g=new yt(this._pt,e,n,+p||0,o-(p||0),typeof m=="boolean"?NT:Nh,0,b),u&&(g.fp=u),a&&g.modifier(a,this,e),this._pt=g):(!m&&!(n in e)&&Dc(n,o),AT.call(this,e,n,p,o,b,c||Ot.stringFilter,u))},TT=function(e,n,r,o,s){if(je(e)&&(e=ss(e,s,n,r,o)),!pn(e)||e.style&&e.nodeType||ct(e)||Qp(e))return qe(e)?ss(e,s,n,r,o):e;var i={},a;for(a in e)i[a]=ss(e[a],s,n,r,o);return i},Eh=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]:TT(n[e],o,s,i,r),r,o,i)!==!1&&(r._pt=c=new yt(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},Kn,pl,Mc=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,C=e._targets,x=e.parent,_=x&&x.data==="nested"?x.vars.targets:C,v=e._overwrite==="auto"&&!Ic,y=e.timeline,S=o.easeReverse||m,T,L,A,E,I,w,N,O,j,k,G,D,P;if(y&&(!p||!s)&&(s="none"),e._ease=Er(s,cs.ease),e._rEase=S&&(Er(S)||e._ease),e._from=!y&&!!o.runBackwards,e._from&&(e.ratio=1),!y||p&&!o.stagger){if(O=C[0]?Tr(C[0]).harness:0,D=O&&o[O.prop],T=vi(o,Oc),h&&(h._zTime<0&&h.progress(1),n<0&&f&&a&&!b?h.render(-1,!0):h.revert(f&&g?ci:QA),h._lazy=0),i){if(nr(e._startAt=ze.set(C,Bt({data:"isStart",overwrite:!1,parent:x,immediateRender:!0,lazy:!h&&St(c),startAt:null,delay:0,onUpdate:u&&function(){return Nt(e,"onUpdate")},stagger:0},i))),e._startAt._dp=0,e._startAt._sat=e,n<0&&(rt||!a&&!b)&&e._startAt.revert(ci),a&&g&&n<=0&&r<=0){n&&(e._zTime=n);return}}else if(f&&g&&!h){if(n&&(a=!1),A=Bt({overwrite:!1,data:"isFromStart",lazy:a&&!h&&St(c),immediateRender:a,stagger:0,parent:x},T),D&&(A[O.prop]=D),nr(e._startAt=ze.set(C,A)),e._startAt._dp=0,e._startAt._sat=e,n<0&&(rt?e._startAt.revert(ci):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&&St(c)||c&&!g,L=0;L<C.length;L++){if(I=C[L],N=I._gsap||kc(C)[L]._gsap,e._ptLookup[L]=k={},ll[N.id]&&Qn.length&&Si(),G=_===C?L:_.indexOf(I),O&&(j=new O).init(I,D||T,e,G,_)!==!1&&(e._pt=E=new yt(e._pt,I,j.name,0,1,j.render,j,0,j.priority),j._props.forEach(function(F){k[F]=E}),j.priority&&(w=1)),!O||D)for(A in T)wt[A]&&(j=Eh(A,T,e,G,I,_))?j.priority&&(w=1):k[A]=E=jc.call(e,I,A,"get",T[A],G,_,0,o.stringFilter);e._op&&e._op[L]&&e.kill(I,e._op[L]),v&&e._pt&&(Kn=e,Pe.killTweensOf(I,k,e.globalTime(n)),P=!e.parent,Kn=0),e._pt&&c&&(ll[N.id]=1)}w&&Oh(e),e._onInit&&e._onInit(e)}e._onUpdate=u,e._initted=(!e._op||e._pt)&&!P,p&&n<=0&&y.render(zt,!0,!0)},LT=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 pl=1,e.vars[n]="+=0",Mc(e,a),pl=0,c?us(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))},ET=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},IT=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})},ss=function(e,n,r,o,s){return je(e)?e.call(n,r,o,s):qe(e)&&~e.indexOf("random(")?fs(e):e},Ih=Pc+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",wh={};vt(Ih+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return wh[t]=1});var ze=(function(t){qp(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:rs(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,C=c.scrollTrigger,x=o.parent||Pe,_=(ct(r)||Qp(r)?Nn(r[0]):"length"in o)?[r]:Vt(r),v,y,S,T,L,A,E,I;if(a._targets=_.length?kc(_):us("GSAP target "+r+" not found. https://gsap.com",!Ot.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=b,g||p||qs(u)||qs(f)){o=a.vars;var w=o.easeReverse||o.yoyoEase;if(v=a.timeline=new Ct({data:"nested",defaults:h||{},targets:x&&x.data==="nested"?x.vars.targets:_}),v.kill(),v.parent=v._dp=In(a),v._start=0,p||qs(u)||qs(f)){if(T=_.length,E=p&&hh(p),pn(p))for(L in p)~Ih.indexOf(L)&&(I||(I={}),I[L]=p[L]);for(y=0;y<T;y++)S=vi(o,wh),S.stagger=0,w&&(S.easeReverse=w),I&&po(S,I),A=_[y],S.duration=+ss(u,In(a),y,A,_),S.delay=(+ss(f,In(a),y,A,_)||0)-a._delay,!p&&T===1&&S.delay&&(a._delay=f=S.delay,a._start+=f,S.delay=0),v.to(A,S,E?E(y,A,_):0),v._ease=xe.none;v.duration()?u=f=0:a.timeline=0}else if(g){rs(Bt(v.vars.defaults,{ease:"none"})),v._ease=Er(g.ease||o.ease||"none");var N=0,O,j,k;if(ct(g))g.forEach(function(G){return v.to(_,G,">")}),v.duration();else{S={};for(L in g)L==="ease"||L==="easeEach"||IT(L,g[L],S,g.easeEach);for(L in S)for(O=S[L].sort(function(G,D){return G.t-D.t}),N=0,y=0;y<O.length;y++)j=O[y],k={ease:j.e,duration:(j.t-(y?O[y-1].t:0))/100*u},k[L]=j.v,v.to(_,k,N),N+=k.duration;v.duration()<u&&v.to({},{duration:u-v.duration()})}}u||a.duration(u=v.duration())}else a.timeline=0;return b===!0&&!Ic&&(Kn=In(a),Pe.killTweensOf(_),Kn=0),dn(x,In(a),s),o.reversed&&a.reverse(),o.paused&&a.paused(!0),(m||!u&&!g&&a._start===Oe(x._time)&&St(m)&&oT(In(a))&&x.data!=="nested")&&(a._tTime=-Le,a.render(Math.max(0,-f)||0)),C&&dh(In(a),C),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,C,x,_,v;if(!u)iT(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=Oe(m%h),m===c?(g=this._repeat,p=u):(C=Oe(m/h),g=~~C,g&&g===C?(p=u,g--):p>u&&(p=u)),x=this._yoyo&&g&1,x&&(p=u-p),C=ho(this._tTime,h),p===a&&!i&&this._initted&&g===C)return this._tTime=m,this;g!==C&&this.vars.repeatRefresh&&!x&&!this._lock&&p!==h&&this._initted&&(this._lock=i=1,this.render(Oe(h*g),!0).invalidate()._lock=0)}if(!this._initted){if(fh(this,f?o:p,i,s,m))return this._tTime=0,this;if(a!==this._time&&!(i&&this.vars.repeatRefresh&&g!==C))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&&!C&&(Nt(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&&cl(this,o,s,i),Nt(this,"onUpdate")),this._repeat&&g!==C&&this.vars.onRepeat&&!s&&this.parent&&Nt(this,"onRepeat"),(m===this._tDur||!m)&&this._tTime===m&&(f&&!this._onUpdate&&cl(this,o,!0,!0),(o||!u)&&(m===this._tDur&&this._ts>0||!m&&this._ts<0)&&nr(this,1),!s&&!(f&&!a)&&(m||a||x)&&(Nt(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){ms||Rt.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),f;return this._initted||Mc(this,u),f=this._ease(u/this._dur),LT(this,o,s,i,a,f,u,c)?this.resetTo(o,s,i,a,1):(qi(this,0),this.parent||ch(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?ts(this):this.scrollTrigger&&this.scrollTrigger.kill(!!rt),this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(o,s,Kn&&Kn.vars.overwrite!==!0)._first||ts(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,C,x;if((!s||s==="all")&&nT(a,c))return s==="all"&&(this._pt=0),ts(this);for(m=this._op=this._op||[],s!=="all"&&(qe(s)&&(h={},vt(s,function(_){return h[_]=1}),s=h),s=ET(a,s)),x=a.length;x--;)if(~c.indexOf(a[x])){p=u[x],s==="all"?(m[x]=s,g=p,b={}):(b=m[x]=m[x]||{},g=s);for(h in g)C=p&&p[h],C&&((!("kill"in C.d)||C.d.kill(h)===!0)&&Yi(this,C,"_pt"),delete p[h]),b!=="all"&&(b[h]=1)}return this._initted&&!this._pt&&f&&ts(this),this},e.to=function(o,s){return new e(o,s,arguments[2])},e.from=function(o,s){return os(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 os(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 Pe.killTweensOf(o,s,i)},e})(ps);Bt(ze.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});vt("staggerTo,staggerFrom,staggerFromTo",function(t){ze[t]=function(){var e=new Ct,n=dl.call(arguments,0);return n.splice(t==="staggerFromTo"?5:4,0,0),e[t].apply(e,n)}});var Fc=function(e,n,r){return e[n]=r},Rh=function(e,n,r){return e[n](r)},wT=function(e,n,r,o){return e[n](o.fp,r)},RT=function(e,n,r){return e.setAttribute(n,r)},Gc=function(e,n){return je(e[n])?Rh:wc(e[n])&&e.setAttribute?RT:Fc},Nh=function(e,n){return n.set(n.t,n.p,Math.round((n.s+n.c*e)*1e6)/1e6,n)},NT=function(e,n){return n.set(n.t,n.p,!!(n.s+n.c*e),n)},Dh=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)},Hc=function(e,n){for(var r=n._pt;r;)r.r(e,r.d),r=r._next},DT=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},OT=function(e){for(var n=this._pt,r,o;n;)o=n._next,n.p===e&&!n.op||n.op===e?Yi(this,n,"_pt"):n.dep||(r=1),n=o;return!r},PT=function(e,n,r,o){o.mSet(e,n,o.m.call(o.tween,r,o.mt),o)},Oh=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},yt=(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||Nh,this.d=c||this,this.set=u||Fc,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=PT,this.m=r,this.mt=s,this.tween=o},t})();vt(Pc+"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 Oc[t]=1});kt.TweenMax=kt.TweenLite=ze;kt.TimelineLite=kt.TimelineMax=Ct;Pe=new Ct({sortChildren:!1,defaults:cs,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Ot.stringFilter=Ah;var Ir=[],di={},kT=[],pm=0,BT=0,Wa=function(e){return(di[e]||kT).map(function(n){return n()})},hl=function(){var e=Date.now(),n=[];e-pm>2&&(Wa("matchMediaInit"),Ir.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))}),Wa("matchMediaRevert"),n.forEach(function(r){return r.onMatch(r,function(o){return r.add(null,o)})}),pm=e,Wa("matchMedia"))},Ph=(function(){function t(n,r){this.selector=r&&fl(r),this.data=[],this._r=[],this.isReverted=!1,this.id=BT++,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=Re,f=i.selector,m;return u&&u!==i&&u.data.push(i),s&&(i.selector=fl(s)),Re=i,m=o.apply(i,arguments),je(m)&&i._r.push(m),Re=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=Re;Re=null,r(this),Re=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 Ct?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=Ir.length;i--;)Ir[i].id===this.id&&Ir.splice(i,1)},e.revert=function(r){this.kill(r||{})},t})(),jT=(function(){function t(n){this.contexts=[],this.scope=n,Re&&Re.data.push(this)}var e=t.prototype;return e.add=function(r,o,s){pn(r)||(r={matches:r});var i=new Ph(0,s||this.scope),a=i.conditions={},c,u,f;Re&&!i.selector&&(i.selector=Re.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&&(Ir.indexOf(i)<0&&Ir.push(i),(a[u]=c.matches)&&(f=1),c.addListener?c.addListener(hl):c.addEventListener("change",hl)));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})(),Ai={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 Sh(o)})},timeline:function(e){return new Ct(e)},getTweensOf:function(e,n){return Pe.getTweensOf(e,n)},getProperty:function(e,n,r,o){qe(e)&&(e=Vt(e)[0]);var s=Tr(e||{}).get,i=r?lh:ah;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 Lt.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&&Hc(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=Lt.to(e,Bt((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 Pe.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=Er(e.ease,cs.ease)),cm(cs,e||{})},config:function(e){return cm(Ot,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]&&!kt[a]&&us(n+" effect requires "+a+" plugin.")}),za[n]=function(a,c,u){return r(Vt(a),Bt(c||{},s),u)},i&&(Ct.prototype[n]=function(a,c,u){return this.add(za[n](a,pn(c)?c:(u=c)&&{},this),u)})},registerEase:function(e,n){xe[e]=Er(n)},parseEase:function(e,n){return arguments.length?Er(e,n):xe},getById:function(e){return Pe.getById(e)},exportRoot:function(e,n){e===void 0&&(e={});var r=new Ct(e),o,s;for(r.smoothChildTiming=St(e.smoothChildTiming),Pe.remove(r),r._dp=0,r._time=r._tTime=Pe._time,o=Pe._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(Pe,r,0),r},context:function(e,n){return e?new Ph(e,n):Re},matchMedia:function(e){return new jT(e)},matchMediaRefresh:function(){return Ir.forEach(function(e){var n=e.conditions,r,o;for(o in n)n[o]&&(n[o]=!1,r=1);r&&e.revert()})||hl()},addEventListener:function(e,n){var r=di[e]||(di[e]=[]);~r.indexOf(n)||r.push(n)},removeEventListener:function(e,n){var r=di[e],o=r&&r.indexOf(n);o>=0&&r.splice(o,1)},utils:{wrap:pT,wrapYoyo:hT,distribute:hh,random:bh,snap:gh,normalize:mT,getUnit:lt,clamp:cT,splitColor:vh,toArray:Vt,selector:fl,mapRange:xh,pipe:dT,unitize:fT,interpolate:gT,shuffle:ph},install:nh,effects:za,ticker:Rt,updateRoot:Ct.updateRoot,plugins:wt,globalTimeline:Pe,core:{PropTween:yt,globals:rh,Tween:ze,Timeline:Ct,Animation:ps,getCache:Tr,_removeLinkedListItem:Yi,reverting:function(){return rt},context:function(e){return e&&Re&&(Re.data.push(e),e._ctx=Re),Re},suppressOverwrites:function(e){return Ic=e}}};vt("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return Ai[t]=ze[t]});Rt.add(Ct.updateRoot);lo=Ai.to({},{duration:0});var MT=function(e,n){for(var r=e._pt;r&&r.p!==n&&r.op!==n&&r.fp!==n;)r=r._next;return r},FT=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=MT(i,o)),i&&i.modifier&&i.modifier(n[o],e,r[s],o))},Xa=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={},vt(s,function(f){return c[f]=1}),s=c),n){c={};for(u in s)c[u]=n(s[u]);s=c}FT(a,s)}}}},Lt=Ai.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)}},Xa("roundProps",ml),Xa("modifiers"),Xa("snap",gh))||Ai;ze.version=Ct.version=Lt.version="3.15.0";th=1;Rc()&&bo();xe.Power0;xe.Power1;xe.Power2;xe.Power3;xe.Power4;xe.Linear;xe.Quad;xe.Cubic;xe.Quart;xe.Quint;xe.Strong;xe.Elastic;xe.Back;xe.SteppedEase;xe.Bounce;xe.Sine;xe.Expo;xe.Circ;/*!
|
|
8
|
+
*/var Dt={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},cs={duration:.5,overwrite:!1,delay:0},wc,rt,we,zt=1e8,Le=1/zt,al=Math.PI*2,WA=al/4,XA=0,eh=Math.sqrt,YA=Math.cos,KA=Math.sin,qe=function(e){return typeof e=="string"},je=function(e){return typeof e=="function"},Rn=function(e){return typeof e=="number"},Rc=function(e){return typeof e>"u"},mn=function(e){return typeof e=="object"},_t=function(e){return e!==!1},Nc=function(){return typeof window<"u"},Zs=function(e){return je(e)||qe(e)},th=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},ct=Array.isArray,qA=/random\([^)]+\)/g,ZA=/,\s*/g,um=/(?:-?\.?\d|\.)+/gi,nh=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,ao=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,za=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,rh=/[+-]=-?[.\d]+/,QA=/[^,'"\[\]\s]+/gi,JA=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Oe,un,ll,Dc,Pt={},Si={},oh,sh=function(e){return(Si=po(e,Pt))&&Tt},Oc=function(e,n){return console.warn("Invalid property",e,"set to",n,"Missing plugin? gsap.registerPlugin()")},us=function(e,n){return!n&&console.warn(e)},ih=function(e,n){return e&&(Pt[e]=n)&&Si&&(Si[e]=n)||Pt},ds=function(){return 0},eT={suppressEvents:!0,isStart:!0,kill:!1},ui={suppressEvents:!0,kill:!1},tT={suppressEvents:!0},Pc={},Zn=[],cl={},ah,It={},Va={},dm=30,di=[],kc="",Bc=function(e){var n=e[0],r,o;if(mn(n)||je(n)||(e=[e]),!(r=(n._gsap||{}).harness)){for(o=di.length;o--&&!di[o].targetTest(n););r=di[o]}for(o=e.length;o--;)e[o]&&(e[o]._gsap||(e[o]._gsap=new wh(e[o],r)))||e.splice(o,1);return e},Ar=function(e){return e._gsap||Bc(Vt(e))[0]._gsap},lh=function(e,n,r){return(r=e[n])&&je(r)?e[n]():Rc(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},nT=function(e,n){for(var r=n.length,o=0;e.indexOf(n[o])<0&&++o<r;);return o<r},vi=function(){var e=Zn.length,n=Zn.slice(0),r,o;for(cl={},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)},jc=function(e){return!!(e._initted||e._startAt||e.add)},ch=function(e,n,r,o){Zn.length&&!rt&&vi(),e.render(n,r,!!(rt&&n<0&&jc(e))),Zn.length&&!rt&&vi()},uh=function(e){var n=parseFloat(e);return(n||n===0)&&(e+"").match(QA).length<2?n:qe(e)?e.trim():e},dh=function(e){return e},kt=function(e,n){for(var r in n)r in e||(e[r]=n[r]);return e},rT=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},fm=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},yi=function(e,n){var r={},o;for(o in e)o in n||(r[o]=e[o]);return r},rs=function(e){var n=e.parent||Oe,r=e.keyframes?rT(ct(e.keyframes)):kt;if(_t(e.inherit))for(;n;)r(e,n.vars.defaults),n=n.parent||n._dp;return e},oT=function(e,n){for(var r=e.length,o=r===n.length;o&&r--&&e[r]===n[r];);return r<0},fh=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},Ki=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},Tr=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},sT=function(e){for(var n=e.parent;n&&n.parent;)n._dirty=1,n.totalDuration(),n=n.parent;return e},ul=function(e,n,r,o){return e._startAt&&(rt?e._startAt.revert(ui):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(n,!0,o))},iT=function t(e){return!e||e._ts&&t(e.parent)},mm=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},Ai=function(e,n){return(e-n._start)*n._ts+(n._ts>=0?0:n._dirty?n.totalDuration():n._tDur)},qi=function(e){return e._end=De(e._start+(e._tDur/Math.abs(e._ts||e._rts||Le)||0))},Zi=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)),qi(e),r._dirty||Tr(r,e)),e},mh=function(e,n){var r;if((n._time||!n._dur&&n._initted||n._start<e._time&&(n._dur||!n.add))&&(r=Ai(e.rawTime(),n),(!n._dur||xs(0,n.totalDuration(),r)-n._tTime>Le)&&n.render(r,!0)),Tr(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=De((Rn(r)?r:r||e!==Oe?Ht(e,r,n):e._time)+n._delay),n._end=De(n._start+(n.totalDuration()/Math.abs(n.timeScale())||0)),fh(e,n,"_first","_last",e._sort?"_start":0),dl(n)||(e._recent=n),o||mh(e,n),e._ts<0&&Zi(e,e._tTime),e},ph=function(e,n){return(Pt.ScrollTrigger||Oc("scrollTrigger",n))&&Pt.ScrollTrigger.create(n,e)},hh=function(e,n,r,o,s){if(Fc(e,n,s),!e._initted)return 1;if(!r&&e._pt&&!rt&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&ah!==wt.frame)return Zn.push(e),e._lazy=[s,o],1},aT=function t(e){var n=e.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||t(n))},dl=function(e){var n=e.data;return n==="isFromStart"||n==="isStart"},lT=function(e,n,r,o){var s=e.ratio,i=n<0||!n&&(!e._start&&aT(e)&&!(!e._initted&&dl(e))||(e._ts<0||e._dp._ts<0)&&!dl(e))?0:1,a=e._rDelay,c=0,u,f,m;if(a&&e._repeat&&(c=xs(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&&hh(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&&ul(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)},cT=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&&Zi(e,e._tTime=e._tDur*a),e.parent&&qi(e),r||Tr(e.parent,e),e},pm=function(e){return e instanceof Ct?Tr(e):go(e,e._dur)},uT={_start:0,endTime:ds,totalDuration:ds},Ht=function t(e,n,r){var o=e.labels,s=e._recent||uT,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},os=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},xs=function(e,n,r){return r<e?e:r>n?n:r},lt=function(e,n){return!qe(e)||!(n=JA.exec(e))?"":n[1]},dT=function(e,n,r){return sr(r,function(o){return xs(e,n,o)})},fl=[].slice,gh=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},fT=function(e,n,r){return r===void 0&&(r=[]),e.forEach(function(o){var s;return qe(o)&&!n||gh(o,1)?(s=r).push.apply(s,Vt(o)):r.push(o)})||r},Vt=function(e,n,r){return we&&!n&&we.selector?we.selector(e):qe(e)&&!r&&(ll||!Co())?fl.call((n||Dc).querySelectorAll(e),0):ct(e)?fT(e,r):gh(e)?fl.call(e,0):e?[e]:[]},ml=function(e){return e=Vt(e)[0]||us("Invalid scope")||{},function(n){var r=e.current||e.nativeElement||e;return Vt(n,r.querySelectorAll?r:r===e?us("Invalid scope")||Dc.createElement("div"):e)}},Ch=function(e){return e.sort(function(){return .5-Math.random()})},bh=function(e){if(je(e))return e;var n=mn(e)?e:{each:e},r=Lr(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,C,g){var h=(g||n).length,b=i[h],x,_,v,y,S,T,L,A,E;if(!b){if(E=n.grid==="auto"?0:(n.grid||[1,zt])[1],!E){for(L=-zt;L<(L=g[E++].getBoundingClientRect().left)&&E<h;);E<h&&E--}for(b=i[h]=[],x=c?Math.min(E,h)*f-.5:o%E,_=E===zt?0:c?h*m/E-.5:o/E|0,L=0,A=zt,T=0;T<h;T++)v=T%E-x,y=_-(T/E|0),b[T]=S=u?Math.abs(u==="y"?y:v):eh(v*v+y*y),S>L&&(L=S),S<A&&(A=S);o==="random"&&Ch(b),b.max=L-A,b.min=A,b.v=h=(parseFloat(n.amount)||parseFloat(n.each)*(E>h?h-1:u?u==="y"?h/E:E:Math.max(E,h/E))||0)*(o==="edges"?-1:1),b.b=h<0?s-h:s,b.u=lt(n.amount||n.each)||0,r=r&&h<0?TT(r):r}return h=(b[p]-b.min)/b.max||0,De(b.b+(r?r(h):h)*b.v)+b.u}},pl=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))}},xh=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=pl(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,C;m--;)s?(p=e[m].x-a,C=e[m].y-c,p=p*p+C*C):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)}:pl(e))},_h=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})},mT=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)}},pT=function(e,n){return function(r){return e(parseFloat(r))+(n||lt(r))}},hT=function(e,n,r){return vh(e,n,0,1,r)},Sh=function(e,n,r){return sr(r,function(o){return e[~~n(o)]})},gT=function t(e,n,r){var o=n-e;return ct(e)?Sh(e,t(0,e.length),n):sr(r,function(s){return(o+(s-e)%o)%o+e})},CT=function t(e,n,r){var o=n-e,s=o*2;return ct(e)?Sh(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)})},fs=function(e){return e.replace(qA,function(n){var r=n.indexOf("[")+1,o=n.substring(r||7,r?n.indexOf("]"):n.length-1).split(ZA);return _h(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)})},bT=function t(e,n,r,o){var s=isNaN(e+n)?0:function(C){return(1-C)*e+C*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)Mc.call(a,e,c,"get",n[c]);s=function(g){return zc(g,a)||(i?e.p:e)}}}return sr(r,s)},hm=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=we,a=e._ctx,c,u,f;if(s)return c=o[n+"Params"],u=o.callbackScope||e,r&&Zn.length&&vi(),a&&(we=a),f=c?s.apply(u,c):s.call(u),we=i,f},ts=function(e){return tr(e),e.scrollTrigger&&e.scrollTrigger.kill(!!rt),e.progress()<1&&Rt(e,"onInterrupt"),e},lo,yh=[],Ah=function(e){if(e)if(e=!e.name&&e.default||e,Nc()||e.headless){var n=e.name,r=je(e),o=n&&!r&&e.init?function(){this._props=[]}:e,s={init:ds,render:zc,add:Mc,kill:kT,modifier:PT,rawVars:0},i={targetTest:0,get:0,getSetter:Hc,aliases:{},register:0};if(Co(),e!==o){if(It[n])return;kt(o,kt(yi(e,s),i)),po(o.prototype,po(s,yi(e,i))),It[o.prop=n]=o,e.targetTest&&(di.push(o),Pc[n]=1),n=(n==="css"?"CSS":n.charAt(0).toUpperCase()+n.substr(1))+"Plugin"}ih(n,o),e.register&&e.register(Tt,o,vt)}else yh.push(e)},Te=255,ns={aqua:[0,Te,Te],lime:[0,Te,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Te],navy:[0,0,128],white:[Te,Te,Te],olive:[128,128,0],yellow:[Te,Te,0],orange:[Te,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Te,0,0],pink:[Te,192,203],cyan:[0,Te,Te],transparent:[Te,Te,Te,0]},Ua=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)*Te+.5|0},Th=function(e,n,r){var o=e?Rn(e)?[e>>16,e>>8&Te,e&Te]:0:ns.black,s,i,a,c,u,f,m,p,C,g;if(!o){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),ns[e])o=ns[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&Te,o&Te,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),o=[e>>16,e>>8&Te,e&Te]}else if(e.substr(0,3)==="hsl"){if(o=g=e.match(um),!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]=Ua(c+1/3,s,i),o[1]=Ua(c,s,i),o[2]=Ua(c-1/3,s,i);else if(~e.indexOf("="))return o=e.match(nh),r&&o.length<4&&(o[3]=1),o}else o=e.match(um)||ns.transparent;o=o.map(Number)}return n&&!g&&(s=o[0]/Te,i=o[1]/Te,a=o[2]/Te,m=Math.max(s,i,a),p=Math.min(s,i,a),f=(m+p)/2,m===p?c=u=0:(C=m-p,u=f>.5?C/(2-m-p):C/(m+p),c=m===s?(i-a)/C+(i<a?6:0):m===i?(a-s)/C+2:(s-i)/C+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},Lh=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},gm=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=Th(p,n,1))&&i+(n?p[0]+","+p[1]+"%,"+p[2]+"%,"+p[3]:p.join(","))+")"}),r&&(f=Lh(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 ns)t+="|"+e+"\\b";return new RegExp(t+")","gi")})(),xT=/hsl[a]?\(/,Eh=function(e){var n=e.join(" "),r;if(Qn.lastIndex=0,Qn.test(n))return r=xT.test(n),e[1]=gm(e[1],r),e[0]=gm(e[0],r,Lh(e[1])),!0},ms,wt=(function(){var t=Date.now,e=500,n=33,r=t(),o=r,s=1e3/240,i=s,a=[],c,u,f,m,p,C,g=function h(b){var x=t()-o,_=b===!0,v,y,S,T;if((x>e||x<0)&&(r+=x-n),o+=x,S=o-r,v=S-i,(v>0||_)&&(T=++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(C=0;C<a.length;C++)a[C](S,p,T,b)};return m={time:0,frame:0,tick:function(){g(!0)},deltaRatio:function(b){return p/(1e3/(b||60))},wake:function(){oh&&(!ll&&Nc()&&(un=ll=window,Dc=un.document||{},Pt.gsap=Tt,(un.gsapVersions||(un.gsapVersions=[])).push(Tt.version),sh(Si||un.GreenSockGlobals||!un.gsap&&un||{}),yh.forEach(Ah)),f=typeof requestAnimationFrame<"u"&&requestAnimationFrame,c&&m.sleep(),u=f||function(b){return setTimeout(b,i-m.time*1e3+1|0)},ms=1,g(2))},sleep:function(){(f?cancelAnimationFrame:clearTimeout)(c),ms=0,u=ds},lagSmoothing:function(b,x){e=b||1/0,n=Math.min(x||33,e)},fps:function(b){s=1e3/(b||240),i=m.time*1e3+s},add:function(b,x,_){var v=x?function(y,S,T,L){b(y,S,T,L),m.remove(v)}:b;return m.remove(b),a[_?"unshift":"push"](v),Co(),v},remove:function(b,x){~(x=a.indexOf(b))&&a.splice(x,1)&&C>=x&&C--},_listeners:a},m})(),Co=function(){return!ms&&wt.wake()},xe={},_T=/^[\d.\-M][\d.\-,\s]/,ST=/["']/g,vT=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(ST,"").trim():+u,o=c.substr(a+1).trim();return n},yT=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)},AT=function(e){var n=(e+"").split("("),r=xe[n[0]];return r&&n.length>1&&r.config?r.config.apply(null,~e.indexOf("{")?[vT(n[1])]:yT(e).split(",").map(uh)):xe._CE&&_T.test(e)?xe._CE("",e):r},TT=function(e){return function(n){return 1-e(1-n)}},Lr=function(e,n){return e&&(je(e)?e:xe[e]||AT(e))||n},kr=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){xe[a]=Pt[a]=s,xe[i=a.toLowerCase()]=r;for(var c in s)xe[i+(c==="easeIn"?".in":c==="easeOut"?".out":".inOut")]=xe[a+"."+c]=s[c]}),s},Ih=function(e){return function(n){return n<.5?(1-e(1-n*2))/2:.5+e((n-.5)*2)/2}},$a=function t(e,n,r){var o=n>=1?n:1,s=(r||(e?.3:.45))/(n<1?n:1),i=s/al*(Math.asin(1/o)||0),a=function(f){return f===1?1:o*Math.pow(2,-10*f)*KA((f-i)*s)+1},c=e==="out"?a:e==="in"?function(u){return 1-a(1-u)}:Ih(a);return s=al/s,c.config=function(u,f){return t(e,u,f)},c},Wa=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)}:Ih(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;kr(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})});xe.Linear.easeNone=xe.none=xe.Linear.easeIn;kr("Elastic",$a("in"),$a("out"),$a());(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};kr("Bounce",function(i){return 1-s(1-i)},s)})(7.5625,2.75);kr("Expo",function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)});kr("Circ",function(t){return-(eh(1-t*t)-1)});kr("Sine",function(t){return t===1?1:-YA(t*WA)+1});kr("Back",Wa("in"),Wa("out"),Wa());xe.SteppedEase=xe.steps=Pt.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*xs(0,i,a)|0)+s)*r}}};cs.ease=xe["quad.out"];St("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return kc+=t+","+t+"Params,"});var wh=function(e,n){this.id=XA++,e._gsap=this,this.target=e,this.harness=n,this.get=n?n.get:lh,this.set=n?n.getSetter:Hc},ps=(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,we&&(this._ctx=we,we.data.push(this)),ms||wt.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(Co(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(Zi(this,r),!s._dp||s.parent||mh(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),ch(this,r,o)),this},e.time=function(r,o){return arguments.length?this.totalTime(Math.min(this.totalDuration(),r+mm(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)+mm(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?Ai(this.parent._time,this):this._tTime;return this._rts=+r||0,this._ts=this._ps||r===-Le?0:this._rts,this.totalTime(xs(-Math.abs(this._delay),this.totalDuration(),s),o!==!1),qi(this),sT(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):(Co(),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=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?Ai(o.rawTime(r),this):this._tTime:this._tTime},e.revert=function(r){r===void 0&&(r=tT);var o=rt;return rt=r,jc(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,pm(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(r){if(arguments.length){var o=this._time;return this._rDelay=r,pm(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=je(r)?r:dh,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(){ts(this)},t})();kt(ps.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 Ct=(function(t){Jp(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,En(s),o),r.reversed&&s.reverse(),r.paused&&s.paused(!0),r.scrollTrigger&&ph(En(s),r.scrollTrigger),s}var n=e.prototype;return n.to=function(o,s,i){return os(0,arguments,this),this},n.from=function(o,s,i){return os(1,arguments,this),this},n.fromTo=function(o,s,i,a){return os(2,arguments,this),this},n.set=function(o,s,i){return s.duration=0,s.parent=this,rs(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,rs(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,rs(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,C,g,h,b,x,_,v,y,S,T,L;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,x=!v,m&&(u||(a=this._zTime),(o||!s)&&(this._zTime=o)),this._repeat){if(T=this._yoyo,b=u+this._rDelay,this._repeat<-1&&o<0)return this.totalTime(b*100+o,s,i);if(p=De(f%b),f===c?(h=this._repeat,p=u):(S=De(f/b),h=~~S,h&&h===S&&(p=u,h--),p>u&&(p=u)),S=ho(this._tTime,b),!a&&this._tTime&&S!==h&&this._tTime-S*b-this._dur<=0&&(S=h),T&&h&1&&(p=u-p,L=1),h!==S&&!this._lock){var A=T&&S&1,E=A===(T&&h&1);if(h<S&&(A=!A),a=A?0:f%u?u:f,this._lock=1,this.render(a||(L?0:De(h*b)),s,!u)._lock=0,this._tTime=f,!s&&this.parent&&Rt(this,"onRepeat"),this.vars.repeatRefresh&&!L&&(this.invalidate()._lock=1,S=h),a&&a!==this._time||x!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,c=this._tDur,E&&(this._lock=2,a=A?u:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!L&&this.invalidate()),this._lock=0,!this._ts&&!x)return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(_=cT(this,De(a),De(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&&(Rt(this,"onStart"),this._tTime!==f))return this;if(p>=a&&o>=0)for(C=this._first;C;){if(g=C._next,(C._act||p>=C._start)&&C._ts&&_!==C){if(C.parent!==this)return this.render(o,s,i);if(C.render(C._ts>0?(p-C._start)*C._ts:(C._dirty?C.totalDuration():C._tDur)+(p-C._start)*C._ts,s,i),p!==this._time||!this._ts&&!x){_=0,g&&(f+=this._zTime=-Le);break}}C=g}else{C=this._last;for(var I=o<0?o:p;C;){if(g=C._prev,(C._act||I<=C._end)&&C._ts&&_!==C){if(C.parent!==this)return this.render(o,s,i);if(C.render(C._ts>0?(I-C._start)*C._ts:(C._dirty?C.totalDuration():C._tDur)+(I-C._start)*C._ts,s,i||rt&&jc(C)),p!==this._time||!this._ts&&!x){_=0,g&&(f+=this._zTime=I?-Le:Le);break}}C=g}}if(_&&!s&&(this.pause(),_.render(p>=a?0:-Le)._zTime=p>=a?1:-1,this._ts))return this._start=y,qi(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(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)&&(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 ps)){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&&Ki(this,o),o===this._recent&&(this._recent=this._last),Tr(this))},n.totalTime=function(o,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=De(wt.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||ds,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?nT(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,C,g=ze.to(i,kt({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(),!C){var b=s.duration||Math.abs((a-(u&&"time"in u?u.time:i._time))/i.timeScale());g._dur!==b&&go(g,b,0,1).render(g._time,!0,!0),C=1}f&&f.apply(g,m||[])}},s));return p?g.render(0):g},n.tweenFromTo=function(o,s,i){return this.tweenTo(s,kt({startAt:{time:Ht(this,o)}},i))},n.recent=function(){return this._recent},n.nextLabel=function(o){return o===void 0&&(o=this._time),hm(this,Ht(this,o))},n.previousLabel=function(o){return o===void 0&&(o=this._time),hm(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=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 Tr(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={}),Tr(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===Oe&&i._time>s?i._time:s,1,1),i._dirty=0}return i._tDur},e.updateRoot=function(o){if(Oe._ts&&(ch(Oe,Ai(o,Oe)),ah=wt.frame),wt.frame>=dm){dm+=Dt.autoSleep||120;var s=Oe._first;if((!s||!s._ts)&&Dt.autoSleep&&wt._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||wt.sleep()}}},e})(ps);kt(Ct.prototype,{_lock:0,_hasPause:0,_forcing:0});var LT=function(e,n,r,o,s,i,a){var c=new vt(this._pt,e,n,0,1,kh,null,s),u=0,f=0,m,p,C,g,h,b,x,_;for(c.b=r,c.e=o,r+="",o+="",(x=~o.indexOf("random("))&&(o=fs(o)),i&&(_=[r,o],i(_,e,n),r=_[0],o=_[1]),p=r.match(za)||[];m=za.exec(o);)g=m[0],h=o.substring(u,m.index),C?C=(C+1)%5:h.substr(-5)==="rgba("&&(C=1),g!==p[f++]&&(b=parseFloat(p[f-1])||0,c._pt={_next:c._pt,p:h||f===1?h:",",s:b,c:g.charAt(1)==="="?co(b,g)-b:parseFloat(g)-b,m:C&&C<4?Math.round:0},u=za.lastIndex);return c.c=u<o.length?o.substring(u,o.length):"",c.fp=a,(rh.test(o)||x)&&(c.e=0),this._pt=c,c},Mc=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,C=je(m)?u?NT:Oh:Gc,g;if(qe(o)&&(~o.indexOf("random(")&&(o=fs(o)),o.charAt(1)==="="&&(g=co(p,o)+(lt(p)||0),(g||g===0)&&(o=g))),!f||p!==o||hl)return!isNaN(p*o)&&o!==""?(g=new vt(this._pt,e,n,+p||0,o-(p||0),typeof m=="boolean"?OT:Ph,0,C),u&&(g.fp=u),a&&g.modifier(a,this,e),this._pt=g):(!m&&!(n in e)&&Oc(n,o),LT.call(this,e,n,p,o,C,c||Dt.stringFilter,u))},ET=function(e,n,r,o,s){if(je(e)&&(e=ss(e,s,n,r,o)),!mn(e)||e.style&&e.nodeType||ct(e)||th(e))return qe(e)?ss(e,s,n,r,o):e;var i={},a;for(a in e)i[a]=ss(e[a],s,n,r,o);return i},Rh=function(e,n,r,o,s,i){var a,c,u,f;if(It[e]&&(a=new It[e]).init(s,a.rawVars?n[e]:ET(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,hl,Fc=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,C=o.autoRevert,g=e._dur,h=e._startAt,b=e._targets,x=e.parent,_=x&&x.data==="nested"?x.vars.targets:b,v=e._overwrite==="auto"&&!wc,y=e.timeline,S=o.easeReverse||m,T,L,A,E,I,w,N,O,j,k,G,D,P;if(y&&(!p||!s)&&(s="none"),e._ease=Lr(s,cs.ease),e._rEase=S&&(Lr(S)||e._ease),e._from=!y&&!!o.runBackwards,e._from&&(e.ratio=1),!y||p&&!o.stagger){if(O=b[0]?Ar(b[0]).harness:0,D=O&&o[O.prop],T=yi(o,Pc),h&&(h._zTime<0&&h.progress(1),n<0&&f&&a&&!C?h.render(-1,!0):h.revert(f&&g?ui:eT),h._lazy=0),i){if(tr(e._startAt=ze.set(b,kt({data:"isStart",overwrite:!1,parent:x,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&&!C)&&e._startAt.revert(ui),a&&g&&n<=0&&r<=0){n&&(e._zTime=n);return}}else if(f&&g&&!h){if(n&&(a=!1),A=kt({overwrite:!1,data:"isFromStart",lazy:a&&!h&&_t(c),immediateRender:a,stagger:0,parent:x},T),D&&(A[O.prop]=D),tr(e._startAt=ze.set(b,A)),e._startAt._dp=0,e._startAt._sat=e,n<0&&(rt?e._startAt.revert(ui):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,L=0;L<b.length;L++){if(I=b[L],N=I._gsap||Bc(b)[L]._gsap,e._ptLookup[L]=k={},cl[N.id]&&Zn.length&&vi(),G=_===b?L:_.indexOf(I),O&&(j=new O).init(I,D||T,e,G,_)!==!1&&(e._pt=E=new vt(e._pt,I,j.name,0,1,j.render,j,0,j.priority),j._props.forEach(function(F){k[F]=E}),j.priority&&(w=1)),!O||D)for(A in T)It[A]&&(j=Rh(A,T,e,G,I,_))?j.priority&&(w=1):k[A]=E=Mc.call(e,I,A,"get",T[A],G,_,0,o.stringFilter);e._op&&e._op[L]&&e.kill(I,e._op[L]),v&&e._pt&&(Yn=e,Oe.killTweensOf(I,k,e.globalTime(n)),P=!e.parent,Yn=0),e._pt&&c&&(cl[N.id]=1)}w&&Bh(e),e._onInit&&e._onInit(e)}e._onUpdate=u,e._initted=(!e._op||e._pt)&&!P,p&&n<=0&&y.render(zt,!0,!0)},IT=function(e,n,r,o,s,i,a,c){var u=(e._pt&&e._ptCache||(e._ptCache={}))[n],f,m,p,C;if(!u)for(u=e._ptCache[n]=[],p=e._ptLookup,C=e._targets.length;C--;){if(f=p[C][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 hl=1,e.vars[n]="+=0",Fc(e,a),hl=0,c?us(n+" not eligible for reset. Try splitting into individual properties"):1;u.push(f)}for(C=u.length;C--;)m=u[C],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))},wT=function(e,n){var r=e[0]?Ar(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},RT=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})},ss=function(e,n,r,o,s){return je(e)?e.call(n,r,o,s):qe(e)&&~e.indexOf("random(")?fs(e):e},Nh=kc+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",Dh={};St(Nh+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return Dh[t]=1});var ze=(function(t){Jp(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:rs(o))||this;var c=a.vars,u=c.duration,f=c.delay,m=c.immediateRender,p=c.stagger,C=c.overwrite,g=c.keyframes,h=c.defaults,b=c.scrollTrigger,x=o.parent||Oe,_=(ct(r)||th(r)?Rn(r[0]):"length"in o)?[r]:Vt(r),v,y,S,T,L,A,E,I;if(a._targets=_.length?Bc(_):us("GSAP target "+r+" not found. https://gsap.com",!Dt.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=C,g||p||Zs(u)||Zs(f)){o=a.vars;var w=o.easeReverse||o.yoyoEase;if(v=a.timeline=new Ct({data:"nested",defaults:h||{},targets:x&&x.data==="nested"?x.vars.targets:_}),v.kill(),v.parent=v._dp=En(a),v._start=0,p||Zs(u)||Zs(f)){if(T=_.length,E=p&&bh(p),mn(p))for(L in p)~Nh.indexOf(L)&&(I||(I={}),I[L]=p[L]);for(y=0;y<T;y++)S=yi(o,Dh),S.stagger=0,w&&(S.easeReverse=w),I&&po(S,I),A=_[y],S.duration=+ss(u,En(a),y,A,_),S.delay=(+ss(f,En(a),y,A,_)||0)-a._delay,!p&&T===1&&S.delay&&(a._delay=f=S.delay,a._start+=f,S.delay=0),v.to(A,S,E?E(y,A,_):0),v._ease=xe.none;v.duration()?u=f=0:a.timeline=0}else if(g){rs(kt(v.vars.defaults,{ease:"none"})),v._ease=Lr(g.ease||o.ease||"none");var N=0,O,j,k;if(ct(g))g.forEach(function(G){return v.to(_,G,">")}),v.duration();else{S={};for(L in g)L==="ease"||L==="easeEach"||RT(L,g[L],S,g.easeEach);for(L in S)for(O=S[L].sort(function(G,D){return G.t-D.t}),N=0,y=0;y<O.length;y++)j=O[y],k={ease:j.e,duration:(j.t-(y?O[y-1].t:0))/100*u},k[L]=j.v,v.to(_,k,N),N+=k.duration;v.duration()<u&&v.to({},{duration:u-v.duration()})}}u||a.duration(u=v.duration())}else a.timeline=0;return C===!0&&!wc&&(Yn=En(a),Oe.killTweensOf(_),Yn=0),dn(x,En(a),s),o.reversed&&a.reverse(),o.paused&&a.paused(!0),(m||!u&&!g&&a._start===De(x._time)&&_t(m)&&iT(En(a))&&x.data!=="nested")&&(a._tTime=-Le,a.render(Math.max(0,-f)||0)),b&&ph(En(a),b),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,C,g,h,b,x,_,v;if(!u)lT(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=De(m%h),m===c?(g=this._repeat,p=u):(b=De(m/h),g=~~b,g&&g===b?(p=u,g--):p>u&&(p=u)),x=this._yoyo&&g&1,x&&(p=u-p),b=ho(this._tTime,h),p===a&&!i&&this._initted&&g===b)return this._tTime=m,this;g!==b&&this.vars.repeatRefresh&&!x&&!this._lock&&p!==h&&this._initted&&(this._lock=i=1,this.render(De(h*g),!0).invalidate()._lock=0)}if(!this._initted){if(hh(this,f?o:p,i,s,m))return this._tTime=0,this;if(a!==this._time&&!(i&&this.vars.repeatRefresh&&g!==b))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&&!b&&(Rt(this,"onStart"),this._tTime!==m))return this;for(C=this._pt;C;)C.r(_,C.d),C=C._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&&ul(this,o,s,i),Rt(this,"onUpdate")),this._repeat&&g!==b&&this.vars.onRepeat&&!s&&this.parent&&Rt(this,"onRepeat"),(m===this._tDur||!m)&&this._tTime===m&&(f&&!this._onUpdate&&ul(this,o,!0,!0),(o||!u)&&(m===this._tDur&&this._ts>0||!m&&this._ts<0)&&tr(this,1),!s&&!(f&&!a)&&(m||a||x)&&(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){ms||wt.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),f;return this._initted||Fc(this,u),f=this._ease(u/this._dur),IT(this,o,s,i,a,f,u,c)?this.resetTo(o,s,i,a,1):(Zi(this,0),this.parent||fh(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?ts(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||ts(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,C,g,h,b,x;if((!s||s==="all")&&oT(a,c))return s==="all"&&(this._pt=0),ts(this);for(m=this._op=this._op||[],s!=="all"&&(qe(s)&&(h={},St(s,function(_){return h[_]=1}),s=h),s=wT(a,s)),x=a.length;x--;)if(~c.indexOf(a[x])){p=u[x],s==="all"?(m[x]=s,g=p,C={}):(C=m[x]=m[x]||{},g=s);for(h in g)b=p&&p[h],b&&((!("kill"in b.d)||b.d.kill(h)===!0)&&Ki(this,b,"_pt"),delete p[h]),C!=="all"&&(C[h]=1)}return this._initted&&!this._pt&&f&&ts(this),this},e.to=function(o,s){return new e(o,s,arguments[2])},e.from=function(o,s){return os(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 os(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})(ps);kt(ze.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});St("staggerTo,staggerFrom,staggerFromTo",function(t){ze[t]=function(){var e=new Ct,n=fl.call(arguments,0);return n.splice(t==="staggerFromTo"?5:4,0,0),e[t].apply(e,n)}});var Gc=function(e,n,r){return e[n]=r},Oh=function(e,n,r){return e[n](r)},NT=function(e,n,r,o){return e[n](o.fp,r)},DT=function(e,n,r){return e.setAttribute(n,r)},Hc=function(e,n){return je(e[n])?Oh:Rc(e[n])&&e.setAttribute?DT:Gc},Ph=function(e,n){return n.set(n.t,n.p,Math.round((n.s+n.c*e)*1e6)/1e6,n)},OT=function(e,n){return n.set(n.t,n.p,!!(n.s+n.c*e),n)},kh=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)},zc=function(e,n){for(var r=n._pt;r;)r.r(e,r.d),r=r._next},PT=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},kT=function(e){for(var n=this._pt,r,o;n;)o=n._next,n.p===e&&!n.op||n.op===e?Ki(this,n,"_pt"):n.dep||(r=1),n=o;return!r},BT=function(e,n,r,o){o.mSet(e,n,o.m.call(o.tween,r,o.mt),o)},Bh=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||Ph,this.d=c||this,this.set=u||Gc,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=BT,this.m=r,this.mt=s,this.tween=o},t})();St(kc+"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 Pc[t]=1});Pt.TweenMax=Pt.TweenLite=ze;Pt.TimelineLite=Pt.TimelineMax=Ct;Oe=new Ct({sortChildren:!1,defaults:cs,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Dt.stringFilter=Eh;var Er=[],fi={},jT=[],Cm=0,MT=0,Xa=function(e){return(fi[e]||jT).map(function(n){return n()})},gl=function(){var e=Date.now(),n=[];e-Cm>2&&(Xa("matchMediaInit"),Er.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))}),Xa("matchMediaRevert"),n.forEach(function(r){return r.onMatch(r,function(o){return r.add(null,o)})}),Cm=e,Xa("matchMedia"))},jh=(function(){function t(n,r){this.selector=r&&ml(r),this.data=[],this._r=[],this.isReverted=!1,this.id=MT++,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=we,f=i.selector,m;return u&&u!==i&&u.data.push(i),s&&(i.selector=ml(s)),we=i,m=o.apply(i,arguments),je(m)&&i._r.push(m),we=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=we;we=null,r(this),we=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 Ct?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=Er.length;i--;)Er[i].id===this.id&&Er.splice(i,1)},e.revert=function(r){this.kill(r||{})},t})(),FT=(function(){function t(n){this.contexts=[],this.scope=n,we&&we.data.push(this)}var e=t.prototype;return e.add=function(r,o,s){mn(r)||(r={matches:r});var i=new jh(0,s||this.scope),a=i.conditions={},c,u,f;we&&!i.selector&&(i.selector=we.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&&(Er.indexOf(i)<0&&Er.push(i),(a[u]=c.matches)&&(f=1),c.addListener?c.addListener(gl):c.addEventListener("change",gl)));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})(),Ti={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 Ah(o)})},timeline:function(e){return new Ct(e)},getTweensOf:function(e,n){return Oe.getTweensOf(e,n)},getProperty:function(e,n,r,o){qe(e)&&(e=Vt(e)[0]);var s=Ar(e||{}).get,i=r?dh:uh;return r==="native"&&(r=""),e&&(n?i((It[n]&&It[n].get||s)(e,n,r,o)):function(a,c,u){return i((It[a]&&It[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 Tt.quickSetter(f,n,r)}),s=o.length;return function(f){for(var m=s;m--;)o[m](f)}}e=e[0]||{};var i=It[n],a=Ar(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&&zc(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=Tt.to(e,kt((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=Lr(e.ease,cs.ease)),fm(cs,e||{})},config:function(e){return fm(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&&!It[a]&&!Pt[a]&&us(n+" effect requires "+a+" plugin.")}),Va[n]=function(a,c,u){return r(Vt(a),kt(c||{},s),u)},i&&(Ct.prototype[n]=function(a,c,u){return this.add(Va[n](a,mn(c)?c:(u=c)&&{},this),u)})},registerEase:function(e,n){xe[e]=Lr(n)},parseEase:function(e,n){return arguments.length?Lr(e,n):xe},getById:function(e){return Oe.getById(e)},exportRoot:function(e,n){e===void 0&&(e={});var r=new Ct(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 ze&&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 jh(e,n):we},matchMedia:function(e){return new FT(e)},matchMediaRefresh:function(){return Er.forEach(function(e){var n=e.conditions,r,o;for(o in n)n[o]&&(n[o]=!1,r=1);r&&e.revert()})||gl()},addEventListener:function(e,n){var r=fi[e]||(fi[e]=[]);~r.indexOf(n)||r.push(n)},removeEventListener:function(e,n){var r=fi[e],o=r&&r.indexOf(n);o>=0&&r.splice(o,1)},utils:{wrap:gT,wrapYoyo:CT,distribute:bh,random:_h,snap:xh,normalize:hT,getUnit:lt,clamp:dT,splitColor:Th,toArray:Vt,selector:ml,mapRange:vh,pipe:mT,unitize:pT,interpolate:bT,shuffle:Ch},install:sh,effects:Va,ticker:wt,updateRoot:Ct.updateRoot,plugins:It,globalTimeline:Oe,core:{PropTween:vt,globals:ih,Tween:ze,Timeline:Ct,Animation:ps,getCache:Ar,_removeLinkedListItem:Ki,reverting:function(){return rt},context:function(e){return e&&we&&(we.data.push(e),e._ctx=we),we},suppressOverwrites:function(e){return wc=e}}};St("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return Ti[t]=ze[t]});wt.add(Ct.updateRoot);lo=Ti.to({},{duration:0});var GT=function(e,n){for(var r=e._pt;r&&r.p!==n&&r.op!==n&&r.fp!==n;)r=r._next;return r},HT=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=GT(i,o)),i&&i.modifier&&i.modifier(n[o],e,r[s],o))},Ya=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}HT(a,s)}}}},Tt=Ti.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)}},Ya("roundProps",pl),Ya("modifiers"),Ya("snap",xh))||Ti;ze.version=Ct.version=Tt.version="3.15.0";oh=1;Nc()&&Co();xe.Power0;xe.Power1;xe.Power2;xe.Power3;xe.Power4;xe.Linear;xe.Quad;xe.Cubic;xe.Quart;xe.Quint;xe.Strong;xe.Elastic;xe.Back;xe.SteppedEase;xe.Bounce;xe.Sine;xe.Expo;xe.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 hm,qn,uo,zc,Ar,gm,Vc,GT=function(){return typeof window<"u"},Dn={},vr=180/Math.PI,fo=Math.PI/180,oo=Math.atan2,bm=1e8,Uc=/([A-Z])/g,HT=/(left|right|width|margin|padding|x)/i,zT=/[\s,\(]\S/,fn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},gl=function(e,n){return n.set(n.t,n.p,Math.round((n.s+n.c*e)*1e4)/1e4+n.u,n)},VT=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)},UT=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)},$T=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)},WT=function(e,n){var r=n.s+n.c*e;n.set(n.t,n.p,~~(r+(r<0?-.5:.5))+n.u,n)},kh=function(e,n){return n.set(n.t,n.p,e?n.e:n.b,n)},Bh=function(e,n){return n.set(n.t,n.p,e!==1?n.b:n.e,n)},XT=function(e,n,r){return e.style[n]=r},YT=function(e,n,r){return e.style.setProperty(n,r)},KT=function(e,n,r){return e._gsap[n]=r},qT=function(e,n,r){return e._gsap.scaleX=e._gsap.scaleY=r},ZT=function(e,n,r,o,s){var i=e._gsap;i.scaleX=i.scaleY=r,i.renderTransform(s,i)},QT=function(e,n,r,o,s){var i=e._gsap;i[n]=r,i.renderTransform(s,i)},ke="transform",At=ke+"Origin",JT=function t(e,n){var r=this,o=this.target,s=o.style,i=o._gsap;if(e in Dn&&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===At&&(this.tfm.zOrigin=i.zOrigin);else return fn.transform.split(",").forEach(function(a){return t.call(r,a,n)});if(this.props.indexOf(ke)>=0)return;i.svg&&(this.svgo=o.getAttribute("data-svg-origin"),this.props.push(At,n,"")),e=ke}(s||n)&&this.props.push(e,n,s[e])},jh=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},eL=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(Uc,"-$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=Vc(),(!s||!s.isStart)&&!r[ke]&&(jh(r),o.zOrigin&&r[At]&&(r[At]+=" "+o.zOrigin+"px",o.zOrigin=0,o.renderTransform()),o.uncache=1)}},Mh=function(e,n){var r={target:e,props:[],revert:eL,save:JT};return e._gsap||Lt.core.getCache(e),n&&e.style&&e.nodeType&&n.split(",").forEach(function(o){return r.save(o)}),r},Fh,bl=function(e,n){var r=qn.createElementNS?qn.createElementNS((n||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):qn.createElement(e);return r&&r.style?r:qn.createElement(e)},Dt=function t(e,n,r){var o=getComputedStyle(e);return o[n]||o.getPropertyValue(n.replace(Uc,"-$1").toLowerCase())||o.getPropertyValue(n)||!r&&t(e,Co(n)||n,1)||""},Cm="O,Moz,ms,Ms,Webkit".split(","),Co=function(e,n,r){var o=n||Ar,s=o.style,i=5;if(e in s&&!r)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);i--&&!(Cm[i]+e in s););return i<0?null:(i===3?"ms":i>=0?Cm[i]:"")+e},Cl=function(){GT()&&window.document&&(hm=window,qn=hm.document,uo=qn.documentElement,Ar=bl("div")||{style:{}},bl("div"),ke=Co(ke),At=ke+"Origin",Ar.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Fh=!!Co("perspective"),Vc=Lt.core.reverting,zc=1)},xm=function(e){var n=e.ownerSVGElement,r=bl("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])},Gh=function(e){var n,r;try{n=e.getBBox()}catch{n=xm(e),r=1}return n&&(n.width||n.height)||r||(n=xm(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},Hh=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&Gh(e))},rr=function(e,n){if(n){var r=e.style,o;n in Dn&&n!==At&&(n=ke),r.removeProperty?(o=n.substr(0,2),(o==="ms"||n.substr(0,6)==="webkit")&&(n="-"+n),r.removeProperty(o==="--"?n:n.replace(Uc,"-$1").toLowerCase())):r.removeAttribute(n)}},Zn=function(e,n,r,o,s,i){var a=new yt(e._pt,n,r,0,1,i?Bh:kh);return e._pt=a,a.b=o,a.e=s,e._props.push(r),a},Sm={deg:1,rad:1,turn:1},tL={grid:1,flex:1},or=function t(e,n,r,o){var s=parseFloat(r)||0,i=(r+"").trim().substr((s+"").length)||"px",a=Ar.style,c=HT.test(n),u=e.tagName.toLowerCase()==="svg",f=(u?"client":"offset")+(c?"Width":"Height"),m=100,p=o==="px",b=o==="%",g,h,C,x;if(o===i||!s||Sm[o]||Sm[i])return s;if(i!=="px"&&!p&&(s=t(e,n,r,"px")),x=e.getCTM&&Hh(e),(b||i==="%")&&(Dn[n]||~n.indexOf("adius")))return g=x?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,x&&(h=(e.ownerSVGElement||{}).parentNode),(!h||h===qn||!h.appendChild)&&(h=qn.body),C=h._gsap,C&&b&&C.width&&c&&C.time===Rt.time&&!C.uncache)return Ge(s/C.width*m);if(b&&(n==="height"||n==="width")){var _=e.style[n];e.style[n]=m+o,g=e[f],_?e.style[n]=_:rr(e,n)}else(b||i==="%")&&!tL[Dt(h,"display")]&&(a.position=Dt(e,"position")),h===e&&(a.position="static"),h.appendChild(Ar),g=Ar[f],h.removeChild(Ar),a.position="absolute";return c&&b&&(C=Tr(h),C.time=Rt.time,C.width=h[f]),Ge(p?g*s/m:g&&s?m/g*s:0)},wn=function(e,n,r,o){var s;return zc||Cl(),n in fn&&n!=="transform"&&(n=fn[n],~n.indexOf(",")&&(n=n.split(",")[0])),Dn[n]&&n!=="transform"?(s=gs(e,o),s=n!=="transformOrigin"?s[n]:s.svg?s.origin:Li(Dt(e,At))+" "+s.zOrigin+"px"):(s=e.style[n],(!s||s==="auto"||o||~(s+"").indexOf("calc("))&&(s=Ti[n]&&Ti[n](e,n,r)||Dt(e,n)||sh(e,n)||(n==="opacity"?1:0))),r&&!~(s+"").trim().indexOf(" ")?or(e,n,s,r)+r:s},nL=function(e,n,r,o){if(!r||r==="none"){var s=Co(n,e,1),i=s&&Dt(e,s,1);i&&i!==r?(n=s,r=i):n==="borderColor"&&(r=Dt(e,"borderTopColor"))}var a=new yt(this._pt,e.style,n,0,1,Dh),c=0,u=0,f,m,p,b,g,h,C,x,_,v,y,S;if(a.b=r,a.e=o,r+="",o+="",o.substring(0,6)==="var(--"&&(o=Dt(e,o.substring(4,o.indexOf(")")))),o==="auto"&&(h=e.style[n],e.style[n]=o,o=Dt(e,n)||o,h?e.style[n]=h:rr(e,n)),f=[r,o],Ah(f),r=f[0],o=f[1],p=r.match(ao)||[],S=o.match(ao)||[],S.length){for(;m=ao.exec(o);)C=m[0],_=o.substring(c,m.index),g?g=(g+1)%5:(_.substr(-5)==="rgba("||_.substr(-5)==="hsla(")&&(g=1),C!==(h=p[u++]||"")&&(b=parseFloat(h)||0,y=h.substr((b+"").length),C.charAt(1)==="="&&(C=co(b,C)+y),x=parseFloat(C),v=C.substr((x+"").length),c=ao.lastIndex-v.length,v||(v=v||Ot.units[n]||y,c===o.length&&(o+=v,a.e+=v)),y!==v&&(b=or(e,n,h,v)||0),a._pt={_next:a._pt,p:_||u===1?_:",",s:b,c:x-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"?Bh:kh;return eh.test(o)&&(a.e=0),this._pt=a,a},vm={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},rL=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]=vm[r]||r,n[1]=vm[o]||o,n.join(" ")},oL=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],Dn[a]&&(c=1,a=a==="transformOrigin"?At:ke),rr(r,a);c&&(rr(r,ke),i&&(i.svg&&r.removeAttribute("transform"),o.scale=o.rotate=o.translate="none",gs(r,1),i.uncache=1,jh(o)))}},Ti={clearProps:function(e,n,r,o,s){if(s.data!=="isFromStart"){var i=e._pt=new yt(e._pt,n,r,0,0,oL);return i.u=o,i.pr=-10,i.tween=s,e._props.push(r),1}}},hs=[1,0,0,1,0,0],zh={},Vh=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},ym=function(e){var n=Dt(e,ke);return Vh(n)?hs:n.substr(7).match(Jp).map(Ge)},$c=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"?hs:s):(s===hs&&!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:rr(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)},xl=function(e,n,r,o,s,i){var a=e._gsap,c=s||$c(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],C=c[3],x=c[4],_=c[5],v=n.split(" "),y=parseFloat(v[0])||0,S=parseFloat(v[1])||0,T,L,A,E;r?c!==hs&&(L=b*C-g*h)&&(A=y*(C/L)+S*(-h/L)+(h*_-C*x)/L,E=y*(-g/L)+S*(b/L)-(b*_-g*x)/L,y=A,S=E):(T=Gh(e),y=T.x+(~v[0].indexOf("%")?y/100*T.width:y),S=T.y+(~(v[1]||v[0]).indexOf("%")?S/100*T.height:S)),o||o!==!1&&a.smooth?(x=y-u,_=S-f,a.xOffset=m+(x*b+_*h)-x,a.yOffset=p+(x*g+_*C)-_):a.xOffset=a.yOffset=0,a.xOrigin=y,a.yOrigin=S,a.smooth=!!o,a.origin=n,a.originIsAbsolute=!!r,e.style[At]="0px 0px",i&&(Zn(i,a,"xOrigin",u,y),Zn(i,a,"yOrigin",f,S),Zn(i,a,"xOffset",m,a.xOffset),Zn(i,a,"yOffset",p,a.yOffset)),e.setAttribute("data-svg-origin",y+" "+S)},gs=function(e,n){var r=e._gsap||new Lh(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=Dt(e,At)||"0",f,m,p,b,g,h,C,x,_,v,y,S,T,L,A,E,I,w,N,O,j,k,G,D,P,F,B,$,W,M,z,H;return f=m=p=h=C=x=_=v=y=0,b=g=1,r.svg=!!(e.getCTM&&Hh(e)),c.translate&&((c.translate!=="none"||c.scale!=="none"||c.rotate!=="none")&&(o[ke]=(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[ke]!=="none"?c[ke]:"")),o.scale=o.rotate=o.translate="none"),L=$c(e,r.svg),r.svg&&(r.uncache?(P=e.getBBox(),u=r.xOrigin-P.x+"px "+(r.yOrigin-P.y)+"px",D=""):D=!n&&e.getAttribute("data-svg-origin"),xl(e,D||u,!!D||r.originIsAbsolute,r.smooth!==!1,L)),S=r.xOrigin||0,T=r.yOrigin||0,L!==hs&&(w=L[0],N=L[1],O=L[2],j=L[3],f=k=L[4],m=G=L[5],L.length===6?(b=Math.sqrt(w*w+N*N),g=Math.sqrt(j*j+O*O),h=w||N?oo(N,w)*vr:0,_=O||j?oo(O,j)*vr+h:0,_&&(g*=Math.abs(Math.cos(_*fo))),r.svg&&(f-=S-(S*w+T*O),m-=T-(S*N+T*j))):(H=L[6],M=L[7],B=L[8],$=L[9],W=L[10],z=L[11],f=L[12],m=L[13],p=L[14],A=oo(H,W),C=A*vr,A&&(E=Math.cos(-A),I=Math.sin(-A),D=k*E+B*I,P=G*E+$*I,F=H*E+W*I,B=k*-I+B*E,$=G*-I+$*E,W=H*-I+W*E,z=M*-I+z*E,k=D,G=P,H=F),A=oo(-O,W),x=A*vr,A&&(E=Math.cos(-A),I=Math.sin(-A),D=w*E-B*I,P=N*E-$*I,F=O*E-W*I,z=j*I+z*E,w=D,N=P,O=F),A=oo(N,w),h=A*vr,A&&(E=Math.cos(A),I=Math.sin(A),D=w*E+N*I,P=k*E+G*I,N=N*E-w*I,G=G*E-k*I,w=D,k=P),C&&Math.abs(C)+Math.abs(h)>359.9&&(C=h=0,x=180-x),b=Ge(Math.sqrt(w*w+N*N+O*O)),g=Ge(Math.sqrt(G*G+H*H)),A=oo(k,G),_=Math.abs(A)>2e-4?A*vr:0,y=z?1/(z<0?-z:z):0),r.svg&&(D=e.getAttribute("transform"),r.forceCSS=e.setAttribute("transform","")||!Vh(Dt(e,ke)),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(C)+a,r.rotationY=Ge(x)+a,r.skewX=_+a,r.skewY=v+a,r.transformPerspective=y+i,(r.zOrigin=parseFloat(u.split(" ")[2])||!n&&r.zOrigin||0)&&(o[At]=Li(u)),r.xOffset=r.yOffset=0,r.force3D=Ot.force3D,r.renderTransform=r.svg?iL:Fh?Uh:sL,r.uncache=0,r},Li=function(e){return(e=e.split(" "))[0]+" "+e[1]},Ya=function(e,n,r){var o=lt(n);return Ge(parseFloat(n)+parseFloat(or(e,"x",r+"px",o)))+o},sL=function(e,n){n.z="0px",n.rotationY=n.rotationX="0deg",n.force3D=0,Uh(e,n)},xr="0deg",Jo="0px",_r=") ",Uh=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,C=r.transformPerspective,x=r.force3D,_=r.target,v=r.zOrigin,y="",S=x==="auto"&&e&&e!==1||x===!0;if(v&&(m!==xr||f!==xr)){var T=parseFloat(f)*fo,L=Math.sin(T),A=Math.cos(T),E;T=parseFloat(m)*fo,E=Math.cos(T),i=Ya(_,i,L*E*-v),a=Ya(_,a,-Math.sin(T)*-v),c=Ya(_,c,A*E*-v+v)}C!==Jo&&(y+="perspective("+C+_r),(o||s)&&(y+="translate("+o+"%, "+s+"%) "),(S||i!==Jo||a!==Jo||c!==Jo)&&(y+=c!==Jo||S?"translate3d("+i+", "+a+", "+c+") ":"translate("+i+", "+a+_r),u!==xr&&(y+="rotate("+u+_r),f!==xr&&(y+="rotateY("+f+_r),m!==xr&&(y+="rotateX("+m+_r),(p!==xr||b!==xr)&&(y+="skew("+p+", "+b+_r),(g!==1||h!==1)&&(y+="scale("+g+", "+h+_r),_.style[ke]=y||"translate(0, 0)"},iL=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,C=r.xOffset,x=r.yOffset,_=r.forceCSS,v=parseFloat(i),y=parseFloat(a),S,T,L,A,E;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,T=Math.sin(c)*m,L=Math.sin(c-u)*-p,A=Math.cos(c-u)*p,u&&(f*=fo,E=Math.tan(u-f),E=Math.sqrt(1+E*E),L*=E,A*=E,f&&(E=Math.tan(f),E=Math.sqrt(1+E*E),S*=E,T*=E)),S=Ge(S),T=Ge(T),L=Ge(L),A=Ge(A)):(S=m,A=p,T=L=0),(v&&!~(i+"").indexOf("px")||y&&!~(a+"").indexOf("px"))&&(v=or(b,"x",i,"px"),y=or(b,"y",a,"px")),(g||h||C||x)&&(v=Ge(v+g-(g*S+h*L)+C),y=Ge(y+h-(g*T+h*A)+x)),(o||s)&&(E=b.getBBox(),v=Ge(v+o/100*E.width),y=Ge(y+s/100*E.height)),E="matrix("+S+","+T+","+L+","+A+","+v+","+y+")",b.setAttribute("transform",E),_&&(b.style[ke]=E)},aL=function(e,n,r,o,s){var i=360,a=qe(s),c=parseFloat(s)*(a&&~s.indexOf("rad")?vr: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*bm)%i-~~(u/i)*i:m==="ccw"&&u>0&&(u=(u-i*bm)%i-~~(u/i)*i)),e._pt=p=new yt(e._pt,n,r,o,u,VT),p.e=f,p.u="deg",e._props.push(r),p},Am=function(e,n){for(var r in n)e[r]=n[r];return e},lL=function(e,n,r){var o=Am({},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[ke]=n,a=gs(r,1),rr(r,ke),r.setAttribute("transform",u)):(u=getComputedStyle(r)[ke],i[ke]=n,a=gs(r,1),i[ke]=u);for(c in Dn)u=o[c],f=a[c],u!==f&&s.indexOf(c)<0&&(b=lt(u),g=lt(f),m=b!==g?or(r,c,u,g):parseFloat(u),p=parseFloat(f),e._pt=new yt(e._pt,a,c,m,p-m,gl),e._pt.u=g||0,e._props.push(c));Am(a,o)};vt("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});Ti[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 $h={name:"css",register:Cl,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,C,x,_,v,y,S,T,L,A,E;zc||Cl(),this.styles=this.styles||Mh(e),A=this.styles.props,this.tween=r;for(h in n)if(h!=="autoRound"&&(f=n[h],!(wt[h]&&Eh(h,n,r,o,e,s)))){if(b=typeof f,g=Ti[h],b==="function"&&(f=f.call(r,o,e,s),b=typeof f),b==="string"&&~f.indexOf("random(")&&(f=fs(f)),g)g(this,e,h,f,r)&&(L=1);else if(h.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(h)+"").trim(),f+="",Jn.lastIndex=0,Jn.test(u)||(C=lt(u),x=lt(f),x?C!==x&&(u=or(e,h,u,x)+x):C&&(f+=C)),this.add(a,"setProperty",u,f,o,s,0,0,h),i.push(h),A.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=fs(u)),lt(u+"")||u==="auto"||(u+=Ot.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),A.push("visibility",0,a.visibility),Zn(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 Dn,v){if(this.styles.save(h),E=f,b==="string"&&f.substring(0,6)==="var(--"){if(f=Dt(e,f.substring(4,f.indexOf(")"))),f.substring(0,5)==="calc("){var I=e.style.perspective;e.style.perspective=f,f=Dt(e,"perspective"),I?e.style.perspective=I:rr(e,"perspective")}m=parseFloat(f)}if(y||(S=e._gsap,S.renderTransform&&!n.parseTransform||gs(e,n.parseTransform),T=n.smoothOrigin!==!1&&S.smooth,y=this._pt=new yt(this._pt,a,ke,0,1,S.renderTransform,S,0,-1),y.dep=1),h==="scale")this._pt=new yt(this._pt,S,"scaleY",S.scaleY,(_?co(S.scaleY,_+m):m)-S.scaleY||0,gl),this._pt.u=0,i.push("scaleY",h),h+="X";else if(h==="transformOrigin"){A.push(At,0,a[At]),f=rL(f),S.svg?xl(e,f,0,T,0,this):(x=parseFloat(f.split(" ")[2])||0,x!==S.zOrigin&&Zn(this,S,"zOrigin",S.zOrigin,x),Zn(this,a,h,Li(u),Li(f)));continue}else if(h==="svgOrigin"){xl(e,f,1,T,0,this);continue}else if(h in zh){aL(this,S,h,p,_?co(p,_+f):f);continue}else if(h==="smoothOrigin"){Zn(this,S,"smooth",S.smooth,f);continue}else if(h==="force3D"){S[h]=f;continue}else if(h==="transform"){lL(this,f,e);continue}}else h in a||(h=Co(h)||h);if(v||(m||m===0)&&(p||p===0)&&!zT.test(f)&&h in a)C=(u+"").substr((p+"").length),m||(m=0),x=lt(f)||(h in Ot.units?Ot.units[h]:C),C!==x&&(p=or(e,h,u,x)),this._pt=new yt(this._pt,v?S:a,h,p,(_?co(p,_+m):m)-p,!v&&(x==="px"||h==="zIndex")&&n.autoRound!==!1?WT:gl),this._pt.u=x||0,v&&E!==f?(this._pt.b=u,this._pt.e=E,this._pt.r=$T):C!==x&&x!=="%"&&(this._pt.b=u,this._pt.r=UT);else if(h in a)nL.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"){Dc(h,f);continue}v||(h in a?A.push(h,0,a[h]):typeof e[h]=="function"?A.push(h,2,e[h]()):A.push(h,1,u||e[h])),i.push(h)}}L&&Oh(this)},render:function(e,n){if(n.tween._time||!Vc())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 Dn&&n!==At&&(e._gsap.x||wn(e,"x"))?r&&gm===r?n==="scale"?qT:KT:(gm=r||{})&&(n==="scale"?ZT:QT):e.style&&!wc(e.style[n])?XT:~n.indexOf("-")?YT:Gc(e,n)},core:{_removeProperty:rr,_getMatrix:$c}};Lt.utils.checkPrefix=Co;Lt.core.getStyleSaver=Mh;(function(t,e,n,r){var o=vt(t+","+e+","+n,function(s){Dn[s]=1});vt(e,function(s){Ot.units[s]="deg",zh[s]=1}),fn[o[13]]=t+","+e,vt(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");vt("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){Ot.units[t]="px"});Lt.registerPlugin($h);var X=Lt.registerPlugin($h)||Lt;X.core.Tween;/*!
|
|
15
|
+
*/var bm,Kn,uo,Vc,yr,xm,Uc,zT=function(){return typeof window<"u"},Nn={},Sr=180/Math.PI,fo=Math.PI/180,oo=Math.atan2,_m=1e8,$c=/([A-Z])/g,VT=/(left|right|width|margin|padding|x)/i,UT=/[\s,\(]\S/,fn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Cl=function(e,n){return n.set(n.t,n.p,Math.round((n.s+n.c*e)*1e4)/1e4+n.u,n)},$T=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)},WT=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)},XT=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)},YT=function(e,n){var r=n.s+n.c*e;n.set(n.t,n.p,~~(r+(r<0?-.5:.5))+n.u,n)},Mh=function(e,n){return n.set(n.t,n.p,e?n.e:n.b,n)},Fh=function(e,n){return n.set(n.t,n.p,e!==1?n.b:n.e,n)},KT=function(e,n,r){return e.style[n]=r},qT=function(e,n,r){return e.style.setProperty(n,r)},ZT=function(e,n,r){return e._gsap[n]=r},QT=function(e,n,r){return e._gsap.scaleX=e._gsap.scaleY=r},JT=function(e,n,r,o,s){var i=e._gsap;i.scaleX=i.scaleY=r,i.renderTransform(s,i)},eL=function(e,n,r,o,s){var i=e._gsap;i[n]=r,i.renderTransform(s,i)},Pe="transform",yt=Pe+"Origin",tL=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]=In(o,a)}):this.tfm[e]=i.x?i[e]:In(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])},Gh=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},nL=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($c,"-$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=Uc(),(!s||!s.isStart)&&!r[Pe]&&(Gh(r),o.zOrigin&&r[yt]&&(r[yt]+=" "+o.zOrigin+"px",o.zOrigin=0,o.renderTransform()),o.uncache=1)}},Hh=function(e,n){var r={target:e,props:[],revert:nL,save:tL};return e._gsap||Tt.core.getCache(e),n&&e.style&&e.nodeType&&n.split(",").forEach(function(o){return r.save(o)}),r},zh,bl=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($c,"-$1").toLowerCase())||o.getPropertyValue(n)||!r&&t(e,bo(n)||n,1)||""},Sm="O,Moz,ms,Ms,Webkit".split(","),bo=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--&&!(Sm[i]+e in s););return i<0?null:(i===3?"ms":i>=0?Sm[i]:"")+e},xl=function(){zT()&&window.document&&(bm=window,Kn=bm.document,uo=Kn.documentElement,yr=bl("div")||{style:{}},bl("div"),Pe=bo(Pe),yt=Pe+"Origin",yr.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",zh=!!bo("perspective"),Uc=Tt.core.reverting,Vc=1)},vm=function(e){var n=e.ownerSVGElement,r=bl("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},ym=function(e,n){for(var r=n.length;r--;)if(e.hasAttribute(n[r]))return e.getAttribute(n[r])},Vh=function(e){var n,r;try{n=e.getBBox()}catch{n=vm(e),r=1}return n&&(n.width||n.height)||r||(n=vm(e)),n&&!n.width&&!n.x&&!n.y?{x:+ym(e,["x","cx","x1"])||0,y:+ym(e,["y","cy","y1"])||0,width:0,height:0}:n},Uh=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&Vh(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($c,"-$1").toLowerCase())):r.removeAttribute(n)}},qn=function(e,n,r,o,s,i){var a=new vt(e._pt,n,r,0,1,i?Fh:Mh);return e._pt=a,a.b=o,a.e=s,e._props.push(r),a},Am={deg:1,rad:1,turn:1},rL={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=VT.test(n),u=e.tagName.toLowerCase()==="svg",f=(u?"client":"offset")+(c?"Width":"Height"),m=100,p=o==="px",C=o==="%",g,h,b,x;if(o===i||!s||Am[o]||Am[i])return s;if(i!=="px"&&!p&&(s=t(e,n,r,"px")),x=e.getCTM&&Uh(e),(C||i==="%")&&(Nn[n]||~n.indexOf("adius")))return g=x?e.getBBox()[c?"width":"height"]:e[f],Ge(C?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,x&&(h=(e.ownerSVGElement||{}).parentNode),(!h||h===Kn||!h.appendChild)&&(h=Kn.body),b=h._gsap,b&&C&&b.width&&c&&b.time===wt.time&&!b.uncache)return Ge(s/b.width*m);if(C&&(n==="height"||n==="width")){var _=e.style[n];e.style[n]=m+o,g=e[f],_?e.style[n]=_:nr(e,n)}else(C||i==="%")&&!rL[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&&C&&(b=Ar(h),b.time=wt.time,b.width=h[f]),Ge(p?g*s/m:g&&s?m/g*s:0)},In=function(e,n,r,o){var s;return Vc||xl(),n in fn&&n!=="transform"&&(n=fn[n],~n.indexOf(",")&&(n=n.split(",")[0])),Nn[n]&&n!=="transform"?(s=gs(e,o),s=n!=="transformOrigin"?s[n]:s.svg?s.origin:Ei(Nt(e,yt))+" "+s.zOrigin+"px"):(s=e.style[n],(!s||s==="auto"||o||~(s+"").indexOf("calc("))&&(s=Li[n]&&Li[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},oL=function(e,n,r,o){if(!r||r==="none"){var s=bo(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,kh),c=0,u=0,f,m,p,C,g,h,b,x,_,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],Eh(f),r=f[0],o=f[1],p=r.match(ao)||[],S=o.match(ao)||[],S.length){for(;m=ao.exec(o);)b=m[0],_=o.substring(c,m.index),g?g=(g+1)%5:(_.substr(-5)==="rgba("||_.substr(-5)==="hsla(")&&(g=1),b!==(h=p[u++]||"")&&(C=parseFloat(h)||0,y=h.substr((C+"").length),b.charAt(1)==="="&&(b=co(C,b)+y),x=parseFloat(b),v=b.substr((x+"").length),c=ao.lastIndex-v.length,v||(v=v||Dt.units[n]||y,c===o.length&&(o+=v,a.e+=v)),y!==v&&(C=rr(e,n,h,v)||0),a._pt={_next:a._pt,p:_||u===1?_:",",s:C,c:x-C,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"?Fh:Mh;return rh.test(o)&&(a.e=0),this._pt=a,a},Tm={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},sL=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]=Tm[r]||r,n[1]=Tm[o]||o,n.join(" ")},iL=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",gs(r,1),i.uncache=1,Gh(o)))}},Li={clearProps:function(e,n,r,o,s){if(s.data!=="isFromStart"){var i=e._pt=new vt(e._pt,n,r,0,0,iL);return i.u=o,i.pr=-10,i.tween=s,e._props.push(r),1}}},hs=[1,0,0,1,0,0],$h={},Wh=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},Lm=function(e){var n=Nt(e,Pe);return Wh(n)?hs:n.substr(7).match(nh).map(Ge)},Wc=function(e,n){var r=e._gsap||Ar(e),o=e.style,s=Lm(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"?hs:s):(s===hs&&!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=Lm(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)},_l=function(e,n,r,o,s,i){var a=e._gsap,c=s||Wc(e,!0),u=a.xOrigin||0,f=a.yOrigin||0,m=a.xOffset||0,p=a.yOffset||0,C=c[0],g=c[1],h=c[2],b=c[3],x=c[4],_=c[5],v=n.split(" "),y=parseFloat(v[0])||0,S=parseFloat(v[1])||0,T,L,A,E;r?c!==hs&&(L=C*b-g*h)&&(A=y*(b/L)+S*(-h/L)+(h*_-b*x)/L,E=y*(-g/L)+S*(C/L)-(C*_-g*x)/L,y=A,S=E):(T=Vh(e),y=T.x+(~v[0].indexOf("%")?y/100*T.width:y),S=T.y+(~(v[1]||v[0]).indexOf("%")?S/100*T.height:S)),o||o!==!1&&a.smooth?(x=y-u,_=S-f,a.xOffset=m+(x*C+_*h)-x,a.yOffset=p+(x*g+_*b)-_):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)},gs=function(e,n){var r=e._gsap||new wh(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,C,g,h,b,x,_,v,y,S,T,L,A,E,I,w,N,O,j,k,G,D,P,F,B,$,W,M,z,H;return f=m=p=h=b=x=_=v=y=0,C=g=1,r.svg=!!(e.getCTM&&Uh(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"),L=Wc(e,r.svg),r.svg&&(r.uncache?(P=e.getBBox(),u=r.xOrigin-P.x+"px "+(r.yOrigin-P.y)+"px",D=""):D=!n&&e.getAttribute("data-svg-origin"),_l(e,D||u,!!D||r.originIsAbsolute,r.smooth!==!1,L)),S=r.xOrigin||0,T=r.yOrigin||0,L!==hs&&(w=L[0],N=L[1],O=L[2],j=L[3],f=k=L[4],m=G=L[5],L.length===6?(C=Math.sqrt(w*w+N*N),g=Math.sqrt(j*j+O*O),h=w||N?oo(N,w)*Sr:0,_=O||j?oo(O,j)*Sr+h:0,_&&(g*=Math.abs(Math.cos(_*fo))),r.svg&&(f-=S-(S*w+T*O),m-=T-(S*N+T*j))):(H=L[6],M=L[7],B=L[8],$=L[9],W=L[10],z=L[11],f=L[12],m=L[13],p=L[14],A=oo(H,W),b=A*Sr,A&&(E=Math.cos(-A),I=Math.sin(-A),D=k*E+B*I,P=G*E+$*I,F=H*E+W*I,B=k*-I+B*E,$=G*-I+$*E,W=H*-I+W*E,z=M*-I+z*E,k=D,G=P,H=F),A=oo(-O,W),x=A*Sr,A&&(E=Math.cos(-A),I=Math.sin(-A),D=w*E-B*I,P=N*E-$*I,F=O*E-W*I,z=j*I+z*E,w=D,N=P,O=F),A=oo(N,w),h=A*Sr,A&&(E=Math.cos(A),I=Math.sin(A),D=w*E+N*I,P=k*E+G*I,N=N*E-w*I,G=G*E-k*I,w=D,k=P),b&&Math.abs(b)+Math.abs(h)>359.9&&(b=h=0,x=180-x),C=Ge(Math.sqrt(w*w+N*N+O*O)),g=Ge(Math.sqrt(G*G+H*H)),A=oo(k,G),_=Math.abs(A)>2e-4?A*Sr:0,y=z?1/(z<0?-z:z):0),r.svg&&(D=e.getAttribute("transform"),r.forceCSS=e.setAttribute("transform","")||!Wh(Nt(e,Pe)),D&&e.setAttribute("transform",D))),Math.abs(_)>90&&Math.abs(_)<270&&(s?(C*=-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(C),r.scaleY=Ge(g),r.rotation=Ge(h)+a,r.rotationX=Ge(b)+a,r.rotationY=Ge(x)+a,r.skewX=_+a,r.skewY=v+a,r.transformPerspective=y+i,(r.zOrigin=parseFloat(u.split(" ")[2])||!n&&r.zOrigin||0)&&(o[yt]=Ei(u)),r.xOffset=r.yOffset=0,r.force3D=Dt.force3D,r.renderTransform=r.svg?lL:zh?Xh:aL,r.uncache=0,r},Ei=function(e){return(e=e.split(" "))[0]+" "+e[1]},Ka=function(e,n,r){var o=lt(n);return Ge(parseFloat(n)+parseFloat(rr(e,"x",r+"px",o)))+o},aL=function(e,n){n.z="0px",n.rotationY=n.rotationX="0deg",n.force3D=0,Xh(e,n)},br="0deg",Jo="0px",xr=") ",Xh=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,C=r.skewY,g=r.scaleX,h=r.scaleY,b=r.transformPerspective,x=r.force3D,_=r.target,v=r.zOrigin,y="",S=x==="auto"&&e&&e!==1||x===!0;if(v&&(m!==br||f!==br)){var T=parseFloat(f)*fo,L=Math.sin(T),A=Math.cos(T),E;T=parseFloat(m)*fo,E=Math.cos(T),i=Ka(_,i,L*E*-v),a=Ka(_,a,-Math.sin(T)*-v),c=Ka(_,c,A*E*-v+v)}b!==Jo&&(y+="perspective("+b+xr),(o||s)&&(y+="translate("+o+"%, "+s+"%) "),(S||i!==Jo||a!==Jo||c!==Jo)&&(y+=c!==Jo||S?"translate3d("+i+", "+a+", "+c+") ":"translate("+i+", "+a+xr),u!==br&&(y+="rotate("+u+xr),f!==br&&(y+="rotateY("+f+xr),m!==br&&(y+="rotateX("+m+xr),(p!==br||C!==br)&&(y+="skew("+p+", "+C+xr),(g!==1||h!==1)&&(y+="scale("+g+", "+h+xr),_.style[Pe]=y||"translate(0, 0)"},lL=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,C=r.target,g=r.xOrigin,h=r.yOrigin,b=r.xOffset,x=r.yOffset,_=r.forceCSS,v=parseFloat(i),y=parseFloat(a),S,T,L,A,E;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,T=Math.sin(c)*m,L=Math.sin(c-u)*-p,A=Math.cos(c-u)*p,u&&(f*=fo,E=Math.tan(u-f),E=Math.sqrt(1+E*E),L*=E,A*=E,f&&(E=Math.tan(f),E=Math.sqrt(1+E*E),S*=E,T*=E)),S=Ge(S),T=Ge(T),L=Ge(L),A=Ge(A)):(S=m,A=p,T=L=0),(v&&!~(i+"").indexOf("px")||y&&!~(a+"").indexOf("px"))&&(v=rr(C,"x",i,"px"),y=rr(C,"y",a,"px")),(g||h||b||x)&&(v=Ge(v+g-(g*S+h*L)+b),y=Ge(y+h-(g*T+h*A)+x)),(o||s)&&(E=C.getBBox(),v=Ge(v+o/100*E.width),y=Ge(y+s/100*E.height)),E="matrix("+S+","+T+","+L+","+A+","+v+","+y+")",C.setAttribute("transform",E),_&&(C.style[Pe]=E)},cL=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*_m)%i-~~(u/i)*i:m==="ccw"&&u>0&&(u=(u-i*_m)%i-~~(u/i)*i)),e._pt=p=new vt(e._pt,n,r,o,u,$T),p.e=f,p.u="deg",e._props.push(r),p},Em=function(e,n){for(var r in n)e[r]=n[r];return e},uL=function(e,n,r){var o=Em({},r._gsap),s="perspective,force3D,transformOrigin,svgOrigin",i=r.style,a,c,u,f,m,p,C,g;o.svg?(u=r.getAttribute("transform"),r.setAttribute("transform",""),i[Pe]=n,a=gs(r,1),nr(r,Pe),r.setAttribute("transform",u)):(u=getComputedStyle(r)[Pe],i[Pe]=n,a=gs(r,1),i[Pe]=u);for(c in Nn)u=o[c],f=a[c],u!==f&&s.indexOf(c)<0&&(C=lt(u),g=lt(f),m=C!==g?rr(r,c,u,g):parseFloat(u),p=parseFloat(f),e._pt=new vt(e._pt,a,c,m,p-m,Cl),e._pt.u=g||0,e._props.push(c));Em(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});Li[e>1?"border"+t:t]=function(a,c,u,f,m){var p,C;if(arguments.length<4)return p=i.map(function(g){return In(a,g,u)}),C=p.join(" "),C.split(p[0]).length===5?p[0]:C;p=(f+"").split(" "),C={},i.forEach(function(g,h){return C[g]=p[h]=p[h]||p[(h-1)/2|0]}),a.init(c,C,m)}});var Yh={name:"css",register:xl,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,C,g,h,b,x,_,v,y,S,T,L,A,E;Vc||xl(),this.styles=this.styles||Hh(e),A=this.styles.props,this.tween=r;for(h in n)if(h!=="autoRound"&&(f=n[h],!(It[h]&&Rh(h,n,r,o,e,s)))){if(C=typeof f,g=Li[h],C==="function"&&(f=f.call(r,o,e,s),C=typeof f),C==="string"&&~f.indexOf("random(")&&(f=fs(f)),g)g(this,e,h,f,r)&&(L=1);else if(h.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(h)+"").trim(),f+="",Qn.lastIndex=0,Qn.test(u)||(b=lt(u),x=lt(f),x?b!==x&&(u=rr(e,h,u,x)+x):b&&(f+=b)),this.add(a,"setProperty",u,f,o,s,0,0,h),i.push(h),A.push(h,0,a[h]);else if(C!=="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=fs(u)),lt(u+"")||u==="auto"||(u+=Dt.units[h]||lt(In(e,h))||""),(u+"").charAt(1)==="="&&(u=In(e,h))):u=In(e,h),p=parseFloat(u),_=C==="string"&&f.charAt(1)==="="&&f.substr(0,2),_&&(f=f.substr(2)),m=parseFloat(f),h in fn&&(h==="autoAlpha"&&(p===1&&In(e,"visibility")==="hidden"&&m&&(p=0),A.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),E=f,C==="string"&&f.substring(0,6)==="var(--"){if(f=Nt(e,f.substring(4,f.indexOf(")"))),f.substring(0,5)==="calc("){var I=e.style.perspective;e.style.perspective=f,f=Nt(e,"perspective"),I?e.style.perspective=I:nr(e,"perspective")}m=parseFloat(f)}if(y||(S=e._gsap,S.renderTransform&&!n.parseTransform||gs(e,n.parseTransform),T=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,Cl),this._pt.u=0,i.push("scaleY",h),h+="X";else if(h==="transformOrigin"){A.push(yt,0,a[yt]),f=sL(f),S.svg?_l(e,f,0,T,0,this):(x=parseFloat(f.split(" ")[2])||0,x!==S.zOrigin&&qn(this,S,"zOrigin",S.zOrigin,x),qn(this,a,h,Ei(u),Ei(f)));continue}else if(h==="svgOrigin"){_l(e,f,1,T,0,this);continue}else if(h in $h){cL(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"){uL(this,f,e);continue}}else h in a||(h=bo(h)||h);if(v||(m||m===0)&&(p||p===0)&&!UT.test(f)&&h in a)b=(u+"").substr((p+"").length),m||(m=0),x=lt(f)||(h in Dt.units?Dt.units[h]:b),b!==x&&(p=rr(e,h,u,x)),this._pt=new vt(this._pt,v?S:a,h,p,(_?co(p,_+m):m)-p,!v&&(x==="px"||h==="zIndex")&&n.autoRound!==!1?YT:Cl),this._pt.u=x||0,v&&E!==f?(this._pt.b=u,this._pt.e=E,this._pt.r=XT):b!==x&&x!=="%"&&(this._pt.b=u,this._pt.r=WT);else if(h in a)oL.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"){Oc(h,f);continue}v||(h in a?A.push(h,0,a[h]):typeof e[h]=="function"?A.push(h,2,e[h]()):A.push(h,1,u||e[h])),i.push(h)}}L&&Bh(this)},render:function(e,n){if(n.tween._time||!Uc())for(var r=n._pt;r;)r.r(e,r.d),r=r._next;else n.styles.revert()},get:In,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||In(e,"x"))?r&&xm===r?n==="scale"?QT:ZT:(xm=r||{})&&(n==="scale"?JT:eL):e.style&&!Rc(e.style[n])?KT:~n.indexOf("-")?qT:Hc(e,n)},core:{_removeProperty:nr,_getMatrix:Wc}};Tt.utils.checkPrefix=bo;Tt.core.getStyleSaver=Hh;(function(t,e,n,r){var o=St(t+","+e+","+n,function(s){Nn[s]=1});St(e,function(s){Dt.units[s]="deg",$h[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"});Tt.registerPlugin(Yh);var X=Tt.registerPlugin(Yh)||Tt;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 dL=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,fL=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/ig,mL=Math.PI/180,Qs=Math.sin,Js=Math.cos,is=Math.abs,es=Math.sqrt,pL=function(e){return typeof e=="number"},Im=1e5,$n=function(e){return Math.round(e*Im)/Im||0},wm=function(e){return e.closed=Math.abs(e[0]-e[e.length-2])<.001&&Math.abs(e[1]-e[e.length-1])<.001};function hL(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 gL(t,e,n,r,o,s,i,a,c){if(!(t===a&&e===c)){n=is(n),r=is(r);var u=o%360*mL,f=Js(u),m=Qs(u),p=Math.PI,C=p*2,g=(t-a)/2,h=(e-c)/2,b=f*g+m*h,x=-m*g+f*h,_=b*b,v=x*x,y=_/(n*n)+v/(r*r);y>1&&(n=es(y)*n,r=es(y)*r);var S=n*n,T=r*r,L=(S*T-S*v-T*_)/(S*v+T*_);L<0&&(L=0);var A=(s===i?-1:1)*es(L),E=A*(n*x/r),I=A*-(r*b/n),w=(t+a)/2,N=(e+c)/2,O=w+(f*E-m*I),j=N+(m*E+f*I),k=(b-E)/n,G=(x-I)/r,D=(-b-E)/n,P=(-x-I)/r,F=k*k+G*G,B=(G<0?-1:1)*Math.acos(k/es(F)),$=(k*P-G*D<0?-1:1)*Math.acos((k*D+G*P)/es(F*(D*D+P*P)));isNaN($)&&($=p),!i&&$>0?$-=C:i&&$<0&&($+=C),B%=C,$%=C;var W=Math.ceil(is($)/(C/4)),M=[],z=$/W,H=4/3*Qs(z/2)/(1+Js(z/2)),oe=f*n,pe=m*n,ce=m*-r,Y=f*r,ne;for(ne=0;ne<W;ne++)o=B+ne*z,b=Js(o),x=Qs(o),k=Js(o+=z),G=Qs(o),M.push(b-H*x,x+H*b,k+H*G,G-H*k,k,G);for(ne=0;ne<M.length;ne+=2)b=M[ne],x=M[ne+1],M[ne]=b*oe+x*ce+O,M[ne+1]=b*pe+x*Y+j;return M[ne-2]=a,M[ne-1]=c,M}}function CL(t){var e=(t+"").replace(fL,function(E){var I=+E;return I<1e-4&&I>-1e-4?0:I}).match(dL)||[],n=[],r=0,o=0,s=2/3,i=e.length,a=0,c="ERROR: malformed path: "+t,u,f,m,p,C,g,h,b,x,_,v,y,S,T,L,A=function(I,w,N,O){_=(N-I)/3,v=(O-w)/3,h.push(I+_,w+v,N-_,O-v,N,O)};if(!t||!isNaN(e[0])||isNaN(e[1]))return console.log(c),n;for(u=0;u<i;u++)if(S=C,isNaN(e[u])?(C=e[u].toUpperCase(),g=C!==e[u]):u--,m=+e[u+1],p=+e[u+2],g&&(m+=r,p+=o),u||(b=m,x=p),C==="M")h&&(h.length<8?n.length-=1:a+=h.length,wm(h)),r=b=m,o=x=p,h=[m,p],n.push(h),u+=2,C="L";else if(C==="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(C==="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(C==="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(C==="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(C==="H")A(r,o,r=m,o),u+=1;else if(C==="V")A(r,o,r,o=m+(g?o-r:0)),u+=1;else if(C==="L"||C==="Z")C==="Z"&&(m=b,p=x,h.closed=!0),(C==="L"||is(r-m)>.5||is(o-p)>.5)&&(A(r,o,m,p),C==="L"&&(u+=2)),r=m,o=p;else if(C==="A"){if(T=e[u+4],L=e[u+5],_=e[u+6],v=e[u+7],f=7,T.length>1&&(T.length<3?(v=_,_=L,f--):(v=L,_=T.substr(2),f-=2),L=T.charAt(1),T=T.charAt(0)),y=gL(r,o,+e[u+1],+e[u+2],+e[u+3],+T,+L,(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):wm(h),n.totalPoints=a+u,n}function bL(t){pL(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
|
|
29
|
+
*/var gt,Kh,qh=function(){return gt||typeof window<"u"&&(gt=window.gsap)&>.registerPlugin&>},Rm=function(){gt=qh(),gt?(gt.registerEase("_CE",Nr.create),Kh=1):console.warn("Please gsap.registerPlugin(CustomEase)")},xL=1e20,ei=function(e){return~~(e*1e3+(e<0?-.5:.5))/1e3},_L=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/gi,SL=/[cLlsSaAhHvVtTqQ]/g,vL=function(e){var n=e.length,r=xL,o;for(o=1;o<n;o+=6)+e[o]<r&&(r=+e[o]);return r},yL=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])?vL(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},AL=function t(e,n,r,o,s,i,a,c,u,f,m){var p=(e+r)/2,C=(n+o)/2,g=(r+s)/2,h=(o+i)/2,b=(s+a)/2,x=(i+c)/2,_=(p+g)/2,v=(C+h)/2,y=(g+b)/2,S=(h+x)/2,T=(_+y)/2,L=(v+S)/2,A=a-e,E=c-n,I=Math.abs((r-a)*E-(o-c)*A),w=Math.abs((s-a)*E-(i-c)*A),N;return f||(f=[{x:e,y:n},{x:a,y:c}],m=1),f.splice(m||f.length-1,0,{x:T,y:L}),(I+w)*(I+w)>u*(A*A+E*E)&&(N=f.length,t(e,n,p,C,_,v,T,L,u,f,m),t(T,L,y,S,b,x,a,c,u,f,m+1+(f.length-N))),f},Nr=(function(){function t(n,r,o){Kh||Rm(),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(_L),i=1,a=[],c=[],u=o.precision||1,f=u<=1,m,p,C,g,h,b,x,_,v;if(this.data=r,(SL.test(r)||~r.indexOf("M")&&r.indexOf("C")<0)&&(s=CL(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)&&yL(s,o.height,o.originY),this.segment=s,g=2;g<m;g+=6)p={x:+s[g-2],y:+s[g-1]},C={x:+s[g+4],y:+s[g+5]},a.push(p,C),AL(p.x,p.y,+s[g],+s[g+1],+s[g+2],+s[g+3],C.x,C.y,1/(u*2e5),a,a.length-1);for(m=a.length,g=0;g<m;g++)x=a[g],_=a[g-1]||x,(x.x>_.x||_.y!==x.y&&_.x===x.x||x===_)&&x.x<=1?(_.cx=x.x-_.x,_.cy=x.y-_.y,_.n=x,_.nx=x.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,b=0,x=a[0],f){for(g=0;g<m;g++)v=g*h,x.nx<v&&(x=a[++b]),p=x.y+(v-x.x)/x.cx*x.cy,c[g]={x:v,cx:h,y:p,cy:0,nx:9},g&&(c[g-1].cy=p-c[g-1].y);b=a[a.length-1],c[m-1].cy=b.y-p,c[m-1].cx=b.x-c[c.length-1].x}else{for(g=0;g<m;g++)x.nx<g*h&&(x=a[++b]),c[g]=x;b<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,Rm()},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,C,g,h,b,x,_,v;if(o.invert&&(i=-i,c=0),typeof r=="string"&&(r=gt.parseEase(r)),r.custom&&(r=r.custom),r instanceof t)f=bL(hL([r.segment.slice(0)],s,0,0,-i,a,c));else{for(f=[a,c],b=Math.max(5,(o.precision||1)*200),C=1/b,b+=2,x=5/b,_=ei(a+C*s),v=ei(c+r(C)*-i),m=(v-c)/(_-a),p=2;p<b;p++)g=ei(a+p*C*s),h=ei(c+r(p*C)*-i),(Math.abs((h-v)/(g-_)-m)>x||p===b-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;qh()&>.registerPlugin(Nr);/*!
|
|
30
30
|
* @gsap/react 2.1.2
|
|
31
31
|
* https://gsap.com
|
|
32
32
|
*
|
|
@@ -34,4 +34,4 @@
|
|
|
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 Im=typeof document<"u"?l.useLayoutEffect:l.useEffect,wm=t=>t&&!Array.isArray(t)&&typeof t=="object",ei=[],yL={},Yh=X;const Zi=(t,e=ei)=>{let n=yL;wm(t)?(n=t,t=null,e="dependencies"in n?n.dependencies:ei):wm(e)&&(n=e,e="dependencies"in n?n.dependencies:ei),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(Yh.context(()=>{},r)),a=l.useRef(u=>i.current.add(null,u)),c=e&&e.length&&!o;return c&&Im(()=>(s.current=!0,()=>i.current.revert()),ei),Im(()=>{if(t&&i.current.add(t,r),!c||!s.current)return()=>i.current.revert()},e),{context:i.current,contextSafe:a.current}};Zi.register=t=>{Yh=t};Zi.headless=!0;const AL={interactiveDuration:280,interactiveEase:"power2.out",hoverLiftEase:"sine.inOut",tooltipDuration:200,switchThumbDuration:340,switchThumbEase:"back.out(1.4)",selectionFillEase:"back.out(1.25)",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={...AL},Kh=0;const _l=new Set;function TL(t){return _l.add(t),()=>{_l.delete(t)}}function Rm(){return Kh}function LL(t){Me={...Me,...t},Kh+=1;for(const e of _l)e()}function Se(){return Me}function ve(){return{duration:Me.interactiveDuration/1e3,ease:Me.interactiveEase}}function Nm(){return{duration:Me.interactiveDuration*1.15/1e3,ease:Me.selectionFillEase}}function xo(){return{duration:Me.tooltipDuration/1e3,ease:Me.interactiveEase}}function EL(){return{duration:Me.switchThumbDuration/1e3,ease:Me.switchThumbEase}}function Dm(){return{duration:Me.expandDuration/1e3,ease:Me.expandOpenEase}}function qh(){return{duration:Me.tooltipDuration/1e3,ease:Me.interactiveEase}}function IL(){return{duration:Me.feedbackExpandDuration/1e3}}function wL(){return{duration:Me.progressFillDuration/1e3,ease:Me.progressFillEase}}const RL=3;function NL(){const t=Me.loadingDotsDuration/1e3;return{cycleSec:t,staggerSec:t/RL,halfCycleSec:t/2,easeUp:Me.loadingDotsEaseUp,easeDown:Me.loadingDotsEaseDown,enabled:Me.enableLoadingDots}}X.registerPlugin(Dr,Zi);const Ka="brn-ripple";let Om="";function Wc(){const t=Se().rippleEaseCss;if(Om!==t){const e=/cubic-bezier\(\s*([\d.]+),\s*([\d.]+),\s*([\d.]+),\s*([\d.]+)\s*\)/.exec(t);e?Dr.create(Ka,`${e[1]},${e[2]},${e[3]},${e[4]}`):Dr.create(Ka,"0.25,0.55,0.35,0.95"),Om=t}return Ka}function V(...t){X.killTweensOf(t)}function _s(t){return typeof window>"u"?"none":getComputedStyle(document.documentElement).getPropertyValue(t).trim()||"none"}const _o=()=>_s("--shadow-none"),Cn=()=>_s(Cs.base),Zh=()=>_s(Cs.mid),DL=()=>_s(Cs.large);function OL(t){return t==="none"?_o():_s(Cs[t])}function Ss(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 PL="(max-width: 1024px), (hover: none), (pointer: coarse)";function kL(){return typeof window>"u"||!window.matchMedia?!1:window.matchMedia(PL).matches}function Ne(){return de()||kL()||!Se().enableHoverLift}const BL=2.4,jL=.003,ML=1.8,FL=.002;function Qh(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(BL/r,jL),o)}function Xc(t){return Yc(t)}function GL(t){return Qh(t)}function Yc(t){const{width:e,height:n}=t.getBoundingClientRect(),r=Math.max(e,n,1);return 1+Math.min(Math.max(ML/r,FL),Se().hoverLiftScale-1)}function ht(t,e,n,r){if(Ne()){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:Yc(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=Qh(t),r=Se(),o=r.interactiveDuration*1.15/1e3,s=o*.3,i=!Ne(),a=!!(e!=null&&e.pointerInside&&i),c=a?(e==null?void 0:e.liftScale)!==void 0?e.liftScale:Yc(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 HL(t,e){return e==null||!(e instanceof Node)?!0:!t.contains(e)}function Jh(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)||!HL(c,a.relatedTarget)||Ne())return;const u=t.current;u&&(n&&(n.current=!0),ht(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)||Ne())return;const f=t.current;f&&ht(f,!1,r,o)}}),[t,e,n,r,o])}const Sl="data-gloss-motion-init",nn="will-change-transform origin-center",Pm={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}},zL=120,VL=.35;function UL(t){const{width:e,height:n}=t.getBoundingClientRect(),r=Math.max(e,n,1);return Math.min(1,Math.max(VL,zL/r))}function $L(t,e){const n=Pm.rest,r=Pm[e];if(e==="rest")return r;const o=UL(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 Sr(t,e){const n=getComputedStyle(t).getPropertyValue(e).trim();return n||(typeof document>"u"?"":getComputedStyle(document.documentElement).getPropertyValue(e).trim())}function WL(t,e){const n=$L(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 XL(t,e){const n=Sr(t,"--gloss-inset-top"),r=Sr(t,"--gloss-inset-bottom"),o=Sr(t,"--gloss-elevation"),s=Sr(t,"--gloss-elevation-hover")||o,i=Sr(t,"--gloss-inner-glow"),a=Sr(t,"--gloss-glow-hover"),c=Sr(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{...WL(t,e),boxShadow:XL(t,e)}}function Ei(t){V(t),X.set(t,{scale:1,...So(t,"rest")})}let qa=null;function eg(t){if(Ne()){Ei(t);return}const e=t.matches(":hover")||t.matches(":focus-within");if(V(t),e){X.set(t,{scale:Xc(t),...So(t,"hover")});return}Ei(t)}function YL(t=document){typeof document>"u"||t.querySelectorAll(`[${Sl}]`).forEach(eg)}function KL(){qa||typeof document>"u"||(qa=new MutationObserver(t=>{for(const e of t)if(e.type==="attributes"&&e.attributeName==="data-theme"){YL();return}}),qa.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}))}function Mt(t,e=!0){return n=>{t.current=n,n&&e&&(KL(),n.hasAttribute(Sl)||(n.setAttribute(Sl,""),Ei(n)))}}function wo(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(Ne()){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:Xc(t):1;X.to(t,{scale:s,...So(t,o),duration:r.interactiveDuration/1e3,ease:r.hoverLiftEase,overwrite:"auto"})}function Ro(t,e=!1,n,r){if(de())return Promise.resolve();const o=Se();if(!o.enablePressSqueeze)return r==null||r(),Ne()||vo(t,e,n),Promise.resolve();V(t);const s=GL(t),i=o.interactiveDuration*1.15/1e3,a=i*.3,c=i*1,u=!Ne(),f=e&&u,m=f?"hover":"rest",p=f?Xc(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 qL(t,e){return e==null||!(e instanceof Node)?!0:!t.contains(e)}function No(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&&Ei(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)||!qL(c,a.relatedTarget)||Ne())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||Ne()))return;const f=t.current;f&&vo(f,!1,r)}}),[e,r,o,t])}function Do(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||Ne())return;const g=n.current||r.current;vo(b,g)},[e,t]),a=No(t,e,{pointerInsideRef:n});l.useLayoutEffect(()=>{if(!e)return;const b=t.current;if(!b||typeof ResizeObserver>"u")return;const g=new ResizeObserver(()=>{eg(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,Ro(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 ar="animate-shadow will-change-transform origin-center";function tg(){return{hover:Cn()}}function Kc(){return{idle:Cn(),hover:Zh()}}function qc(t,e,n=Cn,r){l.useLayoutEffect(()=>{e&&Ss(t.current,n())},[e,t,n,r])}function Oo(t,e,n){const r=l.useMemo(()=>Kc(),[]),o=(n==null?void 0:n.resolveIdle)??Cn;l.useLayoutEffect(()=>{e&&Ss(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||Ne()||ht(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||Ne()||ht(c,!1,n==null?void 0:n.liftScale,r)},[e,n==null?void 0:n.liftScale,r,t]);return{motionClass:e?ar:"",shadow:r,onPointerEnter:s,onPointerLeave:i}}function Zc(t,e,n){const r=l.useMemo(()=>Kc(),[]),o=(n==null?void 0:n.resolveIdle)??Cn;l.useLayoutEffect(()=>{e&&Ss(t.current,o())},[e,t,o,n==null?void 0:n.idleSyncKey]);const s=Jh(t,e,n==null?void 0:n.pointerInsideRef,n==null?void 0:n.liftScale,r);return{motionClass:e?ar:"",shadow:r,...s}}const ZL=["small","base","mid","strong","bold"],QL={small:"--font-w-small",base:"--font-w-base",mid:"--font-w-mid",strong:"--font-w-strong",bold:"--font-w-bold"},JL={small:400,base:500,mid:600,strong:700,bold:800};function eE(t){return`var(--font-w-${t})`}const tE=["--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","--color-surface-tint-primary","--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 yr={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:""},nE=new Set(["default","primary","outline","secondary","ghost"]),ng={default:{root:yr.default,loaderText:"text-foreground"},primary:{root:yr.primary,loaderText:"text-primary-foreground"},outline:{root:yr.outline,loaderText:"text-foreground"},secondary:{root:yr.secondary,loaderText:"text-secondary-foreground"},ghost:{root:yr.ghost,loaderText:"text-foreground"},gloss:{root:yr.gloss,loaderText:"text-foreground"}},rE={default:"",danger:"gloss-btn-danger",success:"gloss-btn-success",info:"gloss-btn-info",warning:"gloss-btn-warning"},oE={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"},sE={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")},iE={danger:_e("converge-ripple-danger"),success:_e("converge-ripple-success"),info:_e("converge-ripple-info"),warning:_e("converge-ripple-warning")},aE={small:"[&_svg]:icon-small",base:"[&_svg]:icon-base",mid:"[&_svg]:icon-large",large:"[&_svg]:icon-large"},lE={small:"small",base:"base",mid:"mid",large:"mid"},cE="relative overflow-hidden inline-flex items-center justify-center outline-none focus-ring disabled:pointer-events-none",uE="pointer-events-none absolute inset-0 z-0 overflow-hidden",dE="relative z-[1] grid w-full min-w-0 place-items-center",fE="origin-center will-change-transform",mE="col-start-1 row-start-1 inline-flex w-full min-w-0 items-center justify-center gap-xsmall",pE="inline-flex shrink-0 items-center justify-center",hE="min-w-0 shrink",Qc="col-start-1 row-start-1 flex items-center justify-center",gE="text-success",bE="text-danger",CE="animate-spin motion-reduce:animate-none",xE="cursor-pointer",_E="opacity-50";function SE(t,e){const{root:n}=ng[t];return t==="outline"&&e!=="default"?"bg-transparent text-foreground":n}function vE(t){return ng[t].loaderText}function yE(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 AE(t,e){if(e==="default")return"";switch(t){case"default":return R(Lc[e],xt[e]);case"primary":return Yp[e];case"outline":return R(Ec[e],xt[e]);case"secondary":return xt[e];case"ghost":return xt[e];case"gloss":return""}}function TE(t,e,n){return n?"":et(yE(t,e))}function LE(t,e){return t==="primary"&&e!=="default"?zA[e]:vE(t)}function EE(t,e){return t==="primary"?e==="default"?_e("converge-ripple-primary-fill"):iE[e]:sE[e]}const IE={small:"h-control-small",base:"h-control-base",mid:"h-control-mid",large:"h-control-large"};function wE(t,e=le[t].minWButton){const n=le[t];return R(e,n.padX,n.padY)}function Jc(t,e=!1){const n=le[t];return R(IE[t],e?"min-w-fit":n.minWButton,n.padX,n.padY)}function rg(t){const e=le[t];return R(e.spinnerIcon,e.spinnerBorder)}function RE(){return"pointer-events-none absolute left-1/2 top-1/2 z-0 rounded-full will-change-[transform,opacity]"}function NE(){return"box-border inline-block rounded-full border-current border-t-transparent"}function DE({groupSegment:t,slotClass:e,className:n}){return R(dE,t&&fE,e,n)}function OE({slotClass:t,className:e,layoutClass:n}){return R(mE,t,n,e)}function PE(t,e){return R(pE,aE[t],e)}function kE(t,e){return R(hE,t,e)}function BE(t,e){return R(Qc,t,e)}function jE(t){return R(Qc,gE,t)}function ME(t){return R(Qc,bE,t)}function og(){return"shrink-0"}const FE={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")},GE={danger:_e("converge-ripple-danger"),success:_e("converge-ripple-success"),info:_e("converge-ripple-info"),warning:_e("converge-ripple-warning")};function HE(t,e="default"){return e!=="default"?GE[e]:FE[t]}function zE(t,e,n,r,o){return t?R("gloss-btn",nn,rE[e]):R(SE(n,e),AE(n,e),!r&&ar,TE(n,e,o))}const Za=.12;function VE({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"?Za:1,g=a==="out"?1:Za,h=X.fromTo(m,{scale:b,autoAlpha:s},{scale:g,autoAlpha:0,duration:o/1e3,ease:Wc(),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"?Za:1})`},"aria-hidden":!0})}function sg({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(VE,{...i,background:e,durationMs:r,opacityFrom:o,direction:s,onDone:n},i.id))})}function UE(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 eu(t,e,n,r){const o=t.getBoundingClientRect(),s=e-o.left,i=n-o.top,a=UE(s,i,o.width,o.height)*2;return{id:r,x:s,y:i,size:a}}function $E(t,e){const n=t.currentTarget;return n?eu(n,t.clientX,t.clientY,e):null}function ig(){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=eu(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 fi={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 WE(t){return t==null||t===""?fi.neutral:Object.hasOwn(fi,t)?fi[t]:t}function XE(t){return t.closest("button,a[href],[role='button']")??t.parentElement}function vs({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}=ig(),u=WE(t);return l.useLayoutEffect(()=>{const f=s.current;if(!f||e)return;const m=XE(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(sg,{ripples:i,tone:u,onDone:c,durationMs:n,opacityFrom:Se().rippleDefaultOpacityFrom,direction:r})})}function ft(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function Qi({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,ft(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&&(V(y),y.style.removeProperty("--el-shadow")),S&&(V(S),S.style.transform="")},[n]);const C=l.useMemo(()=>r&&!t?tg():void 0,[r,t]),x=l.useCallback(y=>{if(i==null||i(y),!e||!n||y.defaultPrevented||Ne())return;const S=h();S&&(p.current=!0,t&&!o?vo(S,!0):ht(S,!0,void 0,o?void 0:C))},[e,C,n,t,h,i,o]),_=l.useCallback(y=>{if(a==null||a(y),p.current=!1,!e||!n||Ne())return;const S=h();S&&(t&&!o?vo(S,!1):ht(S,!1,void 0,o?void 0:C))},[e,C,n,t,h,a,o]),v=l.useCallback(y=>{if(c==null||c(y),!e||!n||y.defaultPrevented||de())return;const S=h();if(S){if(t&&!o){Ro(S,p.current,void 0,u);return}We(S,{pointerInside:p.current,shadow:o?void 0:C,onReleaseStart:u})}},[e,C,n,t,h,c,u,o]);return{setRefs:g,btnRef:f,contentMotionRef:m,hoverPointerInsideRef:p,handlePointerEnter:x,handlePointerLeave:_,handlePointerDown:v}}const ag=new Set(["ButtonContent","ButtonLabel","ButtonIcon","ButtonText","ButtonLoader","ButtonSuccess","ButtonError"]);function lg(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 YE(t){return lg(t,e=>e!=null&&ag.has(e))}function ti(t,e){return lg(t,n=>n===e)}function KE(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||!ag.has(r)}function qE(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 ZE(t,e){return 2*qE(t/2,e/2,t,e)}function QE(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 km="data-button-async-layer-init",JE={label:{in:1,out:.92},loader:{in:1,out:.85},success:{in:1,out:.85},error:{in:1,out:.85}};function e0(t,e,n){const r=QE(e,n),{in:o,out:s}=JE[n];X.set(t,{autoAlpha:r?1:0,scale:r?o:s})}function ni(t,e,n){return r=>{t.current=r,r&&!r.hasAttribute(km)&&(r.setAttribute(km,""),e0(r,e,n))}}function t0({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 C=l.useRef(0),x=l.useRef("idle"),_=l.useRef(void 0),v=l.useRef(!1),[y,S]=l.useState([]),T=l.useRef(n),L=l.useMemo(()=>ni(m,T.current,"label"),[]),A=l.useMemo(()=>ni(p,T.current,"loader"),[]),E=l.useMemo(()=>ni(b,T.current,"success"),[]),I=l.useMemo(()=>ni(g,T.current,"error"),[]),w=l.useCallback(k=>{const G=N.btnRef.current;if(!G)return;const D=G.getBoundingClientRect(),P=ZE(D.width,D.height),F=++C.current;S(B=>[...B,{id:F,size:P,tone:k}])},[]),N=Qi({isGloss:t==="gloss",animated:e,enabled:!o,hasHoverShadow:nE.has(t),useContentRef:!!i,forwardedRef:a,onPointerEnter:c,onPointerLeave:u,onPointerDown:f});l.useLayoutEffect(()=>{if(!r)return;const k=x.current;(n==="success"||n==="error")&&k==="loading"&&w(n==="success"?"success":"error"),x.current=n},[n,r,w]),l.useLayoutEffect(()=>{const k=m.current,G=p.current,D=b.current,P=g.current;if(!k||!G||!D||!P)return;const F=de()||!Se().enableAsyncButtonCrossfade,B=ve(),$=[{el:k,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:P,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 O=l.useCallback(k=>{S(G=>G.filter(D=>D.id!==k))},[]),j=l.useCallback((k,G,D,P,F,B)=>$=>{k==null||k($),!(D||!G||$.defaultPrevented)&&(v.current||P!=="idle"||(v.current=!0,F("loading"),Promise.resolve(G($)).then(W=>{const M=W?"success":"error";F(M),w(M),B()}).catch(()=>{F("error"),w("error"),B()}).finally(()=>{v.current=!1})))},[w]);return{setRefs:N.setRefs,contentMotionRef:N.contentMotionRef,bindLabelRef:L,bindLoaderRef:A,bindSuccessRef:E,bindErrorRef:I,expandRipples:y,dismissExpand:O,pushExpandRipple:w,handlePointerEnter:N.handlePointerEnter,handlePointerLeave:N.handlePointerLeave,handlePointerDown:N.handlePointerDown,createAsyncClickHandler:j,asyncInFlight:v}}const cg=l.createContext(null),vl=l.createContext({});function n0({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 jr(){return l.useContext(vl)}function Mr(){return l.useContext(cg)}function r0({value:t,children:e}){return d.jsx(cg.Provider,{value:t,children:e})}const o0={"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"},s0={"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??s0[e];return l.createElement(c,{...i,ref:a,className:R(o0[e],!r&&"text-foreground",o)},s)});function i0({className:t}){return d.jsx("span",{className:R(NE(),t),"aria-hidden":!0})}function a0({className:t}){return d.jsx("svg",{className:R(og(),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 l0({className:t}){return d.jsx("svg",{className:R(og(),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 c0({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,...IL(),ease:Wc(),overwrite:"auto",onComplete:()=>{i||o.current()}});return()=>{i=!0,c.kill(),V(s)}},[t,e]),d.jsx("span",{ref:r,className:RE(),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 Ii=l.forwardRef(function({className:e="",children:n,...r},o){const s=Mr(),i=jr();return d.jsx("span",{ref:o??(s==null?void 0:s.contentMotionRef),className:DE({groupSegment:!!(s!=null&&s.groupSegment),slotClass:i.content,className:e}),...r,children:n})});Ii.displayName="ButtonContent";const tu=l.forwardRef(function({className:e="",children:n,...r},o){const s=Mr(),i=jr();return d.jsx("span",{ref:o??(s==null?void 0:s.bindLabelRef),className:OE({slotClass:i.label,className:e}),...r,children:n})});tu.displayName="ButtonLabel";function nu({className:t="",children:e,...n}){const r=Mr(),o=jr(),s=(r==null?void 0:r.size)??"base";return d.jsx("span",{className:PE(s,R(o.icon,t)),"aria-hidden":!0,...n,children:e})}nu.displayName="ButtonIcon";function ru({className:t="",children:e,...n}){const r=Mr(),o=jr(),s=(r==null?void 0:r.size)??"base";return d.jsx(ee,{variant:lE[s],as:"span",inheritColor:!0,className:kE(o.text,t),...n,children:e})}ru.displayName="ButtonText";const wi=l.forwardRef(function({className:e="",...n},r){const o=Mr(),s=jr(),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),className:BE(c,R(s.loader,e)),"aria-hidden":a!=="loading",...n,children:d.jsx(i0,{className:R(rg(i),CE)})})});wi.displayName="ButtonLoader";const Ri=l.forwardRef(function({className:e="",...n},r){const o=Mr(),s=jr(),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),className:jE(R(s.success,e)),"aria-hidden":a!=="success",...n,children:d.jsx(a0,{className:c.icon})})});Ri.displayName="ButtonSuccess";const Ni=l.forwardRef(function({className:e="",...n},r){const o=Mr(),s=jr(),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),className:ME(R(s.error,e)),"aria-hidden":a!=="error",...n,children:d.jsx(l0,{className:c.icon})})});Ni.displayName="ButtonError";function u0({clipClass:t,expandRipples:e,onDismiss:n}){return d.jsx("span",{className:R(uE,t),"aria-hidden":!0,children:e.map(r=>d.jsx(c0,{size:r.size,tone:r.tone,onDone:()=>n(r.id)},r.id))})}function d0({leftIcon:t,children:e}){const n=KE(e);return d.jsxs(d.Fragment,{children:[t!=null?d.jsx(nu,{children:t}):null,n?d.jsx(ru,{children:e}):e]})}const ug=l.createContext(null),dg=l.createContext(null);function f0({value:t,children:e}){return d.jsx(dg.Provider,{value:t,children:e})}function fg({segment:t,buttonSize:e,variant:n,children:r}){const o=l.useMemo(()=>({segment:t,buttonSize:e,variant:n}),[e,t,n]);return d.jsx(ug.Provider,{value:o,children:r})}function kn(){return l.useContext(ug)}function Po(){return l.useContext(dg)}const yl=l.createContext({}),mg=l.createContext(null),pg=l.createContext(null);function m0({classNames:t,children:e}){const r={...l.useContext(yl),...t};return d.jsx(yl.Provider,{value:r,children:e})}function p0({shellIds:t,children:e}){return d.jsx(mg.Provider,{value:t,children:e})}function Fr(){return l.useContext(yl)}function Ji(){return l.useContext(mg)}function xn(){return l.useContext(pg)}function h0(t){return t==="loading"}function g0({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:C,onClick:x}){const _=Po(),v=kn(),y=xn(),S=_!=null&&_.segmented?void 0:b??(v==null?void 0:v.segment),T=n??(v==null?void 0:v.buttonSize)??(y==null?void 0:y.size)??"base",L=t??(v==null?void 0:v.variant)??"default",A=!!(u??(y==null?void 0:y.disabled)??(y==null?void 0:y.isSubmitting)),E=L==="gloss",[I,w]=l.useState("idle"),N=s!==void 0,O=N?s:I,j=l.useCallback(oe=>{w(oe),i==null||i(oe)},[i]),k=l.useCallback(()=>{window.setTimeout(()=>{j("idle")},c)},[c,j]),G=O==="loading"||O==="success"||O==="error",D=A||G,P=S?gn(S):"rounded-base",F=S?Wr(S):"",B=S?gn(S):"rounded-base",$=YE(C),W=$?void 0:g,M=R(cE,oE[e],Jc(T,p),zE(E,e,L,!!S,D),A?_E:"",P,g,F,xE),z=EE(L,e),H=LE(L,e);return{type:r,size:T,variant:L,status:e,animated:o,ripple:m,blocked:D,busy:G,userDisabled:A,isGloss:E,groupSegment:S,clipClass:B,buttonClass:M,convergeRippleColor:z,loaderTextClass:H,asyncState:O,isControlled:N,internalAsync:I,leftIcon:f,children:C,classNames:h,isCompound:$,labelLayoutClass:W,onClick:x,onAsyncClick:a,setUncontrolledAsync:j,scheduleAsyncIdleReset:k,ariaBusy:h0(O)}}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:C,children:x,onClick:_,onPointerDown:v,onPointerEnter:y,onPointerLeave:S,onMouseDown:T,...L},A){var D;const E=g0({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:C,children:x,onClick:_}),I=t0({variant:E.variant,animated:E.animated,asyncState:E.asyncState,isControlled:E.isControlled,blocked:E.blocked,userDisabled:E.userDisabled,groupSegment:E.groupSegment,forwardedRef:A,onPointerEnter:y,onPointerLeave:S,onPointerDown:v}),w=I.createAsyncClickHandler(E.onClick,E.onAsyncClick,E.isControlled,E.internalAsync,E.setUncontrolledAsync,E.scheduleAsyncIdleReset),N={size:E.size,variant:E.variant,status:E.status,asyncState:E.asyncState,groupSegment:E.groupSegment,loaderTextClass:E.loaderTextClass,bindLabelRef:I.bindLabelRef,bindLoaderRef:I.bindLoaderRef,bindSuccessRef:I.bindSuccessRef,bindErrorRef:I.bindErrorRef,contentMotionRef:I.contentMotionRef},O=ti(x,"ButtonContent"),j=ti(x,"ButtonLoader"),k=ti(x,"ButtonSuccess"),G=ti(x,"ButtonError");return d.jsx(r0,{value:N,children:d.jsx(n0,{classNames:E.classNames,children:d.jsxs("button",{ref:I.setRefs,...L,type:E.type,disabled:E.blocked,"aria-busy":E.ariaBusy,className:E.buttonClass,onPointerDown:I.handlePointerDown,onPointerEnter:I.handlePointerEnter,onPointerLeave:I.handlePointerLeave,onMouseDown:T,onClick:w,children:[E.ripple?d.jsx(vs,{color:E.convergeRippleColor,disabled:E.blocked||E.asyncState!=="idle",duration:Se().rippleDefaultDuration,className:E.clipClass}):null,d.jsx(u0,{clipClass:E.clipClass,expandRipples:I.expandRipples,onDismiss:I.dismissExpand}),E.isCompound?O?x:d.jsxs(Ii,{children:[x,j?null:d.jsx(wi,{}),k?null:d.jsx(Ri,{}),G?null:d.jsx(Ni,{})]}):d.jsxs(Ii,{children:[d.jsx(tu,{className:R((D=E.classNames)==null?void 0:D.label,E.labelLayoutClass),children:d.jsx(d0,{leftIcon:E.leftIcon,children:E.children})}),d.jsx(wi,{}),d.jsx(Ri,{}),d.jsx(Ni,{})]})]})})})});hg.displayName="ButtonRoot";const yo=Object.assign(hg,{Content:Ii,Label:tu,Icon:nu,Text:ru,Loader:wi,Success:Ri,Error:Ni}),Xt=l.createContext(null),Al=l.createContext({});function b0({classNames:t,children:e}){const n=l.useContext(Al),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Al.Provider,{value:r,children:e})}function ou(){return l.useContext(Xt)}function gg(){return l.useContext(Al)}function su(...t){return R(...t)}const C0="inline-flex flex-wrap items-baseline gap-x-xsmall gap-y-0",x0="font-w-mid",_0="text-danger";function S0({className:t,slotClass:e}){return su(C0,e,t)}function v0(t){return su(x0,t)}function y0(t){return su(_0,t)}const A0=!0;function bg(t){return null}bg.displayName="Label";function Bm({children:t,isRequired:e}){const n=gg();return d.jsxs(d.Fragment,{children:[d.jsx(ee,{as:"span",variant:"base",className:v0(n.text),children:t}),e?d.jsx("span",{className:y0(n.required),"aria-hidden":A0,children:"*"}):null]})}function T0({isRequired:t,htmlFor:e,id:n}){const r=ou();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 L0({children:t,className:e,isRequired:n,htmlFor:r,id:o,...s}){const{htmlFor:i,id:a,isRequired:c}=T0({isRequired:n,htmlFor:r,id:o}),u=gg(),f=S0({className:e,slotClass:u.root});if(i!=null)return d.jsx("label",{htmlFor:i,className:f,...s,children:d.jsx(Bm,{isRequired:c,children:t})});const m=s;return d.jsx("span",{id:a,className:f,...m,children:d.jsx(Bm,{isRequired:c,children:t})})}function E0({classNames:t,...e}){return d.jsx(b0,{classNames:t,children:d.jsx(L0,{...e})})}const Ue=Object.assign(E0,{Slot:bg}),I0=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 Bn(...t){return R(...t)}function w0(t){return t.displayName}function iu(t){if(l.isValidElement(t))return w0(t.type)}function R0(t){if(!l.isValidElement(t))return!1;if(t.type==="legend")return!0;const e=iu(t);return e!=null&&I0.has(e)}function N0(t){return iu(t)==="FieldSetGroup"}function D0(t){return iu(t)==="FieldSetActions"}function O0(t){const e=l.Children.toArray(t),n=e.findIndex(R0);return n===-1?{legend:null,body:e}:{legend:e[n],body:[...e.slice(0,n),...e.slice(n+1)]}}function P0(t){const e=[],n=[];let r=null;for(const o of t)D0(o)?r=o:N0(o)?n.push(o):e.push(o);return{loose:e,groups:n,actions:r}}const Tl=l.createContext({});function k0({classNames:t,children:e}){const n=l.useContext(Tl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Tl.Provider,{value:r,children:e})}function au(){return l.useContext(Tl)}const Ll=l.createContext({});function B0({classNames:t,children:e}){const n=l.useContext(Ll),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Ll.Provider,{value:r,children:e})}function ko(){return l.useContext(Ll)}const Cg=l.createContext("base");function j0({size:t,children:e}){return d.jsx(Cg.Provider,{value:t,children:e})}function lu(){return l.useContext(Cg)}const M0="flex w-full flex-col gap-xsmall",F0={default:"text-muted",danger:"text-danger",success:"text-success",warning:"text-warning"},G0="m-0 min-w-0 border-0 p-0 disabled:pointer-events-none disabled:opacity-55",H0="flex min-w-0 w-full flex-col",z0="m-0 block w-full max-w-full border-0 p-0",V0="flex flex-col w-fit",U0="flex min-w-0 w-full flex-col",$0="flex flex-wrap w-fit items-center",cu={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 W0({status:t,className:e,slotClass:n}){return Bn(F0[t],n,e)}function X0({size:t,hasLegend:e,slotClass:n}){const r=cu[t];return Bn(H0,r.stackGap,e&&r.legendGap,n)}function Y0({size:t,className:e,slotClass:n}){return Bn(U0,cu[t].groupGap,n,e)}function K0({size:t,className:e,slotClass:n}){return Bn($0,cu[t].actionsGap,n,e)}function q0({className:t,children:e,...n}){const r=au();return d.jsx("div",{className:Bn(M0,r.root,t),...n,children:e})}function hn({classNames:t,...e}){return d.jsx(k0,{classNames:t,children:d.jsx(q0,{...e})})}function Xe({children:t,className:e,status:n="default",as:r="p",variant:o="small",...s}){const i=au();return d.jsx(ee,{as:r,variant:o,inheritColor:r==="span",className:W0({status:n,className:e,slotClass:i.hint}),...s,children:t})}const Z0=Ue;function Ze({role:t="alert",className:e,...n}){const r=au();return d.jsx(Xe,{status:"danger",role:t,className:Bn(r.error,e),...n})}const ys=l.forwardRef(function({className:e,children:n,...r},o){const s=ko();return d.jsx("legend",{ref:o,className:Bn(z0,s.legend,e),...r,children:n})});ys.displayName="FieldLegend";function ea({children:t,className:e,...n}){const r=ko();return d.jsx("span",{className:Bn(V0,r.legendHeader,e),...n,children:t})}const Gr=l.forwardRef(function({className:e,children:n,...r},o){const s=lu(),i=ko();return d.jsx("div",{ref:o,className:Y0({size:s,className:e,slotClass:i.group}),...r,children:n})});Gr.displayName="FieldSetGroup";const Bo=l.forwardRef(function({className:e,children:n,...r},o){const s=lu(),i=ko();return d.jsx("div",{ref:o,className:K0({size:s,className:e,slotClass:i.actions}),...r,children:n})});Bo.displayName="FieldSetActions";function Q0({legend:t,loose:e,groups:n,actions:r}){const o=lu(),s=ko(),i=[];return n.length>0?i.push(...e,...n):e.length>0&&i.push(d.jsx(Gr,{children:e},"field-set-group")),r!=null&&i.push(r),i.length===0?null:d.jsx("div",{className:X0({size:o,hasLegend:t!=null,slotClass:s.stack}),children:i})}const xg=l.forwardRef(function({className:e,hintId:n,errorId:r,disabled:o,state:s,...i},a){const c=ko();return d.jsxs("fieldset",{ref:a,disabled:o,"aria-describedby":Ft(n,r),className:Bn(G0,c.set,e),...i,children:[s.legend,d.jsx(Q0,{...s})]})});xg.displayName="FieldSetRootInner";function J0(t){const{legend:e,body:n}=O0(t),{loose:r,groups:o,actions:s}=P0(n);return{legend:e,loose:r,groups:o,actions:s}}const uu=l.forwardRef(function({children:e,className:n,classNames:r,hintId:o,errorId:s,disabled:i,size:a="base",...c},u){const f=J0(e);return d.jsx(j0,{size:a,children:d.jsx(B0,{classNames:r,children:d.jsx(xg,{ref:u,className:n,hintId:o,errorId:s,disabled:i,state:f,...c})})})});uu.displayName="FieldSet";function du(t){const e=l.useId();return t??`${e}-hint`}function fu(t){const e=l.useId();return t??`${e}-error`}const _g=Object.assign(uu,{Legend:ys,LegendHeader:ea,Group:Gr,Actions:Bo}),eI=Object.assign(hn,{Root:hn,Hint:Xe,Label:Z0,Error:Ze,Set:_g,Legend:ys,LegendHeader:ea,Group:Gr,Actions:Bo});function en(...t){return R(...t)}function Sg(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function tI(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 nI(t,e){const n=e.trim().toLowerCase();return n?tI(t).includes(n):!0}function vg(t,e){const n=[];for(const r of t)nI(r,e)&&n.push(r.value);return n}function rI(t){return new Map(t.map(e=>[e.value,e]))}function oI(t){return t?typeof t.label=="string"?t.label:t.filterText?t.filterText:t.value:""}function sI({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 iI(t,e){for(const n of t){const r=e.get(n);if(r&&!r.disabled)return n}return null}function aI(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 lI(t,e){return t||(e==="danger"||e==="default"?"default":e)}const cI=[],yg=l.createContext(null);function uI({value:t,children:e}){return d.jsx(yg.Provider,{value:t,children:e})}function As(){const t=l.useContext(yg);if(!t)throw new Error("ComboBox.* must be inside <ComboBox>.");return t}const Ag=l.createContext(null);function dI({value:t,children:e}){return d.jsx(Ag.Provider,{value:t,children:e})}function Tg(){const t=l.useContext(Ag);if(!t)throw new Error("ComboBox compound-parts must be inside <ComboBox>.");return t}const El=l.createContext({});function fI({classNames:t,children:e}){const n=l.useContext(El),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(El.Provider,{value:r,children:e})}function lr(){return l.useContext(El)}const mI="No matches";function pI(t,e){return`${t}-opt-${e}`}function hI({ariaLabel:t,ariaLabelledBy:e,label:n}){return{"aria-label":t??(e?void 0:n),"aria-labelledby":e}}const Lg=l.createContext(null);function gI({value:t,children:e}){return d.jsx(Lg.Provider,{value:t,children:e})}function Eg(t){const e=l.useContext(Lg);if(!e)throw new Error(`${t} must be inside <ListBox>.`);return e}const Il=l.createContext({});function bI({classNames:t,children:e}){const n=l.useContext(Il),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Il.Provider,{value:r,children:e})}function _n(){return l.useContext(Il)}const Ig=l.createContext(null);function CI({value:t,children:e}){return d.jsx(Ig.Provider,{value:t,children:e})}function xI(){return l.useContext(Ig)}const wg=l.createContext(null);function _I({value:t,children:e}){return d.jsx(wg.Provider,{value:t,children:e})}function Rg(){const t=l.useContext(wg);if(!t)throw new Error("SelectionIndicator.* parts must be inside <SelectionIndicator>.");return t}const SI={small:"selection-indicator-small",base:"selection-indicator-base",mid:"selection-indicator-mid",large:"selection-indicator-large"},Ng={small:"icon-xsmall",base:"icon-xsmall",mid:"icon-base",large:"icon-mid"},vI="pointer-events-none relative z-[2] inline-flex items-center justify-center";function yI(t){return R("[&_svg]:size-full",Ng[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)]"},TI="shrink-0 rounded-full bg-indicator-foreground",LI="shrink-0 rounded-full bg-foreground",wl="relative box-border inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full",Dg="pointer-events-none absolute inset-px z-[0] flex origin-center items-center justify-center rounded-[inherit]",EI="bg-indicator text-indicator-foreground",II="bg-secondary text-secondary-foreground",wI="pointer-events-none absolute inset-px z-[1] flex origin-center items-center justify-center rounded-[inherit] gloss-indicator-fill text-foreground",RI=R(Dg,"z-[1] rounded-[inherit] bg-primary-tint"),NI={small:"--selection-indicator-small",base:"--selection-indicator-base",mid:"--selection-indicator-mid",large:"--selection-indicator-large"},DI={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(NI[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 DI[t]*e}function OI(t){switch(t){case"gloss":case"outline":return LI;case"secondary":return"shrink-0 rounded-full bg-secondary-foreground";default:return TI}}function PI(t){return t!=="outline"}function Og(t){return t==="gloss"?wI:R(Dg,t==="secondary"?II:EI)}function kI(t){switch(t){case"gloss":case"outline":return"text-foreground";case"secondary":return"text-secondary-foreground";default:return"text-indicator-foreground"}}function BI(t,e){return R(wl,SI[t],e)}function jI(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 Pg="SelectionIndicatorFill",kg="SelectionIndicatorMark";function Qa(...t){return R(...t)}function Bg(t){return t.type.displayName===Pg}function jg(t){return t.type.displayName===kg}function MI({resolvedIcon:t,showCheck:e,showDot:n,size:r,variant:o}){if(t!=null)return t;if(e)return l.createElement(Ie.IoCheckmarkSharp,{"aria-hidden":!0,className:"size-full"});if(n)return l.createElement("span",{"aria-hidden":!0,className:R(AI[r],OI(o))})}function FI(t){return l.Children.toArray(t).some(e=>l.isValidElement(e)&&(Bg(e)||jg(e)))}function GI(t){const e=l.Children.toArray(t);let n,r;const o=[];for(const s of e){if(l.isValidElement(s)&&Bg(s)){n=s;continue}if(l.isValidElement(s)&&jg(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 HI({shell:t,fill:e,mark:n,classNames:r,className:o}){return{shell:Qa(t,r==null?void 0:r.shell,o),fill:Qa(e,r==null?void 0:r.fill),mark:Qa(n,r==null?void 0:r.mark)}}const zI={transform:"scale(0)",opacity:0},VI={opacity:0},Di=l.forwardRef(function({className:e,style:n,...r},o){const s=Rg();return d.jsx("span",{ref:i=>{s.fillRef.current=i,ft(o,i)},"aria-hidden":!0,className:R(s.fillClassName,e),style:{...zI,...n},...r})});Di.displayName=Pg;const Oi=l.forwardRef(function({className:e,children:n,style:r,...o},s){const i=Rg(),a=n??i.markContent;return a==null?null:d.jsx("span",{ref:c=>{i.markRef.current=c,ft(s,c)},"aria-hidden":!0,className:R(i.markClassName,e),style:{...VI,...r},...o,children:a})});Oi.displayName=kg;function Mg(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=u=>{s&&(s.style.transform=`scale(${u?1:0})`,s.style.opacity=u?"1":"0"),i&&(i.style.opacity=u?"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={...ve(),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,...c}):X.to(i,{scale:.92,autoAlpha:0,...c}))},[t,e,n,o])}function UI({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}=GI(i),g=FI(i),h=p!=null,C=s??(h?p.props.children:b),x=C!=null,_=r&&!x,v=o&&!x&&!_,y=_||x,S=MI({resolvedIcon:C,showCheck:_,showDot:v,size:t,variant:e}),T=h||S!=null,L=PI(e);Mg(n,L?u:void 0,T?f:void 0);const A=HI({shell:jI(e),fill:Og(e),mark:R(vI,y&&yI(t),kI(e)),classNames:c,className:a}),E=l.useMemo(()=>({fillRef:u,markRef:f,fillClassName:A.fill,markClassName:A.mark,markContent:S}),[A.fill,A.mark,S]);return{shellClassName:BI(t,A.shell),contextValue:E,usesCompound:g,fillSlot:m,markSlot:p,hasMark:T,markContent:S,showsFill:L}}function Fg({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:C,showsFill:x}=UI({size:t,variant:e,selected:n,check:r,dot:o,icon:s,children:i,className:a,classNames:c}),_=p?d.jsxs(d.Fragment,{children:[x?b??d.jsx(Di,{}):null,h?g??d.jsx(Oi,{}):null]}):d.jsxs(d.Fragment,{children:[x?d.jsx(Di,{}):null,h?d.jsx(Oi,{children:C}):null]});return d.jsx(_I,{value:m,children:d.jsx("span",{className:f,"aria-hidden":!0,...u,children:_})})}Fg.displayName="SelectionIndicator";const jt=Object.assign(Fg,{Fill:Di,Mark:Oi});function mu(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 ta(t="right"){return R("row-start-1 self-center justify-self-start",t==="left"?"col-start-2":"col-start-1")}function na(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 ra(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 pu(t){return t?3:2}function Gg(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 $I(){return ta()}function WI(t){return t?na():R("row-start-1 col-start-1 inline-flex min-w-0 max-w-full items-center justify-self-start [width:fit-content]")}function XI(t){return t?ra(2):R("row-start-2 col-start-1 min-w-0 max-w-full justify-self-start [width:fit-content]")}function YI(t){return R("row-start-1 self-center shrink-0 justify-self-end",t?"col-start-3":"col-start-2")}const Hg=l.createContext(null);function Rl({value:t,children:e}){return d.jsx(Hg.Provider,{value:t,children:e})}function Ts(t){const e=l.useContext(Hg);if(!e)throw new Error(`${t} must be used inside a list item (Dropdown.Item / ListBox.Item).`);return e}function zg({className:t,children:e,...n}){const r=Ts("ItemLabel");return d.jsx("span",{ref:o=>{r.enableLabelMotion&&r.labelMotionRef&&(r.labelMotionRef.current=o)},className:R("inline-flex min-w-0 items-center",WI(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 Vg({className:t,children:e,...n}){const r=Ts("ItemHint");return d.jsx(ee,{as:"span",variant:"tools",inheritColor:!0,className:R(XI(r.showIndicatorSlot),r.mutedHint||r.disabled?"text-muted":"opacity-80",t),...n,children:e})}function Ug({className:t,children:e,...n}){const r=Ts("ItemIcon");return d.jsx("span",{className:R("inline-flex items-center [&_svg]:icon-base",YI(r.showIndicatorSlot),r.mutedHint||r.disabled?"text-muted":"opacity-80",t),...n,children:e})}function $g({className:t,children:e,...n}){return d.jsx("span",{className:R("relative inline-flex shrink-0 items-center justify-center",$I(),t),...n,children:e})}const KI=new Set(["ListBoxItemIndicator","DropdownItemIndicator"]),qI=new Set(["ListBoxLabel","DropdownItemLabel","Dropdown.ItemLabel"]),ZI=new Set(["ListBoxHint","DropdownItemHint","Dropdown.ItemHint"]),QI=new Set(["ListBoxIcon","DropdownItemIcon","Dropdown.ItemIcon"]);function JI(t){return t.displayName}function Wg(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=JI(i.type);if(a&&KI.has(a)){e==null&&(e=i);continue}if(a&&qI.has(a)){n==null&&(n=i);continue}if(a&&ZI.has(a)){r==null&&(r=i);continue}if(a&&QI.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 ew({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 jm(t){return t==null?[]:Array.isArray(t)?[...t]:[t]}function tw(t){return Wg(t)}function nw({children:t,label:e,hint:n,icon:r,showIndicator:o}){const s=tw(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 cr({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||Ne())return;c.current=!0;const b=n.current;b&&ht(b,!0,Se().hoverLiftScale)},[e,r,t,o,n]),f=l.useCallback(p=>{if(s==null||s(p),!r||(c.current=!1,Ne()))return;const b=n.current;b&&ht(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 rw(t){return wo(void 0,t)}function ow({disabled:t,hasLabel:e,onPointerDown:n}){const r=l.useRef(null),o=!t&&e,{handlePointerDown:s}=cr({isDisabled:t,enabled:o,textMotionRef:r,onPointerDown:n});return{labelMotionRef:r,enableLabelMotion:o,handlePointerDown:s}}const sw="flex min-h-0 flex-col gap-xsmall text-left outline-none",iw="gloss-panel gloss-deep rounded-mid p-plus text-foreground",aw="flex min-w-0 flex-col gap-xsmall",lw="px-plus text-left",cw="text-muted",uw="my-xsmall h-0 w-full shrink-0 border-t-token",dw="px-mid py-small text-center text-muted",fw="w-full min-w-0 rounded-mid px-plus py-base text-left outline-none",mw="cursor-pointer text-foreground focus-ring",pw="cursor-not-allowed bg-transparent text-muted opacity-45 hover:bg-transparent",hw="bg-default-hover";function gw({isGloss:t,slotClass:e,className:n}){return ut(sw,t&&iw,e,n)}function bw({slotClass:t,className:e}){return ut(aw,t,e)}function Cw({slotClass:t,className:e}){return ut(lw,t,e)}function xw({slotClass:t,className:e}){return ut(cw,t,e)}function _w({slotClass:t,className:e}){return ut(uw,t,e)}function Sw({slotClass:t,className:e}){return ut(dw,t,e)}function vw({disabled:t,isActive:e,slotClass:n,className:r}){return ut(fw,!t&&ut(mw,et()),t&&pw,e&&!t&&hw,n,r)}function yw({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}=Eg("ListBox.Item"),g=s||!!m,h=a.has(o),C=c===o,x=pI(i,o),_=nw({children:t,label:e,hint:n,icon:r,showIndicator:u});return{disabled:g,isSelected:h,isActive:C,optionId:x,indicatorMode:f,selectItem:p,setActiveValue:b,..._}}function Xg({listId:t,variant:e="default",className:n,ariaLabel:r,ariaLabelledBy:o,children:s,...i}){const a=_n(),c=e==="gloss",u=rw(c);return d.jsx("div",{ref:u,id:t,role:"listbox","aria-label":r,"aria-labelledby":o,className:gw({isGloss:c,slotClass:a.root,className:n}),...i,children:s})}Xg.displayName="ListBox";function Yg({className:t,children:e,...n}){const r=_n(),[o,s]=l.useState(),i=l.useCallback(a=>{s(a)},[]);return d.jsx(CI,{value:i,children:d.jsx("div",{role:"group","aria-labelledby":o,className:bw({slotClass:r.section,className:t}),...n,children:e})})}Yg.displayName="ListBoxSection";function Kg({className:t,children:e,id:n,...r}){const o=l.useId(),s=n??o,i=_n(),a=xI();return l.useEffect(()=>(a==null||a(s),()=>a==null?void 0:a(void 0)),[s,a]),d.jsx("div",{id:s,className:Cw({slotClass:i.header,className:t}),...r,children:d.jsx(ee,{as:"span",variant:"small",className:xw({slotClass:i.headerText}),children:e})})}Kg.displayName="ListBoxHeader";function qg({className:t,...e}){const n=_n();return d.jsx("div",{role:"presentation","aria-hidden":!0,className:_w({slotClass:n.separator,className:t}),...e})}qg.displayName="ListBoxSeparator";function Zg({className:t,children:e,...n}){const r=_n();return d.jsx(ee,{as:"p",variant:"base",className:Sw({slotClass:r.empty,className:t}),...n,children:e??mI})}Zg.displayName="ListBoxEmpty";const Qg=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=_n(),{disabled:g,isSelected:h,isActive:C,optionId:x,indicatorMode:_,isCompound:v,hasHint:y,hasIcon:S,hasLabel:T,showIndicatorSlot:L,selectItem:A,setActiveValue:E}=yw({children:e,label:s,hint:i,icon:a,value:r,disabled:o}),{labelMotionRef:I,enableLabelMotion:w,handlePointerDown:N}=ow({disabled:g,hasLabel:T,onPointerDown:u}),O=l.useCallback(D=>{c==null||c(D),!(D.defaultPrevented||g)&&A(r)},[g,c,A,r]),j=l.useCallback(D=>{f==null||f(D),!g&&E(r)},[g,f,E,r]),k={showIndicatorSlot:L,hasHint:y,hasIcon:S,selected:h,indicatorMode:_,disabled:g,mutedHint:g,enableLabelMotion:w,labelMotionRef:I},G=v?d.jsx(d.Fragment,{children:e}):d.jsxs(d.Fragment,{children:[L?d.jsx(Cu,{}):null,s!=null?d.jsx(hu,{children:s}):null,i!=null?d.jsx(gu,{children:i}):null,a!=null?d.jsx(bu,{children:a}):null]});return d.jsx(Rl,{value:k,children:d.jsx("button",{ref:p,type:"button",id:x,role:"option","aria-selected":h,disabled:g,tabIndex:-1,className:ut(vw({disabled:g,isActive:C,slotClass:b.item}),Gg(y,"gap-x-base",L,S),n),onClick:O,onPointerDown:N,onPointerEnter:j,...m,children:G})})});Qg.displayName="ListBoxItem";function hu({className:t,...e}){const n=_n();return d.jsx(zg,{className:ut(n.label,t),...e})}hu.displayName="ListBoxLabel";function gu({className:t,...e}){const n=_n();return d.jsx(Vg,{className:ut(n.hint,t),...e})}gu.displayName="ListBoxHint";function bu({className:t,...e}){const n=_n();return d.jsx(Ug,{className:ut(n.icon,t),...e})}bu.displayName="ListBoxIcon";function Cu({variant:t="base",size:e="small",check:n,children:r,className:o,classNames:s,...i}){const a=Ts("ListBox.ItemIndicator"),c=_n();if(!a.showIndicatorSlot)return null;const u=n??a.indicatorMode==="multi";return d.jsx($g,{className:ut(c.itemIndicator,s==null?void 0:s.itemIndicator,o),...i,children:d.jsx(jt,{variant:t,size:e,selected:a.selected,check:u,classNames:ew({slotClassNames:c,classNames:s}),children:r})})}Cu.displayName="ListBoxItemIndicator";function xu(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 Aw({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(()=>jm(r)),h=p?jm(n):b,C=l.useMemo(()=>new Set(h),[h]),x=l.useRef(h);x.current=h;const[_,v]=l.useState(null),y=a!==void 0,S=y?a:_,T=l.useCallback(I=>{y||v(I),c==null||c(I)},[y,c]),L=l.useCallback(I=>{p||g(I),o==null||o(e?I:I[0]??"")},[p,e,o]),A=l.useCallback(I=>{const w=xu(x.current,I,e);x.current=w,L(w)},[e,L]),E=l.useMemo(()=>({listId:m,size:t,multiple:e,selected:C,selectItem:A,activeValue:S,setActiveValue:T,showIndicator:s,indicatorMode:e?"multi":"radio",disabled:i}),[S,i,m,e,A,C,s,T,t]);return{listId:m,contextValue:E}}function Jg({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":C,...x}){const{listId:_,contextValue:v}=Aw({size:r,multiple:s,value:i,defaultValue:a,onValueChange:c,selectionIndicator:u,disabled:f,activeValue:m,onActiveValueChange:p,listId:b}),y=hI({ariaLabel:h,ariaLabelledBy:C,label:g});return d.jsx(gI,{value:v,children:d.jsx(bI,{classNames:t,children:d.jsx(Xg,{listId:_,variant:o,className:n,ariaLabel:y["aria-label"],ariaLabelledBy:y["aria-labelledby"],...x,children:e})})})}Jg.displayName="ListBox";const Tw=Object.assign(Cu,{Fill:jt.Fill,Mark:jt.Mark}),wr=Object.assign(Jg,{Section:Yg,Header:Kg,Separator:qg,Empty:Zg,Item:Qg,Label:hu,Hint:gu,Icon:bu,ItemIndicator:Tw}),eb=l.createContext(null);function Lw({value:t,children:e}){return d.jsx(eb.Provider,{value:t,children:e})}function Ls(t){const e=l.useContext(eb);if(!e)throw new Error(`${t} must be inside <Popover>.`);return e}const Nl=l.createContext({});function Ew({classNames:t,children:e}){const n=l.useContext(Nl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Nl.Provider,{value:r,children:e})}function Hr(){return l.useContext(Nl)}const tb=l.createContext("bottom");function Iw({value:t,children:e}){return d.jsx(tb.Provider,{value:t,children:e})}function ww(){return l.useContext(tb)}function Rw(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 Ae(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=>Rw(s.type,i))){n=!0;return}r(s.props.children)}}};return r(t),n}function Nw(t){return`${t}-label`}function Dw(t){return`${t}-hint`}function Ow({contentRole:t,labelConnected:e,hintConnected:n,labelId:r,hintId:o}){if(t==="dialog"){if(e&&n)return`${r} ${o}`;if(n)return o}}function Pw({contentRole:t,labelConnected:e,labelId:n}){if(t==="dialog"&&e)return n}const nb="PopoverArrow";function rn(...t){return R(...t)}function Dl(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function Mm(t){return t.type.displayName===nb}function kw(t){const e=l.Children.toArray(t),n=e.find(o=>l.isValidElement(o)&&Mm(o)),r=e.filter(o=>!(l.isValidElement(o)&&Mm(o)));return{customArrow:n,panelChildren:r}}function Bw(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 jw({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]=Bw(o,s,i),m=l.useRef(null),p=l.useRef(null),g=`popover-${l.useId()}`,h=Nw(g),C=Dw(g),x=Ae(t,"PopoverLabel"),_=Ae(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 A;const T=S.target,L=(a==null?void 0:a.current)??m.current;L!=null&&L.contains(T)||(A=p.current)!=null&&A.contains(T)||c&&!c(T)||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:C,size:e,variant:n,side:r,labelConnected:x,hintConnected:_,triggerRef:m,anchorRef:a,contentRef:p}),[a,_,C,x,h,u,g,f,r,e,n])}}const _u="data-theme",rb=`[${_u}]`;function Ol(t){const e=t.getAttribute(_u);return e==="light"?"light":e?"dark":null}function Mw(t){if(typeof document>"u")return!1;if(t){const e=t.closest(rb);if(e)return Ol(e)==="light"}return Ol(document.documentElement)==="light"}function jo(t){if(typeof document>"u")return{};const e=(t==null?void 0:t.closest(rb))??document.documentElement;return Ol(e)!=="light"?{}:e===document.documentElement?{}:{"data-theme":"light"}}function Fw(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 Gw(t,e){if(typeof document>"u")return()=>{};const n=new MutationObserver(e);for(const r of Fw(t))n.observe(r,{attributes:!0,attributeFilter:[_u]});return()=>n.disconnect()}function Su(t){return l.useSyncExternalStore(l.useCallback(e=>Gw(t,e),[t]),()=>Mw(t),()=>!1)}function Hw(t){return t?"current"in t?t.current:t:null}function vu(t,e){const n=Hw(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 Es({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 zw=8;function Vw(t,e,n,r){return Math.max(r,Math.min(t,n-e-r))}function oa(t,e,n,r,o,s){const i=r==="start"?t:r==="end"?t+e-n:t+e/2-n/2;return Vw(i,n,o,s)}function Uw(t,e,n,r){return t.top-n-e>=r}function $w(t,e,n,r){return t.bottom+n+e<=window.innerHeight-r}function Ww(t,e,n,r){return t.left-n-e>=r}function Xw(t,e,n,r){return t.right+n+e<=window.innerWidth-r}function Yw(t,e,n,r,o){return{left:oa(t.left,t.width,e.width,o,window.innerWidth,r),top:t.top-n-e.height,resolvedSide:"top"}}function Kw(t,e,n,r,o){return{left:oa(t.left,t.width,e.width,o,window.innerWidth,r),top:t.bottom+n,resolvedSide:"bottom"}}function qw(t,e,n,r,o){return{left:t.left-n-e.width,top:oa(t.top,t.height,e.height,o,window.innerHeight,r),resolvedSide:"left"}}function Zw(t,e,n,r,o){return{left:t.right+n,top:oa(t.top,t.height,e.height,o,window.innerHeight,r),resolvedSide:"right"}}const Fm={top:Yw,bottom:Kw,left:qw,right:Zw},Qw={top:(t,e,n,r,o)=>Uw(t,n,r,o),bottom:(t,e,n,r,o)=>$w(t,n,r,o),left:(t,e,n,r,o)=>Ww(t,e,r,o),right:(t,e,n,r,o)=>Xw(t,e,r,o)},Jw={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]};function ob(t,e,n,r,o){const s=r,i=zw,a=(o==null?void 0:o.align)??"center",c=Jw[n];for(const u of c)if(Qw[u](t,e.width,e.height,s,i))return Fm[u](t,e,s,i,a);return Fm[n](t,e,s,i,a)}const sb={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"},sa=.97;function $t(){return de()}function ab(){return{opacity:$t()?1:0}}function yu(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 lb({overlay:t,panel:e,vars:n,panelFrom:r={scale:sa},panelTo:o={scale:1}}){V(t,e),X.fromTo(t,{opacity:0},{opacity:1,...n}),X.fromTo(e,r,{...o,...n})}function cb({overlay:t,panel:e,vars:n,onComplete:r,panelExit:o={autoAlpha:0,scale:sa}}){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 ia(t){t&&(t.style.opacity="",t.style.visibility="",X.set(t,{scale:1,clearProps:"transform"}))}function eR(t){t.style.opacity="1",t.style.visibility="visible"}function aa({surface:t,vars:e,from:n={scale:sa},to:r={scale:1}}){V(t),eR(t),X.fromTo(t,n,{...r,...e})}function la({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 tR({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),[C,x]=l.useState(e),_=l.useCallback(y=>{m.current=y,c.current=y,Dl(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 T=y.getBoundingClientRect(),L=ob(T,S.getBoundingClientRect(),e,n,{align:r});x(L.resolvedSide),S.style.position="fixed",S.style.left=`${L.left}px`,S.style.top=`${L.top}px`,S.style.transform="",o?S.style.minWidth=`${Math.max(T.width,192)}px`:S.style.minWidth=""},[r,f,o,n,e,u]);return l.useLayoutEffect(()=>{t&&h(!0)},[t]),qc(m,!i,Cn),l.useLayoutEffect(()=>{if(!t)return;v();const y=window.requestAnimationFrame(()=>v()),S=()=>v();window.addEventListener("scroll",S,!0),window.addEventListener("resize",S);const T=m.current,L=T&&typeof ResizeObserver<"u"?new ResizeObserver(()=>v()):null;return T&&L&&L.observe(T),()=>{window.cancelAnimationFrame(y),window.removeEventListener("scroll",S,!0),window.removeEventListener("resize",S),L==null||L.disconnect()}},[t,v,s,n,r,o]),l.useLayoutEffect(()=>{if(!g)return;const y=m.current;if(!y)return;const S=$t();let T=!1;if(S)return V(y),t?ia(y):h(!1),()=>{T=!0};if(V(y),t)return aa({surface:y,vars:{...xo(),overwrite:"auto"}}),()=>{T=!0,V(y)};const L=la({surface:y,vars:{...xo(),overwrite:"auto"},onComplete:()=>{T||h(!1)}});return()=>{T=!0,V(y),L.kill()}},[t,g]),{panelRef:m,setPanelRef:_,bindGlossPanelRef:b,portalMounted:g,resolvedSide:C}}function nR({alignProp:t,matchAnchorWidth:e}){return t??(e?"start":"center")}const ws=6,rR={small:"small",base:"base",mid:"mid",large:"mid"},oR={small:"tools",base:"small",mid:"small",large:"base"},ub={small:"min-w-[12rem]",base:"min-w-[14rem]",mid:"min-w-[16rem]",large:"min-w-[18rem]"},db={small:"max-w-[16rem]",base:"max-w-xs",mid:"max-w-sm",large:"max-w-md"},fb={small:"p-small",base:"p-base",mid:"p-plus",large:"p-mid"},mb={small:"gap-small",base:"gap-base",plus:"gap-plus",mid:"gap-mid"},sR={small:"small",base:"base",mid:"plus",large:"mid"},iR="inline-flex shrink-0 border-0 bg-transparent p-0",aR="pointer-events-auto z-[10000] w-max min-w-0 overflow-visible text-left outline-none will-change-transform",lR="relative overflow-visible",cR="gloss-panel gloss-deep relative z-[1] flex min-w-0 origin-center flex-col overflow-hidden rounded-mid text-foreground",uR="gloss-content flex min-w-0 flex-col",dR="relative z-[1] flex min-w-0 flex-col overflow-hidden rounded-mid border-token bg-surface text-foreground animate-shadow",fR="pointer-events-none absolute z-0 size-2 rotate-45",mR="border-0 bg-[var(--color-surface)]",pR="border-token bg-surface",hR="flex shrink-0 flex-col gap-xsmall text-left",gR="min-w-0 font-w-mid",bR="min-h-0 min-w-0 text-left";function CR({rootSlot:t,slotClass:e,className:n}){return rn(iR,t,e,n)}function xR({resolvedSide:t,showArrow:e,slotClass:n,className:r}){return rn(aR,e&&ib[t],n,r)}function _R({size:t,unstyled:e,contentGap:n,slotClass:r}){return rn(cR,nn,!e&&ub[t],!e&&db[t],!e&&fb[t],!e&&mb[n],r)}function SR(t){return rn(uR,t)}function vR({size:t,unstyled:e,contentGap:n,slotClass:r}){return rn(dR,!e&&ub[t],!e&&db[t],!e&&fb[t],!e&&mb[n],r)}function yR({isGloss:t,arrowSideClass:e,slotClass:n,className:r}){return rn(fR,t?mR:pR,e,n,r)}function AR({slotClass:t,className:e}){return rn(hR,t,e)}function TR({slotClass:t,className:e}){return rn(gR,t,e)}function LR({slotClass:t,className:e}){return rn(bR,t,e)}function ER(t){return rR[t]}function IR(t){return oR[t]}const pb=l.forwardRef(function({className:e="",children:n,onClick:r,onPointerDown:o,...s},i){const{open:a,setOpen:c,triggerRef:u,popoverId:f}=Ls("Popover.Trigger"),m=Hr(),p=Is(),b=l.useCallback(_=>{u.current=_,Dl(i)(_)},[i,u]),g=l.useCallback(_=>{a||p.current||_.button!==0||(_.preventDefault(),Es({triggerRef:u,openingRef:p,setOpen:()=>c(!0)}))},[a,p,u,c]),h=l.useCallback(_=>{r==null||r(_),!_.defaultPrevented&&a&&c(!1)},[r,a,c]),C=l.useCallback(_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),a?c(!1):p.current||c(!0))},[a,p,c]),x=l.Children.count(n)===1&&l.isValidElement(n)?n:null;if(x){const _=x;return l.cloneElement(_,{className:rn(m.root,m.trigger,_.props.className,e),onPointerDown:v=>{var y,S;g(v),(S=(y=_.props).onPointerDown)==null||S.call(y,v),o==null||o(v)},onClick:v=>{var y,S;(S=(y=_.props).onClick)==null||S.call(y,v),h(v)},"aria-expanded":a,"aria-controls":a?f:void 0,ref:Dl(_.props.ref,b)})}return d.jsx("button",{type:"button",ref:b,className:CR({rootSlot:m.root,slotClass:m.trigger,className:e}),"aria-expanded":a,"aria-controls":a?f:void 0,onPointerDown:_=>{o==null||o(_),g(_)},onClick:h,onKeyDown:C,...s,children:n})});pb.displayName="PopoverTrigger";function Au({className:t,...e}){const n=ww(),{variant:r}=Ls("Popover.Arrow"),o=Hr(),s=r==="gloss";return d.jsx("span",{"aria-hidden":!0,className:yR({isGloss:s,arrowSideClass:sb[n],slotClass:o.arrow,className:t}),...e})}Au.displayName=nb;function hb({className:t,children:e,...n}){const r=Hr();return d.jsx("div",{className:AR({slotClass:r.header,className:t}),...n,children:e})}hb.displayName="PopoverHeader";const gb=l.forwardRef(function({className:e,children:n,id:r,...o},s){const{labelId:i,size:a}=Ls("Popover.Label"),c=Hr();return d.jsx(ee,{ref:s,as:"h2",variant:ER(a),id:r??i,className:TR({slotClass:c.label,className:e}),...o,children:n})});gb.displayName="PopoverLabel";function bb({className:t,children:e,variant:n,...r}){const{hintId:o,size:s}=Ls("Popover.Hint"),i=Hr();return d.jsx(Xe,{as:"p",id:o,variant:n??IR(s),className:rn(i.hint,t),...r,children:e})}bb.displayName="PopoverHint";function Cb({className:t,children:e,...n}){const r=Hr();return d.jsx("div",{className:LR({slotClass:r.body,className:t}),...n,children:e})}Cb.displayName="PopoverBody";const xb=l.forwardRef(function({className:e="",children:n,showArrow:r=!1,offset:o=ws,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:C,labelConnected:x,hintConnected:_,labelId:v,hintId:y,triggerRef:S,anchorRef:T,contentRef:L}=Ls("Popover.Content"),A=Hr(),E=h==="gloss",I=nR({alignProp:a,matchAnchorWidth:i}),w=s??sR[g],{customArrow:N,panelChildren:O}=kw(n),{setPanelRef:j,bindGlossPanelRef:k,portalMounted:G,resolvedSide:D}=tR({open:p,side:C,offset:o,align:I,matchAnchorWidth:i,showArrow:r,isGloss:E,forwardedRef:m,contentRef:L,triggerRef:S,anchorRef:T});if(!G||typeof document>"u")return null;const P=jo((T==null?void 0:T.current)??S.current),F=Ow({contentRole:u,labelConnected:x,hintConnected:_,labelId:v,hintId:y}),B=Pw({contentRole:u,labelConnected:x,labelId:v}),$=d.jsx(Iw,{value:D,children:d.jsx("div",{ref:j,...P,id:b,role:u,"aria-modal":u==="dialog"?"false":void 0,"aria-labelledby":B,"aria-describedby":F,"data-side":D,className:xR({resolvedSide:D,showArrow:r,slotClass:A.content,className:e}),...f,children:d.jsxs("div",{className:lR,children:[r?N??d.jsx(Au,{}):null,E?d.jsx("div",{ref:k,className:_R({size:g,unstyled:c,contentGap:w,slotClass:A.glossPanel}),children:d.jsx("div",{className:SR(A.glossContent),children:O})}):d.jsx("div",{className:vR({size:g,unstyled:c,contentGap:w,slotClass:A.panel}),children:O})]})})});return Pr.createPortal($,document.body)});xb.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}=jw({children:t,size:n,variant:r,side:o,open:s,defaultOpen:i,onOpenChange:a,anchorRef:c,shouldDismiss:u});return d.jsx(Lw,{value:f,children:d.jsx(Ew,{classNames:e,children:t})})}_b.displayName="PopoverRoot";const Pt=Object.assign(_b,{Trigger:pb,Content:xb,Header:hb,Label:gb,Hint:bb,Body:Cb,Arrow:Au}),Gm="data-chevron-init";function mi(t,e){X.set(t,{rotation:e?180:0})}function wR(t,e){return n=>{t.current=n,n&&!n.hasAttribute(Gm)&&(n.setAttribute(Gm,""),mi(n,e))}}function zr(t,e,n=()=>!0,r){const o=l.useRef(t),s=l.useRef(void 0),i=l.useMemo(()=>wR(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,mi(a,t);return}const c=de()||!n();if(s.current===void 0){s.current=t,mi(a,t);return}if(s.current!==t){if(s.current=t,V(a),c){mi(a,t);return}X.to(a,{rotation:t?180:0,...ve(),overwrite:"auto"})}},[t,e,n,r]),i}const RR={default:"default",danger:"danger-tint-hover",success:"success-tint-hover",warning:"warning-tint-hover"};function Vr(t,e="default"){return t?Kp(RR[e],"focus-within"):""}const Ur="field-shell-transition motion-reduce:transition-none",$r="focus-within-ring";function Mo(t,e){const n=Oo(t,e);return{shellHoverMotionClass:n.motionClass,onShellPointerEnter:n.onPointerEnter,onShellPointerLeave:n.onPointerLeave}}function NR(t){return`${t}-label`}function DR(t){return`${t}-listbox`}function OR(t){return{hintId:Yt(t),errorId:Kt(t),labelId:NR(t),listId:DR(t)}}function PR(t,e,n){return e&&n?`${t}-opt-${n}`:void 0}function kR(t){return t?"Close list":"Open list"}function Sb({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?Ro(c,!0):We(c)).then(()=>{i.current=!1,!e&&(o(!0),s==null||s())})}function vb(){return l.useRef(!1)}const Et="field-control-mobile-no-zoom",BR={default:"bg-surface",outline:"bg-transparent"},jR={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},MR={small:le.small.controlPad,base:le.base.controlPad,mid:le.mid.controlPad,large:le.large.controlPad},FR={small:le.small.chevronIcon,base:le.base.chevronIcon,mid:le.mid.chevronIcon,large:le.large.chevronIcon},GR="relative z-0 flex min-w-0 items-stretch border-1 text-left overflow-hidden motion-reduce:transition-none",HR=`min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted ${Et}`,zR="text-muted",VR="flex shrink-0 origin-center items-center justify-center self-stretch px-small outline-none text-muted hover:text-foreground focus-ring",UR="pointer-events-none",$R="z-[100]",WR="gap-0 p-base",XR="overflow-y-auto overflow-x-hidden",YR="cursor-not-allowed opacity-55 shadow-token-base",KR="cursor-pointer";function qR({variant:t,status:e}){const n=e==="danger"||e==="success"||e==="warning";return t==="gloss"?"gloss-control":n?R(jR[e],"border-token"):R(t==="outline"?"bg-transparent border-token":R(BR[t],"border-token"))}function ZR(t){return t?R(gn(t),Wr(t)):"rounded-base"}function QR({variant:t,status:e,disabled:n,groupSegment:r,shellHoverMotionClass:o,className:s,slotClass:i}){const a=t==="gloss";return en(GR,(r==null?void 0:r.orientation)==="horizontal"?"flex-1":"w-full",ZR(r),qR({variant:t,status:e}),Ur,$r,a?"":Vr(!n,e),o,n?YR:KR,s,i)}function JR({size:t,muted:e,className:n,slotClass:r}){return en(HR,MR[t],e&&zR,n,r,Et)}function eN({disabled:t,className:e,slotClass:n}){return en(VR,t&&UR,e,n)}const Tu=l.forwardRef(function({className:e,children:n,groupSegment:r,onPointerEnter:o,onPointerLeave:s,...i},a){const c=Po(),u=kn(),f=lr(),m=As(),{open:p,setOpen:b,disabled:g,variant:h,status:C,size:x,anchorRef:_,listId:v}=m,y=vb(),S=h==="gloss",T=c!=null&&c.segmented?void 0:r??(u==null?void 0:u.segment),L=Mo(_,!g&&!S&&T==null),A=Do(_,!g&&S&&T==null),E=l.useCallback(N=>{_.current=N,!g&&S&&A.bindShellRef(N)},[_,g,A,S]),I=l.useCallback(()=>{Sb({anchorRef:_,disabled:g,isGloss:S,groupSegment:T,setOpen:b,openingRef:y})},[_,g,T,S,b,y]),w=l.useCallback(N=>{g||p||N.button===0&&I()},[g,p,I]);return d.jsx("div",{ref:Sg(a,E),role:"combobox","aria-expanded":p,"aria-controls":p?v:void 0,"aria-haspopup":"listbox","aria-disabled":g||void 0,onPointerDown:w,onPointerEnter:N=>{o==null||o(N),!N.defaultPrevented&&(S&&T==null?A.onShellPointerEnter(N):L.onShellPointerEnter(N))},onPointerLeave:N=>{s==null||s(N),S&&T==null?A.onShellPointerLeave(N):L.onShellPointerLeave(N)},onFocusCapture:S&&!g&&T==null?A.onShellFocusIn:void 0,onBlurCapture:S&&!g&&T==null?A.onShellFocusOut:void 0,...g&&S?{"data-gloss-disabled":""}:{},className:QR({variant:h,status:C,disabled:g,groupSegment:T,shellHoverMotionClass:S?A.shellHoverMotionClass:L.shellHoverMotionClass,className:e,slotClass:f.inputGroup}),...i,children:n})});Tu.displayName="ComboBoxInputGroup";const Lu=l.forwardRef(function({className:e,onKeyDown:n,onChange:r,onBlur:o,...s},i){const a=lr(),c=As(),{comboBoxId:u,open:f,setOpen:m,value:p,setValue:b,filterQuery:g,setFilterQuery:h,listId:C,activeValue:x,setActiveValue:_,inputRef:v,anchorRef:y,options:S,filteredValues:T,disabled:L,placeholder:A,size:E,status:I,isRequired:w,hintConnected:N,errorConnected:O,hintId:j,errorId:k,variant:G,formInputRef:D,formOnBlur:P}=c,F=vb(),B=l.useRef(null),$=G==="gloss",W=l.useMemo(()=>rI(S),[S]),M=l.useMemo(()=>W.get(p),[W,p]),z=l.useMemo(()=>oI(M),[M]),H=PR(C,f,x),oe=Ft(N?j:void 0,O?k:void 0),pe=l.useCallback(()=>{const U=B.current;B.current=null;const ae=U??"";h(ae);const he=vg(S,ae),De=he.indexOf(p);_(De>=0?p:he[0]??null),requestAnimationFrame(()=>{const Ye=v.current;if(!Ye)return;Ye.focus();const q=ae.length;Ye.setSelectionRange(q,q)})},[v,S,_,h,p]),ce=l.useCallback(()=>{Sb({anchorRef:y,disabled:L,isGloss:$,setOpen:m,onOpened:pe,openingRef:F,preferStandardSqueeze:!0})},[y,L,pe,$,m,F]),Y=l.useCallback(U=>{const ae=sI({filteredValues:T,activeValue:x,optionsByValue:W,delta:U});ae&&_(ae)},[x,T,W,_]),ne=l.useCallback(U=>{var he;const ae=W.get(U);!ae||ae.disabled||(b(U),m(!1),h(""),(he=v.current)==null||he.focus())},[v,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||L)&&!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(),x&&ne(x);return}if(U.key==="Home"){U.preventDefault();const ae=iI(T,W);ae&&_(ae);return}if(U.key==="End"){U.preventDefault();const ae=aI(T,W);ae&&_(ae)}}},[x,Y,L,T,n,f,ce,W,ne,_]);l.useEffect(()=>{f||h("")},[f,h]);const Ce=f?g:z,te=l.useCallback(U=>{o==null||o(U),P==null||P()},[P,o]);return d.jsx("input",{ref:Sg(i,v,D),id:u,type:"text","aria-autocomplete":"list","aria-activedescendant":H,"aria-required":w||void 0,"aria-invalid":I==="danger"?!0:void 0,"aria-describedby":oe,disabled:L,readOnly:!f,autoComplete:"off",placeholder:A,value:Ce,onChange:me,onKeyDown:re,onBlur:te,className:JR({size:E,muted:!f&&!M,className:e,slotClass:a.input}),...s})});Lu.displayName="ComboBoxInput";const Eu=l.forwardRef(function({className:e,onPointerDown:n,...r},o){const s=lr(),{open:i,setOpen:a,setFilterQuery:c,disabled:u,size:f,inputRef:m}=As(),p=l.useRef(null),b=zr(i,p),g=l.useCallback(C=>{b(C),typeof o=="function"?o(C):o&&(o.current=C)},[b,o]),h=l.useCallback(C=>{if(n==null||n(C),C.stopPropagation(),!u){if(i){a(!1),c("");return}C.button===0&&(a(!0),requestAnimationFrame(()=>{var x;return(x=m.current)==null?void 0:x.focus()}))}},[u,m,n,i,c,a]);return d.jsx("button",{type:"button",ref:g,tabIndex:-1,disabled:u,"aria-label":kR(i),className:eN({disabled:u,className:e,slotClass:s.trigger}),onPointerDown:h,...r,children:d.jsx(Ie.IoChevronDown,{className:en(FR[f],s.triggerIcon),"aria-hidden":!0})})});Eu.displayName="ComboBoxTrigger";function Iu({children:t,className:e,offset:n=ws,...r}){const o=lr(),{open:s,setOpen:i,anchorRef:a,listId:c,labelId:u,labelConnected:f,placeholder:m,menuMaxHeight:p,options:b,filteredValues:g,value:h,setValue:C,activeValue:x,setActiveValue:_,setFilterQuery:v,variant:y}=As(),S=l.useCallback(L=>{const A=Array.isArray(L)?L[0]??"":L;C(A),v(""),i(!1)},[v,i,C]),T=t??(g.length===0?d.jsx(wr.Empty,{}):g.map(L=>{const A=b.find(E=>E.value===L);return d.jsx(wr.Item,{value:L,disabled:A.disabled,label:A.label,hint:A.hint,icon:A.icon},L)}));return d.jsx(Pt,{open:s,onOpenChange:i,side:"bottom",anchorRef:a,variant:y==="gloss"?"gloss":"default",children:d.jsx(Pt.Content,{matchAnchorWidth:!0,unstyled:!0,contentRole:void 0,offset:n,className:en($R,o.popover,e),...r,children:d.jsx(Pt.Body,{className:en(WR,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:x,onActiveValueChange:_,selectionIndicator:!0,className:en(XR,o.listBox),style:{maxHeight:p},children:T})})})})}Iu.displayName="ComboBoxPopover";function yb({className:t,classNames:e,...n}){const r=lr();return d.jsx(Ue,{className:t,classNames:{...e,root:en(r.label,e==null?void 0:e.root)},...n})}yb.displayName="ComboBoxLabel";function wu({children:t,status:e,className:n,id:r,...o}){const s=Tg(),i=lr(),a=lI(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 Ru({children:t,className:e,id:n,...r}){const o=Tg(),s=lr();return d.jsx(Ze,{id:n??o.errorId,className:en(s.error,e),...r,children:t??o.errorMessage})}Ru.displayName="ComboBox.Error";function tN({label:t,hint:e,error:n,labelId:r}){const o=lr();return d.jsxs(d.Fragment,{children:[t!=null?d.jsx(Ue,{id:r,classNames:{root:o.label},children:t}):null,d.jsxs(Tu,{children:[d.jsx(Lu,{}),d.jsx(Eu,{})]}),d.jsx(Iu,{}),e!=null?d.jsx(wu,{children:e}):null,n!=null?d.jsx(Ru,{children:n}):null]})}function ur(...t){return R(...t)}function Ja(t){return Object.keys(t).length}function nN(t){return Object.entries(t)}function rN(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 oN(t){return t==null?!0:typeof t=="string"?t.trim().length===0:Array.isArray(t)?t.length===0:!1}function el(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(oN(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 Ab(...t){const e={};for(const n of t)n!=null&&Object.assign(e,n);return Object.keys(e).length>0?e:void 0}function sN(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 Tb(t){return t?!0:void 0}function iN({descriptionId:t,errorSummaryId:e,hasErrors:n}){const r=[t,n?e:void 0].filter(Boolean);return r.length>0?r.join(" "):void 0}function aN(t){return t<=0?"":t===1?"Fix the error in the form":`Fix ${t} errors in the form`}function lN(){return"Form submitted successfully"}function Hm(t,e){const n=Object.keys(e)[0];if(n==null)return;const r=t.get(n);r==null||r.focus()}function Lb({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(_=>{u.current=_,c&&t&&i.registerRef(t,_)},[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(()=>Ab(t?i==null?void 0:i.getFieldRules(t):void 0,s),[i,t,s]),h=c&&t?i.getValue(t):e,C=l.useCallback(_=>{n==null||n(_),!(!c||!t||!i)&&i.setValue(t,_,{shouldValidate:i.validateMode==="onChange"})},[c,i,t,n]),x=l.useCallback(()=>{!c||!t||!i||(i.setTouched(t,!0),i.validateMode==="onBlur"&&i.validateField(t))},[c,i,t]);return{bound:c,name:t,value:h,setValue:C,onBlur:x,disabled:m||(i==null?void 0:i.isSubmitting),readOnly:p,ref:f,"aria-invalid":Tb(b),error:b,rules:g}}function qt(t){return l.Children.toArray(t).some(e=>l.isValidElement(e))}function cN({children:t,label:e,hint:n,error:r,id:o,name:s,isRequired:i=!1,status:a="default",size:c="base",options:u=cI,value:f,defaultValue:m,onValueChange:p,variant:b,disabled:g=!1,placeholder:h="Select a value",menuMaxHeight:C="min(24rem, 70vh)"}){const x=Lb({name:s,value:f,disabled:g}),_=x.bound,v=x.disabled??g,y=l.useId(),S=kn(),T=b??((S==null?void 0:S.variant)==="gloss"?"gloss":"default"),L=o??`combobox-${y}`,{hintId:A,errorId:E,labelId:I,listId:w}=OR(L),N=qt(t),O=e!=null||N&&Ae(t,"Label"),j=n!=null||N&&Ae(t,"ComboBoxHint"),k=r!=null||N&&Ae(t,"ComboBoxError"),G=f!==void 0||_,[D,P]=l.useState(m??""),F=_?String(x.value??""):G?f??"":D,B=l.useCallback(Ce=>{G||P(Ce),p==null||p(Ce),_&&x.setValue(Ce)},[_,x,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 Ce;!$||!H||(Ce=document.getElementById(`${w}-opt-${H}`))==null||Ce.scrollIntoView({block:"nearest"})},[H,w,$]);const Y=l.useMemo(()=>vg(u,M),[M,u]),ne=l.useMemo(()=>({comboBoxId:L,hintId:A,errorId:E,labelId:I,labelConnected:O,hintConnected:j,errorConnected:k,isRequired:i,status:a,size:c,errorMessage:r}),[L,r,E,k,j,O,A,i,I,c,a]),me=l.useMemo(()=>({...ne,open:$,setOpen:W,value:F,setValue:B,filterQuery:M,setFilterQuery:z,listId:w,activeValue:H,setActiveValue:oe,anchorRef:pe,inputRef:ce,variant:T,disabled:v,placeholder:h,menuMaxHeight:C,options:u,filteredValues:Y,formInputRef:_?x.ref:void 0,formOnBlur:_?x.onBlur:void 0}),[H,v,ne,M,Y,_,x,w,C,$,u,h,B,F,T]),re=l.useMemo(()=>({controlId:L,labelId:I,isRequired:i}),[L,i,I]);return{isCompound:N,label:e,hint:n,error:r,children:t,fieldCtx:ne,comboCtx:me,fieldLabelCtx:re}}function Eb({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:C,menuMaxHeight:x,name:_,...v}){const y=xn(),S=typeof _=="string"?_:void 0,T=S?y==null?void 0:y.getError(S):void 0,L=r??T,A=c==="default"&&T?"danger":c,E=u??(y==null?void 0:y.size)??"base",I=cN({children:t,label:e,hint:n,error:L,id:i,name:_,isRequired:a,status:A,size:E,options:f,value:m,defaultValue:p,onValueChange:b,variant:g,disabled:h,placeholder:C,menuMaxHeight:x});return d.jsx(dI,{value:I.fieldCtx,children:d.jsx(uI,{value:I.comboCtx,children:d.jsx(fI,{classNames:s,children:d.jsx(Xt.Provider,{value:I.fieldLabelCtx,children:d.jsx(hn,{className:en(o,s==null?void 0:s.root),...v,children:I.isCompound?t:d.jsx(tN,{label:I.label,hint:I.hint,error:I.error,labelId:I.fieldCtx.labelId})})})})})})}Eb.displayName="ComboBox";const Ib=Object.assign(Eb,{Label:yb,InputGroup:Tu,Input:Lu,Trigger:Eu,Popover:Iu,Hint:wu,Error:Ru});function ye(...t){return R(...t)}function uN({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 Ao(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function zm(t){return t==null?[]:Array.isArray(t)?[...t]:[t]}function dN(t){return Wg(t)}const wb=l.createContext(null),Pl=l.createContext({}),Rb=l.createContext(!1),Nb=l.createContext(null),Db=l.createContext(null);function fN({value:t,children:e}){return d.jsx(wb.Provider,{value:t,children:e})}function mN({classNames:t,children:e}){const n=l.useContext(Pl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Pl.Provider,{value:r,children:e})}function Ob({value:t,children:e}){return d.jsx(Rb.Provider,{value:t,children:e})}function pN({value:t,children:e}){return d.jsx(Nb.Provider,{value:t,children:e})}function hN({value:t,children:e}){return d.jsx(Db.Provider,{value:t,children:e})}function Rs(){const t=l.useContext(wb);if(!t)throw new Error("Dropdown.* components must be inside <Dropdown>.");return t}function Gt(){return l.useContext(Pl)}function Pb(){return l.useContext(Rb)}function gN(){return l.useContext(Nb)}function kb(){const t=l.useContext(Db);if(!t)throw new Error("DropdownSub.* components must be inside <DropdownSub>.");return t}const Nu=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})});Nu.displayName="Separator";const bN='[role="menuitem"]:not([aria-disabled="true"]), [role="menuitemcheckbox"]:not([disabled]), [role="menuitemradio"]:not([disabled])';function Vm(t){return Array.from(t.querySelectorAll(bN)).filter(e=>!e.hasAttribute("disabled"))}function ri(t,e){const n=t[e];n&&n.focus()}function CN({open:t,setOpen:e,triggerRef:n,contentRef:r}){l.useLayoutEffect(()=>{var i;if(!t)return;const o=r.current;if(!o)return;(i=Vm(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=Vm(o);if(a.length===0)return;const c=document.activeElement,u=c?a.indexOf(c):-1;if(i.key==="ArrowDown"){i.preventDefault(),ri(a,u<a.length-1?u+1:0);return}if(i.key==="ArrowUp"){i.preventDefault(),ri(a,u>0?u-1:a.length-1);return}if(i.key==="Home"){i.preventDefault(),ri(a,0);return}i.key==="End"&&(i.preventDefault(),ri(a,a.length-1))};return o.addEventListener("keydown",s),()=>o.removeEventListener("keydown",s)},[r,t,e,n])}function xN({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 C=b.right+g,x=b.top;const _=h;C+_>window.innerWidth-12&&(C=Math.max(12,b.left-_-g));const v=i.current,y=(v==null?void 0:v.offsetHeight)??0;y>0&&x+y>window.innerHeight-8&&(x=Math.max(8,window.innerHeight-y-8)),c({top:x,left:C,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?ia(p):f(!1),()=>{g=!0};if(V(p),t)return aa({surface:p,vars:{...xo(),overwrite:"auto"}}),()=>{g=!0,V(p)};const h=la({surface:p,vars:{...xo(),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 _N="relative inline-flex",Um="inline-flex",SN="z-[100]",vN="max-h-[min(24rem,70vh)] gap-xsmall overflow-y-auto overflow-x-hidden p-base text-left outline-none",yN="flex min-w-0 flex-col gap-xsmall text-left",AN="px-base text-left",TN="text-muted",LN="relative min-w-0",EN="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",IN="min-w-0 flex-1",wN="shrink-0 text-muted icon-base",RN="fixed z-[110] outline-none will-change-transform",NN="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",DN="gloss-panel gloss-deep flex max-h-[min(22rem,65vh)] min-w-0 origin-center flex-col overflow-hidden rounded-mid text-foreground",ON="gloss-content flex min-h-0 flex-col overflow-y-auto overflow-x-hidden p-base text-left",PN="w-full min-w-0 origin-center rounded-mid px-base py-small text-left no-underline outline-none text-base",kN="cursor-not-allowed bg-transparent text-muted opacity-45 hover:bg-transparent",BN={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 jN({variant:t,disabled:e,hasHint:n,showIndicatorSlot:r,hasIcon:o,className:s,slotClass:i}){return ye(PN,Gg(n,"gap-x-base",r,o),!e&&ye("cursor-pointer",BN[t]),e&&kN,i,s)}function MN({className:t,slotClass:e}){return ye(EN,et(),e,t)}function FN({isGlossPanel:t,subOpen:e,portalMounted:n,className:r,slotClass:o}){return ye(RN,!t&&NN,!e&&n&&"pointer-events-none",o,r)}function GN(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 Du=l.forwardRef(function({children:e,className:n,asChild:r,onClick:o,onPointerDown:s,...i},a){const{open:c,setOpen:u,triggerRef:f,contentId:m}=Rs(),p=Gt(),b=Is(),g=l.useCallback(C=>{c||b.current||C.button!==0||(C.preventDefault(),Es({triggerRef:f,openingRef:b,setOpen:()=>u(!0)}))},[c,b,f,u]),h=l.useCallback(C=>{o==null||o(C),!C.defaultPrevented&&c&&u(!1)},[o,c,u]);if(r&&l.isValidElement(e)){const C=e;return l.cloneElement(C,{...i,ref:Ao(a,f,C.props.ref),className:ye(C.props.className,Um,p.trigger,n),onPointerDown:x=>{var _,v;g(x),(v=(_=C.props).onPointerDown)==null||v.call(_,x),s==null||s(x)},onClick:x=>{var _,v;(v=(_=C.props).onClick)==null||v.call(_,x),h(x)},"aria-expanded":c,"aria-haspopup":"menu","aria-controls":c?m:void 0})}return d.jsx("button",{type:"button",ref:Ao(a,f),className:ye(Um,p.trigger,n),"aria-expanded":c,"aria-haspopup":"menu","aria-controls":c?m:void 0,onPointerDown:C=>{s==null||s(C),g(C)},onClick:h,...i,children:e})});Du.displayName="Dropdown.Trigger";const Pi=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}=Rs(),g=Gt(),h=o??b,C=l.useCallback(x=>{for(const _ of p.current)if(_.contains(x))return!1;return!0},[p]);return CN({open:a,setOpen:c,triggerRef:u,contentRef:f}),d.jsx(Pt,{open:a,onOpenChange:c,side:"bottom",variant:h,anchorRef:u,shouldDismiss:C,children:d.jsx(Pt.Content,{ref:Ao(i,f),matchAnchorWidth:!0,unstyled:!0,contentRole:void 0,offset:ws,id:m,className:ye(SN,g.popover,n),...s,children:d.jsx(Pt.Body,{role:"menu",className:ye(vN,g.popoverBody,r),children:e})})})});Pi.displayName="Dropdown.Popover";function Ou({className:t,children:e,selectionIndicator:n,...r}){const o=Pb(),s=Gt(),i=n!==void 0?n:o,[a,c]=l.useState(),u=l.useCallback(f=>{c(f)},[]);return d.jsx(Ob,{value:i,children:d.jsx(pN,{value:u,children:d.jsx("div",{role:"group","aria-labelledby":a,className:ye(yN,s.group,t),...r,children:e})})})}Ou.displayName="Dropdown.Group";function Pu({className:t,children:e,id:n,...r}){const o=l.useId(),s=n??o,i=gN(),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(AN,a.label,t),...r,children:d.jsx(ee,{as:"span",variant:"small",className:TN,children:e})})}Pu.displayName="Dropdown.Label";function ku({className:t,...e}){const n=Gt();return d.jsx(Nu,{className:ye(n.separator,t),...e})}ku.displayName="Dropdown.Separator";function Bu({className:t,children:e,...n}){const{open:r}=Rs(),o=Gt(),{contextValue:s}=GN(r);return d.jsx(hN,{value:s,children:d.jsx("div",{className:ye(LN,o.sub,t),...n,children:e})})}Bu.displayName="Dropdown.Sub";const ju=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}=kb(),h=Gt(),C=l.useCallback(S=>{o==null||o(S),!S.defaultPrevented&&(g(),m(!0))},[g,o,m]),x=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=MN({className:e,slotClass:h.subTrigger});if(r&&l.isValidElement(n)){const S=n;return l.cloneElement(S,{...c,ref:Ao(u,p,S.props.ref),className:ye(S.props.className,y),onPointerEnter:T=>{var L,A;(A=(L=S.props).onPointerEnter)==null||A.call(L,T),C(T)},onPointerLeave:T=>{var L,A;(A=(L=S.props).onPointerLeave)==null||A.call(L,T),x(T)},onClick:T=>{var L,A;(A=(L=S.props).onClick)==null||A.call(L,T),_(T)},onKeyDown:T=>{var L,A;(A=(L=S.props).onKeyDown)==null||A.call(L,T),v(T)},role:"menuitem","aria-expanded":f,"aria-haspopup":"menu"})}return d.jsxs("div",{ref:Ao(u,p),role:"menuitem",tabIndex:-1,"aria-expanded":f,"aria-haspopup":"menu",className:y,onPointerEnter:C,onPointerLeave:x,onClick:_,onKeyDown:v,...c,children:[d.jsx("span",{className:ye(IN,h.subTriggerLabelWrap),children:n}),d.jsx(Ie.IoChevronForward,{className:ye(wN,h.subTriggerChevron),"aria-hidden":!0})]})});ju.displayName="Dropdown.SubTrigger";const Mu=l.forwardRef(function({children:e,className:n,style:r,onPointerEnter:o,onPointerLeave:s,...i},a){const{open:c,triggerRef:u,scheduleClose:f,cancelClose:m}=kb(),{subPanelRootsRef:p,triggerRef:b,popoverVariant:g}=Rs(),h=Gt(),C=xN({subOpen:c,triggerRef:u,menuTriggerRef:b,subPanelRootsRef:p,popoverVariant:g}),x=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(!C.portalMounted)return null;const v=jo(b.current),y=d.jsx("div",{ref:Ao(a,C.panelRef),...v,role:"menu",className:FN({isGlossPanel:C.isGlossPanel,subOpen:c,portalMounted:C.portalMounted,className:n,slotClass:h.subContent}),style:{top:C.pos.top,left:C.pos.left,minWidth:C.pos.minW,...r},...i,onPointerEnter:x,onPointerLeave:_,children:C.isGlossPanel?d.jsx("div",{className:ye(DN,h.subContentGlossPanel),children:d.jsx("div",{className:ye(ON,h.subContentGlossContent),children:e})}):e});return typeof document<"u"?Pr.createPortal(y,document.body):null});Mu.displayName="Dropdown.SubContent";function Fu({className:t,...e}){const n=Gt();return d.jsx(zg,{className:ye(n.itemLabel,t),...e})}Fu.displayName="DropdownItemLabel";function Gu({className:t,...e}){const n=Gt();return d.jsx(Vg,{className:ye(n.itemHint,t),...e})}Gu.displayName="DropdownItemHint";function Hu({className:t,...e}){const n=Gt();return d.jsx(Ug,{className:ye(n.itemIcon,t),...e})}Hu.displayName="DropdownItemIcon";function ca({variant:t="base",size:e="small",check:n,children:r,className:o,classNames:s,...i}){const a=Ts("Dropdown.ItemIndicator"),c=Gt();if(!a.showIndicatorSlot)return null;const u=n??a.indicatorMode==="multi";return d.jsx($g,{className:ye(c.itemIndicator,s==null?void 0:s.itemIndicator,o),...i,children:d.jsx(jt,{variant:t,size:e,selected:a.selected,check:u,classNames:uN({slotClassNames:c,classNames:s}),children:r})})}ca.displayName="DropdownItemIndicator";const zu=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:C}=Rs(),x=Pb(),_=Gt(),v=dN(e),y=v.indicator!=null,S=v.hint!=null,T=v.icon!=null,L=!!o,A=!L&&i!==!1,E=A&&(g||x||y),I=E?h==="multi"?"menuitemcheckbox":"menuitemradio":"menuitem",w=A&&r!=null&&p.has(r),N=l.useCallback(P=>{typeof m=="function"?m(P):m&&(m.current=P)},[m]),O=jN({variant:a,disabled:s,hasHint:S,showIndicatorSlot:E,hasIcon:T,className:n,slotClass:_.item}),j=l.useCallback(P=>{if(u==null||u(P),P.defaultPrevented||s)return;const F=P.currentTarget;!F||de()||We(F)},[s,u]),k=l.useCallback(P=>{if(c==null||c(P),!(P.defaultPrevented||s)){if(!A){C(!1);return}r!=null&&b(r)}},[s,A,c,b,C,r]),G=d.jsxs(d.Fragment,{children:[E&&!y?d.jsx(ca,{}):null,v.indicator,v.label,v.hint,v.icon,v.rest]}),D={showIndicatorSlot:E,hasHint:S,hasIcon:T,selected:w,indicatorMode:h,disabled:s,mutedHint:s||a==="default"};return L?d.jsx(Rl,{value:D,children:d.jsx("a",{ref:N,role:I,href:s?void 0:o,tabIndex:-1,"aria-disabled":s||void 0,className:O,onClick:k,onPointerDown:j,...f,children:G})}):d.jsx(Rl,{value:D,children:d.jsx("button",{ref:N,type:"button",role:I,disabled:s,tabIndex:-1,"aria-checked":E?w:void 0,className:O,onClick:k,onPointerDown:j,...f,children:G})})});zu.displayName="Dropdown.Item";function HN({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,C]=l.useState(()=>zm(s)),x=g?zm(o):h,_=l.useMemo(()=>new Set(x),[x]),v=l.useRef(x);v.current=x;const y=l.useCallback(N=>{g||C(N),i==null||i(r?N:N[0]??"")},[g,r,i]),S=l.useCallback(N=>{const O=xu(v.current,N,r);v.current=O,y(O),(a??!r)&&b(!1)},[a,r,b,y]),T=l.useRef(null),L=l.useRef(null),A=l.useRef(null);A.current||(A.current=new Set);const E=l.useId(),I=r?"multi":"radio";return{contextValue:l.useMemo(()=>({open:p,setOpen:b,multiple:r,selected:_,selectItem:S,indicatorMode:I,closeOnSelect:a??!r,popoverVariant:c,triggerRef:T,contentRef:L,contentId:E,subPanelRootsRef:A}),[p,b,r,_,S,I,a,c,E,A])}}function Bb({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}=HN({open:r,defaultOpen:o,onOpenChange:s,multiple:i,value:a,defaultValue:c,onValueChange:u,closeOnSelect:m,popoverVariant:p});return d.jsx(fN,{value:g,children:d.jsx(mN,{classNames:n,children:d.jsx(Ob,{value:f,children:d.jsx("div",{className:ye(_N,n==null?void 0:n.root,e),...b,children:t})})})})}Bb.displayName="Dropdown";const zN=Object.assign(ca,{Fill:jt.Fill,Mark:jt.Mark}),Rr=Object.assign(Bb,{Trigger:Du,Popover:Pi,Content:Pi,Group:Ou,Label:Pu,Separator:ku,Item:zu,ItemLabel:Fu,ItemHint:Gu,ItemIcon:Hu,ItemIndicator:zN,Sub:Bu,SubTrigger:ju,SubContent:Mu});function we(...t){return R(...t)}function VN(t,e){const n=new DataTransfer;e.forEach(r=>n.items.add(r)),t.files=n.files}const Vu=l.createContext(null),kl=l.createContext({});function UN({value:t,children:e}){return d.jsx(Vu.Provider,{value:t,children:e})}function $N({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 jb(){const t=l.useContext(Vu);if(!t)throw new Error("Input compound parts must be used inside <Input>.");return t}function WN(){return l.useContext(Vu)}function jn(){return l.useContext(kl)}function Uu({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,C=l.useMemo(()=>Ab(t?c==null?void 0:c.getFieldRules(t):void 0,a),[c,t,a]),x=f&&t?c.getValue(t):e,_=l.useCallback(y=>{if(n==null||n(y),!f||!t||!c)return;const S=sN(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"?!!x:x,checked:f&&i==="checkbox"?!!x:void 0,onChange:_,onBlur:v,disabled:b||(c==null?void 0:c.isSubmitting),readOnly:g,ref:p,"aria-invalid":Tb(h),error:h,rules:C}}function XN(t,e){return Uu({name:t,rules:e})}function YN(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 KN({shellRef:t,blocked:e,variant:n,groupSegment:r,onPointerDown:o}){const s=n==="gloss",i=Mo(t,!e&&!s&&r==null),a=Do(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 qN="Show password",ZN="Hide password",$m="Remove file",Mb={default:"bg-surface",outline:"bg-transparent"},Fb={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},QN={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},JN="bg-primary-tint",eD="flex items-stretch overflow-hidden",tD="relative",nD=`min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted ${Et}`,rD=`absolute inset-0 cursor-pointer opacity-0 disabled:cursor-not-allowed ${Et}`,oD="pointer-events-none size-12 shrink-0 text-muted",sD="pointer-events-none max-w-[18rem] text-center text-muted",Wm="size-9 shrink-0 rounded-base border-token object-cover",iD="flex min-w-0 items-center gap-base",aD="flex h-full min-w-0 flex-1 items-center gap-base",Xm="min-w-0 flex-1 truncate",lD="relative z-10 flex size-8 shrink-0 items-center justify-center rounded-base text-danger outline-none",cD="flex self-stretch shrink-0 items-stretch border-l-token",uD="relative z-10 flex h-full items-center justify-center text-muted outline-none hover:text-foreground focus-ring-inset",dD="border-r-token",fD="border-l-token",mD={small:Rn("small"),base:Rn("base"),mid:Rn("mid"),large:Rn("large")},pD={small:le.small.controlPad,base:le.base.controlPad,mid:le.mid.controlPad,large:le.large.controlPad},Gb={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 Hb(t){return t==="default"?JN:QN[t]}function hD({side:t,status:e,size:n,slotClass:r}){return we(mD[n],Hb(e),t==="prefix"?dD:fD,r)}function gD({variant:t,status:e,statusTinted:n}){return t==="gloss"?"gloss-control":n&&e!=="default"?we(Fb[e],"border-token"):we(t==="outline"?"bg-transparent border-token":we(Mb[t],"border-token"))}function bD({variant:t,status:e,statusTinted:n}){return t==="gloss"?"gloss-control":n&&e!=="default"?Fb[e]:Mb[t]}function CD(t){return t!=null?we(gn(t),Wr(t),"relative focus-within:z-[2]"):"rounded-base"}function xD({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 we(eD,f&&tD,(r==null?void 0:r.orientation)==="horizontal"?"min-w-0 flex-1":"w-full",o?"min-h-[7.25rem]":we(f?"":"border-1"),CD(r),i??s,Ur,$r,!f&&Vr(!n,e),a,n&&"cursor-not-allowed opacity-55 shadow-token-base",u,c)}function _D(t){return we("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 SD({multipleFiles:t,slotClass:e}){return we("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 vD({size:t,disabled:e,slotClass:n}){const r=Gb[t];return we(uD,bn,Xp(t),r.pad,e?"cursor-not-allowed opacity-45":"cursor-pointer",n)}function yD({disabled:t,slotClass:e}){return we(lD,bn,et("danger"),"focus-ring",t&&"pointer-events-none opacity-40",e)}function Ym({side:t,status:e,controlSize:n,children:r}){const o=jn();return d.jsx("span",{className:hD({side:t,status:e,size:n,slotClass:t==="prefix"?o.prefix:o.suffix}),children:r})}function AD({status:t,controlSize:e,visible:n,disabled:r,onToggle:o}){const s=jn(),i=Gb[e];return d.jsx("span",{className:we(cD,Hb(t)),children:d.jsx("button",{type:"button",disabled:r,"aria-label":n?ZN:qN,"aria-pressed":n,onClick:a=>{a.preventDefault(),a.stopPropagation(),o()},onPointerDown:a=>a.stopPropagation(),className:vD({size:e,disabled:r,slotClass:s.passwordToggle}),children:n?d.jsx(Ie.IoEyeOff,{className:R("shrink-0",i.icon),"aria-hidden":!0}):d.jsx(Ie.IoEye,{className:R("shrink-0",i.icon),"aria-hidden":!0})})})}function Km({className:t}){const e=jn();return d.jsx("span",{className:we("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(Ie.IoFolderOpen,{className:"icon-mid shrink-0","aria-hidden":!0})})}function qm({disabled:t,onRemove:e}){const n=jn();return d.jsx("button",{type:"button",disabled:t,title:$m,"aria-label":$m,onClick:r=>{r.preventDefault(),r.stopPropagation(),e(r)},onPointerDown:r=>r.stopPropagation(),className:yD({disabled:t,slotClass:n.fileRemove}),children:d.jsx(Ie.IoClose,{className:"icon-mid shrink-0","aria-hidden":!0})})}const ua=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":C,name:x,value:_,...v},y){const S=Uu({name:typeof x=="string"?x:void 0,value:_,onChange:g,onBlur:h,disabled:u,readOnly:f,type:o}),T=S.name??x,L=S.bound?S.value:_,A=S.onChange,E=S.onBlur,I=S.disabled??u,w=S.readOnly??f,N=S.ref,O=WN(),j=xn(),k=jn(),G=Po(),D=kn(),P=l.useId(),F=c??(O==null?void 0:O.inputId)??P,B=n??(O==null?void 0:O.status)??"default",$=r??(O==null?void 0:O.size)??(j==null?void 0:j.size)??((D==null?void 0:D.buttonSize)??"base"),W=(O==null?void 0:O.isRequired)??!1,M=(O==null?void 0:O.hintConnected)??!1,z=(O==null?void 0:O.errorConnected)??!1,H=O==null?void 0:O.hintId,oe=O==null?void 0:O.errorId,pe=C??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=!!(I||w),Ce=B==="danger"||B==="success"||B==="warning",te=e==="gloss",U=KN({shellRef:Y,blocked:re,variant:e,groupSegment:ce,onPointerDown:b}),ae=o==="file",he=o==="password",[De,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 Be=l.useCallback(K=>{const Z=K.target.files;se(Z?Array.from(Z):[]),A==null||A(K)},[A]),mt=l.useCallback((K,Z)=>{if(re)return;const fe=()=>{se(Ee=>{const He=Ee.filter(Je=>Je!==K),Qe=ne.current;return Qe&&VN(Qe,He),Qe&&(g==null||g({target:Qe,currentTarget:Qe})),He})};if(!Z||de()){fe();return}YN(Z).then(fe)},[re,g]),yn=K=>Z=>{const fe=Z.currentTarget.closest("[data-file-row]");mt(K,fe instanceof HTMLElement?fe:null)},gr=q.length>1,An=ae&&q.length===0,ln=!ae,Ko=gD({variant:e,status:B,statusTinted:Ce}),qo=An?we(bD({variant:e,status:B,statusTinted:Ce}),!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:xD({variant:e,status:B,blocked:re,groupSegment:ce,fileListEmpty:An,shellSurface:Ko,shellFileEmptySurface:qo,shellHoverMotionClass:U.shellHoverMotionClass,className:m,slotClass:k.shell}),children:[ln&&i!=null?d.jsx(Ym,{side:"prefix",status:B,controlSize:$,children:i}):null,ae?d.jsxs("div",{className:An?_D(k.fileArea):SD({multipleFiles:gr,slotClass:k.fileArea}),children:[An?d.jsxs(d.Fragment,{children:[d.jsx(Ie.IoFolderOpen,{className:we(oD,k.fileEmpty),"aria-hidden":!0}),d.jsx(ee,{as:"span",variant:"base",className:we(sD,k.fileEmpty),children:s??"Select file"})]}):gr?ue.map(({file:K,previewUrl:Z})=>d.jsxs("div",{"data-file-row":"",className:we(iD,k.fileRow),children:[Z?d.jsx("img",{src:Z,alt:"",className:we(Wm,k.filePreview)}):d.jsx(Km,{}),d.jsx(ee,{as:"span",variant:"base",className:Xm,children:K.name}),re?null:d.jsx(qm,{onRemove:yn(K)})]},`${K.name}-${K.size}-${K.lastModified}`)):d.jsxs("div",{"data-file-row":"",className:we(aD,k.fileRow),children:[ue[0].previewUrl?d.jsx("img",{src:ue[0].previewUrl,alt:"",className:we(Wm,k.filePreview)}):d.jsx(Km,{}),d.jsx(ee,{as:"span",variant:"base",className:Xm,children:ue[0].file.name}),re?null:d.jsx(qm,{onRemove:yn(ue[0].file)})]}),d.jsx("input",{ref:me,id:F,name:T,type:"file",disabled:I,readOnly:w,onChange:Be,onBlur:E,"aria-required":W||void 0,"aria-invalid":S["aria-invalid"]??(B==="danger"?!0:void 0),"aria-describedby":pe,className:rD,...v})]}):d.jsx("input",{ref:me,id:F,name:T,type:he?De?"text":"password":o,disabled:I,readOnly:w,placeholder:s,value:L,onChange:A,onBlur:E,"aria-required":W||void 0,"aria-invalid":S["aria-invalid"]??(B==="danger"?!0:void 0),"aria-describedby":pe,className:we(nD,pD[$],k.control,Et),...v}),ln&&a!=null?d.jsx(Ym,{side:"suffix",status:B,controlSize:$,children:a}):null,ln&&he?d.jsx(AD,{status:B,controlSize:$,visible:De,disabled:u,onToggle:()=>Ye(K=>!K)}):null]})});ua.displayName="InputControl";function zb({className:t,classNames:e,...n}){const r=jn();return d.jsx(Ue,{className:t,classNames:{...e,root:we(r.label,e==null?void 0:e.root)},...n})}zb.displayName="InputLabel";function $u({children:t,status:e,className:n,id:r,...o}){const s=jb(),i=jn(),a=e??(s.status==="danger"||s.status==="default"?"default":s.status);return d.jsx(Xe,{id:r??s.hintId,status:a,className:we(i.hint,n),...o,children:t})}$u.displayName="InputHint";function Wu({children:t,className:e,id:n,...r}){const o=jb(),s=jn();return d.jsx(Ze,{id:n??o.errorId,className:we(s.error,e),...r,children:t})}Wu.displayName="InputError";function TD({label:t,hint:e,error:n,inputId:r,labelId:o,size:s,status:i,controlProps:a}){const c=jn();return d.jsxs(d.Fragment,{children:[t!=null?d.jsx(Ue,{id:o,classNames:{root:c.label},children:t}):null,d.jsx(ua,{id:r,size:s,status:i,...a}),e!=null?d.jsx($u,{children:e}):null,n!=null?d.jsx(Wu,{children:n}):null]})}function LD({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&&Ae(t,"InputHint"),h=r!=null||b&&Ae(t,"InputError"),C=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]),x=l.useMemo(()=>({controlId:u,labelId:p,isRequired:s}),[u,s,p]);return{fieldCtx:C,fieldLabelCtx:x,isCompound:b,inputId:u,label:e,hint:n,error:r,status:i,size:a}}function ED({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,C=u??(m==null?void 0:m.size)??"base",x=LD({children:t,label:e,hint:n,error:g,id:i,isRequired:a,status:h,size:C}),_=x.isCompound?t:d.jsx(TD,{label:x.label,hint:x.hint,error:x.error,inputId:x.inputId,labelId:x.fieldCtx.labelId,size:x.size,status:x.status,controlProps:f});return d.jsx(UN,{value:x.fieldCtx,children:d.jsx($N,{classNames:s,children:d.jsx(Xt.Provider,{value:x.fieldLabelCtx,children:d.jsx(hn,{className:we(s==null?void 0:s.root,o),children:_})})})})}const ID=Object.assign(ED,{Label:zb,Control:ua,Hint:$u,Error:Wu}),wD={xsmall:"--radius-value-xsmall",small:"--radius-value-small",base:"--radius-value-base",mid:"--radius-value-mid",large:"--radius-value-large"},RD={xsmall:.5,small:.75,base:1,mid:1.25,large:1.5},ND={small:"small",base:"base",mid:"mid",large:"large"},DD={small:"rounded-small",base:"rounded-base",mid:"rounded-mid",large:"rounded-large"};function OD(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 PD(t,e=16){if(typeof document<"u"){const n=getComputedStyle(document.documentElement).getPropertyValue(wD[t]).trim(),r=OD(n,e);if(r!=null)return r}return e*.5*RD[t]}function kD(t,e=16){return PD(ND[t],e)}const BD={small:"w-control-small",base:"w-control-base",mid:"w-control-mid",large:"w-control-large"},jD={small:8,base:12,mid:16,large:20},MD={small:14,base:16,mid:20,large:20},FD={small:20,base:24,mid:28,large:32},GD={small:240,base:280,mid:320,large:360};function oi(t){const e=le[t];return{defaultExpandedW:GD[t],iconBox:MD[t],padX:jD[t],iconClass:e.icon,controlPad:e.controlPad,shellWCollapsed:BD[t],clearTap:FD[t],clearIconClass:e.chevronIcon,textGapClear:t==="small"?4:6}}const HD={small:oi("small"),base:oi("base"),mid:oi("mid"),large:oi("large")};function zD(t){return HD[t]}const Xu=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:C,id:x,"aria-label":_,onValueChange:v,ripple:y=!1,groupSegment:S,...T},L){const A=Po(),E=kn(),I=A!=null&&A.segmented?void 0:S??(E==null?void 0:E.segment),w=r??((E==null?void 0:E.variant)==="gloss"?"gloss":"default"),N=l.useId(),O=x??N,j=i!==void 0,[k,G]=l.useState(s),D=j?i:k,P=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 L=="function"?L(ie):L&&(L.current=ie)},[L]),Y=!!(u||f),ne=l.useCallback(ie=>{g==null||g(ie),v==null||v(ie.target.value),H||pe(ie.target.value.trim().length>0)},[H,g,v]),me=l.useCallback(ie=>{var Zo;if(ie.preventDefault(),ie.stopPropagation(),Y)return;const ge=$.current;if(!ge)return;H||pe(!1);const Fe=(Zo=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:Zo.set;Fe==null||Fe.call(ge,""),ge.dispatchEvent(new Event("input",{bubbles:!0})),g==null||g({target:ge,currentTarget:ge}),v==null||v(""),requestAnimationFrame(()=>ge.focus())},[Y,H,g,v]),re=zD(n),Ce=o??re.defaultExpandedW,te=Tc(n),U=w==="gloss",ae=l.useCallback(()=>D?Cn():_o(),[D]),he=Oo(F,!Y&&!U&&I==null,{resolveIdle:ae,idleSyncKey:D}),De=Do(F,!Y&&U&&I==null),Ye=l.useCallback(ie=>{F.current=ie,!Y&&U&&I==null&&De.bindShellRef(ie)},[Y,De,I,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)`,Be=l.useRef(D),mt=l.useCallback(ie=>{if(B.current=ie,ie&&!ie.hasAttribute("data-search-icon-init")){ie.setAttribute("data-search-icon-init","");const ge=Be.current;ie.style.left=ge?`${re.padX}px`:ue}},[ue,re.padX]),yn=l.useCallback(ie=>{const ge=F.current,Fe=B.current;!ge||!Fe||(ie?ge.style.width=`${Ce}px`:ge.style.removeProperty("width"),ge.style.removeProperty("height"),ge.style.removeProperty("borderRadius"),Fe.style.left=ie?`${re.padX}px`:ue)},[ue,re.padX,Ce]),gr=l.useCallback(ie=>{const ge=F.current,Fe=B.current;if(!ge||!Fe)return;if(de()){yn(ie);return}V(ge),V(Fe),ge.style.removeProperty("borderRadius");const Zo=kD(n);if(ie){ge.style.width=`${te}px`,ge.style.borderRadius=`${te/2}px`;const jy=(ge.clientWidth-re.iconBox)/2;Fe.style.left=`${jy}px`;const Zf=ve();X.timeline({onComplete:()=>{ge.style.removeProperty("borderRadius")}}).to(ge,{width:Ce,borderRadius:Zo,...Zf,overwrite:"auto"},0).to(Fe,{left:re.padX,...Zf,overwrite:"auto"},0);return}const ky=q(ge),By=se(te,ky);Fe.style.left=`${re.padX}px`;const qf=ve();X.timeline({onComplete:()=>{ge.style.removeProperty("width"),ge.style.removeProperty("borderRadius"),Fe.style.left=ue}}).to(ge,{width:te,borderRadius:te/2,...qf,overwrite:"auto"},0).to(Fe,{left:By,...qf,overwrite:"auto"},0)},[yn,te,se,ue,re.iconBox,re.padX,q,n,Ce]);l.useLayoutEffect(()=>{if(!M.current){M.current=!0,yn(D),z.current=D;return}z.current!==D&&(z.current=D,gr(D))},[yn,D,gr]);const An=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,P(!0),An())},[Y,D,An,P]),Ko=l.useCallback(ie=>{if(Y||D)return;const ge=F.current;if(!ge||de()){W.current=Promise.resolve();return}W.current=U&&I==null?Ro(ge):We(ge).then(()=>{})},[Y,D,I,U]),qo=l.useCallback(ie=>{Y||D||(ie.preventDefault(),ln())},[Y,D,ln]),K=U&&I==null?De.onShellPointerEnter:he.onPointerEnter,Z=U&&I==null?De.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&&P(!1)}},0)},[Y,c,h,P]),Ee=l.useCallback(ie=>{D||Y||(ie.key==="Enter"||ie.key===" ")&&(ie.preventDefault(),ln())},[Y,D,ln]),He=l.useCallback(ie=>{var ge,Fe;C==null||C(ie),!ie.defaultPrevented&&ie.key==="Escape"&&c&&(((ge=$.current)==null?void 0:ge.value)??"").length===0&&(ie.stopPropagation(),P(!1),(Fe=F.current)==null||Fe.focus())},[c,C,P]),Qe=re.padX+re.iconBox+6,Je=D&&oe&&!Y,Qt=re.padX+(Je?re.clearTap+re.textGapClear:0),Jt=_??"Open search",br=_??(m?String(m):"Search"),Py=I?R(gn(I),Wr(I)):null;return d.jsxs("div",{ref:Ye,...D?{role:"search",tabIndex:-1}:{role:"button",tabIndex:Y?-1:0,onClick:qo,onKeyDown:Ee},"aria-expanded":D,"aria-disabled":Y||void 0,"aria-label":D?void 0:Jt,"data-search-expanded":D?"":void 0,onFocusCapture:U&&I==null?De.onShellFocusIn:void 0,onBlurCapture:U&&I==null?De.onShellFocusOut:void 0,className:R(I?Py:D?DD[n]:R("rounded-full",re.shellWCollapsed),"relative box-border inline-block overflow-hidden text-left",U?"gloss-control border-0":"border-1 border-token bg-surface",Ur,$r,U?De.shellHoverMotionClass:Vr(!Y),!U&&!Y&&he.motionClass,D?"cursor-text":"",!D&&!Y?"cursor-pointer":"",Y?"pointer-events-none opacity-55":"",e),onPointerDown:Ko,onPointerEnter:K,onPointerLeave:Z,children:[y?d.jsx(vs,{color:"neutral",disabled:Y}):null,d.jsx("span",{ref:mt,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(Ie.IoSearch,{className:R("shrink-0",re.iconClass),"aria-hidden":!0})}),d.jsx("input",{ref:ce,id:O,type:"search",disabled:u,readOnly:f,placeholder:m,value:p,defaultValue:b,onChange:ne,onBlur:fe,onKeyDown:He,tabIndex:D?0:-1,"aria-label":br,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,...T}),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",bn,et(),"focus-ring-inset","cursor-pointer"),style:{right:re.padX,width:re.clearTap,height:re.clearTap},children:d.jsx(Ie.IoClose,{className:`shrink-0 ${re.clearIconClass}`,"aria-hidden":!0})}):null]})});Xu.displayName="SearchInput";function Yu(...t){return R(...t)}function Ku(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(...Ku(r));return}e.push(n)}}),e}function Vb(t){return t.type===yo||t.type===ua||t.type===Ib||t.type===Xu||t.type===Rr||t.type.displayName==="ButtonGroupText"}function Ub(t,e){return e<=1?"only":t===0?"first":t===e-1?"last":"middle"}function $b(t,e){return{orientation:t,position:e}}function VD(t){return t.reduce((e,n)=>e+(Vb(n)?1:0),0)}const UD={small:"small",base:"base",mid:"mid",large:"mid"},$D={small:"h-control-small",base:"h-control-base",mid:"h-control-mid",large:"h-control-large"};function Wb(t){const{padX:e,padY:n}=le[t];return R($D[t],e,n)}function gn(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 WD(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 Wr(t){return t==null?"":R(gn(t),WD(t),"!border-0 [border:0!important] !shadow-none [box-shadow:none!important]","z-0 focus-visible:z-[2]")}function XD(t){return R("relative inline-flex shrink-0 select-none items-center justify-center border-token bg-surface text-muted",gn(t),t!=null&&Wr(t),"z-0")}function Xb({orientation:t,segmented:e,variant:n,className:r}){return Yu("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 Yb(t){return Yu("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 YD({groupSegment:t,groupVariant:e,buttonSize:n,className:r}){return Yu(XD(t),e==="gloss"&&"bg-transparent text-foreground","inline-flex items-center",Wb(n),r)}const KD="max-w-[12rem] truncate font-w-base whitespace-nowrap md:max-w-[18rem]";function qu(...t){return R(...t)}const qD=new Set(["default","primary","outline","secondary","ghost"]),ZD={default:"default",primary:"primary",outline:"default",secondary:"secondary",ghost:"default",gloss:"default"},Kb={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")}},qb={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"}},QD="relative z-0 flex shrink-0 cursor-pointer items-center justify-center rounded-full outline-none overflow-hidden",JD="cursor-not-allowed opacity-50",eO="relative z-[1] shrink-0 text-current",tO="rounded-full";function nO(t){return Kb[t]}function rO({variant:t,size:e,disabled:n,className:r,slotRoot:o}){const s=t==="gloss",i=Kb[t],a=qb[e];return qu(QD,s?R("gloss-btn",nn):ar,!n&&!s&&et(ZD[t]),!s&&yr[t],i.focusOutline,a.root,n&&JD,r,o)}function oO(t,e){return qu(eO,qb[t].icon,e)}function sO({variant:t,animated:e,disabled:n,forwardedRef:r,onPointerDown:o,onPointerEnter:s,onPointerLeave:i}){const a=Qi({isGloss:t==="gloss",animated:e,enabled:!n,hasHoverShadow:qD.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 Bl=l.createContext({});function iO({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 Zb(){return l.useContext(Bl)}function aO({color:t,disabled:e,className:n}){const r=Zb();return d.jsx(vs,{color:t,disabled:e,duration:Se().rippleDefaultDuration,className:qu(tO,r.ripple,n)})}function lO({size:t}){const e=Zb();return d.jsx(Ie.IoClose,{"aria-hidden":!0,className:oO(t,e.icon)})}function cO(t){return t??"Close"}function uO({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=nO(t),m=rO({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:cO(a),buttonClass:m,convergeRippleColor:f.convergeBg,classNames:c}}const Fo=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=uO({variant:e,size:n,animated:r,ripple:o,className:s,classNames:i,disabled:a,type:c,"aria-label":u}),C=sO({variant:h.variant,animated:h.animated,disabled:h.disabled,forwardedRef:g,onPointerDown:f,onPointerEnter:m,onPointerLeave:p});return d.jsx(iO,{classNames:h.classNames,children:d.jsxs("button",{ref:C.setRefs,type:h.type,disabled:h.disabled,"aria-label":h.ariaLabel,className:h.buttonClass,onPointerEnter:C.handlePointerEnter,onPointerLeave:C.handlePointerLeave,onPointerDown:C.handlePointerDown,...b,children:[h.ripple?d.jsx(aO,{color:h.convergeRippleColor,disabled:h.disabled}):null,d.jsx(lO,{size:h.size})]})})});Fo.displayName="CloseButton";const dO=new Set(["ExpandableIcon","Accordion.Icon"]),fO=new Set(["ExpandableTitle","Accordion.Title"]),mO=new Set(["ExpandableDescription","Accordion.Description"]),pO=new Set(["ExpandableChevron","Accordion.Indicator"]),hO=new Set(["ExpandableMessage","Accordion.Message"]),gO=new Set(["ExpandableTrigger","ExpandablePanel","ExpandableMessage","Accordion.Trigger","Accordion.Panel","Accordion.Message","Accordion.Heading"]);function ot(...t){return R(...t)}function bO(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function Zu(t){return t.displayName}function CO(t){const e=[],n=[];return l.Children.forEach(t,r=>{l.isValidElement(r)&&r.type===vs?e.push(r):n.push(r)}),{ripples:e,rest:n}}function xO(t){let e=!1;return l.Children.forEach(t,n=>{if(e||!l.isValidElement(n))return;const r=Zu(n.type);r!=null&&hO.has(r)&&(e=!0)}),e}function _O(t){let e=!1;const n=r=>{if(!e)for(const o of l.Children.toArray(r)){if(!l.isValidElement(o))continue;const s=Zu(o.type);if(s!=null&&gO.has(s)){e=!0;return}n(o.props.children)}};return n(t),e}function da(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=Zu(s.type);if(i!=null&&e.has(i)){n=!0;return}r(s.props.children)}};return r(t),n}function SO(t){return da(t,dO)}function vO(t){return da(t,fO)}function yO(t){return da(t,mO)}function Qb(t){return da(t,pO)}function AO({children:t,hideChevron:e,hasPanel:n}){const r=Qb(t),o=n&&!e&&!r;return{hasIndicator:SO(t),hasTitle:vO(t),hasDescription:yO(t),hasAction:o||r,hasClose:!1}}const Jb=l.createContext(null);function TO({value:t,children:e}){return d.jsx(Jb.Provider,{value:t,children:e})}function Xr(){const t=l.useContext(Jb);if(!t)throw new Error("Expandable components must be used inside <Expandable>.");return t}const jl=l.createContext({});function LO({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 dr(){return l.useContext(jl)}const Qu=l.createContext(null);function EO({gridSlots:t,children:e}){return d.jsx(Qu.Provider,{value:t,children:e})}function IO(){const t=l.useContext(Qu);if(!t)throw new Error("Expandable trigger parts must be inside <Expandable.Trigger>.");return t}function fa(){return l.useContext(Qu)}function ma(t){return t?2:1}function wO(t){return t.hasAction?ma(t.hasIndicator)+1:null}function RO(t){return t.hasClose?ma(t.hasIndicator)+(t.hasAction?2:1):null}function NO(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 pa={1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4"};function Go(t,e="gap-x-base"){const n=t.hasTitle&&t.hasDescription;return R("grid w-full min-w-0 text-left",NO(t),n?"grid-rows-[auto_auto] gap-y-xsmall":"grid-rows-[auto]",e)}function Nr(t){return t.hasIndicator?"col-start-1 row-start-1 self-center shrink-0":"hidden"}function Ho(t){return R("row-start-1 self-center min-w-0 max-w-full justify-self-start",pa[ma(t.hasIndicator)])}function Ns(t){return R(t.hasTitle?"row-start-2":"row-start-1","min-w-0 w-full max-w-full justify-self-stretch self-start",pa[ma(t.hasIndicator)])}function Ds(t){const e=wO(t);return e==null?"hidden":R("row-start-1 self-center shrink-0 justify-self-end",pa[e])}function eC(t){const e=RO(t);return e==null?"hidden":R("row-start-1 self-center shrink-0 justify-self-end",pa[e])}function ki(t){return t.scrollHeight}function DO(t,e){const n=ki(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 pi(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 Zm="data-collapsible-init";function tC(t,e){const n=l.useRef(e);return l.useCallback(r=>{t.current=r,r&&!r.hasAttribute(Zm)&&(r.setAttribute(Zm,""),pi(r,n.current))},[t])}function nC(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,pi(a,t);return}if(s!=null&&s.current){s.current=!1,i.current=t,pi(a,t);return}if(i.current!==t){if(i.current=t,V(a),u){pi(a,t);return}if(t)a.style.overflow="hidden",X.fromTo(a,{height:0},{height:()=>ki(c),...Dm(),overwrite:"auto",onComplete:()=>DO(a,c)});else{const f=a.getBoundingClientRect().height||ki(c);a.style.height=`${f}px`,a.style.overflow="hidden",X.to(a,{height:0,...Dm(),overwrite:"auto",onComplete:()=>{a.style.height="0px",a.style.overflow="hidden"}})}}},[t,e,n,s])}function OO({open:t,disabled:e,toggle:n,forwardedRef:r,onClick:o,onKeyDown:s,onPointerDown:i}){const a=l.useRef(null),c=l.useRef(null),u=zr(t,c,()=>Se().enableExpandable),f=l.useCallback(g=>{ft(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 PO(t){const e=l.useRef(null),n=l.useRef(null),r=tC(e,t);return nC(t,e,n),{shellRef:e,innerRef:n,bindShellRef:r}}const kO={small:"small",base:"small",mid:"base",large:"base"},BO={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"},jO="rounded-mid text-left text-foreground",MO="border-token bg-surface shadow-token-base",FO="gloss-panel gloss-deep border-0",GO="gloss-content flex min-w-0 flex-col",HO="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",zO="cursor-not-allowed opacity-50",VO="cursor-pointer",UO="relative z-[1] w-full min-w-0 origin-center will-change-transform",rC="contents",oC="relative z-[1] flex shrink-0 origin-center self-center",$O=rC,WO="shrink-0 text-primary [&_svg]:size-full",XO=rC,YO="text-muted",KO="font-w-mid",qO=oC,ZO="overflow-hidden",QO="pointer-events-none absolute inset-0 z-0 overflow-hidden rounded-[inherit]";function JO({variant:t,className:e,slotClass:n}){return ot(jO,t==="gloss"?FO:MO,e,n)}function eP({size:t,disabled:e,className:n,slotClass:r}){const o=le[t];return ot(HO,o.padX,e?zO:VO,r,n)}function tP({gridSlots:t,slotClass:e}){return ot(UO,Go(t),e)}function nP({size:t,className:e,slotClass:n}){return ot(WO,le[t].icon,n,e)}function rP({size:t,className:e,slotClass:n}){return ot(BO[t],"text-left",n,e)}function oP(t){return le[t].chevronIcon}function sP(t){return le[t].chevronIcon}function iP(t){return le[t].controlText}function sC({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 Ju=l.forwardRef(function({className:e,...n},r){const o=dr();return d.jsx("div",{ref:r,className:ot($O,o.message,e),...n})});Ju.displayName="ExpandableMessage";const ed=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:C,panelId:x}=Xr(),_=dr(),v=OO({open:m,disabled:p,toggle:h,forwardedRef:f,onClick:o,onKeyDown:s,onPointerDown:i}),{ripples:y,rest:S}=CO(a),T=l.useMemo(()=>AO({children:S,hideChevron:e,hasPanel:b}),[S,e,b]),L=xO(S)?d.jsx(d.Fragment,{children:S}):d.jsx(Ju,{children:S}),A=b&&!e&&!Qb(S),E=y.length>0?d.jsx("span",{className:ot(QO,_.triggerRippleOverlay),"aria-hidden":!0,children:y}):null,I=d.jsxs(d.Fragment,{children:[L,A?d.jsx("span",{ref:v.bindChevronRef,className:ot(Ds(T),oC,_.chevron),"aria-hidden":!0,children:d.jsx(sC,{className:sP(g)})}):null]});if(n&&l.isValidElement(a)){const w=a;return l.cloneElement(w,{...u,id:C,ref:bO(f,w.props.ref),className:ot(w.props.className,r),disabled:p||w.props.disabled,"aria-expanded":b?m:void 0,"aria-controls":b?x:void 0,onClick:N=>{var O,j;(j=(O=w.props).onClick)==null||j.call(O,N),v.handleClick(N)},onKeyDown:N=>{var O,j;(j=(O=w.props).onKeyDown)==null||j.call(O,N),v.handleKeyDown(N)}})}return d.jsxs("button",{ref:v.setTriggerRef,type:c,id:C,className:eP({size:g,disabled:p,className:r,slotClass:_.trigger}),"aria-expanded":b?m:void 0,"aria-controls":b?x:void 0,disabled:p,onPointerDown:v.handlePointerDown,onClick:v.handleClick,onKeyDown:v.handleKeyDown,...u,children:[E,d.jsx(EO,{gridSlots:T,children:d.jsx("span",{ref:v.liftSpanRef,className:tP({gridSlots:T,slotClass:_.triggerLift}),children:I})})]})});ed.displayName="ExpandableTrigger";function td({className:t,children:e,...n}){const{size:r}=Xr(),o=dr(),s=fa();return e==null?null:d.jsx("span",{"aria-hidden":!0,className:ot(nP({size:r,className:t,slotClass:o.icon}),s&&Nr(s)),...n,children:e})}td.displayName="ExpandableIcon";function iC({className:t,...e}){const n=dr();return d.jsx("div",{className:ot(XO,n.content,t),...e})}iC.displayName="ExpandableContent";function nd({className:t,...e}){const{size:n}=Xr(),r=dr(),o=fa();return d.jsx(ee,{as:"div",variant:iP(n),className:ot(KO,o&&Ho(o),r.title,t),...e})}nd.displayName="ExpandableTitle";function rd({className:t,...e}){const{size:n}=Xr(),r=dr(),o=fa();return d.jsx(ee,{as:"div",variant:kO[n],className:ot(YO,o&&Ns(o),r.description,t),...e})}rd.displayName="ExpandableDescription";function aC({className:t,...e}){const{open:n,hasPanel:r,size:o}=Xr(),s=dr(),i=IO(),a=l.useRef(null),c=zr(n,a,()=>Se().enableExpandable);return r?d.jsx("span",{ref:c,className:ot(Ds(i),qO,s.chevron,t),"aria-hidden":!0,...e,children:d.jsx(sC,{className:oP(o)})}):null}aC.displayName="ExpandableChevron";const od=l.forwardRef(function({className:e,children:n,...r},o){const{open:s,headerId:i,panelId:a,size:c,setHasPanel:u}=Xr(),f=dr(),m=PO(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(ZO,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:rP({size:c,className:e,slotClass:f.panel}),...r,children:n})})})});od.displayName="ExpandablePanel";function aP({title:t,description:e,icon:n,panelChildren:r}){return d.jsxs(d.Fragment,{children:[d.jsxs(ed,{children:[n!=null?d.jsx(td,{children:n}):null,t!=null?d.jsx(nd,{children:t}):null,e!=null?d.jsx(rd,{children:e}):null]}),r!=null?d.jsx(od,{children:r}):null]})}function lP({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)},[]),C=f?r:m,x=l.useCallback(()=>{if(s||!b)return;const y=!C;f||p(y),o==null||o(y)},[f,s,b,C,o]),_={open:C,disabled:s,hasPanel:b,size:i,variant:a,toggle:x,headerId:u,panelId:c,setHasPanel:h},v=e===!0||_O(t);return{contextValue:_,isCompound:v,isGloss:a==="gloss"}}const lC=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 C=lP({children:e,compound:n,defaultOpen:c,open:u,onOpenChange:f,disabled:m,size:a,variant:i}),x=wo(h,C.isGloss),_=C.isCompound?e:d.jsx(aP,{title:r,description:o,icon:s,panelChildren:e});return d.jsx(TO,{value:C.contextValue,children:d.jsx(LO,{classNames:b,children:d.jsx("div",{ref:x,className:JO({variant:i,className:p,slotClass:b==null?void 0:b.root}),...g,children:C.isGloss?d.jsx("div",{className:ot(GO,b==null?void 0:b.glossContent),children:_}):_})})})});lC.displayName="ExpandableRoot";const Mn=Object.assign(lC,{Trigger:ed,Message:Ju,Icon:td,Content:iC,Title:nd,Description:rd,Chevron:aC,Panel:od}),Os=l.createContext(null),Ml=l.createContext({});function cP({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 zo(){return l.useContext(Ml)}const uP={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 sd(t){return t??"base"}function On(t){return uP[sd(t)]}function dP(t){const e=On(t);return`w-fit ${e.maxWidthClass} ${e.shellPadding}`}function fP(t,e="base"){const n=On(e).toastWidthPx;return t.length===0?n:Math.max(n,...t.map(r=>On(r.size??e).toastWidthPx))}const id={danger:Ie.IoCloseCircleOutline,success:Ie.IoCheckmarkCircleOutline,info:Ie.IoInformationCircleOutline,warning:Ie.IoWarning};function ad(t){return t??"default"}function ld(t){return t??"default"}function Ps(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 mP(t){return Ps(t,e=>e==="AlertTitle")}function pP(t){return Ps(t,e=>e==="AlertDescription")}function hP(t){return Ps(t,e=>e==="AlertIndicator")}function cC(t,e){for(const n of l.Children.toArray(t)){if(!l.isValidElement(n))continue;n.type.displayName==="AlertIndicator"&&e(n.props),cC(n.props.children,e)}}function gP(t,e,n,r){const o=r??e;return n===null?!1:n!==void 0||o!=="default"?!0:t==="outline"}function bP(t,e,n){if(!hP(t))return!1;let r=!1;return cC(t,o=>{gP(e,n,o.children,o.status)&&(r=!0)}),r}function CP(t){return Ps(t,e=>e==="AlertAction")}const xP=new Set(["AlertMessage","AlertIndicator","AlertContent","AlertTitle","AlertDescription","AlertAction"]);function _P(t){return Ps(t,e=>e!=null&&xP.has(e))}function cd(t,e){return e!=="default"?!0:t==="outline"}function ud(t,e){return e!=="default"?id[e]:t==="outline"?Ie.IoHelpCircleOutline:null}function SP(t,e,n,r,o){return r?bP(o,t,e):n===null?!1:n!==void 0?!0:cd(t,e)&&ud(t,e)!==null}const vP={default:"bg-surface border-token text-foreground",outline:"bg-transparent border-token text-foreground",secondary:"bg-secondary border-token text-secondary-foreground"};function uC(t,e){if(t==="gloss")return R("gloss-panel border-0 text-foreground",e!=="default"?xt[e]:"");if(e==="default")return vP[t];switch(t){case"default":return R(Lc[e],xt[e]);case"outline":return R("bg-transparent",Ec[e],xt[e]);case"secondary":return R("bg-secondary border-token",xt[e])}}function dC(t){return t!=="default"?xt[t]:"text-primary"}const yP="inline-flex shrink-0 items-center justify-center";function AP(t,e){return R(yP,e,dC(t))}const fC="contents",TP="font-w-mid",LP="text-muted";function dd({status:t,className:e="",children:n,...r}){const o=l.useContext(Os),s=zo(),i=(o==null?void 0:o.variant)??"default",a=t??(o==null?void 0:o.status)??"default",c=(o==null?void 0:o.sizePreset)??On("base"),u=o==null?void 0:o.gridSlots;if(n===null)return null;const f=ud(i,a),m=n!==void 0?n:cd(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&&Nr(u),s.indicator,e),...r,children:m})}dd.displayName="AlertIndicator";function mC({className:t="",...e}){const n=zo();return d.jsx("div",{className:R(fC,n.content,t),...e})}mC.displayName="AlertContent";const pC=l.forwardRef(function({className:e="",...n},r){const o=zo();return d.jsx("div",{ref:r,className:R(fC,o.message,e),...n})});pC.displayName="AlertMessage";function fd({className:t="",id:e,...n}){const r=l.useContext(Os),o=zo(),s=(r==null?void 0:r.sizePreset)??On("base");return d.jsx(ee,{as:"div",id:e??(r==null?void 0:r.titleId),variant:s.titleVariant,className:R(TP,(r==null?void 0:r.gridSlots)&&Ho(r.gridSlots),o.title,t),...n})}fd.displayName="AlertTitle";function md({className:t="",id:e,...n}){const r=l.useContext(Os),o=zo(),s=(r==null?void 0:r.sizePreset)??On("base");return d.jsx(ee,{as:"div",id:e??(r==null?void 0:r.descriptionId),variant:s.descVariant,className:R(LP,(r==null?void 0:r.gridSlots)&&Ns(r.gridSlots),o.description,t),...n})}md.displayName="AlertDescription";function pd({className:t="",...e}){const n=l.useContext(Os),r=zo();return d.jsx("div",{className:R((n==null?void 0:n.gridSlots)&&Ds(n.gridSlots),r.action,t),...e})}pd.displayName="AlertAction";function EP({gridSlots:t,title:e,description:n,icon:r,action:o,children:s}){return d.jsxs(d.Fragment,{children:[t.hasIndicator?d.jsx(dd,{children:r}):null,e!=null?d.jsx(fd,{children:e}):null,n!=null?d.jsx(md,{children:n}):null,s,o!=null?d.jsx(pd,{children:o}):null]})}function IP({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(C=>{u(C),c.current=C,typeof r=="function"?r(C):r&&(r.current=C)},[u,r]),m=No(c,a&&i),p=Oo(c,a&&!i),b=a?i?nn:p.motionClass:"",g=R(uC(t,e),b),h=l.useMemo(()=>({onPointerOver:C=>{o==null||o(C),!(C.defaultPrevented||!a)&&(i?m.onPointerOver(C):p.onPointerEnter(C))},onPointerOut:C=>{s==null||s(C),a&&(i?m.onPointerOut(C):p.onPointerLeave(C))}}),[m.onPointerOut,m.onPointerOver,i,a,s,o,p.onPointerEnter,p.onPointerLeave]);return{setRootRef:f,surfaceClass:g,pointerHandlers:h}}function hC(t,e){return e??(t==="danger"||t==="warning"?"alert":"status")}function wP(t,e,n,r){if(n)return t;if(r)return e}function RP(t,e,n){if(e&&n)return t}function NP(t,e,n,r,o,s,i,a){return{hasIndicator:SP(t,e,n,o,s),hasTitle:i,hasDescription:a,hasAction:o?CP(s):r!=null,hasClose:!1}}function DP({variant:t,status:e,size:n,role:r,title:o,description:s,icon:i,action:a,children:c,ariaLabelledByProp:u,ariaDescribedByProp:f}){const m=ad(t),p=ld(e),b=sd(n),g=On(b),h=l.useId(),C=`${h}-title`,x=`${h}-description`,_=_P(c),v=l.useMemo(()=>o!=null||mP(c),[c,o]),y=l.useMemo(()=>s!=null||pP(c),[c,s]),S=l.useMemo(()=>NP(m,p,i,a,_,c,v,y),[a,c,y,v,i,_,p,m]),T=hC(p,r),L=u??wP(C,x,v,y),A=f??RP(x,v,y),E=l.useMemo(()=>({variant:m,status:p,size:b,sizePreset:g,titleId:C,descriptionId:x,gridSlots:S}),[x,S,b,g,p,C,m]);return{variant:m,status:p,size:b,sizePreset:g,isCompound:_,gridSlots:S,liveRole:T,ariaLabelledBy:L,ariaDescribedBy:A,contextValue:E}}const gC=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":C,...x},_){const{isCompound:v,gridSlots:y,sizePreset:S,liveRole:T,ariaLabelledBy:L,ariaDescribedBy:A,contextValue:E}=DP({variant:e,status:n,size:r,role:o,title:s,description:i,icon:a,action:c,children:p,ariaLabelledByProp:h,ariaDescribedByProp:C}),{setRootRef:I,surfaceClass:w,pointerHandlers:N}=IP({variant:E.variant,status:E.status,hoverLift:f,ref:_,onPointerOver:b,onPointerOut:g});return d.jsx(Os.Provider,{value:E,children:d.jsx(cP,{classNames:u,children:d.jsx("div",{ref:I,role:T,"aria-labelledby":L,"aria-describedby":A,className:R(Go(y,S.gridGap),dP(r),w,u==null?void 0:u.root,m),...N,...x,children:v?p:d.jsx(EP,{gridSlots:y,title:s,description:i,icon:a,action:c,children:p})})})})});gC.displayName="AlertRoot";const OP=Object.assign(gC,{Indicator:dd,Message:pC,Content:mC,Title:fd,Description:md,Action:pd}),bC=l.createContext(null);function PP(){const t=l.useContext(bC);if(!t)throw new Error("Accordion components must be inside <Accordion>.");return t}function kP(t){const e=l.useRef(null);return zr(t,e,()=>Se().enableExpandable)}function Yr(...t){return R(...t)}function BP(t,e){return t??(e!=null?String(e):null)}function jP(t){return Yr("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 MP(t){return Yr("relative !rounded-none",t)}function FP(t){return Yr("m-0 font-[inherit] text-[inherit]",t)}function GP(t){return Yr("relative z-[1] flex shrink-0 origin-center self-center",t)}function HP(t){return Yr("text-muted",t)}const zP="shrink-0";function VP({className:t=""}){return d.jsx("svg",{className:Yr(zP,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 CC=l.forwardRef(function({value:e,disabled:n,className:r,children:o,...s},i){const{openId:a,setOpenId:c,getItemId:u,size:f}=PP(),m=u(e),p=a===m;return d.jsx(Mn,{ref:i,compound:!0,size:f,"data-accordion-item":!0,disabled:n,open:p,onOpenChange:b=>c(b?m:null),className:MP(r),...s,children:o})});CC.displayName="Accordion.Item";function xC({className:t,children:e,...n}){return d.jsx("h3",{className:FP(t),...n,children:e})}xC.displayName="Accordion.Heading";const _C=l.forwardRef(function({hideChevron:e=!0,className:n,...r},o){return d.jsx(Mn.Trigger,{ref:o,hideChevron:e,className:n,...r})});_C.displayName="Accordion.Trigger";function SC(t){return d.jsx(Mn.Message,{...t})}SC.displayName="Accordion.Message";function vC(t){return d.jsx(Mn.Icon,{...t})}vC.displayName="Accordion.Icon";function yC(t){return d.jsx(Mn.Content,{...t})}yC.displayName="Accordion.Content";function AC(t){return d.jsx(Mn.Title,{...t})}AC.displayName="Accordion.Title";function TC(t){return d.jsx(Mn.Description,{...t})}TC.displayName="Accordion.Description";function LC({className:t,children:e,...n}){const{open:r,hasPanel:o}=Xr(),s=kP(r),i=fa();return o?d.jsx("span",{ref:s,className:Yr(i&&Ds(i),GP(t)),"aria-hidden":!0,...n,children:e??d.jsx(VP,{})}):null}LC.displayName="Accordion.Indicator";const EC=l.forwardRef(function(e,n){return d.jsx(Mn.Panel,{ref:n,...e})});EC.displayName="Accordion.Panel";function IC({className:t,...e}){return d.jsx(ee,{as:"div",variant:"base",className:HP(t),...e})}IC.displayName="Accordion.Body";function UP({defaultOpenId:t=null,defaultOpenIndex:e=null,openId:n,onOpenIdChange:r,size:o="base"}){const s=n!==void 0,i=BP(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 wC=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}=UP({defaultOpenId:e,defaultOpenIndex:n,openId:r,onOpenIdChange:o,size:s});return d.jsx(bC.Provider,{value:f,children:d.jsx("div",{ref:u,className:jP(i),...c,children:a})})});wC.displayName="Accordion";const $P=Object.assign(wC,{Item:CC,Heading:xC,Trigger:_C,Message:SC,Icon:vC,Content:yC,Title:AC,Description:TC,Indicator:LC,Panel:EC,Body:IC});function WP(t,e){return ur("flex w-full max-w-full flex-col gap-mid text-left",e==null?void 0:e.root,t)}function XP(t,e){return ur("flex flex-col gap-base",e==null?void 0:e.section,t)}function YP(t,e){return ur("text-base font-w-mid text-foreground",e==null?void 0:e.title,t)}function KP(t,e){return ur("text-base text-muted",e==null?void 0:e.description,t)}function qP(t,e){return ur("flex flex-wrap items-center justify-end gap-small pt-small",e==null?void 0:e.actions,t)}function ZP(t,e){return ur("sr-only",e==null?void 0:e.errorSummary,t)}function QP(t,e){return ur("sr-only",e==null?void 0:e.announce,t)}function JP(t,e){return ur(t,e==null?void 0:e.field)}function RC({className:t="",classNames:e,...n}){const r=Fr();return d.jsx("div",{className:XP(t,{...r,section:e==null?void 0:e.section}),...n})}RC.displayName="Form.Section";function NC({className:t="",id:e,...n}){const r=Fr(),o=Ji();return d.jsx(ee,{as:"h2",variant:"mid",id:e??(o==null?void 0:o.titleId),className:YP(t,r),...n})}NC.displayName="Form.Title";function DC({className:t="",id:e,...n}){const r=Fr(),o=Ji();return d.jsx("p",{id:e??(o==null?void 0:o.descriptionId),className:KP(t,r),...n})}DC.displayName="Form.Description";function OC({className:t="",...e}){const n=Fr();return d.jsx("div",{className:qP(t,n),...e})}OC.displayName="Form.Actions";function hd({className:t="",id:e,...n}){const r=Fr(),o=Ji(),s=xn(),i=(s==null?void 0:s.getErrors())??{},a=nN(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:ZP(t,r),...n,children:c})}hd.displayName="Form.ErrorSummary";function gd({className:t="",id:e,message:n}){const r=Fr(),o=Ji();return n?d.jsx("div",{id:e??(o==null?void 0:o.announceId),role:"status","aria-live":"polite","aria-atomic":"true",className:QP(t,r),children:n}):null}gd.displayName="Form.Announce";function PC({name:t,rules:e,className:n="",classNames:r,children:o}){const s=Fr(),i=xn();return l.useEffect(()=>{if(!(!i||!e))return i.registerFieldRules(t,e),()=>i.unregisterFieldRules(t)},[i,t,e]),d.jsx("div",{className:JP(n,{...s,field:r==null?void 0:r.field}),children:o})}PC.displayName="Form.Field";function ek({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},C=e!==void 0,[x,_]=l.useState(t??{}),v=C?e:x,[y,S]=l.useState({}),[T,L]=l.useState({}),[A,E]=l.useState(0),[I,w]=l.useState(!1),[N,O]=l.useState(null),j=l.useRef(new Map),k=l.useRef(r??{});k.current=r??{};const G=l.useCallback(te=>{C||_(te),n==null||n(te)},[C,n]),D=l.useCallback(te=>te.split(".").reduce((ae,he)=>{if(!(ae==null||typeof ae!="object"))return ae[he]},v),[v]),P=l.useCallback((te,U,ae)=>{const he=rN(v,te,U);if(G(he),ae!=null&&ae.shouldValidate){const De=el(U,he,k.current[te]);S(Ye=>{const q={...Ye};return De?q[te]=De:delete q[te],q})}},[G,v]),F=l.useCallback(te=>y[te],[y]),B=l.useCallback(()=>y,[y]),$=l.useCallback(te=>k.current[te],[]),W=l.useCallback((te,U)=>{L(ae=>({...ae,[te]:U}))},[]),M=l.useCallback(te=>!!T[te],[T]),z=l.useCallback((te,U)=>{U?j.current.set(te,U):j.current.delete(te)},[]),H=l.useCallback((te,U)=>{U!=null&&(k.current={...k.current,[te]:U})},[]),oe=l.useCallback(te=>{const U={...k.current};delete U[te],k.current=U},[]),pe=l.useCallback(te=>{const U=el(D(te),v,k.current[te]);return S(ae=>{const he={...ae};return U?he[te]=U:delete he[te],he}),U},[D,v]),ce=l.useCallback(()=>{const te={};for(const U of Object.keys(k.current)){const ae=el(D(U),v,k.current[U]);ae&&(te[U]=ae)}return S(te),te},[D,v]),Y=l.useCallback(()=>{Hm(j.current,y)},[y]),ne=l.useCallback(()=>O(null),[]),me=l.useMemo(()=>({disabled:i,readOnly:a,size:c,validateMode:s,isSubmitting:I,submitCount:A,getValue:D,setValue:P,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,I,M,a,z,H,oe,W,P,c,A,pe,ce,s]),re=l.useCallback(async te=>{te.preventDefault(),E(ae=>ae+1),O(null);let U=ce();if(o){const ae=await o(v);ae.errors&&(U={...U,...ae.errors},S(U))}if(Ja(U)>0){O(aN(Ja(U))),Hm(j.current,U),f==null||f(U);return}if(u)try{w(!0),await u(v),O(lN())}finally{w(!1)}},[u,f,o,ce,v]),Ce=Ja(y)>0;return{shellIds:h,bindingValue:me,handleSubmit:re,errors:y,hasErrors:Ce,isSubmitting:I,announce:N}}const kC=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},C){const{shellIds:x,bindingValue:_,handleSubmit:v,hasErrors:y,announce:S}=ek({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(m0,{classNames:r,children:d.jsx(pg.Provider,{value:_,children:d.jsx(p0,{shellIds:x,children:d.jsxs("form",{ref:C,noValidate:!0,onSubmit:v,"aria-labelledby":x.titleId,"aria-describedby":iN({descriptionId:x.descriptionId,errorSummaryId:x.errorSummaryId,hasErrors:y}),className:WP(n,r),...h,children:[d.jsx(gd,{message:S}),d.jsx(hd,{}),e]})})})})});kC.displayName="Form";const tk=Object.assign(kC,{Section:RC,Title:NC,Description:DC,Actions:OC,ErrorSummary:hd,Announce:gd,Field:PC}),nk={vertical:"flex flex-col gap-plus",horizontal:"flex flex-row flex-wrap items-start gap-x-mid gap-y-plus"},BC=l.forwardRef(function({size:e="small",...n},r){return d.jsx(uu,{ref:r,size:e,...n})}),bd=l.forwardRef(function({children:e,...n},r){return d.jsx(ys,{ref:r,...n,children:e})});bd.displayName="OptionGroupLegend";function jC({children:t,className:e,id:n,...r}){return d.jsx(Xe,{as:"span",variant:"small",id:n,className:e,...r,children:t})}function MC({children:t,className:e,...n}){return d.jsx(ea,{className:e,...n,children:t})}const FC=l.forwardRef(function({className:e,orientation:n="vertical",children:r,...o},s){return d.jsx("div",{ref:s,className:R("text-left",nk[n],e),...o,children:r})});function GC({children:t,...e}){return d.jsx(bd,{...e,children:d.jsx(MC,{children:t})})}GC.displayName="CheckboxGroup.Legend";const Cd=l.createContext(null);function rk({value:t,children:e}){return d.jsx(Cd.Provider,{value:t,children:e})}function HC(){const t=l.useContext(Cd);if(!t)throw new Error("CheckboxGroup components must be inside <CheckboxGroup>.");return t}function ok(){return l.useContext(Cd)}function zC({id:t,...e}){const{hintId:n}=HC();return d.jsx(jC,{id:t??n,...e})}zC.displayName="CheckboxGroup.Hint";function VC({id:t,...e}){const{errorId:n}=HC();return d.jsx(Ze,{id:t??n,...e})}VC.displayName="CheckboxGroup.Error";const UC=l.forwardRef(function(e,n){return d.jsx(FC,{ref:n,...e})});UC.displayName="CheckboxGroup.List";function sk({isRequired:t=!1,selection:e="multiple",value:n,defaultValue:r,onValueChange:o,disabled:s=!1,hintId:i,errorId:a}){const c=du(i),u=fu(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 C=l.useCallback(()=>e!=="single"||!t||h.current?!1:(h.current=!0,!0),[t,e]),x=l.useMemo(()=>({selection:e,disabled:s,isRequired:t,hintId:c,errorId:u,selectedValue:b,selectSingleValue:g,claimRequiredAnchor:C}),[C,s,u,c,t,g,b,e]),_=l.useMemo(()=>({isRequired:t}),[t]);return{contextValue:x,fieldLabelCtx:_,hintId:c,errorId:u,disabled:s}}const $C=l.forwardRef(function(e,n){const{children:r,className:o,size:s,disabled:i=!1,...a}=e,{contextValue:c,fieldLabelCtx:u,hintId:f,errorId:m}=sk(e);return d.jsx(rk,{value:c,children:d.jsx(Xt.Provider,{value:u,children:d.jsx(BC,{ref:n,disabled:i,hintId:f,errorId:m,size:s,className:o,...a,children:r})})})});$C.displayName="CheckboxGroup";const ik=Object.assign($C,{Legend:GC,Label:Ue,Hint:zC,Error:VC,List:UC,Group:Gr,Actions:Bo}),xd=l.createContext(null);function ak({value:t,children:e}){return d.jsx(xd.Provider,{value:t,children:e})}function WC(){const t=l.useContext(xd);if(!t)throw new Error("RadioGroup components must be inside <RadioGroup>.");return t}function lk(){return l.useContext(xd)}function XC({children:t,...e}){return d.jsx(bd,{...e,children:d.jsx(MC,{children:t})})}XC.displayName="RadioGroup.Legend";function YC({id:t,...e}){const{hintId:n}=WC();return d.jsx(jC,{id:t??n,...e})}YC.displayName="RadioGroup.Hint";function KC({id:t,...e}){const{errorId:n}=WC();return d.jsx(Ze,{id:t??n,...e})}KC.displayName="RadioGroup.Error";const qC=l.forwardRef(function(e,n){return d.jsx(FC,{ref:n,...e})});qC.displayName="RadioGroup.List";function ck({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=du(i),m=fu(a),p=e!==void 0,[b,g]=l.useState(n),h=p?e==null?void 0:String(e):b,C=l.useCallback(S=>{t&&S===void 0||(p||g(S),r==null||r(S))},[p,t,r]),x=l.useRef(!1);l.useEffect(()=>{x.current=!1},[t,u]);const _=l.useCallback(()=>!t||x.current?!1:(x.current=!0,!0),[t]),v=l.useMemo(()=>({name:u,disabled:o,isRequired:t,hintId:f,errorId:m,selectedValue:h,selectValue:C,claimRequiredAnchor:_}),[_,o,m,u,f,t,C,h]),y=l.useMemo(()=>({isRequired:t}),[t]);return{contextValue:v,fieldLabelCtx:y,hintId:f,errorId:m,disabled:o}}const ZC=l.forwardRef(function(e,n){const{children:r,className:o,size:s,disabled:i=!1,name:a,...c}=e,{contextValue:u,fieldLabelCtx:f,hintId:m,errorId:p}=ck(e);return d.jsx(ak,{value:u,children:d.jsx(Xt.Provider,{value:f,children:d.jsx(BC,{ref:n,disabled:i,hintId:m,errorId:p,size:s,className:o,...c,children:r})})})});ZC.displayName="RadioGroup";const uk=Object.assign(ZC,{Legend:XC,Label:Ue,Hint:YC,Error:KC,List:qC,Group:Gr,Actions:Bo}),QC=l.forwardRef(function({children:e,className:n="",buttonSize:r,groupSegment:o,...s},i){const a=Po(),c=kn(),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:YD({groupSegment:f,groupVariant:m,buttonSize:u,className:n}),children:d.jsx(ee,{variant:UD[u],inheritColor:!0,as:"span",className:KD,children:e})})});QC.displayName="ButtonGroupText";function dk({children:t,orientation:e="horizontal",segmented:n=!1,buttonSize:r="base",variant:o="default"}){const s=l.useMemo(()=>Ku(t),[t]),i=l.useMemo(()=>VD(s),[s]),a=l.useMemo(()=>({segmented:n}),[n]);return{flat:s,segmentCount:i,layoutValue:a,orientation:e,segmented:n,buttonSize:r,variant:o}}function fk({orientation:t}){return d.jsx("span",{"aria-hidden":!0,className:Yb(t)})}const JC=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}=dk({children:e,orientation:r,segmented:o,buttonSize:s,variant:i});let p=-1;return d.jsx(f0,{value:m,children:d.jsx("div",{ref:c,role:"group",className:Xb({orientation:r,segmented:o,variant:i,className:n}),...a,children:u.map((b,g)=>{if(!Vb(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=Ub(p,f),C=$b(r,h);return d.jsxs(l.Fragment,{children:[d.jsx(fg,{segment:C,buttonSize:s,variant:i,children:b}),i!=="gloss"&&h!=="last"&&h!=="only"?d.jsx(fk,{orientation:r}):null]},b.key??`bg-seg-${g}`)})})})});JC.displayName="ButtonGroup";const mk=JC;function pk(t){return Array.from(t.querySelectorAll("[data-toggle-button-value]:not([disabled])")).filter(e=>e instanceof HTMLButtonElement)}function hk(t,e,n,r){if(t)return n!=null?n===e?0:-1:e===r?0:-1}function gk(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 bk(t){return t?-1:0}function Ck({disabled:t,isSingle:e,orientation:n,onKeyDown:r,select:o}){return s=>{if(r==null||r(s),s.defaultPrevented||t||!e)return;const i=pk(s.currentTarget);if(i.length===0)return;const a=i.findIndex(m=>m===document.activeElement),c=gk(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 Qm="data-toggle-fill-init";function _d(t,e){V(t),X.set(t,{scale:e?1:0,autoAlpha:e?1:0})}function xk(t,e){return n=>{t.current=n,n&&!n.hasAttribute(Qm)&&(n.setAttribute(Qm,""),_d(n,e))}}function Jm(t,e,n=de()||!Se().enableToggleButtonFill){if(V(t),n){_d(t,e);return}e?X.fromTo(t,{scale:0,autoAlpha:0},{scale:1,autoAlpha:1,...Nm(),overwrite:"auto"}):X.to(t,{scale:0,autoAlpha:0,...Nm(),overwrite:"auto"})}function ex(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(()=>xk(e,s.current),[e]),u=l.useCallback(f=>{const m=e.current;m&&i.current!==f&&(i.current=f,o==null||o(f),Jm(m,f,a))},[e,o,a]);return l.useLayoutEffect(()=>{const f=e.current;if(f){if(i.current===void 0){i.current=t,_d(f,t);return}i.current!==t&&(r!=null&&r.current||(i.current=t,o==null||o(t),Jm(f,t,a)))}},[r,o,t,e,a]),{animateTo:u,bindFillRef:c}}function _k({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}=ex(s,f,{deferFillFromPressRef:m,onFillStart:i}),C=l.useCallback(()=>{m.current=!1,p.current=null,b.current=!1},[]),x=l.useCallback(()=>{const A=p.current;A!==null&&(p.current=null,m.current=!1,g(A))},[g]),_=l.useCallback(()=>{b.current=!0,x()},[x]),v=t&&!e&&!de(),y=Qi({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(A=>{v&&(m.current=!0,b.current=!1,p.current=!s),y.handlePointerDown(A)},[y,s,v]),T=l.useCallback(A=>{y.handlePointerLeave(A),C()},[C,y]),L=l.useCallback(A=>{if(!v){g(A);return}p.current=A,b.current&&x()},[g,x,v]);return{setRefs:y.setRefs,contentMotionRef:y.contentMotionRef,handlePointerEnter:y.handlePointerEnter,handlePointerLeave:T,handlePointerDown:S,bindFillRef:h,queueFillOnClick:L}}const tx=new Set(["ToggleButtonContent","ToggleButtonFill","ToggleButtonLabel","ToggleButtonIcon","ToggleButtonTrailing","ToggleButtonText"]);function nx(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 Sk(t){return nx(t,e=>e!=null&&tx.has(e))}function ep(t,e){return nx(t,n=>n===e)}function vk(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||!tx.has(r)}function er(...t){return R(...t)}function yk(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 rx=l.createContext(null),ox=l.createContext(null),Fl=l.createContext({});function Ak(){return l.useContext(rx)}function Tk({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 Vo(){return l.useContext(Fl)}function ks(){return l.useContext(ox)}function Lk({value:t,children:e}){return d.jsx(ox.Provider,{value:t,children:e})}const Ek={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"},Ik="group/toggle relative inline-flex origin-center items-center justify-center overflow-hidden outline-none text-foreground focus-ring",wk="gloss-btn",Rk="bg-transparent",Nk="cursor-not-allowed opacity-50",Dk="cursor-pointer",Ok="pointer-events-none absolute -inset-px z-0 origin-center motion-reduce:transition-none",Pk="relative z-[1] inline-flex w-full min-w-0 items-center justify-center gap-xsmall",kk="origin-center will-change-transform",Bk="inline-flex shrink-0 items-center justify-center [&_svg]:size-full",jk="inline-flex w-full min-w-0 items-center gap-xsmall",Mk="min-w-0 shrink";function Fk({slotClass:t,className:e}){return er(jk,t,e)}function Gk(t,e){return er(Mk,t,e)}function Hk(t){return Ek[t]}function zk({fillColor:t,pressed:e,roundingClass:n,slotClass:r}){return er(Ok,t,Io,e?`group-hover/toggle:${t}/80`:"group-hover/toggle:bg-default-hover",n,r)}function sx(t,e){return er(Bk,le[t].icon,e)}function Vk({variant:t,pressed:e,disabled:n,size:r,groupSegment:o,slotClass:s,className:i}){const a=t==="gloss",c=o?gn(o):"rounded-base",u=o?Wr(o):"";return er(Ik,a?er(wk,!o&&nn):er(!o&&ar),!a&&!e&&!n&&et(),!a&&Hk(t),e&&Rk,n?Nk:Dk,Jc(r,!0),c,u,s,i)}function Uk({groupSegment:t,slotClass:e}){return er(Pk,t&&kk,e)}function $k(t){return t?gn(t):"rounded-base"}const Wk={small:"small",base:"base",mid:"mid",large:"mid"},Sd=l.forwardRef(function({className:e="",...n},r){const o=ks(),s=Vo();return o?d.jsx("span",{ref:r??o.bindFillRef,"aria-hidden":!0,className:zk({fillColor:o.fillColor,pressed:o.pressed,roundingClass:o.roundingClass,slotClass:R(s.fill,e)}),...n}):null});Sd.displayName="ToggleButtonFill";const Bi=l.forwardRef(function({className:e="",children:n,...r},o){const s=ks(),i=Vo();return d.jsx("span",{ref:o??(s==null?void 0:s.contentMotionRef),className:Uk({groupSegment:s==null?void 0:s.groupSegment,slotClass:R(i.content,e)}),...r,children:n})});Bi.displayName="ToggleButtonContent";const ix=l.forwardRef(function({className:e="",children:n,...r},o){const s=Vo();return d.jsx("span",{ref:o,className:Fk({slotClass:s.label,className:e}),...r,children:n})});ix.displayName="ToggleButtonLabel";function vd({className:t="",children:e,...n}){const r=ks(),o=Vo(),s=(r==null?void 0:r.size)??"base";return d.jsx("span",{className:sx(s,R(o.leftIcon,t)),"aria-hidden":!0,...n,children:e})}vd.displayName="ToggleButtonIcon";function yd({className:t="",children:e,...n}){const r=ks(),o=Vo(),s=(r==null?void 0:r.size)??"base";return d.jsx("span",{className:sx(s,R(o.rightIcon,t)),"aria-hidden":!0,...n,children:e})}yd.displayName="ToggleButtonTrailing";function Ad({className:t="",children:e,...n}){const r=ks(),o=Vo(),s=(r==null?void 0:r.size)??"base";return d.jsx(ee,{variant:Wk[s],as:"span",inheritColor:!0,className:Gk(o.text,t),...n,children:e})}Ad.displayName="ToggleButtonText";function Xk({leftIcon:t,rightIcon:e,children:n}){const r=vk(n);return d.jsxs(d.Fragment,{children:[t!=null?d.jsx(vd,{children:t}):null,r?d.jsx(Ad,{children:n}):n,e!=null?d.jsx(yd,{children:e}):null]})}function Yk({inGroup:t,isSingleGroup:e}){return t&&e?"radio":void 0}function Kk({inGroup:t,isSingleGroup:e,pressed:n}){return!t||!e?n:void 0}function qk({inGroup:t,isSingleGroup:e,pressed:n}){return t&&e?n:void 0}function Zk({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=Ak(),C=kn(),x=e??(C==null?void 0:C.segment),_=h!=null&&t!=null,v=(h==null?void 0:h.type)==="single",y=c??(h==null?void 0:h.size)??(C==null?void 0:C.buttonSize)??"base",S=i??(h==null?void 0:h.variant)??"default",T=f||!!(h!=null&&h.disabled),[L,A]=yk(_?void 0:n,_?!1:r),E=_?h.isSelected(t):L,I=_?n!==void 0?!!n:E:n!==void 0?!!n:L,w=$k(x),N=Sk(b),O=N?void 0:m,j=Vk({variant:S,pressed:I,disabled:T,size:y,groupSegment:x,slotClass:p==null?void 0:p.root,className:m}),k=l.useCallback((G,D)=>{if(g==null||g(G),G.defaultPrevented||T)return;if(_&&t!=null){h.select(t);return}const P=!I;D(P),A(P),o==null||o(P)},[T,h,_,t,g,o,I,A]);return{itemValue:t,groupCtx:h,groupSegment:x,inGroup:_,isSingleGroup:v,size:y,variant:S,disabled:T,pressed:I,onFillStart:s,fillColor:a,animated:u,classNames:p,roundingClass:w,buttonClass:j,role:Yk({inGroup:_,isSingleGroup:v}),ariaPressed:Kk({inGroup:_,isSingleGroup:v,pressed:I}),ariaChecked:qk({inGroup:_,isSingleGroup:v,pressed:I}),tabIndex:_&&v?h.tabIndexFor(t):void 0,isCompound:N,contentLayoutClass:O,children:b,handleClick:k}}const ax=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:C,children:x,onClick:_,onPointerDown:v,onPointerEnter:y,onPointerLeave:S,...T},L){var O;const A=Zk({value:r,groupSegment:o,pressed:s,defaultPressed:i,onPressedChange:a,onFillStart:c,variant:u,fillColor:f,size:m,animated:h,disabled:C,className:e,classNames:n,children:x,onClick:_}),E=_k({animated:A.animated,disabled:A.disabled,variant:A.variant,groupSegment:A.groupSegment,pressed:A.pressed,onFillStart:A.onFillStart,forwardedRef:L,onPointerEnter:y,onPointerLeave:S,onPointerDown:v}),I={size:A.size,groupSegment:A.groupSegment,contentMotionRef:E.contentMotionRef,bindFillRef:E.bindFillRef,fillColor:A.fillColor,pressed:A.pressed,roundingClass:A.roundingClass},w=ep(x,"ToggleButtonFill"),N=ep(x,"ToggleButtonContent");return d.jsx(Lk,{value:I,children:d.jsx(Tk,{classNames:A.classNames,children:d.jsxs("button",{ref:E.setRefs,type:p,disabled:A.disabled,"data-toggle-button-value":A.itemValue,role:A.role,"aria-pressed":A.ariaPressed,"aria-checked":A.ariaChecked,tabIndex:A.tabIndex,className:A.buttonClass,onPointerEnter:E.handlePointerEnter,onPointerLeave:E.handlePointerLeave,onPointerDown:E.handlePointerDown,onClick:j=>A.handleClick(j,E.queueFillOnClick),...T,children:[w?null:d.jsx(Sd,{}),A.isCompound?N?x:d.jsx(Bi,{children:x}):d.jsx(Bi,{className:R((O=A.classNames)==null?void 0:O.content,A.contentLayoutClass),children:d.jsx(Xk,{leftIcon:b,rightIcon:g,children:A.children})})]})})})});ax.displayName="ToggleButtonRoot";const lx=Object.assign(ax,{Content:Bi,Fill:Sd,Label:ix,Icon:vd,Trailing:yd,Text:Ad});function Td(t){return t.type===lx}function Qk(t){return t.reduce((e,n)=>e+(Td(n)?1:0),0)}function Jk(t){return t.reduce((e,n)=>{if(!Td(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 np(t){if(t!=null)return Array.isArray(t)?t[0]:t}function e1(t,e,n,r){return t==="single"?n===e:r.includes(e)}function t1(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 n1({value:t,children:e}){return d.jsx(rx.Provider,{value:t,children:e})}function r1({orientation:t,separated:e,variant:n,className:r}){return Xb({orientation:t,segmented:e,variant:n,className:r})}function o1(t){return Yb(t)}function s1({orientation:t}){return d.jsx("span",{"aria-hidden":!0,className:o1(t)})}function i1({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(()=>np(i)),[g,h]=l.useState(()=>tp(i)),C=f?m?np(s):p:void 0,x=l.useMemo(()=>f?[]:m?tp(s):g,[g,m,f,s]),_=l.useRef(x);_.current=x;const v=l.useCallback(w=>e1(e,w,C,x),[x,C,e]),y=l.useCallback(w=>{if(n)return;if(f){const O=t1(e,w,C,x);if(O==null||O.kind!=="single")return;m||b(O.value),a==null||a(O.value);return}const N=xu(_.current,w,!0);_.current=N,m||h(N),a==null||a(N)},[n,m,f,x,a,C,e]),S=l.useMemo(()=>Ku(t),[t]),T=l.useMemo(()=>Qk(S),[S]),L=l.useMemo(()=>Jk(S)[0],[S]),A=l.useCallback(w=>hk(f,w,C,L),[L,f,C]),E=l.useMemo(()=>({type:e,disabled:n,size:r,variant:o,isSelected:v,select:y,tabIndexFor:A}),[n,v,y,r,A,e,o]),I=l.useMemo(()=>Ck({disabled:n,isSingle:f,orientation:u,onKeyDown:c,select:y}),[n,f,c,u,y]);return{flat:S,segmentCount:T,contextValue:E,handleKeyDown:I,isSingle:f}}const cx=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:C,segmentCount:x,contextValue:_,handleKeyDown:v,isSingle:y}=i1(e);let S=-1;return d.jsx(n1,{value:_,children:d.jsx("div",{ref:n,role:"toolbar",tabIndex:bk(a),"aria-orientation":s,"aria-disabled":a||void 0,className:r1({orientation:s,separated:i,variant:u,className:o}),...y?{onKeyDown:v}:{},...h,children:C.map((T,L)=>{if(!Td(T))return d.jsx(l.Fragment,{children:T},T.key??`tbg-wrap-${L}`);if(i)return d.jsx(l.Fragment,{children:T},T.key??`tbg-item-${L}`);S+=1;const A=Ub(S,x),E=$b(s,A);return d.jsxs(l.Fragment,{children:[d.jsx(fg,{segment:E,buttonSize:c,children:T}),u!=="gloss"&&A!=="last"&&A!=="only"?d.jsx(s1,{orientation:s}):null]},T.key??`tbg-seg-${L}`)})})})});cx.displayName="ToggleButtonGroup";const a1=cx,ux=l.createContext(null);function l1({value:t,children:e}){return d.jsx(ux.Provider,{value:t,children:e})}function Fn(){const t=l.useContext(ux);if(!t)throw new Error("AlertDialog.* components must be used inside <AlertDialog>.");return t}const Gl=l.createContext({});function c1({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 on(){return l.useContext(Gl)}const Ld=l.createContext(null);function u1({value:t,children:e}){return d.jsx(Ld.Provider,{value:t,children:e})}function d1(t){const e=l.useContext(Ld);if(!e)throw new Error(`${t} must be used inside <AlertDialog.Header>.`);return e}function Ed(){return l.useContext(Ld)}function st(...t){return R(...t)}function f1(t){return"primary"}function m1(t){switch(t){case"danger":case"success":case"info":case"warning":return t;default:return"default"}}function ha(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 p1(t){return ha(t,e=>e==="AlertDialogTitle")}function h1(t){return ha(t,e=>e==="AlertDialogDescription")}function dx(t){return ha(t,e=>e==="AlertDialogIndicator")}function fx(t){return ha(t,e=>e==="AlertDialogClose")}function mx(t,e){return cd(t,e)}function px(t,e){return ud(t,e)}function g1(t,e,n,r){return r?!0:n===null?!1:n!==void 0?!0:mx(t,e)&&px(t,e)!==null}function b1(t,e,n,r,o){const s=dx(o),i=fx(o);return{hasIndicator:g1(t,e,n,s),hasTitle:p1(o),hasDescription:h1(o),hasAction:!1,hasClose:i||r}}function hx(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},hx(r.props.children,e))}return n})}function C1({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=cb({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()){yu(f,m,{focusPanel:!0});return}lb({overlay:f,panel:m,vars:{...ve(),overwrite:"auto"}}),m.focus()}},[t,n]),{mounted:n,dialogRef:o,overlayRef:s,panelRef:i,bindGlossPanelRef:c}}function gt(...t){return R(...t)}function gx(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},gx(r.props.children,e))}return n})}const x1="flex min-h-0 flex-1 flex-col gap-mid text-left",_1={headerPadding:"px-plus pt-plus",bodyPadding:"px-plus",footerPadding:"px-plus pb-plus"},tl={headerPadding:"px-mid pt-mid",bodyPadding:"px-mid",footerPadding:"px-mid pb-mid"},S1={small:{panelMax:"max-w-component-small",maxHeight:"max-h-[min(85dvh,26rem)]",headerGap:"gap-base",..._1,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",...tl,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",...tl,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",...tl,headingBlockGap:"flex min-w-0 flex-1 flex-col gap-base text-left",titleVariant:"mid",descVariant:"base",descClassName:"text-muted",bodyVariant:"mid"}},v1={small:"small",base:"base",mid:"base",large:"base"},y1="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",A1="bg-[color-mix(in_oklab,var(--color-foreground)_14%,transparent)] backdrop-blur-[14px] backdrop-saturate-150 motion-reduce:backdrop-blur-none",T1="bg-[color-mix(in_oklab,black_58%,transparent)]",L1="relative z-10 w-full outline-none",E1="flex min-h-0 flex-col overflow-hidden rounded-mid border-token bg-surface text-left text-foreground shadow-token-large",I1="gloss-panel gloss-deep flex min-h-0 w-full flex-col rounded-mid text-foreground",w1="flex shrink-0 items-start",R1="min-w-0",N1="min-w-0",D1="min-h-0 flex-1 overflow-y-auto",O1="flex shrink-0 flex-wrap items-center justify-end gap-base",P1="shrink-0",bx="gloss-content";function Cx(){return ab()}function xx(t,e){return gt("absolute inset-0",t?A1:T1,e)}function k1({variant:t,sizePreset:e,className:n,slotClass:r}){const o=t==="gloss";return gt(L1,e.panelMax,!o&&E1,!o&&e.maxHeight,n,r)}function B1(t,e){return gt(I1,t,e)}function _x(t,e=!1){return gt(x1,e&&bx,t)}function j1(t,e){return gt(D1,t,e)}function M1(t){return v1[t]}const F1="flex min-h-0 flex-1 flex-col gap-mid text-left",G1={headerPadding:"px-plus pt-plus",bodyPadding:"px-plus",footerPadding:"px-plus pb-plus"},nl={headerPadding:"px-mid pt-mid",bodyPadding:"px-mid",footerPadding:"px-mid pb-mid"},H1={small:{panelMax:"max-w-component-small",maxHeight:"max-h-[min(85dvh,26rem)]",headerGap:"gap-x-base",...G1,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",...nl,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",...nl,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",...nl,headingBlockGap:"flex min-w-0 flex-col gap-base",iconClass:"icon-large",titleVariant:"mid",descVariant:"base",descClassName:"text-muted",bodyVariant:"mid"}},z1={small:"small",base:"base",mid:"base",large:"base"},V1="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",U1="relative z-10 w-full outline-none",$1="flex min-h-0 flex-col overflow-hidden rounded-mid text-left",W1="gloss-panel gloss-deep flex min-h-0 w-full flex-col rounded-mid text-left text-foreground",X1="gloss-content",Y1="shrink-0",K1="shrink-0 [&_svg]:block",q1="shrink-0",Z1="contents",Q1="font-w-mid",J1="min-h-0 flex-1 overflow-y-auto",eB="flex shrink-0 flex-wrap items-center justify-end gap-base";function tB(t){return R(uC(t,"default"),"shadow-token-large")}function nB(t,e){return xx(t,e)}function rB(){return Cx()}function oB(t,e){return st(J1,t,"text-left",e)}function Sx(t){return st(F1,t)}function sB({variant:t,sizePreset:e,className:n,slotClass:r}){const o=t==="gloss";return st(U1,e.panelMax,!o&&$1,!o&&e.maxHeight,!o&&tB(t),n,r)}function iB(t,e){return st(W1,t,e)}function aB(t){return dC(t)}function vx(t){return z1[t]}function Id({className:t,...e}){const n=on();return d.jsx("div",{className:Sx(st(n.content,t)),...e})}Id.displayName="AlertDialogContent";const wd=l.forwardRef(function({className:e,onClick:n,...r},o){const{onOpenChange:s}=Fn(),i=Ed(),a=on();return d.jsx(Fo,{ref:o,variant:"secondary",className:st(Y1,i&&eC(i.gridSlots),a.close,e),onClick:c=>{n==null||n(c),c.defaultPrevented||s(!1)},...r})});wd.displayName="AlertDialogClose";function Rd({className:t,children:e,...n}){const{variant:r,status:o,sizePreset:s,gridSlots:i,headerIcon:a}=d1("AlertDialog.Indicator"),c=on();if(e===null)return null;const u=px(r,o),f=e!==void 0?e:a!==void 0?a:mx(r,o)&&u!==null?d.jsx(u,{"aria-hidden":!0,className:s.iconClass}):null;return f===null?null:d.jsx("span",{className:st(K1,aB(o),Nr(i),c.indicator,t),...n,children:f})}Rd.displayName="AlertDialogIndicator";function yx({icon:t,showClose:e=!0,className:n,children:r,...o}){const{variant:s,status:i,sizePreset:a}=Fn(),c=on(),u=dx(r),f=fx(r),m=l.useMemo(()=>b1(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(u1,{value:p,children:d.jsxs("div",{className:st(q1,a.headerPadding,Go(m,a.headerGap),c.header,n),...o,children:[b?d.jsx(Rd,{}):null,r,g?d.jsx(wd,{}):null]})})}yx.displayName="AlertDialogHeader";const Ax=l.forwardRef(function({className:e,id:n,...r},o){const{titleId:s,sizePreset:i}=Fn(),a=Ed(),c=on();return d.jsx(ee,{ref:o,as:"h2",variant:i.titleVariant,id:n??s,className:st(Q1,a&&Ho(a.gridSlots),c.title,e),...r})});Ax.displayName="AlertDialogTitle";function Tx({className:t,id:e,...n}){const{descriptionId:r,setHasDescription:o,sizePreset:s}=Fn(),i=Ed(),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&&Ns(i.gridSlots),a.description,t),...n})}Tx.displayName="AlertDialogDescription";function Lx({className:t,...e}){const n=on();return d.jsx("div",{className:st(Z1,n.headingBlock,t),...e})}Lx.displayName="AlertDialogHeadingBlock";function Ex({className:t,children:e,...n}){const{sizePreset:r}=Fn(),o=on();return d.jsx("div",{className:oB(r.bodyPadding,st(o.body,t)),...n,children:d.jsx(ee,{variant:r.bodyVariant,as:"div",children:e})})}Ex.displayName="AlertDialogBody";function Ix({className:t,children:e,...n}){const{footerButtonSize:r,sizePreset:o}=Fn(),s=on(),i=l.useMemo(()=>hx(e,r),[e,r]);return d.jsx("div",{className:st(eB,o.footerPadding,s.footer,t),...n,children:i})}Ix.displayName="AlertDialogFooter";const wx=l.forwardRef(function({children:e,asChild:n,className:r,onClick:o,onPointerDown:s,...i},a){const{open:c,onOpenChange:u}=Fn(),f=on(),m=l.useRef(null),p=Is(),b=l.useCallback(C=>{m.current=C,ft(a,C)},[a]),g=l.useCallback(C=>{c||p.current||C.button!==0||(C.preventDefault(),Es({triggerRef:m,openingRef:p,setOpen:()=>u(!0)}))},[c,p,u]),h=l.useCallback(C=>{o==null||o(C),!C.defaultPrevented&&!c&&!p.current&&u(!0)},[o,c,p,u]);if(n&&l.isValidElement(e)){const C=l.Children.count(e)===1?e:null;if(C){const x=C;return l.cloneElement(x,{ref:(_=>{m.current=_}),className:st(f.trigger,x.props.className,r),onPointerDown:_=>{var v,y;g(_),(y=(v=x.props).onPointerDown)==null||y.call(v,_),s==null||s(_)},onClick:_=>{var v,y;(y=(v=x.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:C=>{s==null||s(C),g(C)},onClick:h,...i,children:e})});wx.displayName="AlertDialog.Trigger";function Rx({className:t,themeAnchor:e,children:n}){const{open:r,titleId:o,descriptionId:s,hasDescription:i,variant:a,sizePreset:c}=Fn(),u=C1({open:r,variant:a}),f=vu(r,e??null),m=Su(f),p=jo(f);return typeof document>"u"||!u.mounted?null:Pr.createPortal(d.jsx(lB,{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)}Rx.displayName="AlertDialog.Panel";function lB({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(V1,g.dialog),children:[d.jsx("div",{ref:f,className:nB(s,g.overlay),style:rB(),"aria-hidden":!0}),d.jsx("div",{ref:m,tabIndex:-1,className:sB({variant:n,sizePreset:r,className:e,slotClass:g.panel}),children:b?d.jsx("div",{ref:p,className:iB(r.maxHeight,g.glossPanel),children:d.jsx("div",{className:Sx(st(X1,g.glossContent)),children:t})}):d.jsx(Id,{children:t})})]})}function cB({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=ad(r),m=ld(n),p=H1[o];return{contextValue:{open:t,titleId:s,descriptionId:i,hasDescription:a,setHasDescription:u,onOpenChange:e,variant:f,status:m,size:o,sizePreset:p,footerButtonSize:vx(o)}}}function Nx({open:t,onOpenChange:e,children:n,status:r,variant:o="default",size:s="base",classNames:i}){const a=cB({open:t,onOpenChange:e,status:r,variant:o,size:s});return d.jsx(c1,{classNames:i,children:d.jsx(l1,{value:a.contextValue,children:n})})}Nx.displayName="AlertDialog";const uB=Object.assign(Nx,{Trigger:wx,Panel:Rx,Content:Id,Header:yx,Indicator:Rd,HeadingBlock:Lx,Title:Ax,Description:Tx,Body:Ex,Footer:Ix,Close:wd}),Dx=l.createContext(null),Hl=l.createContext({});function dB({value:t,children:e}){return d.jsx(Dx.Provider,{value:t,children:e})}function fB({classNames:t,children:e}){const n=l.useContext(Hl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Hl.Provider,{value:r,children:e})}function Gn(){const t=l.useContext(Dx);if(!t)throw new Error("Dialog.* components must be used inside <Dialog>.");return t}function Hn(){return l.useContext(Hl)}const mB="Close";function pB({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 C={...ve(),overwrite:"auto"},x=cb({overlay:p,panel:b,vars:C,onComplete:h});return()=>{g=!0,x.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()){yu(b,g,{focusPanel:!0});return}lb({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 Nd({className:t,...e}){const n=Hn();return d.jsx("div",{className:_x(gt(n.content,t)),...e})}Nd.displayName="DialogContent";function Ox({className:t,...e}){const{sizePreset:n}=Gn(),r=Hn();return d.jsx("div",{className:gt(w1,n.headerGap,n.headerPadding,r.header,t),...e})}Ox.displayName="DialogHeader";const Px=l.forwardRef(function({className:e,id:n,...r},o){const{titleId:s,sizePreset:i}=Gn(),a=Hn();return d.jsx(ee,{ref:o,as:"h2",variant:i.titleVariant,id:n??s,className:gt(N1,a.title,e),...r})});Px.displayName="DialogTitle";function kx({className:t,id:e,...n}){const{descriptionId:r,setHasDescription:o,sizePreset:s}=Gn(),i=Hn();return l.useLayoutEffect(()=>(o(!0),()=>o(!1)),[o]),d.jsx(ee,{as:"p",variant:s.descVariant,id:e??r,className:gt(s.descClassName,i.description,t),...n})}kx.displayName="DialogDescription";function Bx({className:t,...e}){const{sizePreset:n}=Gn(),r=Hn();return d.jsx("div",{className:gt(R1,n.headingBlockGap,r.headingBlock,t),...e})}Bx.displayName="DialogHeadingBlock";const jx=l.forwardRef(function({className:e,onClick:n,"aria-label":r=mB,...o},s){const{onOpenChange:i}=Gn(),a=Hn();return d.jsx(Fo,{ref:s,variant:"secondary","aria-label":r,className:gt(P1,a.close,e),onClick:c=>{n==null||n(c),c.defaultPrevented||i(!1)},...o})});jx.displayName="DialogClose";function Mx({className:t,...e}){const{sizePreset:n}=Gn(),r=Hn();return d.jsx("div",{className:j1(n.bodyPadding,gt(r.body,t)),...e})}Mx.displayName="DialogBody";function Fx({className:t,children:e,...n}){const{footerButtonSize:r,sizePreset:o}=Gn(),s=Hn(),i=l.useMemo(()=>gx(e,r),[e,r]);return d.jsx("div",{className:gt(O1,o.footerPadding,s.footer,t),...n,children:i})}Fx.displayName="DialogFooter";const Gx=l.forwardRef(function({children:e,asChild:n,onClick:r,onPointerDown:o,...s},i){const{open:a,onOpenChange:c}=Gn(),u=l.useRef(null),f=Is(),m=l.useCallback(g=>{u.current=g,ft(i,g)},[i]),p=l.useCallback(g=>{a||f.current||g.button!==0||(g.preventDefault(),Es({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:(C=>{u.current=C}),onPointerDown:C=>{var x,_;p(C),(_=(x=h.props).onPointerDown)==null||_.call(x,C),o==null||o(C)},onClick:C=>{var x,_;(_=(x=h.props).onClick)==null||_.call(x,C),b(C)},"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})});Gx.displayName="Dialog.Trigger";function Hx({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}=Gn(),m=pB({open:s,onOpenChange:i,variant:t,dismissOnBackdrop:e}),p=vu(s,r??null),b=Su(p),g=jo(p);return typeof document>"u"||!m.mounted?null:Pr.createPortal(d.jsx(hB,{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)}Hx.displayName="Dialog.Panel";function hB({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",C=Hn();return d.jsxs("dialog",{...o,ref:u,onClose:g,"aria-labelledby":i,"aria-describedby":c?a:void 0,className:gt(y1,C.dialog),children:[d.jsx("div",{ref:f,className:xx(s,C.overlay),style:Cx(),"aria-hidden":!0,onMouseDown:b}),d.jsx("div",{ref:m,tabIndex:-1,className:k1({variant:n,sizePreset:r,className:e,slotClass:C.panel}),children:h?d.jsx("div",{ref:p,className:B1(r.maxHeight,C.glossPanel),children:d.jsx("div",{className:_x(gt(bx,C.glossContent),!0),children:t})}):d.jsx(Nd,{children:t})})]})}function gB({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=S1[n];return{contextValue:{open:t,titleId:r,descriptionId:o,hasDescription:s,setHasDescription:a,onOpenChange:e,size:n,sizePreset:c,footerButtonSize:M1(n)}}}function zx({open:t,onOpenChange:e,size:n="base",children:r,classNames:o}){const s=gB({open:t,onOpenChange:e,size:n});return d.jsx(dB,{value:s.contextValue,children:d.jsx(fB,{classNames:o,children:r})})}zx.displayName="Dialog";const bB=Object.assign(zx,{Trigger:Gx,Panel:Hx,Content:Nd,Header:Ox,HeadingBlock:Bx,Title:Px,Description:kx,Close:jx,Body:Mx,Footer:Fx}),Dd=l.createContext(null),Vx=l.createContext(null),zl=l.createContext({});function Ux({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 CB({value:t,children:e}){return d.jsx(Vx.Provider,{value:t,children:e})}function $x(){const t=l.useContext(Dd);if(!t)throw new Error("Components Toast must be used inside <Toast.Provider>.");return t}function Bs(){const t=l.useContext(Vx);if(!t)throw new Error("Toast.* must be inside <Toast>.");return t}function fr(){return l.useContext(zl)}const xB={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}},_B={primary:"text-primary",foreground:"text-foreground",muted:"text-muted",secondary:"text-primary",danger:"text-danger",success:"text-success",info:"text-info",warning:"text-warning"},SB="inline-flex shrink-0 items-center justify-center",vB="box-border inline-block rounded-full border-current border-t-transparent animate-spin motion-reduce:animate-none",yB="flex items-end",AB="block shrink-0 rounded-full origin-bottom",ga={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}},TB={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 LB(t,e,n){const r=xB[t];return R(vB,r.icon,r.border,_B[e],n)}function EB(t,e){const n=ga[t];return R(yB,n.gapClass,e)}function IB(t,e,n){return R(AB,ga[t].dotClass,TB[e],n)}function wB(t){const{jumpPx:e,dotSizeVar:n}=ga[t];return{height:`calc(${n} + ${e}px)`}}const RB=3;function NB(t,e){const{jumpPx:n,scalePeak:r}=ga[e],{staggerSec:o,halfCycleSec:s,easeUp:i,easeDown:a,enabled:c}=NL();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 DB(t,e){const n=l.useSyncExternalStore(TL,Rm,Rm);l.useLayoutEffect(()=>{const r=t.current;if(!r)return;const o=Array.from(r.querySelectorAll("[data-loading-dot]")).slice(0,RB);if(o.length===0)return;const s=de();let i=[];return s||(i=NB(o,e)),()=>{for(const a of i)a.kill();for(const a of o)V(a)}},[e,t,n])}const OB=[0,1,2];function Wx({size:t,color:e,className:n}){return d.jsx("span",{"aria-hidden":!0,className:LB(t,e,n)})}function Xx({size:t,color:e,className:n}){const r=l.useRef(null);return DB(r,t),d.jsx("span",{ref:r,className:R(EB(t),n),style:wB(t),"aria-hidden":!0,children:OB.map(o=>d.jsx("span",{"data-loading-dot":!0,className:IB(t,e)},o))})}Xx.displayName="LoadingDots";Wx.displayName="LoadingSpinner";const Od=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(SB,s),...i,children:e==="dots"?d.jsx(Xx,{size:n,color:r}):d.jsx(Wx,{size:n,color:r})})});Od.displayName="Loading";const PB="Close";function kB(t){return t==="danger"||t==="warning"?"alert":"status"}function BB(t){return`Notifications (${t})`}function Tt(...t){return R(...t)}const Vl=8,jB=.04,hi=3,Ul=4e3,si=24;function MB(){return`toast-${Math.random().toString(36).slice(2)}`}function js(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 FB(t){return js(t,e=>e==="ToastTitle")}function GB(t){return js(t,e=>e==="ToastDescription")}function HB(t){return js(t,e=>e==="ToastIndicator")}function zB(t){return js(t,e=>e==="ToastActionButton")}function VB(t){return js(t,e=>e==="ToastCloseButton")}function UB(t,e,n,r){return n?r:e?!0:t!=="default"}function $B(t,e,n,r,o,s,i,a){const c=e!=null||FB(a),u=n!=null||GB(a);return{hasIndicator:UB(t,s,i,HB(a)),hasTitle:c,hasDescription:u,hasAction:i?zB(a):r!=null,hasClose:i?VB(a):o!=null}}const WB={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"},XB={default:"text-primary",success:"text-success",danger:"text-danger",info:"text-info",warning:"text-warning"},Yx="contents",YB="font-w-mid",KB="text-muted",qB="-mx-xsmall",ZB="inline-flex shrink-0 items-center justify-center";function QB(t,e,n){return Tt(ZB,e,XB[t],n)}const JB={default:"primary",success:"success",danger:"danger",info:"info",warning:"warning"},ej="fixed z-[300] pointer-events-none",tj="relative grid",nj="pointer-events-none absolute",rj={"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 oj(t){return rj[t]}function sj(t){return JB[t]}function ij({variant:t,status:e,size:n,gridSlots:r,slotClass:o,className:s}){const i=t==="gloss",a=On(n);return Tt(Go(r,a.gridGap),`w-full ${a.shellPadding}`,i?R("gloss-panel gloss-deep border-0 text-foreground",nn):R("shadow-token-mid",WB[e]),o,s)}function aj({placement:t,slotClass:e}){return Tt(ej,oj(t),e)}function lj(t){return Tt(tj,t)}function cj(t){return Tt(nj,t)}function Pd({className:t,children:e,...n}){const{status:r,isLoading:o,gridSlots:s,sizePreset:i}=Bs(),a=fr(),c=QB(r,i.iconSvgClass);if(e!==void 0)return d.jsx("span",{className:Tt(c,Nr(s),a.indicator,t),...n,children:e});if(o)return d.jsx("span",{className:Tt(c,Nr(s),a.indicator,t),...n,children:d.jsx(Od,{size:i.loadingSize,color:sj(r)})});if(r==="default")return null;const u=id[r];return u?d.jsx("span",{className:Tt(c,Nr(s),a.indicator,t),...n,children:d.jsx(u,{"aria-hidden":!0})}):null}Pd.displayName="ToastIndicator";function Kx({className:t,...e}){const n=fr();return d.jsx("div",{className:Tt(Yx,n.message,t),...e})}Kx.displayName="ToastMessage";function qx({className:t,...e}){const n=fr();return d.jsx("div",{className:Tt(Yx,n.content,t),...e})}qx.displayName="ToastContent";function kd({className:t,id:e,...n}){const{titleId:r,gridSlots:o,sizePreset:s}=Bs(),i=fr();return d.jsx(ee,{as:"div",variant:s.titleVariant,id:e??r,className:Tt(YB,Ho(o),i.title,t),...n})}kd.displayName="ToastTitle";function Bd({className:t,id:e,...n}){const{descriptionId:r,gridSlots:o,sizePreset:s}=Bs(),i=fr();return d.jsx(ee,{as:"div",variant:s.descVariant,id:e??r,className:Tt(KB,Ns(o),i.description,t),...n})}Bd.displayName="ToastDescription";function jd({className:t,...e}){const{gridSlots:n}=Bs(),r=fr();return d.jsx("div",{className:Tt(Ds(n),r.action,t),...e})}jd.displayName="ToastActionButton";const Md=l.forwardRef(function({className:e,onClick:n,"aria-label":r=PB,...o},s){const{dismiss:i,gridSlots:a}=Bs(),c=fr();return d.jsx(Fo,{ref:s,size:"small",variant:"ghost","aria-label":r,className:Tt(qB,eC(a),c.close,e),onClick:u=>{n==null||n(u),u.defaultPrevented||i()},...o})});Md.displayName="ToastCloseButton";function uj({gridSlots:t,title:e,description:n,action:r,onClose:o}){return d.jsxs(d.Fragment,{children:[t.hasIndicator?d.jsx(Pd,{}):null,e!=null?d.jsx(kd,{children:e}):null,n!=null?d.jsx(Bd,{children:n}):null,r!=null?d.jsx(jd,{children:r}):null,o!=null?d.jsx(Md,{}):null]})}function dj({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=sd(e),b=On(p),g=l.useMemo(()=>$B(t,n,r,o,i,s,m,a),[o,a,r,m,s,i,t,n]),h=kB(t),C=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:C,gridSlots:g}}function fj({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,hi-1),g=1-b*jB,h=r?b*Vl:-b*Vl,C=e>=hi?0:1;l.useLayoutEffect(()=>{const y=m.current;if(!y)return;const S=de()||!Se().enableToastStack,T=!p.current;if(p.current=!0,V(y),S){X.set(y,{y:h,scale:g,autoAlpha:C});return}T&&t.variant!=="gloss"?X.fromTo(y,{opacity:0},{opacity:C,...ve(),overwrite:"auto"}):X.to(y,{y:h,scale:g,autoAlpha:C,...ve(),overwrite:"auto"})},[t.variant,h,C,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()){ia(y);return}const S=r?-si:si;aa({surface:y,vars:{...ve(),overwrite:"auto"},from:{y:S,scale:sa},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?-si:si;V(y),la({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 x=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:hi+1-e,pointerEvents:e===0?"auto":"none"},children:d.jsx("div",{ref:u,children:d.jsx(Ux,{classNames:v,children:d.jsx(Fd,{ref:f,status:t.status,variant:t.variant,size:t.size,title:t.title,description:t.description,action:t.action,isLoading:t.isLoading,onClose:x})})})})}function mj({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,hi-1)*Vl,C=g+h,x=C>0?C:p.current;return C>0&&(p.current=C),l.useLayoutEffect(()=>{const _=f.current;if(!_||x<=0)return;const v=de()||!Se().enableToastStack;if(V(_),v){_.style.height=`${x}px`;return}X.to(_,{height:x,...ve(),overwrite:"auto"})},[x]),l.useLayoutEffect(()=>{const _=m.current;_&&X.set(_,{opacity:0})},[]),l.useLayoutEffect(()=>{var S;const _=m.current;if(!_)return;const v=de(),y=e.length===1&&n.has(((S=e[0])==null?void 0:S.id)??"");if(V(_),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":BB(t),className:aj({placement:t,slotClass:s==null?void 0:s.viewport}),style:{width:fP(e,i)},children:[d.jsx("div",{ref:m,"aria-hidden":!0,className:cj(s==null?void 0:s.scrim),style:{[a?"top":"bottom"]:`calc(-1 * ${En(Ln.offsetY)})`,left:`calc(-1 * ${En(Ln.insetX)})`,right:`calc(-1 * ${En(Ln.insetX)})`,height:En(Ln.height),background:En(a?Ln.gradientTop:Ln.gradientBottom),maskImage:En(Ln.mask),WebkitMaskImage:En(Ln.mask)}}),d.jsx("div",{ref:f,className:lj(s==null?void 0:s.stack),style:{height:x||void 0,alignItems:a?"start":"end"},children:e.map((_,v)=>d.jsx(fj,{entry:_,reverseIdx:v,total:e.length,isTop:a,isDismissing:n.has(_.id),onDismiss:r,onRemoveFinal:o,onHeightChange:b,providerClassNames:s},_.id))})]})}function pj({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(C=>{const x=C.id??MB(),_={id:x,status:C.status??"default",variant:C.variant??e,size:C.size??n,title:C.title,description:C.description,action:C.action,timeout:C.timeout??Ul,placement:C.placement??t,createdAt:++c.current,isLoading:C.isLoading??!1,classNames:{...r,...C.classNames}};return s(v=>[...v,_]),x},[t,n,e,r]),f=l.useCallback((C,x)=>{s(_=>_.map(v=>v.id===C?{...v,...x}:v))},[]),m=l.useCallback(C=>{a(x=>new Set([...x,C]))},[]),p=l.useCallback(C=>{s(x=>x.filter(_=>_.id!==C)),a(x=>{const _=new Set(x);return _.delete(C),_})},[]),b=l.useMemo(()=>[...new Set(o.map(C=>C.placement))],[o]),g=l.useMemo(()=>({add:u,update:f,dismiss:m}),[u,m,f]),h=l.useCallback(C=>o.filter(x=>x.placement===C).toSorted((x,_)=>_.createdAt-x.createdAt),[o]);return{toasts:o,dismissingIds:i,placements:b,ctx:g,sortedByPlacement:h,dismiss:m,removeFinal:p,providerClassNames:r,defaultSize:n}}function hj({children:t,defaultPlacement:e="bottom-center",defaultVariant:n="default",defaultSize:r="base",classNames:o}){const s=pj({defaultPlacement:e,defaultVariant:n,defaultSize:r,classNames:o});return d.jsxs(Dd.Provider,{value:s.ctx,children:[t,typeof document<"u"&&s.placements.map(i=>Pr.createPortal(d.jsx(mj,{placement:i,sorted:s.sortedByPlacement(i),dismissingIds:s.dismissingIds,onDismiss:s.dismiss,onRemoveFinal:s.removeFinal,classNames:o,defaultSize:s.defaultSize}),document.body,i))]})}const Fd=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 C=dj({status:e,size:r,title:o,description:s,action:i,isLoading:a,onClose:c,children:m}),x=n==="gloss",_=l.useRef(null),v=l.useMemo(()=>Mt(_,x),[x]),y=l.useCallback(L=>{v(L),_.current=L,typeof h=="function"?h(L):h&&(h.current=L)},[v,h]),S=No(_,x),T=fr();return d.jsx(CB,{value:C.itemCtx,children:d.jsx(Ux,{classNames:f,children:d.jsx("div",{ref:y,role:C.liveRole,"aria-labelledby":C.titleId,"aria-live":C.liveRole==="alert"?"assertive":"polite",className:ij({variant:n,status:e,size:C.size,gridSlots:C.gridSlots,slotClass:T.root,className:u}),onPointerOver:L=>{p==null||p(L),!L.defaultPrevented&&x&&S.onPointerOver(L)},onPointerOut:L=>{b==null||b(L),x&&S.onPointerOut(L)},...g,children:C.isCompound?m:d.jsx(uj,{gridSlots:C.gridSlots,title:o,description:s,action:i,onClose:c})})})})});Fd.displayName="ToastRoot";function gj(){const t=$x(),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??Ul})},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??Ul})}),a},[t]);return{toast:{show:e,success:n("success"),danger:n("danger"),info:n("info"),warning:n("warning"),promise:r,dismiss:t.dismiss}}}const bj=Object.assign(Fd,{Provider:hj,Message:Kx,Indicator:Pd,Content:qx,Title:kd,Description:Bd,ActionButton:jd,CloseButton:Md}),Zx=l.createContext(null),$l=l.createContext({});function Qx({value:t,children:e}){return d.jsx(Zx.Provider,{value:t,children:e})}function Cj({classNames:t,children:e}){const n=l.useContext($l),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx($l.Provider,{value:r,children:e})}function Uo(){const t=l.useContext(Zx);if(!t)throw new Error("Drawer.* components must be used inside <Drawer>.");return t}function sn(){return l.useContext($l)}const xj="Close";function _j(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 Sj(t){return t.displayName}function vj(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=Sj(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 yj(t,e){return e==="left"||e==="right"?t.offsetWidth:t.offsetHeight}function Jx(t,e){const n=yj(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 Aj(){return{x:0,y:0}}function Tj(t,e){return Jx(t,e)}function Lj(t){X.set(t,{xPercent:0,yPercent:0,x:0,y:0})}function Ej({overlay:t,panel:e,placement:n,vars:r}){V(t,e),Lj(e),X.fromTo(t,{opacity:0},{opacity:1,...r}),X.fromTo(e,Jx(e,n),{...Aj(),...r})}function Ij({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,{...Tj(e,n),...r},0),s}function wj({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,C=u.current;let x=!1;const _=()=>{x||i(!1)};if(m.current){m.current=!1,_();return}if(!h||!C||$t()){_();return}V(h,C);const v={...ve(),overwrite:"auto"},y=Ij({overlay:h,panel:C,placement:r,vars:v,onComplete:_});return()=>{x=!0,y.kill(),V(h,C)}},[t,s,r]),l.useLayoutEffect(()=>{if(!t)return;const h=a.current;h&&!h.open&&h.showModal();const C=c.current,x=u.current;if(!(!C||!x)){if($t()){yu(C,x);return}Ej({overlay:C,panel:x,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 Rj={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"},Nj={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"}},e_={left:"rounded-r-mid",right:"rounded-l-mid",bottom:"rounded-t-mid",top:"rounded-b-mid"},Dj={bottom:"pt-plus",top:"pb-plus",left:"pr-plus",right:"pl-plus"},Oj="flex min-h-0 flex-1 flex-col gap-mid text-left",Pj="px-mid pt-mid",kj="px-mid",Bj="px-mid pb-mid",jj="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",Mj="bg-[color-mix(in_oklab,var(--color-foreground)_14%,transparent)] backdrop-blur-[14px] backdrop-saturate-150 motion-reduce:backdrop-blur-none",Fj="bg-[color-mix(in_oklab,black_55%,transparent)]",Gj="absolute z-10 flex flex-col outline-none overflow-hidden",Hj="border-token bg-surface text-foreground shadow-token-large",zj="gloss-panel gloss-deep flex min-h-0 flex-1 flex-col text-foreground",Vj="gloss-content flex min-h-0 min-w-0 flex-1 flex-col",Uj="flex shrink-0 items-start gap-plus text-left",$j="flex min-w-0 flex-1 flex-col gap-xsmall text-left",Wj="min-w-0",Xj="text-muted",Yj="min-h-0 flex-1 overflow-y-auto",Kj="flex shrink-0 flex-wrap items-center justify-end gap-base",qj="shrink-0",Zj="flex touch-none select-none shrink-0 items-center justify-center cursor-grab active:cursor-grabbing box-content",Qj="h-1 w-10",Jj="h-10 w-1",eM="rounded-full bg-tertiary";function tM(t,e){const n=Nj[e];return t==="left"||t==="right"?n.horizontal:n.vertical}function nM(){return ab()}function rM({lightUi:t,dismissable:e,slotClass:n}){return at("absolute inset-0",t?Mj:Fj,e?"cursor-pointer":"cursor-default",n)}function oM({variant:t,placement:e,size:n,className:r,slotClass:o}){const s=n!=="full"?e_[e]:void 0;return at(Gj,t!=="gloss"&&Hj,Rj[e],tM(e,n),s,r,o)}function sM({placement:t,size:e,slotClass:n}){const r=e!=="full"?e_[t]:void 0;return at(zj,r,n)}function iM(t){return at(Oj,t)}function aM(t){return at(Vj,t)}function lM(t){return at(Yj,kj,t)}function cM({placement:t,slotClass:e,className:n}){return at(Zj,t==="left"||t==="right"?"self-stretch w-xsmall":"h-xsmall w-full",Dj[t],e,n)}function uM({placement:t,slotClass:e}){return at(eM,t==="left"||t==="right"?Jj:Qj,e)}const dM=.38,rp=.45;function fM(t,e){return t==="left"?-e.offsetWidth:t==="right"?e.offsetWidth:t==="top"?-e.offsetHeight:e.offsetHeight}function mM(t){return t==="left"||t==="right"?"x":"y"}function pM(t,e,n){X.set(t,{[e]:n})}function hM(t,e){return 1-Math.min(Math.abs(t)/Math.abs(e),1)}function gM(t,e,n,r,o,s){return{onPointerDown:l.useCallback(a=>{const c=t.current,u=e.current;if(!c||de())return;const f=mM(n),m=f==="x",p=m?a.clientX:a.clientY;let b=p,g=performance.now(),h=0;const C=fM(n,c),x=a.currentTarget;x.setPointerCapture(a.pointerId),V(c,u),c.style.willChange="transform";const _=y=>{if(y.pointerId!==a.pointerId)return;const S=m?y.clientX:y.clientY,T=S-p,L=performance.now(),A=L-g;A>0&&(h=(S-b)/A),b=S,g=L;const I=(n==="left"||n==="top"?-1:1)>0?Math.max(0,T):Math.min(0,T);pM(c,f,I),u&&X.set(u,{opacity:hM(I,C)})},v=y=>{if(y.pointerId!==a.pointerId)return;x.releasePointerCapture(a.pointerId),x.removeEventListener("pointermove",_),x.removeEventListener("pointerup",v),x.removeEventListener("pointercancel",v);const T=(m?y.clientX:y.clientY)-p,L=Math.abs(T)/Math.abs(C),A=n==="right"||n==="bottom"?h>rp:h<-rp,E={...ve(),overwrite:"auto"};if(L>=dM||A){V(c,u);const I=X.timeline({onComplete:()=>{c.style.willChange="",s&&(s.current=!0),r()}});I.fromTo(c,{[f]:T},{[f]:C,...E},0),u&&I.to(u,{opacity:0,...E},0)}else{V(c,u);const I=X.timeline({onComplete:()=>{c.style.willChange="",X.set(c,{clearProps:f}),u&&X.set(u,{opacity:1})}});I.fromTo(c,{[f]:T},{[f]:0,...E},0),u&&I.to(u,{opacity:1,...E},0)}};x.addEventListener("pointermove",_),x.addEventListener("pointerup",v),x.addEventListener("pointercancel",v)},[o,r,e,t,n,s])}}function t_(t){return null}t_.displayName="DrawerBackdrop";function ji({className:t,...e}){const n=sn();return d.jsx("div",{className:iM(at(n.content,t)),...e})}ji.displayName="DrawerContent";function bM({segment:t,variant:e}){const n=sn();return t.kind==="handle"?t.node:e==="gloss"?d.jsx("div",{className:aM(n.glossContent),children:d.jsx(ji,{children:t.children})}):d.jsx(ji,{children:t.children})}function n_({className:t,onPointerDown:e,...n}){const{onOpenChange:r,placement:o,overlayRef:s,panelRef:i,skipCloseAnimRef:a}=Uo(),c=sn(),{onPointerDown:u}=gM(i,s,o,()=>r(!1),!1,a);return d.jsx("div",{"aria-label":_j(o),className:cM({placement:o,slotClass:c.handle,className:t}),onPointerDown:f=>{e==null||e(f),u(f)},...n,children:d.jsx("span",{"aria-hidden":!0,className:uM({placement:o,slotClass:c.handleGrip})})})}n_.displayName="DrawerHandle";function r_({className:t,...e}){const n=sn();return d.jsx("div",{className:at(Uj,Pj,n.header,t),...e})}r_.displayName="DrawerHeader";function o_({className:t,...e}){const n=sn();return d.jsx("div",{className:at($j,n.headingBlock,t),...e})}o_.displayName="DrawerHeadingBlock";const s_=l.forwardRef(function({className:e,id:n,...r},o){const{titleId:s}=Uo(),i=sn();return d.jsx(ee,{ref:o,as:"h2",variant:"mid",id:n??s,className:at(Wj,i.title,e),...r})});s_.displayName="DrawerTitle";function i_({className:t,id:e,...n}){const{descriptionId:r,setHasDescription:o}=Uo(),s=sn();return l.useLayoutEffect(()=>(o(!0),()=>o(!1)),[o]),d.jsx(ee,{as:"p",variant:"base",id:e??r,className:at(Xj,s.description,t),...n})}i_.displayName="DrawerDescription";const a_=l.forwardRef(function({className:e,onClick:n,"aria-label":r=xj,...o},s){const{onOpenChange:i}=Uo(),a=sn();return d.jsx(Fo,{ref:s,variant:"secondary","aria-label":r,className:at(qj,a.close,e),onClick:c=>{n==null||n(c),c.defaultPrevented||i(!1)},...o})});a_.displayName="DrawerClose";function l_({className:t,...e}){const n=sn();return d.jsx("div",{className:lM(at(n.body,t)),...e})}l_.displayName="DrawerBody";function c_({className:t,...e}){const n=sn();return d.jsx("div",{className:at(Kj,Bj,n.footer,t),...e})}c_.displayName="DrawerFooter";const u_=l.forwardRef(function({children:e,asChild:n,onClick:r,onPointerDown:o,...s},i){const{open:a,onOpenChange:c}=Uo(),u=l.useRef(null),f=Is(),m=l.useCallback(g=>{u.current=g,ft(i,g)},[i]),p=l.useCallback(g=>{a||f.current||g.button!==0||(g.preventDefault(),Es({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:(C=>{u.current=C}),onPointerDown:C=>{var x,_;p(C),(_=(x=h.props).onPointerDown)==null||_.call(x,C),o==null||o(C)},onClick:C=>{var x,_;(_=(x=h.props).onClick)==null||_.call(x,C),b(C)},"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="Drawer.Trigger";function d_({size:t="default",variant:e="default",className:n,themeAnchor:r,children:o}){const s=Uo(),{open:i,onOpenChange:a,placement:c}=s,{backdropIsDismissable:u,panelSegments:f}=l.useMemo(()=>vj(o),[o]),m=wj({open:i,onOpenChange:a,variant:e,placement:c,backdropIsDismissable:u}),p=vu(i,r??null),b=Su(p),g=jo(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:Pr.createPortal(d.jsx(Qx,{value:h,children:d.jsx(CM,{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)}d_.displayName="Drawer.Panel";function CM({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:C}){const x=sn(),_=f.map((v,y)=>d.jsx(bM,{segment:v,variant:e},v.kind==="handle"?`handle-${y}`:`content-${y}`));return d.jsxs("dialog",{...o,ref:m,onClose:C,"aria-labelledby":i,"aria-describedby":c?a:void 0,className:at(jj,x.dialog),children:[d.jsx("div",{ref:p,className:rM({lightUi:s,dismissable:u,slotClass:x.overlay}),style:nM(),"aria-hidden":!0,onMouseDown:h}),d.jsx("div",{ref:b,tabIndex:-1,className:oM({variant:e,placement:n,size:r,className:t,slotClass:x.panel}),children:e==="gloss"?d.jsx("div",{ref:g,className:sM({placement:n,size:r,slotClass:x.glossPanel}),children:_}):_})]})}const xM="right";function _M({open:t,onOpenChange:e,placement:n=xM}){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=_M({open:t,onOpenChange:e,placement:n});return d.jsx(Qx,{value:s.contextValue,children:d.jsx(Cj,{classNames:o,children:r})})}f_.displayName="Drawer";const SM=Object.assign(f_,{Trigger:u_,Panel:d_,Backdrop:t_,Handle:n_,Content:ji,Header:r_,HeadingBlock:o_,Title:s_,Description:i_,Close:a_,Body:l_,Footer:c_});function vM({forwardedRef:t,onPointerEnter:e,onPointerLeave:n,onPointerDown:r}){const o=l.useRef(null),s=l.useCallback(u=>{o.current=u,ft(t,u)},[t]),{handlePointerEnter:i,handlePointerLeave:a,handlePointerDown:c}=cr({isDisabled:!1,enabled:!0,textMotionRef:o,hoverLift:!0,onPointerEnter:e,onPointerLeave:n,onPointerDown:r});return{setAnchorRef:s,handlePointerEnter:i,handlePointerLeave:a,handlePointerDown:c}}const Wl=l.createContext({});function yM({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 AM(){return l.useContext(Wl)}const TM=!0,LM=!0,m_="Link.Icon";function ba(...t){return R(...t)}function p_(t){if(l.isValidElement(t))return t.type.displayName}function h_(t){return l.Children.toArray(t).some(e=>{if(!l.isValidElement(e))return!1;if(p_(e)===m_)return!0;const n=e.props.children;return n!=null&&h_(n)})}function EM(t){const e=t.children!==void 0&&t.children!==null;return{node:e?t.children:"default",muted:!e}}function IM(t){const e=[];let n,r;return l.Children.forEach(t,o=>{if(l.isValidElement(o)&&p_(o)===m_){const s=o.props,i=EM(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 op(t,e,n,r){return t?{node:t.node==="default"?null:t.node,muted:t.muted}:{node:null,muted:!1}}function wM({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 RM({leftIcon:t,rightIcon:e,showDefaultIcon:n,defaultIconPosition:r,children:o}){var a,c;if(o!=null&&h_(o)){const u=IM(o),f=op(u.startIcon),m=op(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=wM({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 NM="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",DM="min-w-0 truncate font-w-mid",OM="underline decoration-current/70 underline-offset-[0.2em]",PM="text-muted group-hover/link:text-primary group-focus-visible/link:text-primary",kM="text-primary",BM="rotate-[-45deg]",jM={small:"small",base:"base",mid:"mid",large:"large"},g_={small:"icon-small",base:"icon-base",mid:"icon-mid",large:"icon-large"};function MM({slotClass:t,className:e}){return ba(NM,t,e)}function FM({underline:t,slotClass:e}){return ba(DM,t&&OM,e)}function GM({size:t,muted:e,slotClass:n}){return ba(bn,g_[t],"[&_svg]:size-full",e?PM:kM,n)}function HM(t){return ba(g_[t],BM)}function sp({size:t}){return d.jsx(Ie.IoArrowForward,{"aria-hidden":TM,className:HM(t)})}function ip({children:t,size:e,muted:n=!1,slotClass:r}){return d.jsx("span",{className:GM({size:e,muted:n,slotClass:r}),"aria-hidden":LM,children:t})}function zM({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,...C}){const x=AM(),_=s??(u?d.jsx(sp,{size:e}):null),v=i??(f?d.jsx(sp,{size:e}):null);return d.jsxs("a",{ref:p,href:t,className:MM({slotClass:x.anchor,className:m}),onPointerEnter:b,onPointerLeave:g,onPointerDown:h,...C,children:[_?d.jsx(ip,{size:e,muted:a,slotClass:x.iconStart,children:_}):null,d.jsx(ee,{as:"span",variant:r,inheritColor:!0,className:FM({underline:n,slotClass:x.text}),children:o}),v?d.jsx(ip,{size:e,muted:c,slotClass:x.iconEnd,children:v}):null]})}function Gd(t){return null}Gd.displayName="Link.Icon";function VM({size:t="base",underline:e=!1,leftIcon:n,rightIcon:r,showDefaultIcon:o=!1,defaultIconPosition:s="end",children:i}){const a=RM({leftIcon:n,rightIcon:r,showDefaultIcon:o,defaultIconPosition:s,children:i});return{size:t,underline:e,textVariant:jM[t],...a}}const Hd=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=VM({size:o,underline:s,leftIcon:i,rightIcon:a,showDefaultIcon:c,defaultIconPosition:u,children:n}),C=vM({forwardedRef:g,onPointerEnter:f,onPointerLeave:m,onPointerDown:p});return d.jsx(zM,{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:C.setAnchorRef,handlePointerEnter:C.handlePointerEnter,handlePointerLeave:C.handlePointerLeave,handlePointerDown:C.handlePointerDown,...b})});Hd.displayName="Link";const b_=l.forwardRef(function({classNames:e,...n},r){return d.jsx(yM,{classNames:e,children:d.jsx(Hd,{ref:r,...n})})});b_.displayName="Link";const UM=Object.assign(b_,{Icon:Gd,Root:Hd});function mn(...t){return R(...t)}const zd=l.createContext(null),Xl=l.createContext({});function $M({value:t,children:e}){return d.jsx(zd.Provider,{value:t,children:e})}function WM({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 C_(){const t=l.useContext(zd);if(!t)throw new Error("TextArea compound parts must be inside <TextArea>.");return t}function XM(){return l.useContext(zd)}function Ms(){return l.useContext(Xl)}const YM="Resize height";function KM({shellRef:t,blocked:e,variant:n,resizable:r,onPointerDown:o}){const s=n==="gloss",i=Mo(t,!e&&!s),a=Do(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 qM={default:"bg-surface",outline:"bg-transparent"},ZM={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},QM={small:"min-h-control-small",base:"min-h-control-base",mid:"min-h-control-mid",large:"min-h-control-large"},JM="flex flex-col items-stretch",eF=`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}`,tF="absolute bottom-[2px] right-0 block h-px w-[9px] origin-bottom-right rotate-[135deg] bg-muted",nF="absolute bottom-[6px] right-0 block h-px w-[6px] origin-bottom-right rotate-[135deg] bg-muted",rF="relative block size-3 shrink-0",oF="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",sF="cursor-not-allowed opacity-45",iF="cursor-ns-resize";function aF(t){return le[t].controlPad}function lF({variant:t,status:e,statusTinted:n}){return t==="gloss"?"gloss-control":n&&e!=="default"?mn(ZM[e],"border-token"):mn(t==="outline"?"bg-transparent border-token":mn(qM[t],"border-token"))}function cF({variant:t,status:e,blocked:n,size:r,shellSurface:o,glossShellHoverMotionClass:s,standardShellHoverMotionClass:i,slotClass:a,className:c}){const u=t==="gloss";return mn("relative w-full overflow-hidden rounded-base border-1",JM,u&&"relative",QM[r],o,Ur,$r,u?s:Vr(!n,e),!u&&i,n?"cursor-not-allowed opacity-55 shadow-token-base":"",a,c)}function uF({size:t,resizable:e,slotClass:n}){return mn(eF,e&&"pr-mid",aF(t),n,Et)}function dF({disabled:t,slotClass:e}){return mn(oF,t?sF:iF,e)}const fF=640;function mF(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=Tc(r);c.setPointerCapture(i.pointerId);const p=g=>{if(g.pointerId!==i.pointerId)return;const h=Math.min(fF,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 pF(){return d.jsxs("span",{"aria-hidden":!0,className:rF,children:[d.jsx("span",{className:tF}),d.jsx("span",{className:nF})]})}function hF({disabled:t,className:e,onPointerDown:n}){return d.jsx("button",{type:"button","data-textarea-resize-handle":!0,"aria-label":YM,disabled:t,onPointerDown:n,className:dF({disabled:t,slotClass:e}),children:d.jsx(pF,{})})}const Vd=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=XM(),C=Ms(),x=l.useId(),_=a??(h==null?void 0:h.textareaId)??x,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,T=(h==null?void 0:h.hintConnected)??!1,L=(h==null?void 0:h.errorConnected)??!1,A=h==null?void 0:h.hintId,E=h==null?void 0:h.errorId,I=p??Ft(T?A:void 0,L?E:void 0),w=l.useRef(null),N=l.useRef(null),O=l.useCallback(F=>{N.current=F,typeof g=="function"?g(F):g&&(g.current=F)},[g]),j=!!(c||u),G=lF({variant:e,status:v,statusTinted:v==="danger"||v==="success"||v==="warning"}),D=KM({shellRef:w,blocked:j,variant:e,resizable:s,onPointerDown:m}),{onResizePointerDown:P}=mF(w,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:cF({variant:e,status:v,blocked:j,size:y,shellSurface:G,glossShellHoverMotionClass:D.glossShellHoverMotionClass,standardShellHoverMotionClass:D.standardShellHoverMotionClass,slotClass:C.shell,className:f}),children:[d.jsx("textarea",{ref:O,id:_,rows:o,disabled:c,readOnly:u,placeholder:i,"aria-required":S||void 0,"aria-invalid":v==="danger"?!0:void 0,"aria-describedby":I,className:uF({size:y,resizable:s,slotClass:C.control}),...b}),s?d.jsx(hF,{disabled:j,className:C.resizeHandle,onPointerDown:P}):null]})});Vd.displayName="TextAreaControl";function x_({className:t,classNames:e,...n}){const r=Ms();return d.jsx(Ue,{className:t,classNames:{...e,root:mn(r.label,e==null?void 0:e.root)},...n})}x_.displayName="TextAreaLabel";function Ud({children:t,status:e,className:n,id:r,...o}){const s=C_(),i=Ms(),a=e??(s.status==="danger"||s.status==="default"?"default":s.status);return d.jsx(Xe,{id:r??s.hintId,status:a,className:mn(i.hint,n),...o,children:t})}Ud.displayName="TextAreaHint";function $d({children:t,className:e,id:n,...r}){const o=C_(),s=Ms();return d.jsx(Ze,{id:n??o.errorId,className:mn(s.error,e),...r,children:t})}$d.displayName="TextAreaError";function gF({label:t,hint:e,error:n,textareaId:r,labelId:o,size:s,status:i,controlProps:a}){const c=Ms();return d.jsxs(d.Fragment,{children:[t!=null?d.jsx(Ue,{id:o,classNames:{root:c.label},children:t}):null,d.jsx(Vd,{id:r,size:s,status:i,...a}),e!=null?d.jsx(Ud,{children:e}):null,n!=null?d.jsx($d,{children:n}):null]})}function bF({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&&Ae(t,"TextAreaHint"),h=r!=null||b&&Ae(t,"TextAreaError"),C=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]),x=l.useMemo(()=>({controlId:u,labelId:p,isRequired:s}),[s,p,u]);return{fieldCtx:C,fieldLabelCtx:x,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=bF({children:t,label:e,hint:n,error:r,id:i,isRequired:a,status:c,size:u}),p=m.isCompound?t:d.jsx(gF,{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($M,{value:m.fieldCtx,children:d.jsx(WM,{classNames:s,children:d.jsx(Xt.Provider,{value:m.fieldLabelCtx,children:d.jsx(hn,{className:mn(s==null?void 0:s.root,o),children:p})})})})}__.displayName="TextArea";const CF=Object.assign(__,{Label:x_,Control:Vd,Hint:Ud,Error:$d});function tn(...t){return R(...t)}function S_(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function xF(t){return new Map(t.map(e=>[e.value,e]))}function _F(t){return t.map(e=>e.value)}function SF({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 vF(t,e){for(const n of t){const r=e.get(n);if(r&&!r.disabled)return n}return null}function yF(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 AF(t,e){return t||(e==="danger"||e==="default"?"default":e)}const TF=[],v_=l.createContext(null);function LF({value:t,children:e}){return d.jsx(v_.Provider,{value:t,children:e})}function y_(){const t=l.useContext(v_);if(!t)throw new Error("Select compound-parts must be inside <Select>.");return t}const A_=l.createContext(null);function EF({value:t,children:e}){return d.jsx(A_.Provider,{value:t,children:e})}function Ca(){const t=l.useContext(A_);if(!t)throw new Error("Select.* must be inside <Select>.");return t}const Yl=l.createContext({});function IF({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 mr(){return l.useContext(Yl)}function wF(t){return`${t}-label`}function RF(t){return`${t}-listbox`}function NF(t){return{hintId:Yt(t),errorId:Kt(t),labelId:wF(t),listId:RF(t)}}function DF(t,e,n){return e&&n?`${t}-opt-${n}`:void 0}function OF(t){return t?"Close list":"Open list"}function T_({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?Ro(a,!0):We(a)).then(()=>{i.current=!1,!e&&(o(!0),s==null||s())})}function L_(){return l.useRef(!1)}const PF={default:"bg-surface",outline:"bg-transparent"},kF={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},BF={small:le.small.controlPad,base:le.base.controlPad,mid:le.mid.controlPad,large:le.large.controlPad},jF={small:le.small.chevronIcon,base:le.base.chevronIcon,mid:le.mid.chevronIcon,large:le.large.chevronIcon},MF="relative z-0 flex min-w-0 items-stretch border-1 text-left overflow-hidden motion-reduce:transition-none",FF="min-w-0 flex-1 truncate bg-transparent text-left text-foreground outline-none focus-ring",GF="text-muted",HF="flex shrink-0 origin-center items-center justify-center self-stretch px-small outline-none text-muted hover:text-foreground focus-ring",zF="pointer-events-none",VF="z-[110]",UF="gap-0 p-base",$F="overflow-y-auto overflow-x-hidden",WF="cursor-not-allowed opacity-55 shadow-token-base",XF="cursor-pointer";function YF({variant:t,status:e}){const n=e==="danger"||e==="success"||e==="warning";return t==="gloss"?"gloss-control":n?R(kF[e],"border-token"):R(t==="outline"?"bg-transparent border-token":R(PF[t],"border-token"))}function KF(t){return t?R(gn(t),Wr(t)):"rounded-base"}function qF({variant:t,status:e,disabled:n,groupSegment:r,shellHoverMotionClass:o,className:s,slotClass:i}){const a=t==="gloss";return tn(MF,(r==null?void 0:r.orientation)==="horizontal"?"flex-1":"w-full",KF(r),YF({variant:t,status:e}),Ur,$r,a?"":Vr(!n,e),o,n?WF:XF,s,i)}function ZF({size:t,muted:e,className:n,slotClass:r}){return tn(FF,BF[t],e&&GF,n,r)}function QF({disabled:t,className:e,slotClass:n}){return tn(HF,t&&zF,e,n)}const Wd=l.forwardRef(function({className:e,children:n,groupSegment:r,onPointerEnter:o,onPointerLeave:s,...i},a){const c=Po(),u=kn(),f=mr(),m=Ca(),{open:p,setOpen:b,disabled:g,variant:h,status:C,anchorRef:x,listId:_,valueRef:v,value:y,optionValues:S,setActiveValue:T,activeValue:L,isRequired:A,hintConnected:E,errorConnected:I,hintId:w,errorId:N}=m,O=DF(_,p,L),j=Ft(E?w:void 0,I?N:void 0),k=L_(),G=h==="gloss",D=c!=null&&c.segmented?void 0:r??(u==null?void 0:u.segment),P=Mo(x,!g&&!G&&D==null),F=Do(x,!g&&G&&D==null),B=l.useCallback(z=>{x.current=z,!g&&G&&F.bindShellRef(z)},[x,g,F,G]),$=l.useCallback(()=>{const z=S.indexOf(y);T(z>=0?y:S[0]??null),requestAnimationFrame(()=>{var H;return(H=v.current)==null?void 0:H.focus()})},[S,T,y,v]),W=l.useCallback(()=>{T_({anchorRef:x,disabled:g,isGloss:G,groupSegment:D,setOpen:b,onOpened:$,openingRef:k})},[x,g,$,D,G,b,k]),M=l.useCallback(z=>{g||p||z.button===0&&W()},[g,p,W]);return d.jsx("div",{ref:S_(a,B),role:"combobox","aria-expanded":p,"aria-controls":p?_:void 0,"aria-haspopup":"listbox","aria-activedescendant":p?O:void 0,"aria-required":A||void 0,"aria-invalid":C==="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):P.onShellPointerEnter(z))},onPointerLeave:z=>{s==null||s(z),G&&D==null?F.onShellPointerLeave(z):P.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:qF({variant:h,status:C,disabled:g,groupSegment:D,shellHoverMotionClass:G?F.shellHoverMotionClass:P.shellHoverMotionClass,className:e,slotClass:f.triggerGroup}),...i,children:n})});Wd.displayName="SelectTriggerGroup";const Xd=l.forwardRef(function({className:e,onKeyDown:n,onBlur:r,children:o,placeholder:s,...i},a){const c=mr(),u=Ca(),{selectId:f,open:m,setOpen:p,value:b,setValue:g,activeValue:h,setActiveValue:C,valueRef:x,anchorRef:_,options:v,optionValues:y,disabled:S,placeholder:T,size:L,variant:A,formValueRef:E,formOnBlur:I}=u,w=s??T,N=L_(),O=A==="gloss",j=l.useMemo(()=>xF(v),[v]),k=l.useMemo(()=>j.get(b),[j,b]),G=l.useCallback(()=>{const M=y.indexOf(b);C(M>=0?b:y[0]??null),requestAnimationFrame(()=>{var z;return(z=x.current)==null?void 0:z.focus()})},[y,C,b,x]),D=l.useCallback(()=>{T_({anchorRef:_,disabled:S,isGloss:O,setOpen:p,onOpened:G,openingRef:N})},[_,S,G,O,p,N]),P=l.useCallback(M=>{const z=SF({optionValues:y,activeValue:h,optionsByValue:j,delta:M});z&&C(z)},[h,y,j,C]),F=l.useCallback(M=>{var H;const z=j.get(M);!z||z.disabled||(g(M),p(!1),(H=x.current)==null||H.focus())},[j,p,g,x]),B=l.useCallback(M=>{if(n==null||n(M),!(M.defaultPrevented||S)){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(),P(1);return}if(M.key==="ArrowUp"){M.preventDefault(),P(-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=vF(y,j);z&&C(z);return}if(M.key==="End"){M.preventDefault();const z=yF(y,j);z&&C(z)}}},[h,P,S,n,m,D,y,j,F,C,p]),$=l.useCallback(M=>{r==null||r(M),I==null||I()},[I,r]),W=o??(k?k.label:w);return d.jsx("button",{ref:S_(a,x,E),id:f,type:"button",disabled:S,className:ZF({size:L,muted:!k,className:e,slotClass:c.value}),onKeyDown:B,onBlur:$,...i,children:W})});Xd.displayName="SelectValue";const Yd=l.forwardRef(function({className:e,onPointerDown:n,...r},o){const s=mr(),{open:i,setOpen:a,disabled:c,size:u,valueRef:f}=Ca(),m=l.useRef(null),p=zr(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 C;return(C=f.current)==null?void 0:C.focus()}))}},[c,n,i,a,f]);return d.jsx("button",{type:"button",ref:b,tabIndex:-1,disabled:c,"aria-label":OF(i),className:QF({disabled:c,className:e,slotClass:s.trigger}),onPointerDown:g,...r,children:d.jsx(Ie.IoChevronDown,{className:tn(jF[u],s.triggerIcon),"aria-hidden":!0})})});Yd.displayName="SelectTrigger";function Kd({children:t,className:e,offset:n=ws,...r}){const o=mr(),{open:s,setOpen:i,anchorRef:a,listId:c,labelId:u,labelConnected:f,placeholder:m,menuMaxHeight:p,options:b,optionValues:g,value:h,setValue:C,activeValue:x,setActiveValue:_,variant:v}=Ca(),y=l.useCallback(T=>{const L=Array.isArray(T)?T[0]??"":T;C(L),i(!1)},[i,C]),S=t??(g.length===0?d.jsx(wr.Empty,{}):g.map(T=>{const L=b.find(A=>A.value===T);return d.jsx(wr.Item,{value:T,disabled:L.disabled,label:L.label,hint:L.hint,icon:L.icon},T)}));return d.jsx(Pt,{open:s,onOpenChange:i,side:"bottom",anchorRef:a,variant:v==="gloss"?"gloss":"default",children:d.jsx(Pt.Content,{matchAnchorWidth:!0,unstyled:!0,contentRole:void 0,offset:n,className:tn(VF,o.popover,e),...r,children:d.jsx(Pt.Body,{className:tn(UF,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:x,onActiveValueChange:_,selectionIndicator:!0,className:tn($F,o.listBox),style:{maxHeight:p},children:S})})})})}Kd.displayName="SelectPopover";function E_({className:t,classNames:e,...n}){const r=mr();return d.jsx(Ue,{className:t,classNames:{...e,root:tn(r.label,e==null?void 0:e.root)},...n})}E_.displayName="SelectLabel";function qd({children:t,status:e,className:n,id:r,...o}){const s=y_(),i=mr(),a=AF(e,s.status);return d.jsx(Xe,{id:r??s.hintId,status:a,className:tn(i.hint,n),...o,children:t})}qd.displayName="SelectHint";function Zd({children:t,className:e,id:n,...r}){const o=y_(),s=mr();return d.jsx(Ze,{id:n??o.errorId,className:tn(s.error,e),...r,children:t??o.errorMessage})}Zd.displayName="Select.Error";function JF({label:t,hint:e,error:n,labelId:r}){const o=mr();return d.jsxs(d.Fragment,{children:[t!=null?d.jsx(Ue,{id:r,classNames:{root:o.label},children:t}):null,d.jsxs(Wd,{children:[d.jsx(Xd,{}),d.jsx(Yd,{})]}),d.jsx(Kd,{}),e!=null?d.jsx(qd,{children:e}):null,n!=null?d.jsx(Zd,{children:n}):null]})}function eG({children:t,label:e,hint:n,error:r,id:o,name:s,isRequired:i=!1,status:a="default",size:c="base",options:u=TF,value:f,defaultValue:m,onValueChange:p,variant:b,disabled:g=!1,placeholder:h="Select a value",menuMaxHeight:C="min(24rem, 70vh)"}){const x=Lb({name:s,value:f,disabled:g}),_=x.bound,v=x.disabled??g,y=l.useId(),S=kn(),T=b??((S==null?void 0:S.variant)==="gloss"?"gloss":"default"),L=o??`select-${y}`,{hintId:A,errorId:E,labelId:I,listId:w}=NF(L),N=qt(t),O=e!=null||N&&Ae(t,"Label"),j=n!=null||N&&Ae(t,"SelectHint"),k=r!=null||N&&Ae(t,"SelectError"),G=f!==void 0||_,[D,P]=l.useState(m??""),F=_?String(x.value??""):G?f??"":D,B=l.useCallback(me=>{G||P(me),p==null||p(me),_&&x.setValue(me)},[_,x,G,p]),[$,W]=l.useState(!1),[M,z]=l.useState(null),H=l.useRef(null),oe=l.useRef(null),pe=l.useMemo(()=>_F(u),[u]);l.useEffect(()=>{var me;!$||!M||(me=document.getElementById(`${w}-opt-${M}`))==null||me.scrollIntoView({block:"nearest"})},[M,w,$]);const ce=l.useMemo(()=>({selectId:L,hintId:A,errorId:E,labelId:I,labelConnected:O,hintConnected:j,errorConnected:k,isRequired:i,status:a,size:c,errorMessage:r}),[L,r,E,k,j,O,A,i,I,c,a]),Y=l.useMemo(()=>({...ce,open:$,setOpen:W,value:F,setValue:B,listId:w,activeValue:M,setActiveValue:z,anchorRef:H,valueRef:oe,variant:T,disabled:v,placeholder:h,menuMaxHeight:C,options:u,optionValues:pe,formValueRef:_?x.ref:void 0,formOnBlur:_?x.onBlur:void 0}),[M,v,ce,_,x,w,C,$,pe,u,h,B,F,T]),ne=l.useMemo(()=>({controlId:L,labelId:I,isRequired:i}),[L,i,I]);return{isCompound:N,label:e,hint:n,error:r,children:t,fieldCtx:ce,selectCtx:Y,fieldLabelCtx:ne}}function I_({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:C,menuMaxHeight:x,name:_,...v}){const y=xn(),S=typeof _=="string"?_:void 0,T=S?y==null?void 0:y.getError(S):void 0,L=r??T,A=c==="default"&&T?"danger":c,E=u??(y==null?void 0:y.size)??"base",I=eG({children:t,label:e,hint:n,error:L,id:i,name:_,isRequired:a,status:A,size:E,options:f,value:m,defaultValue:p,onValueChange:b,variant:g,disabled:h,placeholder:C,menuMaxHeight:x});return d.jsx(LF,{value:I.fieldCtx,children:d.jsx(EF,{value:I.selectCtx,children:d.jsx(IF,{classNames:s,children:d.jsx(Xt.Provider,{value:I.fieldLabelCtx,children:d.jsx(hn,{className:tn(o,s==null?void 0:s.root),...v,children:I.isCompound?t:d.jsx(JF,{label:I.label,hint:I.hint,error:I.error,labelId:I.fieldCtx.labelId})})})})})})}I_.displayName="Select";const tG=Object.assign(I_,{Label:E_,TriggerGroup:Wd,Value:Xd,Trigger:Yd,Popover:Kd,Hint:qd,Error:Zd});function Ve(...t){return R(...t)}function nG(t){return t==="default"?"base":t}function rG({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 oG(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 sG(t){return!/\bflex-col\b/.test(t??"")}function iG(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 w_=l.createContext(null),Kl=l.createContext({});function ap({value:t,children:e}){return d.jsx(w_.Provider,{value:t,children:e})}function lp({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 Kr(){const t=l.useContext(w_);if(!t)throw new Error("Checkbox.* parts must be used inside <Checkbox>.");return t}function qr(){return l.useContext(Kl)}function aG(){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 lG({isDisabled:t,enableTextMotion:e,textMotionRef:n,onPointerDown:r}){return cr({isDisabled:t,enabled:e,textMotionRef:n,onPointerDown:r})}const Fs={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"}},cG="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",dG="relative inline-flex shrink-0 items-center justify-center",fG="relative inline-flex items-center justify-center",mG="min-w-0",pG="cursor-pointer",hG="inline-flex flex-wrap items-center gap-x-xsmall gap-y-0 font-w-mid",gG="min-w-0",bG="origin-center will-change-transform",R_="text-muted",N_="text-danger",CG="text-danger",D_="text-muted",O_="text-muted",xG="origin-center will-change-transform",_G="min-w-0 font-w-mid",SG="relative cursor-pointer select-none rounded-small text-left",vG="cursor-not-allowed",yG="has-[:focus-visible]:outline has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-primary",AG="m-0 min-w-0 border-0 p-0",TG="contents";function LG(){return ta()}function EG(t,e,n){return R(SG,mu(t,e),yG,n)}function P_(){return na()}function Mi(t){return ra(t)}function k_(t){return pu(t)}const Qd=l.forwardRef(function({className:e,children:n,...r},o){const s=Kr(),i=qr(),a=aG();return d.jsx("span",{ref:o,className:Ve(dG,LG(),i.control,e),...r,children:d.jsxs("span",{ref:a,className:Ve(fG,i.controlTrack),children:[d.jsx("input",{ref:s.inputProps.inputRef,id:s.inputId,type:"checkbox",className:s.isCompound?Ve(uG,i.input):Ve(cG,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(Jd,{})]})})});Qd.displayName="CheckboxControl";function Jd({children:t,className:e,classNames:n,...r}){const o=Kr(),s=qr();return d.jsx(jt,{variant:nG(o.variant),size:o.size,selected:o.mergedChecked,icon:o.checkIcon??void 0,check:!0,classNames:rG({slotClassNames:s,classNames:n,className:e}),...r,children:t})}Jd.displayName="CheckboxIndicator";const B_=l.forwardRef(function({className:e,children:n,...r},o){const s=Kr(),i=qr(),a=Ve(TG,s.isCompound&&mG,i.content,e);return s.isCompound&&!oG(n)?d.jsx("label",{ref:o,htmlFor:s.inputId,id:s.labelId,className:Ve(a,!s.isDisabled&&pG),...r,children:n}):d.jsx("div",{ref:o,className:a,...r,children:n})});B_.displayName="CheckboxContent";function j_({children:t,className:e,isRequired:n,id:r,...o}){const s=Kr(),i=qr(),a=ou(),c=n??(a==null?void 0:a.isRequired)??!1,u=Fs[s.size];return d.jsxs("span",{id:r,ref:f=>{s.isCompound&&s.useInlineCompoundMotion&&(s.textMotionRef.current=f)},className:Ve(hG,s.isCompound&&P_(),s.isCompound&&(s.hasCompoundHint||s.hasCompoundError)&&gG,s.isCompound&&s.useInlineCompoundMotion&&bG,i.label,e),...o,children:[d.jsx(ee,{as:"span",variant:u.title,inheritColor:!0,className:Ve(s.isDisabled&&R_,!s.isDisabled&&s.danger&&N_,i.labelText),children:t}),c?d.jsx("span",{className:Ve(CG,i.requiredMark),"aria-hidden":!0,children:"*"}):null]})}j_.displayName="CheckboxLabel";function M_({children:t,className:e,variant:n,...r}){const o=Kr(),s=qr();return d.jsx(Xe,{as:"span",id:o.hintId,variant:n??Fs[o.size].desc,className:Ve(o.isCompound&&Mi(2),o.isDisabled&&D_,s.hint,e),...r,children:t})}M_.displayName="CheckboxHint";function F_({children:t,className:e,...n}){const r=Kr(),o=qr();return d.jsx(Ze,{as:"span",id:r.errorId,variant:Fs[r.size].desc,className:Ve(r.isCompound&&Mi(k_(r.hasCompoundHint)),r.isDisabled&&O_,o.error,e),...n,children:t})}F_.displayName="CheckboxError";function IG({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=Fs[a];return d.jsxs(d.Fragment,{children:[d.jsx(Qd,{}),d.jsx("span",{ref:i,className:Ve(P_(),!s&&xG,p.simpleLabelWrap,p.label),children:d.jsx(ee,{as:"span",variant:b.title,inheritColor:!0,className:Ve(_G,c&&R_,!c&&u&&N_,p.simpleLabelText,p.labelText),children:t})}),r?d.jsx(Xe,{as:"span",id:f,variant:b.desc,className:Ve(Mi(2),c&&D_,p.hint),children:e}):null,o?d.jsx(Ze,{as:"span",id:m,variant:b.desc,className:Ve(Mi(k_(r)),c&&O_,p.error),children:n}):null]})}function wG(t,e){return t??`checkbox-${e}`}function RG(t){return Yt(t)}function NG(t){return Kt(t)}function DG(t){return`${t}-label`}function OG({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:C,onFocus:x,"aria-label":_,label:v,hint:y,error:S},T,L){const A=ok(),E=f!=null?String(f):void 0,I=(A==null?void 0:A.selection)==="single"&&A!=null&&E!=null,w=Uu({name:u,value:s,onChange:a,onBlur:C,disabled:o,readOnly:h,type:"checkbox"}),N=w.bound&&A==null,O=l.useId(),j=wG(c,O),k=RG(j),G=NG(j),D=DG(j),P=s!==void 0,F=I?A.selectedValue===E:void 0,B=N?!!w.checked:void 0,$=P?s:B!==void 0?B:F!==void 0?F:void 0,[W,M,z]=iG($,I||P||N?void 0:i),H=!!(o??(A==null?void 0:A.disabled)??w.disabled),oe=qt(T),pe=oe&&Ae(T,"Label"),ce=oe?Ae(T,"CheckboxHint"):!1,Y=oe?Ae(T,"CheckboxError"):!1,ne=oe&&sG(L),me=!H&&(!oe||ne),re=Fs[t],Ce=y!=null,te=S!=null,U=oe?(ce?1:0)+(Y?1:0):(Ce?1:0)+(te?1:0),ae=l.useRef(null),he=l.useCallback(ue=>{const Be=ue.target.checked;if(!z&&!I&&!N&&M(Be),a==null||a(ue),!ue.defaultPrevented){if(I){A.selectSingleValue(E,Be);return}N&&w.onChange(ue)}},[N,w,A,I,z,a,E,M]),De=l.useCallback(ue=>{C==null||C(ue),N&&w.onBlur(ue)},[N,w,C]),Ye=m??(I&&A.isRequired?A.claimRequiredAnchor():void 0),q=l.useMemo(()=>({inputId:j,hintId:k,errorId:G,labelId:D,size:t,variant:e,mergedChecked:W,isDisabled:H,isControlled:z,isCompound:oe,hasCompoundHint:ce,hasCompoundError:Y,hintConnected:oe?ce:Ce,errorConnected:oe?Y:te,labelConnected:pe,accessibleName:_,useInlineCompoundMotion:ne,textMotionRef:ae,danger:r,checkIcon:n,onChange:he,inputProps:{name:w.name??u,value:f,defaultChecked:!z&&!N?i:void 0,required:Ye,form:p,autoFocus:b,tabIndex:g,readOnly:w.readOnly??h,onBlur:De,onFocus:x,inputRef:N?w.ref:void 0,ariaInvalid:N?w["aria-invalid"]:void 0}}),[_,n,r,i,p,w,N,b,G,De,he,k,Y,ce,pe,te,Ce,j,oe,z,H,D,W,u,x,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:Ce,hasError:te,label:v,hint:y,error:S,hintId:k,errorId:G,danger:r}}const G_=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:C,form:x,autoFocus:_,tabIndex:v,readOnly:y,onBlur:S,onFocus:T,className:L,classNames:A,onPointerDown:E,"aria-label":I,...w},N){const O=xn(),j=typeof g=="string"?g:void 0,k=j?O==null?void 0:O.getError(j):void 0,P=OG({size:s,variant:i,checkIcon:a,danger:c||!!k,disabled:u,checked:f,defaultChecked:m,onChange:p,id:b,name:g,value:h,required:C,form:x,autoFocus:_,tabIndex:v,readOnly:y,onBlur:S,onFocus:T,"aria-label":I,label:n,hint:r,error:o??k},e,L),{handlePointerDown:F}=lG({isDisabled:P.isDisabled,enableTextMotion:P.enableTextMotion,textMotionRef:P.textColRef,onPointerDown:E}),B=Ve(EG(P.secondaryLines,P.sz.gridGap,L),P.isDisabled&&vG,A==null?void 0:A.root);return P.isCompound?d.jsx(ap,{value:P.contextValue,children:d.jsx(lp,{classNames:A,children:d.jsx(Xt.Provider,{value:P.fieldLabelContext,children:d.jsx("fieldset",{ref:N,"aria-labelledby":P.contextValue.labelConnected?P.contextValue.labelId:void 0,"data-checked":P.mergedChecked?!0:void 0,className:Ve(B,AG),onPointerDown:F,...w,children:e})})})}):d.jsx(ap,{value:P.contextValue,children:d.jsx(lp,{classNames:A,children:d.jsx("label",{ref:N,htmlFor:P.contextValue.inputId,"data-checked":P.mergedChecked?!0:void 0,className:B,...w,onPointerDown:F,children:d.jsx(IG,{label:P.label,hint:P.hint,error:P.error,hasHint:P.hasHint,hasError:P.hasError,secondaryLines:P.secondaryLines,textColRef:P.textColRef,size:P.contextValue.size,isDisabled:P.isDisabled,danger:P.danger,hintId:P.hintId,errorId:P.errorId})})})})});G_.displayName="CheckboxRoot";const PG=Object.assign(Jd,{Fill:jt.Fill,Mark:jt.Mark}),kG=Object.assign(G_,{Control:Qd,Indicator:PG,Content:B_,Label:j_,Hint:M_,Error:F_});function xa({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;Mg(t,u);const f=n?R(wl,"gloss-indicator size-full min-h-0 min-w-0 origin-center border-0",s):R(wl,"size-full min-h-0 min-w-0 origin-center border border-primary bg-surface",s),m=n?RI:Og("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]})}xa.displayName="SelectionThumb";function _a({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",Ng[t]),children:s})})}_a.displayName="SelectionThumbIcon";function tt(...t){return R(...t)}function BG(t){return t==="gloss"?"gloss":"base"}function jG({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 MG(t){return!/\bflex-col\b/.test(t??"")}function FG(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 H_=l.createContext(null),ql=l.createContext({});function GG({value:t,children:e}){return d.jsx(H_.Provider,{value:t,children:e})}function HG({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 Zr(){const t=l.useContext(H_);if(!t)throw new Error("Radio.* parts must be used inside <Radio>.");return t}function Qr(){return l.useContext(ql)}function zG(){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 VG({isDisabled:t,enableTextMotion:e,textMotionRef:n,onPointerDown:r}){return cr({isDisabled:t,enabled:e,textMotionRef:n,onPointerDown:r})}function UG(t,e){return t??`radio-${e}`}function $G(t){return Yt(t)}function WG(t){return Kt(t)}function XG(t){return t!=null?String(t):"Option"}const Gs={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"}},YG="absolute m-[-1px] h-px w-px overflow-hidden border-0 p-0 opacity-0 [clip:rect(0,0,0,0)]",KG="relative inline-flex shrink-0 items-center justify-center",qG="relative inline-flex items-center justify-center",ZG="min-w-0",QG="inline-flex flex-wrap items-center gap-x-xsmall gap-y-0",JG="min-w-0",eH="origin-center will-change-transform",z_="text-muted",V_="text-danger",tH="text-danger",U_="text-muted",$_="text-muted",nH="origin-center will-change-transform",rH="min-w-0",oH="relative cursor-pointer select-none rounded-small text-left",sH="cursor-not-allowed",iH="has-[:focus-visible]:outline has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-primary",aH="contents";function lH(){return ta()}function cH(t,e,n){return R(oH,mu(t,e),iH,n)}function W_(){return na()}function Fi(t){return ra(t)}function X_(t){return pu(t)}const ef=l.forwardRef(function({className:e,children:n,...r},o){const s=Zr(),i=Qr(),a=zG();return d.jsxs("span",{ref:o,className:tt(KG,lH(),i.control,e),...r,children:[d.jsx("input",{id:s.inputId,type:"radio",className:tt(YG,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":XG(s.inputProps.value),onChange:s.onChange,onClick:s.onActivate}),d.jsx("span",{ref:a,className:tt(qG,i.controlTrack),children:n??d.jsx(tf,{})})]})});ef.displayName="RadioControl";function tf({children:t,className:e,classNames:n,...r}){const o=Zr(),s=Qr();return d.jsx(jt,{size:o.size,variant:BG(o.variant),selected:o.mergedChecked,dot:!0,classNames:jG({slotClassNames:s,classNames:n,className:e}),...r,children:t})}tf.displayName="RadioIndicator";const Y_=l.forwardRef(function({className:e,children:n,...r},o){const s=Zr(),i=Qr();return d.jsx("div",{ref:o,className:tt(aH,s.isCompound&&ZG,i.content,e),...r,children:n})});Y_.displayName="RadioContent";function K_({children:t,className:e,isRequired:n,...r}){const o=Zr(),s=Qr(),i=ou(),a=n??(i==null?void 0:i.isRequired)??!1,c=Gs[o.size];return d.jsxs("span",{ref:u=>{o.isCompound&&o.useInlineCompoundMotion&&(o.textMotionRef.current=u)},className:tt(QG,o.isCompound&&W_(),o.isCompound&&(o.hasCompoundHint||o.hasCompoundError)&&JG,o.isCompound&&o.useInlineCompoundMotion&&eH,s.label,e),...r,children:[d.jsx(ee,{as:"span",variant:c.title,inheritColor:!0,className:tt(o.isDisabled&&z_,!o.isDisabled&&o.danger&&V_,s.labelText),children:t}),a?d.jsx("span",{className:tt(tH,s.requiredMark),"aria-hidden":!0,children:"*"}):null]})}K_.displayName="RadioLabel";function q_({children:t,className:e,variant:n,...r}){const o=Zr(),s=Qr();return d.jsx(Xe,{as:"span",id:o.hintId,variant:n??Gs[o.size].desc,className:tt(o.isCompound&&Fi(2),o.isDisabled&&U_,s.hint,e),...r,children:t})}q_.displayName="RadioHint";function Z_({children:t,className:e,...n}){const r=Zr(),o=Qr();return d.jsx(Ze,{as:"span",id:r.errorId,variant:Gs[r.size].desc,className:tt(r.isCompound&&Fi(X_(r.hasCompoundHint)),r.isDisabled&&$_,o.error,e),...n,children:t})}Z_.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=Gs[a];return d.jsxs(d.Fragment,{children:[d.jsx(ef,{}),d.jsx("span",{ref:i,className:tt(W_(),!s&&nH,p.simpleLabelWrap,p.label),children:d.jsx(ee,{as:"span",variant:b.title,inheritColor:!0,className:tt(rH,c&&z_,!c&&u&&V_,p.simpleLabelText,p.labelText),children:t})}),r?d.jsx(Xe,{as:"span",id:f,variant:b.desc,className:tt(Fi(2),c&&U_,p.hint),children:e}):null,o?d.jsx(Ze,{as:"span",id:m,variant:b.desc,className:tt(Fi(X_(r)),c&&$_,p.error),children:n}):null]})}function dH({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:C,label:x,hint:_,error:v},y,S,T){const L=lk(),A=u!=null?String(u):void 0,E=L!=null&&A!=null,I=l.useId(),w=UG(a,I),N=$G(w),O=WG(w),j=o!==void 0,k=E?L.selectedValue===A:void 0,G=j?o:k!==void 0?k:void 0,[D,P,F]=FG(G,E||j?void 0:s),B=c??(L==null?void 0:L.name),$=!!(r??(L==null?void 0:L.disabled)),W=qt(y),M=W?Ae(y,"RadioHint"):!1,z=W?Ae(y,"RadioError"):!1,H=W&&MG(S),oe=!$&&(!W||H),pe=Gs[t],ce=_!=null,Y=v!=null,ne=W?(M?1:0)+(z?1:0):(ce?1:0)+(Y?1:0),me=l.useRef(null),re=l.useCallback(he=>{!j&&!E&&P(he.target.checked),i==null||i(he),!he.defaultPrevented&&E&&he.target.checked&&A!=null&&L.selectValue(A)},[L,E,j,i,A,P]),Ce=!$&&!g&&!f&&!(E&&L.isRequired),te=f??(E&&L.isRequired?L.claimRequiredAnchor():void 0),U=l.useCallback(he=>{if(T==null||T(he),!(he.defaultPrevented||!Ce||!D)){if(he.preventDefault(),E){L.selectValue(void 0);return}j||P(!1)}},[Ce,L,E,j,D,T,P]);return{contextValue:l.useMemo(()=>({inputId:w,hintId:N,errorId:O,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:C}}),[n,s,m,p,O,re,U,z,M,Y,ce,N,w,B,W,H,F,$,D,h,C,te,g,t,b,u,e]),isCompound:W,isDisabled:$,mergedChecked:D,enableTextMotion:oe,textColRef:me,secondaryLines:ne,sz:pe,hasHint:ce,hasError:Y,label:x,hint:_,error:v,hintId:N,errorId:O,danger:n}}const Q_=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:C,autoFocus:x,tabIndex:_,readOnly:v,onBlur:y,onFocus:S,className:T,classNames:L,onPointerDown:A,onClick:E,...I},w){const N=dH({size:s,variant:i,danger:a,disabled:c,checked:u,defaultChecked:f,onChange:m,id:p,name:b,value:g,required:h,form:C,autoFocus:x,tabIndex:_,readOnly:v,onBlur:y,onFocus:S,label:n,hint:r,error:o},e,T,E),{handlePointerDown:O}=VG({isDisabled:N.isDisabled,enableTextMotion:N.enableTextMotion,textMotionRef:N.textColRef,onPointerDown:A}),j=tt(cH(N.secondaryLines,N.sz.gridGap,T),N.isDisabled&&sH,L==null?void 0:L.root);return d.jsx(GG,{value:N.contextValue,children:d.jsx(HG,{classNames:L,children:d.jsx("label",{ref:w,"data-selected":N.mergedChecked?!0:void 0,className:j,...I,onPointerDown:O,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})})})})});Q_.displayName="RadioRoot";const fH=Object.assign(tf,{Fill:jt.Fill,Mark:jt.Mark}),mH=Object.assign(Q_,{Control:ef,Indicator:fH,Content:Y_,Label:K_,Hint:q_,Error:Z_});function nt(...t){return R(...t)}function pH(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 hH(t){return!/\bflex-col\b/.test(t??"")}function gH(t,e){return l.Children.map(t,n=>l.isValidElement(n)&&n.type.displayName==="SwitchControl"?l.cloneElement(n,{...e,...n.props}):n)}function bH(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 CH(t,e,n,r,o){return t?(r?1:0)+(o?1:0):(e?1:0)+(n?1:0)}function xH(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 _H(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 cp={small:Ut("small"),base:Ut("base"),mid:Ut("mid"),large:Ut("large")};function SH(t,e){if(t==null)return cp[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 cp[e]}function vH(t,e){const n=t.getBoundingClientRect().width,r=e.getBoundingClientRect().width;return Math.max(0,n-r)}const ii={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))]"},$o={small:{track:ii.small,travelPx:Ut("small"),title:"small",desc:"tools",gap:"gap-x-small gap-y-xsmall"},base:{track:ii.base,travelPx:Ut("base"),title:"base",desc:"small",gap:"gap-x-base gap-y-xsmall"},mid:{track:ii.mid,travelPx:Ut("mid"),title:"mid",desc:"small",gap:"gap-x-plus gap-y-xsmall"},large:{track:ii.large,travelPx:Ut("large"),title:"large",desc:"base",gap:"gap-x-plus gap-y-xsmall"}};function yH({isDisabled:t,enableTextMotion:e,textMotionRef:n,onPointerDown:r}){return cr({isDisabled:!!t,enabled:e,textMotionRef:n,onPointerDown:r})}function AH({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=SH(r,n),g=l.useRef(b),h=l.useRef(!0),C=l.useRef(!0),x=l.useCallback((_,v)=>{const y=a.current;if(!y)return;const S=_?v:0;if(p||C.current){C.current=!1,V(y),y.style.transform=`translate(${S}px, 0)`;return}V(y),X.to(y,{x:S,...EL(),overwrite:"auto"})},[p,a]);l.useLayoutEffect(()=>{g.current=b,x(t,g.current)},[t,b,x]),l.useLayoutEffect(()=>{const _=s.current,v=c.current;if(!_||!v)return;const y=()=>{g.current=vH(_,v),x(t,g.current)};y();const S=new ResizeObserver(y);return S.observe(_),S.observe(v),()=>S.disconnect()},[t,n,x,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&&V(v)}},[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 nf=l.createContext(null);function TH({value:t,children:e}){return d.jsx(nf.Provider,{value:t,children:e})}function Sa(){const t=l.useContext(nf);if(!t)throw new Error("Switch components must be inside <Switch>.");return t}function LH(){return l.useContext(nf)}const Zl=l.createContext({});function EH({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 Sn(){return l.useContext(Zl)}const J_=l.createContext(null);function IH({value:t,children:e}){return d.jsx(J_.Provider,{value:t,children:e})}function rf(){const t=l.useContext(J_);if(!t)throw new Error("Switch.Track, Switch.Fill, Switch.Thumb, Switch.Icon must be inside <Switch.Track>");return t}function wH(t,e,n){return t??n??`switch-${e}`}function RH(t){return Yt(t)}function NH(t){return Kt(t)}function DH(t){return t?void 0:"Switch"}const of=l.createContext(null);function OH({value:t,children:e}){return d.jsx(of.Provider,{value:t,children:e})}function va(){const t=l.useContext(of);if(!t)throw new Error("Slider components must be inside <Slider>.");return t}function PH(){return l.useContext(of)}const Ql=l.createContext({});function kH({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 vn(){return l.useContext(Ql)}const eS=l.createContext(null);function BH({value:t,children:e}){return d.jsx(eS.Provider,{value:t,children:e})}function sf(){const t=l.useContext(eS);if(!t)throw new Error("Slider.Rail, Slider.Fill, Slider.Thumb, Slider.Icon must be inside Slider.Track");return t}function jH({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 MH({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 FH({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 It(...t){return R(...t)}function Hs(t){return typeof t=="number"?`${t}px`:t}const up={small:Ut("small"),base:Ut("base"),mid:Ut("mid"),large:Ut("large")};function To(t,e,n){return Math.min(n,Math.max(e,t))}function tS(t,e,n){return n<=e?0:(t-e)/(n-e)*100}function nS(t,e,n){return n<=e?0:(t-e)/(n-e)}function Jl(t,e,n,r,o){if(r<=0)return tS(t,e,n);if(r<=o)return 50;const s=o/2,i=r-o;return(s+nS(t,e,n)*i)/r*100}function rl(t,e,n,r,o){return r<=o?r/2:o/2+nS(t,e,n)*(r-o)}function GH(t,e,n,r,o,s,i){if(t<=0)return{start:0,end:tS(s,n,r)};const a=e/2;if(o){const u=rl(i[0],n,r,t,e),f=rl(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=rl(s,n,r,t,e);return{start:0,end:Math.min(t,c+a)/t*100}}function HH(t,e){const n=t.end-t.start;return e==="horizontal"?{left:`${t.start}%`,width:`${n}%`}:{bottom:`${t.start}%`,height:`${n}%`}}function zH(t,e,n,r){if(r<=0)return To(t,e,n);const o=Math.round((t-e)/r);return To(e+o*r,e,n)}function VH(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 UH(t,e,n){if(t!=null&&t.length)return[...new Set(t.map(r=>To(r,e,n)))].toSorted((r,o)=>r-o)}function ec(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=To(r==="horizontal"?(t-n.left-c)/u:1-(e-n.top-c)/u,0,1);return o+f*(s-o)}function $H(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 WH(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 XH(t){return Number.isInteger(t)?String(t):t.toFixed(1)}function gi(t,e){const n=e==="horizontal"?t.width:t.height,r=e==="horizontal"?t.height:t.width;return{trackSpanPx:n,thumbSpanPx:r}}function rS(t,e){if(t==null)return up[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 up[e]}function YH(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 KH(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 qH(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 ZH(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 QH(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 JH(t){return`${t}-label`}function e2({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 t2(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 n2({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 r2(t){l.useEffect(()=>{const e=t.current;return()=>{e&&V(e)}},[t])}function o2(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 af(t,e){return R(t==="horizontal"?"w-full":"w-auto items-center",e)}const s2={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)]"},i2={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)]"},a2="pointer-events-none absolute inset-0 overflow-hidden rounded-full",l2="bg-primary-tint",c2="gloss-indicator border-0",u2="overflow-hidden rounded-full",d2="opacity-48",f2="absolute rounded-full",m2="bg-primary",p2="bg-primary-tint",h2="z-[1]",g2="inset-y-0",b2="inset-x-0",C2="relative touch-none select-none",x2="w-full",_2="h-48",S2="pointer-events-none absolute z-[1] size-1 rounded-full bg-primary/30",v2="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",y2="top-0 h-full w-auto -translate-x-1/2 aspect-square",A2="left-0 w-full h-auto -translate-y-1/2 aspect-square",T2="cursor-not-allowed",L2="cursor-grab active:cursor-grabbing";function E2({orientation:t,slotClass:e,className:n}){return It(af(t,n),e)}function I2({disabled:t,gloss:e=!1,slotClass:n,className:r}){return It(a2,!e&&l2,t&&d2,n,r)}function w2({isHorizontal:t,gloss:e=!1,slotClass:n,className:r}){return It(f2,t?g2:b2,e?p2:m2,e&&h2,n,r)}function oS({isHorizontal:t,size:e,thickness:n,gloss:r=!1,slotClass:o,className:s}){return It(C2,t?x2:_2,n==null&&(t?s2[e]:i2[e]),r&&u2,r&&c2,o,s)}function R2({orientation:t,disabled:e,slotClass:n,className:r}){return It(v2,t==="horizontal"?y2:A2,e?T2:L2,n,r)}function N2(t,e){return e==="horizontal"?{left:`${t}%`}:{top:`${100-t}%`}}function D2(t,e){return e==="horizontal"?{left:`${t}%`,top:"50%",transform:"translate(-50%, -50%)"}:{bottom:`${t}%`,left:"50%",top:"auto",transform:"translate(-50%, 50%)"}}function O2({isHorizontal:t,thickness:e}){if(e==null)return;const n=Hs(e);return t?{height:n,minHeight:n}:{width:n,minWidth:n}}function bi({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:C}){const x=vn(),_=t2(i),{squeezeRef:v,handlePointerDown:y}=n2({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:R2({orientation:s,disabled:i,slotClass:x.thumb}),style:N2(o,s),onPointerDown:y,onKeyDown:C,children:d.jsx(xa,{active:a,size:t,gloss:n,shellRef:_,className:It(x.thumbShell,r),children:e!=null?d.jsx(_a,{size:t,highlighted:a,gloss:n,children:e}):null})})}function P2(t,e){const{orientation:n,size:r="base",thickness:o,min:s=0,max:i=100,step:a=1,marks:c,formatValue:u=XH,icon:f,gloss:m=!1,thumbClassName:p,disabled:b=!1,className:g,classNames:h,ariaLabel:C,range:x=!1,children:_}=t,v=PH(),y=vn(),S=l.useMemo(()=>({...y,...h}),[y,h]),T=n??(v==null?void 0:v.orientation)??"horizontal",L=v==null?void 0:v.labelId,A=(v==null?void 0:v.labelConnected)??!1,E=C,I=l.useCallback(K=>e2({kind:K,explicitLabel:E,labelConnected:A,labelId:L,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)??""}),[E,v==null?void 0:v.errorConnected,v==null?void 0:v.errorId,v==null?void 0:v.hintConnected,v==null?void 0:v.hintId,A,L]),w=l.useRef(null),N=l.useRef(null),[O,j]=l.useState(0),k=l.useMemo(()=>rS(o,r),[o,r]),[G,D]=l.useState(k),P=l.useRef(null),[F,B]=l.useState(null),$=l.useMemo(()=>UH(c,s,i),[c,s,i]),W=l.useCallback(K=>{const Z=To(K,s,i);return $!=null&&$.length?VH(Z,$):zH(Z,s,i,a)},[$,s,i,a]),[M,z]=qH(x?void 0:t.value,x?void 0:t.defaultValue,s),[H,oe]=ZH(x?t.value:void 0,x?t.defaultValue:void 0,s,i),pe=x?void 0:t.onValueChange,ce=x?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[Ee,He]=H;Z===Ee&&fe===He||(oe([Z,fe]),ce==null||ce([Z,fe]))},[ce,H,oe,W]),me=l.useCallback((K=M,Z=H)=>{const fe=w.current,Ee=N.current;if(!fe||!Ee)return;const He=fe.getBoundingClientRect(),{trackSpanPx:Qe,thumbSpanPx:Je}=gi(He,T);j(Jt=>Jt===Qe?Jt:Qe),Je>0&&D(Jt=>Jt===Je?Jt:Je);const Qt=GH(Qe,Je>0?Je:k,s,i,x,K,Z);o2(Ee,HH(Qt,T),T)},[k,i,s,T,x,H,M]);l.useLayoutEffect(()=>{me()},[me]),l.useEffect(()=>{const K=w.current;if(!K)return;const Z=new ResizeObserver(()=>me());return Z.observe(K),()=>Z.disconnect()},[T,me]),r2(N);const re=l.useCallback((K,Z,fe)=>{const Ee=w.current;if(!Ee||b)return;const He=Ee.getBoundingClientRect(),{thumbSpanPx:Qe}=gi(He,T),Je=ec(K,Z,He,T,s,i,Qe>0?Qe:k);if(x){const[Qt,Jt]=H;if(fe==="start"){const br=W(Math.min(Je,Jt));ne([br,Jt]),me(M,[br,Jt])}else if(fe==="end"){const br=W(Math.max(Je,Qt));ne([Qt,br]),me(M,[Qt,br])}}else{const Qt=W(Je);Y(Je),me(Qt,H)}},[b,ne,Y,k,i,s,T,x,H,M,W,me]),Ce=l.useCallback((K,Z)=>{const fe=w.current;if(!fe)return"start";const Ee=fe.getBoundingClientRect(),{thumbSpanPx:He}=gi(Ee,T),Qe=ec(K,Z,Ee,T,s,i,He>0?He:k),[Je,Qt]=H;return Math.abs(Qe-Je)<=Math.abs(Qe-Qt)?"start":"end"},[k,i,s,T,H]);l.useEffect(()=>{const K=fe=>{const Ee=P.current;Ee&&re(fe.clientX,fe.clientY,Ee)},Z=()=>{P.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=x?Ce(K.clientX,K.clientY):"single";P.current=Z,B(Z),re(K.clientX,K.clientY,Z)},[b,Ce,x,re]),U=l.useCallback(K=>Z=>{b||Z.button!==0||(Z.preventDefault(),Z.stopPropagation(),P.current=K,B(K),Z.currentTarget.setPointerCapture(Z.pointerId))},[b]),ae=l.useCallback((K,Z)=>{if(x){const[fe,Ee]=H;ne(K==="start"?[fe+Z,Ee]:[fe,Ee+Z])}else Y(M+Z)},[ne,Y,x,H,M]),he=l.useCallback(K=>Z=>{if(b)return;const fe=WH($,a,Z.key,T);if(fe===0)return;Z.preventDefault();const Ee=K==="start"?H[0]:K==="end"?H[1]:M;if(fe==="home"){x?ne(K==="start"?[s,H[1]]:[H[0],s]):Y(s);return}if(fe==="end"){x?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=$H(Ee,$,fe==="mark-next"?1:-1);x?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,T,x,H,M,a]),De=l.useCallback((K,Z)=>{const fe=Z??f,Ee=He=>Jl(He,s,i,O,G);return K==="start"?d.jsx(bi,{size:r,icon:fe,gloss:m,thumbClassName:p,percent:Ee(H[0]),orientation:T,disabled:b,active:F==="start",ariaValueNow:H[0],ariaValueMin:s,ariaValueMax:H[1],ariaValueText:u(H[0]),...I("start"),onPointerDown:U("start"),onKeyDown:he("start")}):K==="end"?d.jsx(bi,{size:r,icon:fe,gloss:m,thumbClassName:p,percent:Ee(H[1]),orientation:T,disabled:b,active:F==="end",ariaValueNow:H[1],ariaValueMin:H[0],ariaValueMax:i,ariaValueText:u(H[1]),...I("end"),onPointerDown:U("end"),onKeyDown:he("end")}):d.jsx(bi,{size:r,icon:fe,gloss:m,thumbClassName:p,percent:Ee(M),orientation:T,disabled:b,active:F==="single",ariaValueNow:M,ariaValueMin:s,ariaValueMax:i,ariaValueText:u(M),...I("single"),onPointerDown:U("single"),onKeyDown:he("single")})},[F,b,u,m,he,U,f,i,s,T,H,M,r,I,p,G,O]),Ye=l.useMemo(()=>{if(x){const[K,Z]=H;return`${u(K)} — ${u(Z)}`}return u(M)},[u,x,H,M]),q=v==null?void 0:v.setDisplay;l.useLayoutEffect(()=>{q==null||q({valueLabel:Ye,min:s,max:i,range:x,singleValue:M,rangeValue:H,label:E})},[E,i,s,x,H,q,M,Ye]);const se=T==="horizontal",ue=w2({isHorizontal:se,gloss:m,slotClass:S.fill}),Be=I2({disabled:b,gloss:m,slotClass:S.rail}),mt=$==null?void 0:$.map(K=>{const Z=Jl(K,s,i,O,G);return d.jsx("span",{"aria-hidden":!0,className:It(S2,S.mark),style:D2(Z,T)},K)}),yn=l.useCallback(K=>{w.current=K,typeof e=="function"?e(K):e&&(e.current=K)},[e]),gr=l.useMemo(()=>({fillRef:N,fillClassResolved:ue,railClass:Be,markNodes:mt,size:r,orientation:T,disabled:b,icon:f,range:x,renderThumb:De}),[b,ue,f,mt,T,Be,x,De,r]),{body:An,hasCompoundParts:ln}=KH(_),Ko=l.useMemo(()=>O2({isHorizontal:se,thickness:o}),[se,o]),qo=oS({isHorizontal:se,size:r,thickness:o,gloss:m,slotClass:S.track,className:g});return{setTrackRef:yn,trackHitClass:qo,trackCrossStyle:Ko,handleTrackPointerDown:te,trackContextValue:gr,compoundBody:An,hasCompoundParts:ln,range:x,icon:f}}function k2({label:t,showValue:e,valueText:n,hint:r,error:o,hintId:s,errorId:i,trackProps:a}){const c=vn();return FH({label:t,labelClassName:c.label,showValue:e,valueText:n,hint:r,hintId:s,error:o,errorId:i,Header:lf,Value:cf,track:d.jsx(uf,{...a})})}function sS({className:t,classNames:e,...n}){const r=vn();return d.jsx(Ue,{className:t,classNames:{...e,root:It(r.label,e==null?void 0:e.root)},...n})}sS.displayName="SliderLabel";function lf({children:t,className:e,...n}){const{orientation:r}=va(),o=vn();return d.jsx(jH,{orientation:r,className:It(o.header,e),...n,children:t})}lf.displayName="Slider.Header";function cf({children:t,className:e,...n}){const{display:r}=va(),o=vn();return d.jsx(MH,{fallback:r==null?void 0:r.valueLabel,className:It(o.value,e),...n,children:t})}cf.displayName="Slider.Value";function iS({children:t,className:e,id:n,...r}){const o=va(),s=vn();return d.jsx(Xe,{id:n??o.hintId,className:It(s.hint,e),...r,children:t})}iS.displayName="Slider.Hint";function aS({children:t,className:e,id:n,...r}){const o=va(),s=vn();return d.jsx(Ze,{id:n??o.errorId,className:It(s.error,e),...r,children:t})}aS.displayName="Slider.Error";const uf=l.forwardRef(function(e,n){const r=P2(e,n),o=d.jsxs(d.Fragment,{children:[d.jsx(ff,{}),r.range?d.jsxs(d.Fragment,{children:[d.jsx(as,{thumb:"start",children:r.icon!=null?d.jsx(ls,{children:r.icon}):null}),d.jsx(as,{thumb:"end",children:r.icon!=null?d.jsx(ls,{children:r.icon}):null})]}):d.jsx(as,{thumb:"single",children:r.icon!=null?d.jsx(ls,{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(BH,{value:r.trackContextValue,children:r.hasCompoundParts?r.compoundBody:o})})});uf.displayName="SliderTrack";function df({className:t,...e}){const n=sf(),r=vn();return d.jsx("span",{ref:n.fillRef,className:It(n.fillClassResolved,r.fill,t),...e})}df.displayName="SliderFill";function ff({className:t,children:e,...n}){const r=sf(),o=vn();return d.jsx("div",{className:It(r.railClass,o.rail,t),"aria-hidden":!0,...n,children:e??d.jsxs(d.Fragment,{children:[d.jsx(df,{}),r.markNodes]})})}ff.displayName="SliderRail";function as({thumb:t="single",children:e}){const n=sf(),r=QH(e,n.icon);return n.renderThumb(t,r)}as.displayName="SliderThumb";function ls({children:t}){return t}ls.displayName="SliderIcon";function B2({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:C,thickness:x,formatValue:_,icon:v,disabled:y,ariaLabel:S,gloss:T,thumbClassName:L}){const A=l.useId(),E=e??`slider-${A}`,I=Yt(E),w=Kt(E),N=JH(E),[O,j]=l.useState(null),k=l.useCallback(M=>{j(z=>YH(z,M)?z:M)},[]),G=qt(t),D=r!=null||G&&Ae(t,"Label"),P=i!=null||G&&Ae(t,"Slider.Hint"),F=a!=null||G&&Ae(t,"Slider.Error"),B=l.useMemo(()=>({sliderId:E,labelId:N,hintId:I,errorId:w,hintConnected:P,errorConnected:F,labelConnected:D,orientation:n,display:O,setDisplay:k}),[O,w,F,P,D,I,N,n,k,E]),$=l.useMemo(()=>({labelId:N,isRequired:!1}),[N]);return{sliderId:E,isCompound:G,fieldCtx:B,fieldLabelCtx:$,trackProps:{range:c,value:u,defaultValue:f,onValueChange:m,min:p,max:b,step:g,marks:h,size:C,thickness:x,formatValue:_,icon:v,disabled:y,ariaLabel:S,gloss:T,thumbClassName:L,orientation:n},label:r,showValue:o,valueText:s,hint:i,error:a,hasHint:P,hasError:F,hintId:I,errorId:w}}function lS({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:C,marks:x,size:_,thickness:v,formatValue:y,icon:S,disabled:T,ariaLabel:L,gloss:A,thumbClassName:E,...I}){const w=B2({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:C,marks:x,size:_,thickness:v,formatValue:y,icon:S,disabled:T,ariaLabel:L,gloss:A,thumbClassName:E}),N=w.isCompound?t:d.jsx(k2,{label:w.label,showValue:w.showValue,valueText:w.valueText,hint:w.hint,error:w.error,hintId:w.hasHint?w.hintId:void 0,errorId:w.hasError?w.errorId:void 0,trackProps:w.trackProps});return d.jsx(OH,{value:w.fieldCtx,children:d.jsx(kH,{classNames:n,children:d.jsx(Xt.Provider,{value:w.fieldLabelCtx,children:d.jsx(hn,{id:w.sliderId,className:E2({orientation:w.fieldCtx.orientation,slotClass:n==null?void 0:n.root,className:e}),...I,children:N})})})})}lS.displayName="Slider";const j2=Object.assign(lS,{Header:lf,Label:sS,Value:cf,Hint:iS,Error:aS,Track:uf,Rail:ff,Fill:df,Thumb:as,Icon:ls}),M2="absolute m-[-1px] h-px w-px overflow-hidden border-0 p-0 opacity-0 [clip:rect(0,0,0,0)]",F2="relative inline-flex shrink-0 items-center justify-center",G2="min-w-0",H2="contents",z2="inline-flex flex-wrap items-center gap-x-xsmall gap-y-0",V2="min-w-0",U2="origin-center will-change-transform",$2="font-w-mid",cS="text-muted",uS="text-muted",dS="text-muted",W2="origin-center will-change-transform",X2="min-w-0 font-w-mid",Y2="relative cursor-pointer select-none rounded-small text-left",K2="cursor-not-allowed",q2="has-[:focus-visible]:outline has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-primary",Z2="inline-grid grid-cols-[auto] grid-rows-[auto]",Q2="relative box-border inline-flex shrink-0 rounded-full",J2="gloss-indicator border-0",ez="bg-primary-tint",tz="pointer-events-none absolute inset-0 rounded-full",nz="z-[1]",rz="bg-primary",oz="bg-primary-tint",sz="absolute inset-y-0 left-0 aspect-square h-full w-auto will-change-transform flex",iz="z-[2]",az="absolute inset-0 flex items-center justify-center";function ya(t){return t==="left"?"left":"right"}function fS(t){return ta(ya(t))}function mS(t){return na(ya(t))}function Gi(t,e){return ra(t,ya(e))}function lz(t){return pu(t)}function cz({hasTextColumn:t,secondaryLines:e,gap:n,labelPosition:r,slotClass:o,className:s}){return nt(Y2,t?mu(e,n,ya(r),"inline-grid"):Z2,q2,o,s)}function uz({size:t,thickness:e,gloss:n,slotClass:r,className:o}){return nt(Q2,e==null&&$o[t].track,n?J2:ez,r,o)}function dz(t){if(t==null)return;const e=Hs(t);return{height:e,minHeight:e,width:`calc(2 * (${e}))`,minWidth:`calc(2 * (${e}))`}}function fz(t){if(t)return{background:t}}const mf=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:C,form:x,autoFocus:_,tabIndex:v,readOnly:y,onBlur:S,onFocus:T,onPointerDown:L,children:A,...E},I){const w=LH(),N=Sn(),O=l.useMemo(()=>({...N,...c}),[c,N]),j=l.useId(),k=wH(b,j,w==null?void 0:w.switchId),G=(w==null?void 0:w.hintId)??`${k}-hint`,D=(w==null?void 0:w.errorId)??`${k}-error`,P=e??(w==null?void 0:w.size)??"base",[F,B,$]=pH(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=>{L==null||L(me),!(me.defaultPrevented||u)&&(M(re=>re+1),w==null||w.setSqueezeToken(re=>re+1))},[u,w,L]),{"aria-label":oe,...pe}=E,ce={size:P,thickness:i,checked:F,disabled:u,color:o,gloss:s,squeezeToken:W,iconOff:n,iconOn:r,classNames:{track:O.track,fill:O.fill,thumb:O.thumb,thumbShell:O.thumbShell,icon:O.icon}},{track:Y}=xH(A);let ne;return Y!=null?ne=l.isValidElement(Y)?l.cloneElement(Y,ce):Y:A!=null&&_H(A)?ne=d.jsxs(Hi,{...ce,children:[d.jsx(Aa,{}),A]}):A!=null?ne=A:ne=d.jsx(Hi,{...ce}),d.jsxs("span",{className:nt(F2,w!=null?fS(w.labelPosition):void 0,O.control,a),children:[d.jsx("input",{ref:I,id:k,type:"checkbox",role:"switch","aria-checked":F,className:nt(M2,O.input),disabled:u,name:g,value:h,required:C,form:x,autoFocus:_,tabIndex:v,readOnly:y??($&&p===void 0),onBlur:S,onFocus:T,"aria-describedby":Ft(w!=null&&w.hintConnected?G:void 0,w!=null&&w.errorConnected?D:void 0),"aria-label":oe??DH((w==null?void 0:w.hasTextColumn)??!1),onPointerDown:H,...$?{checked:F,onChange:z}:{defaultChecked:m,onChange:z},...pe}),ne]})});mf.displayName="SwitchControl";function Hi({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=Sn(),g=l.useMemo(()=>({...b,...f}),[b,f]),h=l.useRef(null),C=l.useRef(null),x=l.useRef(null),_=l.useRef(null),v=l.useRef(null),y=l.useRef(null),S=l.useRef(null);AH({checked:n,disabled:r,size:t,thickness:e,squeezeToken:i,trackRef:h,trackFillRef:C,thumbRef:x,thumbShellRef:_,thumbFillRef:v,iconOffRef:y,iconOnRef:S});const T=l.useMemo(()=>({checked:n,disabled:r,size:t,color:o,gloss:s,trackFillRef:C,thumbRef:x,thumbShellRef:_,thumbFillRef:v,iconOffRef:y,iconOnRef:S}),[n,o,r,s,t]),L=d.jsxs(d.Fragment,{children:[d.jsx(Aa,{}),d.jsxs(pf,{children:[a!=null?d.jsx(zi,{when:"off",children:a}):null,c!=null?d.jsx(zi,{when:"on",children:c}):null]})]});return d.jsx(IH,{value:T,children:d.jsx("span",{ref:h,className:uz({size:t,thickness:e,gloss:s,slotClass:g.track,className:u}),style:dz(e),"aria-hidden":!0,...p,children:m??L})})}Hi.displayName="SwitchTrack";function Aa({className:t,style:e,...n}){const r=rf(),o=Sn(),s=fz(r.color);return d.jsx("span",{ref:r.trackFillRef,"aria-hidden":!0,className:nt(tz,r.gloss&&nz,!r.color&&(r.gloss?oz:rz),o.fill,t),style:{opacity:0,...s,...e},...n})}Aa.displayName="SwitchFill";function pf({className:t,children:e,...n}){const r=rf(),o=Sn();return d.jsx("span",{ref:r.thumbRef,className:nt(sz,r.gloss&&iz,o.thumb,t),...n,children:d.jsx(xa,{active:r.checked,size:r.size,gloss:r.gloss,shellRef:r.thumbShellRef,fillRef:r.thumbFillRef,className:o.thumbShell,children:e})})}pf.displayName="SwitchThumb";function zi({when:t,children:e,className:n,...r}){const o=rf(),s=Sn(),i=t==="off"?o.iconOffRef:o.iconOnRef,a=t==="on",c=t==="off"?!o.checked:o.checked;return d.jsx(_a,{iconRef:i,size:o.size,highlighted:a,gloss:o.gloss,className:nt(az,s.icon,n),style:{opacity:c?1:0},...r,children:e})}zi.displayName="SwitchIcon";const pS=l.forwardRef(function({className:e,children:n,...r},o){const s=Sa(),i=Sn();return d.jsx("div",{ref:o,className:nt(H2,s.isCompound&&G2,i.content,e),...r,children:n})});pS.displayName="SwitchContent";function hS({children:t,className:e,...n}){const r=Sa(),o=Sn(),s=$o[r.size];return d.jsx("span",{ref:i=>{r.isCompound&&r.useInlineCompoundMotion&&(r.textMotionRef.current=i)},className:nt(z2,r.isCompound&&mS(r.labelPosition),r.isCompound&&(r.hasCompoundHint||r.hasCompoundError)&&V2,r.isCompound&&r.useInlineCompoundMotion&&U2,o.label,e),...n,children:d.jsx(ee,{as:"span",variant:s.title,inheritColor:!0,className:nt($2,r.disabled&&cS,o.labelText),children:t})})}hS.displayName="SwitchLabel";function gS({children:t,className:e,variant:n,...r}){const o=Sa(),s=Sn();return d.jsx(Xe,{as:"span",id:o.hintId,variant:n??$o[o.size].desc,className:nt(o.isCompound&&Gi(2,o.labelPosition),o.disabled&&uS,s.hint,e),...r,children:t})}gS.displayName="Switch.Hint";function bS({children:t,className:e,...n}){const r=Sa(),o=Sn();return d.jsx(Ze,{as:"span",id:r.errorId,variant:$o[r.size].desc,className:nt(r.isCompound&&Gi(lz(r.hasCompoundHint),r.labelPosition),r.disabled&&dS,o.error,e),...n,children:t})}bS.displayName="Switch.Error";function mz({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=Sn(),h=$o[c];return d.jsxs(d.Fragment,{children:[d.jsx(mf,{size:c,disabled:u,className:fS(f),...b}),r?d.jsxs(d.Fragment,{children:[d.jsx("span",{ref:a,className:nt(mS(f),!i&&W2,g.simpleLabelWrap,g.label),children:d.jsx(ee,{as:"span",variant:h.title,inheritColor:!0,className:nt(X2,u&&cS,g.simpleLabelText,g.labelText),children:t})}),o?d.jsx(Xe,{as:"span",id:m,variant:h.desc,className:nt(Gi(2,f),u&&uS,g.hint),children:e}):null,s?d.jsx(Ze,{as:"span",id:p,variant:h.desc,className:nt(Gi(o?3:2,f),u&&dS,g.error),children:n}):null]}):null]})}function pz({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=RH(f),p=NH(f),[,b]=l.useState(0),g=qt(t),h=g?Ae(t,"Switch.Hint"):!1,C=g?Ae(t,"Switch.Error"):!1,x=g?bH(t):!1,_=g&&hH(a),v=n!=null,y=r!=null,S=CH(g,v,y,h,C),T=g?x:e!=null,L=i,A=!L&&T&&(!g||_),E=l.useRef(null),I=$o[s];return{fieldCtx:l.useMemo(()=>({switchId:f,hintId:m,errorId:p,size:s,labelPosition:o,disabled:L,isCompound:g,hasCompoundHint:h,hasCompoundError:C,hasTextColumn:T,hintConnected:g?h:v,errorConnected:g?C:y,useInlineCompoundMotion:_,textMotionRef:E,setSqueezeToken:b}),[L,h,C,v,y,T,m,p,g,o,s,f,_]),isCompound:g,hasTextColumn:T,secondaryLines:S,sz:I,label:e,hint:n,error:r,hasHint:v,hasError:y,hintId:m,errorId:p,disabled:L,enableTextMotion:A,textColRef:E,labelPosition:o,controlRest:c}}const CS=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=pz({children:e,label:n,hint:r,error:o,labelPosition:s,size:i,disabled:a,className:c,...m}),{handlePointerDown:g}=yH({isDisabled:b.disabled,enableTextMotion:b.enableTextMotion,textMotionRef:b.textColRef,onPointerDown:f}),h=nt(cz({hasTextColumn:b.hasTextColumn,secondaryLines:b.secondaryLines,gap:b.sz.gap,labelPosition:b.labelPosition,slotClass:u==null?void 0:u.root,className:c}),b.disabled&&K2);return d.jsx(TH,{value:b.fieldCtx,children:d.jsx(EH,{classNames:u,children:d.jsx("label",{ref:p,className:h,onPointerDown:g,children:b.isCompound?gH(e,b.controlRest):d.jsx(mz,{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})})})})});CS.displayName="SwitchRoot";const hz=Object.assign(CS,{Control:mf,Track:Hi,Fill:Aa,Thumb:pf,Icon:zi,Content:pS,Label:hS,Hint:gS,Error:bS}),xS=l.createContext(null),tc=l.createContext({});function gz({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 Ta(){const t=l.useContext(xS);if(!t)throw new Error("Components Tabs must be inside <Tabs>.");return t}function hf(){return l.useContext(tc)}function Jr(...t){return R(...t)}function bz(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 Cz(t){return le[t].controlText}function _S(t){return Array.from(t.querySelectorAll('[role="tab"]:not([disabled])')).filter(e=>e instanceof HTMLButtonElement)}function xz(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 _z(...t){return e=>{for(const n of t)typeof n=="function"?n(e):n&&(n.current=e)}}const Sz={default:"",outline:"bg-transparent border-token rounded-mid p-xsmall",secondary:"bg-secondary border-token rounded-mid p-xsmall",gloss:"border-0 p-small"},vz={default:"bg-primary",outline:"bg-secondary",secondary:"bg-tertiary",gloss:"bg-tertiary"};function yz({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 Az({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",Sz[e],n,r)}function Tz({variant:t,slotClass:e}){return Jr("pointer-events-none absolute z-0 motion-reduce:transition-none",t==="default"?"rounded-full":"rounded-mid",vz[t],e)}function Lz({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&&bn,o,s)}const Ez="relative z-[1] shrink-0";function Iz(t){return Jr("inline-flex origin-center items-center gap-xsmall will-change-transform",t)}function wz({slotClass:t,className:e}){return Jr("min-w-0 outline-none focus-ring",t,e)}function Rz(t){const e=getComputedStyle(t);return{borderTop:Number.parseFloat(e.borderTopWidth)||0,borderLeft:Number.parseFloat(e.borderLeftWidth)||0}}function Nz(t,e){const n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),{borderTop:o,borderLeft:s}=Rz(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 Dz(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}:Nz(t,e)}function Oz(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 Pz(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=Dz(u,m,r,o),b=de();if(f.style.opacity="1",b||a.current){V(f),Oz(f,p);return}const g=f.offsetLeft,h=f.offsetTop,C=f.offsetWidth,x=f.offsetHeight;V(f),X.fromTo(f,{left:g,top:h,width:C,height:x},{...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 SS(t,e){return`${t}-tab-${e}`}function vS(t,e){return`${t}-panel-${e}`}function kz({isSelected:t,isDisabled:e,panelId:n}){return{"aria-selected":t,"aria-controls":n,tabIndex:t?0:-1,disabled:e}}function Bz({isSelected:t,tabId:e}){return{"aria-labelledby":e,hidden:!t,tabIndex:t?0:-1}}function jz({motionRef:t,isDisabled:e,isSelected:n,onPointerEnter:r,onPointerLeave:o,onPointerDown:s}){return cr({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:C,disabled:x,tabElementsRef:_,notifyTabLayout:v}=Ta(),y=hf(),S=l.useRef(null),T=p===e,L=x||s,A=SS(C,e),E=vS(C,e),I=kz({isSelected:T,isDisabled:L,panelId:E}),w=l.useCallback(D=>{D?_.current.set(e,D):_.current.delete(e),v(),typeof m=="function"?m(D):m&&(m.current=D)},[v,m,_,e]);l.useLayoutEffect(()=>{const D=_.current;return()=>{D.delete(e),v()}},[v,_,e]);const N=l.useCallback(D=>{i==null||i(D),!(D.defaultPrevented||L)&&b(e)},[L,i,b,e]),{handlePointerEnter:O,handlePointerLeave:j,handlePointerDown:k}=jz({motionRef:S,isDisabled:L,isSelected:T,onPointerEnter:c,onPointerLeave:u,onPointerDown:a}),G=Lz({size:g,variant:h,isSelected:T,isDisabled:L,slotClass:y.tab,className:o});if(r&&l.isValidElement(n)){const D=n;return l.cloneElement(D,{...f,role:"tab",id:A,"data-tab-value":e,"aria-selected":I["aria-selected"],"aria-controls":I["aria-controls"],tabIndex:I.tabIndex,disabled:L||D.props.disabled,ref:_z(w,D.props.ref),className:Jr(D.props.className,Ez,o),onClick:P=>{var F,B;(B=(F=D.props).onClick)==null||B.call(F,P),N(P)},onPointerEnter:P=>{var F,B;(B=(F=D.props).onPointerEnter)==null||B.call(F,P),O(P)},onPointerLeave:P=>{var F,B;(B=(F=D.props).onPointerLeave)==null||B.call(F,P),j(P)},onPointerDown:P=>{var F,B;(B=(F=D.props).onPointerDown)==null||B.call(F,P),k(P)}})}return d.jsx("button",{ref:w,type:"button",role:"tab",id:A,"data-tab-value":e,"aria-selected":I["aria-selected"],"aria-controls":I["aria-controls"],tabIndex:I.tabIndex,disabled:I.disabled,className:G,onClick:N,onPointerEnter:O,onPointerLeave:j,onPointerDown:k,...f,children:d.jsx(ee,{as:"span",inheritColor:!0,ref:S,variant:Cz(g),className:Iz(y.tabText),children:n})})});yS.displayName="TabsTab";const AS=l.forwardRef(function({value:e,children:n,className:r,...o},s){const{value:i,baseId:a}=Ta(),c=hf(),u=i===e,f=SS(a,e),m=vS(a,e),p=Bz({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:wz({slotClass:c.panel,className:r}),...o,children:n})});AS.displayName="TabsPanel";const TS=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}=Ta(),b=hf(),g=l.useRef(null),h=l.useRef(null),x=wo(s,u==="gloss"),_=l.useCallback(y=>{x(y),g.current=y},[x]);Pz(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 T=_S(S);if(T.length===0)return;const L=T.findIndex(N=>N===document.activeElement),A=c==="horizontal";let E=null;switch(y.key){case"ArrowRight":A&&(E=L<0?0:(L+1)%T.length);break;case"ArrowLeft":A&&(E=L<0?T.length-1:(L-1+T.length)%T.length);break;case"ArrowDown":A||(E=L<0?0:(L+1)%T.length);break;case"ArrowUp":A||(E=L<0?T.length-1:(L-1+T.length)%T.length);break;case"Home":E=0;break;case"End":E=T.length-1;break;default:return}if(E==null)return;y.preventDefault();const I=xz(S,E),w=I==null?void 0:I.dataset.tabValue;w&&a(w)},[f,r,c,a]);return d.jsxs("div",{ref:_,role:"tablist",tabIndex:f?-1:0,"aria-orientation":c,"aria-disabled":f||void 0,className:Az({orientation:c,variant:u,slotClass:b.list,className:e}),onKeyDown:v,...o,children:[d.jsx("span",{ref:h,"aria-hidden":!0,className:Tz({variant:u,slotClass:b.indicator}),style:{left:0,top:0,width:0,height:0,opacity:0}}),n]})});TS.displayName="TabsList";function Mz({value:t,defaultValue:e,onValueChange:n,orientation:r="horizontal",size:o="base",variant:s="default",disabled:i=!1}){const a=l.useId(),[c,u]=bz(t,e),f=l.useRef(null);f.current||(f.current=new Map);const[m,p]=l.useState(0),b=l.useCallback(C=>{u(C),n==null||n(C)},[n,u]),g=l.useCallback(()=>{p(C=>C+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 nc=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}=Mz({value:o,defaultValue:s,onValueChange:i,orientation:a,size:c,variant:u,disabled:f});return d.jsx(xS.Provider,{value:b,children:d.jsx(gz,{classNames:r,children:d.jsx("div",{ref:p,className:yz({orientation:b.orientation,slotClass:r==null?void 0:r.root,className:n}),"data-orientation":b.orientation,...m,children:e})})})});nc.displayName="Tabs";const Fz=Object.assign(nc,{Root:nc,List:TS,Tab:yS,Panel:AS}),gf=l.createContext(null),rc=l.createContext({});function Gz({value:t,children:e}){return d.jsx(gf.Provider,{value:t,children:e})}function Hz({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 La(){const t=l.useContext(gf);if(!t)throw new Error("Meter.* components must be inside <Meter>.");return t}function zz(){return l.useContext(gf)}function eo(){return l.useContext(rc)}function pr(...t){return R(...t)}function Vz(t,e,n){return Math.min(n,Math.max(e,t))}function Uz(t,e,n){return n<=e?0:(t-e)/(n-e)*100}function $z(t){return Number.isInteger(t)?String(t):t.toFixed(1)}function Wz(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 Xz({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 Yz={small:"h-small",base:"h-base",mid:"h-plus",large:"h-mid"},Kz={small:"w-small",base:"w-base",mid:"w-plus",large:"w-mid"},qz="relative overflow-hidden rounded-full bg-primary-tint",Zz="w-full",Qz="h-48",Jz="absolute rounded-full",eV="inset-y-0 left-0",tV="inset-x-0 bottom-0",nV="bg-primary",rV="flex items-baseline justify-between gap-xsmall",oV="w-full",sV="min-w-[8rem]",iV="tabular-nums text-muted";function aV({orientation:t,slotClass:e,className:n}){return pr(af(t),e,n)}function lV({orientation:t,slotClass:e,className:n}){return pr(rV,t==="horizontal"?oV:sV,e,n)}function cV({slotClass:t,className:e}){return pr(iV,t,e)}function uV({isHorizontal:t,size:e,thickness:n,slotClass:r,className:o}){return pr(qz,t?Zz:Qz,n==null&&(t?Yz[e]:Kz[e]),r,o)}function dV({isHorizontal:t,hasCustomColor:e,slotClass:n}){return pr(Jz,t?eV:tV,!e&&nV,n)}function fV({isHorizontal:t,thickness:e}){if(e==null)return;const n=Hs(e);return t?{height:n}:{width:n}}function mV(t){if(t)return{background:t}}function pV({isHorizontal:t,percent:e}){return t?{width:`${e}%`,height:"100%"}:{width:"100%",height:`${e}%`}}function hV({isHorizontal:t,percent:e,fillColorStyle:n}){return{width:t?`${e}%`:"100%",height:t?"100%":`${e}%`,...n}}function LS(t){return`${t}-label`}function gV({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 bV({ariaDescribedByProp:t,hintConnected:e,hintId:n,errorConnected:r,errorId:o}){return t??Ft(e?n:void 0,r?o:void 0)}function CV({value:t,min:e=0,max:n=100,size:r="base",thickness:o,color:s,formatValue:i=$z,orientation:a,"aria-describedby":c}){const u=zz(),f=a??(u==null?void 0:u.orientation)??"horizontal",m=u==null?void 0:u.meterId,p=m!=null?LS(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,C=l.useMemo(()=>Vz(t,e,n),[n,e,t]),x=l.useMemo(()=>Uz(C,e,n),[C,n,e]),_=f==="horizontal",v=l.useMemo(()=>i(C),[C,i]),y=bV({ariaDescribedByProp:c,hintConnected:g,hintId:u==null?void 0:u.hintId,errorConnected:h,errorId:u==null?void 0:u.errorId}),S=gV({clampedValue:C,min:e,max:n,statusText:v,labelConnected:b,labelId:p,ariaDescribedBy:y}),T=l.useMemo(()=>fV({isHorizontal:_,thickness:o}),[_,o]),L=l.useMemo(()=>mV(s),[s]),A=l.useMemo(()=>pV({isHorizontal:_,percent:x}),[_,x]),E=l.useMemo(()=>hV({isHorizontal:_,percent:x,fillColorStyle:L}),[L,_,x]),I=u==null?void 0:u.setDisplay;return l.useLayoutEffect(()=>{I==null||I({clampedValue:C,statusText:v,min:e,max:n})},[C,n,e,I,v]),{size:r,thickness:o,color:s,isHorizontal:_,percent:x,aria:S,trackCrossStyle:T,fillColorStyle:L,fillTargetStyle:A,fillInitialStyle:E}}function xV({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(Ue,{classNames:{root:i.label},children:t}):null,n!=null?d.jsx(Vi,{children:n}):e?d.jsx(Vi,{}):null]}):null,s.value!=null?d.jsx(_f,{...s,value:s.value}):null,r!=null?d.jsx(Cf,{children:r}):null,o!=null?d.jsx(xf,{children:o}):null]})}function ES({className:t,classNames:e,...n}){const r=eo();return d.jsx(Ue,{className:t,classNames:{...e,root:pr(r.label,e==null?void 0:e.root)},...n})}ES.displayName="MeterLabel";function bf({children:t,className:e,...n}){const{orientation:r}=La(),o=eo();return d.jsx("div",{className:lV({orientation:r,slotClass:o.header,className:e}),...n,children:t})}bf.displayName="Meter.Header";function Vi({children:t,className:e,...n}){const{display:r}=La(),o=eo(),s=t??(r==null?void 0:r.statusText);return s==null?null:d.jsx(ee,{as:"span",variant:"base",className:cV({slotClass:o.value,className:e}),...n,children:s})}Vi.displayName="Meter.Value";function Cf({children:t,className:e,id:n,...r}){const o=La(),s=eo();return d.jsx(Xe,{id:n??o.hintId,className:pr(s.hint,e),...r,children:t})}Cf.displayName="Meter.Hint";function xf({children:t,className:e,id:n,...r}){const o=La(),s=eo();return d.jsx(Ze,{id:n??o.errorId,className:pr(s.error,e),...r,children:t})}xf.displayName="Meter.Error";const _f=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:C,trackCrossStyle:x,fillTargetStyle:_,fillInitialStyle:v}=CV({value:e,min:n,max:r,size:o,thickness:s,color:i,formatValue:a,orientation:c,"aria-describedby":f}),{fillRef:y}=Xz({fillTargetStyle:_,isHorizontal:h});return d.jsx("div",{ref:p,role:"meter","aria-valuenow":C["aria-valuenow"],"aria-valuemin":C["aria-valuemin"],"aria-valuemax":C["aria-valuemax"],"aria-valuetext":C["aria-valuetext"],"aria-labelledby":C["aria-labelledby"],"aria-describedby":C["aria-describedby"],"aria-label":C["aria-label"],className:uV({isHorizontal:h,size:g??"base",thickness:s,slotClass:b.track,className:u}),style:x,...m,children:d.jsx("span",{ref:y,"aria-hidden":!0,className:dV({isHorizontal:h,hasCustomColor:!!i,slotClass:b.fill}),style:v})})});_f.displayName="Meter.Track";function _V({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(),C=e??`meter-${h}`,x=Yt(C),_=Kt(C),v=LS(C),[y,S]=l.useState(null),T=l.useCallback(j=>{S(k=>Wz(k,j)?k:j)},[]),L=qt(t),A=r!=null||L&&Ae(t,"Label"),E=i!=null||L&&Ae(t,"Meter.Hint"),I=a!=null||L&&Ae(t,"Meter.Error"),w=l.useMemo(()=>({meterId:C,hintId:x,errorId:_,hintConnected:E,errorConnected:I,labelConnected:A,orientation:n,display:y,setDisplay:T}),[y,_,I,E,A,x,C,n,T]),N=l.useMemo(()=>({labelId:v}),[v]);return{meterId:C,isCompound:L,fieldCtx:w,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 IS({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:C,...x}){const _=_V({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:C}),v=_.isCompound?t:d.jsx(xV,{label:_.label,showValue:_.showValue,valueText:_.valueText,hint:_.hint,error:_.error,trackProps:_.trackProps});return d.jsx(Gz,{value:_.fieldCtx,children:d.jsx(Hz,{classNames:n,children:d.jsx(Xt.Provider,{value:_.fieldLabelCtx,children:d.jsx(hn,{id:_.meterId,className:aV({orientation:_.fieldCtx.orientation,slotClass:n==null?void 0:n.root,className:e}),...x,children:v})})})})}IS.displayName="Meter";const SV=Object.assign(IS,{Header:bf,Label:ES,Value:Vi,Hint:Cf,Error:xf,Track:_f}),Sf=l.createContext(null),oc=l.createContext({});function vV({value:t,children:e}){return d.jsx(Sf.Provider,{value:t,children:e})}function yV({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 Ea(){const t=l.useContext(Sf);if(!t)throw new Error("ProgressBar.* components must be inside <ProgressBar>.");return t}function AV(){return l.useContext(Sf)}function to(){return l.useContext(oc)}const TV=1500,LV="expo.inOut";function zn(...t){return R(...t)}function EV(t,e,n){return Math.min(n,Math.max(e,t))}function IV(t,e,n){return n<=e?0:(t-e)/(n-e)*100}function wV(t){return Number.isInteger(t)?String(t):t.toFixed(1)}function RV(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 NV({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,...wL(),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:TV/1e3,ease:LV,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 DV={small:"h-small",base:"h-base",mid:"h-plus",large:"h-mid"},OV={small:"w-small",base:"w-base",mid:"w-plus",large:"w-mid"},PV="relative overflow-hidden rounded-full bg-primary-tint",kV="w-full",BV="h-48",jV="absolute rounded-full",MV="inset-y-0 left-0",FV="inset-x-0 bottom-0",wS="bg-primary",GV="absolute rounded-full will-change-transform",HV="inset-y-0 left-0 w-1/4",zV="inset-x-0 bottom-0 h-1/4",VV="left-1/4 w-1/2",UV="bottom-1/4 h-1/2",$V="flex items-baseline justify-between gap-xsmall",WV="w-full",XV="min-w-[8rem]",YV="tabular-nums text-muted";function KV({orientation:t,slotClass:e,className:n}){return zn(af(t),e,n)}function qV({orientation:t,slotClass:e,className:n}){return zn($V,t==="horizontal"?WV:XV,e,n)}function ZV({slotClass:t,className:e}){return zn(YV,t,e)}function QV({isHorizontal:t,size:e,thickness:n,slotClass:r,className:o}){return zn(PV,t?kV:BV,n==null&&(t?DV[e]:OV[e]),r,o)}function JV({isHorizontal:t,hasCustomColor:e,slotClass:n}){return zn(jV,t?MV:FV,!e&&wS,n)}function eU({isHorizontal:t,hasCustomColor:e,reduceMotion:n,slotClass:r}){return zn(GV,t?HV:zV,!e&&wS,n&&(t?VV:UV),r)}function tU({isHorizontal:t,thickness:e}){if(e==null)return;const n=Hs(e);return t?{height:n}:{width:n}}function nU(t){if(t)return{background:t}}function rU({isHorizontal:t,percent:e}){return t?{width:`${e}%`,height:"100%"}:{width:"100%",height:`${e}%`}}function oU({isHorizontal:t,fillColorStyle:e}){return{...t?{height:"100%"}:{width:"100%"},...e}}const sU="Loading…";function RS(t){return`${t}-label`}function iU({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 aU({ariaDescribedByProp:t,hintConnected:e,hintId:n,errorConnected:r,errorId:o}){return t??Ft(e?n:void 0,r?o:void 0)}function lU({value:t=0,indeterminate:e=!1,min:n=0,max:r=100,size:o="base",thickness:s,color:i,formatValue:a=wV,orientation:c,"aria-describedby":u}){const f=AV(),m=c??(f==null?void 0:f.orientation)??"horizontal",p=f==null?void 0:f.progressId,b=p!=null?RS(p):void 0,g=(f==null?void 0:f.hintConnected)??!1,h=(f==null?void 0:f.errorConnected)??!1,C=l.useMemo(()=>EV(t,n,r),[r,n,t]),x=l.useMemo(()=>IV(C,n,r),[C,r,n]),_=m==="horizontal",v=l.useMemo(()=>e?sU:a(C),[C,a,e]),y=aU({ariaDescribedByProp:u,hintConnected:g,hintId:f==null?void 0:f.hintId,errorConnected:h,errorId:f==null?void 0:f.errorId}),S=iU({clampedValue:C,min:n,max:r,statusText:v,indeterminate:e,labelId:b,ariaDescribedBy:y}),T=l.useMemo(()=>tU({isHorizontal:_,thickness:s}),[_,s]),L=l.useMemo(()=>nU(i),[i]),A=l.useMemo(()=>rU({isHorizontal:_,percent:x}),[_,x]),E=f==null?void 0:f.setDisplay;return l.useLayoutEffect(()=>{E==null||E({clampedValue:C,statusText:v,min:n,max:r,indeterminate:e})},[C,e,r,n,E,v]),{size:o,thickness:s,color:i,indeterminate:e,isHorizontal:_,aria:S,trackCrossStyle:T,fillColorStyle:L,fillTargetStyle:A}}function cU({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(vf,{children:[t!=null?d.jsx(Ue,{classNames:{root:i.label},children:t}):null,n!=null?d.jsx(Ui,{children:n}):e?d.jsx(Ui,{}):null]}):null,d.jsx(Tf,{...s}),r!=null?d.jsx(yf,{children:r}):null,o!=null?d.jsx(Af,{children:o}):null]})}function NS({className:t,classNames:e,...n}){const r=to();return d.jsx(Ue,{className:t,classNames:{...e,root:zn(r.label,e==null?void 0:e.root)},...n})}NS.displayName="ProgressBarLabel";function vf({children:t,className:e,...n}){const{orientation:r}=Ea(),o=to();return d.jsx("div",{className:qV({orientation:r,slotClass:o.header,className:e}),...n,children:t})}vf.displayName="ProgressBar.Header";function Ui({children:t,className:e,...n}){const{display:r}=Ea(),o=to(),s=t??(r==null?void 0:r.statusText);return s==null?null:d.jsx(ee,{as:"span",variant:"base",className:ZV({slotClass:o.value,className:e}),...n,children:s})}Ui.displayName="ProgressBar.Value";function yf({children:t,className:e,id:n,...r}){const o=Ea(),s=to();return d.jsx(Xe,{id:n??o.hintId,className:zn(s.hint,e),...r,children:t})}yf.displayName="ProgressBar.Hint";function Af({children:t,className:e,id:n,...r}){const o=Ea(),s=to();return d.jsx(Ze,{id:n??o.errorId,className:zn(s.error,e),...r,children:t})}Af.displayName="ProgressBar.Error";const Tf=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:C,isHorizontal:x,aria:_,trackCrossStyle:v,fillColorStyle:y,fillTargetStyle:S}=lU({value:e,indeterminate:n,min:r,max:o,size:s,thickness:i,color:a,formatValue:c,orientation:u,"aria-describedby":m}),{fillRef:T,reduceMotion:L}=NV({indeterminate:C,fillTargetStyle:S,isHorizontal:x});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:QV({isHorizontal:x,size:h??"base",thickness:i,slotClass:g.track,className:f}),style:v,...p,children:C?d.jsx("span",{ref:T,"aria-hidden":!0,className:eU({isHorizontal:x,hasCustomColor:!!a,reduceMotion:L,slotClass:g.indeterminateFill}),style:y}):d.jsx("span",{ref:T,"aria-hidden":!0,className:JV({isHorizontal:x,hasCustomColor:!!a,slotClass:g.fill}),style:oU({isHorizontal:x,fillColorStyle:y})})})});Tf.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 C=l.useId(),x=e??`progress-${C}`,_=Yt(x),v=Kt(x),y=RS(x),[S,T]=l.useState(null),L=l.useCallback(j=>{T(k=>RV(k,j)?k:j)},[]),A=qt(t),E=i!=null||A&&Ae(t,"ProgressBar.Hint"),I=a!=null||A&&Ae(t,"ProgressBar.Error"),w=l.useMemo(()=>({progressId:x,hintId:_,errorId:v,hintConnected:E,errorConnected:I,orientation:n,display:S,setDisplay:L}),[S,v,I,E,_,n,x,L]),N=l.useMemo(()=>({labelId:y}),[y]);return{progressId:x,isCompound:A,fieldCtx:w,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 DS({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:C,formatValue:x,..._}){const v=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:C,formatValue:x}),y=v.isCompound?t:d.jsx(cU,{label:v.label,showValue:v.showValue,valueText:v.valueText,hint:v.hint,error:v.error,trackProps:v.trackProps});return d.jsx(vV,{value:v.fieldCtx,children:d.jsx(yV,{classNames:n,children:d.jsx(Xt.Provider,{value:v.fieldLabelCtx,children:d.jsx(hn,{id:v.progressId,className:KV({orientation:v.fieldCtx.orientation,slotClass:n==null?void 0:n.root,className:e}),..._,children:y})})})})}DS.displayName="ProgressBar";const dU=Object.assign(DS,{Header:vf,Label:NS,Value:Ui,Hint:yf,Error:Af,Track:Tf});function Pn(...t){return R(...t)}function fU(t,e){return t||e}function mU(t){return!!(t.onClick||t.onKeyDown||t.onPointerDown)}function pU({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(T=>{b(T),f.current=T,ft(u,T)},[b,u]),h=No(f,p,{pointerInsideRef:m}),C=Zc(f,t&&!e,{pointerInsideRef:m});l.useEffect(()=>{if(t)return;const T=f.current;T&&V(T),m.current=!1},[t]);const x=l.useCallback(T=>{if(i==null||i(T),!t||!n||T.defaultPrevented||de())return;const L=f.current;if(L){if(e){Ro(L,m.current);return}We(L,{pointerInside:m.current,shadow:C.shadow})}},[n,e,i,t,C.shadow]),_=l.useCallback(T=>{o==null||o(T),!(!t||T.defaultPrevented)&&(r==null||r(T))},[o,r,t]),v=l.useCallback(T=>{s==null||s(T)},[s]),y=l.useCallback(T=>{a==null||a(T),!(!t||T.defaultPrevented||!n)&&(e?h.onPointerOver(T):C.onPointerOver(T))},[n,h,e,a,t,C]),S=l.useCallback(T=>{c==null||c(T),!(!t||!n)&&(e?h.onPointerOut(T):C.onPointerOut(T))},[n,h,e,c,t,C]);return{setRootRef:g,pressableLiftMotionClass:C.motionClass,handlePointerDown:x,handleClick:_,handleKeyDown:v,onPointerOver:y,onPointerOut:S,onPointerDownProp:i,onClickProp:o,onKeyDownProp:s}}function hU(){return"h3"}const sc=l.createContext({});function gU({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 no(){return l.useContext(sc)}const bU={default:"bg-surface border-token",outline:"bg-transparent border-token",secondary:"bg-secondary border-token"},CU="shadow-token-base",xU="gloss-panel flex min-w-0 flex-col rounded-mid text-foreground outline-none",_U="gloss-content flex min-w-0 flex-1 flex-col",SU="flex min-w-0 flex-col overflow-hidden rounded-mid text-foreground outline-none",vU="relative cursor-pointer focus-ring",ai="w-full border-0 p-0 text-left",yU="relative flex min-w-0 flex-1 flex-col",AU="flex shrink-0 flex-col gap-small py-plus px-large text-left",TU="flex min-w-0 flex-1 flex-col gap-xsmall text-left",LU="min-w-0 px-large pb-mid",EU="min-w-0",IU="min-w-0 text-muted",wU="mt-auto border-t-token py-plus px-large text-muted";function RU(t){return R(xU,Io,t)}function NU(t){return t?R(nn,"cursor-pointer focus-ring"):""}function DU(t,e,n,r){return R(SU,e&&R(vU,n),Io,bU[t],!e&&CU,r)}function OU({className:t="",...e}){const n=no();return d.jsx("div",{className:Pn(AU,n.header,t),...e})}function PU({className:t="",...e}){const n=no();return d.jsx("div",{className:Pn(TU,n.headingBlock,t),...e})}function kU({className:t="",...e}){const n=no();return d.jsx("div",{className:Pn(LU,n.body,t),...e})}const OS=l.forwardRef(function({className:e="",...n},r){const o=no();return d.jsx(ee,{ref:r,as:hU(),variant:"base",className:Pn(EU,o.title,e),...n})}),PS=l.forwardRef(function({className:e="",...n},r){const o=no();return d.jsx(ee,{ref:r,as:"p",variant:"base",className:Pn(IU,o.description,e),...n})});function BU({className:t="",...e}){const n=no();return d.jsx("div",{className:Pn(wU,n.footer,t),...e})}function jU({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(_U,b.glossContent),children:a});return t?d.jsx("button",{type:"button",...i,ref:s,className:R(ai,r,NU(t)),onPointerOver:c,onPointerOut:u,onPointerDown:f,onClick:m,onKeyDown:p,children:g}):n?d.jsx("button",{type:"button",...i,ref:s,className:R(ai,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(ai,o),onPointerOver:c,onPointerOut:u,onPointerDown:f,onClick:m,onKeyDown:p,children:d.jsx("div",{className:Pn(yU,b.content),children:a})}):n?d.jsx("button",{type:"button",...i,ref:s,className:R(ai,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})}OS.displayName="CardTitle";PS.displayName="CardDescription";function MU({variant:t="default",pressable:e=!1,onClick:n,onKeyDown:r,onPointerDown:o}){const s=t==="gloss",i=e&&s,a=fU(e,mU({onClick:n,onKeyDown:r,onPointerDown:o}));return{variant:t,pressable:e,isGloss:s,glossPressable:i,renderAsButton:a}}const kS=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=MU({variant:n,pressable:r,onClick:f,onKeyDown:m,onPointerDown:u}),C=pU({pressable:r,isGloss:h.isGloss,animated:o,onPress:i,onClick:f,onKeyDown:m,onPointerDown:u,onPointerOver:a,onPointerOut:c,forwardedRef:g}),x=RU(Pn(s==null?void 0:s.root,e)),_=h.isGloss?"":DU(h.variant,r,C.pressableLiftMotionClass,Pn(s==null?void 0:s.root,e));return d.jsx(gU,{classNames:s,children:d.jsx(jU,{pressable:r,isGloss:h.isGloss,renderAsButton:h.renderAsButton,glossPanelClass:x,rootClassName:_,setRootRef:C.setRootRef,rest:b,onPointerOver:C.onPointerOver,onPointerOut:C.onPointerOut,onPointerDown:r?C.handlePointerDown:C.onPointerDownProp,onClick:r?C.handleClick:C.onClickProp,onKeyDown:r?C.handleKeyDown:C.onKeyDownProp,children:p})})});kS.displayName="Card";const FU=Object.assign(kS,{Header:OU,HeadingBlock:PU,Title:OS,Description:PS,Body:kU,Footer:BU}),BS=l.createContext(null),jS=l.createContext("top"),ic=l.createContext(null),ac=l.createContext({});function GU({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 hr(){return l.useContext(ac)}function Lf(t){const e=l.useContext(BS);if(!e)throw new Error(`${t} must be used inside <Tooltip>.`);return e}function HU(){return l.useContext(jS)}function Ef(t){const e=l.useContext(ic);if(!e)throw new Error(`${t} must be inside <Tooltip.Panel> or <Tooltip.Content>.`);return e}function zU(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 VU=new Set(["TooltipIndicator","TooltipIcon","TooltipTitle","TooltipDescription","TooltipMessage"]);function Ia(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 UU(t){return Ia(t,e=>e!=null&&VU.has(e))}function $U(t){return Ia(t,e=>e==="TooltipTitle")}function WU(t){return Ia(t,e=>e==="TooltipDescription")}function XU(t){return Ia(t,e=>e==="TooltipIndicator"||e==="TooltipIcon")}function MS(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),MS(n.props.children,e)}}function YU(t,e,n,r){return n===!1||r===null?!1:r!==void 0||e!=null?!0:If(t)}function KU(t,e,n,r){if(!XU(t))return!1;let o=!1;return MS(t,s=>{YU(e,n,s.showIcon??r,s.children)&&(o=!0)}),o}function If(t){return t==="danger"||t==="success"||t==="info"||t==="warning"}function qU(t,e,n,r,o){return n===!1?!1:r?KU(o,t,e,n):e!=null?!0:If(t)}function ZU({variant:t,icon:e,showIcon:n,title:r,description:o,isCompound:s,children:i}){const a=r!=null||(s?$U(i):i!=null&&o==null),c=o!=null||s&&WU(i);return{hasIndicator:qU(t,e,n,s,i),hasTitle:a,hasDescription:c,hasAction:!1,hasClose:!1}}function QU(...t){return e=>{for(const n of t)typeof n=="function"?n(e):n&&(n.current=e)}}function fp(t){return t.type.displayName==="TooltipArrow"}function JU({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?ia(o):n(!1),()=>{i=!0};if(V(o),t)return aa({surface:o,vars:{...xo(),overwrite:"auto"}}),()=>{i=!0,V(o)};const a=la({surface:o,vars:{...xo(),overwrite:"auto"},onComplete:()=>{i||n(!1)}});return()=>{i=!0,V(o),a.kill()}},[t,e,n,r])}const e$=8,FS={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"},GS={small:"max-w-[12rem] p-small",base:"max-w-[16rem] p-base",mid:"max-w-xs p-plus",large:"max-w-sm p-mid"},t$={small:"tools",base:"small",mid:"base",large:"mid"},n$={small:"tools",base:"tools",mid:"small",large:"base"},r$={small:"icon-small",base:"icon-base",mid:"icon-mid",large:"icon-large"},o$={small:"[&_svg]:icon-small",base:"[&_svg]:icon-base",mid:"[&_svg]:icon-mid",large:"[&_svg]:icon-large"},HS={default:"text-foreground",outline:"text-foreground",secondary:"text-secondary-foreground",danger:"text-danger",success:"text-success",info:"text-info",warning:"text-warning"},zS={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"},s$="inline-flex shrink-0",i$="inline-flex shrink-0 [&_svg]:shrink-0",a$="text-muted",l$="pointer-events-none absolute z-0 size-2 rotate-45",c$="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",d$="relative overflow-visible",f$="gloss-panel gloss-deep relative z-[1] w-max min-w-0 origin-center overflow-hidden rounded-mid text-left text-foreground",m$="gloss-content",p$="contents",h$="relative z-[1] w-max min-w-0 rounded-mid text-left animate-shadow";function g$({size:t,slotClass:e,className:n}){return Wt(f$,nn,GS[t],e,n)}function b$({gridSlots:t,size:e,slotClass:n}){return Wt(Go(t,zS[e]),m$,n)}function C$({variant:t,surface:e,size:n,gridSlots:r,slotClass:o,className:s}){return e==="gloss"?g$({size:n,slotClass:o,className:s}):Wt(Go(r,zS[n]),h$,FS[t],GS[n],o,s)}function x$({variant:t,surface:e,resolvedSide:n,slotClass:r,className:o}){return Wt(l$,e==="gloss"?c$:FS[t],sb[n],r,o)}function _$({resolvedSide:t,showArrow:e,slotClass:n,className:r}){return Wt(u$,e&&ib[t],n,r)}function S$({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(!If(t))return null;const s=id[t];return d.jsx(s,{"aria-hidden":!0,className:Wt("shrink-0",r$[e],HS[t])})}function v$(t,e,n,r){return e!=null||n!=null?d.jsxs(d.Fragment,{children:[r.hasIndicator?d.jsx(mo,{}):null,e!=null?d.jsx($i,{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($i,{children:t})]}):l.isValidElement(t)?d.jsxs(d.Fragment,{children:[r.hasIndicator?d.jsx(mo,{}):null,d.jsx("div",{className:Ho(r),children:t})]}):t}function mo({className:t,children:e,showIcon:n,...r}){const o=hr(),{variant:s,size:i,icon:a,showIcon:c,gridSlots:u}=Ef("Tooltip.Indicator"),f=S$({variant:s,size:i,showIcon:n??c,icon:a,children:e});return f==null?null:d.jsx("span",{className:Wt(i$,o$[i],HS[s],Nr(u),o.indicator,o.icon,t),...r,children:f})}mo.displayName="TooltipIndicator";function VS(t){return d.jsx(mo,{...t})}VS.displayName="TooltipIcon";function US({className:t,...e}){const n=hr();return d.jsx("div",{className:Wt(p$,n.message,t),...e})}US.displayName="TooltipMessage";function $i({className:t,...e}){const n=hr(),{size:r,gridSlots:o}=Ef("Tooltip.Title");return d.jsx(ee,{as:"div",variant:t$[r],className:Wt(Ho(o),n.title,t),...e})}$i.displayName="TooltipTitle";function wf({className:t,...e}){const n=hr(),{size:r,gridSlots:o}=Ef("Tooltip.Description");return d.jsx(ee,{as:"div",variant:n$[r],className:Wt(a$,Ns(o),n.description,t),...e})}wf.displayName="TooltipDescription";function Rf({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=hr(),p=e==="gloss",b=c!=null&&UU(c),g=l.useMemo(()=>ZU({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]),C=b?c:v$(c,s,i,g),x=C$({variant:t,surface:e,size:n,gridSlots:g,slotClass:m.panel,className:a});return p?d.jsx(ic.Provider,{value:h,children:d.jsx("div",{ref:u,className:x,...f,children:d.jsx("div",{className:b$({gridSlots:g,size:n,slotClass:m.glossContent}),children:C})})}):d.jsx(ic.Provider,{value:h,children:d.jsx("div",{className:x,...f,children:C})})}Rf.displayName="TooltipPanel";const $S=l.forwardRef(function({className:e,children:n,onPointerEnter:r,onPointerLeave:o,onFocus:s,onBlur:i,...a},c){const u=hr(),{scheduleShow:f,hide:m,tooltipId:p,open:b,triggerRef:g}=Lf("Tooltip.Trigger"),h=l.useMemo(()=>({onPointerEnter:()=>f(),onPointerLeave:()=>m(),onFocus:()=>f(),onBlur:()=>m()}),[m,f]),C=l.useCallback(_=>{g.current=_,typeof c=="function"?c(_):c&&(c.current=_)},[c,g]),x=l.Children.count(n)===1&&l.isValidElement(n)?n:null;if(x){const _=x;return l.cloneElement(_,{...dp(h,{onPointerEnter:r,onPointerLeave:o,onFocus:s,onBlur:i}),className:Wt(u.root,u.trigger,_.props.className,e),"aria-describedby":zU(_.props["aria-describedby"],p,b),ref:QU(_.props.ref,C)})}return d.jsx("span",{ref:C,className:Wt(s$,u.root,u.trigger,e),"aria-describedby":b?p:void 0,tabIndex:a.tabIndex??0,...dp(h,{onPointerEnter:r,onPointerLeave:o,onFocus:s,onBlur:i}),...a,children:n})});$S.displayName="TooltipTrigger";function Nf({className:t,...e}){const n=hr(),r=HU(),{variant:o,surface:s}=Lf("Tooltip.Arrow");return d.jsx("span",{"aria-hidden":!0,className:x$({variant:o,surface:s,resolvedSide:r,slotClass:n.arrow,className:t}),...e})}Nf.displayName="TooltipArrow";const WS=l.forwardRef(function({className:e,children:n,showArrow:r=!1,offset:o=e$,...s},i){const a=hr(),{open:c,tooltipId:u,variant:f,surface:m,size:p,side:b,icon:g,showIcon:h,triggerRef:C}=Lf("Tooltip.Content"),x=l.useRef(null),_=l.useRef(null),v=m==="gloss",y=l.useMemo(()=>Mt(_,v),[v]),[S,T]=l.useState(!1),[L,A]=l.useState(b),E=l.useCallback(D=>{x.current=D,ft(i,D)},[i]),I=l.Children.toArray(n),w=I.find(D=>l.isValidElement(D)&&fp(D)),N=I.filter(D=>!(l.isValidElement(D)&&fp(D))),O=l.useCallback(()=>{const D=C.current,P=x.current;if(!D||!P)return;const F=ob(D.getBoundingClientRect(),P.getBoundingClientRect(),b,o);A(F.resolvedSide),P.style.position="fixed",P.style.left=`${F.left}px`,P.style.top=`${F.top}px`,P.style.transform=""},[o,b,C]);if(l.useLayoutEffect(()=>{c&&T(!0)},[c]),qc(x,!v,Cn),l.useLayoutEffect(()=>{if(!c)return;O();const D=window.requestAnimationFrame(()=>O()),P=()=>O();return window.addEventListener("scroll",P,!0),window.addEventListener("resize",P),()=>{window.cancelAnimationFrame(D),window.removeEventListener("scroll",P,!0),window.removeEventListener("resize",P)}},[c,O,n,r,o]),JU({open:c,portalMounted:S,setPortalMounted:T,tipRef:x}),!S||typeof document>"u")return null;const j=jo(C.current),k=d.jsx(Rf,{variant:f,surface:m,size:p,icon:g,showIcon:h,glossPanelRef:y,children:N.length===1?N[0]:N}),G=d.jsx(jS.Provider,{value:L,children:d.jsx("div",{ref:E,...j,role:"tooltip",id:u,"data-side":L,className:_$({resolvedSide:L,showArrow:r,slotClass:a.content,className:e}),...s,children:d.jsxs("div",{className:d$,children:[r?w??d.jsx(Nf,{}):null,k]})})});return Pr.createPortal(G,document.body)});WS.displayName="TooltipContent";function y$({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 C=x=>{x.key==="Escape"&&g()};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[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 XS({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}=y$({size:n,variant:r,surface:o,delayShowMs:s,side:i,icon:a,showIcon:c});return d.jsx(GU,{classNames:e,children:d.jsx(BS.Provider,{value:u,children:t})})}XS.displayName="TooltipRoot";const Ci=Object.assign(XS,{Trigger:$S,Content:WS,Arrow:Nf,Panel:Rf,Indicator:mo,Icon:VS,Message:US,Title:$i,Description:wf}),YS=l.createContext(null),lc=l.createContext({});function KS(t){const e=l.useContext(YS);if(!e)throw new Error(`${t} must be used inside <Avatar>`);return e}function qS({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 Wo(){return l.useContext(lc)}function A$(t){const e=t==null?void 0:t.trim();if(!e)return"?";const n=[...e][0];return n?n.toLocaleUpperCase():"?"}function T$(t){return t??"default"}function L$(t){return t??"base"}function E$(t){return(t==null?void 0:t.trim())||void 0}function I$(t){return!!(t!=null&&t.trim())}function w$(t){return t??"group"}function R$(t){return(t==null?void 0:t.trim())||void 0}function N$(){return"group"}const D$=!0,mp=-10,pp=1.08;function O$(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,...qh(),overwrite:"auto"})},[e,t])}function P$(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(${mp}px) scale(${pp})`;return}X.to(o,{y:mp,scale:pp,...ve(),overwrite:"auto"})}},[e,t]);return l.useEffect(()=>{const o=t.current;return()=>{o&&V(o)}},[t]),{applyLift:r,applyRest:n}}const cc={small:{root:"avatar-size-small"},base:{root:"avatar-size-base"},mid:{root:"avatar-size-mid"},large:{root:"avatar-size-large"}},k$={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 ZS(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",cc[t].root),!e&&n)}function B$(t,e){return R("gloss-wrap inline-flex shrink-0 rounded-full",cc[t].root,e)}const j$="gloss-shadow rounded-full";function M$(t,e){return R("absolute inset-0 z-[1] size-full object-cover",!t&&"pointer-events-none",e)}function F$(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 G$(t){return R("flex flex-row flex-nowrap items-center text-left",t)}function H$(t,e){return R("relative inline-flex will-change-transform",t>0&&"-ml-plus",e)}const z$="center bottom",Df=l.forwardRef(function({className:e="",onLoad:n,onError:r,...o},s){const{imageStatus:i,onImageLoad:a,onImageError:c}=KS("Avatar.Image"),u=Wo(),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 O$(g,f),d.jsx("img",{ref:m,className:M$(g,R(u.image,e)),alt:o.alt??"",onLoad:p,onError:b,...o})});Df.displayName="AvatarImage";const Of=l.forwardRef(function({className:e="",children:n,...r},o){const{label:s,imageStatus:i,size:a}=KS("Avatar.Fallback"),c=Wo(),u=i!=="loaded",m=n!=null&&n!==!1&&n!==""?n:A$(s),p=k$[a];return d.jsx("span",{ref:o,className:F$(u,R(c.fallback,e)),"aria-hidden":D$,...r,children:d.jsx(ee,{as:"span",variant:p.variant,inheritColor:!0,className:p.className,children:m})})});Of.displayName="AvatarFallback";function V$({src:t,alt:e="",loading:n}){return d.jsxs(d.Fragment,{children:[t?d.jsx(Df,{src:t,alt:e,loading:n}):null,d.jsx(Of,{})]})}const QS=l.forwardRef(function({className:e="",classNames:n,children:r,...o},s){const i=Wo(),a=l.Children.toArray(r).filter(l.isValidElement);return d.jsx(qS,{classNames:n,children:d.jsx("div",{ref:s,role:N$(),className:G$(R(i.group,e)),...o,children:a.map((c,u)=>d.jsx(U$,{stackIndex:u,children:c},c.key??u))})})});QS.displayName="AvatarGroup";function U$({stackIndex:t,children:e}){const n=l.useRef(null),r=Wo(),{applyLift:o,applyRest:s}=P$(n);return d.jsx("div",{ref:n,style:{transformOrigin:z$},className:H$(t,r.groupItem),onPointerEnter:o,onPointerLeave:s,children:e})}const JS=l.forwardRef(function({size:e,className:n,role:r,children:o,...s},i){const a=Wo();return d.jsx("div",{ref:i,role:r,className:ZS(e,!1,R(a.root,n)),...s,children:o})});JS.displayName="AvatarDefaultShell";const ev=l.forwardRef(function({size:e,className:n,role:r,children:o,...s},i){const a=Wo(),{"aria-label":c,...u}=s;return d.jsxs("div",{ref:i,className:B$(e,a.glossWrap),...u,children:[d.jsx("div",{className:j$,"aria-hidden":!0}),d.jsx("div",{role:r,className:ZS(e,!0,R(a.root,n)),"aria-label":c,children:o})]})});ev.displayName="AvatarGlossShell";function $$({variant:t,size:e,label:n,nickname:r,tooltipSize:o="base",tooltipVariant:s="default",tooltipSide:i="top",children:a,role:c}){const u=T$(t),f=L$(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]),C=qt(a),x=I$(n),_=E$(r),v=u==="gloss",y=w$(c),S=R$(n);return{variant:u,size:f,ctx:h,isCompound:C,hasLabel:x,isGloss:v,rootRole:y,ariaLabel:S,tooltip:_?{size:o,variant:s,side:i,content:_}:null}}const tv=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},C){const{size:x,ctx:_,isCompound:v,isGloss:y,rootRole:S,ariaLabel:T,tooltip:L}=$$({variant:e,size:n,label:r,nickname:a,tooltipSize:c,tooltipVariant:u,tooltipSide:f,children:b,role:g}),E={size:x,className:p,role:S,"aria-label":T,children:v?b:d.jsx(V$,{src:o,alt:s,loading:i}),...h},I=y?d.jsx(ev,{ref:C,...E}):d.jsx(JS,{ref:C,...E}),w=L?d.jsxs(Ci,{size:L.size,variant:L.variant,side:L.side,children:[d.jsx(Ci.Trigger,{children:I}),d.jsx(Ci.Content,{children:L.content})]}):I;return d.jsx(YS.Provider,{value:_,children:d.jsx(qS,{classNames:m,children:w})})});tv.displayName="AvatarRoot";const W$=Object.assign(tv,{Image:Df,Fallback:Of}),nv=l.createContext(!0),uc=l.createContext({});function X$({collapse:t,children:e}){return d.jsx(nv.Provider,{value:t,children:e})}function rv(){return l.useContext(nv)}function ov({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 Xo(){return l.useContext(uc)}const Y$="Breadcrumbs";function K$(t){return t??Y$}function q$(t){return`Show ${t} hidden sections`}const Z$="Hidden sections",Q$="Breadcrumbs.Item",J$="Breadcrumbs.List";function sv(t){if(l.isValidElement(t))return t.type.displayName}function iv(t){return l.isValidElement(t)?t.props.children:null}function av(t,e){return l.Children.toArray(t).some(n=>l.isValidElement(n)?sv(n)===e?!0:av(iv(n),e):!1)}function lv(t,e){l.Children.forEach(t,n=>{if(l.isValidElement(n)){if(sv(n)===Q$){const r=n.props;e.push({label:r.children,href:r.href,onClick:r.onClick,current:r.current,className:r.className});return}lv(iv(n),e)}})}function eW(t){return av(t,J$)}function tW(t){const e=[];return lv(t,e),e}function nW(t){return t.length<=3?[]:t.slice(1,-2)}function rW(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:nW(t)},{kind:"segment",item:t[e-2],isLast:!1},{kind:"segment",item:t[e-1],isLast:!0}]}function oW(t){return t.map((e,n)=>({kind:"segment",item:e,isLast:e.current??n===t.length-1}))}function sW(t,e){if(t.kind==="ellipsis")return"ellipsis";const n=t.item.label;return`segment-${e}-${typeof n=="string"?n:e}`}function tr(t,e,n){return R(t,e,n)}function cv(){const t=l.useRef(null),{handlePointerDown:e}=cr({isDisabled:!1,enabled:!0,textMotionRef:t});return{textRef:t,handlePointerDown:e}}const uv=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",bn,"hover:text-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"),iW=R(uv,"border-0 bg-transparent font-[inherit]"),aW=R("inline-flex min-w-0 cursor-pointer rounded-mid border-0 bg-transparent px-xsmall py-xsmall font-[inherit] text-muted outline-none",bn,"hover:text-foreground aria-expanded:text-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary");function lW(t){return R("m-0 flex list-none flex-wrap items-center gap-xsmall gap-y-xsmall p-0 text-left",t)}function cW(t){return R(t)}function uW(t){return R("flex items-center gap-xsmall",t)}function dW(t){return R("min-w-0 max-w-[min(14rem,50vw)] truncate px-xsmall py-xsmall font-w-mid text-foreground",t)}function fW(t){return R("max-w-[min(12rem,46vw)] truncate px-xsmall py-xsmall text-muted",t)}function dv(t){return R("shrink-0 text-muted opacity-75 icon-small",t)}function mW(t){return R(uv,t)}function pW(t){return R(iW,t)}function hW(t){return R("inline-flex min-w-0",t)}function hp(t){return R("inline-flex origin-center min-w-0 truncate will-change-transform",t)}function gW(t){return R(aW,t)}function bW(t){return R("inline-flex origin-center will-change-transform",t)}function CW(t){return R("tabular-nums",t)}function xW(t){return R("text-small",t)}function _W(t){return R("p-small",t)}function SW(t){return R("inline-flex",t)}function fv(t){const e=rv();return l.useMemo(()=>e?rW(t):oW(t),[e,t])}function vW({children:t}={}){return{isCompound:eW(t)}}function yW(t){const e=rv(),n=l.useMemo(()=>tW(t),[t]),r=fv(n);return{collapse:e,items:n,pieces:r}}function AW(t){return{pieces:fv(t)}}function mv(t){return null}mv.displayName="Breadcrumbs.Item";const pv=l.forwardRef(function({className:e,classNames:n,children:r,...o},s){const{pieces:i}=yW(r);return d.jsx(ov,{classNames:n,children:d.jsx(Pf,{ref:s,pieces:i,className:e,...o})})});pv.displayName="Breadcrumbs.List";const Pf=l.forwardRef(function({pieces:e,className:n,...r},o){const s=Xo();return d.jsx("ol",{ref:o,className:lW(tr("",s.list,n)),...r,children:e.map((i,a)=>d.jsx(TW,{piece:i,showSeparator:a>0},sW(i,a)))})});Pf.displayName="BreadcrumbsPiecesList";function TW({piece:t,showSeparator:e}){const n=Xo();return d.jsxs("li",{className:uW(n.listItem),children:[e?d.jsx(EW,{}):null,t.kind==="ellipsis"?d.jsx(IW,{hiddenItems:t.hiddenItems}):d.jsx(LW,{piece:t})]})}function hv({className:t,iconClassName:e,...n}){const r=Xo();return d.jsx("span",{className:SW(tr("",r.separatorWrapper,t)),...n,children:d.jsx(Ie.IoChevronForward,{className:dv(tr("",r.separator,e)),"aria-hidden":!0})})}hv.displayName="Breadcrumbs.Separator";function LW({piece:t}){const e=Xo(),{item:n,isLast:r}=t;return r?d.jsx(ee,{as:"span",variant:"small","aria-current":"page",className:dW(tr("",e.current,n.className)),children:n.label}):n.href||n.onClick?d.jsx(gv,{href:n.href,onClick:n.onClick,className:e.linkWrapper,innerClassName:tr("",e.link,n.className),textClassName:e.linkText,children:n.label}):d.jsx(ee,{as:"span",variant:"small",className:fW(tr("",e.static,n.className)),children:n.label})}function EW(){const t=Xo();return d.jsx(Ie.IoChevronForward,{className:dv(t.separator),"aria-hidden":!0})}const gv=l.forwardRef(function({href:e,onClick:n,children:r,className:o="",innerClassName:s,textClassName:i,"aria-current":a},c){const{textRef:u,handlePointerDown:f}=cv(),m=l.useCallback(b=>{u.current=b,ft(c,b)},[c,u]),p=e?mW(s):pW(s);return d.jsx("span",{className:hW(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:hp(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:hp(i),children:r})})})});gv.displayName="BreadcrumbsInteractiveCrumb";function IW({hiddenItems:t}){const e=Xo(),n=t.length,{textRef:r,handlePointerDown:o}=cv();return n===0?null:d.jsxs(Rr,{children:[d.jsx(Rr.Trigger,{"aria-label":q$(n),className:gW(e.ellipsisTrigger),onPointerDown:o,children:d.jsx("span",{ref:r,className:bW(e.ellipsisLiftWrapper),children:d.jsx(ee,{as:"span",variant:"small",className:CW(e.ellipsisText),children:"…"})})}),d.jsx(Rr.Popover,{"aria-label":Z$,bodyClassName:_W(e.ellipsisPopover),children:t.map(s=>{const i=s.href??`hidden-${String(s.label)}`;return d.jsx(wW,{item:s,className:xW(tr("",e.dropdownItem,s.className))},i)})})]})}function wW({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 RW({items:t,className:e,...n}){const{pieces:r}=AW(t);return d.jsx(Pf,{pieces:r,className:e,...n})}const bv=l.forwardRef(function({collapse:e=!0,className:n,classNames:r,items:o,children:s,"aria-label":i,...a},c){const{isCompound:u}=vW({children:s});return d.jsx(X$,{collapse:e,children:d.jsx(ov,{classNames:r,children:d.jsx("nav",{ref:c,"aria-label":K$(i),className:cW(tr("",r==null?void 0:r.root,n)),...a,children:u?s:o!=null?d.jsx(RW,{items:o}):s})})})});bv.displayName="Breadcrumbs";const NW=Object.assign(bv,{List:pv,Item:mv,Separator:hv}),kf=l.createContext(null),dc=l.createContext({});function DW({value:t,children:e}){return d.jsx(kf.Provider,{value:t,children:e})}function OW({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 PW(){const t=l.useContext(kf);if(!t)throw new Error("Pagination components must be inside <Pagination>.");return t}function Bf(){return l.useContext(kf)}function an(){return l.useContext(dc)}const kW="Pagination",BW=!0,Cv=!0,jW="Back",MW="Forward";function FW({ariaLabel:t,children:e,pageNumber:n}){if(t!=null)return t;if(e!=null)return`Page ${n}`}function Zt(...t){return R(...t)}function GW(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 HW({disabled:t,page:e}){return t??(e!=null?e<=1:!1)}function zW({disabled:t,page:e,totalPages:n}){return t??(e!=null&&n!=null?e>=n:!1)}function VW(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 UW(t){const e=l.useRef(null),n=l.useCallback(r=>{e.current=r,ft(t,r)},[t]);return VW(e),{olRef:e,setRefs:n}}const $W="flex w-full flex-wrap items-center justify-between gap-xsmall gap-y-xsmall text-left",WW="min-w-0 flex",XW="text-muted",YW="m-0 flex shrink-0 list-none flex-wrap items-center gap-xsmall p-0",KW="flex items-center",qW="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",ZW="inline-flex min-w-[1.75rem] items-center justify-center px-xsmall py-xsmall font-w-mid text-foreground tabular-nums text-base",QW="min-w-[1.75rem] tabular-nums",JW="inline-flex min-w-[1.75rem] items-center justify-center px-xsmall py-xsmall text-muted tabular-nums",e5="",t5="shrink-0 icon-small opacity-75",n5="shrink-0 icon-small opacity-75";function r5({slotClass:t,className:e}){return Zt($W,t,e)}function o5({slotClass:t,className:e}){return Zt(WW,t,e)}function s5({slotClass:t,className:e}){return Zt(XW,t,e)}function i5({slotClass:t,className:e}){return Zt(YW,t,e)}function a5({slotClass:t,className:e}){return Zt(KW,t,e)}function l5({slotClass:t,className:e}){return Zt(qW,et(),t,e)}function c5({slotClass:t,className:e}){return Zt(ZW,t,e)}function u5({slotClass:t,className:e}){return Zt(QW,t,e)}function d5({slotClass:t,className:e}){return Zt(JW,t,e)}function xv({slotClass:t,className:e}){return Zt(e5,t,e)}function f5({slotClass:t,className:e}){return Zt(t5,t,e)}function m5({slotClass:t,className:e}){return Zt(n5,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:r5({slotClass:f.root,className:n}),...c,children:e})});_v.displayName="Pagination";const wa=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,ft(i,m)},[i]),{handlePointerDown:f}=cr({isDisabled:!!r,enabled:!r,textMotionRef:c,onPointerDown:o});return d.jsx("button",{ref:u,type:"button",disabled:r,className:l5({slotClass:a.interactive,className:n}),onPointerDown:f,...s,children:e})});wa.displayName="PaginationInteractive";const Sv=l.forwardRef(function({className:e,children:n,...r},o){const s=an();return d.jsx("div",{ref:o,className:o5({slotClass:s.summary,className:e}),...r,children:d.jsx(ee,{as:"span",variant:"small",className:s5({slotClass:s.summaryText}),children:n})})});Sv.displayName="Pagination.Summary";const vv=l.forwardRef(function({className:e,children:n,...r},o){const s=an(),{setRefs:i}=UW(o);return d.jsx("ol",{ref:i,className:i5({slotClass:s.content,className:e}),...r,children:n})});vv.displayName="Pagination.Content";const Wi=l.forwardRef(function({className:e,children:n,...r},o){const s=an();return d.jsx("li",{ref:o,className:a5({slotClass:s.item,className:e}),...r,children:n})});Wi.displayName="Pagination.Item";const yv=l.forwardRef(function({disabled:e,onClick:n,children:r,"aria-label":o,...s},i){const a=Bf(),c=an(),u=a==null?void 0:a.page,f=HW({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(wa,{ref:i,disabled:f,...o!=null?{"aria-label":o}:{},onClick:m,...s,children:r??d.jsxs(d.Fragment,{children:[d.jsx(jf,{}),d.jsx(ee,{variant:"small",inheritColor:!0,as:"span",className:xv({slotClass:c.navText}),children:jW})]})})});yv.displayName="Pagination.Previous";const Av=l.forwardRef(function({disabled:e,onClick:n,children:r,"aria-label":o,...s},i){const a=Bf(),c=an(),u=a==null?void 0:a.page,f=a==null?void 0:a.totalPages,m=zW({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(wa,{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:xv({slotClass:c.navText}),children:MW}),d.jsx(Mf,{})]})})});Av.displayName="Pagination.Next";function jf({className:t}){const e=an();return d.jsx(Ie.IoChevronBack,{"aria-hidden":Cv,className:f5({slotClass:e.previousIcon,className:t})})}jf.displayName="Pagination.PreviousIcon";function Mf({className:t}){const e=an();return d.jsx(Ie.IoChevronForward,{"aria-hidden":Cv,className:m5({slotClass:e.nextIcon,className:t})})}Mf.displayName="Pagination.NextIcon";const Ff=l.forwardRef(function({page:e,isActive:n,children:r,onClick:o,className:s,"aria-label":i,...a},c){const u=Bf(),f=an(),m=n??((u==null?void 0:u.page)!=null?u.page===e:!1),p=l.useCallback(h=>{var C;o==null||o(h),!(h.defaultPrevented||m)&&((C=u==null?void 0:u.onPageChange)==null||C.call(u,e))},[m,u,o,e]),b=r??e;if(m)return d.jsx(ee,{as:"span",variant:"small","aria-current":"page",className:c5({slotClass:f.pageActive,className:s}),children:b});const g=FW({ariaLabel:i,children:r,pageNumber:e});return d.jsx(wa,{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})})});Ff.displayName="Pagination.Page";const Gf=l.forwardRef(function({className:e,...n},r){const o=an();return d.jsx(ee,{ref:r,as:"span",variant:"small","aria-hidden":BW,className:d5({slotClass:o.ellipsis,className:e}),...n,children:"…"})});Gf.displayName="Pagination.Ellipsis";function Tv(){const{page:t,totalPages:e,siblingCount:n}=PW();if(t==null||e==null)throw new Error("Pagination.Pages requires `page` and `totalPages` on the root <Pagination>.");const r=l.useMemo(()=>GW(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(Wi,{"data-flip-key":a,children:d.jsx(Gf,{})},a)}return d.jsx(Wi,{"data-flip-key":`page-${s}`,children:d.jsx(Ff,{page:s})},s)})})}Tv.displayName="Pagination.Pages";function p5({page:t,totalPages:e,onPageChange:n,siblingCount:r=1,"aria-label":o=kW}){return{contextValue:l.useMemo(()=>({page:t,totalPages:e,onPageChange:n,siblingCount:r}),[n,t,r,e]),ariaLabel:o}}const Lv=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}=p5({page:o,totalPages:s,onPageChange:i,siblingCount:a,"aria-label":c});return d.jsx(DW,{value:m,children:d.jsx(OW,{classNames:r,children:d.jsx(_v,{ref:f,className:n,page:o,totalPages:s,onPageChange:i,siblingCount:a,"aria-label":p,...u,children:e})})})});Lv.displayName="Pagination";const h5=Object.assign(Lv,{Summary:Sv,Content:vv,Item:Wi,Previous:yv,Next:Av,PreviousIcon:jf,NextIcon:Mf,Page:Ff,Pages:Tv,Ellipsis:Gf}),g5={default:"bg-surface",secondary:"bg-secondary",tertiary:"bg-tertiary"},gp={none:"",base:"shadow-token-base",mid:"shadow-token-mid",large:"shadow-token-large"},bp={none:"",small:"p-small",base:"p-base",plus:"p-plus",mid:"p-mid"},Cp={base:"rounded-base",mid:"rounded-mid",large:"rounded-large"},Ev=l.forwardRef(function({className:e="",variant:n="default",shadow:r="none",padding:o="none",radius:s="mid",children:i,...a},c){const u=wo(c,n==="gloss");return n==="gloss"?d.jsx("div",{ref:u,className:R("gloss-panel min-w-0 text-left text-foreground",Cp[s],gp[r],bp[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",g5[n],Cp[s],gp[r],bp[o],e),...a,children:i})});Ev.displayName="Surface";const Iv=l.createContext(null);function b5(){return l.useContext(Iv)}function C5({value:t,children:e}){return d.jsx(Iv.Provider,{value:t,children:e})}const wv=l.createContext(!1);function x5(){return l.useContext(wv)}function _5({children:t}){return d.jsx(wv.Provider,{value:!0,children:t})}const fc=l.createContext({});function Rv({classNames:t,children:e}){const n=l.useContext(fc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(fc.Provider,{value:r,children:e})}function Ra(){return l.useContext(fc)}function S5({variant:t,hoverLift:e=!0,forwardedRef:n,isDirectAnchorChild:r,placement:o,onPointerOver:s,onPointerOut:i,syncDeps:a}){const c=b5(),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=No(u,b&&m),C=Oo(u,b&&!m),x=l.useMemo(()=>({onPointerOver:w=>{s==null||s(w),!w.defaultPrevented&&b&&(m?h.onPointerOver(w):C.onPointerEnter(w))},onPointerOut:w=>{i==null||i(w),b&&(m?h.onPointerOut(w):C.onPointerLeave(w))}}),[h.onPointerOut,h.onPointerOver,m,i,s,b,C.onPointerEnter,C.onPointerLeave]),_=b?m?nn:C.motionClass:"",v=p&&!m?ar:"",y=l.useCallback(()=>{if(!c||!r||!c.hoverLift){c==null||c.registerLiftTarget(null);return}c.registerLiftTarget(f.current)},[r,c]),S=l.useCallback(w=>{g(w),u.current=w,w===null&&(c==null||c.registerLiftTarget(null)),ft(n,w)},[g,n,c]),{meaningChild:T,icon:L,dot:A,iconOnly:E,children:I}=a;return l.useLayoutEffect(()=>{y(),queueMicrotask(()=>{y()})},[r,c==null?void 0:c.anchorCommitGen,c==null?void 0:c.hoverLift,o,y,T,L,A,E,I]),{isGloss:m,splitLift:p,selfLiftEnabled:b,innerLiftRef:f,setMergedRef:S,pointerHandlers:x,selfLiftMotionCls:_,splitLiftMotionCls:v}}function v5(t,e){return Zc(t,e,{liftScale:Se().badgeAnchorHoverLiftScale})}function y5(t,e){t&&e&&Ss(t,Cn())}function A5(t){return typeof t["aria-label"]=="string"||typeof t["aria-labelledby"]=="string"}function T5(t){return A5(t)?{role:"img"}:{"aria-hidden":!0,role:"presentation"}}function mc(t){const e=t.props;return e["aria-hidden"]===!0||e["aria-label"]?t:l.cloneElement(t,{"aria-hidden":!0})}function Hf(t){const e=t.props["data-icon"];return e==="inline-start"||e==="start"?"inline-start":e==="inline-end"||e==="end"?"inline-end":null}function L5(t){return l.isValidElement(t)&&Hf(t)!=null}const E5={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"},I5={"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%]"},w5={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"},zf={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"},pc={small:"tools",base:"small",mid:"base",large:"mid"},R5={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"},N5={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"},D5={small:"[&_svg]:icon-small",base:"[&_svg]:icon-small",mid:"[&_svg]:icon-base",large:"[&_svg]:icon-large"},O5="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",P5="box-border isolate inline-flex items-center justify-center rounded-full whitespace-nowrap",k5="box-border isolate inline-flex shrink-0 rounded-full ring-2 ring-background motion-reduce:ring-1",li={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 B5(t,e){return t==="gloss"?e!=="default"?li[e]:li.default:e!=="default"?li[e]:li[t]}function j5(t,e){if(t==="gloss")return R("gloss-panel border-0 text-foreground",e!=="default"?xt[e]:"");if(e==="default")return E5[t];switch(t){case"default":return R(Lc[e],xt[e]);case"primary":return Yp[e];case"outline":return R("bg-transparent",Ec[e],xt[e]);case"secondary":return R("bg-secondary border-token",xt[e])}}function M5(t){return t!=="default"?xt[t]:""}function F5(t,e,n){return n?R("gloss-panel border-0",M5(e)):B5(t,e)}const G5="inline-flex shrink-0 [&_svg]:shrink-0";function Nv(t){return R(G5,D5[t])}const H5="relative isolate inline-grid w-fit shrink-0 [&>*]:col-start-1 [&>*]:row-start-1",z5="pointer-events-none",V5="pointer-events-none";function U5(t,e,n,r,o=""){return R(k5,N5[t],zf[t],F5(e,n,r),o)}function $5(t,e,n=""){return R(P5,e,R5[t],zf[t],n)}function W5(t,e,n=""){return R(O5,e,w5[t],zf[t],n)}function X5(t,e){return t&&!e?V5:""}function Y5({node:t,size:e}){return t==null||t===!1?null:typeof t=="string"?t.trim()?d.jsx(ee,{as:"span",variant:pc[e],inheritColor:!0,children:t}):null:typeof t=="number"?d.jsx(ee,{as:"span",variant:pc[e],inheritColor:!0,children:t}):l.isValidElement(t)?Hf(t)?d.jsx("span",{className:Nv(e),children:mc(t)}):t:null}function K5(t){return l.Children.toArray(t).some(L5)}function q5(t){return typeof t=="string"?t.trim().length>0:typeof t=="number"?!0:l.isValidElement(t)?Hf(t)==null:!1}function Z5(t){return l.Children.toArray(t).some(q5)}function Dv(t){return t==null||t===!1?!1:typeof t=="string"?t.trim().length>0:typeof t=="number"?!0:Array.isArray(t)?t.some(Dv):l.isValidElement(t)}function Q5(t,e){return l.Children.map(l.Children.toArray(t),(n,r)=>d.jsx(l.Fragment,{children:d.jsx(Y5,{node:n,size:e})},r))}function J5(t){return t.type.displayName==="BadgeRoot"}function eX({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:Nv(t),children:l.isValidElement(c)?mc(c):c}):null,b=i&&!s?d.jsx(ee,{as:"span",variant:pc[t],inheritColor:!0,children:e}):null,g=s?Q5(e,t):null,h=s?g:d.jsxs(d.Fragment,{children:[o==="start"&&p,b,o==="end"&&p]}),C=f?g:c?l.isValidElement(c)?mc(c):c:e,_=!!(!s&&p&&b)?o:void 0;return m?{layoutKind:"iconOnly",bodyContent:h,iconOnlyBody:C,dataIcon:_}:{layoutKind:"text",bodyContent:h,iconOnlyBody:C,dataIcon:_}}function Vf({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?T5(u):void 0,h=R(f,r,!e&&n);return e?d.jsx("span",{ref:t,"data-badge-root":!0,className:R(z5,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,X5(s,i),n),...c,...u,...g,children:p})}function tX({size:t,variant:e,status:n,shell:r,className:o,rest:s}){const i=Ra(),a=U5(t,e,n,r.isGloss,R(i.root,i.dot,o));return d.jsx(Vf,{...r,className:a,rest:s,withA11y:!0,children:null})}function nX({size:t,surfaceClass:e,shell:n,className:r,rest:o,iconOnlyBody:s}){const i=Ra(),a=$5(t,e,R(i.root,i.iconOnly,r));return d.jsx(Vf,{...n,className:a,rest:o,withA11y:!0,children:s})}function rX({size:t,surfaceClass:e,shell:n,className:r,rest:o,bodyContent:s,dataIcon:i}){const a=Ra(),c=W5(t,e,R(a.root,a.text,r));return d.jsx(Vf,{...n,className:c,rest:o,dataIcon:i,children:s})}const Ov=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(x=>{u.current=x,typeof c=="function"?c(x):c&&(c.current=x)},[c]),b=l.useCallback(x=>{f.current=x,y5(x,o)},[o]),g=l.useMemo(()=>({registerLiftTarget:b,anchorRef:u,anchorCommitGen:m,hoverLift:o}),[b,m,o]),h=v5(f,o),C=Ra();return d.jsx(Rv,{classNames:n,children:d.jsx(C5,{value:g,children:d.jsx("div",{ref:p,"data-badge-anchor":!0,className:R(H5,C.anchor,n==null?void 0:n.anchor,e),onPointerOver:x=>{s==null||s(x),x.defaultPrevented||h.onPointerOver(x)},onPointerOut:x=>{i==null||i(x),h.onPointerOut(x)},...a,children:l.Children.map(r,(x,_)=>l.isValidElement(x)&&J5(x)?d.jsx(_5,{children:x},x.key??`badge-anchor-child-${_}`):x)})})})});Ov.displayName="BadgeAnchor";function oX({variant:t,status:e,size:n,children:r,icon:o,iconOnly:s,iconPosition:i,dot:a,placement:c}){const u=x5(),f=j5(t,e),m=K5(r),p=l.useMemo(()=>m?Z5(r):Dv(r),[r,m]),b=u?c??"top-right":void 0,g=b?I5[b]:"",h=l.useMemo(()=>eX({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 Pv=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},C){const x=a,{surfaceClass:_,meaningChild:v,placementClass:y,isDirectAnchorChild:S,layoutKind:T,bodyContent:L,iconOnlyBody:A,dataIcon:E}=oX({variant:e,status:n,size:r,children:m,icon:o,iconOnly:i,iconPosition:s,dot:x,placement:c}),I=S5({variant:e,hoverLift:p,forwardedRef:C,isDirectAnchorChild:S,placement:c,onPointerOver:b,onPointerOut:g,syncDeps:{meaningChild:v,icon:o,dot:x,iconOnly:i,children:m}}),w={setMergedRef:I.setMergedRef,splitLift:I.splitLift,placementClass:y,splitLiftMotionCls:I.splitLiftMotionCls,selfLiftMotionCls:I.selfLiftMotionCls,isDirectAnchorChild:S,isGloss:I.isGloss,innerLiftRef:I.innerLiftRef,pointerHandlers:I.pointerHandlers,rest:h},N=O=>d.jsx(Rv,{classNames:u,children:O});return N(T==="dot"?d.jsx(tX,{size:r,variant:e,status:n,shell:w,className:f,rest:h}):T==="iconOnly"?d.jsx(nX,{size:r,surfaceClass:_,shell:w,className:f,rest:h,iconOnlyBody:A}):d.jsx(rX,{size:r,surfaceClass:_,shell:w,className:f,rest:h,bodyContent:L,dataIcon:E}))});Pv.displayName="BadgeRoot";const sX=Object.assign(Pv,{Anchor:Ov});function kv(...t){return R(...t)}function iX(t){return t.type.displayName==="KbdRoot"}function aX(t){const e=[];for(const n of l.Children.toArray(t)){if(!l.isValidElement(n)){n!=null&&e.push(n);continue}if(iX(n)){e.push(n);continue}e.push(n)}return e}function lX({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=No(s,a&&i),f=Oo(s,a&&!i),m=l.useCallback(h=>{c(h),s.current=h,ft(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 cX={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"},dX={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"},fX="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",mX="inline-flex items-center gap-xsmall",pX="select-none text-muted text-tools";function hX(t){return t==="gloss"?"gloss-panel gloss-deep border-0 text-foreground":cX[t]}function gX({variant:t,size:e,motionClass:n,slotRoot:r,className:o}){return kv(fX,hX(t),dX[e],n,r,o)}function bX(t,e){return R(mX,e,t)}function CX(t){return R(pX,t)}function Uf({size:t,children:e}){return d.jsx(ee,{as:"span",variant:uX[t],inheritColor:!0,children:e})}Uf.displayName="KbdText";function Bv({size:t,children:e}){return e==null||e===!1?null:l.isValidElement(e)?e:d.jsx(Uf,{size:t,children:e})}Bv.displayName="KbdBody";const hc=l.createContext({});function xX({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 _X(){return l.useContext(hc)}function SX({variant:t,size:e,className:n,classNames:r}){const o=l.useMemo(()=>gX({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 jv=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=SX({variant:e,size:n,className:o,classNames:r}),p=lX({variant:m.variant,hoverLift:i,forwardedRef:f,onPointerOver:a,onPointerOut:c});return d.jsx(xX,{classNames:r,children:d.jsx("kbd",{ref:p.setMergedRef,className:kv(m.rootClass,p.motionClass,p.glossMotionClass),...p.pointerHandlers,...u,children:d.jsx(Bv,{size:m.size,children:s})})})});jv.displayName="KbdRoot";const vX=!0;function Mv({className:t,classNames:e,separator:n="+",children:r,...o}){const s=_X(),i=aX(r);return d.jsx("span",{className:bX(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":vX,className:CX((e==null?void 0:e.separator)??s.separator),children:n}):null,a]},c))})}Mv.displayName="KbdGroup";const yX=Object.assign(jv,{Group:Mv,Text:Uf}),AX=new Set,xp="secondary";function it(...t){return R(...t)}function TX(t,e){return t==="all"?!0:t.has(e)}function LX({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 EX(t,e){if(!(!t||(e==null?void 0:e.column)!==t))return e.direction}function IX(t,e){return{column:t,direction:(e==null?void 0:e.column)===t&&e.direction==="ascending"?"descending":"ascending"}}function wX(t,e){if(t)return e==="ascending"?"ascending":e==="descending"?"descending":"none"}function RX(t,e){return t!=="none"?e:void 0}const Fv=l.createContext("default"),gc=l.createContext({}),Gv=l.createContext({selectionMode:"none",selectedKeys:new Set,onRowSelect:()=>{},isRowSelected:()=>!1,sortDescriptor:void 0,onSortChange:void 0}),Hv=l.createContext(null);function NX({variant:t,children:e}){return d.jsx(Fv.Provider,{value:t,children:e})}function DX({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 OX({value:t,children:e}){return d.jsx(Gv.Provider,{value:t,children:e})}function PX({value:t,children:e}){return d.jsx(Hv.Provider,{value:t,children:e})}function zs(){return l.useContext(Fv)}function Vn(){return l.useContext(gc)}function zv(){return l.useContext(Gv)}function kX(){return l.useContext(Hv)}const BX="w-full",jX={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"},MX="gloss-content w-full min-w-0",FX="w-full overflow-x-auto",GX="w-full",HX={default:"border-collapse",secondary:"border-collapse",toned:"border-separate border-spacing-y-xsmall",gloss:"border-collapse"},zX={default:"border-b-token",secondary:"border-b-token",toned:"",gloss:"border-b-token"},VX="group/col",UX={default:"bg-secondary px-large py-plus text-secondary-foreground whitespace-nowrap",secondary:"px-large py-plus text-secondary-foreground whitespace-nowrap",toned:"px-large py-plus text-muted whitespace-nowrap bg-transparent",gloss:"bg-transparent px-large py-plus text-muted whitespace-nowrap"},$X="cursor-pointer select-none hover:text-foreground",WX="inline-flex items-center gap-xsmall",XX="min-w-0 text-small text-left font-w-mid",YX="shrink-0 origin-center",KX="text-primary opacity-100",qX="opacity-0 group-hover/col:opacity-40 text-muted",ZX="px-large py-xlarge text-center",QX="outline-none",JX={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"},eY="cursor-pointer",tY="bg-default-hover",nY="bg-primary-tint hover:bg-primary-tint-strong",rY=R(Io,"hover:bg-primary-tint focus-visible:bg-primary-tint"),oY="focus-ring-inset",sY="text-small",iY={default:"px-large py-plus",secondary:"px-large py-plus",toned:"px-large py-plus first:rounded-l-mid last:rounded-r-mid",gloss:"px-large py-plus"},aY="ring-2 ring-inset ring-primary",lY="hover:brightness-[0.97] motion-reduce:hover:brightness-100",cY="flex flex-wrap items-center justify-between gap-base border-t-token px-mid py-plus",Vv={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 uY({variant:t,slotClass:e,className:n}){return it(BX,jX[t],e,n)}function dY({variant:t,slotClass:e,className:n}){return it(GX,HX[t],e,n)}function fY({variant:t,allowsSorting:e,slotClass:n,className:r}){return it(VX,UX[t],e&&it($X,bn),n,r)}function mY({variant:t,isToned:e,isSelectable:n,isSelected:r,slotClass:o,className:s}){return it(QX,JX[t],n&&eY,t==="gloss"&&!e&&(r?nY:rY),t!=="gloss"&&!e&&(r?tY:et()),n&&oY,o,s)}function pY({variant:t,tone:e,isSelected:n,slotClass:r,className:o}){const s=t==="toned",i=e?Vv[e]:void 0;return it(sY,iY[t],s&&i,s&&n&&aY,s&&!n&&lY,r,o)}function hY(t){return it(YX,t?KX:qX)}function gY({direction:t}){const e=Vn(),n=l.useRef(null),r=zr(t==="descending",n,()=>!0);return d.jsx("span",{ref:r,"aria-hidden":!0,className:it(hY(!!t),e.columnSortChevron),children:d.jsx(Ie.IoChevronUp,{className:"icon-xsmall"})})}function bY({selectionMode:t="none",selectedKeys:e,onSelectionChange:n,sortDescriptor:r,onSortChange:o}){const s=e??AX,i=l.useCallback(c=>TX(s,c),[s]),a=l.useCallback(c=>{const u=LX({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 Uv=l.forwardRef(function({className:e,tabIndex:n=0,...r},o){const s=Vn();return d.jsx("div",{ref:o,tabIndex:n,className:it(FX,s.scrollContainer,e),...r})});Uv.displayName="TableScrollContainer";const $v=l.forwardRef(function({selectionMode:e="none",selectedKeys:n,onSelectionChange:r,sortDescriptor:o,onSortChange:s,className:i,children:a,...c},u){const f=zs(),m=Vn(),p=bY({selectionMode:e,selectedKeys:n,onSelectionChange:r,sortDescriptor:o,onSortChange:s});return d.jsx(OX,{value:p,children:d.jsx("table",{ref:u,className:dY({variant:f,slotClass:m.content,className:i}),...c,children:a})})});$v.displayName="TableContent";const Wv=l.forwardRef(function({columns:e,children:n,className:r,...o},s){const i=zs(),a=Vn(),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(zX[i],a.headerRow),children:c})})});Wv.displayName="TableHeader";const Xv=l.forwardRef(function({id:e,allowsSorting:n=!1,isRowHeader:r=!1,children:o,className:s,onClick:i,...a},c){const u=zs(),f=Vn(),{sortDescriptor:m,onSortChange:p}=zv(),b=EX(e,m),g=l.useCallback(C=>{i==null||i(C),!(!n||!e||!p)&&p(IX(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":wX(n,b),"data-allows-sorting":n||void 0,className:fY({variant:u,allowsSorting:n,slotClass:f.column,className:s}),onClick:g,...a,children:d.jsxs("span",{className:it(WX,f.columnInner),children:[d.jsx("span",{className:it(XX,f.columnLabel),children:h}),n?d.jsx(gY,{direction:b}):null]})})});Xv.displayName="TableColumn";const Yv=l.forwardRef(function({items:e,children:n,renderEmptyState:r,className:o,...s},i){const a=Vn();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(ZX,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})});Yv.displayName="TableBody";const Kv=l.forwardRef(function({id:e,tone:n,children:r,className:o,onClick:s,...i},a){const c=zs(),u=Vn(),{selectionMode:f,isRowSelected:m,onRowSelect:p}=zv(),b=e!==void 0?m(e):!1,g=f!=="none"&&e!==void 0,h=c==="toned",C=n??(h?xp:void 0),x=l.useMemo(()=>({tone:C??xp,isSelected:b}),[b,C]),_=l.useCallback(y=>{s==null||s(y),!y.defaultPrevented&&g&&p(e)},[e,g,s,p]),v=l.useCallback(y=>{g&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),p(e))},[e,g,p]);return d.jsx(PX,{value:h||C?x:null,children:d.jsx("tr",{ref:a,"data-selected":b||void 0,"data-tone":C,"aria-selected":RX(f,b),tabIndex:g?0:void 0,className:mY({variant:c,isToned:h,isSelectable:g,isSelected:b,slotClass:u.row,className:o}),onClick:_,onKeyDown:v,...i,children:r})})});Kv.displayName="TableRow";const qv=l.forwardRef(function({className:e,...n},r){const o=zs(),s=Vn(),i=kX();return d.jsx("td",{ref:r,className:pY({variant:o,tone:i==null?void 0:i.tone,isSelected:(i==null?void 0:i.isSelected)??!1,slotClass:s.cell,className:e}),...n})});qv.displayName="TableCell";const Zv=l.forwardRef(function({className:e,...n},r){const o=Vn();return d.jsx("div",{ref:r,className:it(cY,o.footer,e),...n})});Zv.displayName="TableFooter";function CY({variant:t="default"}){return{variant:t,isGloss:t==="gloss"}}const Qv=l.forwardRef(function({variant:e="default",className:n,classNames:r,children:o,...s},i){const{variant:a,isGloss:c}=CY({variant:e}),u=wo(i,c);return d.jsx(NX,{variant:a,children:d.jsx(DX,{classNames:r,children:d.jsx("div",{ref:u,className:uY({variant:a,slotClass:r==null?void 0:r.root,className:n}),...s,children:c?d.jsx("div",{className:it(MX,r==null?void 0:r.glossContent),children:o}):o})})})});Qv.displayName="TableRoot";const xY=Object.assign(Qv,{ScrollContainer:Uv,Content:$v,Header:Wv,Column:Xv,Body:Yv,Row:Kv,Cell:qv,Footer:Zv});function _Y(){return"Previous"}function SY(){return"Next"}function vY(t,e,n,r){return`${t} ${r.months[e]} ${n}`}function Yn(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}function _p(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())}function yY(t,e){return new Date(t,e+1,0).getDate()}function AY(t,e){return(new Date(t,e,1).getDay()+6)%7}function TY(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 EY(t,e){if(t==="single"){const n=e;return n?[n]:[]}if(t==="multiple"){const n=e;return Array.isArray(n)?n:[]}return[]}function IY(t,e,n){return t!=="range"?null:e||((n==null?void 0:n.start)??null)}function wY(t,e,n){return t!=="range"||e?null:(n==null?void 0:n.end)??null}function RY(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 NY({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=yY(f,m),b=AY(f,m),g=r??(n&&o?o:null),h=n&&g?n<=g?n:g:null,C=n&&g?n<=g?g:n:null,x=[...Array(b).fill(null),...Array.from({length:p},(v,y)=>y+1)],_=x.length%7;return _!==0&&x.push(...Array(7-_).fill(null)),x.map((v,y)=>{if(v===null)return{key:`empty-${f}-${m}-${y}`,day:null};const S=new Date(f,m,v),T=`${f}-${m}-${v}`,L=Yn(S,u),A=s!=="range"&&e.some(D=>Yn(D,S)),E=s==="range"&&!!n&&Yn(S,n),I=s==="range"&&!!g&&Yn(S,g),w=s==="range"&&h&&C?S>h&&S<C:!1,N=s==="range"&&!!n&&!!g&&Yn(n,g),O=!N&&(w||I),j=!N&&(w||E),k=!!a&&S<a||!!c&&S>c;return{key:T,day:v,date:S,isToday:L,isSelected:A,isRangeStart:E,isRangeEnd:I,showLeftBg:O,showRightBg:j,isDisabled:k,circleActive:A||E||I,ariaLabel:vY(v,m,f,i)}})}function DY(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 OY(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 Jv=l.createContext(null),bc=l.createContext({});function kY({value:t,children:e}){return d.jsx(Jv.Provider,{value:t,children:e})}function BY({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 ro(){const t=l.useContext(Jv);if(!t)throw new Error("Calendar compound parts must be inside <Calendar>.");return t}function Un(){return l.useContext(bc)}function jY(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||Ne()||ht(a,!0)},[t]),o=l.useCallback(()=>{n.current=!1;const i=e.current;!i||Ne()||ht(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 MY(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||Ne()||ht(a,!0)},[t]),o=l.useCallback(()=>{n.current=!1;const i=e.current;!i||Ne()||ht(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 FY={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"},GY={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"},HY={small:"p-small gap-xsmall",base:"p-mid gap-small",mid:"p-mid gap-small",large:"p-large gap-base"},zY={small:"min-w-[15.5rem]",base:"min-w-[18rem]",mid:"min-w-[21rem]",large:"min-w-[24rem]"},VY={small:"text-small",base:"text-base",mid:"text-mid",large:"text-mid"},UY={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"},ey={small:"gap-xsmall",base:"gap-xsmall",mid:"gap-small",large:"gap-small"},$Y={small:"small",base:"base",mid:"mid",large:"mid"},ty={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"},XY={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"},YY="inline-flex flex-col select-none text-left text-foreground",KY="gloss-panel gloss-deep rounded-large",qY="gloss-content flex flex-col",ZY="pointer-events-none absolute inset-y-0 bg-default-hover",QY="flex items-center gap-xsmall",JY="flex-1 rounded-base py-xsmall text-center font-w-mid",e3="cursor-pointer hover:text-primary focus-ring",t3="cursor-default",n3="min-w-0",r3="grid grid-cols-7 gap-xsmall",o3="grid grid-cols-7 gap-xsmall",s3="flex items-center justify-center font-w-mid text-muted",i3="relative flex items-center justify-center",a3="relative z-10",l3="grid grid-cols-3",c3="grid grid-cols-4",u3="flex items-center justify-between border-t-token pt-small",d3=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"),f3="group/calendar-cell relative inline-flex origin-center items-center justify-center overflow-hidden outline-none will-change-transform focus-ring rounded-mid",m3=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"),p3=R(JY,bn),h3="relative z-[1] min-w-0 shrink-0 leading-none",g3="absolute bottom-[3px] left-1/2 z-[1] h-[3px] w-[3px] -translate-x-1/2 rounded-full bg-primary",Sp="icon-xsmall",b3="bg-transparent font-w-mid text-primary-foreground",C3="font-w-mid text-primary",x3="text-foreground",_3="cursor-not-allowed opacity-35",S3="cursor-pointer",v3="text-muted",y3="text-muted",A3={opacity:0};function T3(t){return R(d3,GY[t])}function L3(t,e,n,r){return R(YY,n?KY:UY[t],HY[e],zY[e],r)}function E3(t){return t==="left"?"left-0 right-1/2":"left-1/2 right-0"}function I3(t,e){return e==="day"?ty[t]:XY[t]}function w3(t,e){return e==="day"?$Y[t]:WY[t]}function R3({selected:t,isToday:e,isCurrent:n}){return t?b3:e||n?C3:x3}function N3(t,e,n,r){return R(f3,I3(t,e),R3({selected:n.selected,isToday:n.isToday,isCurrent:n.isCurrent}),!n.selected&&!n.disabled&&et(),n.disabled?_3:S3,r)}function D3(t){return R(s3,FY[t])}function O3(t){return R(l3,ey[t])}function P3(t){return R(c3,ey[t])}function k3(t,e){return t&&!e?v3:void 0}function B3(t,e){return R(p3,VY[t],e!=="years"?e3:t3)}function vp({visible:t,side:e}){const n=Un(),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,...qh(),overwrite:"auto"})},[t]),d.jsx("div",{ref:r,"aria-hidden":!0,className:Ke(R(ZY,E3(e)),n.rangeHalfFill),style:A3})}function yp({direction:t,size:e,onClick:n,disabled:r}){const o=Un(),s=jY(r),i=t==="prev"?_Y():SY(),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(T3(e),a),children:t==="prev"?d.jsx(Ie.IoChevronBack,{className:Sp}):d.jsx(Ie.IoChevronForward,{className:Sp})})}const j3=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 C=l.useRef(null),x=l.useRef(m),_=l.useRef(p),v=l.useRef(b);x.current=m,_.current=p,v.current=b;const{bindFillRef:y}=ex(e,C),S=MY(n),T=Un(),L=a==="month"?T.monthCell:a==="year"?T.yearCell:T.dayCell,A=w3(r,i),E=l.useCallback(O=>{S.btnRef.current=O,typeof h=="function"?h(O):h&&(h.current=O)},[S.btnRef,h]),I=l.useCallback(()=>{n||x.current()},[n]),w=l.useCallback(O=>{var j;(j=_.current)==null||j.call(_),S.handlePointerEnter(O)},[S]),N=l.useCallback(()=>{var O;(O=v.current)==null||O.call(v),S.handlePointerLeave()},[S]);return d.jsxs("button",{ref:E,type:"button","aria-label":o,"aria-pressed":s,"aria-disabled":n,disabled:n,onClick:I,onPointerEnter:w,onPointerLeave:N,onPointerDown:S.handlePointerDown,className:N3(r,i,{selected:e,disabled:n,isToday:c,isCurrent:u},Ke(T.cell,L,f)),children:[d.jsx("span",{ref:y,"aria-hidden":!0,className:Ke(m3,T.cellFill)}),d.jsx(ee,{variant:A,as:"span",inheritColor:!0,className:Ke(h3,T.cellText),children:g}),c&&!e&&d.jsx("span",{"aria-hidden":!0,className:Ke(g3,T.cellTodayDot)})]})});function M3(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 Na=l.memo(j3,M3);function F3(){const t=Un(),{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(()=>NY({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(r3,t.weekdayGrid),children:f.weekDays.map(h=>d.jsx("div",{className:Ke(D3(c),t.weekdayCell),children:h},h))}),d.jsx("div",{className:Ke(o3,t.daysGrid),children:g.map(h=>h.day===null?d.jsx("div",{className:ty[c]},h.key):d.jsxs("div",{className:Ke(i3,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(Na,{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:a3,children:h.day})]},h.key))})]})}function G3(){const t=Un(),{viewDate:e,onMonthPress:n,selectedDates:r,size:o,locale:s,today:i}=ro(),a=l.useMemo(()=>DY(e,r,s,i),[e,r,s,i]);return d.jsx("div",{className:Ke(O3(o),t.monthsGrid),children:a.map(c=>d.jsx(Na,{selected:c.isSelected,isCurrent:c.isCurrentMonth,size:o,cellKind:"month",rounded:"picker",onPress:()=>n(c.month),children:c.name},c.month))})}function H3(){const t=Un(),{viewDate:e,onYearPress:n,selectedDates:r,size:o,today:s}=ro(),i=l.useMemo(()=>OY(e,r,s),[e,r,s]);return d.jsx("div",{className:Ke(P3(o),t.yearsGrid),children:i.map(a=>d.jsx(Na,{selected:a.isSelected,isCurrent:a.isCurrentYear,size:o,cellKind:"year",rounded:"picker",onPress:()=>n(a.year),className:k3(a.outOfDecade,a.isSelected),children:a.year},a.year))})}const $f=l.forwardRef(function({className:e="",...n},r){const o=Un(),{view:s,setView:i,viewDate:a,navigate:c,size:u,locale:f}=ro(),m=l.useMemo(()=>TY(s,a,f),[s,a,f]);return d.jsxs("div",{ref:r,className:Ke(QY,o.header,e),...n,children:[d.jsx(yp,{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(B3(u,s),o.headerTitle),children:m}),d.jsx(yp,{direction:"next",size:u,onClick:()=>c(1)})]})}),Wf=l.forwardRef(function({className:e="",...n},r){const o=Un(),{view:s}=ro();return d.jsxs("div",{ref:r,className:Ke(n3,o.grid,e),...n,children:[s==="days"&&d.jsx(F3,{}),s==="months"&&d.jsx(G3,{}),s==="years"&&d.jsx(H3,{})]})}),ny=l.forwardRef(function({className:e="",...n},r){const o=Un(),{onClear:s,onToday:i,locale:a}=ro();return d.jsxs("div",{ref:r,className:Ke(u3,o.footer,e),...n,children:[d.jsx(yo,{variant:"ghost",size:"small",className:Ke(y3,o.footerToday),onClick:i,children:a.today}),d.jsx(yo,{variant:"ghost",size:"small",status:"danger",className:o.footerClear,onClick:s,children:a.clear})]})});$f.displayName="Calendar.Header";Wf.displayName="Calendar.Grid";ny.displayName="Calendar.Footer";Na.displayName="CalendarInteractiveCell";function z3(){return d.jsxs(d.Fragment,{children:[d.jsx($f,{}),d.jsx(Wf,{})]})}const ry={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 V3(t){const{mode:e="single",variant:n="default",size:r="base",defaultMonth:o,initialView:s="days",locale:i=ry,minDate:a,maxDate:c,value:u,defaultValue:f,onValueChange:m}=t,p=n==="gloss",b=l.useMemo(()=>_p(new Date),[]),g=u!==void 0,[h,C]=l.useState(()=>PY(e,f)),x=g?u:h,_=l.useRef(x);_.current=x;const v=l.useCallback(W=>{const M=_.current,z=typeof W=="function"?W(M):W;_.current=z,g||C(z),m==null||m(z)},[g,m]),[y,S]=l.useState(s),[T,L]=l.useState(()=>LY(o,e,x,b)),[A,E]=l.useState(null),[I,w]=l.useState(null),N=l.useMemo(()=>EY(e,x),[e,x]),O=l.useMemo(()=>IY(e,A,x),[e,A,x]),j=l.useMemo(()=>wY(e,A,x),[e,A,x]),k=l.useCallback(W=>{L(M=>RY(M,y,W))},[y]),G=l.useCallback(W=>{const M=_p(W);if(e==="single")v(z=>{const H=z instanceof Date?z:null;return H&&Yn(H,M)?null:M});else if(e==="multiple")v(z=>{const H=Array.isArray(z)?z:[],oe=H.findIndex(pe=>Yn(pe,M));return oe>=0?H.filter((pe,ce)=>ce!==oe):[...H,M]});else if(!A)E(M),v({start:null,end:null});else if(Yn(M,A))E(null);else{const z=M<=A?M:A,H=M<=A?A:M;E(null),w(null),v({start:z,end:H})}},[e,A,v]),D=l.useCallback(W=>{L(new Date(T.getFullYear(),W,1)),S("days")},[T]),P=l.useCallback(W=>{L(new Date(W,T.getMonth(),1)),S("months")},[T]),F=l.useCallback(()=>{E(null),w(null),v(e==="single"?null:e==="multiple"?[]:{start:null,end:null})},[e,v]),B=l.useCallback(()=>{L(new Date(b.getFullYear(),b.getMonth(),1)),S("days")},[b]),$=l.useMemo(()=>({mode:e,view:y,setView:S,viewDate:T,navigate:k,selectedDates:N,rangeStart:O,rangeEnd:j,hoverDate:I,setHoverDate:w,onDayPress:G,onMonthPress:D,onYearPress:P,onClear:F,onToday:B,size:r,variant:n,locale:i,minDate:a,maxDate:c,today:b}),[e,y,T,k,N,O,j,I,G,D,P,F,B,r,n,i,a,c,b]);return{isGloss:p,variant:n,size:r,contextValue:$,today:b}}const oy=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:C="",...x}=e,{isGloss:_,contextValue:v}=V3(e),y=wo(n,_),S=h??d.jsx(z3,{});return d.jsx(kY,{value:v,children:d.jsx(BY,{classNames:g,children:d.jsx("div",{ref:y,className:L3(v.variant,v.size,_,Ke("",g==null?void 0:g.root,C)),...x,children:_?d.jsx("div",{className:R(qY,g==null?void 0:g.glossContent),children:S}):S})})})});oy.displayName="Calendar";const U3=Object.assign(oy,{Header:$f,Grid:Wf,Footer:ny}),sy=l.createContext(null),Cc=l.createContext({});function $3({value:t,children:e}){return d.jsx(sy.Provider,{value:t,children:e})}function W3({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 Da(){const t=l.useContext(sy);if(!t)throw new Error("ColorPicker compound parts must be inside <ColorPicker>.");return t}function Yo(){return l.useContext(Cc)}const X3="Saturation and brightness",Y3="Color selection",K3="Hex code of the color",q3="Transparency (%)";function Z3(t){return`Selected color: ${t}`}function bs(t,e,n){return Math.max(e,Math.min(n,t))}function Or({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 iy({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 ay({r:t,g:e,b:n,a:r}){const o=i=>Math.round(bs(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 ly(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 xc(t){return ay(Or(t))}function Vs(t){const e=ly(t);return e?iy(e):null}function cy(t){const{r:e,g:n,b:r}=Or(t);return t.a<100?`rgba(${e},${n},${r},${(t.a/100).toFixed(2)})`:`rgb(${e},${n},${r})`}function Xi(t){const{r:e,g:n,b:r}=Or({h:t,s:100,v:100,a:100});return`rgb(${e},${n},${r})`}function Q3(t,e){const n=e?"to right":"to top",{r,g:o,b:s}=Or(t);return{background:`linear-gradient(${n}, rgba(${r},${o},${s},0), rgb(${r},${o},${s}))`}}function J3({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=bs((i-u.left)/u.width*100,0,100),m=bs(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 pt(...t){return R(...t)}const uy="#3b82f6",eK={h:217,s:90,v:96,a:100};function tK(t,e){return Vs(t??e??uy)??eK}const dy={small:"small",base:"base",mid:"mid"},nK={small:"small",base:"base",mid:"mid"},rK={small:"w-52",base:"w-64",mid:"w-72"},oK={small:"h-32",base:"h-40",mid:"h-48"},sK={small:"p-small gap-small",base:"p-plus gap-plus",mid:"p-mid gap-mid"},iK="relative w-full touch-none select-none rounded-small cursor-crosshair overflow-hidden",aK="pointer-events-none absolute z-10 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-token-mid",lK="flex items-center gap-small",cK="flex min-w-0 flex-1 flex-col gap-xsmall",uK="flex items-center gap-small",dK="flex items-center gap-xsmall rounded-small border-token bg-secondary px-small py-xsmall",fK="text-small text-muted select-none",mK=`min-w-0 flex-1 bg-transparent text-small font-mono uppercase text-foreground outline-none ${Et}`,pK="flex items-center gap-xsmall rounded-small border-token bg-secondary px-small py-xsmall",hK=`w-8 bg-transparent text-right text-small font-mono text-foreground outline-none ${Et}`,gK="text-small text-muted select-none",bK="flex flex-wrap gap-xsmall border-t-token pt-small",CK="flex flex-col rounded-mid text-foreground";function xK(t,e){return pt(CK,rK[t],sK[t],e)}function _K(t,e){return pt(iK,oK[t],e)}const SK="overflow-hidden rounded-full",vK="opacity-48",Ap="flex flex-col gap-xsmall",yK="flex items-center justify-between",AK={hue:"Hue",saturation:"Saturation",value:"Value",alpha:"Alpha",red:"Red",green:"Green",blue:"Blue"};function TK({size:t,orientation:e,disabled:n,className:r}){return R(oS({isHorizontal:e==="horizontal",size:t,className:r}),SK,n&&vK)}function LK(t,e,n){const r=n==="horizontal";if(t==="alpha")return Q3(e,r);const o=r?"to right":"to top",{r:s,g:i,b:a}=Or(e);switch(t){case"hue":return{background:`linear-gradient(${o}, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)`};case"saturation":{const c=Or({...e,s:0}),u=Xi(e.h);return{background:`linear-gradient(${o}, rgb(${c.r},${c.g},${c.b}), ${u})`}}case"value":{const c=Xi(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 EK={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 IK(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 Lo=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}=EK[e],[h,C]=IK(r,o,fy[e]),x=l.useRef(!1),_=l.useRef(null),[v,y]=l.useState(!1),[S,T]=l.useState(0),L=l.useMemo(()=>rS(void 0,i),[i]),[A,E]=l.useState(L);l.useLayoutEffect(()=>{const P=_.current;if(!P)return;const F=()=>{const $=P.getBoundingClientRect(),{trackSpanPx:W,thumbSpanPx:M}=gi($,a);T(W),M>0&&E(z=>z===M?z:M)};F();const B=new ResizeObserver(F);return B.observe(P),()=>B.disconnect()},[a]);const I=l.useCallback(P=>{_.current=P,typeof m=="function"?m(P):m&&(m.current=P)},[m]),w=l.useCallback(P=>{const F=bs(Math.round(P/g)*g,p,b);C(F),s==null||s(F)},[p,b,g,C,s]),N=A>0?A:L,O=l.useCallback((P,F)=>{const B=_.current;if(!B||c)return;const $=B.getBoundingClientRect();w(ec(P,F,$,a,p,b,N))},[c,N,w,b,p,a]);l.useEffect(()=>{const P=B=>{x.current&&O(B.clientX,B.clientY)},F=()=>{x.current=!1,y(!1)};return window.addEventListener("pointermove",P),window.addEventListener("pointerup",F),window.addEventListener("pointercancel",F),()=>{window.removeEventListener("pointermove",P),window.removeEventListener("pointerup",F),window.removeEventListener("pointercancel",F)}},[O]);const j=l.useCallback(P=>{c||P.button!==0||(P.preventDefault(),x.current=!0,y(!0),O(P.clientX,P.clientY))},[c,O]),k=l.useCallback(P=>{c||P.button!==0||(P.stopPropagation(),x.current=!0,y(!0),P.currentTarget.setPointerCapture(P.pointerId))},[c]),G=l.useCallback(P=>{if(c)return;let F=0;if(a==="horizontal"){if(P.key==="ArrowRight")F=g;else if(P.key==="ArrowLeft")F=-g;else if(P.key==="PageUp")F=g*10;else if(P.key==="PageDown")F=-g*10;else if(P.key==="Home"){w(p);return}else if(P.key==="End"){w(b);return}}else if(P.key==="ArrowUp")F=g;else if(P.key==="ArrowDown")F=-g;else if(P.key==="Home"){w(p);return}else if(P.key==="End"){w(b);return}F!==0&&(P.preventDefault(),w(h+F))},[c,a,g,p,b,h,w]),D=Jl(h,p,b,S,N);return d.jsx("div",{ref:I,role:"presentation",className:TK({size:i,orientation:a,disabled:c,className:u}),style:LK(e,n,a),onPointerDown:j,...f,children:d.jsx(bi,{size:i,percent:D,orientation:a,disabled:c,active:v,ariaLabel:AK[e],ariaValueNow:h,ariaValueMin:p,ariaValueMax:b,onPointerDown:k,onKeyDown:G})})});Lo.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(Ap,i),children:a}):d.jsxs("div",{ref:u,className:R(Ap,i),children:[r?d.jsxs("div",{className:yK,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(Lo,{channel:e,color:n,size:o,orientation:s,...c})]})});my.displayName="ColorSliderRoot";const Tp={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"},Lp={circle:"rounded-full",rounded:"rounded-small",square:"rounded-none"};function wK(t,e){if(typeof e["aria-label"]=="string")return e["aria-label"];if(typeof e["aria-labelledby"]!="string")return`Select color ${t}`}const Us=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:C}=Qi({isGloss:!1,animated:!0,enabled:!s,hasHoverShadow:!0,forwardedRef:p,onPointerEnter:c,onPointerLeave:u,onPointerDown:f}),{"aria-label":x,..._}=m,v=!!a,y=typeof x=="string"||typeof _["aria-labelledby"]=="string";if(!v&&!y)return d.jsx("span",{"aria-hidden":!0,className:R("relative shrink-0 overflow-hidden",Tp[n],Lp[r],i),style:{backgroundColor:e}});const S=x??(v?wK(e,m):void 0);return d.jsx("button",{ref:b,type:"button",disabled:s,onClick:a,onPointerEnter:g,onPointerLeave:h,onPointerDown:C,"aria-label":S,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",ar,Tp[n],Lp[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},..._})});Us.displayName="ColorSwatch";function RK({size:t}){const{hsva:e,setHsva:n}=Da(),r=Yo(),{areaRef:o,handlePointerDown:s}=J3({hsva:e,setHsva:n}),i=Xi(e.h),a=cy(e);return d.jsx("div",{ref:o,role:"group","aria-label":X3,className:_K(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:pt(aK,r.areaThumb),style:{left:`${e.s}%`,top:`${100-e.v}%`,width:"14px",height:"14px",backgroundColor:a}})})}function NK({hex:t,setHsva:e}){const n=Yo(),[r,o]=l.useState(!1),[s,i]=l.useState(""),a=l.useCallback(u=>{const f=`#${u}`,m=Vs(f);m&&e(m)},[e]),c=r?s:t.slice(1);return d.jsxs("div",{className:pt(dK,n.hexInput),children:[d.jsx("span",{className:pt(fK,n.hexPrefix),children:"#"}),d.jsx("input",{type:"text",value:c,maxLength:8,spellCheck:!1,"aria-label":K3,className:pt(mK,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 DK({hsva:t,setHsva:e}){const n=Yo();return d.jsxs("div",{className:pt(pK,n.alphaInput),children:[d.jsx("input",{type:"text",value:Math.round(t.a),"aria-label":q3,className:pt(hK,n.alphaInputField,Et),onChange:r=>{const o=parseInt(r.target.value,10);Number.isNaN(o)||e({...t,a:bs(o,0,100)})}}),d.jsx("span",{className:pt(gK,n.alphaSuffix),children:"%"})]})}function OK({presets:t,hex:e,setHsva:n,size:r}){const o=Yo();return d.jsx("div",{className:pt(bK,o.presets),children:t.map(s=>d.jsx(Us,{color:s,size:dy[r],shape:"rounded",selected:e.toLowerCase()===s.toLowerCase(),className:o.presetSwatch,onClick:()=>{const i=Vs(s);i&&n(i)}},s))})}const py=l.forwardRef(function({swatchSize:e,className:n,...r},o){const{hex:s,disabled:i,size:a}=Da(),c=Yo();return d.jsx(Pt.Trigger,{ref:o,className:pt(c.trigger,n),...r,children:d.jsx(Us,{color:s,size:e??dy[a],shape:"rounded",disabled:i,"aria-label":Z3(s)})})});py.displayName="ColorPickerTrigger";const hy=l.forwardRef(function({showAlpha:e=!1,presets:n,className:r,...o},s){const{hsva:i,setHsva:a,hex:c,size:u}=Da(),f=Yo(),m=nK[u];return d.jsx(Pt.Content,{ref:s,unstyled:!0,offset:ws,align:"start","aria-label":Y3,className:pt(f.content,r),children:d.jsxs("div",{className:xK(u,f.contentPanel),...o,children:[d.jsx(RK,{size:u}),d.jsxs("div",{className:pt(lK,f.slidersRow),children:[d.jsx(Us,{color:c,size:"mid",shape:"circle",className:pt("shrink-0",f.previewSwatch)}),d.jsxs("div",{className:cK,children:[d.jsx(Lo,{channel:"hue",color:i,value:i.h,size:m,className:f.hueSlider,onValueChange:p=>a({...i,h:p})}),e?d.jsx(Lo,{channel:"alpha",color:i,value:i.a,size:m,className:f.alphaSlider,onValueChange:p=>a({...i,a:p})}):null]})]}),d.jsxs("div",{className:pt(uK,f.inputsRow),children:[d.jsx(NK,{hex:c,setHsva:a}),e?d.jsx(DK,{hsva:i,setHsva:a}):null]}),n&&n.length>0?d.jsx(OK,{presets:n,hex:c,setHsva:a,size:u}):null]})})});hy.displayName="ColorPickerContent";function PK({value:t,defaultValue:e=uy,onValueChange:n,size:r="base",disabled:o=!1}){const s=t!==void 0,[i,a]=l.useState(()=>tK(t,e)),c=l.useMemo(()=>s&&t!=null?Vs(t)??i:i,[i,s,t]),u=l.useCallback(p=>{s||a(p),n==null||n(xc(p))},[s,n]),f=xc(c);return{contextValue:l.useMemo(()=>({hsva:c,setHsva:u,hex:f,disabled:o,size:r}),[c,u,f,o,r])}}function gy({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}=PK({value:e,defaultValue:n,onValueChange:r,size:a,disabled:f});return d.jsx($3,{value:p,children:d.jsx(W3,{classNames:m,children:d.jsx(Pt,{open:o,defaultOpen:s,onOpenChange:i,side:u,variant:c==="gloss"?"gloss":"default",children:t})})})}gy.displayName="ColorPickerRoot";const kK=Object.assign(gy,{Trigger:py,Content:hy}),BK=Object.assign(my,{Track:Lo}),Xf=l.createContext(null),_c=l.createContext({});function jK({value:t,children:e}){return d.jsx(Xf.Provider,{value:t,children:e})}function MK({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 by(){const t=l.useContext(Xf);if(!t)throw new Error("Components TimeField must be inside <TimeField>.");return t}function FK(){return l.useContext(Xf)}function $s(){return l.useContext(_c)}const GK="Time",HK={h:"hours",m:"minutes",s:"seconds"};function zK({labelConnected:t,labelId:e}){return{"aria-label":t?void 0:GK,"aria-labelledby":t?e:void 0}}function VK({seg:t,value:e,isRequired:n,isDanger:r,isFirstSegment:o,disabled:s}){return{role:"spinbutton","aria-label":HK[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 UK(t){return t==="danger"||t==="default"?"default":t}function dt(...t){return R(...t)}const Sc={h:23,m:59,s:59};function Ep(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 $K(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 Ip(t,e){return t[e]}function Xn(t,e,n){const r=Math.max(0,Math.min(Sc[e],n));return{...t,[e]:r}}function WK(t,e,n,r){const o=t!==void 0,[s,i]=l.useState(()=>Ep(t??e)),a=o?Ep(t):s,c=l.useCallback(u=>{o||i(u),r==null||r($K(u,n))},[n,o,r]);return[a,c,o]}function XK(t){return t==="HH:mm:ss"?["h","m","s"]:["h","m"]}const YK={default:"bg-surface",segmented:"bg-surface"},KK={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},qK={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},ZK="bg-primary-tint",QK="border-r-token",JK="border-l-token",e4=`pointer-events-none absolute h-px w-px opacity-0 ${Et}`,t4="inline-flex min-w-[2ch] select-none items-center justify-center outline-none",n4="h-[1.65em] min-w-[2.25ch] rounded-small px-[3px] bg-default-hover",r4="rounded-[3px] px-[2px]",o4="bg-primary text-primary-foreground",s4="cursor-not-allowed",i4="cursor-default",a4="inline-flex w-[0.45em] shrink-0 select-none items-center justify-center self-center text-muted",l4="mx-[1px]",c4="relative flex min-w-0 flex-1 items-center font-mono tabular-nums leading-none",u4="flex min-w-0 w-full items-stretch",d4="gap-xsmall",f4={small:Rn("small"),base:Rn("base"),mid:Rn("mid"),large:Rn("large")};function m4(t){return t==="default"?ZK:qK[t]}function p4({side:t,status:e,size:n,slotClass:r}){return dt(f4[n],m4(e),t==="prefix"?QK:JK,r)}function h4({variant:t,status:e,statusTinted:n}){return t==="gloss"?"gloss-control":n&&e!=="default"?dt(KK[e],"border-token"):dt(t==="outline"?"bg-transparent border-token":dt(YK[t],"border-token"))}function g4({variant:t,status:e,disabled:n,compact:r,shellSurface:o,glossShellHoverMotionClass:s,standardShellHoverMotionClass:i,slotClass:a,className:c}){const u=t==="gloss";return dt("m-0 min-w-0 overflow-hidden rounded-base p-0",u?"relative":dt("border-1"),r?"w-fit shrink-0":"w-full min-w-0",o,Ur,$r,u?"":Vr(!n,e),u?s:i,n?"cursor-not-allowed opacity-55 shadow-token-base":"",a,c)}function b4({variant:t}){return dt(u4,!(t==="gloss")&&dt("min-h-full"))}function C4({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 dt(c4,n?"justify-center px-small":o.padX,o.padY,t==="segmented"&&d4,s,r)}function x4({variant:t,focused:e,disabled:n,slotClass:r}){return dt(t4,t==="segmented"?n4:r4,e&&o4,n?s4:i4,r)}function _4({variant:t,slotClass:e}){return dt(a4,t==="segmented"&&l4,e)}function S4({compact:t,slotClass:e,className:n}){return dt(t&&"w-fit",e,n)}function v4({shellRef:t,disabled:e,variant:n,onPointerDown:r,onPointerEnter:o,onPointerLeave:s}){const i=n==="gloss",a=Mo(t,!e&&!i),c=Do(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 y4({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=FK(),h=s??(g==null?void 0:g.size)??"base",C=i??(g==null?void 0:g.status)??"default",x=a??(g==null?void 0:g.variant)??"default",_=c??(g==null?void 0:g.compact)??!1,v=x==="gloss",y=g==null?void 0:g.fieldId,S=(g==null?void 0:g.labelId)??"",T=(g==null?void 0:g.labelConnected)??!1,L=(g==null?void 0:g.isRequired)??!1,[A,E]=WK(t,e,r,n),I=l.useRef(null),[w,N]=l.useState(null),O=l.useRef(null),j=l.useRef(null),k=l.useRef(null),G=l.useRef(null),D=l.useRef(null),P=l.useMemo(()=>({h:k,m:G,s:D}),[]),F=l.useMemo(()=>XK(r),[r]),B=l.useCallback(q=>{O.current=q,typeof b=="function"?b(q):b&&(b.current=q)},[b]),$=v4({shellRef:O,disabled:o,variant:x,onPointerDown:f,onPointerEnter:m,onPointerLeave:p}),W=l.useCallback(q=>{$.bindShellRef(q,B)},[B,$]),M=l.useCallback(q=>{var se,ue;I.current=null,N(q),(se=O.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=I.current;q&&(E(Xn(A,q.seg,q.digit)),I.current=null)},[A,E]),oe=l.useCallback((q,se)=>{const ue=Sc[q],Be=I.current;if(Be&&Be.seg===q){const mt=Be.digit*10+se;mt>ue?(E(Xn(A,q,Be.digit)),se*10>ue?(E(Xn(A,q,Math.min(se,ue))),I.current=null,z(q,"next")):I.current={seg:q,digit:se}):(E(Xn(A,q,mt)),I.current=null,z(q,"next"))}else se*10>ue?(E(Xn(A,q,Math.min(se,ue))),I.current=null,z(q,"next")):(I.current={seg:q,digit:se},E(Xn(A,q,se)))},[A,z,E]),pe=l.useCallback((q,se)=>{if(o)return;const ue=Sc[se],Be=parseInt(q.key,10);if(!Number.isNaN(Be))q.preventDefault(),oe(se,Be);else if(q.key==="ArrowUp"){q.preventDefault(),I.current=null;const mt=Ip(A,se);E(Xn(A,se,mt>=ue?0:mt+1))}else if(q.key==="ArrowDown"){q.preventDefault(),I.current=null;const mt=Ip(A,se);E(Xn(A,se,mt<=0?ue:mt-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,A,z,E]),ce=l.useCallback(q=>{const se=O.current,ue=q.relatedTarget;if(!(se&&ue&&se.contains(ue))){if(se&&ue==null){requestAnimationFrame(()=>{const Be=document.activeElement;se.contains(Be)||(H(),N(null))});return}H(),N(null)}},[H]),Y=l.useCallback(q=>{I.current=null,N(q)},[]),ne=l.useCallback(q=>{const se=q.currentTarget.value;if(q.currentTarget.value="",!(o||!w))for(const ue of se){const Be=parseInt(ue,10);Number.isNaN(Be)||oe(w,Be)}},[oe,o,w]),me=l.useCallback(q=>{o||!w||pe(q,w)},[o,w,pe]),re=l.useCallback((q,se)=>{q.stopPropagation(),M(se)},[M]),Ce=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=I.current)==null?void 0:se.seg)===q&&w===q},U=q=>te(q)?String(I.current.digit):String(A[q]).padStart(2,"0"),he=h4({variant:x,status:C,statusTinted:C==="danger"||C==="success"||C==="warning"}),De=zK({labelConnected:T,labelId:S}),Ye=Ft(g!=null&&g.hintConnected?g.hintId:void 0,g!=null&&g.errorConnected?g.errorId:void 0);return{size:h,status:C,variant:x,compact:_,disabled:o,isGloss:v,format:r,fieldId:y,controlId:u??y,shellAria:De,ariaDescribedBy:Ye,isRequired:L,hms:A,segments:F,segRefById:P,keyboardInputRef:j,bindShellRef:W,shellMotion:$,shellSurface:he,focusedSeg:w,handleSegKeyDown:pe,handleFieldBlur:ce,handleSegFocus:Y,handleKeyboardInput:ne,handleKeyboardInputKeyDown:me,handleSegClick:re,handleShellClick:Ce,segDisplay:U}}function wp({side:t,status:e,size:n,className:r,children:o}){return d.jsx("span",{className:p4({side:t,status:e,size:n,slotClass:r}),children:o})}const Oa=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:C,onPointerEnter:x,onPointerLeave:_,...v}=e,y=$s(),S=y4({value:r,defaultValue:o,onValueChange:s,format:i,disabled:a,size:c,status:u,variant:f,compact:m,id:h,onPointerDown:C,onPointerEnter:x,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:g4({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:b4({variant:S.variant}),onClick:S.handleShellClick,children:[p!=null?d.jsx(wp,{side:"prefix",status:S.status,size:S.size,className:y.prefix,children:p}):null,d.jsxs("div",{className:C4({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:dt(e4,y.keyboardInput,Et),onInput:S.handleKeyboardInput,onKeyDown:S.handleKeyboardInputKeyDown,onBlur:S.handleFieldBlur}),S.segments.map((T,L)=>d.jsxs("span",{className:"inline-flex items-center",children:[L>0&&d.jsx("span",{"aria-hidden":!0,className:_4({variant:S.variant,slotClass:y.segmentSeparator}),children:":"}),d.jsx("span",{ref:S.segRefById[T],...VK({seg:T,value:S.hms[T],isRequired:S.isRequired,isDanger:S.status==="danger",isFirstSegment:T===S.segments[0],disabled:S.disabled}),className:x4({variant:S.variant,focused:S.focusedSeg===T,disabled:S.disabled,slotClass:y.segment}),onKeyDown:A=>S.handleSegKeyDown(A,T),onFocus:()=>S.handleSegFocus(T),onBlur:S.handleFieldBlur,onClick:A=>S.handleSegClick(A,T),children:S.segDisplay(T)})]},T))]}),b!=null?d.jsx(wp,{side:"suffix",status:S.status,size:S.size,className:y.suffix,children:b}):null]})})});Oa.displayName="TimeFieldControl";function Cy({className:t,classNames:e,...n}){const r=$s();return d.jsx(Ue,{className:t,classNames:{...e,root:dt(r.label,e==null?void 0:e.root)},...n})}Cy.displayName="TimeFieldLabel";function Pa({children:t,id:e,className:n,...r}){const o=by(),s=$s();return d.jsx(Xe,{id:e??o.hintId,status:UK(o.status),className:dt(s.hint,n),...r,children:t})}Pa.displayName="TimeFieldHint";function ka({children:t,id:e,className:n,...r}){const o=by(),s=$s();return d.jsx(Ze,{id:e??o.errorId,role:"alert",className:dt(s.error,n),...r,children:t})}ka.displayName="TimeFieldError";function A4({label:t,hint:e,error:n,labelId:r,controlProps:o}){const s=$s();return d.jsxs(d.Fragment,{children:[t!=null?d.jsx(Ue,{id:r,classNames:{root:s.label},children:t}):null,d.jsx(Oa,{...o}),e!=null&&d.jsx(Pa,{children:e}),n!=null&&d.jsx(ka,{children:n})]})}function T4({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),C=e!=null||h&&Ae(t,"Label"),x=n!=null||h&&Ae(t,"TimeFieldHint"),_=r!=null||h&&Ae(t,"TimeFieldError"),v=l.useMemo(()=>({fieldId:m,labelId:g,labelConnected:C,hintId:p,errorId:b,hintConnected:x,errorConnected:_,isRequired:s,status:i,size:a,variant:c,compact:u}),[u,b,m,_,x,C,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 xy({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:C=!1,prefix:x,suffix:_,...v}){const y=T4({children:t,label:e,hint:n,error:r,id:i,isRequired:a,status:c,size:u,variant:f,compact:C}),S=y.isCompound?t:d.jsx(A4,{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:x,suffix:_}});return d.jsx(jK,{value:y.fieldCtx,children:d.jsx(MK,{classNames:s,children:d.jsx(Xt.Provider,{value:y.fieldLabelCtx,children:d.jsx(hn,{className:S4({compact:y.compact,slotClass:s==null?void 0:s.root,className:o}),...v,children:S})})})})}xy.displayName="TimeField";const L4=Object.assign(xy,{Label:Cy,Control:Oa,Hint:Pa,Error:ka});function Ba(){return{"aria-hidden":!0,role:"presentation"}}const ja="relative overflow-hidden bg-primary-tint",E4="pointer-events-none absolute inset-0 -translate-x-full",I4="rounded-full",w4="h-control-base w-control-base",R4="flex flex-col gap-small",N4="h-[1em] rounded-small",D4="w-3/5",O4="w-full",P4="rounded-mid px-mid py-plus",k4={none:"rounded-none",small:"rounded-small",mid:"rounded-mid",full:"rounded-full"},B4="skeleton-pulse 1.6s ease-in-out infinite",j4="skeleton-wave-slide 2s linear 0.2s infinite",M4="skeleton-shimmer 2s linear infinite",F4="linear-gradient(90deg, transparent 0%, var(--color-primary-tint-strong) 50%, transparent 100%)",G4="linear-gradient(90deg, var(--color-primary-tint) 0%, var(--color-primary-tint-strong) 50%, var(--color-primary-tint) 100%)";function H4(){return{animation:B4}}function z4(){return{backgroundImage:G4,backgroundSize:"400% 100%",animation:M4}}function V4(){return{animation:j4,background:F4}}function U4(t){return k4[t]}function $4(t){return`${t*.06}s`}function Eo(...t){return R(...t)}function Ma(t){return t==="pulse"?H4():t==="shimmer"?z4():{}}function Fa({className:t,style:e}){return d.jsx("span",{"aria-hidden":!0,className:Eo(E4,t),style:{...V4(),...e}})}const _y=l.forwardRef(function({variant:e="wave",size:n=w4,className:r,classNames:o,style:s,...i},a){return d.jsx("div",{ref:a,className:Eo(ja,I4,n,o==null?void 0:o.root,r),style:{...Ma(e),...s},...Ba(),...i,children:e==="wave"?d.jsx(Fa,{className:o==null?void 0:o.wave}):null})});_y.displayName="SkeletonCircle";const Sy=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?D4:O4);return d.jsx("div",{ref:c,className:Eo(R4,s==null?void 0:s.root,o),style:i,...Ba(),...a,children:u.map((f,m)=>d.jsx("div",{className:Eo(ja,N4,f,s==null?void 0:s.line),style:{...Ma(e),animationDelay:$4(m)},children:e==="wave"?d.jsx(Fa,{className:s==null?void 0:s.wave}):null},f))})});Sy.displayName="SkeletonText";const vy=l.forwardRef(function({variant:e="wave",className:n,classNames:r,style:o,children:s,...i},a){return d.jsxs("div",{ref:a,className:Eo(ja,P4,r==null?void 0:r.root,n),style:{...Ma(e),...o},...Ba(),...i,children:[e==="wave"?d.jsx(Fa,{className:r==null?void 0:r.wave}):null,s]})});vy.displayName="SkeletonBlock";function W4({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}=W4({variant:e,radius:n});return d.jsxs("div",{ref:c,className:Eo(ja,U4(f),o==null?void 0:o.root,r),style:{...Ma(u),...s},...Ba(),...a,children:[m?d.jsx(Fa,{className:o==null?void 0:o.wave}):null,i]})});yy.displayName="Skeleton";const X4=Object.assign(yy,{Circle:_y,Text:Sy,Block:vy}),Ay=l.createContext(null);function Y4({value:t,children:e}){return d.jsx(Ay.Provider,{value:t,children:e})}function K4(){return l.useContext(Ay)}const Ty=l.createContext(null);function q4({value:t,children:e}){return d.jsx(Ty.Provider,{value:t,children:e})}function Yf(){const t=l.useContext(Ty);if(!t)throw new Error("Disclosure parts must be inside <Disclosure>.");return t}const vc=l.createContext({});function Ly({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 Kf(){return l.useContext(vc)}function _t(...t){return R(...t)}function Z4(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function Q4(t){return t==="outline"||t==="secondary"||t==="default"}function J4(t){return t.displayName}function eq(t){const e=[],n=[],r=[],o=[];return l.Children.forEach(t,s=>{if(!l.isValidElement(s)){o.push(s);return}const i=J4(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 Ey={small:"p-base",base:"p-plus",mid:"p-mid",large:"p-large"},tq={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"},Rp={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()),nq={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)},rq="flex w-full select-none items-center gap-small text-left outline-none focus-ring py-base",oq="cursor-not-allowed opacity-48",sq="cursor-pointer",iq="min-w-0 flex-1 origin-center will-change-transform",aq="block",lq="inline-flex shrink-0 origin-center items-center justify-center text-muted",cq="text-primary",uq="overflow-hidden",dq="flex touch-none select-none shrink-0 cursor-grab items-center justify-center border-t-token py-xsmall active:cursor-grabbing",fq="pointer-events-none opacity-48",mq="h-1 w-10 rounded-full bg-tertiary",pq="gloss-panel gloss-deep rounded-mid text-foreground",hq="gloss-content text-muted";function Iy(t){const e=le[t];return{padX:e.padX,text:e.controlText,chevron:e.chevronIcon}}function gq({variant:t,groupedCardShell:e,className:n,slotClass:r}){const o=t==="card"&&e?"":tq[t];return _t(o,n,r)}function bq({variant:t,size:e,disabled:n,className:r,slotClass:o}){const s=Iy(e);return _t(rq,s.padX,nq[t],n?oq:sq,r,o)}function Cq(t){if(t==="outline"||t==="secondary"||t==="gloss")return"pt-xsmall"}function xq({variant:t,size:e,className:n,slotClass:r}){const o=Q4(t);return _t(Ey[e],o&&t==="outline"&&Rp.outline,o&&t==="secondary"&&Rp.secondary,t==="card"&&"border-t-token",t==="ghost"&&"text-muted",t==="default"&&"text-muted",n,r)}function _q(t,e){return _t(hq,Ey[t],e)}function Sq({separated:t,variant:e,className:n,slotClass:r}){return _t("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 vq(t){return t!=null&&!t.separated&&t.variant==="card"}function yq({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,ft(s,S)},[s]),h=zr(t,r,()=>Se().enableExpandable,o);l.useEffect(()=>{const S=p.current;return()=>{S&&V(S)}},[]),l.useEffect(()=>{if(!e)return;b.current=!1;const S=p.current;S&&V(S)},[e]);const C=l.useCallback(S=>{i==null||i(S),!(S.defaultPrevented||e)&&n(!t)},[e,i,t,n]),x=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 T=p.current;!T||Ne()||ht(T,!0)},[e,c]),v=l.useCallback(S=>{u==null||u(S),b.current=!1;const T=p.current;!T||Ne()||ht(T,!1)},[u]),y=l.useCallback(S=>{if(f==null||f(S),S.defaultPrevented||e)return;const T=p.current;!T||de()||We(T,{pointerInside:b.current})},[e,f]);return{setRefs:g,titleLiftRef:p,bindChevronRef:h,handleClick:C,handleKeyDown:x,handlePointerEnter:_,handlePointerLeave:v,handlePointerDown:y,mergeRefs:Z4}}const Np=.38,Aq=.45,Tq=-.45;function Lq(t){return t.getBoundingClientRect().height}function Eq(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 Iq(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=ki(f);if(m<=0)return;const p=c.currentTarget;p.setPointerCapture(c.pointerId);const b=c.clientY,g=Lq(u);let h=b,C=performance.now(),x=0;V(u,n.current),u.style.overflow="hidden",u.style.willChange="height";const _=y=>{if(y.pointerId!==c.pointerId)return;const S=y.clientY,T=S-b,L=performance.now(),A=L-C;A>0&&(x=(S-h)/A),h=S,C=L;const E=Math.max(0,Math.min(m,g+T));u.style.height=`${E}px`,Eq(n.current,E,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 T=y.clientY-b,A=Math.max(0,Math.min(m,g+T))/m,E={...ve(),overwrite:"auto"},I=A>=Np||x>Aq,w=A<=1-Np||x<Tq;if(V(u,n.current),!r&&I){const k=X.timeline({onComplete:()=>{u.style.willChange="",u.style.height="auto",u.style.overflow="",i&&(i.current=!0),o(!0)}});k.to(u,{height:m,...E},0),n.current&&k.to(n.current,{rotation:180,...E},0);return}if(r&&w){const k=X.timeline({onComplete:()=>{u.style.willChange="",u.style.height="0px",u.style.overflow="hidden",i&&(i.current=!0),o(!1)}});k.to(u,{height:0,...E},0),n.current&&k.to(n.current,{rotation:0,...E},0);return}const N=A>=.5,O=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:O,...E},0),n.current&&j.to(n.current,{rotation:N?180:0,...E},0)};p.addEventListener("pointermove",_),p.addEventListener("pointerup",v),p.addEventListener("pointercancel",v)},[n,s,e,r,o,t,i])}}function wy({className:t,onPointerDown:e,...n}){const r=Kf(),{variant:o,disabled:s,dragHandle:i,shellRef:a,innerRef:c,chevronRef:u,open:f,setOpen:m,skipContentAnimRef:p}=Yf(),{onPointerDown:b}=Iq(a,c,u,f,m,s,p);return!i||o!=="card"?null:d.jsx("div",{"aria-hidden":!0,className:_t(dq,s&&fq,r.handle,t),onPointerDown:g=>{e==null||e(g),b(g)},...n,children:d.jsx("span",{className:mq})})}wy.displayName="DisclosureHandle";const Ry=l.forwardRef(function({children:e,className:n,...r},o){const s=Kf(),{open:i,panelId:a,triggerId:c,size:u,variant:f,shellRef:m,innerRef:p,skipContentAnimRef:b}=Yf();nC(i,m,p,{skipAnimRef:b});const g=tC(m,i),h=l.useCallback(_=>{g(_),typeof o=="function"?o(_):o&&(o.current=_)},[g,o]),C=Cq(f),x=f==="gloss";return d.jsx("div",{ref:h,"aria-hidden":!i,className:_t(uq,s.contentShell),children:d.jsx("div",{ref:p,className:_t(C,s.contentWrap),children:x?d.jsx("section",{id:a,"aria-labelledby":c,className:_t(s.contentPanel,n),...r,children:d.jsx("div",{className:_t(pq,s.glossPanel),children:d.jsx("div",{className:_q(u,s.glossContent),children:e})})}):d.jsx("section",{id:a,"aria-labelledby":c,className:xq({variant:f,size:u,className:n,slotClass:s.contentPanel}),...r,children:e})})})});Ry.displayName="DisclosureContent";const Ny=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=Kf(),{open:b,setOpen:g,triggerId:h,panelId:C,variant:x,size:_,disabled:v,iconPos:y,chevronRef:S,skipContentAnimRef:T}=Yf(),L=Iy(_),A=yq({open:b,disabled:v,setOpen:g,chevronRef:S,skipContentAnimRef:T,forwardedRef:m,onClick:i,onKeyDown:s,onPointerEnter:a,onPointerLeave:c,onPointerDown:u}),E=n!==null?d.jsx("span",{ref:A.bindChevronRef,"aria-hidden":!0,className:_t(lq,L.chevron,bn,b&&cq,p.triggerChevron),children:n??d.jsx(Ie.IoChevronDown,{className:"size-full"})}):null;if(r&&l.isValidElement(e)){const I=e;return l.cloneElement(I,{...f,id:h,ref:A.mergeRefs(m,A.setRefs,I.props.ref),className:_t(I.props.className,o),disabled:v||I.props.disabled,"aria-expanded":b,"aria-controls":C,onClick:w=>{var N,O;(O=(N=I.props).onClick)==null||O.call(N,w),A.handleClick(w)},onKeyDown:w=>{var N,O;(O=(N=I.props).onKeyDown)==null||O.call(N,w),A.handleKeyDown(w)}})}return d.jsxs("button",{ref:A.setRefs,id:h,type:"button","aria-expanded":b,"aria-controls":C,disabled:v,className:bq({variant:x,size:_,disabled:v,className:o,slotClass:p.trigger}),onClick:A.handleClick,onKeyDown:A.handleKeyDown,onPointerEnter:A.handlePointerEnter,onPointerLeave:A.handlePointerLeave,onPointerDown:A.handlePointerDown,...f,children:[y==="left"&&E,d.jsx("span",{ref:A.titleLiftRef,className:_t(iq,p.triggerTitleLift),children:d.jsx(ee,{as:"span",variant:L.text,className:_t(aq,b?"text-primary":"text-foreground",p.triggerTitle),children:e})}),y==="right"&&E]})});Ny.displayName="DisclosureTrigger";function wq(t){return`disclosure-trigger-${t}`}function Rq(t){return`disclosure-panel-${t}`}function Nq({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=K4(),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,C=l.useCallback(O=>{m?f.setOpenValue(O?o??null:null):(e===void 0&&g(O),r==null||r(O))},[m,f,o,e,r]),x=l.useId(),_=wq(x),v=Rq(x),y=l.useRef(null),S=l.useRef(null),T=l.useRef(null),L=l.useRef(!1),A=s??(f==null?void 0:f.variant)??"default",E=i??(f==null?void 0:f.size)??"base",I=vq(f),w=l.useMemo(()=>({open:h,setOpen:C,triggerId:_,panelId:v,variant:A,size:E,disabled:a,iconPos:c,dragHandle:u,shellRef:y,innerRef:S,chevronRef:T,skipContentAnimRef:L}),[a,u,c,h,v,C,E,_,A]),N=u&&A==="card"?eq(t):t;return{contextValue:w,variant:A,groupedCardShell:I,orderedChildren:N}}const Dy=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=Nq({children:e,open:o,defaultOpen:s,onOpenChange:i,value:a,variant:c,size:u,disabled:f,iconPos:m,dragHandle:p});return d.jsx(q4,{value:h.contextValue,children:d.jsx(Ly,{classNames:r,children:d.jsx("div",{ref:g,className:gq({variant:h.variant,groupedCardShell:h.groupedCardShell,className:n,slotClass:r==null?void 0:r.root}),...b,children:h.orderedChildren})})})});Dy.displayName="Disclosure";function Dq({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 Oy=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=Dq({accordion:n,separated:r,variant:o,size:s,value:i,defaultValue:a,onValueChange:c});return d.jsx(Y4,{value:b.contextValue,children:d.jsx(Ly,{classNames:f,children:d.jsx("div",{ref:p,className:Sq({separated:b.separated,variant:b.variant,className:u,slotClass:f==null?void 0:f.group}),...m,children:e})})})});Oy.displayName="DisclosureGroup";const Oq=Object.assign(Dy,{Trigger:Ny,Handle:wy,Content:Ry});exports.Accordion=$P;exports.Alert=OP;exports.AlertDialog=uB;exports.Avatar=W$;exports.AvatarGroup=QS;exports.Badge=sX;exports.Breadcrumbs=NW;exports.Button=yo;exports.ButtonGroup=mk;exports.ButtonGroupText=QC;exports.COMPONENT_SIZES=jA;exports.CONTROL_SIZE_LAYOUT=le;exports.Calendar=U3;exports.Card=FU;exports.Checkbox=kG;exports.CheckboxGroup=ik;exports.CloseButton=Fo;exports.ColorPicker=kK;exports.ColorSlider=BK;exports.ColorSliderTrack=Lo;exports.ColorSwatch=Us;exports.ComboBox=Ib;exports.ConvergeRippleLayer=sg;exports.Dialog=bB;exports.Disclosure=Oq;exports.DisclosureGroup=Oy;exports.Drawer=SM;exports.Dropdown=Rr;exports.DropdownGroup=Ou;exports.DropdownItem=zu;exports.DropdownItemHint=Gu;exports.DropdownItemIcon=Hu;exports.DropdownItemIndicator=ca;exports.DropdownItemLabel=Fu;exports.DropdownLabel=Pu;exports.DropdownPopover=Pi;exports.DropdownSeparator=ku;exports.DropdownSub=Bu;exports.DropdownSubContent=Mu;exports.DropdownSubTrigger=ju;exports.DropdownTrigger=Du;exports.EN_LOCALE=ry;exports.Expandable=Mn;exports.FIELD_SHELL_FOCUS_CLASS=$r;exports.FIELD_SHELL_TRANSITION_CLASS=Ur;exports.FONT_WEIGHT_CSS_VAR=QL;exports.FONT_WEIGHT_DEFAULTS=JL;exports.Field=eI;exports.FieldLegend=ys;exports.FieldLegendHeader=ea;exports.FieldSet=_g;exports.FieldSetActions=Bo;exports.FieldSetGroup=Gr;exports.Form=tk;exports.Input=ID;exports.Kbd=yX;exports.Label=Ue;exports.Link=UM;exports.LinkIcon=Gd;exports.ListBox=wr;exports.Loading=Od;exports.Meter=SV;exports.Pagination=h5;exports.Popover=Pt;exports.ProgressBar=dU;exports.RIPPLE_COLOR=fi;exports.Radio=mH;exports.RadioGroup=uk;exports.Ripple=vs;exports.SHADOW_CSS_VAR=Cs;exports.SHADOW_LIFT_MOTION_CLASS=ar;exports.SearchInput=Xu;exports.Select=tG;exports.SelectionIndicator=jt;exports.SelectionThumb=xa;exports.SelectionThumbIcon=_a;exports.Separator=Nu;exports.Skeleton=X4;exports.Slider=j2;exports.Surface=Ev;exports.Switch=hz;exports.TABLE_ROW_TONE_SURFACE=Vv;exports.TOAST_SCRIM_CSS_VAR=Ln;exports.TOAST_SCRIM_DEFAULTS=NA;exports.Table=xY;exports.Tabs=Fz;exports.Text=ee;exports.TextArea=CF;exports.TimeField=L4;exports.TimeFieldControl=Oa;exports.TimeFieldError=ka;exports.TimeFieldHint=Pa;exports.Toast=bj;exports.ToastContext=Dd;exports.ToggleButton=lx;exports.ToggleButtonGroup=a1;exports.Tooltip=Ci;exports.affixSlotClass=Rn;exports.affixToggleMinWClass=Xp;exports.animateInteractiveHoverLift=ht;exports.animateInteractivePressSqueeze=We;exports.burneFontWeightScale=ZL;exports.burneShadowScale=wA;exports.buttonGroupTextFrameClass=Wb;exports.buttonRippleTone=HE;exports.buttonRootClass=Jc;exports.buttonSpinnerClass=rg;exports.cn=R;exports.colorToken=_e;exports.configureMotion=LL;exports.controlShellClass=wE;exports.createConvergeRippleAtPointer=eu;exports.createConvergeRippleFromPointer=$E;exports.designTokenNames=tE;exports.ensureRippleEase=Wc;exports.fieldErrorId=Kt;exports.fieldHintId=Yt;exports.fieldShellHoverClass=Vr;exports.firstLevelHoverShadow=tg;exports.fontWeightToken=eE;exports.footerButtonSizeForAlertDialog=vx;exports.getMotionConfig=Se;exports.gsap=X;exports.hexToHsva=Vs;exports.hexToRgba=ly;exports.hsvaToColorString=cy;exports.hsvaToHex=xc;exports.hsvaToRgba=Or;exports.hueToRgbString=Xi;exports.initElementShadow=Ss;exports.joinFieldDescribedBy=Ft;exports.killMotion=V;exports.prefersReducedInteractiveHoverLift=de;exports.primaryButtonStatusForAlertTone=m1;exports.primaryButtonVariantForAlertTone=f1;exports.readControlHeightPx=Tc;exports.readShadowSize=OL;exports.resolveAlertLiveRole=hC;exports.resolveAlertStatus=ld;exports.resolveAlertVariant=ad;exports.rgbaToHex=ay;exports.rgbaToHsva=iy;exports.secondLevelShadow=Kc;exports.shadowBase=Cn;exports.shadowLarge=DL;exports.shadowMid=Zh;exports.shadowNone=_o;exports.shadowToken=RA;exports.shouldSkipInteractiveHoverLift=Ne;exports.sliderThicknessToCss=Hs;exports.toastScrimToken=En;exports.tokensConfig=DA;exports.useAlertDialog=Fn;exports.useCalendar=ro;exports.useColorPicker=Da;exports.useComboBoxContext=As;exports.useConvergeRipples=ig;exports.useFieldSetErrorId=fu;exports.useFieldSetHintId=du;exports.useFieldShellHoverLift=Mo;exports.useFormField=XN;exports.useGSAP=Zi;exports.useInteractiveHoverLiftContainerHandlers=Jh;exports.useListBox=Eg;exports.usePersistentElShadow=qc;exports.useSecondLevelShadow=Oo;exports.useSecondLevelShadowContainer=Zc;exports.useTabsContext=Ta;exports.useToast=gj;exports.useToastContext=$x;
|
|
37
|
+
*/let Nm=typeof document<"u"?l.useLayoutEffect:l.useEffect,Dm=t=>t&&!Array.isArray(t)&&typeof t=="object",ti=[],TL={},Zh=X;const Qi=(t,e=ti)=>{let n=TL;Dm(t)?(n=t,t=null,e="dependencies"in n?n.dependencies:ti):Dm(e)&&(n=e,e="dependencies"in n?n.dependencies:ti),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(Zh.context(()=>{},r)),a=l.useRef(u=>i.current.add(null,u)),c=e&&e.length&&!o;return c&&Nm(()=>(s.current=!0,()=>i.current.revert()),ti),Nm(()=>{if(t&&i.current.add(t,r),!c||!s.current)return()=>i.current.revert()},e),{context:i.current,contextSafe:a.current}};Qi.register=t=>{Zh=t};Qi.headless=!0;const LL={interactiveDuration:280,interactiveEase:"power2.out",hoverLiftEase:"sine.inOut",tooltipDuration:200,switchThumbDuration:340,switchThumbEase:"back.out(1.4)",selectionFillEase:"back.out(1.25)",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={...LL},Qh=0;const Sl=new Set;function EL(t){return Sl.add(t),()=>{Sl.delete(t)}}function Om(){return Qh}function IL(t){Me={...Me,...t},Qh+=1;for(const e of Sl)e()}function Se(){return Me}function ve(){return{duration:Me.interactiveDuration/1e3,ease:Me.interactiveEase}}function Pm(){return{duration:Me.interactiveDuration*1.15/1e3,ease:Me.selectionFillEase}}function xo(){return{duration:Me.tooltipDuration/1e3,ease:Me.interactiveEase}}function wL(){return{duration:Me.switchThumbDuration/1e3,ease:Me.switchThumbEase}}function km(){return{duration:Me.expandDuration/1e3,ease:Me.expandOpenEase}}function Jh(){return{duration:Me.tooltipDuration/1e3,ease:Me.interactiveEase}}function RL(){return{duration:Me.feedbackExpandDuration/1e3}}function NL(){return{duration:Me.progressFillDuration/1e3,ease:Me.progressFillEase}}const DL=3;function OL(){const t=Me.loadingDotsDuration/1e3;return{cycleSec:t,staggerSec:t/DL,halfCycleSec:t/2,easeUp:Me.loadingDotsEaseUp,easeDown:Me.loadingDotsEaseDown,enabled:Me.enableLoadingDots}}X.registerPlugin(Nr,Qi);const qa="brn-ripple";let Bm="";function Xc(){const t=Se().rippleEaseCss;if(Bm!==t){const e=/cubic-bezier\(\s*([\d.]+),\s*([\d.]+),\s*([\d.]+),\s*([\d.]+)\s*\)/.exec(t);e?Nr.create(qa,`${e[1]},${e[2]},${e[3]},${e[4]}`):Nr.create(qa,"0.25,0.55,0.35,0.95"),Bm=t}return qa}function V(...t){X.killTweensOf(t)}function _s(t){return typeof window>"u"?"none":getComputedStyle(document.documentElement).getPropertyValue(t).trim()||"none"}const _o=()=>_s("--shadow-none"),Cn=()=>_s(bs.base),eg=()=>_s(bs.mid),PL=()=>_s(bs.large);function kL(t){return t==="none"?_o():_s(bs[t])}function Ss(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 BL="(max-width: 1024px), (hover: none), (pointer: coarse)";function jL(){return typeof window>"u"||!window.matchMedia?!1:window.matchMedia(BL).matches}function Re(){return de()||jL()||!Se().enableHoverLift}const ML=2.4,FL=.003,GL=1.8,HL=.002;function tg(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(ML/r,FL),o)}function Yc(t){return Kc(t)}function zL(t){return tg(t)}function Kc(t){const{width:e,height:n}=t.getBoundingClientRect(),r=Math.max(e,n,1);return 1+Math.min(Math.max(GL/r,HL),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:Kc(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=tg(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:Kc(t):1,u=a?o:o*.5,f=a?r.hoverLiftEase:"sine.inOut",m=e==null?void 0:e.shadow;if(m){const C=m.idle??_o();t.style.setProperty("--el-shadow",a?m.hover:C)}return new Promise(C=>{X.timeline({onComplete:()=>{X.set(t,{scale:c}),C()}}).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 VL(t,e){return e==null||!(e instanceof Node)?!0:!t.contains(e)}function ng(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)||!VL(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 vl="data-gloss-motion-init",nn="will-change-transform origin-center",jm={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}},UL=120,$L=.35;function WL(t){const{width:e,height:n}=t.getBoundingClientRect(),r=Math.max(e,n,1);return Math.min(1,Math.max($L,UL/r))}function XL(t,e){const n=jm.rest,r=jm[e];if(e==="rest")return r;const o=WL(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 YL(t,e){const n=XL(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 KL(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{...YL(t,e),boxShadow:KL(t,e)}}function Ii(t){V(t),X.set(t,{scale:1,...So(t,"rest")})}let Za=null;function rg(t){if(Re()){Ii(t);return}const e=t.matches(":hover")||t.matches(":focus-within");if(V(t),e){X.set(t,{scale:Yc(t),...So(t,"hover")});return}Ii(t)}function qL(t=document){typeof document>"u"||t.querySelectorAll(`[${vl}]`).forEach(rg)}function ZL(){Za||typeof document>"u"||(Za=new MutationObserver(t=>{for(const e of t)if(e.type==="attributes"&&e.attributeName==="data-theme"){qL();return}}),Za.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}))}function Mt(t,e=!0){return n=>{t.current=n,n&&e&&(ZL(),n.hasAttribute(vl)||(n.setAttribute(vl,""),Ii(n)))}}function wo(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:Yc(t):1;X.to(t,{scale:s,...So(t,o),duration:r.interactiveDuration/1e3,ease:r.hoverLiftEase,overwrite:"auto"})}function Ro(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=zL(t),i=o.interactiveDuration*1.15/1e3,a=i*.3,c=i*1,u=!Re(),f=e&&u,m=f?"hover":"rest",p=f?Yc(t):1;return new Promise(C=>{X.timeline({onComplete:()=>C()}).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 QL(t,e){return e==null||!(e instanceof Node)?!0:!t.contains(e)}function No(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&&Ii(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)||!QL(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 Do(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 C=t.current;if(!C||!e||Re())return;const g=n.current||r.current;vo(C,g)},[e,t]),a=No(t,e,{pointerInsideRef:n});l.useLayoutEffect(()=>{if(!e)return;const C=t.current;if(!C||typeof ResizeObserver>"u")return;const g=new ResizeObserver(()=>{rg(C)});return g.observe(C),()=>g.disconnect()},[e,t]);const c=l.useCallback(C=>{a.onPointerOver(C),r.current&&i()},[a,i]),u=l.useCallback(C=>{a.onPointerOut(C),r.current&&i()},[a,i]),f=l.useCallback(()=>{e&&(r.current=!0,!(o.current||n.current)&&i())},[e,i]),m=l.useCallback(C=>{if(!e)return;const g=t.current;g&&C.relatedTarget instanceof Node&&g.contains(C.relatedTarget)||(r.current=!1,i())},[e,t,i]),p=l.useCallback(()=>{if(!e)return;const C=t.current;!C||de()||(n.current=!0,o.current=!0,Ro(C,!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 og(){return{hover:Cn()}}function qc(){return{idle:Cn(),hover:eg()}}function Zc(t,e,n=Cn,r){l.useLayoutEffect(()=>{e&&Ss(t.current,n())},[e,t,n,r])}function Oo(t,e,n){const r=l.useMemo(()=>qc(),[]),o=(n==null?void 0:n.resolveIdle)??Cn;l.useLayoutEffect(()=>{e&&Ss(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 Qc(t,e,n){const r=l.useMemo(()=>qc(),[]),o=(n==null?void 0:n.resolveIdle)??Cn;l.useLayoutEffect(()=>{e&&Ss(t.current,o())},[e,t,o,n==null?void 0:n.idleSyncKey]);const s=ng(t,e,n==null?void 0:n.pointerInsideRef,n==null?void 0:n.liftScale,r);return{motionClass:e?ir:"",shadow:r,...s}}const JL=["small","base","mid","strong","bold"],eE={small:"--font-w-small",base:"--font-w-base",mid:"--font-w-mid",strong:"--font-w-strong",bold:"--font-w-bold"},tE={small:400,base:500,mid:600,strong:700,bold:800};function nE(t){return`var(--font-w-${t})`}const rE=["--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","--color-surface-tint-primary","--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:""},oE=new Set(["default","primary","outline","secondary","ghost"]),sg={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"}},sE={default:"",danger:"gloss-btn-danger",success:"gloss-btn-success",info:"gloss-btn-info",warning:"gloss-btn-warning"},iE={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"},aE={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")},lE={danger:_e("converge-ripple-danger"),success:_e("converge-ripple-success"),info:_e("converge-ripple-info"),warning:_e("converge-ripple-warning")},cE={small:"[&_svg]:icon-small",base:"[&_svg]:icon-base",mid:"[&_svg]:icon-large",large:"[&_svg]:icon-large"},uE={small:"small",base:"base",mid:"mid",large:"mid"},dE="relative overflow-hidden inline-flex items-center justify-center outline-none focus-ring disabled:pointer-events-none",fE="pointer-events-none absolute inset-0 z-0 overflow-hidden",mE="relative z-[1] grid w-full min-w-0 place-items-center",pE="origin-center will-change-transform",hE="col-start-1 row-start-1 inline-flex w-full min-w-0 items-center justify-center gap-xsmall",gE="inline-flex shrink-0 items-center justify-center",CE="min-w-0 shrink",Jc="col-start-1 row-start-1 flex items-center justify-center",bE="text-success",xE="text-danger",_E="animate-spin motion-reduce:animate-none",SE="cursor-pointer",vE="opacity-50";function yE(t,e){const{root:n}=sg[t];return t==="outline"&&e!=="default"?"bg-transparent text-foreground":n}function AE(t){return sg[t].loaderText}function TE(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 LE(t,e){if(e==="default")return"";switch(t){case"default":return R(Ec[e],bt[e]);case"primary":return Zp[e];case"outline":return R(Ic[e],bt[e]);case"secondary":return bt[e];case"ghost":return bt[e];case"gloss":return""}}function EE(t,e,n){return n?"":et(TE(t,e))}function IE(t,e){return t==="primary"&&e!=="default"?UA[e]:AE(t)}function wE(t,e){return t==="primary"?e==="default"?_e("converge-ripple-primary-fill"):lE[e]:aE[e]}const RE={small:"h-control-small",base:"h-control-base",mid:"h-control-mid",large:"h-control-large"};function NE(t,e=le[t].minWButton){const n=le[t];return R(e,n.padX,n.padY)}function eu(t,e=!1){const n=le[t];return R(RE[t],e?"min-w-fit":n.minWButton,n.padX,n.padY)}function ig(t){const e=le[t];return R(e.spinnerIcon,e.spinnerBorder)}function DE(){return"pointer-events-none absolute left-1/2 top-1/2 z-0 rounded-full will-change-[transform,opacity]"}function OE(){return"box-border inline-block rounded-full border-current border-t-transparent"}function PE({groupSegment:t,slotClass:e,className:n}){return R(mE,t&&pE,e,n)}function kE({slotClass:t,className:e,layoutClass:n}){return R(hE,t,n,e)}function BE(t,e){return R(gE,cE[t],e)}function jE(t,e){return R(CE,t,e)}function ME(t,e){return R(Jc,t,e)}function FE(t){return R(Jc,bE,t)}function GE(t){return R(Jc,xE,t)}function ag(){return"shrink-0"}const HE={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")},zE={danger:_e("converge-ripple-danger"),success:_e("converge-ripple-success"),info:_e("converge-ripple-info"),warning:_e("converge-ripple-warning")};function VE(t,e="default"){return e!=="default"?zE[e]:HE[t]}function UE(t,e,n,r,o){return t?R("gloss-btn",nn,sE[e]):R(yE(n,e),LE(n,e),!r&&ir,EE(n,e,o))}const Qa=.12;function $E({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 C=a==="out"?Qa:1,g=a==="out"?1:Qa,h=X.fromTo(m,{scale:C,autoAlpha:s},{scale:g,autoAlpha:0,duration:o/1e3,ease:Xc(),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"?Qa:1})`},"aria-hidden":!0})}function lg({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($E,{...i,background:e,durationMs:r,opacityFrom:o,direction:s,onDone:n},i.id))})}function WE(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 tu(t,e,n,r){const o=t.getBoundingClientRect(),s=e-o.left,i=n-o.top,a=WE(s,i,o.width,o.height)*2;return{id:r,x:s,y:i,size:a}}function XE(t,e){const n=t.currentTarget;return n?tu(n,t.clientX,t.clientY,e):null}function cg(){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=tu(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 mi={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 YE(t){return t==null||t===""?mi.neutral:Object.hasOwn(mi,t)?mi[t]:t}function KE(t){return t.closest("button,a[href],[role='button']")??t.parentElement}function vs({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}=cg(),u=YE(t);return l.useLayoutEffect(()=>{const f=s.current;if(!f||e)return;const m=KE(f);if(!m)return;const p=C=>{e||de()||!Se().enableRipple||C.defaultPrevented||C.pointerType==="mouse"&&C.button!==0||a(m,C.clientX,C.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(lg,{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 Ji({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),C=l.useMemo(()=>Mt(f,t),[t]),g=l.useCallback(y=>{C(y),f.current=y,dt(s,y)},[C,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&&(V(y),y.style.removeProperty("--el-shadow")),S&&(V(S),S.style.transform="")},[n]);const b=l.useMemo(()=>r&&!t?og():void 0,[r,t]),x=l.useCallback(y=>{if(i==null||i(y),!e||!n||y.defaultPrevented||Re())return;const S=h();S&&(p.current=!0,t&&!o?vo(S,!0):pt(S,!0,void 0,o?void 0:b))},[e,b,n,t,h,i,o]),_=l.useCallback(y=>{if(a==null||a(y),p.current=!1,!e||!n||Re())return;const S=h();S&&(t&&!o?vo(S,!1):pt(S,!1,void 0,o?void 0:b))},[e,b,n,t,h,a,o]),v=l.useCallback(y=>{if(c==null||c(y),!e||!n||y.defaultPrevented||de())return;const S=h();if(S){if(t&&!o){Ro(S,p.current,void 0,u);return}We(S,{pointerInside:p.current,shadow:o?void 0:b,onReleaseStart:u})}},[e,b,n,t,h,c,u,o]);return{setRefs:g,btnRef:f,contentMotionRef:m,hoverPointerInsideRef:p,handlePointerEnter:x,handlePointerLeave:_,handlePointerDown:v}}const ug=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 qE(t){return dg(t,e=>e!=null&&ug.has(e))}function ni(t,e){return dg(t,n=>n===e)}function ZE(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||!ug.has(r)}function QE(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 JE(t,e){return 2*QE(t/2,e/2,t,e)}function e0(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 Mm="data-button-async-layer-init",t0={label:{in:1,out:.92},loader:{in:1,out:.85},success:{in:1,out:.85},error:{in:1,out:.85}};function n0(t,e,n){const r=e0(e,n),{in:o,out:s}=t0[n];X.set(t,{autoAlpha:r?1:0,scale:r?o:s})}function ri(t,e,n){return r=>{t.current=r,r&&!r.hasAttribute(Mm)&&(r.setAttribute(Mm,""),n0(r,e,n))}}function r0({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),C=l.useRef(null),g=l.useRef(null),h=l.useRef("idle");h.current=n;const b=l.useRef(0),x=l.useRef("idle"),_=l.useRef(void 0),v=l.useRef(!1),[y,S]=l.useState([]),T=l.useRef(n),L=l.useMemo(()=>ri(m,T.current,"label"),[]),A=l.useMemo(()=>ri(p,T.current,"loader"),[]),E=l.useMemo(()=>ri(C,T.current,"success"),[]),I=l.useMemo(()=>ri(g,T.current,"error"),[]),w=l.useCallback(k=>{const G=N.btnRef.current;if(!G)return;const D=G.getBoundingClientRect(),P=JE(D.width,D.height),F=++b.current;S(B=>[...B,{id:F,size:P,tone:k}])},[]),N=Ji({isGloss:t==="gloss",animated:e,enabled:!o,hasHoverShadow:oE.has(t),useContentRef:!!i,forwardedRef:a,onPointerEnter:c,onPointerLeave:u,onPointerDown:f});l.useLayoutEffect(()=>{if(!r)return;const k=x.current;(n==="success"||n==="error")&&k==="loading"&&w(n==="success"?"success":"error"),x.current=n},[n,r,w]),l.useLayoutEffect(()=>{const k=m.current,G=p.current,D=C.current,P=g.current;if(!k||!G||!D||!P)return;const F=de()||!Se().enableAsyncButtonCrossfade,B=ve(),$=[{el:k,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:P,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 O=l.useCallback(k=>{S(G=>G.filter(D=>D.id!==k))},[]),j=l.useCallback((k,G,D,P,F,B)=>$=>{k==null||k($),!(D||!G||$.defaultPrevented)&&(v.current||P!=="idle"||(v.current=!0,F("loading"),Promise.resolve(G($)).then(W=>{const M=W?"success":"error";F(M),w(M),B()}).catch(()=>{F("error"),w("error"),B()}).finally(()=>{v.current=!1})))},[w]);return{setRefs:N.setRefs,contentMotionRef:N.contentMotionRef,bindLabelRef:L,bindLoaderRef:A,bindSuccessRef:E,bindErrorRef:I,expandRipples:y,dismissExpand:O,pushExpandRipple:w,handlePointerEnter:N.handlePointerEnter,handlePointerLeave:N.handlePointerLeave,handlePointerDown:N.handlePointerDown,createAsyncClickHandler:j,asyncInFlight:v}}const fg=l.createContext(null),yl=l.createContext({});function o0({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 Br(){return l.useContext(yl)}function jr(){return l.useContext(fg)}function s0({value:t,children:e}){return d.jsx(fg.Provider,{value:t,children:e})}const i0={"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"},a0={"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??a0[e];return l.createElement(c,{...i,ref:a,className:R(i0[e],!r&&"text-foreground",o)},s)});function l0({className:t}){return d.jsx("span",{className:R(OE(),t),"aria-hidden":!0})}function c0({className:t}){return d.jsx("svg",{className:R(ag(),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 u0({className:t}){return d.jsx("svg",{className:R(ag(),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 d0({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,...RL(),ease:Xc(),overwrite:"auto",onComplete:()=>{i||o.current()}});return()=>{i=!0,c.kill(),V(s)}},[t,e]),d.jsx("span",{ref:r,className:DE(),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 wi=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:PE({groupSegment:!!(s!=null&&s.groupSegment),slotClass:i.content,className:e}),...r,children:n})});wi.displayName="ButtonContent";const nu=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:kE({slotClass:i.label,className:e}),...r,children:n})});nu.displayName="ButtonLabel";function ru({className:t="",children:e,...n}){const r=jr(),o=Br(),s=(r==null?void 0:r.size)??"base";return d.jsx("span",{className:BE(s,R(o.icon,t)),"aria-hidden":!0,...n,children:e})}ru.displayName="ButtonIcon";function ou({className:t="",children:e,...n}){const r=jr(),o=Br(),s=(r==null?void 0:r.size)??"base";return d.jsx(ee,{variant:uE[s],as:"span",inheritColor:!0,className:jE(o.text,t),...n,children:e})}ou.displayName="ButtonText";const Ri=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),className:ME(c,R(s.loader,e)),"aria-hidden":a!=="loading",...n,children:d.jsx(l0,{className:R(ig(i),_E)})})});Ri.displayName="ButtonLoader";const Ni=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),className:FE(R(s.success,e)),"aria-hidden":a!=="success",...n,children:d.jsx(c0,{className:c.icon})})});Ni.displayName="ButtonSuccess";const Di=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),className:GE(R(s.error,e)),"aria-hidden":a!=="error",...n,children:d.jsx(u0,{className:c.icon})})});Di.displayName="ButtonError";function f0({clipClass:t,expandRipples:e,onDismiss:n}){return d.jsx("span",{className:R(fE,t),"aria-hidden":!0,children:e.map(r=>d.jsx(d0,{size:r.size,tone:r.tone,onDone:()=>n(r.id)},r.id))})}function m0({leftIcon:t,children:e}){const n=ZE(e);return d.jsxs(d.Fragment,{children:[t!=null?d.jsx(ru,{children:t}):null,n?d.jsx(ou,{children:e}):e]})}const mg=l.createContext(null),pg=l.createContext(null);function p0({value:t,children:e}){return d.jsx(pg.Provider,{value:t,children:e})}function hg({segment:t,buttonSize:e,variant:n,children:r}){const o=l.useMemo(()=>({segment:t,buttonSize:e,variant:n}),[e,t,n]);return d.jsx(mg.Provider,{value:o,children:r})}function Pn(){return l.useContext(mg)}function Po(){return l.useContext(pg)}const Al=l.createContext({}),gg=l.createContext(null),Cg=l.createContext(null);function h0({classNames:t,children:e}){const r={...l.useContext(Al),...t};return d.jsx(Al.Provider,{value:r,children:e})}function g0({shellIds:t,children:e}){return d.jsx(gg.Provider,{value:t,children:e})}function Mr(){return l.useContext(Al)}function ea(){return l.useContext(gg)}function bn(){return l.useContext(Cg)}function C0(t){return t==="loading"}function b0({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:C,className:g="",classNames:h,children:b,onClick:x}){const _=Po(),v=Pn(),y=bn(),S=_!=null&&_.segmented?void 0:C??(v==null?void 0:v.segment),T=n??(v==null?void 0:v.buttonSize)??(y==null?void 0:y.size)??"base",L=t??(v==null?void 0:v.variant)??"default",A=!!(u??(y==null?void 0:y.disabled)??(y==null?void 0:y.isSubmitting)),E=L==="gloss",[I,w]=l.useState("idle"),N=s!==void 0,O=N?s:I,j=l.useCallback(oe=>{w(oe),i==null||i(oe)},[i]),k=l.useCallback(()=>{window.setTimeout(()=>{j("idle")},c)},[c,j]),G=O==="loading"||O==="success"||O==="error",D=A||G,P=S?hn(S):"rounded-base",F=S?$r(S):"",B=S?hn(S):"rounded-base",$=qE(b),W=$?void 0:g,M=R(dE,iE[e],eu(T,p),UE(E,e,L,!!S,D),A?vE:"",P,g,F,SE),z=wE(L,e),H=IE(L,e);return{type:r,size:T,variant:L,status:e,animated:o,ripple:m,blocked:D,busy:G,userDisabled:A,isGloss:E,groupSegment:S,clipClass:B,buttonClass:M,convergeRippleColor:z,loaderTextClass:H,asyncState:O,isControlled:N,internalAsync:I,leftIcon:f,children:b,classNames:h,isCompound:$,labelLayoutClass:W,onClick:x,onAsyncClick:a,setUncontrolledAsync:j,scheduleAsyncIdleReset:k,ariaBusy:C0(O)}}const bg=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:C,ripple:g,iconOnly:h,groupSegment:b,children:x,onClick:_,onPointerDown:v,onPointerEnter:y,onPointerLeave:S,onMouseDown:T,...L},A){var D;const E=b0({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:C,ripple:g,iconOnly:h,groupSegment:b,children:x,onClick:_}),I=r0({variant:E.variant,animated:E.animated,asyncState:E.asyncState,isControlled:E.isControlled,blocked:E.blocked,userDisabled:E.userDisabled,groupSegment:E.groupSegment,forwardedRef:A,onPointerEnter:y,onPointerLeave:S,onPointerDown:v}),w=I.createAsyncClickHandler(E.onClick,E.onAsyncClick,E.isControlled,E.internalAsync,E.setUncontrolledAsync,E.scheduleAsyncIdleReset),N={size:E.size,variant:E.variant,status:E.status,asyncState:E.asyncState,groupSegment:E.groupSegment,loaderTextClass:E.loaderTextClass,bindLabelRef:I.bindLabelRef,bindLoaderRef:I.bindLoaderRef,bindSuccessRef:I.bindSuccessRef,bindErrorRef:I.bindErrorRef,contentMotionRef:I.contentMotionRef},O=ni(x,"ButtonContent"),j=ni(x,"ButtonLoader"),k=ni(x,"ButtonSuccess"),G=ni(x,"ButtonError");return d.jsx(s0,{value:N,children:d.jsx(o0,{classNames:E.classNames,children:d.jsxs("button",{ref:I.setRefs,...L,type:E.type,disabled:E.blocked,"aria-busy":E.ariaBusy,className:E.buttonClass,onPointerDown:I.handlePointerDown,onPointerEnter:I.handlePointerEnter,onPointerLeave:I.handlePointerLeave,onMouseDown:T,onClick:w,children:[E.ripple?d.jsx(vs,{color:E.convergeRippleColor,disabled:E.blocked||E.asyncState!=="idle",duration:Se().rippleDefaultDuration,className:E.clipClass}):null,d.jsx(f0,{clipClass:E.clipClass,expandRipples:I.expandRipples,onDismiss:I.dismissExpand}),E.isCompound?O?x:d.jsxs(wi,{children:[x,j?null:d.jsx(Ri,{}),k?null:d.jsx(Ni,{}),G?null:d.jsx(Di,{})]}):d.jsxs(wi,{children:[d.jsx(nu,{className:R((D=E.classNames)==null?void 0:D.label,E.labelLayoutClass),children:d.jsx(m0,{leftIcon:E.leftIcon,children:E.children})}),d.jsx(Ri,{}),d.jsx(Ni,{}),d.jsx(Di,{})]})]})})})});bg.displayName="ButtonRoot";const yo=Object.assign(bg,{Content:wi,Label:nu,Icon:ru,Text:ou,Loader:Ri,Success:Ni,Error:Di}),Xt=l.createContext(null),Tl=l.createContext({});function x0({classNames:t,children:e}){const n=l.useContext(Tl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Tl.Provider,{value:r,children:e})}function su(){return l.useContext(Xt)}function xg(){return l.useContext(Tl)}function iu(...t){return R(...t)}const _0="inline-flex flex-wrap items-baseline gap-x-xsmall gap-y-0",S0="font-w-mid",v0="text-danger";function y0({className:t,slotClass:e}){return iu(_0,e,t)}function A0(t){return iu(S0,t)}function T0(t){return iu(v0,t)}const L0=!0;function _g(t){return null}_g.displayName="Label";function Fm({children:t,isRequired:e}){const n=xg();return d.jsxs(d.Fragment,{children:[d.jsx(ee,{as:"span",variant:"base",className:A0(n.text),children:t}),e?d.jsx("span",{className:T0(n.required),"aria-hidden":L0,children:"*"}):null]})}function E0({isRequired:t,htmlFor:e,id:n}){const r=su();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 I0({children:t,className:e,isRequired:n,htmlFor:r,id:o,...s}){const{htmlFor:i,id:a,isRequired:c}=E0({isRequired:n,htmlFor:r,id:o}),u=xg(),f=y0({className:e,slotClass:u.root});if(i!=null)return d.jsx("label",{htmlFor:i,className:f,...s,children:d.jsx(Fm,{isRequired:c,children:t})});const m=s;return d.jsx("span",{id:a,className:f,...m,children:d.jsx(Fm,{isRequired:c,children:t})})}function w0({classNames:t,...e}){return d.jsx(x0,{classNames:t,children:d.jsx(I0,{...e})})}const Ue=Object.assign(w0,{Slot:_g}),R0=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 kn(...t){return R(...t)}function N0(t){return t.displayName}function au(t){if(l.isValidElement(t))return N0(t.type)}function D0(t){if(!l.isValidElement(t))return!1;if(t.type==="legend")return!0;const e=au(t);return e!=null&&R0.has(e)}function O0(t){return au(t)==="FieldSetGroup"}function P0(t){return au(t)==="FieldSetActions"}function k0(t){const e=l.Children.toArray(t),n=e.findIndex(D0);return n===-1?{legend:null,body:e}:{legend:e[n],body:[...e.slice(0,n),...e.slice(n+1)]}}function B0(t){const e=[],n=[];let r=null;for(const o of t)P0(o)?r=o:O0(o)?n.push(o):e.push(o);return{loose:e,groups:n,actions:r}}const Ll=l.createContext({});function j0({classNames:t,children:e}){const n=l.useContext(Ll),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Ll.Provider,{value:r,children:e})}function lu(){return l.useContext(Ll)}const El=l.createContext({});function M0({classNames:t,children:e}){const n=l.useContext(El),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(El.Provider,{value:r,children:e})}function ko(){return l.useContext(El)}const Sg=l.createContext("base");function F0({size:t,children:e}){return d.jsx(Sg.Provider,{value:t,children:e})}function cu(){return l.useContext(Sg)}const G0="flex w-full flex-col gap-xsmall",H0={default:"text-muted",danger:"text-danger",success:"text-success",warning:"text-warning"},z0="m-0 min-w-0 border-0 p-0 disabled:pointer-events-none disabled:opacity-55",V0="flex min-w-0 w-full flex-col",U0="m-0 block w-full max-w-full border-0 p-0",$0="flex flex-col w-fit",W0="flex min-w-0 w-full flex-col",X0="flex flex-wrap w-fit items-center",uu={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 Y0({status:t,className:e,slotClass:n}){return kn(H0[t],n,e)}function K0({size:t,hasLegend:e,slotClass:n}){const r=uu[t];return kn(V0,r.stackGap,e&&r.legendGap,n)}function q0({size:t,className:e,slotClass:n}){return kn(W0,uu[t].groupGap,n,e)}function Z0({size:t,className:e,slotClass:n}){return kn(X0,uu[t].actionsGap,n,e)}function Q0({className:t,children:e,...n}){const r=lu();return d.jsx("div",{className:kn(G0,r.root,t),...n,children:e})}function pn({classNames:t,...e}){return d.jsx(j0,{classNames:t,children:d.jsx(Q0,{...e})})}function Xe({children:t,className:e,status:n="default",as:r="p",variant:o="small",...s}){const i=lu();return d.jsx(ee,{as:r,variant:o,inheritColor:r==="span",className:Y0({status:n,className:e,slotClass:i.hint}),...s,children:t})}const J0=Ue;function Ze({role:t="alert",className:e,...n}){const r=lu();return d.jsx(Xe,{status:"danger",role:t,className:kn(r.error,e),...n})}const ys=l.forwardRef(function({className:e,children:n,...r},o){const s=ko();return d.jsx("legend",{ref:o,className:kn(U0,s.legend,e),...r,children:n})});ys.displayName="FieldLegend";function ta({children:t,className:e,...n}){const r=ko();return d.jsx("span",{className:kn($0,r.legendHeader,e),...n,children:t})}const Fr=l.forwardRef(function({className:e,children:n,...r},o){const s=cu(),i=ko();return d.jsx("div",{ref:o,className:q0({size:s,className:e,slotClass:i.group}),...r,children:n})});Fr.displayName="FieldSetGroup";const Bo=l.forwardRef(function({className:e,children:n,...r},o){const s=cu(),i=ko();return d.jsx("div",{ref:o,className:Z0({size:s,className:e,slotClass:i.actions}),...r,children:n})});Bo.displayName="FieldSetActions";function eI({legend:t,loose:e,groups:n,actions:r}){const o=cu(),s=ko(),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:K0({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=ko();return d.jsxs("fieldset",{ref:a,disabled:o,"aria-describedby":Ft(n,r),className:kn(z0,c.set,e),...i,children:[s.legend,d.jsx(eI,{...s})]})});vg.displayName="FieldSetRootInner";function tI(t){const{legend:e,body:n}=k0(t),{loose:r,groups:o,actions:s}=B0(n);return{legend:e,loose:r,groups:o,actions:s}}const du=l.forwardRef(function({children:e,className:n,classNames:r,hintId:o,errorId:s,disabled:i,size:a="base",...c},u){const f=tI(e);return d.jsx(F0,{size:a,children:d.jsx(M0,{classNames:r,children:d.jsx(vg,{ref:u,className:n,hintId:o,errorId:s,disabled:i,state:f,...c})})})});du.displayName="FieldSet";function fu(t){const e=l.useId();return t??`${e}-hint`}function mu(t){const e=l.useId();return t??`${e}-error`}const yg=Object.assign(du,{Legend:ys,LegendHeader:ta,Group:Fr,Actions:Bo}),nI=Object.assign(pn,{Root:pn,Hint:Xe,Label:J0,Error:Ze,Set:yg,Legend:ys,LegendHeader:ta,Group:Fr,Actions:Bo});function en(...t){return R(...t)}function Ag(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function rI(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 oI(t,e){const n=e.trim().toLowerCase();return n?rI(t).includes(n):!0}function Tg(t,e){const n=[];for(const r of t)oI(r,e)&&n.push(r.value);return n}function sI(t){return new Map(t.map(e=>[e.value,e]))}function iI(t){return t?typeof t.label=="string"?t.label:t.filterText?t.filterText:t.value:""}function aI({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 lI(t,e){for(const n of t){const r=e.get(n);if(r&&!r.disabled)return n}return null}function cI(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 uI(t,e){return t||(e==="danger"||e==="default"?"default":e)}const dI=[],Lg=l.createContext(null);function fI({value:t,children:e}){return d.jsx(Lg.Provider,{value:t,children:e})}function As(){const t=l.useContext(Lg);if(!t)throw new Error("ComboBox.* must be inside <ComboBox>.");return t}const Eg=l.createContext(null);function mI({value:t,children:e}){return d.jsx(Eg.Provider,{value:t,children:e})}function Ig(){const t=l.useContext(Eg);if(!t)throw new Error("ComboBox compound-parts must be inside <ComboBox>.");return t}const Il=l.createContext({});function pI({classNames:t,children:e}){const n=l.useContext(Il),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Il.Provider,{value:r,children:e})}function ar(){return l.useContext(Il)}const hI="No matches";function gI(t,e){return`${t}-opt-${e}`}function CI({ariaLabel:t,ariaLabelledBy:e,label:n}){return{"aria-label":t??(e?void 0:n),"aria-labelledby":e}}const wg=l.createContext(null);function bI({value:t,children:e}){return d.jsx(wg.Provider,{value:t,children:e})}function Rg(t){const e=l.useContext(wg);if(!e)throw new Error(`${t} must be inside <ListBox>.`);return e}const wl=l.createContext({});function xI({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 xn(){return l.useContext(wl)}const Ng=l.createContext(null);function _I({value:t,children:e}){return d.jsx(Ng.Provider,{value:t,children:e})}function SI(){return l.useContext(Ng)}const Dg=l.createContext(null);function vI({value:t,children:e}){return d.jsx(Dg.Provider,{value:t,children:e})}function Og(){const t=l.useContext(Dg);if(!t)throw new Error("SelectionIndicator.* parts must be inside <SelectionIndicator>.");return t}const yI={small:"selection-indicator-small",base:"selection-indicator-base",mid:"selection-indicator-mid",large:"selection-indicator-large"},Pg={small:"icon-xsmall",base:"icon-xsmall",mid:"icon-base",large:"icon-mid"},AI="pointer-events-none relative z-[2] inline-flex items-center justify-center";function TI(t){return R("[&_svg]:size-full",Pg[t])}const LI={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)]"},EI="shrink-0 rounded-full bg-indicator-foreground",II="shrink-0 rounded-full bg-foreground",Rl="relative box-border inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full",kg="pointer-events-none absolute inset-px z-[0] flex origin-center items-center justify-center rounded-[inherit]",wI="bg-indicator text-indicator-foreground",RI="bg-secondary text-secondary-foreground",NI="pointer-events-none absolute inset-px z-[1] flex origin-center items-center justify-center rounded-[inherit] gloss-indicator-fill text-foreground",DI=R(kg,"z-[1] rounded-[inherit] bg-primary-tint"),OI={small:"--selection-indicator-small",base:"--selection-indicator-base",mid:"--selection-indicator-mid",large:"--selection-indicator-large"},PI={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(OI[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 PI[t]*e}function kI(t){switch(t){case"gloss":case"outline":return II;case"secondary":return"shrink-0 rounded-full bg-secondary-foreground";default:return EI}}function BI(t){return t!=="outline"}function Bg(t){return t==="gloss"?NI:R(kg,t==="secondary"?RI:wI)}function jI(t){switch(t){case"gloss":case"outline":return"text-foreground";case"secondary":return"text-secondary-foreground";default:return"text-indicator-foreground"}}function MI(t,e){return R(Rl,yI[t],e)}function FI(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 jg="SelectionIndicatorFill",Mg="SelectionIndicatorMark";function Ja(...t){return R(...t)}function Fg(t){return t.type.displayName===jg}function Gg(t){return t.type.displayName===Mg}function GI({resolvedIcon:t,showCheck:e,showDot:n,size:r,variant:o}){if(t!=null)return t;if(e)return l.createElement(Ie.IoCheckmarkSharp,{"aria-hidden":!0,className:"size-full"});if(n)return l.createElement("span",{"aria-hidden":!0,className:R(LI[r],kI(o))})}function HI(t){return l.Children.toArray(t).some(e=>l.isValidElement(e)&&(Fg(e)||Gg(e)))}function zI(t){const e=l.Children.toArray(t);let n,r;const o=[];for(const s of e){if(l.isValidElement(s)&&Fg(s)){n=s;continue}if(l.isValidElement(s)&&Gg(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 VI({shell:t,fill:e,mark:n,classNames:r,className:o}){return{shell:Ja(t,r==null?void 0:r.shell,o),fill:Ja(e,r==null?void 0:r.fill),mark:Ja(n,r==null?void 0:r.mark)}}const UI={transform:"scale(0)",opacity:0},$I={opacity:0},Oi=l.forwardRef(function({className:e,style:n,...r},o){const s=Og();return d.jsx("span",{ref:i=>{s.fillRef.current=i,dt(o,i)},"aria-hidden":!0,className:R(s.fillClassName,e),style:{...UI,...n},...r})});Oi.displayName=jg;const Pi=l.forwardRef(function({className:e,children:n,style:r,...o},s){const i=Og(),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:{...$I,...r},...o,children:a})});Pi.displayName=Mg;function Hg(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=u=>{s&&(s.style.transform=`scale(${u?1:0})`,s.style.opacity=u?"1":"0"),i&&(i.style.opacity=u?"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={...ve(),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,...c}):X.to(i,{scale:.92,autoAlpha:0,...c}))},[t,e,n,o])}function WI({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:C}=zI(i),g=HI(i),h=p!=null,b=s??(h?p.props.children:C),x=b!=null,_=r&&!x,v=o&&!x&&!_,y=_||x,S=GI({resolvedIcon:b,showCheck:_,showDot:v,size:t,variant:e}),T=h||S!=null,L=BI(e);Hg(n,L?u:void 0,T?f:void 0);const A=VI({shell:FI(e),fill:Bg(e),mark:R(AI,y&&TI(t),jI(e)),classNames:c,className:a}),E=l.useMemo(()=>({fillRef:u,markRef:f,fillClassName:A.fill,markClassName:A.mark,markContent:S}),[A.fill,A.mark,S]);return{shellClassName:MI(t,A.shell),contextValue:E,usesCompound:g,fillSlot:m,markSlot:p,hasMark:T,markContent:S,showsFill:L}}function zg({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:C,markSlot:g,hasMark:h,markContent:b,showsFill:x}=WI({size:t,variant:e,selected:n,check:r,dot:o,icon:s,children:i,className:a,classNames:c}),_=p?d.jsxs(d.Fragment,{children:[x?C??d.jsx(Oi,{}):null,h?g??d.jsx(Pi,{}):null]}):d.jsxs(d.Fragment,{children:[x?d.jsx(Oi,{}):null,h?d.jsx(Pi,{children:b}):null]});return d.jsx(vI,{value:m,children:d.jsx("span",{className:f,"aria-hidden":!0,...u,children:_})})}zg.displayName="SelectionIndicator";const Bt=Object.assign(zg,{Fill:Oi,Mark:Pi});function pu(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 na(t="right"){return R("row-start-1 self-center justify-self-start",t==="left"?"col-start-2":"col-start-1")}function ra(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 oa(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 hu(t){return t?3:2}function Vg(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 XI(){return na()}function YI(t){return t?ra():R("row-start-1 col-start-1 inline-flex min-w-0 max-w-full items-center justify-self-start [width:fit-content]")}function KI(t){return t?oa(2):R("row-start-2 col-start-1 min-w-0 max-w-full justify-self-start [width:fit-content]")}function qI(t){return R("row-start-1 self-center shrink-0 justify-self-end",t?"col-start-3":"col-start-2")}const Ug=l.createContext(null);function Nl({value:t,children:e}){return d.jsx(Ug.Provider,{value:t,children:e})}function Ts(t){const e=l.useContext(Ug);if(!e)throw new Error(`${t} must be used inside a list item (Dropdown.Item / ListBox.Item).`);return e}function $g({className:t,children:e,...n}){const r=Ts("ItemLabel");return d.jsx("span",{ref:o=>{r.enableLabelMotion&&r.labelMotionRef&&(r.labelMotionRef.current=o)},className:R("inline-flex min-w-0 items-center",YI(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 Wg({className:t,children:e,...n}){const r=Ts("ItemHint");return d.jsx(ee,{as:"span",variant:"tools",inheritColor:!0,className:R(KI(r.showIndicatorSlot),r.mutedHint||r.disabled?"text-muted":"opacity-80",t),...n,children:e})}function Xg({className:t,children:e,...n}){const r=Ts("ItemIcon");return d.jsx("span",{className:R("inline-flex items-center [&_svg]:icon-base",qI(r.showIndicatorSlot),r.mutedHint||r.disabled?"text-muted":"opacity-80",t),...n,children:e})}function Yg({className:t,children:e,...n}){return d.jsx("span",{className:R("relative inline-flex shrink-0 items-center justify-center",XI(),t),...n,children:e})}const ZI=new Set(["ListBoxItemIndicator","DropdownItemIndicator"]),QI=new Set(["ListBoxLabel","DropdownItemLabel","Dropdown.ItemLabel"]),JI=new Set(["ListBoxHint","DropdownItemHint","Dropdown.ItemHint"]),ew=new Set(["ListBoxIcon","DropdownItemIcon","Dropdown.ItemIcon"]);function tw(t){return t.displayName}function Kg(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=tw(i.type);if(a&&ZI.has(a)){e==null&&(e=i);continue}if(a&&QI.has(a)){n==null&&(n=i);continue}if(a&&JI.has(a)){r==null&&(r=i);continue}if(a&&ew.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 nw({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 Gm(t){return t==null?[]:Array.isArray(t)?[...t]:[t]}function rw(t){return Kg(t)}function ow({children:t,label:e,hint:n,icon:r,showIndicator:o}){const s=rw(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 C=n.current;C&&pt(C,!0,Se().hoverLiftScale)},[e,r,t,o,n]),f=l.useCallback(p=>{if(s==null||s(p),!r||(c.current=!1,Re()))return;const C=n.current;C&&pt(C,!1,Se().hoverLiftScale)},[r,s,n]),m=l.useCallback(p=>{if(i==null||i(p),p.defaultPrevented||t||!e||a)return;const C=n.current;C&&(r?We(C,{pointerInside:c.current,liftScale:Se().hoverLiftScale}):We(C))},[e,r,t,i,a,n]);return{handlePointerEnter:u,handlePointerLeave:f,handlePointerDown:m}}function sw(t){return wo(void 0,t)}function iw({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 aw="flex min-h-0 flex-col gap-xsmall text-left outline-none",lw="gloss-panel gloss-deep rounded-mid p-plus text-foreground",cw="flex min-w-0 flex-col gap-xsmall",uw="px-plus text-left",dw="text-muted",fw="my-xsmall h-0 w-full shrink-0 border-t-token",mw="px-mid py-small text-center text-muted",pw="w-full min-w-0 rounded-mid px-plus py-base text-left outline-none",hw="cursor-pointer text-foreground focus-ring",gw="cursor-not-allowed bg-transparent text-muted opacity-45 hover:bg-transparent",Cw="bg-default-hover";function bw({isGloss:t,slotClass:e,className:n}){return ut(aw,t&&lw,e,n)}function xw({slotClass:t,className:e}){return ut(cw,t,e)}function _w({slotClass:t,className:e}){return ut(uw,t,e)}function Sw({slotClass:t,className:e}){return ut(dw,t,e)}function vw({slotClass:t,className:e}){return ut(fw,t,e)}function yw({slotClass:t,className:e}){return ut(mw,t,e)}function Aw({disabled:t,isActive:e,slotClass:n,className:r}){return ut(pw,!t&&ut(hw,et()),t&&gw,e&&!t&&Cw,n,r)}function Tw({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:C}=Rg("ListBox.Item"),g=s||!!m,h=a.has(o),b=c===o,x=gI(i,o),_=ow({children:t,label:e,hint:n,icon:r,showIndicator:u});return{disabled:g,isSelected:h,isActive:b,optionId:x,indicatorMode:f,selectItem:p,setActiveValue:C,..._}}function qg({listId:t,variant:e="default",className:n,ariaLabel:r,ariaLabelledBy:o,children:s,...i}){const a=xn(),c=e==="gloss",u=sw(c);return d.jsx("div",{ref:u,id:t,role:"listbox","aria-label":r,"aria-labelledby":o,className:bw({isGloss:c,slotClass:a.root,className:n}),...i,children:s})}qg.displayName="ListBox";function Zg({className:t,children:e,...n}){const r=xn(),[o,s]=l.useState(),i=l.useCallback(a=>{s(a)},[]);return d.jsx(_I,{value:i,children:d.jsx("div",{role:"group","aria-labelledby":o,className:xw({slotClass:r.section,className:t}),...n,children:e})})}Zg.displayName="ListBoxSection";function Qg({className:t,children:e,id:n,...r}){const o=l.useId(),s=n??o,i=xn(),a=SI();return l.useEffect(()=>(a==null||a(s),()=>a==null?void 0:a(void 0)),[s,a]),d.jsx("div",{id:s,className:_w({slotClass:i.header,className:t}),...r,children:d.jsx(ee,{as:"span",variant:"small",className:Sw({slotClass:i.headerText}),children:e})})}Qg.displayName="ListBoxHeader";function Jg({className:t,...e}){const n=xn();return d.jsx("div",{role:"presentation","aria-hidden":!0,className:vw({slotClass:n.separator,className:t}),...e})}Jg.displayName="ListBoxSeparator";function eC({className:t,children:e,...n}){const r=xn();return d.jsx(ee,{as:"p",variant:"base",className:yw({slotClass:r.empty,className:t}),...n,children:e??hI})}eC.displayName="ListBoxEmpty";const tC=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 C=xn(),{disabled:g,isSelected:h,isActive:b,optionId:x,indicatorMode:_,isCompound:v,hasHint:y,hasIcon:S,hasLabel:T,showIndicatorSlot:L,selectItem:A,setActiveValue:E}=Tw({children:e,label:s,hint:i,icon:a,value:r,disabled:o}),{labelMotionRef:I,enableLabelMotion:w,handlePointerDown:N}=iw({disabled:g,hasLabel:T,onPointerDown:u}),O=l.useCallback(D=>{c==null||c(D),!(D.defaultPrevented||g)&&A(r)},[g,c,A,r]),j=l.useCallback(D=>{f==null||f(D),!g&&E(r)},[g,f,E,r]),k={showIndicatorSlot:L,hasHint:y,hasIcon:S,selected:h,indicatorMode:_,disabled:g,mutedHint:g,enableLabelMotion:w,labelMotionRef:I},G=v?d.jsx(d.Fragment,{children:e}):d.jsxs(d.Fragment,{children:[L?d.jsx(xu,{}):null,s!=null?d.jsx(gu,{children:s}):null,i!=null?d.jsx(Cu,{children:i}):null,a!=null?d.jsx(bu,{children:a}):null]});return d.jsx(Nl,{value:k,children:d.jsx("button",{ref:p,type:"button",id:x,role:"option","aria-selected":h,disabled:g,tabIndex:-1,className:ut(Aw({disabled:g,isActive:b,slotClass:C.item}),Vg(y,"gap-x-base",L,S),n),onClick:O,onPointerDown:N,onPointerEnter:j,...m,children:G})})});tC.displayName="ListBoxItem";function gu({className:t,...e}){const n=xn();return d.jsx($g,{className:ut(n.label,t),...e})}gu.displayName="ListBoxLabel";function Cu({className:t,...e}){const n=xn();return d.jsx(Wg,{className:ut(n.hint,t),...e})}Cu.displayName="ListBoxHint";function bu({className:t,...e}){const n=xn();return d.jsx(Xg,{className:ut(n.icon,t),...e})}bu.displayName="ListBoxIcon";function xu({variant:t="base",size:e="small",check:n,children:r,className:o,classNames:s,...i}){const a=Ts("ListBox.ItemIndicator"),c=xn();if(!a.showIndicatorSlot)return null;const u=n??a.indicatorMode==="multi";return d.jsx(Yg,{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:nw({slotClassNames:c,classNames:s}),children:r})})}xu.displayName="ListBoxItemIndicator";function _u(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 Lw({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,[C,g]=l.useState(()=>Gm(r)),h=p?Gm(n):C,b=l.useMemo(()=>new Set(h),[h]),x=l.useRef(h);x.current=h;const[_,v]=l.useState(null),y=a!==void 0,S=y?a:_,T=l.useCallback(I=>{y||v(I),c==null||c(I)},[y,c]),L=l.useCallback(I=>{p||g(I),o==null||o(e?I:I[0]??"")},[p,e,o]),A=l.useCallback(I=>{const w=_u(x.current,I,e);x.current=w,L(w)},[e,L]),E=l.useMemo(()=>({listId:m,size:t,multiple:e,selected:b,selectItem:A,activeValue:S,setActiveValue:T,showIndicator:s,indicatorMode:e?"multi":"radio",disabled:i}),[S,i,m,e,A,b,s,T,t]);return{listId:m,contextValue:E}}function nC({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:C,label:g,"aria-label":h,"aria-labelledby":b,...x}){const{listId:_,contextValue:v}=Lw({size:r,multiple:s,value:i,defaultValue:a,onValueChange:c,selectionIndicator:u,disabled:f,activeValue:m,onActiveValueChange:p,listId:C}),y=CI({ariaLabel:h,ariaLabelledBy:b,label:g});return d.jsx(bI,{value:v,children:d.jsx(xI,{classNames:t,children:d.jsx(qg,{listId:_,variant:o,className:n,ariaLabel:y["aria-label"],ariaLabelledBy:y["aria-labelledby"],...x,children:e})})})}nC.displayName="ListBox";const Ew=Object.assign(xu,{Fill:Bt.Fill,Mark:Bt.Mark}),Ir=Object.assign(nC,{Section:Zg,Header:Qg,Separator:Jg,Empty:eC,Item:tC,Label:gu,Hint:Cu,Icon:bu,ItemIndicator:Ew}),rC=l.createContext(null);function Iw({value:t,children:e}){return d.jsx(rC.Provider,{value:t,children:e})}function Ls(t){const e=l.useContext(rC);if(!e)throw new Error(`${t} must be inside <Popover>.`);return e}const Dl=l.createContext({});function ww({classNames:t,children:e}){const n=l.useContext(Dl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Dl.Provider,{value:r,children:e})}function Gr(){return l.useContext(Dl)}const oC=l.createContext("bottom");function Rw({value:t,children:e}){return d.jsx(oC.Provider,{value:t,children:e})}function Nw(){return l.useContext(oC)}function Dw(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 Ae(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=>Dw(s.type,i))){n=!0;return}r(s.props.children)}}};return r(t),n}function Ow(t){return`${t}-label`}function Pw(t){return`${t}-hint`}function kw({contentRole:t,labelConnected:e,hintConnected:n,labelId:r,hintId:o}){if(t==="dialog"){if(e&&n)return`${r} ${o}`;if(n)return o}}function Bw({contentRole:t,labelConnected:e,labelId:n}){if(t==="dialog"&&e)return n}const sC="PopoverArrow";function rn(...t){return R(...t)}function Ol(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function Hm(t){return t.type.displayName===sC}function jw(t){const e=l.Children.toArray(t),n=e.find(o=>l.isValidElement(o)&&Hm(o)),r=e.filter(o=>!(l.isValidElement(o)&&Hm(o)));return{customArrow:n,panelChildren:r}}function Mw(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 Fw({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]=Mw(o,s,i),m=l.useRef(null),p=l.useRef(null),g=`popover-${l.useId()}`,h=Ow(g),b=Pw(g),x=Ae(t,"PopoverLabel"),_=Ae(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 A;const T=S.target,L=(a==null?void 0:a.current)??m.current;L!=null&&L.contains(T)||(A=p.current)!=null&&A.contains(T)||c&&!c(T)||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:b,size:e,variant:n,side:r,labelConnected:x,hintConnected:_,triggerRef:m,anchorRef:a,contentRef:p}),[a,_,b,x,h,u,g,f,r,e,n])}}const Su="data-theme",iC=`[${Su}]`;function Pl(t){const e=t.getAttribute(Su);return e==="light"?"light":e?"dark":null}function Gw(t){if(typeof document>"u")return!1;if(t){const e=t.closest(iC);if(e)return Pl(e)==="light"}return Pl(document.documentElement)==="light"}function jo(t){if(typeof document>"u")return{};const e=(t==null?void 0:t.closest(iC))??document.documentElement;return Pl(e)!=="light"?{}:e===document.documentElement?{}:{"data-theme":"light"}}function Hw(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 zw(t,e){if(typeof document>"u")return()=>{};const n=new MutationObserver(e);for(const r of Hw(t))n.observe(r,{attributes:!0,attributeFilter:[Su]});return()=>n.disconnect()}function vu(t){return l.useSyncExternalStore(l.useCallback(e=>zw(t,e),[t]),()=>Gw(t),()=>!1)}function Vw(t){return t?"current"in t?t.current:t:null}function yu(t,e){const n=Vw(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 Es({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 Uw=8;function $w(t,e,n,r){return Math.max(r,Math.min(t,n-e-r))}function sa(t,e,n,r,o,s){const i=r==="start"?t:r==="end"?t+e-n:t+e/2-n/2;return $w(i,n,o,s)}function Ww(t,e,n,r){return t.top-n-e>=r}function Xw(t,e,n,r){return t.bottom+n+e<=window.innerHeight-r}function Yw(t,e,n,r){return t.left-n-e>=r}function Kw(t,e,n,r){return t.right+n+e<=window.innerWidth-r}function qw(t,e,n,r,o){return{left:sa(t.left,t.width,e.width,o,window.innerWidth,r),top:t.top-n-e.height,resolvedSide:"top"}}function Zw(t,e,n,r,o){return{left:sa(t.left,t.width,e.width,o,window.innerWidth,r),top:t.bottom+n,resolvedSide:"bottom"}}function Qw(t,e,n,r,o){return{left:t.left-n-e.width,top:sa(t.top,t.height,e.height,o,window.innerHeight,r),resolvedSide:"left"}}function Jw(t,e,n,r,o){return{left:t.right+n,top:sa(t.top,t.height,e.height,o,window.innerHeight,r),resolvedSide:"right"}}const zm={top:qw,bottom:Zw,left:Qw,right:Jw},eR={top:(t,e,n,r,o)=>Ww(t,n,r,o),bottom:(t,e,n,r,o)=>Xw(t,n,r,o),left:(t,e,n,r,o)=>Yw(t,e,r,o),right:(t,e,n,r,o)=>Kw(t,e,r,o)},tR={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]};function aC(t,e,n,r,o){const s=r,i=Uw,a=(o==null?void 0:o.align)??"center",c=tR[n];for(const u of c)if(eR[u](t,e.width,e.height,s,i))return zm[u](t,e,s,i,a);return zm[n](t,e,s,i,a)}const lC={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"},cC={top:"pb-1",bottom:"pt-1",left:"pr-1",right:"pl-1"},ia=.97;function $t(){return de()}function uC(){return{opacity:$t()?1:0}}function Au(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 dC({overlay:t,panel:e,vars:n,panelFrom:r={scale:ia},panelTo:o={scale:1}}){V(t,e),X.fromTo(t,{opacity:0},{opacity:1,...n}),X.fromTo(e,r,{...o,...n})}function fC({overlay:t,panel:e,vars:n,onComplete:r,panelExit:o={autoAlpha:0,scale:ia}}){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 aa(t){t&&(t.style.opacity="",t.style.visibility="",X.set(t,{scale:1,clearProps:"transform"}))}function nR(t){t.style.opacity="1",t.style.visibility="visible"}function la({surface:t,vars:e,from:n={scale:ia},to:r={scale:1}}){V(t),nR(t),X.fromTo(t,n,{...r,...e})}function ca({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 rR({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),C=l.useMemo(()=>Mt(p,i),[i]),[g,h]=l.useState(!1),[b,x]=l.useState(e),_=l.useCallback(y=>{m.current=y,c.current=y,Ol(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 T=y.getBoundingClientRect(),L=aC(T,S.getBoundingClientRect(),e,n,{align:r});x(L.resolvedSide),S.style.position="fixed",S.style.left=`${L.left}px`,S.style.top=`${L.top}px`,S.style.transform="",o?S.style.minWidth=`${Math.max(T.width,192)}px`:S.style.minWidth=""},[r,f,o,n,e,u]);return l.useLayoutEffect(()=>{t&&h(!0)},[t]),Zc(m,!i,Cn),l.useLayoutEffect(()=>{if(!t)return;v();const y=window.requestAnimationFrame(()=>v()),S=()=>v();window.addEventListener("scroll",S,!0),window.addEventListener("resize",S);const T=m.current,L=T&&typeof ResizeObserver<"u"?new ResizeObserver(()=>v()):null;return T&&L&&L.observe(T),()=>{window.cancelAnimationFrame(y),window.removeEventListener("scroll",S,!0),window.removeEventListener("resize",S),L==null||L.disconnect()}},[t,v,s,n,r,o]),l.useLayoutEffect(()=>{if(!g)return;const y=m.current;if(!y)return;const S=$t();let T=!1;if(S)return V(y),t?aa(y):h(!1),()=>{T=!0};if(V(y),t)return la({surface:y,vars:{...xo(),overwrite:"auto"}}),()=>{T=!0,V(y)};const L=ca({surface:y,vars:{...xo(),overwrite:"auto"},onComplete:()=>{T||h(!1)}});return()=>{T=!0,V(y),L.kill()}},[t,g]),{panelRef:m,setPanelRef:_,bindGlossPanelRef:C,portalMounted:g,resolvedSide:b}}function oR({alignProp:t,matchAnchorWidth:e}){return t??(e?"start":"center")}const ws=6,sR={small:"small",base:"base",mid:"mid",large:"mid"},iR={small:"tools",base:"small",mid:"small",large:"base"},mC={small:"min-w-[12rem]",base:"min-w-[14rem]",mid:"min-w-[16rem]",large:"min-w-[18rem]"},pC={small:"max-w-[16rem]",base:"max-w-xs",mid:"max-w-sm",large:"max-w-md"},hC={small:"p-small",base:"p-base",mid:"p-plus",large:"p-mid"},gC={small:"gap-small",base:"gap-base",plus:"gap-plus",mid:"gap-mid"},aR={small:"small",base:"base",mid:"plus",large:"mid"},lR="inline-flex shrink-0 border-0 bg-transparent p-0",cR="pointer-events-auto z-[10000] w-max min-w-0 overflow-visible text-left outline-none will-change-transform",uR="relative overflow-visible",dR="gloss-panel gloss-deep relative z-[1] flex min-w-0 origin-center flex-col overflow-hidden rounded-mid text-foreground",fR="gloss-content flex min-w-0 flex-col",mR="relative z-[1] flex min-w-0 flex-col overflow-hidden rounded-mid border-token bg-surface text-foreground animate-shadow",pR="pointer-events-none absolute z-0 size-2 rotate-45",hR="border-0 bg-[var(--color-surface)]",gR="border-token bg-surface",CR="flex shrink-0 flex-col gap-xsmall text-left",bR="min-w-0 font-w-mid",xR="min-h-0 min-w-0 text-left";function _R({rootSlot:t,slotClass:e,className:n}){return rn(lR,t,e,n)}function SR({resolvedSide:t,showArrow:e,slotClass:n,className:r}){return rn(cR,e&&cC[t],n,r)}function vR({size:t,unstyled:e,contentGap:n,slotClass:r}){return rn(dR,nn,!e&&mC[t],!e&&pC[t],!e&&hC[t],!e&&gC[n],r)}function yR(t){return rn(fR,t)}function AR({size:t,unstyled:e,contentGap:n,slotClass:r}){return rn(mR,!e&&mC[t],!e&&pC[t],!e&&hC[t],!e&&gC[n],r)}function TR({isGloss:t,arrowSideClass:e,slotClass:n,className:r}){return rn(pR,t?hR:gR,e,n,r)}function LR({slotClass:t,className:e}){return rn(CR,t,e)}function ER({slotClass:t,className:e}){return rn(bR,t,e)}function IR({slotClass:t,className:e}){return rn(xR,t,e)}function wR(t){return sR[t]}function RR(t){return iR[t]}const CC=l.forwardRef(function({className:e="",children:n,onClick:r,onPointerDown:o,...s},i){const{open:a,setOpen:c,triggerRef:u,popoverId:f}=Ls("Popover.Trigger"),m=Gr(),p=Is(),C=l.useCallback(_=>{u.current=_,Ol(i)(_)},[i,u]),g=l.useCallback(_=>{a||p.current||_.button!==0||(_.preventDefault(),Es({triggerRef:u,openingRef:p,setOpen:()=>c(!0)}))},[a,p,u,c]),h=l.useCallback(_=>{r==null||r(_),!_.defaultPrevented&&a&&c(!1)},[r,a,c]),b=l.useCallback(_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),a?c(!1):p.current||c(!0))},[a,p,c]),x=l.Children.count(n)===1&&l.isValidElement(n)?n:null;if(x){const _=x;return l.cloneElement(_,{className:rn(m.root,m.trigger,_.props.className,e),onPointerDown:v=>{var y,S;g(v),(S=(y=_.props).onPointerDown)==null||S.call(y,v),o==null||o(v)},onClick:v=>{var y,S;(S=(y=_.props).onClick)==null||S.call(y,v),h(v)},"aria-expanded":a,"aria-controls":a?f:void 0,ref:Ol(_.props.ref,C)})}return d.jsx("button",{type:"button",ref:C,className:_R({rootSlot:m.root,slotClass:m.trigger,className:e}),"aria-expanded":a,"aria-controls":a?f:void 0,onPointerDown:_=>{o==null||o(_),g(_)},onClick:h,onKeyDown:b,...s,children:n})});CC.displayName="PopoverTrigger";function Tu({className:t,...e}){const n=Nw(),{variant:r}=Ls("Popover.Arrow"),o=Gr(),s=r==="gloss";return d.jsx("span",{"aria-hidden":!0,className:TR({isGloss:s,arrowSideClass:lC[n],slotClass:o.arrow,className:t}),...e})}Tu.displayName=sC;function bC({className:t,children:e,...n}){const r=Gr();return d.jsx("div",{className:LR({slotClass:r.header,className:t}),...n,children:e})}bC.displayName="PopoverHeader";const xC=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:wR(a),id:r??i,className:ER({slotClass:c.label,className:e}),...o,children:n})});xC.displayName="PopoverLabel";function _C({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??RR(s),className:rn(i.hint,t),...r,children:e})}_C.displayName="PopoverHint";function SC({className:t,children:e,...n}){const r=Gr();return d.jsx("div",{className:IR({slotClass:r.body,className:t}),...n,children:e})}SC.displayName="PopoverBody";const vC=l.forwardRef(function({className:e="",children:n,showArrow:r=!1,offset:o=ws,gap:s,matchAnchorWidth:i=!1,align:a,unstyled:c=!1,contentRole:u="dialog",...f},m){const{open:p,popoverId:C,size:g,variant:h,side:b,labelConnected:x,hintConnected:_,labelId:v,hintId:y,triggerRef:S,anchorRef:T,contentRef:L}=Ls("Popover.Content"),A=Gr(),E=h==="gloss",I=oR({alignProp:a,matchAnchorWidth:i}),w=s??aR[g],{customArrow:N,panelChildren:O}=jw(n),{setPanelRef:j,bindGlossPanelRef:k,portalMounted:G,resolvedSide:D}=rR({open:p,side:b,offset:o,align:I,matchAnchorWidth:i,showArrow:r,isGloss:E,forwardedRef:m,contentRef:L,triggerRef:S,anchorRef:T});if(!G||typeof document>"u")return null;const P=jo((T==null?void 0:T.current)??S.current),F=kw({contentRole:u,labelConnected:x,hintConnected:_,labelId:v,hintId:y}),B=Bw({contentRole:u,labelConnected:x,labelId:v}),$=d.jsx(Rw,{value:D,children:d.jsx("div",{ref:j,...P,id:C,role:u,"aria-modal":u==="dialog"?"false":void 0,"aria-labelledby":B,"aria-describedby":F,"data-side":D,className:SR({resolvedSide:D,showArrow:r,slotClass:A.content,className:e}),...f,children:d.jsxs("div",{className:uR,children:[r?N??d.jsx(Tu,{}):null,E?d.jsx("div",{ref:k,className:vR({size:g,unstyled:c,contentGap:w,slotClass:A.glossPanel}),children:d.jsx("div",{className:yR(A.glossContent),children:O})}):d.jsx("div",{className:AR({size:g,unstyled:c,contentGap:w,slotClass:A.panel}),children:O})]})})});return Or.createPortal($,document.body)});vC.displayName="PopoverContent";function yC({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}=Fw({children:t,size:n,variant:r,side:o,open:s,defaultOpen:i,onOpenChange:a,anchorRef:c,shouldDismiss:u});return d.jsx(Iw,{value:f,children:d.jsx(ww,{classNames:e,children:t})})}yC.displayName="PopoverRoot";const Ot=Object.assign(yC,{Trigger:CC,Content:vC,Header:bC,Label:xC,Hint:_C,Body:SC,Arrow:Tu}),Vm="data-chevron-init";function pi(t,e){X.set(t,{rotation:e?180:0})}function NR(t,e){return n=>{t.current=n,n&&!n.hasAttribute(Vm)&&(n.setAttribute(Vm,""),pi(n,e))}}function Hr(t,e,n=()=>!0,r){const o=l.useRef(t),s=l.useRef(void 0),i=l.useMemo(()=>NR(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,pi(a,t);return}const c=de()||!n();if(s.current===void 0){s.current=t,pi(a,t);return}if(s.current!==t){if(s.current=t,V(a),c){pi(a,t);return}X.to(a,{rotation:t?180:0,...ve(),overwrite:"auto"})}},[t,e,n,r]),i}const Lu={default:"bg-surface",outline:"bg-transparent",secondary:"bg-secondary"};function DR(t){return t==="secondary"?"secondary":"default"}function Eu(t){return t==="gloss"?"gloss":t==="outline"?"outline":t==="secondary"?"secondary":"default"}function Rs({variant:t,statusTinted:e,statusTintClass:n}){return t==="gloss"?"gloss-control":e?R(n,"border-token"):t==="outline"?"bg-transparent border-token":R(Lu[t],"border-token")}const OR={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"?OR[e]:DR(n);return Qp(r,"focus-within")}const Vr="field-shell-transition motion-reduce:transition-none",Ur="focus-within-ring";function Mo(t,e){const n=Oo(t,e);return{shellHoverMotionClass:n.motionClass,onShellPointerEnter:n.onPointerEnter,onShellPointerLeave:n.onPointerLeave}}function PR(t){return`${t}-label`}function kR(t){return`${t}-listbox`}function BR(t){return{hintId:Yt(t),errorId:Kt(t),labelId:PR(t),listId:kR(t)}}function jR(t,e,n){return e&&n?`${t}-opt-${n}`:void 0}function MR(t){return t?"Close list":"Open list"}function AC({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?Ro(c,!0):We(c)).then(()=>{i.current=!1,!e&&(o(!0),s==null||s())})}function TC(){return l.useRef(!1)}const Lt="field-control-mobile-no-zoom",FR={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},GR={small:le.small.controlPad,base:le.base.controlPad,mid:le.mid.controlPad,large:le.large.controlPad},HR={small:le.small.chevronIcon,base:le.base.chevronIcon,mid:le.mid.chevronIcon,large:le.large.chevronIcon},zR="relative z-0 flex min-w-0 items-stretch border-1 text-left overflow-hidden motion-reduce:transition-none",VR=`min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted ${Lt}`,UR="text-muted",$R="flex shrink-0 origin-center items-center justify-center self-stretch px-small outline-none text-muted hover:text-foreground focus-ring",WR="pointer-events-none",XR="z-[100]",YR="gap-0 p-base",KR="overflow-y-auto overflow-x-hidden",qR="cursor-not-allowed opacity-55 shadow-token-base",ZR="cursor-pointer";function QR({variant:t,status:e}){const n=e==="danger"||e==="success"||e==="warning";return Rs({variant:t,statusTinted:n,statusTintClass:n?FR[e]:""})}function JR(t){return t?R(hn(t),$r(t)):"rounded-base"}function eN({variant:t,status:e,disabled:n,groupSegment:r,shellHoverMotionClass:o,className:s,slotClass:i}){const a=t==="gloss";return en(zR,(r==null?void 0:r.orientation)==="horizontal"?"flex-1":"w-full",JR(r),QR({variant:t,status:e}),Vr,Ur,a?"":zr(!n,e,t),o,n?qR:ZR,s,i)}function tN({size:t,muted:e,className:n,slotClass:r}){return en(VR,GR[t],e&&UR,n,r,Lt)}function nN({disabled:t,className:e,slotClass:n}){return en($R,t&&WR,e,n)}const Iu=l.forwardRef(function({className:e,children:n,groupSegment:r,onPointerEnter:o,onPointerLeave:s,...i},a){const c=Po(),u=Pn(),f=ar(),m=As(),{open:p,setOpen:C,disabled:g,variant:h,status:b,size:x,anchorRef:_,listId:v}=m,y=TC(),S=h==="gloss",T=c!=null&&c.segmented?void 0:r??(u==null?void 0:u.segment),L=Mo(_,!g&&!S&&T==null),A=Do(_,!g&&S&&T==null),E=l.useCallback(N=>{_.current=N,!g&&S&&A.bindShellRef(N)},[_,g,A,S]),I=l.useCallback(()=>{AC({anchorRef:_,disabled:g,isGloss:S,groupSegment:T,setOpen:C,openingRef:y})},[_,g,T,S,C,y]),w=l.useCallback(N=>{g||p||N.button===0&&I()},[g,p,I]);return d.jsx("div",{ref:Ag(a,E),role:"combobox","aria-expanded":p,"aria-controls":p?v:void 0,"aria-haspopup":"listbox","aria-disabled":g||void 0,onPointerDown:w,onPointerEnter:N=>{o==null||o(N),!N.defaultPrevented&&(S&&T==null?A.onShellPointerEnter(N):L.onShellPointerEnter(N))},onPointerLeave:N=>{s==null||s(N),S&&T==null?A.onShellPointerLeave(N):L.onShellPointerLeave(N)},onFocusCapture:S&&!g&&T==null?A.onShellFocusIn:void 0,onBlurCapture:S&&!g&&T==null?A.onShellFocusOut:void 0,...g&&S?{"data-gloss-disabled":""}:{},className:eN({variant:h,status:b,disabled:g,groupSegment:T,shellHoverMotionClass:S?A.shellHoverMotionClass:L.shellHoverMotionClass,className:e,slotClass:f.inputGroup}),...i,children:n})});Iu.displayName="ComboBoxInputGroup";const wu=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:C,filterQuery:g,setFilterQuery:h,listId:b,activeValue:x,setActiveValue:_,inputRef:v,anchorRef:y,options:S,filteredValues:T,disabled:L,placeholder:A,size:E,status:I,isRequired:w,hintConnected:N,errorConnected:O,hintId:j,errorId:k,variant:G,formInputRef:D,formOnBlur:P}=c,F=TC(),B=l.useRef(null),$=G==="gloss",W=l.useMemo(()=>sI(S),[S]),M=l.useMemo(()=>W.get(p),[W,p]),z=l.useMemo(()=>iI(M),[M]),H=jR(b,f,x),oe=Ft(N?j:void 0,O?k:void 0),pe=l.useCallback(()=>{const U=B.current;B.current=null;const ae=U??"";h(ae);const he=Tg(S,ae),Ne=he.indexOf(p);_(Ne>=0?p:he[0]??null),requestAnimationFrame(()=>{const Ye=v.current;if(!Ye)return;Ye.focus();const q=ae.length;Ye.setSelectionRange(q,q)})},[v,S,_,h,p]),ce=l.useCallback(()=>{AC({anchorRef:y,disabled:L,isGloss:$,setOpen:m,onOpened:pe,openingRef:F,preferStandardSqueeze:!0})},[y,L,pe,$,m,F]),Y=l.useCallback(U=>{const ae=aI({filteredValues:T,activeValue:x,optionsByValue:W,delta:U});ae&&_(ae)},[x,T,W,_]),ne=l.useCallback(U=>{var he;const ae=W.get(U);!ae||ae.disabled||(C(U),m(!1),h(""),(he=v.current)==null||he.focus())},[v,W,h,m,C]),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||L)&&!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(),x&&ne(x);return}if(U.key==="Home"){U.preventDefault();const ae=lI(T,W);ae&&_(ae);return}if(U.key==="End"){U.preventDefault();const ae=cI(T,W);ae&&_(ae)}}},[x,Y,L,T,n,f,ce,W,ne,_]);l.useEffect(()=>{f||h("")},[f,h]);const be=f?g:z,te=l.useCallback(U=>{o==null||o(U),P==null||P()},[P,o]);return d.jsx("input",{ref:Ag(i,v,D),id:u,type:"text","aria-autocomplete":"list","aria-activedescendant":H,"aria-required":w||void 0,"aria-invalid":I==="danger"?!0:void 0,"aria-describedby":oe,disabled:L,readOnly:!f,autoComplete:"off",placeholder:A,value:be,onChange:me,onKeyDown:re,onBlur:te,className:tN({size:E,muted:!f&&!M,className:e,slotClass:a.input}),...s})});wu.displayName="ComboBoxInput";const Ru=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),C=Hr(i,p),g=l.useCallback(b=>{C(b),typeof o=="function"?o(b):o&&(o.current=b)},[C,o]),h=l.useCallback(b=>{if(n==null||n(b),b.stopPropagation(),!u){if(i){a(!1),c("");return}b.button===0&&(a(!0),requestAnimationFrame(()=>{var x;return(x=m.current)==null?void 0:x.focus()}))}},[u,m,n,i,c,a]);return d.jsx("button",{type:"button",ref:g,tabIndex:-1,disabled:u,"aria-label":MR(i),className:nN({disabled:u,className:e,slotClass:s.trigger}),onPointerDown:h,...r,children:d.jsx(Ie.IoChevronDown,{className:en(HR[f],s.triggerIcon),"aria-hidden":!0})})});Ru.displayName="ComboBoxTrigger";function Nu({children:t,className:e,offset:n=ws,...r}){const o=ar(),{open:s,setOpen:i,anchorRef:a,listId:c,labelId:u,labelConnected:f,placeholder:m,menuMaxHeight:p,options:C,filteredValues:g,value:h,setValue:b,activeValue:x,setActiveValue:_,setFilterQuery:v,variant:y}=As(),S=l.useCallback(L=>{const A=Array.isArray(L)?L[0]??"":L;b(A),v(""),i(!1)},[v,i,b]),T=t??(g.length===0?d.jsx(Ir.Empty,{}):g.map(L=>{const A=C.find(E=>E.value===L);return d.jsx(Ir.Item,{value:L,disabled:A.disabled,label:A.label,hint:A.hint,icon:A.icon},L)}));return d.jsx(Ot,{open:s,onOpenChange:i,side:"bottom",anchorRef:a,variant:y==="gloss"?"gloss":"default",children:d.jsx(Ot.Content,{matchAnchorWidth:!0,unstyled:!0,contentRole:void 0,offset:n,className:en(XR,o.popover,e),...r,children:d.jsx(Ot.Body,{className:en(YR,o.popoverBody),children:d.jsx(Ir,{listId:c,"aria-labelledby":f?u:void 0,"aria-label":f?void 0:m,value:h,onValueChange:S,activeValue:x,onActiveValueChange:_,selectionIndicator:!0,className:en(KR,o.listBox),style:{maxHeight:p},children:T})})})})}Nu.displayName="ComboBoxPopover";function LC({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})}LC.displayName="ComboBoxLabel";function Du({children:t,status:e,className:n,id:r,...o}){const s=Ig(),i=ar(),a=uI(e,s.status);return d.jsx(Xe,{id:r??s.hintId,status:a,className:en(i.hint,n),...o,children:t})}Du.displayName="ComboBoxHint";function Ou({children:t,className:e,id:n,...r}){const o=Ig(),s=ar();return d.jsx(Ze,{id:n??o.errorId,className:en(s.error,e),...r,children:t??o.errorMessage})}Ou.displayName="ComboBox.Error";function rN({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(Iu,{children:[d.jsx(wu,{}),d.jsx(Ru,{})]}),d.jsx(Nu,{}),e!=null?d.jsx(Du,{children:e}):null,n!=null?d.jsx(Ou,{children:n}):null]})}function cr(...t){return R(...t)}function el(t){return Object.keys(t).length}function oN(t){return Object.entries(t)}function sN(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 iN(t){return t==null?!0:typeof t=="string"?t.trim().length===0:Array.isArray(t)?t.length===0:!1}function tl(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(iN(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 EC(...t){const e={};for(const n of t)n!=null&&Object.assign(e,n);return Object.keys(e).length>0?e:void 0}function aN(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 IC(t){return t?!0:void 0}function lN({descriptionId:t,errorSummaryId:e,hasErrors:n}){const r=[t,n?e:void 0].filter(Boolean);return r.length>0?r.join(" "):void 0}function cN(t){return t<=0?"":t===1?"Fix the error in the form":`Fix ${t} errors in the form`}function uN(){return"Form submitted successfully"}function Um(t,e){const n=Object.keys(e)[0];if(n==null)return;const r=t.get(n);r==null||r.focus()}function wC({name:t,value:e,onChange:n,disabled:r,readOnly:o,rules:s}){const i=bn(),a=e!==void 0,c=i!=null&&t!=null&&!a,u=l.useRef(null),f=l.useCallback(_=>{u.current=_,c&&t&&i.registerRef(t,_)},[c,i,t]),m=r??(i==null?void 0:i.disabled)??!1,p=o??(i==null?void 0:i.readOnly)??!1,C=c&&t?i.getError(t):void 0,g=l.useMemo(()=>EC(t?i==null?void 0:i.getFieldRules(t):void 0,s),[i,t,s]),h=c&&t?i.getValue(t):e,b=l.useCallback(_=>{n==null||n(_),!(!c||!t||!i)&&i.setValue(t,_,{shouldValidate:i.validateMode==="onChange"})},[c,i,t,n]),x=l.useCallback(()=>{!c||!t||!i||(i.setTouched(t,!0),i.validateMode==="onBlur"&&i.validateField(t))},[c,i,t]);return{bound:c,name:t,value:h,setValue:b,onBlur:x,disabled:m||(i==null?void 0:i.isSubmitting),readOnly:p,ref:f,"aria-invalid":IC(C),error:C,rules:g}}function qt(t){return l.Children.toArray(t).some(e=>l.isValidElement(e))}function dN({children:t,label:e,hint:n,error:r,id:o,name:s,isRequired:i=!1,status:a="default",size:c="base",options:u=dI,value:f,defaultValue:m,onValueChange:p,variant:C,disabled:g=!1,placeholder:h="Select a value",menuMaxHeight:b="min(24rem, 70vh)"}){const x=wC({name:s,value:f,disabled:g}),_=x.bound,v=x.disabled??g,y=l.useId(),S=Pn(),T=C??((S==null?void 0:S.variant)!=null?Eu(S.variant):"default"),L=o??`combobox-${y}`,{hintId:A,errorId:E,labelId:I,listId:w}=BR(L),N=qt(t),O=e!=null||N&&Ae(t,"Label"),j=n!=null||N&&Ae(t,"ComboBoxHint"),k=r!=null||N&&Ae(t,"ComboBoxError"),G=f!==void 0||_,[D,P]=l.useState(m??""),F=_?String(x.value??""):G?f??"":D,B=l.useCallback(be=>{G||P(be),p==null||p(be),_&&x.setValue(be)},[_,x,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 be;!$||!H||(be=document.getElementById(`${w}-opt-${H}`))==null||be.scrollIntoView({block:"nearest"})},[H,w,$]);const Y=l.useMemo(()=>Tg(u,M),[M,u]),ne=l.useMemo(()=>({comboBoxId:L,hintId:A,errorId:E,labelId:I,labelConnected:O,hintConnected:j,errorConnected:k,isRequired:i,status:a,size:c,errorMessage:r}),[L,r,E,k,j,O,A,i,I,c,a]),me=l.useMemo(()=>({...ne,open:$,setOpen:W,value:F,setValue:B,filterQuery:M,setFilterQuery:z,listId:w,activeValue:H,setActiveValue:oe,anchorRef:pe,inputRef:ce,variant:T,disabled:v,placeholder:h,menuMaxHeight:b,options:u,filteredValues:Y,formInputRef:_?x.ref:void 0,formOnBlur:_?x.onBlur:void 0}),[H,v,ne,M,Y,_,x,w,b,$,u,h,B,F,T]),re=l.useMemo(()=>({controlId:L,labelId:I,isRequired:i}),[L,i,I]);return{isCompound:N,label:e,hint:n,error:r,children:t,fieldCtx:ne,comboCtx:me,fieldLabelCtx:re}}function RC({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:C,variant:g,disabled:h,placeholder:b,menuMaxHeight:x,name:_,...v}){const y=bn(),S=typeof _=="string"?_:void 0,T=S?y==null?void 0:y.getError(S):void 0,L=r??T,A=c==="default"&&T?"danger":c,E=u??(y==null?void 0:y.size)??"base",I=dN({children:t,label:e,hint:n,error:L,id:i,name:_,isRequired:a,status:A,size:E,options:f,value:m,defaultValue:p,onValueChange:C,variant:g,disabled:h,placeholder:b,menuMaxHeight:x});return d.jsx(mI,{value:I.fieldCtx,children:d.jsx(fI,{value:I.comboCtx,children:d.jsx(pI,{classNames:s,children:d.jsx(Xt.Provider,{value:I.fieldLabelCtx,children:d.jsx(pn,{className:en(o,s==null?void 0:s.root),...v,children:I.isCompound?t:d.jsx(rN,{label:I.label,hint:I.hint,error:I.error,labelId:I.fieldCtx.labelId})})})})})})}RC.displayName="ComboBox";const NC=Object.assign(RC,{Label:LC,InputGroup:Iu,Input:wu,Trigger:Ru,Popover:Nu,Hint:Du,Error:Ou});function ye(...t){return R(...t)}function fN({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 Ao(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function $m(t){return t==null?[]:Array.isArray(t)?[...t]:[t]}function mN(t){return Kg(t)}const DC=l.createContext(null),kl=l.createContext({}),OC=l.createContext(!1),PC=l.createContext(null),kC=l.createContext(null);function pN({value:t,children:e}){return d.jsx(DC.Provider,{value:t,children:e})}function hN({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 BC({value:t,children:e}){return d.jsx(OC.Provider,{value:t,children:e})}function gN({value:t,children:e}){return d.jsx(PC.Provider,{value:t,children:e})}function CN({value:t,children:e}){return d.jsx(kC.Provider,{value:t,children:e})}function Ns(){const t=l.useContext(DC);if(!t)throw new Error("Dropdown.* components must be inside <Dropdown>.");return t}function Gt(){return l.useContext(kl)}function jC(){return l.useContext(OC)}function bN(){return l.useContext(PC)}function MC(){const t=l.useContext(kC);if(!t)throw new Error("DropdownSub.* components must be inside <DropdownSub>.");return t}const Pu=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})});Pu.displayName="Separator";const xN='[role="menuitem"]:not([aria-disabled="true"]), [role="menuitemcheckbox"]:not([disabled]), [role="menuitemradio"]:not([disabled])';function Wm(t){return Array.from(t.querySelectorAll(xN)).filter(e=>!e.hasAttribute("disabled"))}function oi(t,e){const n=t[e];n&&n.focus()}function _N({open:t,setOpen:e,triggerRef:n,contentRef:r}){l.useLayoutEffect(()=>{var i;if(!t)return;const o=r.current;if(!o)return;(i=Wm(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=Wm(o);if(a.length===0)return;const c=document.activeElement,u=c?a.indexOf(c):-1;if(i.key==="ArrowDown"){i.preventDefault(),oi(a,u<a.length-1?u+1:0);return}if(i.key==="ArrowUp"){i.preventDefault(),oi(a,u>0?u-1:a.length-1);return}if(i.key==="Home"){i.preventDefault(),oi(a,0);return}i.key==="End"&&(i.preventDefault(),oi(a,a.length-1))};return o.addEventListener("keydown",s),()=>o.removeEventListener("keydown",s)},[r,t,e,n])}function SN({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 C=p.getBoundingClientRect(),g=6,h=Math.max(C.width,160);let b=C.right+g,x=C.top;const _=h;b+_>window.innerWidth-12&&(b=Math.max(12,C.left-_-g));const v=i.current,y=(v==null?void 0:v.offsetHeight)??0;y>0&&x+y>window.innerHeight-8&&(x=Math.max(8,window.innerHeight-y-8)),c({top:x,left:b,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,C=r.current;if(!(!u||!p))return C.add(p),()=>{C.delete(p)}},[u,r]),l.useLayoutEffect(()=>{if(!u)return;const p=i.current;if(!p)return;const C=$t();let g=!1;if(C)return V(p),t?aa(p):f(!1),()=>{g=!0};if(V(p),t)return la({surface:p,vars:{...xo(),overwrite:"auto"}}),()=>{g=!0,V(p)};const h=ca({surface:p,vars:{...xo(),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 vN="relative inline-flex",Xm="inline-flex",yN="z-[100]",AN="max-h-[min(24rem,70vh)] gap-xsmall overflow-y-auto overflow-x-hidden p-base text-left outline-none",TN="flex min-w-0 flex-col gap-xsmall text-left",LN="px-base text-left",EN="text-muted",IN="relative min-w-0",wN="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",RN="min-w-0 flex-1",NN="shrink-0 text-muted icon-base",DN="fixed z-[110] outline-none will-change-transform",ON="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",PN="gloss-panel gloss-deep flex max-h-[min(22rem,65vh)] min-w-0 origin-center flex-col overflow-hidden rounded-mid text-foreground",kN="gloss-content flex min-h-0 flex-col overflow-y-auto overflow-x-hidden p-base text-left",BN="w-full min-w-0 origin-center rounded-mid px-base py-small text-left no-underline outline-none text-base",jN="cursor-not-allowed bg-transparent text-muted opacity-45 hover:bg-transparent",MN={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 FN({variant:t,disabled:e,hasHint:n,showIndicatorSlot:r,hasIcon:o,className:s,slotClass:i}){return ye(BN,Vg(n,"gap-x-base",r,o),!e&&ye("cursor-pointer",MN[t]),e&&jN,i,s)}function GN({className:t,slotClass:e}){return ye(wN,et(),e,t)}function HN({isGlossPanel:t,subOpen:e,portalMounted:n,className:r,slotClass:o}){return ye(DN,!t&&ON,!e&&n&&"pointer-events-none",o,r)}function zN(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}=Ns(),p=Gt(),C=Is(),g=l.useCallback(b=>{c||C.current||b.button!==0||(b.preventDefault(),Es({triggerRef:f,openingRef:C,setOpen:()=>u(!0)}))},[c,C,f,u]),h=l.useCallback(b=>{o==null||o(b),!b.defaultPrevented&&c&&u(!1)},[o,c,u]);if(r&&l.isValidElement(e)){const b=e;return l.cloneElement(b,{...i,ref:Ao(a,f,b.props.ref),className:ye(b.props.className,Xm,p.trigger,n),onPointerDown:x=>{var _,v;g(x),(v=(_=b.props).onPointerDown)==null||v.call(_,x),s==null||s(x)},onClick:x=>{var _,v;(v=(_=b.props).onClick)==null||v.call(_,x),h(x)},"aria-expanded":c,"aria-haspopup":"menu","aria-controls":c?m:void 0})}return d.jsx("button",{type:"button",ref:Ao(a,f),className:ye(Xm,p.trigger,n),"aria-expanded":c,"aria-haspopup":"menu","aria-controls":c?m:void 0,onPointerDown:b=>{s==null||s(b),g(b)},onClick:h,...i,children:e})});ku.displayName="Dropdown.Trigger";const ki=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:C}=Ns(),g=Gt(),h=o??C,b=l.useCallback(x=>{for(const _ of p.current)if(_.contains(x))return!1;return!0},[p]);return _N({open:a,setOpen:c,triggerRef:u,contentRef:f}),d.jsx(Ot,{open:a,onOpenChange:c,side:"bottom",variant:h,anchorRef:u,shouldDismiss:b,children:d.jsx(Ot.Content,{ref:Ao(i,f),matchAnchorWidth:!0,unstyled:!0,contentRole:void 0,offset:ws,id:m,className:ye(yN,g.popover,n),...s,children:d.jsx(Ot.Body,{role:"menu",className:ye(AN,g.popoverBody,r),children:e})})})});ki.displayName="Dropdown.Popover";function Bu({className:t,children:e,selectionIndicator:n,...r}){const o=jC(),s=Gt(),i=n!==void 0?n:o,[a,c]=l.useState(),u=l.useCallback(f=>{c(f)},[]);return d.jsx(BC,{value:i,children:d.jsx(gN,{value:u,children:d.jsx("div",{role:"group","aria-labelledby":a,className:ye(TN,s.group,t),...r,children:e})})})}Bu.displayName="Dropdown.Group";function ju({className:t,children:e,id:n,...r}){const o=l.useId(),s=n??o,i=bN(),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(LN,a.label,t),...r,children:d.jsx(ee,{as:"span",variant:"small",className:EN,children:e})})}ju.displayName="Dropdown.Label";function Mu({className:t,...e}){const n=Gt();return d.jsx(Pu,{className:ye(n.separator,t),...e})}Mu.displayName="Dropdown.Separator";function Fu({className:t,children:e,...n}){const{open:r}=Ns(),o=Gt(),{contextValue:s}=zN(r);return d.jsx(CN,{value:s,children:d.jsx("div",{className:ye(IN,o.sub,t),...n,children:e})})}Fu.displayName="Dropdown.Sub";const Gu=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:C,cancelClose:g}=MC(),h=Gt(),b=l.useCallback(S=>{o==null||o(S),!S.defaultPrevented&&(g(),m(!0))},[g,o,m]),x=l.useCallback(S=>{s==null||s(S),!S.defaultPrevented&&C()},[s,C]),_=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=GN({className:e,slotClass:h.subTrigger});if(r&&l.isValidElement(n)){const S=n;return l.cloneElement(S,{...c,ref:Ao(u,p,S.props.ref),className:ye(S.props.className,y),onPointerEnter:T=>{var L,A;(A=(L=S.props).onPointerEnter)==null||A.call(L,T),b(T)},onPointerLeave:T=>{var L,A;(A=(L=S.props).onPointerLeave)==null||A.call(L,T),x(T)},onClick:T=>{var L,A;(A=(L=S.props).onClick)==null||A.call(L,T),_(T)},onKeyDown:T=>{var L,A;(A=(L=S.props).onKeyDown)==null||A.call(L,T),v(T)},role:"menuitem","aria-expanded":f,"aria-haspopup":"menu"})}return d.jsxs("div",{ref:Ao(u,p),role:"menuitem",tabIndex:-1,"aria-expanded":f,"aria-haspopup":"menu",className:y,onPointerEnter:b,onPointerLeave:x,onClick:_,onKeyDown:v,...c,children:[d.jsx("span",{className:ye(RN,h.subTriggerLabelWrap),children:n}),d.jsx(Ie.IoChevronForward,{className:ye(NN,h.subTriggerChevron),"aria-hidden":!0})]})});Gu.displayName="Dropdown.SubTrigger";const Hu=l.forwardRef(function({children:e,className:n,style:r,onPointerEnter:o,onPointerLeave:s,...i},a){const{open:c,triggerRef:u,scheduleClose:f,cancelClose:m}=MC(),{subPanelRootsRef:p,triggerRef:C,popoverVariant:g}=Ns(),h=Gt(),b=SN({subOpen:c,triggerRef:u,menuTriggerRef:C,subPanelRootsRef:p,popoverVariant:g}),x=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(!b.portalMounted)return null;const v=jo(C.current),y=d.jsx("div",{ref:Ao(a,b.panelRef),...v,role:"menu",className:HN({isGlossPanel:b.isGlossPanel,subOpen:c,portalMounted:b.portalMounted,className:n,slotClass:h.subContent}),style:{top:b.pos.top,left:b.pos.left,minWidth:b.pos.minW,...r},...i,onPointerEnter:x,onPointerLeave:_,children:b.isGlossPanel?d.jsx("div",{className:ye(PN,h.subContentGlossPanel),children:d.jsx("div",{className:ye(kN,h.subContentGlossContent),children:e})}):e});return typeof document<"u"?Or.createPortal(y,document.body):null});Hu.displayName="Dropdown.SubContent";function zu({className:t,...e}){const n=Gt();return d.jsx($g,{className:ye(n.itemLabel,t),...e})}zu.displayName="DropdownItemLabel";function Vu({className:t,...e}){const n=Gt();return d.jsx(Wg,{className:ye(n.itemHint,t),...e})}Vu.displayName="DropdownItemHint";function Uu({className:t,...e}){const n=Gt();return d.jsx(Xg,{className:ye(n.itemIcon,t),...e})}Uu.displayName="DropdownItemIcon";function ua({variant:t="base",size:e="small",check:n,children:r,className:o,classNames:s,...i}){const a=Ts("Dropdown.ItemIndicator"),c=Gt();if(!a.showIndicatorSlot)return null;const u=n??a.indicatorMode==="multi";return d.jsx(Yg,{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:fN({slotClassNames:c,classNames:s}),children:r})})}ua.displayName="DropdownItemIndicator";const $u=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:C,multiple:g,indicatorMode:h,setOpen:b}=Ns(),x=jC(),_=Gt(),v=mN(e),y=v.indicator!=null,S=v.hint!=null,T=v.icon!=null,L=!!o,A=!L&&i!==!1,E=A&&(g||x||y),I=E?h==="multi"?"menuitemcheckbox":"menuitemradio":"menuitem",w=A&&r!=null&&p.has(r),N=l.useCallback(P=>{typeof m=="function"?m(P):m&&(m.current=P)},[m]),O=FN({variant:a,disabled:s,hasHint:S,showIndicatorSlot:E,hasIcon:T,className:n,slotClass:_.item}),j=l.useCallback(P=>{if(u==null||u(P),P.defaultPrevented||s)return;const F=P.currentTarget;!F||de()||We(F)},[s,u]),k=l.useCallback(P=>{if(c==null||c(P),!(P.defaultPrevented||s)){if(!A){b(!1);return}r!=null&&C(r)}},[s,A,c,C,b,r]),G=d.jsxs(d.Fragment,{children:[E&&!y?d.jsx(ua,{}):null,v.indicator,v.label,v.hint,v.icon,v.rest]}),D={showIndicatorSlot:E,hasHint:S,hasIcon:T,selected:w,indicatorMode:h,disabled:s,mutedHint:s||a==="default"};return L?d.jsx(Nl,{value:D,children:d.jsx("a",{ref:N,role:I,href:s?void 0:o,tabIndex:-1,"aria-disabled":s||void 0,className:O,onClick:k,onPointerDown:j,...f,children:G})}):d.jsx(Nl,{value:D,children:d.jsx("button",{ref:N,type:"button",role:I,disabled:s,tabIndex:-1,"aria-checked":E?w:void 0,className:O,onClick:k,onPointerDown:j,...f,children:G})})});$u.displayName="Dropdown.Item";function VN({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,C=l.useCallback(N=>{u||m(N),n==null||n(N)},[u,n]),g=o!==void 0,[h,b]=l.useState(()=>$m(s)),x=g?$m(o):h,_=l.useMemo(()=>new Set(x),[x]),v=l.useRef(x);v.current=x;const y=l.useCallback(N=>{g||b(N),i==null||i(r?N:N[0]??"")},[g,r,i]),S=l.useCallback(N=>{const O=_u(v.current,N,r);v.current=O,y(O),(a??!r)&&C(!1)},[a,r,C,y]),T=l.useRef(null),L=l.useRef(null),A=l.useRef(null);A.current||(A.current=new Set);const E=l.useId(),I=r?"multi":"radio";return{contextValue:l.useMemo(()=>({open:p,setOpen:C,multiple:r,selected:_,selectItem:S,indicatorMode:I,closeOnSelect:a??!r,popoverVariant:c,triggerRef:T,contentRef:L,contentId:E,subPanelRootsRef:A}),[p,C,r,_,S,I,a,c,E,A])}}function FC({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,...C}){const{contextValue:g}=VN({open:r,defaultOpen:o,onOpenChange:s,multiple:i,value:a,defaultValue:c,onValueChange:u,closeOnSelect:m,popoverVariant:p});return d.jsx(pN,{value:g,children:d.jsx(hN,{classNames:n,children:d.jsx(BC,{value:f,children:d.jsx("div",{className:ye(vN,n==null?void 0:n.root,e),...C,children:t})})})})}FC.displayName="Dropdown";const UN=Object.assign(ua,{Fill:Bt.Fill,Mark:Bt.Mark}),wr=Object.assign(FC,{Trigger:ku,Popover:ki,Content:ki,Group:Bu,Label:ju,Separator:Mu,Item:$u,ItemLabel:zu,ItemHint:Vu,ItemIcon:Uu,ItemIndicator:UN,Sub:Fu,SubTrigger:Gu,SubContent:Hu});function Be(...t){return R(...t)}function $N(t,e){const n=new DataTransfer;e.forEach(r=>n.items.add(r)),t.files=n.files}const Wu=l.createContext(null),Bl=l.createContext({});function WN({value:t,children:e}){return d.jsx(Wu.Provider,{value:t,children:e})}function XN({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 GC(){const t=l.useContext(Wu);if(!t)throw new Error("Input compound parts must be used inside <Input>.");return t}function YN(){return l.useContext(Wu)}function Bn(){return l.useContext(Bl)}function Xu({name:t,value:e,onChange:n,onBlur:r,disabled:o,readOnly:s,type:i,rules:a}){const c=bn(),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]),C=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,b=l.useMemo(()=>EC(t?c==null?void 0:c.getFieldRules(t):void 0,a),[c,t,a]),x=f&&t?c.getValue(t):e,_=l.useCallback(y=>{if(n==null||n(y),!f||!t||!c)return;const S=aN(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"?!!x:x,checked:f&&i==="checkbox"?!!x:void 0,onChange:_,onBlur:v,disabled:C||(c==null?void 0:c.isSubmitting),readOnly:g,ref:p,"aria-invalid":IC(h),error:h,rules:b}}function KN(t,e){return Xu({name:t,rules:e})}function qN(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 ZN({shellRef:t,blocked:e,variant:n,groupSegment:r,onPointerDown:o}){const s=n==="gloss",i=Mo(t,!e&&!s&&r==null),a=Do(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 QN="Show password",JN="Hide password",Ym="Remove file",HC={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},eD={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},tD="bg-primary-tint",nD="flex items-stretch overflow-hidden",rD="relative",oD=`min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted ${Lt}`,sD=`absolute inset-0 cursor-pointer opacity-0 disabled:cursor-not-allowed ${Lt}`,iD="pointer-events-none size-12 shrink-0 text-muted",aD="pointer-events-none max-w-[18rem] text-center text-muted",Km="size-9 shrink-0 rounded-base border-token object-cover",lD="flex min-w-0 items-center gap-base",cD="flex h-full min-w-0 flex-1 items-center gap-base",qm="min-w-0 flex-1 truncate",uD="relative z-10 flex size-8 shrink-0 items-center justify-center rounded-base text-danger outline-none",dD="flex self-stretch shrink-0 items-stretch border-l-token",fD="relative z-10 flex h-full items-center justify-center text-muted outline-none hover:text-foreground focus-ring-inset",mD="border-r-token",pD="border-l-token",hD={small:wn("small"),base:wn("base"),mid:wn("mid"),large:wn("large")},gD={small:le.small.controlPad,base:le.base.controlPad,mid:le.mid.controlPad,large:le.large.controlPad},zC={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 VC(t){return t==="default"?tD:eD[t]}function CD({side:t,status:e,size:n,slotClass:r}){return Be(hD[n],VC(e),t==="prefix"?mD:pD,r)}function bD({variant:t,status:e,statusTinted:n}){return Rs({variant:t,statusTinted:n&&e!=="default",statusTintClass:e!=="default"?HC[e]:""})}function xD({variant:t,status:e,statusTinted:n}){return t==="gloss"?"gloss-control":n&&e!=="default"?HC[e]:Lu[t]}function _D(t){return t!=null?Be(hn(t),$r(t),"relative focus-within:z-[2]"):"rounded-base"}function SD({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(nD,f&&rD,(r==null?void 0:r.orientation)==="horizontal"?"min-w-0 flex-1":"w-full",o?"min-h-[7.25rem]":Be(f?"":"border-1"),_D(r),i??s,Vr,Ur,!f&&zr(!n,e,t),a,n&&"cursor-not-allowed opacity-55 shadow-token-base",u,c)}function vD(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 yD({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 AD({size:t,disabled:e,slotClass:n}){const r=zC[t];return Be(fD,gn,qp(t),r.pad,e?"cursor-not-allowed opacity-45":"cursor-pointer",n)}function TD({disabled:t,slotClass:e}){return Be(uD,gn,et("danger"),"focus-ring",t&&"pointer-events-none opacity-40",e)}function Zm({side:t,status:e,controlSize:n,children:r}){const o=Bn();return d.jsx("span",{className:CD({side:t,status:e,size:n,slotClass:t==="prefix"?o.prefix:o.suffix}),children:r})}function LD({status:t,controlSize:e,visible:n,disabled:r,onToggle:o}){const s=Bn(),i=zC[e];return d.jsx("span",{className:Be(dD,VC(t)),children:d.jsx("button",{type:"button",disabled:r,"aria-label":n?JN:QN,"aria-pressed":n,onClick:a=>{a.preventDefault(),a.stopPropagation(),o()},onPointerDown:a=>a.stopPropagation(),className:AD({size:e,disabled:r,slotClass:s.passwordToggle}),children:n?d.jsx(Ie.IoEyeOff,{className:R("shrink-0",i.icon),"aria-hidden":!0}):d.jsx(Ie.IoEye,{className:R("shrink-0",i.icon),"aria-hidden":!0})})})}function Qm({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(Ie.IoFolderOpen,{className:"icon-mid shrink-0","aria-hidden":!0})})}function Jm({disabled:t,onRemove:e}){const n=Bn();return d.jsx("button",{type:"button",disabled:t,title:Ym,"aria-label":Ym,onClick:r=>{r.preventDefault(),r.stopPropagation(),e(r)},onPointerDown:r=>r.stopPropagation(),className:TD({disabled:t,slotClass:n.fileRemove}),children:d.jsx(Ie.IoClose,{className:"icon-mid shrink-0","aria-hidden":!0})})}const da=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:C,onChange:g,onBlur:h,"aria-describedby":b,name:x,value:_,...v},y){const S=Xu({name:typeof x=="string"?x:void 0,value:_,onChange:g,onBlur:h,disabled:u,readOnly:f,type:o}),T=S.name??x,L=S.bound?S.value:_,A=S.onChange,E=S.onBlur,I=S.disabled??u,w=S.readOnly??f,N=S.ref,O=YN(),j=bn(),k=Bn(),G=Po(),D=Pn(),P=l.useId(),F=c??(O==null?void 0:O.inputId)??P,B=n??(O==null?void 0:O.status)??"default",$=r??(O==null?void 0:O.size)??(j==null?void 0:j.size)??((D==null?void 0:D.buttonSize)??"base"),W=(O==null?void 0:O.isRequired)??!1,M=(O==null?void 0:O.hintConnected)??!1,z=(O==null?void 0:O.errorConnected)??!1,H=O==null?void 0:O.hintId,oe=O==null?void 0:O.errorId,pe=b??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=!!(I||w),be=B==="danger"||B==="success"||B==="warning",te=e==="gloss",U=ZN({shellRef:Y,blocked:re,variant:e,groupSegment:ce,onPointerDown:C}),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 ke=l.useCallback(K=>{const Z=K.target.files;se(Z?Array.from(Z):[]),A==null||A(K)},[A]),ft=l.useCallback((K,Z)=>{if(re)return;const fe=()=>{se(Ee=>{const He=Ee.filter(Je=>Je!==K),Qe=ne.current;return Qe&&$N(Qe,He),Qe&&(g==null||g({target:Qe,currentTarget:Qe})),He})};if(!Z||de()){fe();return}qN(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,Ko=bD({variant:e,status:B,statusTinted:be}),qo=yn?Be(xD({variant:e,status:B,statusTinted:be}),!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:SD({variant:e,status:B,blocked:re,groupSegment:ce,fileListEmpty:yn,shellSurface:Ko,shellFileEmptySurface:qo,shellHoverMotionClass:U.shellHoverMotionClass,className:m,slotClass:k.shell}),children:[ln&&i!=null?d.jsx(Zm,{side:"prefix",status:B,controlSize:$,children:i}):null,ae?d.jsxs("div",{className:yn?vD(k.fileArea):yD({multipleFiles:hr,slotClass:k.fileArea}),children:[yn?d.jsxs(d.Fragment,{children:[d.jsx(Ie.IoFolderOpen,{className:Be(iD,k.fileEmpty),"aria-hidden":!0}),d.jsx(ee,{as:"span",variant:"base",className:Be(aD,k.fileEmpty),children:s??"Select file"})]}):hr?ue.map(({file:K,previewUrl:Z})=>d.jsxs("div",{"data-file-row":"",className:Be(lD,k.fileRow),children:[Z?d.jsx("img",{src:Z,alt:"",className:Be(Km,k.filePreview)}):d.jsx(Qm,{}),d.jsx(ee,{as:"span",variant:"base",className:qm,children:K.name}),re?null:d.jsx(Jm,{onRemove:vn(K)})]},`${K.name}-${K.size}-${K.lastModified}`)):d.jsxs("div",{"data-file-row":"",className:Be(cD,k.fileRow),children:[ue[0].previewUrl?d.jsx("img",{src:ue[0].previewUrl,alt:"",className:Be(Km,k.filePreview)}):d.jsx(Qm,{}),d.jsx(ee,{as:"span",variant:"base",className:qm,children:ue[0].file.name}),re?null:d.jsx(Jm,{onRemove:vn(ue[0].file)})]}),d.jsx("input",{ref:me,id:F,name:T,type:"file",disabled:I,readOnly:w,onChange:ke,onBlur:E,"aria-required":W||void 0,"aria-invalid":S["aria-invalid"]??(B==="danger"?!0:void 0),"aria-describedby":pe,className:sD,...v})]}):d.jsx("input",{ref:me,id:F,name:T,type:he?Ne?"text":"password":o,disabled:I,readOnly:w,placeholder:s,value:L,onChange:A,onBlur:E,"aria-required":W||void 0,"aria-invalid":S["aria-invalid"]??(B==="danger"?!0:void 0),"aria-describedby":pe,className:Be(oD,gD[$],k.control,Lt),...v}),ln&&a!=null?d.jsx(Zm,{side:"suffix",status:B,controlSize:$,children:a}):null,ln&&he?d.jsx(LD,{status:B,controlSize:$,visible:Ne,disabled:u,onToggle:()=>Ye(K=>!K)}):null]})});da.displayName="InputControl";function UC({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})}UC.displayName="InputLabel";function Yu({children:t,status:e,className:n,id:r,...o}){const s=GC(),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})}Yu.displayName="InputHint";function Ku({children:t,className:e,id:n,...r}){const o=GC(),s=Bn();return d.jsx(Ze,{id:n??o.errorId,className:Be(s.error,e),...r,children:t})}Ku.displayName="InputError";function ED({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(da,{id:r,size:s,status:i,...a}),e!=null?d.jsx(Yu,{children:e}):null,n!=null?d.jsx(Ku,{children:n}):null]})}function ID({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`,C=qt(t),g=n!=null||C&&Ae(t,"InputHint"),h=r!=null||C&&Ae(t,"InputError"),b=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]),x=l.useMemo(()=>({controlId:u,labelId:p,isRequired:s}),[u,s,p]);return{fieldCtx:b,fieldLabelCtx:x,isCompound:C,inputId:u,label:e,hint:n,error:r,status:i,size:a}}function wD({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=bn(),p=typeof f.name=="string"?f.name:void 0,C=p?m==null?void 0:m.getError(p):void 0,g=r??C,h=c==="default"&&C?"danger":c,b=u??(m==null?void 0:m.size)??"base",x=ID({children:t,label:e,hint:n,error:g,id:i,isRequired:a,status:h,size:b}),_=x.isCompound?t:d.jsx(ED,{label:x.label,hint:x.hint,error:x.error,inputId:x.inputId,labelId:x.fieldCtx.labelId,size:x.size,status:x.status,controlProps:f});return d.jsx(WN,{value:x.fieldCtx,children:d.jsx(XN,{classNames:s,children:d.jsx(Xt.Provider,{value:x.fieldLabelCtx,children:d.jsx(pn,{className:Be(s==null?void 0:s.root,o),children:_})})})})}const RD=Object.assign(wD,{Label:UC,Control:da,Hint:Yu,Error:Ku}),ND={xsmall:"--radius-value-xsmall",small:"--radius-value-small",base:"--radius-value-base",mid:"--radius-value-mid",large:"--radius-value-large"},DD={xsmall:.5,small:.75,base:1,mid:1.25,large:1.5},OD={small:"small",base:"base",mid:"mid",large:"large"},PD={small:"rounded-small",base:"rounded-base",mid:"rounded-mid",large:"rounded-large"};function kD(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 BD(t,e=16){if(typeof document<"u"){const n=getComputedStyle(document.documentElement).getPropertyValue(ND[t]).trim(),r=kD(n,e);if(r!=null)return r}return e*.5*DD[t]}function jD(t,e=16){return BD(OD[t],e)}const MD={small:"w-control-small",base:"w-control-base",mid:"w-control-mid",large:"w-control-large"},FD={small:8,base:12,mid:16,large:20},GD={small:14,base:16,mid:20,large:20},HD={small:20,base:24,mid:28,large:32},zD={small:240,base:280,mid:320,large:360};function si(t){const e=le[t];return{defaultExpandedW:zD[t],iconBox:GD[t],padX:FD[t],iconClass:e.icon,controlPad:e.controlPad,shellWCollapsed:MD[t],clearTap:HD[t],clearIconClass:e.chevronIcon,textGapClear:t==="small"?4:6}}const VD={small:si("small"),base:si("base"),mid:si("mid"),large:si("large")};function UD(t){return VD[t]}const qu=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:C,onChange:g,onBlur:h,onKeyDown:b,id:x,"aria-label":_,onValueChange:v,ripple:y=!1,groupSegment:S,...T},L){const A=Po(),E=Pn(),I=A!=null&&A.segmented?void 0:S??(E==null?void 0:E.segment),w=r??((E==null?void 0:E.variant)!=null?Eu(E.variant):"default"),N=l.useId(),O=x??N,j=i!==void 0,[k,G]=l.useState(s),D=j?i:k,P=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(()=>C!=null&&String(C).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 L=="function"?L(ie):L&&(L.current=ie)},[L]),Y=!!(u||f),ne=l.useCallback(ie=>{g==null||g(ie),v==null||v(ie.target.value),H||pe(ie.target.value.trim().length>0)},[H,g,v]),me=l.useCallback(ie=>{var Zo;if(ie.preventDefault(),ie.stopPropagation(),Y)return;const ge=$.current;if(!ge)return;H||pe(!1);const Fe=(Zo=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:Zo.set;Fe==null||Fe.call(ge,""),ge.dispatchEvent(new Event("input",{bubbles:!0})),g==null||g({target:ge,currentTarget:ge}),v==null||v(""),requestAnimationFrame(()=>ge.focus())},[Y,H,g,v]),re=UD(n),be=o??re.defaultExpandedW,te=Lc(n),U=w==="gloss",ae=l.useCallback(()=>D?Cn():_o(),[D]),he=Oo(F,!Y&&!U&&I==null,{resolveIdle:ae,idleSyncKey:D}),Ne=Do(F,!Y&&U&&I==null),Ye=l.useCallback(ie=>{F.current=ie,!Y&&U&&I==null&&Ne.bindShellRef(ie)},[Y,Ne,I,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)`,ke=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=ke.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=`${be}px`:ge.style.removeProperty("width"),ge.style.removeProperty("height"),ge.style.removeProperty("borderRadius"),Fe.style.left=ie?`${re.padX}px`:ue)},[ue,re.padX,be]),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 Zo=jD(n);if(ie){ge.style.width=`${te}px`,ge.style.borderRadius=`${te/2}px`;const Fy=(ge.clientWidth-re.iconBox)/2;Fe.style.left=`${Fy}px`;const em=ve();X.timeline({onComplete:()=>{ge.style.removeProperty("borderRadius")}}).to(ge,{width:be,borderRadius:Zo,...em,overwrite:"auto"},0).to(Fe,{left:re.padX,...em,overwrite:"auto"},0);return}const jy=q(ge),My=se(te,jy);Fe.style.left=`${re.padX}px`;const Jf=ve();X.timeline({onComplete:()=>{ge.style.removeProperty("width"),ge.style.removeProperty("borderRadius"),Fe.style.left=ue}}).to(ge,{width:te,borderRadius:te/2,...Jf,overwrite:"auto"},0).to(Fe,{left:My,...Jf,overwrite:"auto"},0)},[vn,te,se,ue,re.iconBox,re.padX,q,n,be]);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,P(!0),yn())},[Y,D,yn,P]),Ko=l.useCallback(ie=>{if(Y||D)return;const ge=F.current;if(!ge||de()){W.current=Promise.resolve();return}W.current=U&&I==null?Ro(ge):We(ge).then(()=>{})},[Y,D,I,U]),qo=l.useCallback(ie=>{Y||D||(ie.preventDefault(),ln())},[Y,D,ln]),K=U&&I==null?Ne.onShellPointerEnter:he.onPointerEnter,Z=U&&I==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&&P(!1)}},0)},[Y,c,h,P]),Ee=l.useCallback(ie=>{D||Y||(ie.key==="Enter"||ie.key===" ")&&(ie.preventDefault(),ln())},[Y,D,ln]),He=l.useCallback(ie=>{var ge,Fe;b==null||b(ie),!ie.defaultPrevented&&ie.key==="Escape"&&c&&(((ge=$.current)==null?void 0:ge.value)??"").length===0&&(ie.stopPropagation(),P(!1),(Fe=F.current)==null||Fe.focus())},[c,b,P]),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"),By=I?R(hn(I),$r(I)):null;return d.jsxs("div",{ref:Ye,...D?{role:"search",tabIndex:-1}:{role:"button",tabIndex:Y?-1:0,onClick:qo,onKeyDown:Ee},"aria-expanded":D,"aria-disabled":Y||void 0,"aria-label":D?void 0:Jt,"data-search-expanded":D?"":void 0,onFocusCapture:U&&I==null?Ne.onShellFocusIn:void 0,onBlurCapture:U&&I==null?Ne.onShellFocusOut:void 0,className:R(I?By:D?PD[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",Lu[w]),Vr,Ur,U?Ne.shellHoverMotionClass:zr(!Y,"default",w),!U&&!Y&&he.motionClass,D?"cursor-text":"",!D&&!Y?"cursor-pointer":"",Y?"pointer-events-none opacity-55":"",e),onPointerDown:Ko,onPointerEnter:K,onPointerLeave:Z,children:[y?d.jsx(vs,{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(Ie.IoSearch,{className:R("shrink-0",re.iconClass),"aria-hidden":!0})}),d.jsx("input",{ref:ce,id:O,type:"search",disabled:u,readOnly:f,placeholder:m,value:p,defaultValue:C,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,Lt,D?"relative z-[2] opacity-100":"pointer-events-none absolute inset-0 opacity-0"),style:D?{paddingLeft:Qe,paddingRight:Qt}:void 0,...T}),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(Ie.IoClose,{className:`shrink-0 ${re.clearIconClass}`,"aria-hidden":!0})}):null]})});qu.displayName="SearchInput";function Zu(...t){return R(...t)}function Qu(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(...Qu(r));return}e.push(n)}}),e}function $C(t){return t.type===yo||t.type===da||t.type===NC||t.type===qu||t.type===wr||t.type.displayName==="ButtonGroupText"}function WC(t,e){return e<=1?"only":t===0?"first":t===e-1?"last":"middle"}function XC(t,e){return{orientation:t,position:e}}function $D(t){return t.reduce((e,n)=>e+($C(n)?1:0),0)}const WD={small:"small",base:"base",mid:"mid",large:"mid"},XD={small:"h-control-small",base:"h-control-base",mid:"h-control-mid",large:"h-control-large"};function YC(t){const{padX:e,padY:n}=le[t];return R(XD[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 YD(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),YD(t),"!border-0 [border:0!important] !shadow-none [box-shadow:none!important]","z-0 focus-visible:z-[2]")}function KD(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 KC({orientation:t,segmented:e,variant:n,className:r}){return Zu("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 qC(t){return Zu("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 qD({groupSegment:t,groupVariant:e,buttonSize:n,className:r}){return Zu(KD(t),e==="gloss"&&"bg-transparent text-foreground","inline-flex items-center",YC(n),r)}const ZD="max-w-[12rem] truncate font-w-base whitespace-nowrap md:max-w-[18rem]";function Ju(...t){return R(...t)}const QD=new Set(["default","primary","outline","secondary","ghost"]),JD={default:"default",primary:"primary",outline:"default",secondary:"secondary",ghost:"default",gloss:"default"},ZC={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")}},QC={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"}},eO="relative z-0 flex shrink-0 cursor-pointer items-center justify-center rounded-full outline-none overflow-hidden",tO="cursor-not-allowed opacity-50",nO="relative z-[1] shrink-0 text-current",rO="rounded-full";function oO(t){return ZC[t]}function sO({variant:t,size:e,disabled:n,className:r,slotRoot:o}){const s=t==="gloss",i=ZC[t],a=QC[e];return Ju(eO,s?R("gloss-btn",nn):ir,!n&&!s&&et(JD[t]),!s&&vr[t],i.focusOutline,a.root,n&&tO,r,o)}function iO(t,e){return Ju(nO,QC[t].icon,e)}function aO({variant:t,animated:e,disabled:n,forwardedRef:r,onPointerDown:o,onPointerEnter:s,onPointerLeave:i}){const a=Ji({isGloss:t==="gloss",animated:e,enabled:!n,hasHoverShadow:QD.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 jl=l.createContext({});function lO({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 JC(){return l.useContext(jl)}function cO({color:t,disabled:e,className:n}){const r=JC();return d.jsx(vs,{color:t,disabled:e,duration:Se().rippleDefaultDuration,className:Ju(rO,r.ripple,n)})}function uO({size:t}){const e=JC();return d.jsx(Ie.IoClose,{"aria-hidden":!0,className:iO(t,e.icon)})}function dO(t){return t??"Close"}function fO({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=oO(t),m=sO({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:dO(a),buttonClass:m,convergeRippleColor:f.convergeBg,classNames:c}}const Fo=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,...C},g){const h=fO({variant:e,size:n,animated:r,ripple:o,className:s,classNames:i,disabled:a,type:c,"aria-label":u}),b=aO({variant:h.variant,animated:h.animated,disabled:h.disabled,forwardedRef:g,onPointerDown:f,onPointerEnter:m,onPointerLeave:p});return d.jsx(lO,{classNames:h.classNames,children:d.jsxs("button",{ref:b.setRefs,type:h.type,disabled:h.disabled,"aria-label":h.ariaLabel,className:h.buttonClass,onPointerEnter:b.handlePointerEnter,onPointerLeave:b.handlePointerLeave,onPointerDown:b.handlePointerDown,...C,children:[h.ripple?d.jsx(cO,{color:h.convergeRippleColor,disabled:h.disabled}):null,d.jsx(uO,{size:h.size})]})})});Fo.displayName="CloseButton";const mO=new Set(["ExpandableIcon","Accordion.Icon"]),pO=new Set(["ExpandableTitle","Accordion.Title"]),hO=new Set(["ExpandableDescription","Accordion.Description"]),gO=new Set(["ExpandableChevron","Accordion.Indicator"]),CO=new Set(["ExpandableMessage","Accordion.Message"]),bO=new Set(["ExpandableTrigger","ExpandablePanel","ExpandableMessage","Accordion.Trigger","Accordion.Panel","Accordion.Message","Accordion.Heading"]);function ot(...t){return R(...t)}function xO(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function ed(t){return t.displayName}function _O(t){const e=[],n=[];return l.Children.forEach(t,r=>{l.isValidElement(r)&&r.type===vs?e.push(r):n.push(r)}),{ripples:e,rest:n}}function SO(t){let e=!1;return l.Children.forEach(t,n=>{if(e||!l.isValidElement(n))return;const r=ed(n.type);r!=null&&CO.has(r)&&(e=!0)}),e}function vO(t){let e=!1;const n=r=>{if(!e)for(const o of l.Children.toArray(r)){if(!l.isValidElement(o))continue;const s=ed(o.type);if(s!=null&&bO.has(s)){e=!0;return}n(o.props.children)}};return n(t),e}function fa(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=ed(s.type);if(i!=null&&e.has(i)){n=!0;return}r(s.props.children)}};return r(t),n}function yO(t){return fa(t,mO)}function AO(t){return fa(t,pO)}function TO(t){return fa(t,hO)}function eb(t){return fa(t,gO)}function LO({children:t,hideChevron:e,hasPanel:n}){const r=eb(t),o=n&&!e&&!r;return{hasIndicator:yO(t),hasTitle:AO(t),hasDescription:TO(t),hasAction:o||r,hasClose:!1}}const tb=l.createContext(null);function EO({value:t,children:e}){return d.jsx(tb.Provider,{value:t,children:e})}function Wr(){const t=l.useContext(tb);if(!t)throw new Error("Expandable components must be used inside <Expandable>.");return t}const Ml=l.createContext({});function IO({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 ur(){return l.useContext(Ml)}const td=l.createContext(null);function wO({gridSlots:t,children:e}){return d.jsx(td.Provider,{value:t,children:e})}function RO(){const t=l.useContext(td);if(!t)throw new Error("Expandable trigger parts must be inside <Expandable.Trigger>.");return t}function ma(){return l.useContext(td)}function pa(t){return t?2:1}function NO(t){return t.hasAction?pa(t.hasIndicator)+1:null}function DO(t){return t.hasClose?pa(t.hasIndicator)+(t.hasAction?2:1):null}function OO(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 ha={1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4"};function Go(t,e="gap-x-base"){const n=t.hasTitle&&t.hasDescription;return R("grid w-full min-w-0 text-left",OO(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 Ho(t){return R("row-start-1 self-center min-w-0 max-w-full justify-self-start",ha[pa(t.hasIndicator)])}function Ds(t){return R(t.hasTitle?"row-start-2":"row-start-1","min-w-0 w-full max-w-full justify-self-stretch self-start",ha[pa(t.hasIndicator)])}function Os(t){const e=NO(t);return e==null?"hidden":R("row-start-1 self-center shrink-0 justify-self-end",ha[e])}function nb(t){const e=DO(t);return e==null?"hidden":R("row-start-1 self-center shrink-0 justify-self-end",ha[e])}function Bi(t){return t.scrollHeight}function PO(t,e){const n=Bi(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 hi(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 ep="data-collapsible-init";function rb(t,e){const n=l.useRef(e);return l.useCallback(r=>{t.current=r,r&&!r.hasAttribute(ep)&&(r.setAttribute(ep,""),hi(r,n.current))},[t])}function ob(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,hi(a,t);return}if(s!=null&&s.current){s.current=!1,i.current=t,hi(a,t);return}if(i.current!==t){if(i.current=t,V(a),u){hi(a,t);return}if(t)a.style.overflow="hidden",X.fromTo(a,{height:0},{height:()=>Bi(c),...km(),overwrite:"auto",onComplete:()=>PO(a,c)});else{const f=a.getBoundingClientRect().height||Bi(c);a.style.height=`${f}px`,a.style.overflow="hidden",X.to(a,{height:0,...km(),overwrite:"auto",onComplete:()=>{a.style.height="0px",a.style.overflow="hidden"}})}}},[t,e,n,s])}function kO({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]),C=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:C}}function BO(t){const e=l.useRef(null),n=l.useRef(null),r=rb(e,t);return ob(t,e,n),{shellRef:e,innerRef:n,bindShellRef:r}}const jO={small:"small",base:"small",mid:"base",large:"base"},MO={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"},FO="rounded-mid text-left text-foreground",GO="border-token bg-surface shadow-token-base",HO="gloss-panel gloss-deep border-0",zO="gloss-content flex min-w-0 flex-col",VO="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",UO="cursor-not-allowed opacity-50",$O="cursor-pointer",WO="relative z-[1] w-full min-w-0 origin-center will-change-transform",sb="contents",ib="relative z-[1] flex shrink-0 origin-center self-center",XO=sb,YO="shrink-0 text-primary [&_svg]:size-full",KO=sb,qO="text-muted",ZO="font-w-mid",QO=ib,JO="overflow-hidden",eP="pointer-events-none absolute inset-0 z-0 overflow-hidden rounded-[inherit]";function tP({variant:t,className:e,slotClass:n}){return ot(FO,t==="gloss"?HO:GO,e,n)}function nP({size:t,disabled:e,className:n,slotClass:r}){const o=le[t];return ot(VO,o.padX,e?UO:$O,r,n)}function rP({gridSlots:t,slotClass:e}){return ot(WO,Go(t),e)}function oP({size:t,className:e,slotClass:n}){return ot(YO,le[t].icon,n,e)}function sP({size:t,className:e,slotClass:n}){return ot(MO[t],"text-left",n,e)}function iP(t){return le[t].chevronIcon}function aP(t){return le[t].chevronIcon}function lP(t){return le[t].controlText}function ab({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 nd=l.forwardRef(function({className:e,...n},r){const o=ur();return d.jsx("div",{ref:r,className:ot(XO,o.message,e),...n})});nd.displayName="ExpandableMessage";const rd=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:C,size:g,toggle:h,headerId:b,panelId:x}=Wr(),_=ur(),v=kO({open:m,disabled:p,toggle:h,forwardedRef:f,onClick:o,onKeyDown:s,onPointerDown:i}),{ripples:y,rest:S}=_O(a),T=l.useMemo(()=>LO({children:S,hideChevron:e,hasPanel:C}),[S,e,C]),L=SO(S)?d.jsx(d.Fragment,{children:S}):d.jsx(nd,{children:S}),A=C&&!e&&!eb(S),E=y.length>0?d.jsx("span",{className:ot(eP,_.triggerRippleOverlay),"aria-hidden":!0,children:y}):null,I=d.jsxs(d.Fragment,{children:[L,A?d.jsx("span",{ref:v.bindChevronRef,className:ot(Os(T),ib,_.chevron),"aria-hidden":!0,children:d.jsx(ab,{className:aP(g)})}):null]});if(n&&l.isValidElement(a)){const w=a;return l.cloneElement(w,{...u,id:b,ref:xO(f,w.props.ref),className:ot(w.props.className,r),disabled:p||w.props.disabled,"aria-expanded":C?m:void 0,"aria-controls":C?x:void 0,onClick:N=>{var O,j;(j=(O=w.props).onClick)==null||j.call(O,N),v.handleClick(N)},onKeyDown:N=>{var O,j;(j=(O=w.props).onKeyDown)==null||j.call(O,N),v.handleKeyDown(N)}})}return d.jsxs("button",{ref:v.setTriggerRef,type:c,id:b,className:nP({size:g,disabled:p,className:r,slotClass:_.trigger}),"aria-expanded":C?m:void 0,"aria-controls":C?x:void 0,disabled:p,onPointerDown:v.handlePointerDown,onClick:v.handleClick,onKeyDown:v.handleKeyDown,...u,children:[E,d.jsx(wO,{gridSlots:T,children:d.jsx("span",{ref:v.liftSpanRef,className:rP({gridSlots:T,slotClass:_.triggerLift}),children:I})})]})});rd.displayName="ExpandableTrigger";function od({className:t,children:e,...n}){const{size:r}=Wr(),o=ur(),s=ma();return e==null?null:d.jsx("span",{"aria-hidden":!0,className:ot(oP({size:r,className:t,slotClass:o.icon}),s&&Rr(s)),...n,children:e})}od.displayName="ExpandableIcon";function lb({className:t,...e}){const n=ur();return d.jsx("div",{className:ot(KO,n.content,t),...e})}lb.displayName="ExpandableContent";function sd({className:t,...e}){const{size:n}=Wr(),r=ur(),o=ma();return d.jsx(ee,{as:"div",variant:lP(n),className:ot(ZO,o&&Ho(o),r.title,t),...e})}sd.displayName="ExpandableTitle";function id({className:t,...e}){const{size:n}=Wr(),r=ur(),o=ma();return d.jsx(ee,{as:"div",variant:jO[n],className:ot(qO,o&&Ds(o),r.description,t),...e})}id.displayName="ExpandableDescription";function cb({className:t,...e}){const{open:n,hasPanel:r,size:o}=Wr(),s=ur(),i=RO(),a=l.useRef(null),c=Hr(n,a,()=>Se().enableExpandable);return r?d.jsx("span",{ref:c,className:ot(Os(i),QO,s.chevron,t),"aria-hidden":!0,...e,children:d.jsx(ab,{className:iP(o)})}):null}cb.displayName="ExpandableChevron";const ad=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(C=>{typeof o=="function"?o(C):o&&(o.current=C)},[o]);return d.jsx("div",{ref:m.bindShellRef,className:ot(JO,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:sP({size:c,className:e,slotClass:f.panel}),...r,children:n})})})});ad.displayName="ExpandablePanel";function cP({title:t,description:e,icon:n,panelChildren:r}){return d.jsxs(d.Fragment,{children:[d.jsxs(rd,{children:[n!=null?d.jsx(od,{children:n}):null,t!=null?d.jsx(sd,{children:t}):null,e!=null?d.jsx(id,{children:e}):null]}),r!=null?d.jsx(ad,{children:r}):null]})}function uP({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),[C,g]=l.useState(!1),h=l.useCallback(y=>{g(y)},[]),b=f?r:m,x=l.useCallback(()=>{if(s||!C)return;const y=!b;f||p(y),o==null||o(y)},[f,s,C,b,o]),_={open:b,disabled:s,hasPanel:C,size:i,variant:a,toggle:x,headerId:u,panelId:c,setHasPanel:h},v=e===!0||vO(t);return{contextValue:_,isCompound:v,isGloss:a==="gloss"}}const ub=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:C,...g},h){const b=uP({children:e,compound:n,defaultOpen:c,open:u,onOpenChange:f,disabled:m,size:a,variant:i}),x=wo(h,b.isGloss),_=b.isCompound?e:d.jsx(cP,{title:r,description:o,icon:s,panelChildren:e});return d.jsx(EO,{value:b.contextValue,children:d.jsx(IO,{classNames:C,children:d.jsx("div",{ref:x,className:tP({variant:i,className:p,slotClass:C==null?void 0:C.root}),...g,children:b.isGloss?d.jsx("div",{className:ot(zO,C==null?void 0:C.glossContent),children:_}):_})})})});ub.displayName="ExpandableRoot";const jn=Object.assign(ub,{Trigger:rd,Message:nd,Icon:od,Content:lb,Title:sd,Description:id,Chevron:cb,Panel:ad}),Ps=l.createContext(null),Fl=l.createContext({});function dP({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 zo(){return l.useContext(Fl)}const fP={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 ld(t){return t??"base"}function Dn(t){return fP[ld(t)]}function mP(t){const e=Dn(t);return`w-fit ${e.maxWidthClass} ${e.shellPadding}`}function pP(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 cd={danger:Ie.IoCloseCircleOutline,success:Ie.IoCheckmarkCircleOutline,info:Ie.IoInformationCircleOutline,warning:Ie.IoWarning};function ud(t){return t??"default"}function dd(t){return t??"default"}function ks(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 hP(t){return ks(t,e=>e==="AlertTitle")}function gP(t){return ks(t,e=>e==="AlertDescription")}function CP(t){return ks(t,e=>e==="AlertIndicator")}function db(t,e){for(const n of l.Children.toArray(t)){if(!l.isValidElement(n))continue;n.type.displayName==="AlertIndicator"&&e(n.props),db(n.props.children,e)}}function bP(t,e,n,r){const o=r??e;return n===null?!1:n!==void 0||o!=="default"?!0:t==="outline"}function xP(t,e,n){if(!CP(t))return!1;let r=!1;return db(t,o=>{bP(e,n,o.children,o.status)&&(r=!0)}),r}function _P(t){return ks(t,e=>e==="AlertAction")}const SP=new Set(["AlertMessage","AlertIndicator","AlertContent","AlertTitle","AlertDescription","AlertAction"]);function vP(t){return ks(t,e=>e!=null&&SP.has(e))}function fd(t,e){return e!=="default"?!0:t==="outline"}function md(t,e){return e!=="default"?cd[e]:t==="outline"?Ie.IoHelpCircleOutline:null}function yP(t,e,n,r,o){return r?xP(o,t,e):n===null?!1:n!==void 0?!0:fd(t,e)&&md(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 fb(t,e){if(t==="gloss")return R("gloss-panel border-0 text-foreground",e!=="default"?bt[e]:"");if(e==="default")return AP[t];switch(t){case"default":return R(Ec[e],bt[e]);case"outline":return R("bg-transparent",Ic[e],bt[e]);case"secondary":return R("bg-secondary border-token",bt[e])}}function mb(t){return t!=="default"?bt[t]:"text-primary"}const TP="inline-flex shrink-0 items-center justify-center";function LP(t,e){return R(TP,e,mb(t))}const pb="contents",EP="font-w-mid",IP="text-muted";function pd({status:t,className:e="",children:n,...r}){const o=l.useContext(Ps),s=zo(),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=md(i,a),m=n!==void 0?n:fd(i,a)&&f!==null?d.jsx(f,{"aria-hidden":!0}):null;return m===null?null:d.jsx("span",{className:R(LP(a,c.iconSvgClass),u&&Rr(u),s.indicator,e),...r,children:m})}pd.displayName="AlertIndicator";function hb({className:t="",...e}){const n=zo();return d.jsx("div",{className:R(pb,n.content,t),...e})}hb.displayName="AlertContent";const gb=l.forwardRef(function({className:e="",...n},r){const o=zo();return d.jsx("div",{ref:r,className:R(pb,o.message,e),...n})});gb.displayName="AlertMessage";function hd({className:t="",id:e,...n}){const r=l.useContext(Ps),o=zo(),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(EP,(r==null?void 0:r.gridSlots)&&Ho(r.gridSlots),o.title,t),...n})}hd.displayName="AlertTitle";function gd({className:t="",id:e,...n}){const r=l.useContext(Ps),o=zo(),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(IP,(r==null?void 0:r.gridSlots)&&Ds(r.gridSlots),o.description,t),...n})}gd.displayName="AlertDescription";function Cd({className:t="",...e}){const n=l.useContext(Ps),r=zo();return d.jsx("div",{className:R((n==null?void 0:n.gridSlots)&&Os(n.gridSlots),r.action,t),...e})}Cd.displayName="AlertAction";function wP({gridSlots:t,title:e,description:n,icon:r,action:o,children:s}){return d.jsxs(d.Fragment,{children:[t.hasIndicator?d.jsx(pd,{children:r}):null,e!=null?d.jsx(hd,{children:e}):null,n!=null?d.jsx(gd,{children:n}):null,s,o!=null?d.jsx(Cd,{children:o}):null]})}function RP({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(b=>{u(b),c.current=b,typeof r=="function"?r(b):r&&(r.current=b)},[u,r]),m=No(c,a&&i),p=Oo(c,a&&!i),C=a?i?nn:p.motionClass:"",g=R(fb(t,e),C),h=l.useMemo(()=>({onPointerOver:b=>{o==null||o(b),!(b.defaultPrevented||!a)&&(i?m.onPointerOver(b):p.onPointerEnter(b))},onPointerOut:b=>{s==null||s(b),a&&(i?m.onPointerOut(b):p.onPointerLeave(b))}}),[m.onPointerOut,m.onPointerOver,i,a,s,o,p.onPointerEnter,p.onPointerLeave]);return{setRootRef:f,surfaceClass:g,pointerHandlers:h}}function Cb(t,e){return e??(t==="danger"||t==="warning"?"alert":"status")}function NP(t,e,n,r){if(n)return t;if(r)return e}function DP(t,e,n){if(e&&n)return t}function OP(t,e,n,r,o,s,i,a){return{hasIndicator:yP(t,e,n,o,s),hasTitle:i,hasDescription:a,hasAction:o?_P(s):r!=null,hasClose:!1}}function PP({variant:t,status:e,size:n,role:r,title:o,description:s,icon:i,action:a,children:c,ariaLabelledByProp:u,ariaDescribedByProp:f}){const m=ud(t),p=dd(e),C=ld(n),g=Dn(C),h=l.useId(),b=`${h}-title`,x=`${h}-description`,_=vP(c),v=l.useMemo(()=>o!=null||hP(c),[c,o]),y=l.useMemo(()=>s!=null||gP(c),[c,s]),S=l.useMemo(()=>OP(m,p,i,a,_,c,v,y),[a,c,y,v,i,_,p,m]),T=Cb(p,r),L=u??NP(b,x,v,y),A=f??DP(x,v,y),E=l.useMemo(()=>({variant:m,status:p,size:C,sizePreset:g,titleId:b,descriptionId:x,gridSlots:S}),[x,S,C,g,p,b,m]);return{variant:m,status:p,size:C,sizePreset:g,isCompound:_,gridSlots:S,liveRole:T,ariaLabelledBy:L,ariaDescribedBy:A,contextValue:E}}const bb=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:C,onPointerOut:g,"aria-labelledby":h,"aria-describedby":b,...x},_){const{isCompound:v,gridSlots:y,sizePreset:S,liveRole:T,ariaLabelledBy:L,ariaDescribedBy:A,contextValue:E}=PP({variant:e,status:n,size:r,role:o,title:s,description:i,icon:a,action:c,children:p,ariaLabelledByProp:h,ariaDescribedByProp:b}),{setRootRef:I,surfaceClass:w,pointerHandlers:N}=RP({variant:E.variant,status:E.status,hoverLift:f,ref:_,onPointerOver:C,onPointerOut:g});return d.jsx(Ps.Provider,{value:E,children:d.jsx(dP,{classNames:u,children:d.jsx("div",{ref:I,role:T,"aria-labelledby":L,"aria-describedby":A,className:R(Go(y,S.gridGap),mP(r),w,u==null?void 0:u.root,m),...N,...x,children:v?p:d.jsx(wP,{gridSlots:y,title:s,description:i,icon:a,action:c,children:p})})})})});bb.displayName="AlertRoot";const kP=Object.assign(bb,{Indicator:pd,Message:gb,Content:hb,Title:hd,Description:gd,Action:Cd}),xb=l.createContext(null);function BP(){const t=l.useContext(xb);if(!t)throw new Error("Accordion components must be inside <Accordion>.");return t}function jP(t){const e=l.useRef(null);return Hr(t,e,()=>Se().enableExpandable)}function Xr(...t){return R(...t)}function MP(t,e){return t??(e!=null?String(e):null)}function FP(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 GP(t){return Xr("relative !rounded-none",t)}function HP(t){return Xr("m-0 font-[inherit] text-[inherit]",t)}function zP(t){return Xr("relative z-[1] flex shrink-0 origin-center self-center",t)}function VP(t){return Xr("text-muted",t)}const UP="shrink-0";function $P({className:t=""}){return d.jsx("svg",{className:Xr(UP,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 _b=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:C=>c(C?m:null),className:GP(r),...s,children:o})});_b.displayName="Accordion.Item";function Sb({className:t,children:e,...n}){return d.jsx("h3",{className:HP(t),...n,children:e})}Sb.displayName="Accordion.Heading";const vb=l.forwardRef(function({hideChevron:e=!0,className:n,...r},o){return d.jsx(jn.Trigger,{ref:o,hideChevron:e,className:n,...r})});vb.displayName="Accordion.Trigger";function yb(t){return d.jsx(jn.Message,{...t})}yb.displayName="Accordion.Message";function Ab(t){return d.jsx(jn.Icon,{...t})}Ab.displayName="Accordion.Icon";function Tb(t){return d.jsx(jn.Content,{...t})}Tb.displayName="Accordion.Content";function Lb(t){return d.jsx(jn.Title,{...t})}Lb.displayName="Accordion.Title";function Eb(t){return d.jsx(jn.Description,{...t})}Eb.displayName="Accordion.Description";function Ib({className:t,children:e,...n}){const{open:r,hasPanel:o}=Wr(),s=jP(r),i=ma();return o?d.jsx("span",{ref:s,className:Xr(i&&Os(i),zP(t)),"aria-hidden":!0,...n,children:e??d.jsx($P,{})}):null}Ib.displayName="Accordion.Indicator";const wb=l.forwardRef(function(e,n){return d.jsx(jn.Panel,{ref:n,...e})});wb.displayName="Accordion.Panel";function Rb({className:t,...e}){return d.jsx(ee,{as:"div",variant:"base",className:VP(t),...e})}Rb.displayName="Accordion.Body";function WP({defaultOpenId:t=null,defaultOpenIndex:e=null,openId:n,onOpenIdChange:r,size:o="base"}){const s=n!==void 0,i=MP(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 Nb=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}=WP({defaultOpenId:e,defaultOpenIndex:n,openId:r,onOpenIdChange:o,size:s});return d.jsx(xb.Provider,{value:f,children:d.jsx("div",{ref:u,className:FP(i),...c,children:a})})});Nb.displayName="Accordion";const XP=Object.assign(Nb,{Item:_b,Heading:Sb,Trigger:vb,Message:yb,Icon:Ab,Content:Tb,Title:Lb,Description:Eb,Indicator:Ib,Panel:wb,Body:Rb});function YP(t,e){return cr("flex w-full max-w-full flex-col gap-mid text-left",e==null?void 0:e.root,t)}function KP(t,e){return cr("flex flex-col gap-base",e==null?void 0:e.section,t)}function qP(t,e){return cr("text-base font-w-mid text-foreground",e==null?void 0:e.title,t)}function ZP(t,e){return cr("text-base text-muted",e==null?void 0:e.description,t)}function QP(t,e){return cr("flex flex-wrap items-center justify-end gap-small pt-small",e==null?void 0:e.actions,t)}function JP(t,e){return cr("sr-only",e==null?void 0:e.errorSummary,t)}function ek(t,e){return cr("sr-only",e==null?void 0:e.announce,t)}function tk(t,e){return cr(t,e==null?void 0:e.field)}function Db({className:t="",classNames:e,...n}){const r=Mr();return d.jsx("div",{className:KP(t,{...r,section:e==null?void 0:e.section}),...n})}Db.displayName="Form.Section";function Ob({className:t="",id:e,...n}){const r=Mr(),o=ea();return d.jsx(ee,{as:"h2",variant:"mid",id:e??(o==null?void 0:o.titleId),className:qP(t,r),...n})}Ob.displayName="Form.Title";function Pb({className:t="",id:e,...n}){const r=Mr(),o=ea();return d.jsx("p",{id:e??(o==null?void 0:o.descriptionId),className:ZP(t,r),...n})}Pb.displayName="Form.Description";function kb({className:t="",...e}){const n=Mr();return d.jsx("div",{className:QP(t,n),...e})}kb.displayName="Form.Actions";function bd({className:t="",id:e,...n}){const r=Mr(),o=ea(),s=bn(),i=(s==null?void 0:s.getErrors())??{},a=oN(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:JP(t,r),...n,children:c})}bd.displayName="Form.ErrorSummary";function xd({className:t="",id:e,message:n}){const r=Mr(),o=ea();return n?d.jsx("div",{id:e??(o==null?void 0:o.announceId),role:"status","aria-live":"polite","aria-atomic":"true",className:ek(t,r),children:n}):null}xd.displayName="Form.Announce";function Bb({name:t,rules:e,className:n="",classNames:r,children:o}){const s=Mr(),i=bn();return l.useEffect(()=>{if(!(!i||!e))return i.registerFieldRules(t,e),()=>i.unregisterFieldRules(t)},[i,t,e]),d.jsx("div",{className:tk(n,{...s,field:r==null?void 0:r.field}),children:o})}Bb.displayName="Form.Field";function nk({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(),C=l.useId(),g=l.useId(),h={titleId:m,descriptionId:p,errorSummaryId:C,announceId:g},b=e!==void 0,[x,_]=l.useState(t??{}),v=b?e:x,[y,S]=l.useState({}),[T,L]=l.useState({}),[A,E]=l.useState(0),[I,w]=l.useState(!1),[N,O]=l.useState(null),j=l.useRef(new Map),k=l.useRef(r??{});k.current=r??{};const G=l.useCallback(te=>{b||_(te),n==null||n(te)},[b,n]),D=l.useCallback(te=>te.split(".").reduce((ae,he)=>{if(!(ae==null||typeof ae!="object"))return ae[he]},v),[v]),P=l.useCallback((te,U,ae)=>{const he=sN(v,te,U);if(G(he),ae!=null&&ae.shouldValidate){const Ne=tl(U,he,k.current[te]);S(Ye=>{const q={...Ye};return Ne?q[te]=Ne:delete q[te],q})}},[G,v]),F=l.useCallback(te=>y[te],[y]),B=l.useCallback(()=>y,[y]),$=l.useCallback(te=>k.current[te],[]),W=l.useCallback((te,U)=>{L(ae=>({...ae,[te]:U}))},[]),M=l.useCallback(te=>!!T[te],[T]),z=l.useCallback((te,U)=>{U?j.current.set(te,U):j.current.delete(te)},[]),H=l.useCallback((te,U)=>{U!=null&&(k.current={...k.current,[te]:U})},[]),oe=l.useCallback(te=>{const U={...k.current};delete U[te],k.current=U},[]),pe=l.useCallback(te=>{const U=tl(D(te),v,k.current[te]);return S(ae=>{const he={...ae};return U?he[te]=U:delete he[te],he}),U},[D,v]),ce=l.useCallback(()=>{const te={};for(const U of Object.keys(k.current)){const ae=tl(D(U),v,k.current[U]);ae&&(te[U]=ae)}return S(te),te},[D,v]),Y=l.useCallback(()=>{Um(j.current,y)},[y]),ne=l.useCallback(()=>O(null),[]),me=l.useMemo(()=>({disabled:i,readOnly:a,size:c,validateMode:s,isSubmitting:I,submitCount:A,getValue:D,setValue:P,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,I,M,a,z,H,oe,W,P,c,A,pe,ce,s]),re=l.useCallback(async te=>{te.preventDefault(),E(ae=>ae+1),O(null);let U=ce();if(o){const ae=await o(v);ae.errors&&(U={...U,...ae.errors},S(U))}if(el(U)>0){O(cN(el(U))),Um(j.current,U),f==null||f(U);return}if(u)try{w(!0),await u(v),O(uN())}finally{w(!1)}},[u,f,o,ce,v]),be=el(y)>0;return{shellIds:h,bindingValue:me,handleSubmit:re,errors:y,hasErrors:be,isSubmitting:I,announce:N}}const jb=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:C,onSubmitError:g,...h},b){const{shellIds:x,bindingValue:_,handleSubmit:v,hasErrors:y,announce:S}=nk({defaultValues:o,values:s,onValuesChange:i,rules:a,resolver:c,validateMode:u,readOnly:f,size:m,disabled:p,onSubmit:C,onSubmitError:g,classNames:r});return d.jsx(h0,{classNames:r,children:d.jsx(Cg.Provider,{value:_,children:d.jsx(g0,{shellIds:x,children:d.jsxs("form",{ref:b,noValidate:!0,onSubmit:v,"aria-labelledby":x.titleId,"aria-describedby":lN({descriptionId:x.descriptionId,errorSummaryId:x.errorSummaryId,hasErrors:y}),className:YP(n,r),...h,children:[d.jsx(xd,{message:S}),d.jsx(bd,{}),e]})})})})});jb.displayName="Form";const rk=Object.assign(jb,{Section:Db,Title:Ob,Description:Pb,Actions:kb,ErrorSummary:bd,Announce:xd,Field:Bb}),ok={vertical:"flex flex-col gap-plus",horizontal:"flex flex-row flex-wrap items-start gap-x-mid gap-y-plus"},Mb=l.forwardRef(function({size:e="small",...n},r){return d.jsx(du,{ref:r,size:e,...n})}),_d=l.forwardRef(function({children:e,...n},r){return d.jsx(ys,{ref:r,...n,children:e})});_d.displayName="OptionGroupLegend";function Fb({children:t,className:e,id:n,...r}){return d.jsx(Xe,{as:"span",variant:"small",id:n,className:e,...r,children:t})}function Gb({children:t,className:e,...n}){return d.jsx(ta,{className:e,...n,children:t})}const Hb=l.forwardRef(function({className:e,orientation:n="vertical",children:r,...o},s){return d.jsx("div",{ref:s,className:R("text-left",ok[n],e),...o,children:r})});function zb({children:t,...e}){return d.jsx(_d,{...e,children:d.jsx(Gb,{children:t})})}zb.displayName="CheckboxGroup.Legend";const Sd=l.createContext(null);function sk({value:t,children:e}){return d.jsx(Sd.Provider,{value:t,children:e})}function Vb(){const t=l.useContext(Sd);if(!t)throw new Error("CheckboxGroup components must be inside <CheckboxGroup>.");return t}function ik(){return l.useContext(Sd)}function Ub({id:t,...e}){const{hintId:n}=Vb();return d.jsx(Fb,{id:t??n,...e})}Ub.displayName="CheckboxGroup.Hint";function $b({id:t,...e}){const{errorId:n}=Vb();return d.jsx(Ze,{id:t??n,...e})}$b.displayName="CheckboxGroup.Error";const Wb=l.forwardRef(function(e,n){return d.jsx(Hb,{ref:n,...e})});Wb.displayName="CheckboxGroup.List";function ak({isRequired:t=!1,selection:e="multiple",value:n,defaultValue:r,onValueChange:o,disabled:s=!1,hintId:i,errorId:a}){const c=fu(i),u=mu(a),f=n!==void 0,[m,p]=l.useState(r),C=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 b=l.useCallback(()=>e!=="single"||!t||h.current?!1:(h.current=!0,!0),[t,e]),x=l.useMemo(()=>({selection:e,disabled:s,isRequired:t,hintId:c,errorId:u,selectedValue:C,selectSingleValue:g,claimRequiredAnchor:b}),[b,s,u,c,t,g,C,e]),_=l.useMemo(()=>({isRequired:t}),[t]);return{contextValue:x,fieldLabelCtx:_,hintId:c,errorId:u,disabled:s}}const Xb=l.forwardRef(function(e,n){const{children:r,className:o,size:s,disabled:i=!1,...a}=e,{contextValue:c,fieldLabelCtx:u,hintId:f,errorId:m}=ak(e);return d.jsx(sk,{value:c,children:d.jsx(Xt.Provider,{value:u,children:d.jsx(Mb,{ref:n,disabled:i,hintId:f,errorId:m,size:s,className:o,...a,children:r})})})});Xb.displayName="CheckboxGroup";const lk=Object.assign(Xb,{Legend:zb,Label:Ue,Hint:Ub,Error:$b,List:Wb,Group:Fr,Actions:Bo}),vd=l.createContext(null);function ck({value:t,children:e}){return d.jsx(vd.Provider,{value:t,children:e})}function Yb(){const t=l.useContext(vd);if(!t)throw new Error("RadioGroup components must be inside <RadioGroup>.");return t}function uk(){return l.useContext(vd)}function Kb({children:t,...e}){return d.jsx(_d,{...e,children:d.jsx(Gb,{children:t})})}Kb.displayName="RadioGroup.Legend";function qb({id:t,...e}){const{hintId:n}=Yb();return d.jsx(Fb,{id:t??n,...e})}qb.displayName="RadioGroup.Hint";function Zb({id:t,...e}){const{errorId:n}=Yb();return d.jsx(Ze,{id:t??n,...e})}Zb.displayName="RadioGroup.Error";const Qb=l.forwardRef(function(e,n){return d.jsx(Hb,{ref:n,...e})});Qb.displayName="RadioGroup.List";function dk({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=fu(i),m=mu(a),p=e!==void 0,[C,g]=l.useState(n),h=p?e==null?void 0:String(e):C,b=l.useCallback(S=>{t&&S===void 0||(p||g(S),r==null||r(S))},[p,t,r]),x=l.useRef(!1);l.useEffect(()=>{x.current=!1},[t,u]);const _=l.useCallback(()=>!t||x.current?!1:(x.current=!0,!0),[t]),v=l.useMemo(()=>({name:u,disabled:o,isRequired:t,hintId:f,errorId:m,selectedValue:h,selectValue:b,claimRequiredAnchor:_}),[_,o,m,u,f,t,b,h]),y=l.useMemo(()=>({isRequired:t}),[t]);return{contextValue:v,fieldLabelCtx:y,hintId:f,errorId:m,disabled:o}}const Jb=l.forwardRef(function(e,n){const{children:r,className:o,size:s,disabled:i=!1,name:a,...c}=e,{contextValue:u,fieldLabelCtx:f,hintId:m,errorId:p}=dk(e);return d.jsx(ck,{value:u,children:d.jsx(Xt.Provider,{value:f,children:d.jsx(Mb,{ref:n,disabled:i,hintId:m,errorId:p,size:s,className:o,...c,children:r})})})});Jb.displayName="RadioGroup";const fk=Object.assign(Jb,{Legend:Kb,Label:Ue,Hint:qb,Error:Zb,List:Qb,Group:Fr,Actions:Bo}),ex=l.forwardRef(function({children:e,className:n="",buttonSize:r,groupSegment:o,...s},i){const a=Po(),c=Pn(),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:qD({groupSegment:f,groupVariant:m,buttonSize:u,className:n}),children:d.jsx(ee,{variant:WD[u],inheritColor:!0,as:"span",className:ZD,children:e})})});ex.displayName="ButtonGroupText";function mk({children:t,orientation:e="horizontal",segmented:n=!1,buttonSize:r="base",variant:o="default"}){const s=l.useMemo(()=>Qu(t),[t]),i=l.useMemo(()=>$D(s),[s]),a=l.useMemo(()=>({segmented:n}),[n]);return{flat:s,segmentCount:i,layoutValue:a,orientation:e,segmented:n,buttonSize:r,variant:o}}function pk({orientation:t}){return d.jsx("span",{"aria-hidden":!0,className:qC(t)})}const tx=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}=mk({children:e,orientation:r,segmented:o,buttonSize:s,variant:i});let p=-1;return d.jsx(p0,{value:m,children:d.jsx("div",{ref:c,role:"group",className:KC({orientation:r,segmented:o,variant:i,className:n}),...a,children:u.map((C,g)=>{if(!$C(C))return d.jsx(l.Fragment,{children:C},C.key??`bg-wrap-${g}`);if(o)return d.jsx(l.Fragment,{children:C},C.key??`bg-item-${g}`);p+=1;const h=WC(p,f),b=XC(r,h);return d.jsxs(l.Fragment,{children:[d.jsx(hg,{segment:b,buttonSize:s,variant:i,children:C}),i!=="gloss"&&h!=="last"&&h!=="only"?d.jsx(pk,{orientation:r}):null]},C.key??`bg-seg-${g}`)})})})});tx.displayName="ButtonGroup";const hk=tx;function gk(t){return Array.from(t.querySelectorAll("[data-toggle-button-value]:not([disabled])")).filter(e=>e instanceof HTMLButtonElement)}function Ck(t,e,n,r){if(t)return n!=null?n===e?0:-1:e===r?0:-1}function bk(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 xk(t){return t?-1:0}function _k({disabled:t,isSingle:e,orientation:n,onKeyDown:r,select:o}){return s=>{if(r==null||r(s),s.defaultPrevented||t||!e)return;const i=gk(s.currentTarget);if(i.length===0)return;const a=i.findIndex(m=>m===document.activeElement),c=bk(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 tp="data-toggle-fill-init";function yd(t,e){V(t),X.set(t,{scale:e?1:0,autoAlpha:e?1:0})}function Sk(t,e){return n=>{t.current=n,n&&!n.hasAttribute(tp)&&(n.setAttribute(tp,""),yd(n,e))}}function np(t,e,n=de()||!Se().enableToggleButtonFill){if(V(t),n){yd(t,e);return}e?X.fromTo(t,{scale:0,autoAlpha:0},{scale:1,autoAlpha:1,...Pm(),overwrite:"auto"}):X.to(t,{scale:0,autoAlpha:0,...Pm(),overwrite:"auto"})}function nx(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(()=>Sk(e,s.current),[e]),u=l.useCallback(f=>{const m=e.current;m&&i.current!==f&&(i.current=f,o==null||o(f),np(m,f,a))},[e,o,a]);return l.useLayoutEffect(()=>{const f=e.current;if(f){if(i.current===void 0){i.current=t,yd(f,t);return}i.current!==t&&(r!=null&&r.current||(i.current=t,o==null||o(t),np(f,t,a)))}},[r,o,t,e,a]),{animateTo:u,bindFillRef:c}}function vk({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),C=l.useRef(!1),{animateTo:g,bindFillRef:h}=nx(s,f,{deferFillFromPressRef:m,onFillStart:i}),b=l.useCallback(()=>{m.current=!1,p.current=null,C.current=!1},[]),x=l.useCallback(()=>{const A=p.current;A!==null&&(p.current=null,m.current=!1,g(A))},[g]),_=l.useCallback(()=>{C.current=!0,x()},[x]),v=t&&!e&&!de(),y=Ji({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(A=>{v&&(m.current=!0,C.current=!1,p.current=!s),y.handlePointerDown(A)},[y,s,v]),T=l.useCallback(A=>{y.handlePointerLeave(A),b()},[b,y]),L=l.useCallback(A=>{if(!v){g(A);return}p.current=A,C.current&&x()},[g,x,v]);return{setRefs:y.setRefs,contentMotionRef:y.contentMotionRef,handlePointerEnter:y.handlePointerEnter,handlePointerLeave:T,handlePointerDown:S,bindFillRef:h,queueFillOnClick:L}}const rx=new Set(["ToggleButtonContent","ToggleButtonFill","ToggleButtonLabel","ToggleButtonIcon","ToggleButtonTrailing","ToggleButtonText"]);function ox(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 yk(t){return ox(t,e=>e!=null&&rx.has(e))}function rp(t,e){return ox(t,n=>n===e)}function Ak(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||!rx.has(r)}function Jn(...t){return R(...t)}function Tk(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 sx=l.createContext(null),ix=l.createContext(null),Gl=l.createContext({});function Lk(){return l.useContext(sx)}function Ek({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 Vo(){return l.useContext(Gl)}function Bs(){return l.useContext(ix)}function Ik({value:t,children:e}){return d.jsx(ix.Provider,{value:t,children:e})}const wk={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"},Rk="group/toggle relative inline-flex origin-center items-center justify-center overflow-hidden outline-none text-foreground focus-ring",Nk="gloss-btn",Dk="bg-transparent",Ok="cursor-not-allowed opacity-50",Pk="cursor-pointer",kk="pointer-events-none absolute -inset-px z-0 origin-center motion-reduce:transition-none",Bk="relative z-[1] inline-flex w-full min-w-0 items-center justify-center gap-xsmall",jk="origin-center will-change-transform",Mk="inline-flex shrink-0 items-center justify-center [&_svg]:size-full",Fk="inline-flex w-full min-w-0 items-center gap-xsmall",Gk="min-w-0 shrink";function Hk({slotClass:t,className:e}){return Jn(Fk,t,e)}function zk(t,e){return Jn(Gk,t,e)}function Vk(t){return wk[t]}function Uk({fillColor:t,pressed:e,roundingClass:n,slotClass:r}){return Jn(kk,t,Io,e?`group-hover/toggle:${t}/80`:"group-hover/toggle:bg-default-hover",n,r)}function ax(t,e){return Jn(Mk,le[t].icon,e)}function $k({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(Rk,a?Jn(Nk,!o&&nn):Jn(!o&&ir),!a&&!e&&!n&&et(),!a&&Vk(t),e&&Dk,n?Ok:Pk,eu(r,!0),c,u,s,i)}function Wk({groupSegment:t,slotClass:e}){return Jn(Bk,t&&jk,e)}function Xk(t){return t?hn(t):"rounded-base"}const Yk={small:"small",base:"base",mid:"mid",large:"mid"},Ad=l.forwardRef(function({className:e="",...n},r){const o=Bs(),s=Vo();return o?d.jsx("span",{ref:r??o.bindFillRef,"aria-hidden":!0,className:Uk({fillColor:o.fillColor,pressed:o.pressed,roundingClass:o.roundingClass,slotClass:R(s.fill,e)}),...n}):null});Ad.displayName="ToggleButtonFill";const ji=l.forwardRef(function({className:e="",children:n,...r},o){const s=Bs(),i=Vo();return d.jsx("span",{ref:o??(s==null?void 0:s.contentMotionRef),className:Wk({groupSegment:s==null?void 0:s.groupSegment,slotClass:R(i.content,e)}),...r,children:n})});ji.displayName="ToggleButtonContent";const lx=l.forwardRef(function({className:e="",children:n,...r},o){const s=Vo();return d.jsx("span",{ref:o,className:Hk({slotClass:s.label,className:e}),...r,children:n})});lx.displayName="ToggleButtonLabel";function Td({className:t="",children:e,...n}){const r=Bs(),o=Vo(),s=(r==null?void 0:r.size)??"base";return d.jsx("span",{className:ax(s,R(o.leftIcon,t)),"aria-hidden":!0,...n,children:e})}Td.displayName="ToggleButtonIcon";function Ld({className:t="",children:e,...n}){const r=Bs(),o=Vo(),s=(r==null?void 0:r.size)??"base";return d.jsx("span",{className:ax(s,R(o.rightIcon,t)),"aria-hidden":!0,...n,children:e})}Ld.displayName="ToggleButtonTrailing";function Ed({className:t="",children:e,...n}){const r=Bs(),o=Vo(),s=(r==null?void 0:r.size)??"base";return d.jsx(ee,{variant:Yk[s],as:"span",inheritColor:!0,className:zk(o.text,t),...n,children:e})}Ed.displayName="ToggleButtonText";function Kk({leftIcon:t,rightIcon:e,children:n}){const r=Ak(n);return d.jsxs(d.Fragment,{children:[t!=null?d.jsx(Td,{children:t}):null,r?d.jsx(Ed,{children:n}):n,e!=null?d.jsx(Ld,{children:e}):null]})}function qk({inGroup:t,isSingleGroup:e}){return t&&e?"radio":void 0}function Zk({inGroup:t,isSingleGroup:e,pressed:n}){return!t||!e?n:void 0}function Qk({inGroup:t,isSingleGroup:e,pressed:n}){return t&&e?n:void 0}function Jk({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:C,onClick:g}){const h=Lk(),b=Pn(),x=e??(b==null?void 0:b.segment),_=h!=null&&t!=null,v=(h==null?void 0:h.type)==="single",y=c??(h==null?void 0:h.size)??(b==null?void 0:b.buttonSize)??"base",S=i??(h==null?void 0:h.variant)??"default",T=f||!!(h!=null&&h.disabled),[L,A]=Tk(_?void 0:n,_?!1:r),E=_?h.isSelected(t):L,I=_?n!==void 0?!!n:E:n!==void 0?!!n:L,w=Xk(x),N=yk(C),O=N?void 0:m,j=$k({variant:S,pressed:I,disabled:T,size:y,groupSegment:x,slotClass:p==null?void 0:p.root,className:m}),k=l.useCallback((G,D)=>{if(g==null||g(G),G.defaultPrevented||T)return;if(_&&t!=null){h.select(t);return}const P=!I;D(P),A(P),o==null||o(P)},[T,h,_,t,g,o,I,A]);return{itemValue:t,groupCtx:h,groupSegment:x,inGroup:_,isSingleGroup:v,size:y,variant:S,disabled:T,pressed:I,onFillStart:s,fillColor:a,animated:u,classNames:p,roundingClass:w,buttonClass:j,role:qk({inGroup:_,isSingleGroup:v}),ariaPressed:Zk({inGroup:_,isSingleGroup:v,pressed:I}),ariaChecked:Qk({inGroup:_,isSingleGroup:v,pressed:I}),tabIndex:_&&v?h.tabIndexFor(t):void 0,isCompound:N,contentLayoutClass:O,children:C,handleClick:k}}const cx=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:C,rightIcon:g,animated:h,disabled:b,children:x,onClick:_,onPointerDown:v,onPointerEnter:y,onPointerLeave:S,...T},L){var O;const A=Jk({value:r,groupSegment:o,pressed:s,defaultPressed:i,onPressedChange:a,onFillStart:c,variant:u,fillColor:f,size:m,animated:h,disabled:b,className:e,classNames:n,children:x,onClick:_}),E=vk({animated:A.animated,disabled:A.disabled,variant:A.variant,groupSegment:A.groupSegment,pressed:A.pressed,onFillStart:A.onFillStart,forwardedRef:L,onPointerEnter:y,onPointerLeave:S,onPointerDown:v}),I={size:A.size,groupSegment:A.groupSegment,contentMotionRef:E.contentMotionRef,bindFillRef:E.bindFillRef,fillColor:A.fillColor,pressed:A.pressed,roundingClass:A.roundingClass},w=rp(x,"ToggleButtonFill"),N=rp(x,"ToggleButtonContent");return d.jsx(Ik,{value:I,children:d.jsx(Ek,{classNames:A.classNames,children:d.jsxs("button",{ref:E.setRefs,type:p,disabled:A.disabled,"data-toggle-button-value":A.itemValue,role:A.role,"aria-pressed":A.ariaPressed,"aria-checked":A.ariaChecked,tabIndex:A.tabIndex,className:A.buttonClass,onPointerEnter:E.handlePointerEnter,onPointerLeave:E.handlePointerLeave,onPointerDown:E.handlePointerDown,onClick:j=>A.handleClick(j,E.queueFillOnClick),...T,children:[w?null:d.jsx(Ad,{}),A.isCompound?N?x:d.jsx(ji,{children:x}):d.jsx(ji,{className:R((O=A.classNames)==null?void 0:O.content,A.contentLayoutClass),children:d.jsx(Kk,{leftIcon:C,rightIcon:g,children:A.children})})]})})})});cx.displayName="ToggleButtonRoot";const ux=Object.assign(cx,{Content:ji,Fill:Ad,Label:lx,Icon:Td,Trailing:Ld,Text:Ed});function Id(t){return t.type===ux}function e1(t){return t.reduce((e,n)=>e+(Id(n)?1:0),0)}function t1(t){return t.reduce((e,n)=>{if(!Id(n))return e;const r=n.props.value;return typeof r=="string"&&e.push(r),e},[])}function op(t){return t==null?[]:Array.isArray(t)?t:[t]}function sp(t){if(t!=null)return Array.isArray(t)?t[0]:t}function n1(t,e,n,r){return t==="single"?n===e:r.includes(e)}function r1(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 o1({value:t,children:e}){return d.jsx(sx.Provider,{value:t,children:e})}function s1({orientation:t,separated:e,variant:n,className:r}){return KC({orientation:t,segmented:e,variant:n,className:r})}function i1(t){return qC(t)}function a1({orientation:t}){return d.jsx("span",{"aria-hidden":!0,className:i1(t)})}function l1({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,C]=l.useState(()=>sp(i)),[g,h]=l.useState(()=>op(i)),b=f?m?sp(s):p:void 0,x=l.useMemo(()=>f?[]:m?op(s):g,[g,m,f,s]),_=l.useRef(x);_.current=x;const v=l.useCallback(w=>n1(e,w,b,x),[x,b,e]),y=l.useCallback(w=>{if(n)return;if(f){const O=r1(e,w,b,x);if(O==null||O.kind!=="single")return;m||C(O.value),a==null||a(O.value);return}const N=_u(_.current,w,!0);_.current=N,m||h(N),a==null||a(N)},[n,m,f,x,a,b,e]),S=l.useMemo(()=>Qu(t),[t]),T=l.useMemo(()=>e1(S),[S]),L=l.useMemo(()=>t1(S)[0],[S]),A=l.useCallback(w=>Ck(f,w,b,L),[L,f,b]),E=l.useMemo(()=>({type:e,disabled:n,size:r,variant:o,isSelected:v,select:y,tabIndexFor:A}),[n,v,y,r,A,e,o]),I=l.useMemo(()=>_k({disabled:n,isSingle:f,orientation:u,onKeyDown:c,select:y}),[n,f,c,u,y]);return{flat:S,segmentCount:T,contextValue:E,handleKeyDown:I,isSingle:f}}const dx=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:C,onKeyDown:g,...h}=e,{flat:b,segmentCount:x,contextValue:_,handleKeyDown:v,isSingle:y}=l1(e);let S=-1;return d.jsx(o1,{value:_,children:d.jsx("div",{ref:n,role:"toolbar",tabIndex:xk(a),"aria-orientation":s,"aria-disabled":a||void 0,className:s1({orientation:s,separated:i,variant:u,className:o}),...y?{onKeyDown:v}:{},...h,children:b.map((T,L)=>{if(!Id(T))return d.jsx(l.Fragment,{children:T},T.key??`tbg-wrap-${L}`);if(i)return d.jsx(l.Fragment,{children:T},T.key??`tbg-item-${L}`);S+=1;const A=WC(S,x),E=XC(s,A);return d.jsxs(l.Fragment,{children:[d.jsx(hg,{segment:E,buttonSize:c,children:T}),u!=="gloss"&&A!=="last"&&A!=="only"?d.jsx(a1,{orientation:s}):null]},T.key??`tbg-seg-${L}`)})})})});dx.displayName="ToggleButtonGroup";const c1=dx,fx=l.createContext(null);function u1({value:t,children:e}){return d.jsx(fx.Provider,{value:t,children:e})}function Mn(){const t=l.useContext(fx);if(!t)throw new Error("AlertDialog.* components must be used inside <AlertDialog>.");return t}const Hl=l.createContext({});function d1({classNames:t,children:e}){const n=l.useContext(Hl),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(Hl.Provider,{value:r,children:e})}function on(){return l.useContext(Hl)}const wd=l.createContext(null);function f1({value:t,children:e}){return d.jsx(wd.Provider,{value:t,children:e})}function m1(t){const e=l.useContext(wd);if(!e)throw new Error(`${t} must be used inside <AlertDialog.Header>.`);return e}function Rd(){return l.useContext(wd)}function st(...t){return R(...t)}function p1(t){return"primary"}function h1(t){switch(t){case"danger":case"success":case"info":case"warning":return t;default:return"default"}}function ga(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 g1(t){return ga(t,e=>e==="AlertDialogTitle")}function C1(t){return ga(t,e=>e==="AlertDialogDescription")}function mx(t){return ga(t,e=>e==="AlertDialogIndicator")}function px(t){return ga(t,e=>e==="AlertDialogClose")}function hx(t,e){return fd(t,e)}function gx(t,e){return md(t,e)}function b1(t,e,n,r){return r?!0:n===null?!1:n!==void 0?!0:hx(t,e)&&gx(t,e)!==null}function x1(t,e,n,r,o){const s=mx(o),i=px(o);return{hasIndicator:b1(t,e,n,s),hasTitle:g1(o),hasDescription:C1(o),hasAction:!1,hasClose:i||r}}function Cx(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},Cx(r.props.children,e))}return n})}function _1({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 C={...ve(),overwrite:"auto"},g=fC({overlay:u,panel:f,vars:C,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()){Au(f,m,{focusPanel:!0});return}dC({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 bx(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},bx(r.props.children,e))}return n})}const S1="flex min-h-0 flex-1 flex-col gap-mid text-left",v1={headerPadding:"px-plus pt-plus",bodyPadding:"px-plus",footerPadding:"px-plus pb-plus"},nl={headerPadding:"px-mid pt-mid",bodyPadding:"px-mid",footerPadding:"px-mid pb-mid"},y1={small:{panelMax:"max-w-component-small",maxHeight:"max-h-[min(85dvh,26rem)]",headerGap:"gap-base",...v1,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",...nl,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",...nl,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",...nl,headingBlockGap:"flex min-w-0 flex-1 flex-col gap-base text-left",titleVariant:"mid",descVariant:"base",descClassName:"text-muted",bodyVariant:"mid"}},A1={small:"small",base:"base",mid:"base",large:"base"},T1="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",L1="bg-[color-mix(in_oklab,var(--color-foreground)_14%,transparent)] backdrop-blur-[14px] backdrop-saturate-150 motion-reduce:backdrop-blur-none",E1="bg-[color-mix(in_oklab,black_58%,transparent)]",I1="relative z-10 w-full outline-none",w1="flex min-h-0 flex-col overflow-hidden rounded-mid border-token bg-surface text-left text-foreground shadow-token-large",R1="gloss-panel gloss-deep flex min-h-0 w-full flex-col rounded-mid text-foreground",N1="flex shrink-0 items-start",D1="min-w-0",O1="min-w-0",P1="min-h-0 flex-1 overflow-y-auto",k1="flex shrink-0 flex-wrap items-center justify-end gap-base",B1="shrink-0",xx="gloss-content";function _x(){return uC()}function Sx(t,e){return ht("absolute inset-0",t?L1:E1,e)}function j1({variant:t,sizePreset:e,className:n,slotClass:r}){const o=t==="gloss";return ht(I1,e.panelMax,!o&&w1,!o&&e.maxHeight,n,r)}function M1(t,e){return ht(R1,t,e)}function vx(t,e=!1){return ht(S1,e&&xx,t)}function F1(t,e){return ht(P1,t,e)}function G1(t){return A1[t]}const H1="flex min-h-0 flex-1 flex-col gap-mid text-left",z1={headerPadding:"px-plus pt-plus",bodyPadding:"px-plus",footerPadding:"px-plus pb-plus"},rl={headerPadding:"px-mid pt-mid",bodyPadding:"px-mid",footerPadding:"px-mid pb-mid"},V1={small:{panelMax:"max-w-component-small",maxHeight:"max-h-[min(85dvh,26rem)]",headerGap:"gap-x-base",...z1,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",...rl,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",...rl,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",...rl,headingBlockGap:"flex min-w-0 flex-col gap-base",iconClass:"icon-large",titleVariant:"mid",descVariant:"base",descClassName:"text-muted",bodyVariant:"mid"}},U1={small:"small",base:"base",mid:"base",large:"base"},$1="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",W1="relative z-10 w-full outline-none",X1="flex min-h-0 flex-col overflow-hidden rounded-mid text-left",Y1="gloss-panel gloss-deep flex min-h-0 w-full flex-col rounded-mid text-left text-foreground",K1="gloss-content",q1="shrink-0",Z1="shrink-0 [&_svg]:block",Q1="shrink-0",J1="contents",eB="font-w-mid",tB="min-h-0 flex-1 overflow-y-auto",nB="flex shrink-0 flex-wrap items-center justify-end gap-base";function rB(t){return R(fb(t,"default"),"shadow-token-large")}function oB(t,e){return Sx(t,e)}function sB(){return _x()}function iB(t,e){return st(tB,t,"text-left",e)}function yx(t){return st(H1,t)}function aB({variant:t,sizePreset:e,className:n,slotClass:r}){const o=t==="gloss";return st(W1,e.panelMax,!o&&X1,!o&&e.maxHeight,!o&&rB(t),n,r)}function lB(t,e){return st(Y1,t,e)}function cB(t){return mb(t)}function Ax(t){return U1[t]}function Nd({className:t,...e}){const n=on();return d.jsx("div",{className:yx(st(n.content,t)),...e})}Nd.displayName="AlertDialogContent";const Dd=l.forwardRef(function({className:e,onClick:n,...r},o){const{onOpenChange:s}=Mn(),i=Rd(),a=on();return d.jsx(Fo,{ref:o,variant:"secondary",className:st(q1,i&&nb(i.gridSlots),a.close,e),onClick:c=>{n==null||n(c),c.defaultPrevented||s(!1)},...r})});Dd.displayName="AlertDialogClose";function Od({className:t,children:e,...n}){const{variant:r,status:o,sizePreset:s,gridSlots:i,headerIcon:a}=m1("AlertDialog.Indicator"),c=on();if(e===null)return null;const u=gx(r,o),f=e!==void 0?e:a!==void 0?a:hx(r,o)&&u!==null?d.jsx(u,{"aria-hidden":!0,className:s.iconClass}):null;return f===null?null:d.jsx("span",{className:st(Z1,cB(o),Rr(i),c.indicator,t),...n,children:f})}Od.displayName="AlertDialogIndicator";function Tx({icon:t,showClose:e=!0,className:n,children:r,...o}){const{variant:s,status:i,sizePreset:a}=Mn(),c=on(),u=mx(r),f=px(r),m=l.useMemo(()=>x1(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]),C=m.hasIndicator&&!u,g=e&&!f;return d.jsx(f1,{value:p,children:d.jsxs("div",{className:st(Q1,a.headerPadding,Go(m,a.headerGap),c.header,n),...o,children:[C?d.jsx(Od,{}):null,r,g?d.jsx(Dd,{}):null]})})}Tx.displayName="AlertDialogHeader";const Lx=l.forwardRef(function({className:e,id:n,...r},o){const{titleId:s,sizePreset:i}=Mn(),a=Rd(),c=on();return d.jsx(ee,{ref:o,as:"h2",variant:i.titleVariant,id:n??s,className:st(eB,a&&Ho(a.gridSlots),c.title,e),...r})});Lx.displayName="AlertDialogTitle";function Ex({className:t,id:e,...n}){const{descriptionId:r,setHasDescription:o,sizePreset:s}=Mn(),i=Rd(),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&&Ds(i.gridSlots),a.description,t),...n})}Ex.displayName="AlertDialogDescription";function Ix({className:t,...e}){const n=on();return d.jsx("div",{className:st(J1,n.headingBlock,t),...e})}Ix.displayName="AlertDialogHeadingBlock";function wx({className:t,children:e,...n}){const{sizePreset:r}=Mn(),o=on();return d.jsx("div",{className:iB(r.bodyPadding,st(o.body,t)),...n,children:d.jsx(ee,{variant:r.bodyVariant,as:"div",children:e})})}wx.displayName="AlertDialogBody";function Rx({className:t,children:e,...n}){const{footerButtonSize:r,sizePreset:o}=Mn(),s=on(),i=l.useMemo(()=>Cx(e,r),[e,r]);return d.jsx("div",{className:st(nB,o.footerPadding,s.footer,t),...n,children:i})}Rx.displayName="AlertDialogFooter";const Nx=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(),C=l.useCallback(b=>{m.current=b,dt(a,b)},[a]),g=l.useCallback(b=>{c||p.current||b.button!==0||(b.preventDefault(),Es({triggerRef:m,openingRef:p,setOpen:()=>u(!0)}))},[c,p,u]),h=l.useCallback(b=>{o==null||o(b),!b.defaultPrevented&&!c&&!p.current&&u(!0)},[o,c,p,u]);if(n&&l.isValidElement(e)){const b=l.Children.count(e)===1?e:null;if(b){const x=b;return l.cloneElement(x,{ref:(_=>{m.current=_}),className:st(f.trigger,x.props.className,r),onPointerDown:_=>{var v,y;g(_),(y=(v=x.props).onPointerDown)==null||y.call(v,_),s==null||s(_)},onClick:_=>{var v,y;(y=(v=x.props).onClick)==null||y.call(v,_),h(_)},"aria-haspopup":"dialog","aria-expanded":c})}}return d.jsx("button",{type:"button",ref:C,"aria-haspopup":"dialog","aria-expanded":c,className:st(f.trigger,r),onPointerDown:b=>{s==null||s(b),g(b)},onClick:h,...i,children:e})});Nx.displayName="AlertDialog.Trigger";function Dx({className:t,themeAnchor:e,children:n}){const{open:r,titleId:o,descriptionId:s,hasDescription:i,variant:a,sizePreset:c}=Mn(),u=_1({open:r,variant:a}),f=yu(r,e??null),m=vu(f),p=jo(f);return typeof document>"u"||!u.mounted?null:Or.createPortal(d.jsx(uB,{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)}Dx.displayName="AlertDialog.Panel";function uB({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 C=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($1,g.dialog),children:[d.jsx("div",{ref:f,className:oB(s,g.overlay),style:sB(),"aria-hidden":!0}),d.jsx("div",{ref:m,tabIndex:-1,className:aB({variant:n,sizePreset:r,className:e,slotClass:g.panel}),children:C?d.jsx("div",{ref:p,className:lB(r.maxHeight,g.glossPanel),children:d.jsx("div",{className:yx(st(K1,g.glossContent)),children:t})}):d.jsx(Nd,{children:t})})]})}function dB({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=ud(r),m=dd(n),p=V1[o];return{contextValue:{open:t,titleId:s,descriptionId:i,hasDescription:a,setHasDescription:u,onOpenChange:e,variant:f,status:m,size:o,sizePreset:p,footerButtonSize:Ax(o)}}}function Ox({open:t,onOpenChange:e,children:n,status:r,variant:o="default",size:s="base",classNames:i}){const a=dB({open:t,onOpenChange:e,status:r,variant:o,size:s});return d.jsx(d1,{classNames:i,children:d.jsx(u1,{value:a.contextValue,children:n})})}Ox.displayName="AlertDialog";const fB=Object.assign(Ox,{Trigger:Nx,Panel:Dx,Content:Nd,Header:Tx,Indicator:Od,HeadingBlock:Ix,Title:Lx,Description:Ex,Body:wx,Footer:Rx,Close:Dd}),Px=l.createContext(null),zl=l.createContext({});function mB({value:t,children:e}){return d.jsx(Px.Provider,{value:t,children:e})}function pB({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 Fn(){const t=l.useContext(Px);if(!t)throw new Error("Dialog.* components must be used inside <Dialog>.");return t}function Gn(){return l.useContext(zl)}const hB="Close";function gB({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,C=c.current;let g=!1;const h=()=>{g||s(!1)};if(!p||!C||$t()){h();return}V(p,C);const b={...ve(),overwrite:"auto"},x=fC({overlay:p,panel:C,vars:b,onComplete:h});return()=>{g=!0,x.kill(),V(p,C)}},[t,o]),l.useLayoutEffect(()=>{if(!t||!o)return;const p=i.current;p&&!p.open&&p.showModal();const C=a.current,g=c.current;if(!(!C||!g)){if($t()){Au(C,g,{focusPanel:!0});return}dC({overlay:C,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 Pd({className:t,...e}){const n=Gn();return d.jsx("div",{className:vx(ht(n.content,t)),...e})}Pd.displayName="DialogContent";function kx({className:t,...e}){const{sizePreset:n}=Fn(),r=Gn();return d.jsx("div",{className:ht(N1,n.headerGap,n.headerPadding,r.header,t),...e})}kx.displayName="DialogHeader";const Bx=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(O1,a.title,e),...r})});Bx.displayName="DialogTitle";function jx({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})}jx.displayName="DialogDescription";function Mx({className:t,...e}){const{sizePreset:n}=Fn(),r=Gn();return d.jsx("div",{className:ht(D1,n.headingBlockGap,r.headingBlock,t),...e})}Mx.displayName="DialogHeadingBlock";const Fx=l.forwardRef(function({className:e,onClick:n,"aria-label":r=hB,...o},s){const{onOpenChange:i}=Fn(),a=Gn();return d.jsx(Fo,{ref:s,variant:"secondary","aria-label":r,className:ht(B1,a.close,e),onClick:c=>{n==null||n(c),c.defaultPrevented||i(!1)},...o})});Fx.displayName="DialogClose";function Gx({className:t,...e}){const{sizePreset:n}=Fn(),r=Gn();return d.jsx("div",{className:F1(n.bodyPadding,ht(r.body,t)),...e})}Gx.displayName="DialogBody";function Hx({className:t,children:e,...n}){const{footerButtonSize:r,sizePreset:o}=Fn(),s=Gn(),i=l.useMemo(()=>bx(e,r),[e,r]);return d.jsx("div",{className:ht(k1,o.footerPadding,s.footer,t),...n,children:i})}Hx.displayName="DialogFooter";const zx=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(),Es({triggerRef:u,openingRef:f,setOpen:()=>c(!0)}))},[a,f,u,c]),C=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:(b=>{u.current=b}),onPointerDown:b=>{var x,_;p(b),(_=(x=h.props).onPointerDown)==null||_.call(x,b),o==null||o(b)},onClick:b=>{var x,_;(_=(x=h.props).onClick)==null||_.call(x,b),C(b)},"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:C,...s,children:e})});zx.displayName="Dialog.Trigger";function Vx({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=gB({open:s,onOpenChange:i,variant:t,dismissOnBackdrop:e}),p=yu(s,r??null),C=vu(p),g=jo(p);return typeof document>"u"||!m.mounted?null:Or.createPortal(d.jsx(CB,{className:n,variant:t,sizePreset:f,portalTheme:g,lightUi:C,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)}Vx.displayName="Dialog.Panel";function CB({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:C,onDialogClose:g}){const h=n==="gloss",b=Gn();return d.jsxs("dialog",{...o,ref:u,onClose:g,"aria-labelledby":i,"aria-describedby":c?a:void 0,className:ht(T1,b.dialog),children:[d.jsx("div",{ref:f,className:Sx(s,b.overlay),style:_x(),"aria-hidden":!0,onMouseDown:C}),d.jsx("div",{ref:m,tabIndex:-1,className:j1({variant:n,sizePreset:r,className:e,slotClass:b.panel}),children:h?d.jsx("div",{ref:p,className:M1(r.maxHeight,b.glossPanel),children:d.jsx("div",{className:vx(ht(xx,b.glossContent),!0),children:t})}):d.jsx(Pd,{children:t})})]})}function bB({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=y1[n];return{contextValue:{open:t,titleId:r,descriptionId:o,hasDescription:s,setHasDescription:a,onOpenChange:e,size:n,sizePreset:c,footerButtonSize:G1(n)}}}function Ux({open:t,onOpenChange:e,size:n="base",children:r,classNames:o}){const s=bB({open:t,onOpenChange:e,size:n});return d.jsx(mB,{value:s.contextValue,children:d.jsx(pB,{classNames:o,children:r})})}Ux.displayName="Dialog";const xB=Object.assign(Ux,{Trigger:zx,Panel:Vx,Content:Pd,Header:kx,HeadingBlock:Mx,Title:Bx,Description:jx,Close:Fx,Body:Gx,Footer:Hx}),kd=l.createContext(null),$x=l.createContext(null),Vl=l.createContext({});function Wx({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 _B({value:t,children:e}){return d.jsx($x.Provider,{value:t,children:e})}function Xx(){const t=l.useContext(kd);if(!t)throw new Error("Components Toast must be used inside <Toast.Provider>.");return t}function js(){const t=l.useContext($x);if(!t)throw new Error("Toast.* must be inside <Toast>.");return t}function dr(){return l.useContext(Vl)}const SB={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}},vB={primary:"text-primary",foreground:"text-foreground",muted:"text-muted",secondary:"text-primary",danger:"text-danger",success:"text-success",info:"text-info",warning:"text-warning"},yB="inline-flex shrink-0 items-center justify-center",AB="box-border inline-block rounded-full border-current border-t-transparent animate-spin motion-reduce:animate-none",TB="flex items-end",LB="block shrink-0 rounded-full origin-bottom",Ca={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}},EB={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 IB(t,e,n){const r=SB[t];return R(AB,r.icon,r.border,vB[e],n)}function wB(t,e){const n=Ca[t];return R(TB,n.gapClass,e)}function RB(t,e,n){return R(LB,Ca[t].dotClass,EB[e],n)}function NB(t){const{jumpPx:e,dotSizeVar:n}=Ca[t];return{height:`calc(${n} + ${e}px)`}}const DB=3;function OB(t,e){const{jumpPx:n,scalePeak:r}=Ca[e],{staggerSec:o,halfCycleSec:s,easeUp:i,easeDown:a,enabled:c}=OL();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 PB(t,e){const n=l.useSyncExternalStore(EL,Om,Om);l.useLayoutEffect(()=>{const r=t.current;if(!r)return;const o=Array.from(r.querySelectorAll("[data-loading-dot]")).slice(0,DB);if(o.length===0)return;const s=de();let i=[];return s||(i=OB(o,e)),()=>{for(const a of i)a.kill();for(const a of o)V(a)}},[e,t,n])}const kB=[0,1,2];function Yx({size:t,color:e,className:n}){return d.jsx("span",{"aria-hidden":!0,className:IB(t,e,n)})}function Kx({size:t,color:e,className:n}){const r=l.useRef(null);return PB(r,t),d.jsx("span",{ref:r,className:R(wB(t),n),style:NB(t),"aria-hidden":!0,children:kB.map(o=>d.jsx("span",{"data-loading-dot":!0,className:RB(t,e)},o))})}Kx.displayName="LoadingDots";Yx.displayName="LoadingSpinner";const Bd=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(yB,s),...i,children:e==="dots"?d.jsx(Kx,{size:n,color:r}):d.jsx(Yx,{size:n,color:r})})});Bd.displayName="Loading";const BB="Close";function jB(t){return t==="danger"||t==="warning"?"alert":"status"}function MB(t){return`Notifications (${t})`}function At(...t){return R(...t)}const Ul=8,FB=.04,gi=3,$l=4e3,ii=24;function GB(){return`toast-${Math.random().toString(36).slice(2)}`}function Ms(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 HB(t){return Ms(t,e=>e==="ToastTitle")}function zB(t){return Ms(t,e=>e==="ToastDescription")}function VB(t){return Ms(t,e=>e==="ToastIndicator")}function UB(t){return Ms(t,e=>e==="ToastActionButton")}function $B(t){return Ms(t,e=>e==="ToastCloseButton")}function WB(t,e,n,r){return n?r:e?!0:t!=="default"}function XB(t,e,n,r,o,s,i,a){const c=e!=null||HB(a),u=n!=null||zB(a);return{hasIndicator:WB(t,s,i,VB(a)),hasTitle:c,hasDescription:u,hasAction:i?UB(a):r!=null,hasClose:i?$B(a):o!=null}}const YB={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"},KB={default:"text-primary",success:"text-success",danger:"text-danger",info:"text-info",warning:"text-warning"},qx="contents",qB="font-w-mid",ZB="text-muted",QB="-mx-xsmall",JB="inline-flex shrink-0 items-center justify-center";function ej(t,e,n){return At(JB,e,KB[t],n)}const tj={default:"primary",success:"success",danger:"danger",info:"info",warning:"warning"},nj="fixed z-[300] pointer-events-none",rj="relative grid",oj="pointer-events-none absolute",sj={"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 ij(t){return sj[t]}function aj(t){return tj[t]}function lj({variant:t,status:e,size:n,gridSlots:r,slotClass:o,className:s}){const i=t==="gloss",a=Dn(n);return At(Go(r,a.gridGap),`w-full ${a.shellPadding}`,i?R("gloss-panel gloss-deep border-0 text-foreground",nn):R("shadow-token-mid",YB[e]),o,s)}function cj({placement:t,slotClass:e}){return At(nj,ij(t),e)}function uj(t){return At(rj,t)}function dj(t){return At(oj,t)}function jd({className:t,children:e,...n}){const{status:r,isLoading:o,gridSlots:s,sizePreset:i}=js(),a=dr(),c=ej(r,i.iconSvgClass);if(e!==void 0)return d.jsx("span",{className:At(c,Rr(s),a.indicator,t),...n,children:e});if(o)return d.jsx("span",{className:At(c,Rr(s),a.indicator,t),...n,children:d.jsx(Bd,{size:i.loadingSize,color:aj(r)})});if(r==="default")return null;const u=cd[r];return u?d.jsx("span",{className:At(c,Rr(s),a.indicator,t),...n,children:d.jsx(u,{"aria-hidden":!0})}):null}jd.displayName="ToastIndicator";function Zx({className:t,...e}){const n=dr();return d.jsx("div",{className:At(qx,n.message,t),...e})}Zx.displayName="ToastMessage";function Qx({className:t,...e}){const n=dr();return d.jsx("div",{className:At(qx,n.content,t),...e})}Qx.displayName="ToastContent";function Md({className:t,id:e,...n}){const{titleId:r,gridSlots:o,sizePreset:s}=js(),i=dr();return d.jsx(ee,{as:"div",variant:s.titleVariant,id:e??r,className:At(qB,Ho(o),i.title,t),...n})}Md.displayName="ToastTitle";function Fd({className:t,id:e,...n}){const{descriptionId:r,gridSlots:o,sizePreset:s}=js(),i=dr();return d.jsx(ee,{as:"div",variant:s.descVariant,id:e??r,className:At(ZB,Ds(o),i.description,t),...n})}Fd.displayName="ToastDescription";function Gd({className:t,...e}){const{gridSlots:n}=js(),r=dr();return d.jsx("div",{className:At(Os(n),r.action,t),...e})}Gd.displayName="ToastActionButton";const Hd=l.forwardRef(function({className:e,onClick:n,"aria-label":r=BB,...o},s){const{dismiss:i,gridSlots:a}=js(),c=dr();return d.jsx(Fo,{ref:s,size:"small",variant:"ghost","aria-label":r,className:At(QB,nb(a),c.close,e),onClick:u=>{n==null||n(u),u.defaultPrevented||i()},...o})});Hd.displayName="ToastCloseButton";function fj({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(Md,{children:e}):null,n!=null?d.jsx(Fd,{children:n}):null,r!=null?d.jsx(Gd,{children:r}):null,o!=null?d.jsx(Hd,{}):null]})}function mj({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=ld(e),C=Dn(p),g=l.useMemo(()=>XB(t,n,r,o,i,s,m,a),[o,a,r,m,s,i,t,n]),h=jB(t),b=l.useMemo(()=>({status:t,size:p,sizePreset:C,titleId:u,descriptionId:f,isLoading:s,dismiss:i??(()=>{}),gridSlots:g}),[f,g,s,i,p,C,t,u]);return{isCompound:m,liveRole:h,titleId:u,size:p,itemCtx:b,gridSlots:g}}function pj({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),C=Math.min(e,gi-1),g=1-C*FB,h=r?C*Ul:-C*Ul,b=e>=gi?0:1;l.useLayoutEffect(()=>{const y=m.current;if(!y)return;const S=de()||!Se().enableToastStack,T=!p.current;if(p.current=!0,V(y),S){X.set(y,{y:h,scale:g,autoAlpha:b});return}T&&t.variant!=="gloss"?X.fromTo(y,{opacity:0},{opacity:b,...ve(),overwrite:"auto"}):X.to(y,{y:h,scale:g,autoAlpha:b,...ve(),overwrite:"auto"})},[t.variant,h,b,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()){aa(y);return}const S=r?-ii:ii;la({surface:y,vars:{...ve(),overwrite:"auto"},from:{y:S,scale:ia},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?-ii:ii;V(y),ca({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 x=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:gi+1-e,pointerEvents:e===0?"auto":"none"},children:d.jsx("div",{ref:u,children:d.jsx(Wx,{classNames:v,children:d.jsx(zd,{ref:f,status:t.status,variant:t.variant,size:t.size,title:t.title,description:t.description,action:t.action,isLoading:t.isLoading,onClose:x})})})})}function hj({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),C=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,gi-1)*Ul,b=g+h,x=b>0?b:p.current;return b>0&&(p.current=b),l.useLayoutEffect(()=>{const _=f.current;if(!_||x<=0)return;const v=de()||!Se().enableToastStack;if(V(_),v){_.style.height=`${x}px`;return}X.to(_,{height:x,...ve(),overwrite:"auto"})},[x]),l.useLayoutEffect(()=>{const _=m.current;_&&X.set(_,{opacity:0})},[]),l.useLayoutEffect(()=>{var S;const _=m.current;if(!_)return;const v=de(),y=e.length===1&&n.has(((S=e[0])==null?void 0:S.id)??"");if(V(_),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":MB(t),className:cj({placement:t,slotClass:s==null?void 0:s.viewport}),style:{width:pP(e,i)},children:[d.jsx("div",{ref:m,"aria-hidden":!0,className:dj(s==null?void 0:s.scrim),style:{[a?"top":"bottom"]:`calc(-1 * ${Ln(Tn.offsetY)})`,left:`calc(-1 * ${Ln(Tn.insetX)})`,right:`calc(-1 * ${Ln(Tn.insetX)})`,height:Ln(Tn.height),background:Ln(a?Tn.gradientTop:Tn.gradientBottom),maskImage:Ln(Tn.mask),WebkitMaskImage:Ln(Tn.mask)}}),d.jsx("div",{ref:f,className:uj(s==null?void 0:s.stack),style:{height:x||void 0,alignItems:a?"start":"end"},children:e.map((_,v)=>d.jsx(pj,{entry:_,reverseIdx:v,total:e.length,isTop:a,isDismissing:n.has(_.id),onDismiss:r,onRemoveFinal:o,onHeightChange:C,providerClassNames:s},_.id))})]})}function gj({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(b=>{const x=b.id??GB(),_={id:x,status:b.status??"default",variant:b.variant??e,size:b.size??n,title:b.title,description:b.description,action:b.action,timeout:b.timeout??$l,placement:b.placement??t,createdAt:++c.current,isLoading:b.isLoading??!1,classNames:{...r,...b.classNames}};return s(v=>[...v,_]),x},[t,n,e,r]),f=l.useCallback((b,x)=>{s(_=>_.map(v=>v.id===b?{...v,...x}:v))},[]),m=l.useCallback(b=>{a(x=>new Set([...x,b]))},[]),p=l.useCallback(b=>{s(x=>x.filter(_=>_.id!==b)),a(x=>{const _=new Set(x);return _.delete(b),_})},[]),C=l.useMemo(()=>[...new Set(o.map(b=>b.placement))],[o]),g=l.useMemo(()=>({add:u,update:f,dismiss:m}),[u,m,f]),h=l.useCallback(b=>o.filter(x=>x.placement===b).toSorted((x,_)=>_.createdAt-x.createdAt),[o]);return{toasts:o,dismissingIds:i,placements:C,ctx:g,sortedByPlacement:h,dismiss:m,removeFinal:p,providerClassNames:r,defaultSize:n}}function Cj({children:t,defaultPlacement:e="bottom-center",defaultVariant:n="default",defaultSize:r="base",classNames:o}){const s=gj({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=>Or.createPortal(d.jsx(hj,{placement:i,sorted:s.sortedByPlacement(i),dismissingIds:s.dismissingIds,onDismiss:s.dismiss,onRemoveFinal:s.removeFinal,classNames:o,defaultSize:s.defaultSize}),document.body,i))]})}const zd=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:C,...g},h){const b=mj({status:e,size:r,title:o,description:s,action:i,isLoading:a,onClose:c,children:m}),x=n==="gloss",_=l.useRef(null),v=l.useMemo(()=>Mt(_,x),[x]),y=l.useCallback(L=>{v(L),_.current=L,typeof h=="function"?h(L):h&&(h.current=L)},[v,h]),S=No(_,x),T=dr();return d.jsx(_B,{value:b.itemCtx,children:d.jsx(Wx,{classNames:f,children:d.jsx("div",{ref:y,role:b.liveRole,"aria-labelledby":b.titleId,"aria-live":b.liveRole==="alert"?"assertive":"polite",className:lj({variant:n,status:e,size:b.size,gridSlots:b.gridSlots,slotClass:T.root,className:u}),onPointerOver:L=>{p==null||p(L),!L.defaultPrevented&&x&&S.onPointerOver(L)},onPointerOut:L=>{C==null||C(L),x&&S.onPointerOut(L)},...g,children:b.isCompound?m:d.jsx(fj,{gridSlots:b.gridSlots,title:o,description:s,action:i,onClose:c})})})})});zd.displayName="ToastRoot";function bj(){const t=Xx(),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??$l})},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??$l})}),a},[t]);return{toast:{show:e,success:n("success"),danger:n("danger"),info:n("info"),warning:n("warning"),promise:r,dismiss:t.dismiss}}}const xj=Object.assign(zd,{Provider:Cj,Message:Zx,Indicator:jd,Content:Qx,Title:Md,Description:Fd,ActionButton:Gd,CloseButton:Hd}),Jx=l.createContext(null),Wl=l.createContext({});function e_({value:t,children:e}){return d.jsx(Jx.Provider,{value:t,children:e})}function _j({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 Uo(){const t=l.useContext(Jx);if(!t)throw new Error("Drawer.* components must be used inside <Drawer>.");return t}function sn(){return l.useContext(Wl)}const Sj="Close";function vj(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 yj(t){return t.displayName}function Aj(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=yj(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 Tj(t,e){return e==="left"||e==="right"?t.offsetWidth:t.offsetHeight}function t_(t,e){const n=Tj(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 Lj(){return{x:0,y:0}}function Ej(t,e){return t_(t,e)}function Ij(t){X.set(t,{xPercent:0,yPercent:0,x:0,y:0})}function wj({overlay:t,panel:e,placement:n,vars:r}){V(t,e),Ij(e),X.fromTo(t,{opacity:0},{opacity:1,...r}),X.fromTo(e,t_(e,n),{...Lj(),...r})}function Rj({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,{...Ej(e,n),...r},0),s}function Nj({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,C=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,b=u.current;let x=!1;const _=()=>{x||i(!1)};if(m.current){m.current=!1,_();return}if(!h||!b||$t()){_();return}V(h,b);const v={...ve(),overwrite:"auto"},y=Rj({overlay:h,panel:b,placement:r,vars:v,onComplete:_});return()=>{x=!0,y.kill(),V(h,b)}},[t,s,r]),l.useLayoutEffect(()=>{if(!t)return;const h=a.current;h&&!h.open&&h.showModal();const b=c.current,x=u.current;if(!(!b||!x)){if($t()){Au(b,x);return}wj({overlay:b,panel:x,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:C,handleBackdropMouseDown:g}}const Dj={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"},Oj={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"}},n_={left:"rounded-r-mid",right:"rounded-l-mid",bottom:"rounded-t-mid",top:"rounded-b-mid"},Pj={bottom:"pt-plus",top:"pb-plus",left:"pr-plus",right:"pl-plus"},kj="flex min-h-0 flex-1 flex-col gap-mid text-left",Bj="px-mid pt-mid",jj="px-mid",Mj="px-mid pb-mid",Fj="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",Gj="bg-[color-mix(in_oklab,var(--color-foreground)_14%,transparent)] backdrop-blur-[14px] backdrop-saturate-150 motion-reduce:backdrop-blur-none",Hj="bg-[color-mix(in_oklab,black_55%,transparent)]",zj="absolute z-10 flex flex-col outline-none overflow-hidden",Vj="border-token bg-surface text-foreground shadow-token-large",Uj="gloss-panel gloss-deep flex min-h-0 flex-1 flex-col text-foreground",$j="gloss-content flex min-h-0 min-w-0 flex-1 flex-col",Wj="flex shrink-0 items-start gap-plus text-left",Xj="flex min-w-0 flex-1 flex-col gap-xsmall text-left",Yj="min-w-0",Kj="text-muted",qj="min-h-0 flex-1 overflow-y-auto",Zj="flex shrink-0 flex-wrap items-center justify-end gap-base",Qj="shrink-0",Jj="flex touch-none select-none shrink-0 items-center justify-center cursor-grab active:cursor-grabbing box-content",eM="h-1 w-10",tM="h-10 w-1",nM="rounded-full bg-tertiary";function rM(t,e){const n=Oj[e];return t==="left"||t==="right"?n.horizontal:n.vertical}function oM(){return uC()}function sM({lightUi:t,dismissable:e,slotClass:n}){return at("absolute inset-0",t?Gj:Hj,e?"cursor-pointer":"cursor-default",n)}function iM({variant:t,placement:e,size:n,className:r,slotClass:o}){const s=n!=="full"?n_[e]:void 0;return at(zj,t!=="gloss"&&Vj,Dj[e],rM(e,n),s,r,o)}function aM({placement:t,size:e,slotClass:n}){const r=e!=="full"?n_[t]:void 0;return at(Uj,r,n)}function lM(t){return at(kj,t)}function cM(t){return at($j,t)}function uM(t){return at(qj,jj,t)}function dM({placement:t,slotClass:e,className:n}){return at(Jj,t==="left"||t==="right"?"self-stretch w-xsmall":"h-xsmall w-full",Pj[t],e,n)}function fM({placement:t,slotClass:e}){return at(nM,t==="left"||t==="right"?tM:eM,e)}const mM=.38,ip=.45;function pM(t,e){return t==="left"?-e.offsetWidth:t==="right"?e.offsetWidth:t==="top"?-e.offsetHeight:e.offsetHeight}function hM(t){return t==="left"||t==="right"?"x":"y"}function gM(t,e,n){X.set(t,{[e]:n})}function CM(t,e){return 1-Math.min(Math.abs(t)/Math.abs(e),1)}function bM(t,e,n,r,o,s){return{onPointerDown:l.useCallback(a=>{const c=t.current,u=e.current;if(!c||de())return;const f=hM(n),m=f==="x",p=m?a.clientX:a.clientY;let C=p,g=performance.now(),h=0;const b=pM(n,c),x=a.currentTarget;x.setPointerCapture(a.pointerId),V(c,u),c.style.willChange="transform";const _=y=>{if(y.pointerId!==a.pointerId)return;const S=m?y.clientX:y.clientY,T=S-p,L=performance.now(),A=L-g;A>0&&(h=(S-C)/A),C=S,g=L;const I=(n==="left"||n==="top"?-1:1)>0?Math.max(0,T):Math.min(0,T);gM(c,f,I),u&&X.set(u,{opacity:CM(I,b)})},v=y=>{if(y.pointerId!==a.pointerId)return;x.releasePointerCapture(a.pointerId),x.removeEventListener("pointermove",_),x.removeEventListener("pointerup",v),x.removeEventListener("pointercancel",v);const T=(m?y.clientX:y.clientY)-p,L=Math.abs(T)/Math.abs(b),A=n==="right"||n==="bottom"?h>ip:h<-ip,E={...ve(),overwrite:"auto"};if(L>=mM||A){V(c,u);const I=X.timeline({onComplete:()=>{c.style.willChange="",s&&(s.current=!0),r()}});I.fromTo(c,{[f]:T},{[f]:b,...E},0),u&&I.to(u,{opacity:0,...E},0)}else{V(c,u);const I=X.timeline({onComplete:()=>{c.style.willChange="",X.set(c,{clearProps:f}),u&&X.set(u,{opacity:1})}});I.fromTo(c,{[f]:T},{[f]:0,...E},0),u&&I.to(u,{opacity:1,...E},0)}};x.addEventListener("pointermove",_),x.addEventListener("pointerup",v),x.addEventListener("pointercancel",v)},[o,r,e,t,n,s])}}function r_(t){return null}r_.displayName="DrawerBackdrop";function Mi({className:t,...e}){const n=sn();return d.jsx("div",{className:lM(at(n.content,t)),...e})}Mi.displayName="DrawerContent";function xM({segment:t,variant:e}){const n=sn();return t.kind==="handle"?t.node:e==="gloss"?d.jsx("div",{className:cM(n.glossContent),children:d.jsx(Mi,{children:t.children})}):d.jsx(Mi,{children:t.children})}function o_({className:t,onPointerDown:e,...n}){const{onOpenChange:r,placement:o,overlayRef:s,panelRef:i,skipCloseAnimRef:a}=Uo(),c=sn(),{onPointerDown:u}=bM(i,s,o,()=>r(!1),!1,a);return d.jsx("div",{"aria-label":vj(o),className:dM({placement:o,slotClass:c.handle,className:t}),onPointerDown:f=>{e==null||e(f),u(f)},...n,children:d.jsx("span",{"aria-hidden":!0,className:fM({placement:o,slotClass:c.handleGrip})})})}o_.displayName="DrawerHandle";function s_({className:t,...e}){const n=sn();return d.jsx("div",{className:at(Wj,Bj,n.header,t),...e})}s_.displayName="DrawerHeader";function i_({className:t,...e}){const n=sn();return d.jsx("div",{className:at(Xj,n.headingBlock,t),...e})}i_.displayName="DrawerHeadingBlock";const a_=l.forwardRef(function({className:e,id:n,...r},o){const{titleId:s}=Uo(),i=sn();return d.jsx(ee,{ref:o,as:"h2",variant:"mid",id:n??s,className:at(Yj,i.title,e),...r})});a_.displayName="DrawerTitle";function l_({className:t,id:e,...n}){const{descriptionId:r,setHasDescription:o}=Uo(),s=sn();return l.useLayoutEffect(()=>(o(!0),()=>o(!1)),[o]),d.jsx(ee,{as:"p",variant:"base",id:e??r,className:at(Kj,s.description,t),...n})}l_.displayName="DrawerDescription";const c_=l.forwardRef(function({className:e,onClick:n,"aria-label":r=Sj,...o},s){const{onOpenChange:i}=Uo(),a=sn();return d.jsx(Fo,{ref:s,variant:"secondary","aria-label":r,className:at(Qj,a.close,e),onClick:c=>{n==null||n(c),c.defaultPrevented||i(!1)},...o})});c_.displayName="DrawerClose";function u_({className:t,...e}){const n=sn();return d.jsx("div",{className:uM(at(n.body,t)),...e})}u_.displayName="DrawerBody";function d_({className:t,...e}){const n=sn();return d.jsx("div",{className:at(Zj,Mj,n.footer,t),...e})}d_.displayName="DrawerFooter";const f_=l.forwardRef(function({children:e,asChild:n,onClick:r,onPointerDown:o,...s},i){const{open:a,onOpenChange:c}=Uo(),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(),Es({triggerRef:u,openingRef:f,setOpen:()=>c(!0)}))},[a,f,u,c]),C=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:(b=>{u.current=b}),onPointerDown:b=>{var x,_;p(b),(_=(x=h.props).onPointerDown)==null||_.call(x,b),o==null||o(b)},onClick:b=>{var x,_;(_=(x=h.props).onClick)==null||_.call(x,b),C(b)},"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:C,...s,children:e})});f_.displayName="Drawer.Trigger";function m_({size:t="default",variant:e="default",className:n,themeAnchor:r,children:o}){const s=Uo(),{open:i,onOpenChange:a,placement:c}=s,{backdropIsDismissable:u,panelSegments:f}=l.useMemo(()=>Aj(o),[o]),m=Nj({open:i,onOpenChange:a,variant:e,placement:c,backdropIsDismissable:u}),p=yu(i,r??null),C=vu(p),g=jo(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:Or.createPortal(d.jsx(e_,{value:h,children:d.jsx(_M,{className:n,variant:e,placement:c,size:t,portalTheme:g,lightUi:C,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)}m_.displayName="Drawer.Panel";function _M({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:C,bindGlossPanelRef:g,onBackdropMouseDown:h,onDialogClose:b}){const x=sn(),_=f.map((v,y)=>d.jsx(xM,{segment:v,variant:e},v.kind==="handle"?`handle-${y}`:`content-${y}`));return d.jsxs("dialog",{...o,ref:m,onClose:b,"aria-labelledby":i,"aria-describedby":c?a:void 0,className:at(Fj,x.dialog),children:[d.jsx("div",{ref:p,className:sM({lightUi:s,dismissable:u,slotClass:x.overlay}),style:oM(),"aria-hidden":!0,onMouseDown:h}),d.jsx("div",{ref:C,tabIndex:-1,className:iM({variant:e,placement:n,size:r,className:t,slotClass:x.panel}),children:e==="gloss"?d.jsx("div",{ref:g,className:aM({placement:n,size:r,slotClass:x.glossPanel}),children:_}):_})]})}const SM="right";function vM({open:t,onOpenChange:e,placement:n=SM}){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 p_({open:t,onOpenChange:e,placement:n="right",children:r,classNames:o}){const s=vM({open:t,onOpenChange:e,placement:n});return d.jsx(e_,{value:s.contextValue,children:d.jsx(_j,{classNames:o,children:r})})}p_.displayName="Drawer";const yM=Object.assign(p_,{Trigger:f_,Panel:m_,Backdrop:r_,Handle:o_,Content:Mi,Header:s_,HeadingBlock:i_,Title:a_,Description:l_,Close:c_,Body:u_,Footer:d_});function AM({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 Xl=l.createContext({});function TM({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 LM(){return l.useContext(Xl)}const EM=!0,IM=!0,h_="Link.Icon";function ba(...t){return R(...t)}function g_(t){if(l.isValidElement(t))return t.type.displayName}function C_(t){return l.Children.toArray(t).some(e=>{if(!l.isValidElement(e))return!1;if(g_(e)===h_)return!0;const n=e.props.children;return n!=null&&C_(n)})}function wM(t){const e=t.children!==void 0&&t.children!==null;return{node:e?t.children:"default",muted:!e}}function RM(t){const e=[];let n,r;return l.Children.forEach(t,o=>{if(l.isValidElement(o)&&g_(o)===h_){const s=o.props,i=wM(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 NM({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 DM({leftIcon:t,rightIcon:e,showDefaultIcon:n,defaultIconPosition:r,children:o}){var a,c;if(o!=null&&C_(o)){const u=RM(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=NM({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 OM="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",PM="min-w-0 truncate font-w-mid",kM="underline decoration-current/70 underline-offset-[0.2em]",BM="text-muted group-hover/link:text-primary group-focus-visible/link:text-primary",jM="text-primary",MM="rotate-[-45deg]",FM={small:"small",base:"base",mid:"mid",large:"large"},b_={small:"icon-small",base:"icon-base",mid:"icon-mid",large:"icon-large"};function GM({slotClass:t,className:e}){return ba(OM,t,e)}function HM({underline:t,slotClass:e}){return ba(PM,t&&kM,e)}function zM({size:t,muted:e,slotClass:n}){return ba(gn,b_[t],"[&_svg]:size-full",e?BM:jM,n)}function VM(t){return ba(b_[t],MM)}function lp({size:t}){return d.jsx(Ie.IoArrowForward,{"aria-hidden":EM,className:VM(t)})}function cp({children:t,size:e,muted:n=!1,slotClass:r}){return d.jsx("span",{className:zM({size:e,muted:n,slotClass:r}),"aria-hidden":IM,children:t})}function UM({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:C,handlePointerLeave:g,handlePointerDown:h,...b}){const x=LM(),_=s??(u?d.jsx(lp,{size:e}):null),v=i??(f?d.jsx(lp,{size:e}):null);return d.jsxs("a",{ref:p,href:t,className:GM({slotClass:x.anchor,className:m}),onPointerEnter:C,onPointerLeave:g,onPointerDown:h,...b,children:[_?d.jsx(cp,{size:e,muted:a,slotClass:x.iconStart,children:_}):null,d.jsx(ee,{as:"span",variant:r,inheritColor:!0,className:HM({underline:n,slotClass:x.text}),children:o}),v?d.jsx(cp,{size:e,muted:c,slotClass:x.iconEnd,children:v}):null]})}function Vd(t){return null}Vd.displayName="Link.Icon";function $M({size:t="base",underline:e=!1,leftIcon:n,rightIcon:r,showDefaultIcon:o=!1,defaultIconPosition:s="end",children:i}){const a=DM({leftIcon:n,rightIcon:r,showDefaultIcon:o,defaultIconPosition:s,children:i});return{size:t,underline:e,textVariant:FM[t],...a}}const Ud=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,...C},g){const h=$M({size:o,underline:s,leftIcon:i,rightIcon:a,showDefaultIcon:c,defaultIconPosition:u,children:n}),b=AM({forwardedRef:g,onPointerEnter:f,onPointerLeave:m,onPointerDown:p});return d.jsx(UM,{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:b.setAnchorRef,handlePointerEnter:b.handlePointerEnter,handlePointerLeave:b.handlePointerLeave,handlePointerDown:b.handlePointerDown,...C})});Ud.displayName="Link";const x_=l.forwardRef(function({classNames:e,...n},r){return d.jsx(TM,{classNames:e,children:d.jsx(Ud,{ref:r,...n})})});x_.displayName="Link";const WM=Object.assign(x_,{Icon:Vd,Root:Ud});function Yr(...t){return R(...t)}const $d=l.createContext(null),Yl=l.createContext({});function XM({value:t,children:e}){return d.jsx($d.Provider,{value:t,children:e})}function YM({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 __(){const t=l.useContext($d);if(!t)throw new Error("TextArea compound parts must be inside <TextArea>.");return t}function KM(){return l.useContext($d)}function Fs(){return l.useContext(Yl)}const qM="Resize height";function ZM({shellRef:t,blocked:e,variant:n,resizable:r,onPointerDown:o}){const s=n==="gloss",i=Mo(t,!e&&!s),a=Do(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 QM={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},JM={small:"min-h-control-small",base:"min-h-control-base",mid:"min-h-control-mid",large:"min-h-control-large"},eF="flex flex-col items-stretch",tF=`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] ${Lt}`,nF="absolute bottom-[2px] right-0 block h-px w-[9px] origin-bottom-right rotate-[135deg] bg-muted",rF="absolute bottom-[6px] right-0 block h-px w-[6px] origin-bottom-right rotate-[135deg] bg-muted",oF="relative block size-3 shrink-0",sF="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",iF="cursor-not-allowed opacity-45",aF="cursor-ns-resize";function lF(t){return le[t].controlPad}function cF({variant:t,status:e,statusTinted:n}){return Rs({variant:t,statusTinted:n&&e!=="default",statusTintClass:e!=="default"?QM[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",eF,u&&"relative",JM[r],o,Vr,Ur,u?s:zr(!n,e,t),!u&&i,n?"cursor-not-allowed opacity-55 shadow-token-base":"",a,c)}function dF({size:t,resizable:e,slotClass:n}){return Yr(tF,e&&"pr-mid",lF(t),n,Lt)}function fF({disabled:t,slotClass:e}){return Yr(sF,t?iF:aF,e)}const mF=640;function pF(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=Lc(r);c.setPointerCapture(i.pointerId);const p=g=>{if(g.pointerId!==i.pointerId)return;const h=Math.min(mF,Math.max(m,f+(g.clientY-u)));o(h)},C=g=>{g.pointerId===i.pointerId&&(c.releasePointerCapture(i.pointerId),c.removeEventListener("pointermove",p),c.removeEventListener("pointerup",C),c.removeEventListener("pointercancel",C))};c.addEventListener("pointermove",p),c.addEventListener("pointerup",C),c.addEventListener("pointercancel",C)},[n,e,o,t,r])}}function hF(){return d.jsxs("span",{"aria-hidden":!0,className:oF,children:[d.jsx("span",{className:nF}),d.jsx("span",{className:rF})]})}function gF({disabled:t,className:e,onPointerDown:n}){return d.jsx("button",{type:"button","data-textarea-resize-handle":!0,"aria-label":qM,disabled:t,onPointerDown:n,className:fF({disabled:t,slotClass:e}),children:d.jsx(hF,{})})}const Wd=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,...C},g){const h=KM(),b=Fs(),x=l.useId(),_=a??(h==null?void 0:h.textareaId)??x,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,T=(h==null?void 0:h.hintConnected)??!1,L=(h==null?void 0:h.errorConnected)??!1,A=h==null?void 0:h.hintId,E=h==null?void 0:h.errorId,I=p??Ft(T?A:void 0,L?E:void 0),w=l.useRef(null),N=l.useRef(null),O=l.useCallback(F=>{N.current=F,typeof g=="function"?g(F):g&&(g.current=F)},[g]),j=!!(c||u),G=cF({variant:e,status:v,statusTinted:v==="danger"||v==="success"||v==="warning"}),D=ZM({shellRef:w,blocked:j,variant:e,resizable:s,onPointerDown:m}),{onResizePointerDown:P}=pF(w,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:v,blocked:j,size:y,shellSurface:G,glossShellHoverMotionClass:D.glossShellHoverMotionClass,standardShellHoverMotionClass:D.standardShellHoverMotionClass,slotClass:b.shell,className:f}),children:[d.jsx("textarea",{ref:O,id:_,rows:o,disabled:c,readOnly:u,placeholder:i,"aria-required":S||void 0,"aria-invalid":v==="danger"?!0:void 0,"aria-describedby":I,className:dF({size:y,resizable:s,slotClass:b.control}),...C}),s?d.jsx(gF,{disabled:j,className:b.resizeHandle,onPointerDown:P}):null]})});Wd.displayName="TextAreaControl";function S_({className:t,classNames:e,...n}){const r=Fs();return d.jsx(Ue,{className:t,classNames:{...e,root:Yr(r.label,e==null?void 0:e.root)},...n})}S_.displayName="TextAreaLabel";function Xd({children:t,status:e,className:n,id:r,...o}){const s=__(),i=Fs(),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})}Xd.displayName="TextAreaHint";function Yd({children:t,className:e,id:n,...r}){const o=__(),s=Fs();return d.jsx(Ze,{id:n??o.errorId,className:Yr(s.error,e),...r,children:t})}Yd.displayName="TextAreaError";function CF({label:t,hint:e,error:n,textareaId:r,labelId:o,size:s,status:i,controlProps:a}){const c=Fs();return d.jsxs(d.Fragment,{children:[t!=null?d.jsx(Ue,{id:o,classNames:{root:c.label},children:t}):null,d.jsx(Wd,{id:r,size:s,status:i,...a}),e!=null?d.jsx(Xd,{children:e}):null,n!=null?d.jsx(Yd,{children:n}):null]})}function bF({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`,C=qt(t),g=n!=null||C&&Ae(t,"TextAreaHint"),h=r!=null||C&&Ae(t,"TextAreaError"),b=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]),x=l.useMemo(()=>({controlId:u,labelId:p,isRequired:s}),[s,p,u]);return{fieldCtx:b,fieldLabelCtx:x,isCompound:C,textareaId:u,label:e,hint:n,error:r,status:i,size:a}}function v_({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=bF({children:t,label:e,hint:n,error:r,id:i,isRequired:a,status:c,size:u}),p=m.isCompound?t:d.jsx(CF,{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(XM,{value:m.fieldCtx,children:d.jsx(YM,{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})})})})}v_.displayName="TextArea";const xF=Object.assign(v_,{Label:S_,Control:Wd,Hint:Xd,Error:Yd});function tn(...t){return R(...t)}function y_(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function _F(t){return new Map(t.map(e=>[e.value,e]))}function SF(t){return t.map(e=>e.value)}function vF({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 yF(t,e){for(const n of t){const r=e.get(n);if(r&&!r.disabled)return n}return null}function AF(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 TF(t,e){return t||(e==="danger"||e==="default"?"default":e)}const LF=[],A_=l.createContext(null);function EF({value:t,children:e}){return d.jsx(A_.Provider,{value:t,children:e})}function T_(){const t=l.useContext(A_);if(!t)throw new Error("Select compound-parts must be inside <Select>.");return t}const L_=l.createContext(null);function IF({value:t,children:e}){return d.jsx(L_.Provider,{value:t,children:e})}function xa(){const t=l.useContext(L_);if(!t)throw new Error("Select.* must be inside <Select>.");return t}const Kl=l.createContext({});function wF({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 fr(){return l.useContext(Kl)}function RF(t){return`${t}-label`}function NF(t){return`${t}-listbox`}function DF(t){return{hintId:Yt(t),errorId:Kt(t),labelId:RF(t),listId:NF(t)}}function OF(t,e,n){return e&&n?`${t}-opt-${n}`:void 0}function PF(t){return t?"Close list":"Open list"}function E_({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?Ro(a,!0):We(a)).then(()=>{i.current=!1,!e&&(o(!0),s==null||s())})}function I_(){return l.useRef(!1)}const kF={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},BF={small:le.small.controlPad,base:le.base.controlPad,mid:le.mid.controlPad,large:le.large.controlPad},jF={small:le.small.chevronIcon,base:le.base.chevronIcon,mid:le.mid.chevronIcon,large:le.large.chevronIcon},MF="relative z-0 flex min-w-0 items-stretch border-1 text-left overflow-hidden motion-reduce:transition-none",FF="min-w-0 flex-1 truncate bg-transparent text-left text-foreground outline-none focus-ring",GF="text-muted",HF="flex shrink-0 origin-center items-center justify-center self-stretch px-small outline-none text-muted hover:text-foreground focus-ring",zF="pointer-events-none",VF="z-[110]",UF="gap-0 p-base",$F="overflow-y-auto overflow-x-hidden",WF="cursor-not-allowed opacity-55 shadow-token-base",XF="cursor-pointer";function YF({variant:t,status:e}){const n=e==="danger"||e==="success"||e==="warning";return Rs({variant:t,statusTinted:n,statusTintClass:n?kF[e]:""})}function KF(t){return t?R(hn(t),$r(t)):"rounded-base"}function qF({variant:t,status:e,disabled:n,groupSegment:r,shellHoverMotionClass:o,className:s,slotClass:i}){const a=t==="gloss";return tn(MF,(r==null?void 0:r.orientation)==="horizontal"?"flex-1":"w-full",KF(r),YF({variant:t,status:e}),Vr,Ur,a?"":zr(!n,e,t),o,n?WF:XF,s,i)}function ZF({size:t,muted:e,className:n,slotClass:r}){return tn(FF,BF[t],e&&GF,n,r)}function QF({disabled:t,className:e,slotClass:n}){return tn(HF,t&&zF,e,n)}const Kd=l.forwardRef(function({className:e,children:n,groupSegment:r,onPointerEnter:o,onPointerLeave:s,...i},a){const c=Po(),u=Pn(),f=fr(),m=xa(),{open:p,setOpen:C,disabled:g,variant:h,status:b,anchorRef:x,listId:_,valueRef:v,value:y,optionValues:S,setActiveValue:T,activeValue:L,isRequired:A,hintConnected:E,errorConnected:I,hintId:w,errorId:N}=m,O=OF(_,p,L),j=Ft(E?w:void 0,I?N:void 0),k=I_(),G=h==="gloss",D=c!=null&&c.segmented?void 0:r??(u==null?void 0:u.segment),P=Mo(x,!g&&!G&&D==null),F=Do(x,!g&&G&&D==null),B=l.useCallback(z=>{x.current=z,!g&&G&&F.bindShellRef(z)},[x,g,F,G]),$=l.useCallback(()=>{const z=S.indexOf(y);T(z>=0?y:S[0]??null),requestAnimationFrame(()=>{var H;return(H=v.current)==null?void 0:H.focus()})},[S,T,y,v]),W=l.useCallback(()=>{E_({anchorRef:x,disabled:g,isGloss:G,groupSegment:D,setOpen:C,onOpened:$,openingRef:k})},[x,g,$,D,G,C,k]),M=l.useCallback(z=>{g||p||z.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?O:void 0,"aria-required":A||void 0,"aria-invalid":b==="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):P.onShellPointerEnter(z))},onPointerLeave:z=>{s==null||s(z),G&&D==null?F.onShellPointerLeave(z):P.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:qF({variant:h,status:b,disabled:g,groupSegment:D,shellHoverMotionClass:G?F.shellHoverMotionClass:P.shellHoverMotionClass,className:e,slotClass:f.triggerGroup}),...i,children:n})});Kd.displayName="SelectTriggerGroup";const qd=l.forwardRef(function({className:e,onKeyDown:n,onBlur:r,children:o,placeholder:s,...i},a){const c=fr(),u=xa(),{selectId:f,open:m,setOpen:p,value:C,setValue:g,activeValue:h,setActiveValue:b,valueRef:x,anchorRef:_,options:v,optionValues:y,disabled:S,placeholder:T,size:L,variant:A,formValueRef:E,formOnBlur:I}=u,w=s??T,N=I_(),O=A==="gloss",j=l.useMemo(()=>_F(v),[v]),k=l.useMemo(()=>j.get(C),[j,C]),G=l.useCallback(()=>{const M=y.indexOf(C);b(M>=0?C:y[0]??null),requestAnimationFrame(()=>{var z;return(z=x.current)==null?void 0:z.focus()})},[y,b,C,x]),D=l.useCallback(()=>{E_({anchorRef:_,disabled:S,isGloss:O,setOpen:p,onOpened:G,openingRef:N})},[_,S,G,O,p,N]),P=l.useCallback(M=>{const z=vF({optionValues:y,activeValue:h,optionsByValue:j,delta:M});z&&b(z)},[h,y,j,b]),F=l.useCallback(M=>{var H;const z=j.get(M);!z||z.disabled||(g(M),p(!1),(H=x.current)==null||H.focus())},[j,p,g,x]),B=l.useCallback(M=>{if(n==null||n(M),!(M.defaultPrevented||S)){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(),P(1);return}if(M.key==="ArrowUp"){M.preventDefault(),P(-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=yF(y,j);z&&b(z);return}if(M.key==="End"){M.preventDefault();const z=AF(y,j);z&&b(z)}}},[h,P,S,n,m,D,y,j,F,b,p]),$=l.useCallback(M=>{r==null||r(M),I==null||I()},[I,r]),W=o??(k?k.label:w);return d.jsx("button",{ref:y_(a,x,E),id:f,type:"button",disabled:S,className:ZF({size:L,muted:!k,className:e,slotClass:c.value}),onKeyDown:B,onBlur:$,...i,children:W})});qd.displayName="SelectValue";const Zd=l.forwardRef(function({className:e,onPointerDown:n,...r},o){const s=fr(),{open:i,setOpen:a,disabled:c,size:u,valueRef:f}=xa(),m=l.useRef(null),p=Hr(i,m),C=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 b;return(b=f.current)==null?void 0:b.focus()}))}},[c,n,i,a,f]);return d.jsx("button",{type:"button",ref:C,tabIndex:-1,disabled:c,"aria-label":PF(i),className:QF({disabled:c,className:e,slotClass:s.trigger}),onPointerDown:g,...r,children:d.jsx(Ie.IoChevronDown,{className:tn(jF[u],s.triggerIcon),"aria-hidden":!0})})});Zd.displayName="SelectTrigger";function Qd({children:t,className:e,offset:n=ws,...r}){const o=fr(),{open:s,setOpen:i,anchorRef:a,listId:c,labelId:u,labelConnected:f,placeholder:m,menuMaxHeight:p,options:C,optionValues:g,value:h,setValue:b,activeValue:x,setActiveValue:_,variant:v}=xa(),y=l.useCallback(T=>{const L=Array.isArray(T)?T[0]??"":T;b(L),i(!1)},[i,b]),S=t??(g.length===0?d.jsx(Ir.Empty,{}):g.map(T=>{const L=C.find(A=>A.value===T);return d.jsx(Ir.Item,{value:T,disabled:L.disabled,label:L.label,hint:L.hint,icon:L.icon},T)}));return d.jsx(Ot,{open:s,onOpenChange:i,side:"bottom",anchorRef:a,variant:v==="gloss"?"gloss":"default",children:d.jsx(Ot.Content,{matchAnchorWidth:!0,unstyled:!0,contentRole:void 0,offset:n,className:tn(VF,o.popover,e),...r,children:d.jsx(Ot.Body,{className:tn(UF,o.popoverBody),children:d.jsx(Ir,{listId:c,"aria-labelledby":f?u:void 0,"aria-label":f?void 0:m,value:h,onValueChange:y,activeValue:x,onActiveValueChange:_,selectionIndicator:!0,className:tn($F,o.listBox),style:{maxHeight:p},children:S})})})})}Qd.displayName="SelectPopover";function w_({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})}w_.displayName="SelectLabel";function Jd({children:t,status:e,className:n,id:r,...o}){const s=T_(),i=fr(),a=TF(e,s.status);return d.jsx(Xe,{id:r??s.hintId,status:a,className:tn(i.hint,n),...o,children:t})}Jd.displayName="SelectHint";function ef({children:t,className:e,id:n,...r}){const o=T_(),s=fr();return d.jsx(Ze,{id:n??o.errorId,className:tn(s.error,e),...r,children:t??o.errorMessage})}ef.displayName="Select.Error";function JF({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(Kd,{children:[d.jsx(qd,{}),d.jsx(Zd,{})]}),d.jsx(Qd,{}),e!=null?d.jsx(Jd,{children:e}):null,n!=null?d.jsx(ef,{children:n}):null]})}function eG({children:t,label:e,hint:n,error:r,id:o,name:s,isRequired:i=!1,status:a="default",size:c="base",options:u=LF,value:f,defaultValue:m,onValueChange:p,variant:C,disabled:g=!1,placeholder:h="Select a value",menuMaxHeight:b="min(24rem, 70vh)"}){const x=wC({name:s,value:f,disabled:g}),_=x.bound,v=x.disabled??g,y=l.useId(),S=Pn(),T=C??((S==null?void 0:S.variant)!=null?Eu(S.variant):"default"),L=o??`select-${y}`,{hintId:A,errorId:E,labelId:I,listId:w}=DF(L),N=qt(t),O=e!=null||N&&Ae(t,"Label"),j=n!=null||N&&Ae(t,"SelectHint"),k=r!=null||N&&Ae(t,"SelectError"),G=f!==void 0||_,[D,P]=l.useState(m??""),F=_?String(x.value??""):G?f??"":D,B=l.useCallback(me=>{G||P(me),p==null||p(me),_&&x.setValue(me)},[_,x,G,p]),[$,W]=l.useState(!1),[M,z]=l.useState(null),H=l.useRef(null),oe=l.useRef(null),pe=l.useMemo(()=>SF(u),[u]);l.useEffect(()=>{var me;!$||!M||(me=document.getElementById(`${w}-opt-${M}`))==null||me.scrollIntoView({block:"nearest"})},[M,w,$]);const ce=l.useMemo(()=>({selectId:L,hintId:A,errorId:E,labelId:I,labelConnected:O,hintConnected:j,errorConnected:k,isRequired:i,status:a,size:c,errorMessage:r}),[L,r,E,k,j,O,A,i,I,c,a]),Y=l.useMemo(()=>({...ce,open:$,setOpen:W,value:F,setValue:B,listId:w,activeValue:M,setActiveValue:z,anchorRef:H,valueRef:oe,variant:T,disabled:v,placeholder:h,menuMaxHeight:b,options:u,optionValues:pe,formValueRef:_?x.ref:void 0,formOnBlur:_?x.onBlur:void 0}),[M,v,ce,_,x,w,b,$,pe,u,h,B,F,T]),ne=l.useMemo(()=>({controlId:L,labelId:I,isRequired:i}),[L,i,I]);return{isCompound:N,label:e,hint:n,error:r,children:t,fieldCtx:ce,selectCtx:Y,fieldLabelCtx:ne}}function R_({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:C,variant:g,disabled:h,placeholder:b,menuMaxHeight:x,name:_,...v}){const y=bn(),S=typeof _=="string"?_:void 0,T=S?y==null?void 0:y.getError(S):void 0,L=r??T,A=c==="default"&&T?"danger":c,E=u??(y==null?void 0:y.size)??"base",I=eG({children:t,label:e,hint:n,error:L,id:i,name:_,isRequired:a,status:A,size:E,options:f,value:m,defaultValue:p,onValueChange:C,variant:g,disabled:h,placeholder:b,menuMaxHeight:x});return d.jsx(EF,{value:I.fieldCtx,children:d.jsx(IF,{value:I.selectCtx,children:d.jsx(wF,{classNames:s,children:d.jsx(Xt.Provider,{value:I.fieldLabelCtx,children:d.jsx(pn,{className:tn(o,s==null?void 0:s.root),...v,children:I.isCompound?t:d.jsx(JF,{label:I.label,hint:I.hint,error:I.error,labelId:I.fieldCtx.labelId})})})})})})}R_.displayName="Select";const tG=Object.assign(R_,{Label:w_,TriggerGroup:Kd,Value:qd,Trigger:Zd,Popover:Qd,Hint:Jd,Error:ef});function Ve(...t){return R(...t)}function nG(t){return t==="default"?"base":t}function rG({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 oG(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 sG(t){return!/\bflex-col\b/.test(t??"")}function iG(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 N_=l.createContext(null),ql=l.createContext({});function up({value:t,children:e}){return d.jsx(N_.Provider,{value:t,children:e})}function dp({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 Kr(){const t=l.useContext(N_);if(!t)throw new Error("Checkbox.* parts must be used inside <Checkbox>.");return t}function qr(){return l.useContext(ql)}function aG(){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 lG({isDisabled:t,enableTextMotion:e,textMotionRef:n,onPointerDown:r}){return lr({isDisabled:t,enabled:e,textMotionRef:n,onPointerDown:r})}const Gs={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"}},cG="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",dG="relative inline-flex shrink-0 items-center justify-center",fG="relative inline-flex items-center justify-center",mG="min-w-0",pG="cursor-pointer",hG="inline-flex flex-wrap items-center gap-x-xsmall gap-y-0 font-w-mid",gG="min-w-0",CG="origin-center will-change-transform",D_="text-muted",O_="text-danger",bG="text-danger",P_="text-muted",k_="text-muted",xG="origin-center will-change-transform",_G="min-w-0 font-w-mid",SG="relative cursor-pointer select-none rounded-small text-left",vG="cursor-not-allowed",yG="has-[:focus-visible]:outline has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-primary",AG="m-0 min-w-0 border-0 p-0",TG="contents";function LG(){return na()}function EG(t,e,n){return R(SG,pu(t,e),yG,n)}function B_(){return ra()}function Fi(t){return oa(t)}function j_(t){return hu(t)}const tf=l.forwardRef(function({className:e,children:n,...r},o){const s=Kr(),i=qr(),a=aG();return d.jsx("span",{ref:o,className:Ve(dG,LG(),i.control,e),...r,children:d.jsxs("span",{ref:a,className:Ve(fG,i.controlTrack),children:[d.jsx("input",{ref:s.inputProps.inputRef,id:s.inputId,type:"checkbox",className:s.isCompound?Ve(uG,i.input):Ve(cG,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(nf,{})]})})});tf.displayName="CheckboxControl";function nf({children:t,className:e,classNames:n,...r}){const o=Kr(),s=qr();return d.jsx(Bt,{variant:nG(o.variant),size:o.size,selected:o.mergedChecked,icon:o.checkIcon??void 0,check:!0,classNames:rG({slotClassNames:s,classNames:n,className:e}),...r,children:t})}nf.displayName="CheckboxIndicator";const M_=l.forwardRef(function({className:e,children:n,...r},o){const s=Kr(),i=qr(),a=Ve(TG,s.isCompound&&mG,i.content,e);return s.isCompound&&!oG(n)?d.jsx("label",{ref:o,htmlFor:s.inputId,id:s.labelId,className:Ve(a,!s.isDisabled&&pG),...r,children:n}):d.jsx("div",{ref:o,className:a,...r,children:n})});M_.displayName="CheckboxContent";function F_({children:t,className:e,isRequired:n,id:r,...o}){const s=Kr(),i=qr(),a=su(),c=n??(a==null?void 0:a.isRequired)??!1,u=Gs[s.size];return d.jsxs("span",{id:r,ref:f=>{s.isCompound&&s.useInlineCompoundMotion&&(s.textMotionRef.current=f)},className:Ve(hG,s.isCompound&&B_(),s.isCompound&&(s.hasCompoundHint||s.hasCompoundError)&&gG,s.isCompound&&s.useInlineCompoundMotion&&CG,i.label,e),...o,children:[d.jsx(ee,{as:"span",variant:u.title,inheritColor:!0,className:Ve(s.isDisabled&&D_,!s.isDisabled&&s.danger&&O_,i.labelText),children:t}),c?d.jsx("span",{className:Ve(bG,i.requiredMark),"aria-hidden":!0,children:"*"}):null]})}F_.displayName="CheckboxLabel";function G_({children:t,className:e,variant:n,...r}){const o=Kr(),s=qr();return d.jsx(Xe,{as:"span",id:o.hintId,variant:n??Gs[o.size].desc,className:Ve(o.isCompound&&Fi(2),o.isDisabled&&P_,s.hint,e),...r,children:t})}G_.displayName="CheckboxHint";function H_({children:t,className:e,...n}){const r=Kr(),o=qr();return d.jsx(Ze,{as:"span",id:r.errorId,variant:Gs[r.size].desc,className:Ve(r.isCompound&&Fi(j_(r.hasCompoundHint)),r.isDisabled&&k_,o.error,e),...n,children:t})}H_.displayName="CheckboxError";function IG({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(),C=Gs[a];return d.jsxs(d.Fragment,{children:[d.jsx(tf,{}),d.jsx("span",{ref:i,className:Ve(B_(),!s&&xG,p.simpleLabelWrap,p.label),children:d.jsx(ee,{as:"span",variant:C.title,inheritColor:!0,className:Ve(_G,c&&D_,!c&&u&&O_,p.simpleLabelText,p.labelText),children:t})}),r?d.jsx(Xe,{as:"span",id:f,variant:C.desc,className:Ve(Fi(2),c&&P_,p.hint),children:e}):null,o?d.jsx(Ze,{as:"span",id:m,variant:C.desc,className:Ve(Fi(j_(r)),c&&k_,p.error),children:n}):null]})}function wG(t,e){return t??`checkbox-${e}`}function RG(t){return Yt(t)}function NG(t){return Kt(t)}function DG(t){return`${t}-label`}function OG({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:C,tabIndex:g,readOnly:h,onBlur:b,onFocus:x,"aria-label":_,label:v,hint:y,error:S},T,L){const A=ik(),E=f!=null?String(f):void 0,I=(A==null?void 0:A.selection)==="single"&&A!=null&&E!=null,w=Xu({name:u,value:s,onChange:a,onBlur:b,disabled:o,readOnly:h,type:"checkbox"}),N=w.bound&&A==null,O=l.useId(),j=wG(c,O),k=RG(j),G=NG(j),D=DG(j),P=s!==void 0,F=I?A.selectedValue===E:void 0,B=N?!!w.checked:void 0,$=P?s:B!==void 0?B:F!==void 0?F:void 0,[W,M,z]=iG($,I||P||N?void 0:i),H=!!(o??(A==null?void 0:A.disabled)??w.disabled),oe=qt(T),pe=oe&&Ae(T,"Label"),ce=oe?Ae(T,"CheckboxHint"):!1,Y=oe?Ae(T,"CheckboxError"):!1,ne=oe&&sG(L),me=!H&&(!oe||ne),re=Gs[t],be=y!=null,te=S!=null,U=oe?(ce?1:0)+(Y?1:0):(be?1:0)+(te?1:0),ae=l.useRef(null),he=l.useCallback(ue=>{const ke=ue.target.checked;if(!z&&!I&&!N&&M(ke),a==null||a(ue),!ue.defaultPrevented){if(I){A.selectSingleValue(E,ke);return}N&&w.onChange(ue)}},[N,w,A,I,z,a,E,M]),Ne=l.useCallback(ue=>{b==null||b(ue),N&&w.onBlur(ue)},[N,w,b]),Ye=m??(I&&A.isRequired?A.claimRequiredAnchor():void 0),q=l.useMemo(()=>({inputId:j,hintId:k,errorId:G,labelId:D,size:t,variant:e,mergedChecked:W,isDisabled:H,isControlled:z,isCompound:oe,hasCompoundHint:ce,hasCompoundError:Y,hintConnected:oe?ce:be,errorConnected:oe?Y:te,labelConnected:pe,accessibleName:_,useInlineCompoundMotion:ne,textMotionRef:ae,danger:r,checkIcon:n,onChange:he,inputProps:{name:w.name??u,value:f,defaultChecked:!z&&!N?i:void 0,required:Ye,form:p,autoFocus:C,tabIndex:g,readOnly:w.readOnly??h,onBlur:Ne,onFocus:x,inputRef:N?w.ref:void 0,ariaInvalid:N?w["aria-invalid"]:void 0}}),[_,n,r,i,p,w,N,C,G,Ne,he,k,Y,ce,pe,te,be,j,oe,z,H,D,W,u,x,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:be,hasError:te,label:v,hint:y,error:S,hintId:k,errorId:G,danger:r}}const z_=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:C,name:g,value:h,required:b,form:x,autoFocus:_,tabIndex:v,readOnly:y,onBlur:S,onFocus:T,className:L,classNames:A,onPointerDown:E,"aria-label":I,...w},N){const O=bn(),j=typeof g=="string"?g:void 0,k=j?O==null?void 0:O.getError(j):void 0,P=OG({size:s,variant:i,checkIcon:a,danger:c||!!k,disabled:u,checked:f,defaultChecked:m,onChange:p,id:C,name:g,value:h,required:b,form:x,autoFocus:_,tabIndex:v,readOnly:y,onBlur:S,onFocus:T,"aria-label":I,label:n,hint:r,error:o??k},e,L),{handlePointerDown:F}=lG({isDisabled:P.isDisabled,enableTextMotion:P.enableTextMotion,textMotionRef:P.textColRef,onPointerDown:E}),B=Ve(EG(P.secondaryLines,P.sz.gridGap,L),P.isDisabled&&vG,A==null?void 0:A.root);return P.isCompound?d.jsx(up,{value:P.contextValue,children:d.jsx(dp,{classNames:A,children:d.jsx(Xt.Provider,{value:P.fieldLabelContext,children:d.jsx("fieldset",{ref:N,"aria-labelledby":P.contextValue.labelConnected?P.contextValue.labelId:void 0,"data-checked":P.mergedChecked?!0:void 0,className:Ve(B,AG),onPointerDown:F,...w,children:e})})})}):d.jsx(up,{value:P.contextValue,children:d.jsx(dp,{classNames:A,children:d.jsx("label",{ref:N,htmlFor:P.contextValue.inputId,"data-checked":P.mergedChecked?!0:void 0,className:B,...w,onPointerDown:F,children:d.jsx(IG,{label:P.label,hint:P.hint,error:P.error,hasHint:P.hasHint,hasError:P.hasError,secondaryLines:P.secondaryLines,textColRef:P.textColRef,size:P.contextValue.size,isDisabled:P.isDisabled,danger:P.danger,hintId:P.hintId,errorId:P.errorId})})})})});z_.displayName="CheckboxRoot";const PG=Object.assign(nf,{Fill:Bt.Fill,Mark:Bt.Mark}),kG=Object.assign(z_,{Control:tf,Indicator:PG,Content:M_,Label:F_,Hint:G_,Error:H_});function _a({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;Hg(t,u);const f=n?R(Rl,"gloss-indicator size-full min-h-0 min-w-0 origin-center border-0",s):R(Rl,"size-full min-h-0 min-w-0 origin-center border border-primary bg-surface",s),m=n?DI:Bg("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]})}_a.displayName="SelectionThumb";function Sa({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",Pg[t]),children:s})})}Sa.displayName="SelectionThumbIcon";function tt(...t){return R(...t)}function BG(t){return t==="gloss"?"gloss":"base"}function jG({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 MG(t){return!/\bflex-col\b/.test(t??"")}function FG(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 V_=l.createContext(null),Zl=l.createContext({});function GG({value:t,children:e}){return d.jsx(V_.Provider,{value:t,children:e})}function HG({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 Zr(){const t=l.useContext(V_);if(!t)throw new Error("Radio.* parts must be used inside <Radio>.");return t}function Qr(){return l.useContext(Zl)}function zG(){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 VG({isDisabled:t,enableTextMotion:e,textMotionRef:n,onPointerDown:r}){return lr({isDisabled:t,enabled:e,textMotionRef:n,onPointerDown:r})}function UG(t,e){return t??`radio-${e}`}function $G(t){return Yt(t)}function WG(t){return Kt(t)}function XG(t){return t!=null?String(t):"Option"}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"}},YG="absolute m-[-1px] h-px w-px overflow-hidden border-0 p-0 opacity-0 [clip:rect(0,0,0,0)]",KG="relative inline-flex shrink-0 items-center justify-center",qG="relative inline-flex items-center justify-center",ZG="min-w-0",QG="inline-flex flex-wrap items-center gap-x-xsmall gap-y-0",JG="min-w-0",eH="origin-center will-change-transform",U_="text-muted",$_="text-danger",tH="text-danger",W_="text-muted",X_="text-muted",nH="origin-center will-change-transform",rH="min-w-0",oH="relative cursor-pointer select-none rounded-small text-left",sH="cursor-not-allowed",iH="has-[:focus-visible]:outline has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-primary",aH="contents";function lH(){return na()}function cH(t,e,n){return R(oH,pu(t,e),iH,n)}function Y_(){return ra()}function Gi(t){return oa(t)}function K_(t){return hu(t)}const rf=l.forwardRef(function({className:e,children:n,...r},o){const s=Zr(),i=Qr(),a=zG();return d.jsxs("span",{ref:o,className:tt(KG,lH(),i.control,e),...r,children:[d.jsx("input",{id:s.inputId,type:"radio",className:tt(YG,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":XG(s.inputProps.value),onChange:s.onChange,onClick:s.onActivate}),d.jsx("span",{ref:a,className:tt(qG,i.controlTrack),children:n??d.jsx(of,{})})]})});rf.displayName="RadioControl";function of({children:t,className:e,classNames:n,...r}){const o=Zr(),s=Qr();return d.jsx(Bt,{size:o.size,variant:BG(o.variant),selected:o.mergedChecked,dot:!0,classNames:jG({slotClassNames:s,classNames:n,className:e}),...r,children:t})}of.displayName="RadioIndicator";const q_=l.forwardRef(function({className:e,children:n,...r},o){const s=Zr(),i=Qr();return d.jsx("div",{ref:o,className:tt(aH,s.isCompound&&ZG,i.content,e),...r,children:n})});q_.displayName="RadioContent";function Z_({children:t,className:e,isRequired:n,...r}){const o=Zr(),s=Qr(),i=su(),a=n??(i==null?void 0:i.isRequired)??!1,c=Hs[o.size];return d.jsxs("span",{ref:u=>{o.isCompound&&o.useInlineCompoundMotion&&(o.textMotionRef.current=u)},className:tt(QG,o.isCompound&&Y_(),o.isCompound&&(o.hasCompoundHint||o.hasCompoundError)&&JG,o.isCompound&&o.useInlineCompoundMotion&&eH,s.label,e),...r,children:[d.jsx(ee,{as:"span",variant:c.title,inheritColor:!0,className:tt(o.isDisabled&&U_,!o.isDisabled&&o.danger&&$_,s.labelText),children:t}),a?d.jsx("span",{className:tt(tH,s.requiredMark),"aria-hidden":!0,children:"*"}):null]})}Z_.displayName="RadioLabel";function Q_({children:t,className:e,variant:n,...r}){const o=Zr(),s=Qr();return d.jsx(Xe,{as:"span",id:o.hintId,variant:n??Hs[o.size].desc,className:tt(o.isCompound&&Gi(2),o.isDisabled&&W_,s.hint,e),...r,children:t})}Q_.displayName="RadioHint";function J_({children:t,className:e,...n}){const r=Zr(),o=Qr();return d.jsx(Ze,{as:"span",id:r.errorId,variant:Hs[r.size].desc,className:tt(r.isCompound&&Gi(K_(r.hasCompoundHint)),r.isDisabled&&X_,o.error,e),...n,children:t})}J_.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(),C=Hs[a];return d.jsxs(d.Fragment,{children:[d.jsx(rf,{}),d.jsx("span",{ref:i,className:tt(Y_(),!s&&nH,p.simpleLabelWrap,p.label),children:d.jsx(ee,{as:"span",variant:C.title,inheritColor:!0,className:tt(rH,c&&U_,!c&&u&&$_,p.simpleLabelText,p.labelText),children:t})}),r?d.jsx(Xe,{as:"span",id:f,variant:C.desc,className:tt(Gi(2),c&&W_,p.hint),children:e}):null,o?d.jsx(Ze,{as:"span",id:m,variant:C.desc,className:tt(Gi(K_(r)),c&&X_,p.error),children:n}):null]})}function dH({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:C,readOnly:g,onBlur:h,onFocus:b,label:x,hint:_,error:v},y,S,T){const L=uk(),A=u!=null?String(u):void 0,E=L!=null&&A!=null,I=l.useId(),w=UG(a,I),N=$G(w),O=WG(w),j=o!==void 0,k=E?L.selectedValue===A:void 0,G=j?o:k!==void 0?k:void 0,[D,P,F]=FG(G,E||j?void 0:s),B=c??(L==null?void 0:L.name),$=!!(r??(L==null?void 0:L.disabled)),W=qt(y),M=W?Ae(y,"RadioHint"):!1,z=W?Ae(y,"RadioError"):!1,H=W&&MG(S),oe=!$&&(!W||H),pe=Hs[t],ce=_!=null,Y=v!=null,ne=W?(M?1:0)+(z?1:0):(ce?1:0)+(Y?1:0),me=l.useRef(null),re=l.useCallback(he=>{!j&&!E&&P(he.target.checked),i==null||i(he),!he.defaultPrevented&&E&&he.target.checked&&A!=null&&L.selectValue(A)},[L,E,j,i,A,P]),be=!$&&!g&&!f&&!(E&&L.isRequired),te=f??(E&&L.isRequired?L.claimRequiredAnchor():void 0),U=l.useCallback(he=>{if(T==null||T(he),!(he.defaultPrevented||!be||!D)){if(he.preventDefault(),E){L.selectValue(void 0);return}j||P(!1)}},[be,L,E,j,D,T,P]);return{contextValue:l.useMemo(()=>({inputId:w,hintId:N,errorId:O,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:C,readOnly:g,onBlur:h,onFocus:b}}),[n,s,m,p,O,re,U,z,M,Y,ce,N,w,B,W,H,F,$,D,h,b,te,g,t,C,u,e]),isCompound:W,isDisabled:$,mergedChecked:D,enableTextMotion:oe,textColRef:me,secondaryLines:ne,sz:pe,hasHint:ce,hasError:Y,label:x,hint:_,error:v,hintId:N,errorId:O,danger:n}}const eS=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:C,value:g,required:h,form:b,autoFocus:x,tabIndex:_,readOnly:v,onBlur:y,onFocus:S,className:T,classNames:L,onPointerDown:A,onClick:E,...I},w){const N=dH({size:s,variant:i,danger:a,disabled:c,checked:u,defaultChecked:f,onChange:m,id:p,name:C,value:g,required:h,form:b,autoFocus:x,tabIndex:_,readOnly:v,onBlur:y,onFocus:S,label:n,hint:r,error:o},e,T,E),{handlePointerDown:O}=VG({isDisabled:N.isDisabled,enableTextMotion:N.enableTextMotion,textMotionRef:N.textColRef,onPointerDown:A}),j=tt(cH(N.secondaryLines,N.sz.gridGap,T),N.isDisabled&&sH,L==null?void 0:L.root);return d.jsx(GG,{value:N.contextValue,children:d.jsx(HG,{classNames:L,children:d.jsx("label",{ref:w,"data-selected":N.mergedChecked?!0:void 0,className:j,...I,onPointerDown:O,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})})})})});eS.displayName="RadioRoot";const fH=Object.assign(of,{Fill:Bt.Fill,Mark:Bt.Mark}),mH=Object.assign(eS,{Control:rf,Indicator:fH,Content:q_,Label:Z_,Hint:Q_,Error:J_});function nt(...t){return R(...t)}function pH(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 hH(t){return!/\bflex-col\b/.test(t??"")}function gH(t,e){return l.Children.map(t,n=>l.isValidElement(n)&&n.type.displayName==="SwitchControl"?l.cloneElement(n,{...e,...n.props}):n)}function CH(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 bH(t,e,n,r,o){return t?(r?1:0)+(o?1:0):(e?1:0)+(n?1:0)}function xH(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 _H(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 fp={small:Ut("small"),base:Ut("base"),mid:Ut("mid"),large:Ut("large")};function SH(t,e){if(t==null)return fp[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 fp[e]}function vH(t,e){const n=t.getBoundingClientRect().width,r=e.getBoundingClientRect().width;return Math.max(0,n-r)}const ai={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))]"},$o={small:{track:ai.small,travelPx:Ut("small"),title:"small",desc:"tools",gap:"gap-x-small gap-y-xsmall"},base:{track:ai.base,travelPx:Ut("base"),title:"base",desc:"small",gap:"gap-x-base gap-y-xsmall"},mid:{track:ai.mid,travelPx:Ut("mid"),title:"mid",desc:"small",gap:"gap-x-plus gap-y-xsmall"},large:{track:ai.large,travelPx:Ut("large"),title:"large",desc:"base",gap:"gap-x-plus gap-y-xsmall"}};function yH({isDisabled:t,enableTextMotion:e,textMotionRef:n,onPointerDown:r}){return lr({isDisabled:!!t,enabled:e,textMotionRef:n,onPointerDown:r})}function AH({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(),C=SH(r,n),g=l.useRef(C),h=l.useRef(!0),b=l.useRef(!0),x=l.useCallback((_,v)=>{const y=a.current;if(!y)return;const S=_?v:0;if(p||b.current){b.current=!1,V(y),y.style.transform=`translate(${S}px, 0)`;return}V(y),X.to(y,{x:S,...wL(),overwrite:"auto"})},[p,a]);l.useLayoutEffect(()=>{g.current=C,x(t,g.current)},[t,C,x]),l.useLayoutEffect(()=>{const _=s.current,v=c.current;if(!_||!v)return;const y=()=>{g.current=vH(_,v),x(t,g.current)};y();const S=new ResizeObserver(y);return S.observe(_),S.observe(v),()=>S.disconnect()},[t,n,x,r,C,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&&V(v)}},[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 sf=l.createContext(null);function TH({value:t,children:e}){return d.jsx(sf.Provider,{value:t,children:e})}function va(){const t=l.useContext(sf);if(!t)throw new Error("Switch components must be inside <Switch>.");return t}function LH(){return l.useContext(sf)}const Ql=l.createContext({});function EH({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 _n(){return l.useContext(Ql)}const tS=l.createContext(null);function IH({value:t,children:e}){return d.jsx(tS.Provider,{value:t,children:e})}function af(){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 wH(t,e,n){return t??n??`switch-${e}`}function RH(t){return Yt(t)}function NH(t){return Kt(t)}function DH(t){return t?void 0:"Switch"}const lf=l.createContext(null);function OH({value:t,children:e}){return d.jsx(lf.Provider,{value:t,children:e})}function ya(){const t=l.useContext(lf);if(!t)throw new Error("Slider components must be inside <Slider>.");return t}function PH(){return l.useContext(lf)}const Jl=l.createContext({});function kH({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 Sn(){return l.useContext(Jl)}const nS=l.createContext(null);function BH({value:t,children:e}){return d.jsx(nS.Provider,{value:t,children:e})}function cf(){const t=l.useContext(nS);if(!t)throw new Error("Slider.Rail, Slider.Fill, Slider.Thumb, Slider.Icon must be inside Slider.Track");return t}function jH({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 MH({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 FH({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 Et(...t){return R(...t)}function zs(t){return typeof t=="number"?`${t}px`:t}const mp={small:Ut("small"),base:Ut("base"),mid:Ut("mid"),large:Ut("large")};function To(t,e,n){return Math.min(n,Math.max(e,t))}function rS(t,e,n){return n<=e?0:(t-e)/(n-e)*100}function oS(t,e,n){return n<=e?0:(t-e)/(n-e)}function ec(t,e,n,r,o){if(r<=0)return rS(t,e,n);if(r<=o)return 50;const s=o/2,i=r-o;return(s+oS(t,e,n)*i)/r*100}function ol(t,e,n,r,o){return r<=o?r/2:o/2+oS(t,e,n)*(r-o)}function GH(t,e,n,r,o,s,i){if(t<=0)return{start:0,end:rS(s,n,r)};const a=e/2;if(o){const u=ol(i[0],n,r,t,e),f=ol(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=ol(s,n,r,t,e);return{start:0,end:Math.min(t,c+a)/t*100}}function HH(t,e){const n=t.end-t.start;return e==="horizontal"?{left:`${t.start}%`,width:`${n}%`}:{bottom:`${t.start}%`,height:`${n}%`}}function zH(t,e,n,r){if(r<=0)return To(t,e,n);const o=Math.round((t-e)/r);return To(e+o*r,e,n)}function VH(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 UH(t,e,n){if(t!=null&&t.length)return[...new Set(t.map(r=>To(r,e,n)))].toSorted((r,o)=>r-o)}function tc(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=To(r==="horizontal"?(t-n.left-c)/u:1-(e-n.top-c)/u,0,1);return o+f*(s-o)}function $H(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 WH(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 XH(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 sS(t,e){if(t==null)return mp[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 mp[e]}function YH(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 KH(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 qH(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 ZH(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 QH(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 JH(t){return`${t}-label`}function e2({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 t2(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 n2({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 r2(t){l.useEffect(()=>{const e=t.current;return()=>{e&&V(e)}},[t])}function o2(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 uf(t,e){return R(t==="horizontal"?"w-full":"w-auto items-center",e)}const s2={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)]"},i2={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)]"},a2="pointer-events-none absolute inset-0 overflow-hidden rounded-full",l2="bg-primary-tint",c2="gloss-indicator border-0",u2="overflow-hidden rounded-full",d2="opacity-48",f2="absolute rounded-full",m2="bg-primary",p2="bg-primary-tint",h2="z-[1]",g2="inset-y-0",C2="inset-x-0",b2="relative touch-none select-none",x2="w-full",_2="h-48",S2="pointer-events-none absolute z-[1] size-1 rounded-full bg-primary/30",v2="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",y2="top-0 h-full w-auto -translate-x-1/2 aspect-square",A2="left-0 w-full h-auto -translate-y-1/2 aspect-square",T2="cursor-not-allowed",L2="cursor-grab active:cursor-grabbing";function E2({orientation:t,slotClass:e,className:n}){return Et(uf(t,n),e)}function I2({disabled:t,gloss:e=!1,slotClass:n,className:r}){return Et(a2,!e&&l2,t&&d2,n,r)}function w2({isHorizontal:t,gloss:e=!1,slotClass:n,className:r}){return Et(f2,t?g2:C2,e?p2:m2,e&&h2,n,r)}function iS({isHorizontal:t,size:e,thickness:n,gloss:r=!1,slotClass:o,className:s}){return Et(b2,t?x2:_2,n==null&&(t?s2[e]:i2[e]),r&&u2,r&&c2,o,s)}function R2({orientation:t,disabled:e,slotClass:n,className:r}){return Et(v2,t==="horizontal"?y2:A2,e?T2:L2,n,r)}function N2(t,e){return e==="horizontal"?{left:`${t}%`}:{top:`${100-t}%`}}function D2(t,e){return e==="horizontal"?{left:`${t}%`,top:"50%",transform:"translate(-50%, -50%)"}:{bottom:`${t}%`,left:"50%",top:"auto",transform:"translate(-50%, 50%)"}}function O2({isHorizontal:t,thickness:e}){if(e==null)return;const n=zs(e);return t?{height:n,minHeight:n}:{width:n,minWidth:n}}function bi({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:C,ariaDescribedBy:g,onPointerDown:h,onKeyDown:b}){const x=Sn(),_=t2(i),{squeezeRef:v,handlePointerDown:y}=n2({disabled:i,onPointerDown:h});return d.jsx("button",{ref:v,type:"button",role:"slider",...C!=null?{"aria-labelledby":C}: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:R2({orientation:s,disabled:i,slotClass:x.thumb}),style:N2(o,s),onPointerDown:y,onKeyDown:b,children:d.jsx(_a,{active:a,size:t,gloss:n,shellRef:_,className:Et(x.thumbShell,r),children:e!=null?d.jsx(Sa,{size:t,highlighted:a,gloss:n,children:e}):null})})}function P2(t,e){const{orientation:n,size:r="base",thickness:o,min:s=0,max:i=100,step:a=1,marks:c,formatValue:u=XH,icon:f,gloss:m=!1,thumbClassName:p,disabled:C=!1,className:g,classNames:h,ariaLabel:b,range:x=!1,children:_}=t,v=PH(),y=Sn(),S=l.useMemo(()=>({...y,...h}),[y,h]),T=n??(v==null?void 0:v.orientation)??"horizontal",L=v==null?void 0:v.labelId,A=(v==null?void 0:v.labelConnected)??!1,E=b,I=l.useCallback(K=>e2({kind:K,explicitLabel:E,labelConnected:A,labelId:L,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)??""}),[E,v==null?void 0:v.errorConnected,v==null?void 0:v.errorId,v==null?void 0:v.hintConnected,v==null?void 0:v.hintId,A,L]),w=l.useRef(null),N=l.useRef(null),[O,j]=l.useState(0),k=l.useMemo(()=>sS(o,r),[o,r]),[G,D]=l.useState(k),P=l.useRef(null),[F,B]=l.useState(null),$=l.useMemo(()=>UH(c,s,i),[c,s,i]),W=l.useCallback(K=>{const Z=To(K,s,i);return $!=null&&$.length?VH(Z,$):zH(Z,s,i,a)},[$,s,i,a]),[M,z]=qH(x?void 0:t.value,x?void 0:t.defaultValue,s),[H,oe]=ZH(x?t.value:void 0,x?t.defaultValue:void 0,s,i),pe=x?void 0:t.onValueChange,ce=x?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[Ee,He]=H;Z===Ee&&fe===He||(oe([Z,fe]),ce==null||ce([Z,fe]))},[ce,H,oe,W]),me=l.useCallback((K=M,Z=H)=>{const fe=w.current,Ee=N.current;if(!fe||!Ee)return;const He=fe.getBoundingClientRect(),{trackSpanPx:Qe,thumbSpanPx:Je}=Ci(He,T);j(Jt=>Jt===Qe?Jt:Qe),Je>0&&D(Jt=>Jt===Je?Jt:Je);const Qt=GH(Qe,Je>0?Je:k,s,i,x,K,Z);o2(Ee,HH(Qt,T),T)},[k,i,s,T,x,H,M]);l.useLayoutEffect(()=>{me()},[me]),l.useEffect(()=>{const K=w.current;if(!K)return;const Z=new ResizeObserver(()=>me());return Z.observe(K),()=>Z.disconnect()},[T,me]),r2(N);const re=l.useCallback((K,Z,fe)=>{const Ee=w.current;if(!Ee||C)return;const He=Ee.getBoundingClientRect(),{thumbSpanPx:Qe}=Ci(He,T),Je=tc(K,Z,He,T,s,i,Qe>0?Qe:k);if(x){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)}},[C,ne,Y,k,i,s,T,x,H,M,W,me]),be=l.useCallback((K,Z)=>{const fe=w.current;if(!fe)return"start";const Ee=fe.getBoundingClientRect(),{thumbSpanPx:He}=Ci(Ee,T),Qe=tc(K,Z,Ee,T,s,i,He>0?He:k),[Je,Qt]=H;return Math.abs(Qe-Je)<=Math.abs(Qe-Qt)?"start":"end"},[k,i,s,T,H]);l.useEffect(()=>{const K=fe=>{const Ee=P.current;Ee&&re(fe.clientX,fe.clientY,Ee)},Z=()=>{P.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(C||K.button!==0)return;K.preventDefault();const Z=x?be(K.clientX,K.clientY):"single";P.current=Z,B(Z),re(K.clientX,K.clientY,Z)},[C,be,x,re]),U=l.useCallback(K=>Z=>{C||Z.button!==0||(Z.preventDefault(),Z.stopPropagation(),P.current=K,B(K),Z.currentTarget.setPointerCapture(Z.pointerId))},[C]),ae=l.useCallback((K,Z)=>{if(x){const[fe,Ee]=H;ne(K==="start"?[fe+Z,Ee]:[fe,Ee+Z])}else Y(M+Z)},[ne,Y,x,H,M]),he=l.useCallback(K=>Z=>{if(C)return;const fe=WH($,a,Z.key,T);if(fe===0)return;Z.preventDefault();const Ee=K==="start"?H[0]:K==="end"?H[1]:M;if(fe==="home"){x?ne(K==="start"?[s,H[1]]:[H[0],s]):Y(s);return}if(fe==="end"){x?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=$H(Ee,$,fe==="mark-next"?1:-1);x?ne(K==="start"?[He,H[1]]:[H[0],He]):Y(He);return}typeof fe=="number"&&fe!==0&&ae(K,fe)},[C,ne,Y,$,i,s,ae,T,x,H,M,a]),Ne=l.useCallback((K,Z)=>{const fe=Z??f,Ee=He=>ec(He,s,i,O,G);return K==="start"?d.jsx(bi,{size:r,icon:fe,gloss:m,thumbClassName:p,percent:Ee(H[0]),orientation:T,disabled:C,active:F==="start",ariaValueNow:H[0],ariaValueMin:s,ariaValueMax:H[1],ariaValueText:u(H[0]),...I("start"),onPointerDown:U("start"),onKeyDown:he("start")}):K==="end"?d.jsx(bi,{size:r,icon:fe,gloss:m,thumbClassName:p,percent:Ee(H[1]),orientation:T,disabled:C,active:F==="end",ariaValueNow:H[1],ariaValueMin:H[0],ariaValueMax:i,ariaValueText:u(H[1]),...I("end"),onPointerDown:U("end"),onKeyDown:he("end")}):d.jsx(bi,{size:r,icon:fe,gloss:m,thumbClassName:p,percent:Ee(M),orientation:T,disabled:C,active:F==="single",ariaValueNow:M,ariaValueMin:s,ariaValueMax:i,ariaValueText:u(M),...I("single"),onPointerDown:U("single"),onKeyDown:he("single")})},[F,C,u,m,he,U,f,i,s,T,H,M,r,I,p,G,O]),Ye=l.useMemo(()=>{if(x){const[K,Z]=H;return`${u(K)} — ${u(Z)}`}return u(M)},[u,x,H,M]),q=v==null?void 0:v.setDisplay;l.useLayoutEffect(()=>{q==null||q({valueLabel:Ye,min:s,max:i,range:x,singleValue:M,rangeValue:H,label:E})},[E,i,s,x,H,q,M,Ye]);const se=T==="horizontal",ue=w2({isHorizontal:se,gloss:m,slotClass:S.fill}),ke=I2({disabled:C,gloss:m,slotClass:S.rail}),ft=$==null?void 0:$.map(K=>{const Z=ec(K,s,i,O,G);return d.jsx("span",{"aria-hidden":!0,className:Et(S2,S.mark),style:D2(Z,T)},K)}),vn=l.useCallback(K=>{w.current=K,typeof e=="function"?e(K):e&&(e.current=K)},[e]),hr=l.useMemo(()=>({fillRef:N,fillClassResolved:ue,railClass:ke,markNodes:ft,size:r,orientation:T,disabled:C,icon:f,range:x,renderThumb:Ne}),[C,ue,f,ft,T,ke,x,Ne,r]),{body:yn,hasCompoundParts:ln}=KH(_),Ko=l.useMemo(()=>O2({isHorizontal:se,thickness:o}),[se,o]),qo=iS({isHorizontal:se,size:r,thickness:o,gloss:m,slotClass:S.track,className:g});return{setTrackRef:vn,trackHitClass:qo,trackCrossStyle:Ko,handleTrackPointerDown:te,trackContextValue:hr,compoundBody:yn,hasCompoundParts:ln,range:x,icon:f}}function k2({label:t,showValue:e,valueText:n,hint:r,error:o,hintId:s,errorId:i,trackProps:a}){const c=Sn();return FH({label:t,labelClassName:c.label,showValue:e,valueText:n,hint:r,hintId:s,error:o,errorId:i,Header:df,Value:ff,track:d.jsx(mf,{...a})})}function aS({className:t,classNames:e,...n}){const r=Sn();return d.jsx(Ue,{className:t,classNames:{...e,root:Et(r.label,e==null?void 0:e.root)},...n})}aS.displayName="SliderLabel";function df({children:t,className:e,...n}){const{orientation:r}=ya(),o=Sn();return d.jsx(jH,{orientation:r,className:Et(o.header,e),...n,children:t})}df.displayName="Slider.Header";function ff({children:t,className:e,...n}){const{display:r}=ya(),o=Sn();return d.jsx(MH,{fallback:r==null?void 0:r.valueLabel,className:Et(o.value,e),...n,children:t})}ff.displayName="Slider.Value";function lS({children:t,className:e,id:n,...r}){const o=ya(),s=Sn();return d.jsx(Xe,{id:n??o.hintId,className:Et(s.hint,e),...r,children:t})}lS.displayName="Slider.Hint";function cS({children:t,className:e,id:n,...r}){const o=ya(),s=Sn();return d.jsx(Ze,{id:n??o.errorId,className:Et(s.error,e),...r,children:t})}cS.displayName="Slider.Error";const mf=l.forwardRef(function(e,n){const r=P2(e,n),o=d.jsxs(d.Fragment,{children:[d.jsx(hf,{}),r.range?d.jsxs(d.Fragment,{children:[d.jsx(as,{thumb:"start",children:r.icon!=null?d.jsx(ls,{children:r.icon}):null}),d.jsx(as,{thumb:"end",children:r.icon!=null?d.jsx(ls,{children:r.icon}):null})]}):d.jsx(as,{thumb:"single",children:r.icon!=null?d.jsx(ls,{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(BH,{value:r.trackContextValue,children:r.hasCompoundParts?r.compoundBody:o})})});mf.displayName="SliderTrack";function pf({className:t,...e}){const n=cf(),r=Sn();return d.jsx("span",{ref:n.fillRef,className:Et(n.fillClassResolved,r.fill,t),...e})}pf.displayName="SliderFill";function hf({className:t,children:e,...n}){const r=cf(),o=Sn();return d.jsx("div",{className:Et(r.railClass,o.rail,t),"aria-hidden":!0,...n,children:e??d.jsxs(d.Fragment,{children:[d.jsx(pf,{}),r.markNodes]})})}hf.displayName="SliderRail";function as({thumb:t="single",children:e}){const n=cf(),r=QH(e,n.icon);return n.renderThumb(t,r)}as.displayName="SliderThumb";function ls({children:t}){return t}ls.displayName="SliderIcon";function B2({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:C,step:g,marks:h,size:b,thickness:x,formatValue:_,icon:v,disabled:y,ariaLabel:S,gloss:T,thumbClassName:L}){const A=l.useId(),E=e??`slider-${A}`,I=Yt(E),w=Kt(E),N=JH(E),[O,j]=l.useState(null),k=l.useCallback(M=>{j(z=>YH(z,M)?z:M)},[]),G=qt(t),D=r!=null||G&&Ae(t,"Label"),P=i!=null||G&&Ae(t,"Slider.Hint"),F=a!=null||G&&Ae(t,"Slider.Error"),B=l.useMemo(()=>({sliderId:E,labelId:N,hintId:I,errorId:w,hintConnected:P,errorConnected:F,labelConnected:D,orientation:n,display:O,setDisplay:k}),[O,w,F,P,D,I,N,n,k,E]),$=l.useMemo(()=>({labelId:N,isRequired:!1}),[N]);return{sliderId:E,isCompound:G,fieldCtx:B,fieldLabelCtx:$,trackProps:{range:c,value:u,defaultValue:f,onValueChange:m,min:p,max:C,step:g,marks:h,size:b,thickness:x,formatValue:_,icon:v,disabled:y,ariaLabel:S,gloss:T,thumbClassName:L,orientation:n},label:r,showValue:o,valueText:s,hint:i,error:a,hasHint:P,hasError:F,hintId:I,errorId:w}}function uS({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:C,min:g,max:h,step:b,marks:x,size:_,thickness:v,formatValue:y,icon:S,disabled:T,ariaLabel:L,gloss:A,thumbClassName:E,...I}){const w=B2({children:t,id:r,orientation:o,label:s,showValue:i,valueText:a,hint:c,error:u,range:f,value:m,defaultValue:p,onValueChange:C,min:g,max:h,step:b,marks:x,size:_,thickness:v,formatValue:y,icon:S,disabled:T,ariaLabel:L,gloss:A,thumbClassName:E}),N=w.isCompound?t:d.jsx(k2,{label:w.label,showValue:w.showValue,valueText:w.valueText,hint:w.hint,error:w.error,hintId:w.hasHint?w.hintId:void 0,errorId:w.hasError?w.errorId:void 0,trackProps:w.trackProps});return d.jsx(OH,{value:w.fieldCtx,children:d.jsx(kH,{classNames:n,children:d.jsx(Xt.Provider,{value:w.fieldLabelCtx,children:d.jsx(pn,{id:w.sliderId,className:E2({orientation:w.fieldCtx.orientation,slotClass:n==null?void 0:n.root,className:e}),...I,children:N})})})})}uS.displayName="Slider";const j2=Object.assign(uS,{Header:df,Label:aS,Value:ff,Hint:lS,Error:cS,Track:mf,Rail:hf,Fill:pf,Thumb:as,Icon:ls}),M2="absolute m-[-1px] h-px w-px overflow-hidden border-0 p-0 opacity-0 [clip:rect(0,0,0,0)]",F2="relative inline-flex shrink-0 items-center justify-center",G2="min-w-0",H2="contents",z2="inline-flex flex-wrap items-center gap-x-xsmall gap-y-0",V2="min-w-0",U2="origin-center will-change-transform",$2="font-w-mid",dS="text-muted",fS="text-muted",mS="text-muted",W2="origin-center will-change-transform",X2="min-w-0 font-w-mid",Y2="relative cursor-pointer select-none rounded-small text-left",K2="cursor-not-allowed",q2="has-[:focus-visible]:outline has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-primary",Z2="inline-grid grid-cols-[auto] grid-rows-[auto]",Q2="relative box-border inline-flex shrink-0 rounded-full",J2="gloss-indicator border-0",ez="bg-primary-tint",tz="pointer-events-none absolute inset-0 rounded-full",nz="z-[1]",rz="bg-primary",oz="bg-primary-tint",sz="absolute inset-y-0 left-0 aspect-square h-full w-auto will-change-transform flex",iz="z-[2]",az="absolute inset-0 flex items-center justify-center";function Aa(t){return t==="left"?"left":"right"}function pS(t){return na(Aa(t))}function hS(t){return ra(Aa(t))}function Hi(t,e){return oa(t,Aa(e))}function lz(t){return hu(t)}function cz({hasTextColumn:t,secondaryLines:e,gap:n,labelPosition:r,slotClass:o,className:s}){return nt(Y2,t?pu(e,n,Aa(r),"inline-grid"):Z2,q2,o,s)}function uz({size:t,thickness:e,gloss:n,slotClass:r,className:o}){return nt(Q2,e==null&&$o[t].track,n?J2:ez,r,o)}function dz(t){if(t==null)return;const e=zs(t);return{height:e,minHeight:e,width:`calc(2 * (${e}))`,minWidth:`calc(2 * (${e}))`}}function fz(t){if(t)return{background:t}}const gf=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:C,name:g,value:h,required:b,form:x,autoFocus:_,tabIndex:v,readOnly:y,onBlur:S,onFocus:T,onPointerDown:L,children:A,...E},I){const w=LH(),N=_n(),O=l.useMemo(()=>({...N,...c}),[c,N]),j=l.useId(),k=wH(C,j,w==null?void 0:w.switchId),G=(w==null?void 0:w.hintId)??`${k}-hint`,D=(w==null?void 0:w.errorId)??`${k}-error`,P=e??(w==null?void 0:w.size)??"base",[F,B,$]=pH(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=>{L==null||L(me),!(me.defaultPrevented||u)&&(M(re=>re+1),w==null||w.setSqueezeToken(re=>re+1))},[u,w,L]),{"aria-label":oe,...pe}=E,ce={size:P,thickness:i,checked:F,disabled:u,color:o,gloss:s,squeezeToken:W,iconOff:n,iconOn:r,classNames:{track:O.track,fill:O.fill,thumb:O.thumb,thumbShell:O.thumbShell,icon:O.icon}},{track:Y}=xH(A);let ne;return Y!=null?ne=l.isValidElement(Y)?l.cloneElement(Y,ce):Y:A!=null&&_H(A)?ne=d.jsxs(zi,{...ce,children:[d.jsx(Ta,{}),A]}):A!=null?ne=A:ne=d.jsx(zi,{...ce}),d.jsxs("span",{className:nt(F2,w!=null?pS(w.labelPosition):void 0,O.control,a),children:[d.jsx("input",{ref:I,id:k,type:"checkbox",role:"switch","aria-checked":F,className:nt(M2,O.input),disabled:u,name:g,value:h,required:b,form:x,autoFocus:_,tabIndex:v,readOnly:y??($&&p===void 0),onBlur:S,onFocus:T,"aria-describedby":Ft(w!=null&&w.hintConnected?G:void 0,w!=null&&w.errorConnected?D:void 0),"aria-label":oe??DH((w==null?void 0:w.hasTextColumn)??!1),onPointerDown:H,...$?{checked:F,onChange:z}:{defaultChecked:m,onChange:z},...pe}),ne]})});gf.displayName="SwitchControl";function zi({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 C=_n(),g=l.useMemo(()=>({...C,...f}),[C,f]),h=l.useRef(null),b=l.useRef(null),x=l.useRef(null),_=l.useRef(null),v=l.useRef(null),y=l.useRef(null),S=l.useRef(null);AH({checked:n,disabled:r,size:t,thickness:e,squeezeToken:i,trackRef:h,trackFillRef:b,thumbRef:x,thumbShellRef:_,thumbFillRef:v,iconOffRef:y,iconOnRef:S});const T=l.useMemo(()=>({checked:n,disabled:r,size:t,color:o,gloss:s,trackFillRef:b,thumbRef:x,thumbShellRef:_,thumbFillRef:v,iconOffRef:y,iconOnRef:S}),[n,o,r,s,t]),L=d.jsxs(d.Fragment,{children:[d.jsx(Ta,{}),d.jsxs(Cf,{children:[a!=null?d.jsx(Vi,{when:"off",children:a}):null,c!=null?d.jsx(Vi,{when:"on",children:c}):null]})]});return d.jsx(IH,{value:T,children:d.jsx("span",{ref:h,className:uz({size:t,thickness:e,gloss:s,slotClass:g.track,className:u}),style:dz(e),"aria-hidden":!0,...p,children:m??L})})}zi.displayName="SwitchTrack";function Ta({className:t,style:e,...n}){const r=af(),o=_n(),s=fz(r.color);return d.jsx("span",{ref:r.trackFillRef,"aria-hidden":!0,className:nt(tz,r.gloss&&nz,!r.color&&(r.gloss?oz:rz),o.fill,t),style:{opacity:0,...s,...e},...n})}Ta.displayName="SwitchFill";function Cf({className:t,children:e,...n}){const r=af(),o=_n();return d.jsx("span",{ref:r.thumbRef,className:nt(sz,r.gloss&&iz,o.thumb,t),...n,children:d.jsx(_a,{active:r.checked,size:r.size,gloss:r.gloss,shellRef:r.thumbShellRef,fillRef:r.thumbFillRef,className:o.thumbShell,children:e})})}Cf.displayName="SwitchThumb";function Vi({when:t,children:e,className:n,...r}){const o=af(),s=_n(),i=t==="off"?o.iconOffRef:o.iconOnRef,a=t==="on",c=t==="off"?!o.checked:o.checked;return d.jsx(Sa,{iconRef:i,size:o.size,highlighted:a,gloss:o.gloss,className:nt(az,s.icon,n),style:{opacity:c?1:0},...r,children:e})}Vi.displayName="SwitchIcon";const gS=l.forwardRef(function({className:e,children:n,...r},o){const s=va(),i=_n();return d.jsx("div",{ref:o,className:nt(H2,s.isCompound&&G2,i.content,e),...r,children:n})});gS.displayName="SwitchContent";function CS({children:t,className:e,...n}){const r=va(),o=_n(),s=$o[r.size];return d.jsx("span",{ref:i=>{r.isCompound&&r.useInlineCompoundMotion&&(r.textMotionRef.current=i)},className:nt(z2,r.isCompound&&hS(r.labelPosition),r.isCompound&&(r.hasCompoundHint||r.hasCompoundError)&&V2,r.isCompound&&r.useInlineCompoundMotion&&U2,o.label,e),...n,children:d.jsx(ee,{as:"span",variant:s.title,inheritColor:!0,className:nt($2,r.disabled&&dS,o.labelText),children:t})})}CS.displayName="SwitchLabel";function bS({children:t,className:e,variant:n,...r}){const o=va(),s=_n();return d.jsx(Xe,{as:"span",id:o.hintId,variant:n??$o[o.size].desc,className:nt(o.isCompound&&Hi(2,o.labelPosition),o.disabled&&fS,s.hint,e),...r,children:t})}bS.displayName="Switch.Hint";function xS({children:t,className:e,...n}){const r=va(),o=_n();return d.jsx(Ze,{as:"span",id:r.errorId,variant:$o[r.size].desc,className:nt(r.isCompound&&Hi(lz(r.hasCompoundHint),r.labelPosition),r.disabled&&mS,o.error,e),...n,children:t})}xS.displayName="Switch.Error";function mz({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:C}){const g=_n(),h=$o[c];return d.jsxs(d.Fragment,{children:[d.jsx(gf,{size:c,disabled:u,className:pS(f),...C}),r?d.jsxs(d.Fragment,{children:[d.jsx("span",{ref:a,className:nt(hS(f),!i&&W2,g.simpleLabelWrap,g.label),children:d.jsx(ee,{as:"span",variant:h.title,inheritColor:!0,className:nt(X2,u&&dS,g.simpleLabelText,g.labelText),children:t})}),o?d.jsx(Xe,{as:"span",id:m,variant:h.desc,className:nt(Hi(2,f),u&&fS,g.hint),children:e}):null,s?d.jsx(Ze,{as:"span",id:p,variant:h.desc,className:nt(Hi(o?3:2,f),u&&mS,g.error),children:n}):null]}):null]})}function pz({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=RH(f),p=NH(f),[,C]=l.useState(0),g=qt(t),h=g?Ae(t,"Switch.Hint"):!1,b=g?Ae(t,"Switch.Error"):!1,x=g?CH(t):!1,_=g&&hH(a),v=n!=null,y=r!=null,S=bH(g,v,y,h,b),T=g?x:e!=null,L=i,A=!L&&T&&(!g||_),E=l.useRef(null),I=$o[s];return{fieldCtx:l.useMemo(()=>({switchId:f,hintId:m,errorId:p,size:s,labelPosition:o,disabled:L,isCompound:g,hasCompoundHint:h,hasCompoundError:b,hasTextColumn:T,hintConnected:g?h:v,errorConnected:g?b:y,useInlineCompoundMotion:_,textMotionRef:E,setSqueezeToken:C}),[L,h,b,v,y,T,m,p,g,o,s,f,_]),isCompound:g,hasTextColumn:T,secondaryLines:S,sz:I,label:e,hint:n,error:r,hasHint:v,hasError:y,hintId:m,errorId:p,disabled:L,enableTextMotion:A,textColRef:E,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 C=pz({children:e,label:n,hint:r,error:o,labelPosition:s,size:i,disabled:a,className:c,...m}),{handlePointerDown:g}=yH({isDisabled:C.disabled,enableTextMotion:C.enableTextMotion,textMotionRef:C.textColRef,onPointerDown:f}),h=nt(cz({hasTextColumn:C.hasTextColumn,secondaryLines:C.secondaryLines,gap:C.sz.gap,labelPosition:C.labelPosition,slotClass:u==null?void 0:u.root,className:c}),C.disabled&&K2);return d.jsx(TH,{value:C.fieldCtx,children:d.jsx(EH,{classNames:u,children:d.jsx("label",{ref:p,className:h,onPointerDown:g,children:C.isCompound?gH(e,C.controlRest):d.jsx(mz,{label:C.label,hint:C.hint,error:C.error,hasTextColumn:C.hasTextColumn,hasHint:C.hasHint,hasError:C.hasError,secondaryLines:C.secondaryLines,textColRef:C.textColRef,size:C.fieldCtx.size,disabled:C.disabled,labelPosition:C.labelPosition,hintId:C.hintId,errorId:C.errorId,controlProps:C.controlRest})})})})});_S.displayName="SwitchRoot";const hz=Object.assign(_S,{Control:gf,Track:zi,Fill:Ta,Thumb:Cf,Icon:Vi,Content:gS,Label:CS,Hint:bS,Error:xS}),SS=l.createContext(null),nc=l.createContext({});function gz({classNames:t,children:e}){const n=l.useContext(nc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(nc.Provider,{value:r,children:e})}function La(){const t=l.useContext(SS);if(!t)throw new Error("Components Tabs must be inside <Tabs>.");return t}function bf(){return l.useContext(nc)}function Jr(...t){return R(...t)}function Cz(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 bz(t){return le[t].controlText}function vS(t){return Array.from(t.querySelectorAll('[role="tab"]:not([disabled])')).filter(e=>e instanceof HTMLButtonElement)}function xz(t,e){const n=vS(t);if(n.length===0)return null;const r=n[Math.max(0,Math.min(e,n.length-1))];return r.focus(),r}function _z(...t){return e=>{for(const n of t)typeof n=="function"?n(e):n&&(n.current=e)}}const Sz={default:"",outline:"bg-transparent border-token rounded-mid p-xsmall",secondary:"bg-secondary border-token rounded-mid p-xsmall",gloss:"border-0 p-small"},vz={default:"bg-primary",outline:"bg-secondary",secondary:"bg-tertiary",gloss:"bg-tertiary"};function yz({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 Az({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",Sz[e],n,r)}function Tz({variant:t,slotClass:e}){return Jr("pointer-events-none absolute z-0 motion-reduce:transition-none",t==="default"?"rounded-full":"rounded-mid",vz[t],e)}function Lz({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 Ez="relative z-[1] shrink-0";function Iz(t){return Jr("inline-flex origin-center items-center gap-xsmall will-change-transform",t)}function wz({slotClass:t,className:e}){return Jr("min-w-0 outline-none focus-ring",t,e)}function Rz(t){const e=getComputedStyle(t);return{borderTop:Number.parseFloat(e.borderTopWidth)||0,borderLeft:Number.parseFloat(e.borderLeftWidth)||0}}function Nz(t,e){const n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),{borderTop:o,borderLeft:s}=Rz(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 Dz(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}:Nz(t,e)}function Oz(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 Pz(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=Dz(u,m,r,o),C=de();if(f.style.opacity="1",C||a.current){V(f),Oz(f,p);return}const g=f.offsetLeft,h=f.offsetTop,b=f.offsetWidth,x=f.offsetHeight;V(f),X.fromTo(f,{left:g,top:h,width:b,height:x},{...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 AS(t,e){return`${t}-panel-${e}`}function kz({isSelected:t,isDisabled:e,panelId:n}){return{"aria-selected":t,"aria-controls":n,tabIndex:t?0:-1,disabled:e}}function Bz({isSelected:t,tabId:e}){return{"aria-labelledby":e,hidden:!t,tabIndex:t?0:-1}}function jz({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 TS=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:C,size:g,variant:h,baseId:b,disabled:x,tabElementsRef:_,notifyTabLayout:v}=La(),y=bf(),S=l.useRef(null),T=p===e,L=x||s,A=yS(b,e),E=AS(b,e),I=kz({isSelected:T,isDisabled:L,panelId:E}),w=l.useCallback(D=>{D?_.current.set(e,D):_.current.delete(e),v(),typeof m=="function"?m(D):m&&(m.current=D)},[v,m,_,e]);l.useLayoutEffect(()=>{const D=_.current;return()=>{D.delete(e),v()}},[v,_,e]);const N=l.useCallback(D=>{i==null||i(D),!(D.defaultPrevented||L)&&C(e)},[L,i,C,e]),{handlePointerEnter:O,handlePointerLeave:j,handlePointerDown:k}=jz({motionRef:S,isDisabled:L,isSelected:T,onPointerEnter:c,onPointerLeave:u,onPointerDown:a}),G=Lz({size:g,variant:h,isSelected:T,isDisabled:L,slotClass:y.tab,className:o});if(r&&l.isValidElement(n)){const D=n;return l.cloneElement(D,{...f,role:"tab",id:A,"data-tab-value":e,"aria-selected":I["aria-selected"],"aria-controls":I["aria-controls"],tabIndex:I.tabIndex,disabled:L||D.props.disabled,ref:_z(w,D.props.ref),className:Jr(D.props.className,Ez,o),onClick:P=>{var F,B;(B=(F=D.props).onClick)==null||B.call(F,P),N(P)},onPointerEnter:P=>{var F,B;(B=(F=D.props).onPointerEnter)==null||B.call(F,P),O(P)},onPointerLeave:P=>{var F,B;(B=(F=D.props).onPointerLeave)==null||B.call(F,P),j(P)},onPointerDown:P=>{var F,B;(B=(F=D.props).onPointerDown)==null||B.call(F,P),k(P)}})}return d.jsx("button",{ref:w,type:"button",role:"tab",id:A,"data-tab-value":e,"aria-selected":I["aria-selected"],"aria-controls":I["aria-controls"],tabIndex:I.tabIndex,disabled:I.disabled,className:G,onClick:N,onPointerEnter:O,onPointerLeave:j,onPointerDown:k,...f,children:d.jsx(ee,{as:"span",inheritColor:!0,ref:S,variant:bz(g),className:Iz(y.tabText),children:n})})});TS.displayName="TabsTab";const LS=l.forwardRef(function({value:e,children:n,className:r,...o},s){const{value:i,baseId:a}=La(),c=bf(),u=i===e,f=yS(a,e),m=AS(a,e),p=Bz({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:wz({slotClass:c.panel,className:r}),...o,children:n})});LS.displayName="TabsPanel";const ES=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}=La(),C=bf(),g=l.useRef(null),h=l.useRef(null),x=wo(s,u==="gloss"),_=l.useCallback(y=>{x(y),g.current=y},[x]);Pz(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 T=vS(S);if(T.length===0)return;const L=T.findIndex(N=>N===document.activeElement),A=c==="horizontal";let E=null;switch(y.key){case"ArrowRight":A&&(E=L<0?0:(L+1)%T.length);break;case"ArrowLeft":A&&(E=L<0?T.length-1:(L-1+T.length)%T.length);break;case"ArrowDown":A||(E=L<0?0:(L+1)%T.length);break;case"ArrowUp":A||(E=L<0?T.length-1:(L-1+T.length)%T.length);break;case"Home":E=0;break;case"End":E=T.length-1;break;default:return}if(E==null)return;y.preventDefault();const I=xz(S,E),w=I==null?void 0:I.dataset.tabValue;w&&a(w)},[f,r,c,a]);return d.jsxs("div",{ref:_,role:"tablist",tabIndex:f?-1:0,"aria-orientation":c,"aria-disabled":f||void 0,className:Az({orientation:c,variant:u,slotClass:C.list,className:e}),onKeyDown:v,...o,children:[d.jsx("span",{ref:h,"aria-hidden":!0,className:Tz({variant:u,slotClass:C.indicator}),style:{left:0,top:0,width:0,height:0,opacity:0}}),n]})});ES.displayName="TabsList";function Mz({value:t,defaultValue:e,onValueChange:n,orientation:r="horizontal",size:o="base",variant:s="default",disabled:i=!1}){const a=l.useId(),[c,u]=Cz(t,e),f=l.useRef(null);f.current||(f.current=new Map);const[m,p]=l.useState(0),C=l.useCallback(b=>{u(b),n==null||n(b)},[n,u]),g=l.useCallback(()=>{p(b=>b+1)},[]);return{contextValue:l.useMemo(()=>({value:c,setValue:C,orientation:r,size:o,variant:s,baseId:a,disabled:i,tabElementsRef:f,layoutEpoch:m,notifyTabLayout:g}),[c,C,r,o,s,a,i,f,m,g])}}const rc=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:C}=Mz({value:o,defaultValue:s,onValueChange:i,orientation:a,size:c,variant:u,disabled:f});return d.jsx(SS.Provider,{value:C,children:d.jsx(gz,{classNames:r,children:d.jsx("div",{ref:p,className:yz({orientation:C.orientation,slotClass:r==null?void 0:r.root,className:n}),"data-orientation":C.orientation,...m,children:e})})})});rc.displayName="Tabs";const Fz=Object.assign(rc,{Root:rc,List:ES,Tab:TS,Panel:LS}),xf=l.createContext(null),oc=l.createContext({});function Gz({value:t,children:e}){return d.jsx(xf.Provider,{value:t,children:e})}function Hz({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 Ea(){const t=l.useContext(xf);if(!t)throw new Error("Meter.* components must be inside <Meter>.");return t}function zz(){return l.useContext(xf)}function eo(){return l.useContext(oc)}function mr(...t){return R(...t)}function Vz(t,e,n){return Math.min(n,Math.max(e,t))}function Uz(t,e,n){return n<=e?0:(t-e)/(n-e)*100}function $z(t){return Number.isInteger(t)?String(t):t.toFixed(1)}function Wz(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 Xz({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 Yz={small:"h-small",base:"h-base",mid:"h-plus",large:"h-mid"},Kz={small:"w-small",base:"w-base",mid:"w-plus",large:"w-mid"},qz="relative overflow-hidden rounded-full bg-primary-tint",Zz="w-full",Qz="h-48",Jz="absolute rounded-full",eV="inset-y-0 left-0",tV="inset-x-0 bottom-0",nV="bg-primary",rV="flex items-baseline justify-between gap-xsmall",oV="w-full",sV="min-w-[8rem]",iV="tabular-nums text-muted";function aV({orientation:t,slotClass:e,className:n}){return mr(uf(t),e,n)}function lV({orientation:t,slotClass:e,className:n}){return mr(rV,t==="horizontal"?oV:sV,e,n)}function cV({slotClass:t,className:e}){return mr(iV,t,e)}function uV({isHorizontal:t,size:e,thickness:n,slotClass:r,className:o}){return mr(qz,t?Zz:Qz,n==null&&(t?Yz[e]:Kz[e]),r,o)}function dV({isHorizontal:t,hasCustomColor:e,slotClass:n}){return mr(Jz,t?eV:tV,!e&&nV,n)}function fV({isHorizontal:t,thickness:e}){if(e==null)return;const n=zs(e);return t?{height:n}:{width:n}}function mV(t){if(t)return{background:t}}function pV({isHorizontal:t,percent:e}){return t?{width:`${e}%`,height:"100%"}:{width:"100%",height:`${e}%`}}function hV({isHorizontal:t,percent:e,fillColorStyle:n}){return{width:t?`${e}%`:"100%",height:t?"100%":`${e}%`,...n}}function IS(t){return`${t}-label`}function gV({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 CV({ariaDescribedByProp:t,hintConnected:e,hintId:n,errorConnected:r,errorId:o}){return t??Ft(e?n:void 0,r?o:void 0)}function bV({value:t,min:e=0,max:n=100,size:r="base",thickness:o,color:s,formatValue:i=$z,orientation:a,"aria-describedby":c}){const u=zz(),f=a??(u==null?void 0:u.orientation)??"horizontal",m=u==null?void 0:u.meterId,p=m!=null?IS(m):void 0,C=(u==null?void 0:u.labelConnected)??!1,g=(u==null?void 0:u.hintConnected)??!1,h=(u==null?void 0:u.errorConnected)??!1,b=l.useMemo(()=>Vz(t,e,n),[n,e,t]),x=l.useMemo(()=>Uz(b,e,n),[b,n,e]),_=f==="horizontal",v=l.useMemo(()=>i(b),[b,i]),y=CV({ariaDescribedByProp:c,hintConnected:g,hintId:u==null?void 0:u.hintId,errorConnected:h,errorId:u==null?void 0:u.errorId}),S=gV({clampedValue:b,min:e,max:n,statusText:v,labelConnected:C,labelId:p,ariaDescribedBy:y}),T=l.useMemo(()=>fV({isHorizontal:_,thickness:o}),[_,o]),L=l.useMemo(()=>mV(s),[s]),A=l.useMemo(()=>pV({isHorizontal:_,percent:x}),[_,x]),E=l.useMemo(()=>hV({isHorizontal:_,percent:x,fillColorStyle:L}),[L,_,x]),I=u==null?void 0:u.setDisplay;return l.useLayoutEffect(()=>{I==null||I({clampedValue:b,statusText:v,min:e,max:n})},[b,n,e,I,v]),{size:r,thickness:o,color:s,isHorizontal:_,percent:x,aria:S,trackCrossStyle:T,fillColorStyle:L,fillTargetStyle:A,fillInitialStyle:E}}function xV({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(_f,{children:[t!=null?d.jsx(Ue,{classNames:{root:i.label},children:t}):null,n!=null?d.jsx(Ui,{children:n}):e?d.jsx(Ui,{}):null]}):null,s.value!=null?d.jsx(yf,{...s,value:s.value}):null,r!=null?d.jsx(Sf,{children:r}):null,o!=null?d.jsx(vf,{children:o}):null]})}function wS({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})}wS.displayName="MeterLabel";function _f({children:t,className:e,...n}){const{orientation:r}=Ea(),o=eo();return d.jsx("div",{className:lV({orientation:r,slotClass:o.header,className:e}),...n,children:t})}_f.displayName="Meter.Header";function Ui({children:t,className:e,...n}){const{display:r}=Ea(),o=eo(),s=t??(r==null?void 0:r.statusText);return s==null?null:d.jsx(ee,{as:"span",variant:"base",className:cV({slotClass:o.value,className:e}),...n,children:s})}Ui.displayName="Meter.Value";function Sf({children:t,className:e,id:n,...r}){const o=Ea(),s=eo();return d.jsx(Xe,{id:n??o.hintId,className:mr(s.hint,e),...r,children:t})}Sf.displayName="Meter.Hint";function vf({children:t,className:e,id:n,...r}){const o=Ea(),s=eo();return d.jsx(Ze,{id:n??o.errorId,className:mr(s.error,e),...r,children:t})}vf.displayName="Meter.Error";const yf=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 C=eo(),{size:g,isHorizontal:h,aria:b,trackCrossStyle:x,fillTargetStyle:_,fillInitialStyle:v}=bV({value:e,min:n,max:r,size:o,thickness:s,color:i,formatValue:a,orientation:c,"aria-describedby":f}),{fillRef:y}=Xz({fillTargetStyle:_,isHorizontal:h});return d.jsx("div",{ref:p,role:"meter","aria-valuenow":b["aria-valuenow"],"aria-valuemin":b["aria-valuemin"],"aria-valuemax":b["aria-valuemax"],"aria-valuetext":b["aria-valuetext"],"aria-labelledby":b["aria-labelledby"],"aria-describedby":b["aria-describedby"],"aria-label":b["aria-label"],className:uV({isHorizontal:h,size:g??"base",thickness:s,slotClass:C.track,className:u}),style:x,...m,children:d.jsx("span",{ref:y,"aria-hidden":!0,className:dV({isHorizontal:h,hasCustomColor:!!i,slotClass:C.fill}),style:v})})});yf.displayName="Meter.Track";function _V({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:C,formatValue:g}){const h=l.useId(),b=e??`meter-${h}`,x=Yt(b),_=Kt(b),v=IS(b),[y,S]=l.useState(null),T=l.useCallback(j=>{S(k=>Wz(k,j)?k:j)},[]),L=qt(t),A=r!=null||L&&Ae(t,"Label"),E=i!=null||L&&Ae(t,"Meter.Hint"),I=a!=null||L&&Ae(t,"Meter.Error"),w=l.useMemo(()=>({meterId:b,hintId:x,errorId:_,hintConnected:E,errorConnected:I,labelConnected:A,orientation:n,display:y,setDisplay:T}),[y,_,I,E,A,x,b,n,T]),N=l.useMemo(()=>({labelId:v}),[v]);return{meterId:b,isCompound:L,fieldCtx:w,fieldLabelCtx:N,trackProps:{value:c,min:u,max:f,size:m,thickness:p,color:C,formatValue:g,orientation:n},label:r,showValue:o,valueText:s,hint:i,error:a}}function RS({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:C,thickness:g,color:h,formatValue:b,...x}){const _=_V({children:t,id:r,orientation:o,label:s,showValue:i,valueText:a,hint:c,error:u,value:f,min:m,max:p,size:C,thickness:g,color:h,formatValue:b}),v=_.isCompound?t:d.jsx(xV,{label:_.label,showValue:_.showValue,valueText:_.valueText,hint:_.hint,error:_.error,trackProps:_.trackProps});return d.jsx(Gz,{value:_.fieldCtx,children:d.jsx(Hz,{classNames:n,children:d.jsx(Xt.Provider,{value:_.fieldLabelCtx,children:d.jsx(pn,{id:_.meterId,className:aV({orientation:_.fieldCtx.orientation,slotClass:n==null?void 0:n.root,className:e}),...x,children:v})})})})}RS.displayName="Meter";const SV=Object.assign(RS,{Header:_f,Label:wS,Value:Ui,Hint:Sf,Error:vf,Track:yf}),Af=l.createContext(null),sc=l.createContext({});function vV({value:t,children:e}){return d.jsx(Af.Provider,{value:t,children:e})}function yV({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 Ia(){const t=l.useContext(Af);if(!t)throw new Error("ProgressBar.* components must be inside <ProgressBar>.");return t}function AV(){return l.useContext(Af)}function to(){return l.useContext(sc)}const TV=1500,LV="expo.inOut";function Hn(...t){return R(...t)}function EV(t,e,n){return Math.min(n,Math.max(e,t))}function IV(t,e,n){return n<=e?0:(t-e)/(n-e)*100}function wV(t){return Number.isInteger(t)?String(t):t.toFixed(1)}function RV(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 NV({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,...NL(),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:TV/1e3,ease:LV,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 DV={small:"h-small",base:"h-base",mid:"h-plus",large:"h-mid"},OV={small:"w-small",base:"w-base",mid:"w-plus",large:"w-mid"},PV="relative overflow-hidden rounded-full bg-primary-tint",kV="w-full",BV="h-48",jV="absolute rounded-full",MV="inset-y-0 left-0",FV="inset-x-0 bottom-0",NS="bg-primary",GV="absolute rounded-full will-change-transform",HV="inset-y-0 left-0 w-1/4",zV="inset-x-0 bottom-0 h-1/4",VV="left-1/4 w-1/2",UV="bottom-1/4 h-1/2",$V="flex items-baseline justify-between gap-xsmall",WV="w-full",XV="min-w-[8rem]",YV="tabular-nums text-muted";function KV({orientation:t,slotClass:e,className:n}){return Hn(uf(t),e,n)}function qV({orientation:t,slotClass:e,className:n}){return Hn($V,t==="horizontal"?WV:XV,e,n)}function ZV({slotClass:t,className:e}){return Hn(YV,t,e)}function QV({isHorizontal:t,size:e,thickness:n,slotClass:r,className:o}){return Hn(PV,t?kV:BV,n==null&&(t?DV[e]:OV[e]),r,o)}function JV({isHorizontal:t,hasCustomColor:e,slotClass:n}){return Hn(jV,t?MV:FV,!e&&NS,n)}function eU({isHorizontal:t,hasCustomColor:e,reduceMotion:n,slotClass:r}){return Hn(GV,t?HV:zV,!e&&NS,n&&(t?VV:UV),r)}function tU({isHorizontal:t,thickness:e}){if(e==null)return;const n=zs(e);return t?{height:n}:{width:n}}function nU(t){if(t)return{background:t}}function rU({isHorizontal:t,percent:e}){return t?{width:`${e}%`,height:"100%"}:{width:"100%",height:`${e}%`}}function oU({isHorizontal:t,fillColorStyle:e}){return{...t?{height:"100%"}:{width:"100%"},...e}}const sU="Loading…";function DS(t){return`${t}-label`}function iU({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 aU({ariaDescribedByProp:t,hintConnected:e,hintId:n,errorConnected:r,errorId:o}){return t??Ft(e?n:void 0,r?o:void 0)}function lU({value:t=0,indeterminate:e=!1,min:n=0,max:r=100,size:o="base",thickness:s,color:i,formatValue:a=wV,orientation:c,"aria-describedby":u}){const f=AV(),m=c??(f==null?void 0:f.orientation)??"horizontal",p=f==null?void 0:f.progressId,C=p!=null?DS(p):void 0,g=(f==null?void 0:f.hintConnected)??!1,h=(f==null?void 0:f.errorConnected)??!1,b=l.useMemo(()=>EV(t,n,r),[r,n,t]),x=l.useMemo(()=>IV(b,n,r),[b,r,n]),_=m==="horizontal",v=l.useMemo(()=>e?sU:a(b),[b,a,e]),y=aU({ariaDescribedByProp:u,hintConnected:g,hintId:f==null?void 0:f.hintId,errorConnected:h,errorId:f==null?void 0:f.errorId}),S=iU({clampedValue:b,min:n,max:r,statusText:v,indeterminate:e,labelId:C,ariaDescribedBy:y}),T=l.useMemo(()=>tU({isHorizontal:_,thickness:s}),[_,s]),L=l.useMemo(()=>nU(i),[i]),A=l.useMemo(()=>rU({isHorizontal:_,percent:x}),[_,x]),E=f==null?void 0:f.setDisplay;return l.useLayoutEffect(()=>{E==null||E({clampedValue:b,statusText:v,min:n,max:r,indeterminate:e})},[b,e,r,n,E,v]),{size:o,thickness:s,color:i,indeterminate:e,isHorizontal:_,aria:S,trackCrossStyle:T,fillColorStyle:L,fillTargetStyle:A}}function cU({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(Tf,{children:[t!=null?d.jsx(Ue,{classNames:{root:i.label},children:t}):null,n!=null?d.jsx($i,{children:n}):e?d.jsx($i,{}):null]}):null,d.jsx(If,{...s}),r!=null?d.jsx(Lf,{children:r}):null,o!=null?d.jsx(Ef,{children:o}):null]})}function OS({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})}OS.displayName="ProgressBarLabel";function Tf({children:t,className:e,...n}){const{orientation:r}=Ia(),o=to();return d.jsx("div",{className:qV({orientation:r,slotClass:o.header,className:e}),...n,children:t})}Tf.displayName="ProgressBar.Header";function $i({children:t,className:e,...n}){const{display:r}=Ia(),o=to(),s=t??(r==null?void 0:r.statusText);return s==null?null:d.jsx(ee,{as:"span",variant:"base",className:ZV({slotClass:o.value,className:e}),...n,children:s})}$i.displayName="ProgressBar.Value";function Lf({children:t,className:e,id:n,...r}){const o=Ia(),s=to();return d.jsx(Xe,{id:n??o.hintId,className:Hn(s.hint,e),...r,children:t})}Lf.displayName="ProgressBar.Hint";function Ef({children:t,className:e,id:n,...r}){const o=Ia(),s=to();return d.jsx(Ze,{id:n??o.errorId,className:Hn(s.error,e),...r,children:t})}Ef.displayName="ProgressBar.Error";const If=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},C){const g=to(),{size:h,indeterminate:b,isHorizontal:x,aria:_,trackCrossStyle:v,fillColorStyle:y,fillTargetStyle:S}=lU({value:e,indeterminate:n,min:r,max:o,size:s,thickness:i,color:a,formatValue:c,orientation:u,"aria-describedby":m}),{fillRef:T,reduceMotion:L}=NV({indeterminate:b,fillTargetStyle:S,isHorizontal:x});return d.jsx("div",{ref:C,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:QV({isHorizontal:x,size:h??"base",thickness:i,slotClass:g.track,className:f}),style:v,...p,children:b?d.jsx("span",{ref:T,"aria-hidden":!0,className:eU({isHorizontal:x,hasCustomColor:!!a,reduceMotion:L,slotClass:g.indeterminateFill}),style:y}):d.jsx("span",{ref:T,"aria-hidden":!0,className:JV({isHorizontal:x,hasCustomColor:!!a,slotClass:g.fill}),style:oU({isHorizontal:x,fillColorStyle:y})})})});If.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:C,color:g,formatValue:h}){const b=l.useId(),x=e??`progress-${b}`,_=Yt(x),v=Kt(x),y=DS(x),[S,T]=l.useState(null),L=l.useCallback(j=>{T(k=>RV(k,j)?k:j)},[]),A=qt(t),E=i!=null||A&&Ae(t,"ProgressBar.Hint"),I=a!=null||A&&Ae(t,"ProgressBar.Error"),w=l.useMemo(()=>({progressId:x,hintId:_,errorId:v,hintConnected:E,errorConnected:I,orientation:n,display:S,setDisplay:L}),[S,v,I,E,_,n,x,L]),N=l.useMemo(()=>({labelId:y}),[y]);return{progressId:x,isCompound:A,fieldCtx:w,fieldLabelCtx:N,trackProps:{value:c,indeterminate:u,min:f,max:m,size:p,thickness:C,color:g,formatValue:h,orientation:n},label:r,showValue:o,valueText:s,hint:i,error:a}}function PS({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:C,size:g,thickness:h,color:b,formatValue:x,..._}){const v=uU({children:t,id:r,orientation:o,label:s,showValue:i,valueText:a,hint:c,error:u,value:f,indeterminate:m,min:p,max:C,size:g,thickness:h,color:b,formatValue:x}),y=v.isCompound?t:d.jsx(cU,{label:v.label,showValue:v.showValue,valueText:v.valueText,hint:v.hint,error:v.error,trackProps:v.trackProps});return d.jsx(vV,{value:v.fieldCtx,children:d.jsx(yV,{classNames:n,children:d.jsx(Xt.Provider,{value:v.fieldLabelCtx,children:d.jsx(pn,{id:v.progressId,className:KV({orientation:v.fieldCtx.orientation,slotClass:n==null?void 0:n.root,className:e}),..._,children:y})})})})}PS.displayName="ProgressBar";const dU=Object.assign(PS,{Header:Tf,Label:OS,Value:$i,Hint:Lf,Error:Ef,Track:If});function On(...t){return R(...t)}function fU(t,e){return t||e}function mU(t){return!!(t.onClick||t.onKeyDown||t.onPointerDown)}function pU({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,C=l.useMemo(()=>Mt(f,e),[e]),g=l.useCallback(T=>{C(T),f.current=T,dt(u,T)},[C,u]),h=No(f,p,{pointerInsideRef:m}),b=Qc(f,t&&!e,{pointerInsideRef:m});l.useEffect(()=>{if(t)return;const T=f.current;T&&V(T),m.current=!1},[t]);const x=l.useCallback(T=>{if(i==null||i(T),!t||!n||T.defaultPrevented||de())return;const L=f.current;if(L){if(e){Ro(L,m.current);return}We(L,{pointerInside:m.current,shadow:b.shadow})}},[n,e,i,t,b.shadow]),_=l.useCallback(T=>{o==null||o(T),!(!t||T.defaultPrevented)&&(r==null||r(T))},[o,r,t]),v=l.useCallback(T=>{s==null||s(T)},[s]),y=l.useCallback(T=>{a==null||a(T),!(!t||T.defaultPrevented||!n)&&(e?h.onPointerOver(T):b.onPointerOver(T))},[n,h,e,a,t,b]),S=l.useCallback(T=>{c==null||c(T),!(!t||!n)&&(e?h.onPointerOut(T):b.onPointerOut(T))},[n,h,e,c,t,b]);return{setRootRef:g,pressableLiftMotionClass:b.motionClass,handlePointerDown:x,handleClick:_,handleKeyDown:v,onPointerOver:y,onPointerOut:S,onPointerDownProp:i,onClickProp:o,onKeyDownProp:s}}function hU(){return"h3"}const ic=l.createContext({});function gU({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 no(){return l.useContext(ic)}const CU={default:"bg-surface border-token",outline:"bg-transparent border-token",secondary:"bg-secondary border-token"},bU="shadow-token-base",xU="gloss-panel flex min-w-0 flex-col rounded-mid text-foreground outline-none",_U="gloss-content flex min-w-0 flex-1 flex-col",SU="flex min-w-0 flex-col overflow-hidden rounded-mid text-foreground outline-none",vU="relative cursor-pointer focus-ring",li="w-full border-0 p-0 text-left",yU="relative flex min-w-0 flex-1 flex-col",AU="flex shrink-0 flex-col gap-small py-plus px-large text-left",TU="flex min-w-0 flex-1 flex-col gap-xsmall text-left",LU="min-w-0 px-large pb-mid",EU="min-w-0",IU="min-w-0 text-muted",wU="mt-auto border-t-token py-plus px-large text-muted";function RU(t){return R(xU,Io,t)}function NU(t){return t?R(nn,"cursor-pointer focus-ring"):""}function DU(t,e,n,r){return R(SU,e&&R(vU,n),Io,CU[t],!e&&bU,r)}function OU({className:t="",...e}){const n=no();return d.jsx("div",{className:On(AU,n.header,t),...e})}function PU({className:t="",...e}){const n=no();return d.jsx("div",{className:On(TU,n.headingBlock,t),...e})}function kU({className:t="",...e}){const n=no();return d.jsx("div",{className:On(LU,n.body,t),...e})}const kS=l.forwardRef(function({className:e="",...n},r){const o=no();return d.jsx(ee,{ref:r,as:hU(),variant:"base",className:On(EU,o.title,e),...n})}),BS=l.forwardRef(function({className:e="",...n},r){const o=no();return d.jsx(ee,{ref:r,as:"p",variant:"base",className:On(IU,o.description,e),...n})});function BU({className:t="",...e}){const n=no();return d.jsx("div",{className:On(wU,n.footer,t),...e})}function jU({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 C=no();if(e){const g=d.jsx("div",{className:R(_U,C.glossContent),children:a});return t?d.jsx("button",{type:"button",...i,ref:s,className:R(li,r,NU(t)),onPointerOver:c,onPointerOut:u,onPointerDown:f,onClick:m,onKeyDown:p,children:g}):n?d.jsx("button",{type:"button",...i,ref:s,className:R(li,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(li,o),onPointerOver:c,onPointerOut:u,onPointerDown:f,onClick:m,onKeyDown:p,children:d.jsx("div",{className:On(yU,C.content),children:a})}):n?d.jsx("button",{type:"button",...i,ref:s,className:R(li,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})}kS.displayName="CardTitle";BS.displayName="CardDescription";function MU({variant:t="default",pressable:e=!1,onClick:n,onKeyDown:r,onPointerDown:o}){const s=t==="gloss",i=e&&s,a=fU(e,mU({onClick:n,onKeyDown:r,onPointerDown:o}));return{variant:t,pressable:e,isGloss:s,glossPressable:i,renderAsButton:a}}const jS=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,...C},g){const h=MU({variant:n,pressable:r,onClick:f,onKeyDown:m,onPointerDown:u}),b=pU({pressable:r,isGloss:h.isGloss,animated:o,onPress:i,onClick:f,onKeyDown:m,onPointerDown:u,onPointerOver:a,onPointerOut:c,forwardedRef:g}),x=RU(On(s==null?void 0:s.root,e)),_=h.isGloss?"":DU(h.variant,r,b.pressableLiftMotionClass,On(s==null?void 0:s.root,e));return d.jsx(gU,{classNames:s,children:d.jsx(jU,{pressable:r,isGloss:h.isGloss,renderAsButton:h.renderAsButton,glossPanelClass:x,rootClassName:_,setRootRef:b.setRootRef,rest:C,onPointerOver:b.onPointerOver,onPointerOut:b.onPointerOut,onPointerDown:r?b.handlePointerDown:b.onPointerDownProp,onClick:r?b.handleClick:b.onClickProp,onKeyDown:r?b.handleKeyDown:b.onKeyDownProp,children:p})})});jS.displayName="Card";const FU=Object.assign(jS,{Header:OU,HeadingBlock:PU,Title:kS,Description:BS,Body:kU,Footer:BU}),MS=l.createContext(null),FS=l.createContext("top"),ac=l.createContext(null),lc=l.createContext({});function GU({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 pr(){return l.useContext(lc)}function wf(t){const e=l.useContext(MS);if(!e)throw new Error(`${t} must be used inside <Tooltip>.`);return e}function HU(){return l.useContext(FS)}function Rf(t){const e=l.useContext(ac);if(!e)throw new Error(`${t} must be inside <Tooltip.Panel> or <Tooltip.Content>.`);return e}function zU(t,e,n){return n?t?t.split(/\s+/).includes(e)?t:`${t} ${e}`:e:t}function pp(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 VU=new Set(["TooltipIndicator","TooltipIcon","TooltipTitle","TooltipDescription","TooltipMessage"]);function wa(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 UU(t){return wa(t,e=>e!=null&&VU.has(e))}function $U(t){return wa(t,e=>e==="TooltipTitle")}function WU(t){return wa(t,e=>e==="TooltipDescription")}function XU(t){return wa(t,e=>e==="TooltipIndicator"||e==="TooltipIcon")}function GS(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),GS(n.props.children,e)}}function YU(t,e,n,r){return n===!1||r===null?!1:r!==void 0||e!=null?!0:Nf(t)}function KU(t,e,n,r){if(!XU(t))return!1;let o=!1;return GS(t,s=>{YU(e,n,s.showIcon??r,s.children)&&(o=!0)}),o}function Nf(t){return t==="danger"||t==="success"||t==="info"||t==="warning"}function qU(t,e,n,r,o){return n===!1?!1:r?KU(o,t,e,n):e!=null?!0:Nf(t)}function ZU({variant:t,icon:e,showIcon:n,title:r,description:o,isCompound:s,children:i}){const a=r!=null||(s?$U(i):i!=null&&o==null),c=o!=null||s&&WU(i);return{hasIndicator:qU(t,e,n,s,i),hasTitle:a,hasDescription:c,hasAction:!1,hasClose:!1}}function QU(...t){return e=>{for(const n of t)typeof n=="function"?n(e):n&&(n.current=e)}}function hp(t){return t.type.displayName==="TooltipArrow"}function JU({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?aa(o):n(!1),()=>{i=!0};if(V(o),t)return la({surface:o,vars:{...xo(),overwrite:"auto"}}),()=>{i=!0,V(o)};const a=ca({surface:o,vars:{...xo(),overwrite:"auto"},onComplete:()=>{i||n(!1)}});return()=>{i=!0,V(o),a.kill()}},[t,e,n,r])}const e$=8,HS={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"},zS={small:"max-w-[12rem] p-small",base:"max-w-[16rem] p-base",mid:"max-w-xs p-plus",large:"max-w-sm p-mid"},t$={small:"tools",base:"small",mid:"base",large:"mid"},n$={small:"tools",base:"tools",mid:"small",large:"base"},r$={small:"icon-small",base:"icon-base",mid:"icon-mid",large:"icon-large"},o$={small:"[&_svg]:icon-small",base:"[&_svg]:icon-base",mid:"[&_svg]:icon-mid",large:"[&_svg]:icon-large"},VS={default:"text-foreground",outline:"text-foreground",secondary:"text-secondary-foreground",danger:"text-danger",success:"text-success",info:"text-info",warning:"text-warning"},US={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"},s$="inline-flex shrink-0",i$="inline-flex shrink-0 [&_svg]:shrink-0",a$="text-muted",l$="pointer-events-none absolute z-0 size-2 rotate-45",c$="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",d$="relative overflow-visible",f$="gloss-panel gloss-deep relative z-[1] w-max min-w-0 origin-center overflow-hidden rounded-mid text-left text-foreground",m$="gloss-content",p$="contents",h$="relative z-[1] w-max min-w-0 rounded-mid text-left animate-shadow";function g$({size:t,slotClass:e,className:n}){return Wt(f$,nn,zS[t],e,n)}function C$({gridSlots:t,size:e,slotClass:n}){return Wt(Go(t,US[e]),m$,n)}function b$({variant:t,surface:e,size:n,gridSlots:r,slotClass:o,className:s}){return e==="gloss"?g$({size:n,slotClass:o,className:s}):Wt(Go(r,US[n]),h$,HS[t],zS[n],o,s)}function x$({variant:t,surface:e,resolvedSide:n,slotClass:r,className:o}){return Wt(l$,e==="gloss"?c$:HS[t],lC[n],r,o)}function _$({resolvedSide:t,showArrow:e,slotClass:n,className:r}){return Wt(u$,e&&cC[t],n,r)}function S$({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(!Nf(t))return null;const s=cd[t];return d.jsx(s,{"aria-hidden":!0,className:Wt("shrink-0",r$[e],VS[t])})}function v$(t,e,n,r){return e!=null||n!=null?d.jsxs(d.Fragment,{children:[r.hasIndicator?d.jsx(mo,{}):null,e!=null?d.jsx(Wi,{children:e}):null,n!=null?d.jsx(Df,{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(Wi,{children:t})]}):l.isValidElement(t)?d.jsxs(d.Fragment,{children:[r.hasIndicator?d.jsx(mo,{}):null,d.jsx("div",{className:Ho(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}=Rf("Tooltip.Indicator"),f=S$({variant:s,size:i,showIcon:n??c,icon:a,children:e});return f==null?null:d.jsx("span",{className:Wt(i$,o$[i],VS[s],Rr(u),o.indicator,o.icon,t),...r,children:f})}mo.displayName="TooltipIndicator";function $S(t){return d.jsx(mo,{...t})}$S.displayName="TooltipIcon";function WS({className:t,...e}){const n=pr();return d.jsx("div",{className:Wt(p$,n.message,t),...e})}WS.displayName="TooltipMessage";function Wi({className:t,...e}){const n=pr(),{size:r,gridSlots:o}=Rf("Tooltip.Title");return d.jsx(ee,{as:"div",variant:t$[r],className:Wt(Ho(o),n.title,t),...e})}Wi.displayName="TooltipTitle";function Df({className:t,...e}){const n=pr(),{size:r,gridSlots:o}=Rf("Tooltip.Description");return d.jsx(ee,{as:"div",variant:n$[r],className:Wt(a$,Ds(o),n.description,t),...e})}Df.displayName="TooltipDescription";function Of({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",C=c!=null&&UU(c),g=l.useMemo(()=>ZU({variant:t,icon:r,showIcon:o,title:s,description:i,isCompound:C,children:c}),[c,i,r,C,o,s,t]),h=l.useMemo(()=>({variant:t,size:n,icon:r,showIcon:o,gridSlots:g}),[g,r,o,n,t]),b=C?c:v$(c,s,i,g),x=b$({variant:t,surface:e,size:n,gridSlots:g,slotClass:m.panel,className:a});return p?d.jsx(ac.Provider,{value:h,children:d.jsx("div",{ref:u,className:x,...f,children:d.jsx("div",{className:C$({gridSlots:g,size:n,slotClass:m.glossContent}),children:b})})}):d.jsx(ac.Provider,{value:h,children:d.jsx("div",{className:x,...f,children:b})})}Of.displayName="TooltipPanel";const XS=l.forwardRef(function({className:e,children:n,onPointerEnter:r,onPointerLeave:o,onFocus:s,onBlur:i,...a},c){const u=pr(),{scheduleShow:f,hide:m,tooltipId:p,open:C,triggerRef:g}=wf("Tooltip.Trigger"),h=l.useMemo(()=>({onPointerEnter:()=>f(),onPointerLeave:()=>m(),onFocus:()=>f(),onBlur:()=>m()}),[m,f]),b=l.useCallback(_=>{g.current=_,typeof c=="function"?c(_):c&&(c.current=_)},[c,g]),x=l.Children.count(n)===1&&l.isValidElement(n)?n:null;if(x){const _=x;return l.cloneElement(_,{...pp(h,{onPointerEnter:r,onPointerLeave:o,onFocus:s,onBlur:i}),className:Wt(u.root,u.trigger,_.props.className,e),"aria-describedby":zU(_.props["aria-describedby"],p,C),ref:QU(_.props.ref,b)})}return d.jsx("span",{ref:b,className:Wt(s$,u.root,u.trigger,e),"aria-describedby":C?p:void 0,tabIndex:a.tabIndex??0,...pp(h,{onPointerEnter:r,onPointerLeave:o,onFocus:s,onBlur:i}),...a,children:n})});XS.displayName="TooltipTrigger";function Pf({className:t,...e}){const n=pr(),r=HU(),{variant:o,surface:s}=wf("Tooltip.Arrow");return d.jsx("span",{"aria-hidden":!0,className:x$({variant:o,surface:s,resolvedSide:r,slotClass:n.arrow,className:t}),...e})}Pf.displayName="TooltipArrow";const YS=l.forwardRef(function({className:e,children:n,showArrow:r=!1,offset:o=e$,...s},i){const a=pr(),{open:c,tooltipId:u,variant:f,surface:m,size:p,side:C,icon:g,showIcon:h,triggerRef:b}=wf("Tooltip.Content"),x=l.useRef(null),_=l.useRef(null),v=m==="gloss",y=l.useMemo(()=>Mt(_,v),[v]),[S,T]=l.useState(!1),[L,A]=l.useState(C),E=l.useCallback(D=>{x.current=D,dt(i,D)},[i]),I=l.Children.toArray(n),w=I.find(D=>l.isValidElement(D)&&hp(D)),N=I.filter(D=>!(l.isValidElement(D)&&hp(D))),O=l.useCallback(()=>{const D=b.current,P=x.current;if(!D||!P)return;const F=aC(D.getBoundingClientRect(),P.getBoundingClientRect(),C,o);A(F.resolvedSide),P.style.position="fixed",P.style.left=`${F.left}px`,P.style.top=`${F.top}px`,P.style.transform=""},[o,C,b]);if(l.useLayoutEffect(()=>{c&&T(!0)},[c]),Zc(x,!v,Cn),l.useLayoutEffect(()=>{if(!c)return;O();const D=window.requestAnimationFrame(()=>O()),P=()=>O();return window.addEventListener("scroll",P,!0),window.addEventListener("resize",P),()=>{window.cancelAnimationFrame(D),window.removeEventListener("scroll",P,!0),window.removeEventListener("resize",P)}},[c,O,n,r,o]),JU({open:c,portalMounted:S,setPortalMounted:T,tipRef:x}),!S||typeof document>"u")return null;const j=jo(b.current),k=d.jsx(Of,{variant:f,surface:m,size:p,icon:g,showIcon:h,glossPanelRef:y,children:N.length===1?N[0]:N}),G=d.jsx(FS.Provider,{value:L,children:d.jsx("div",{ref:E,...j,role:"tooltip",id:u,"data-side":L,className:_$({resolvedSide:L,showArrow:r,slotClass:a.content,className:e}),...s,children:d.jsxs("div",{className:d$,children:[r?w??d.jsx(Pf,{}):null,k]})})});return Or.createPortal(G,document.body)});YS.displayName="TooltipContent";function y$({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)},[]),C=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 b=x=>{x.key==="Escape"&&g()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[g,a]),{contextValue:l.useMemo(()=>({open:a,tooltipId:m,variant:e,surface:n,size:t,side:o,icon:s,showIcon:i,triggerRef:u,scheduleShow:C,hide:g}),[g,s,a,C,i,o,t,n,m,e])}}function KS({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}=y$({size:n,variant:r,surface:o,delayShowMs:s,side:i,icon:a,showIcon:c});return d.jsx(GU,{classNames:e,children:d.jsx(MS.Provider,{value:u,children:t})})}KS.displayName="TooltipRoot";const xi=Object.assign(KS,{Trigger:XS,Content:YS,Arrow:Pf,Panel:Of,Indicator:mo,Icon:$S,Message:WS,Title:Wi,Description:Df}),qS=l.createContext(null),cc=l.createContext({});function ZS(t){const e=l.useContext(qS);if(!e)throw new Error(`${t} must be used inside <Avatar>`);return e}function QS({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 Wo(){return l.useContext(cc)}function A$(t){const e=t==null?void 0:t.trim();if(!e)return"?";const n=[...e][0];return n?n.toLocaleUpperCase():"?"}function T$(t){return t??"default"}function L$(t){return t??"base"}function E$(t){return(t==null?void 0:t.trim())||void 0}function I$(t){return!!(t!=null&&t.trim())}function w$(t){return t??"group"}function R$(t){return(t==null?void 0:t.trim())||void 0}function N$(){return"group"}const D$=!0,gp=-10,Cp=1.08;function O$(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,...Jh(),overwrite:"auto"})},[e,t])}function P$(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(${gp}px) scale(${Cp})`;return}X.to(o,{y:gp,scale:Cp,...ve(),overwrite:"auto"})}},[e,t]);return l.useEffect(()=>{const o=t.current;return()=>{o&&V(o)}},[t]),{applyLift:r,applyRest:n}}const uc={small:{root:"avatar-size-small"},base:{root:"avatar-size-base"},mid:{root:"avatar-size-mid"},large:{root:"avatar-size-large"}},k$={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 JS(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",uc[t].root),!e&&n)}function B$(t,e){return R("gloss-wrap inline-flex shrink-0 rounded-full",uc[t].root,e)}const j$="gloss-shadow rounded-full";function M$(t,e){return R("absolute inset-0 z-[1] size-full object-cover",!t&&"pointer-events-none",e)}function F$(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 G$(t){return R("flex flex-row flex-nowrap items-center text-left",t)}function H$(t,e){return R("relative inline-flex will-change-transform",t>0&&"-ml-plus",e)}const z$="center bottom",kf=l.forwardRef(function({className:e="",onLoad:n,onError:r,...o},s){const{imageStatus:i,onImageLoad:a,onImageError:c}=ZS("Avatar.Image"),u=Wo(),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]),C=l.useCallback(h=>{r==null||r(h),h.defaultPrevented||c()},[r,c]),g=i==="loaded";return O$(g,f),d.jsx("img",{ref:m,className:M$(g,R(u.image,e)),alt:o.alt??"",onLoad:p,onError:C,...o})});kf.displayName="AvatarImage";const Bf=l.forwardRef(function({className:e="",children:n,...r},o){const{label:s,imageStatus:i,size:a}=ZS("Avatar.Fallback"),c=Wo(),u=i!=="loaded",m=n!=null&&n!==!1&&n!==""?n:A$(s),p=k$[a];return d.jsx("span",{ref:o,className:F$(u,R(c.fallback,e)),"aria-hidden":D$,...r,children:d.jsx(ee,{as:"span",variant:p.variant,inheritColor:!0,className:p.className,children:m})})});Bf.displayName="AvatarFallback";function V$({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(Bf,{})]})}const ev=l.forwardRef(function({className:e="",classNames:n,children:r,...o},s){const i=Wo(),a=l.Children.toArray(r).filter(l.isValidElement);return d.jsx(QS,{classNames:n,children:d.jsx("div",{ref:s,role:N$(),className:G$(R(i.group,e)),...o,children:a.map((c,u)=>d.jsx(U$,{stackIndex:u,children:c},c.key??u))})})});ev.displayName="AvatarGroup";function U$({stackIndex:t,children:e}){const n=l.useRef(null),r=Wo(),{applyLift:o,applyRest:s}=P$(n);return d.jsx("div",{ref:n,style:{transformOrigin:z$},className:H$(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=Wo();return d.jsx("div",{ref:i,role:r,className:JS(e,!1,R(a.root,n)),...s,children:o})});tv.displayName="AvatarDefaultShell";const nv=l.forwardRef(function({size:e,className:n,role:r,children:o,...s},i){const a=Wo(),{"aria-label":c,...u}=s;return d.jsxs("div",{ref:i,className:B$(e,a.glossWrap),...u,children:[d.jsx("div",{className:j$,"aria-hidden":!0}),d.jsx("div",{role:r,className:JS(e,!0,R(a.root,n)),"aria-label":c,children:o})]})});nv.displayName="AvatarGlossShell";function $$({variant:t,size:e,label:n,nickname:r,tooltipSize:o="base",tooltipVariant:s="default",tooltipSide:i="top",children:a,role:c}){const u=T$(t),f=L$(e),[m,p]=l.useState("idle"),C=l.useCallback(()=>{p("loaded")},[]),g=l.useCallback(()=>{p("error")},[]),h=l.useMemo(()=>({size:f,label:n,imageStatus:m,onImageLoad:C,onImageError:g}),[f,n,m,C,g]),b=qt(a),x=I$(n),_=E$(r),v=u==="gloss",y=w$(c),S=R$(n);return{variant:u,size:f,ctx:h,isCompound:b,hasLabel:x,isGloss:v,rootRole:y,ariaLabel:S,tooltip:_?{size:o,variant:s,side:i,content:_}:null}}const rv=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:C,role:g,...h},b){const{size:x,ctx:_,isCompound:v,isGloss:y,rootRole:S,ariaLabel:T,tooltip:L}=$$({variant:e,size:n,label:r,nickname:a,tooltipSize:c,tooltipVariant:u,tooltipSide:f,children:C,role:g}),E={size:x,className:p,role:S,"aria-label":T,children:v?C:d.jsx(V$,{src:o,alt:s,loading:i}),...h},I=y?d.jsx(nv,{ref:b,...E}):d.jsx(tv,{ref:b,...E}),w=L?d.jsxs(xi,{size:L.size,variant:L.variant,side:L.side,children:[d.jsx(xi.Trigger,{children:I}),d.jsx(xi.Content,{children:L.content})]}):I;return d.jsx(qS.Provider,{value:_,children:d.jsx(QS,{classNames:m,children:w})})});rv.displayName="AvatarRoot";const W$=Object.assign(rv,{Image:kf,Fallback:Bf}),ov=l.createContext(!0),dc=l.createContext({});function X$({collapse:t,children:e}){return d.jsx(ov.Provider,{value:t,children:e})}function sv(){return l.useContext(ov)}function iv({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 Xo(){return l.useContext(dc)}const Y$="Breadcrumbs";function K$(t){return t??Y$}function q$(t){return`Show ${t} hidden sections`}const Z$="Hidden sections",Q$="Breadcrumbs.Item",J$="Breadcrumbs.List";function av(t){if(l.isValidElement(t))return t.type.displayName}function lv(t){return l.isValidElement(t)?t.props.children:null}function cv(t,e){return l.Children.toArray(t).some(n=>l.isValidElement(n)?av(n)===e?!0:cv(lv(n),e):!1)}function uv(t,e){l.Children.forEach(t,n=>{if(l.isValidElement(n)){if(av(n)===Q$){const r=n.props;e.push({label:r.children,href:r.href,onClick:r.onClick,current:r.current,className:r.className});return}uv(lv(n),e)}})}function eW(t){return cv(t,J$)}function tW(t){const e=[];return uv(t,e),e}function nW(t){return t.length<=3?[]:t.slice(1,-2)}function rW(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:nW(t)},{kind:"segment",item:t[e-2],isLast:!1},{kind:"segment",item:t[e-1],isLast:!0}]}function oW(t){return t.map((e,n)=>({kind:"segment",item:e,isLast:e.current??n===t.length-1}))}function sW(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 dv(){const t=l.useRef(null),{handlePointerDown:e}=lr({isDisabled:!1,enabled:!0,textMotionRef:t});return{textRef:t,handlePointerDown:e}}const fv=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"),iW=R(fv,"border-0 bg-transparent font-[inherit]"),aW=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 lW(t){return R("m-0 flex list-none flex-wrap items-center gap-xsmall gap-y-xsmall p-0 text-left",t)}function cW(t){return R(t)}function uW(t){return R("flex items-center gap-xsmall",t)}function dW(t){return R("min-w-0 max-w-[min(14rem,50vw)] truncate px-xsmall py-xsmall font-w-mid text-foreground",t)}function fW(t){return R("max-w-[min(12rem,46vw)] truncate px-xsmall py-xsmall text-muted",t)}function mv(t){return R("shrink-0 text-muted opacity-75 icon-small",t)}function mW(t){return R(fv,t)}function pW(t){return R(iW,t)}function hW(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 gW(t){return R(aW,t)}function CW(t){return R("inline-flex origin-center will-change-transform",t)}function bW(t){return R("tabular-nums",t)}function xW(t){return R("text-small",t)}function _W(t){return R("p-small",t)}function SW(t){return R("inline-flex",t)}function pv(t){const e=sv();return l.useMemo(()=>e?rW(t):oW(t),[e,t])}function vW({children:t}={}){return{isCompound:eW(t)}}function yW(t){const e=sv(),n=l.useMemo(()=>tW(t),[t]),r=pv(n);return{collapse:e,items:n,pieces:r}}function AW(t){return{pieces:pv(t)}}function hv(t){return null}hv.displayName="Breadcrumbs.Item";const gv=l.forwardRef(function({className:e,classNames:n,children:r,...o},s){const{pieces:i}=yW(r);return d.jsx(iv,{classNames:n,children:d.jsx(jf,{ref:s,pieces:i,className:e,...o})})});gv.displayName="Breadcrumbs.List";const jf=l.forwardRef(function({pieces:e,className:n,...r},o){const s=Xo();return d.jsx("ol",{ref:o,className:lW(er("",s.list,n)),...r,children:e.map((i,a)=>d.jsx(TW,{piece:i,showSeparator:a>0},sW(i,a)))})});jf.displayName="BreadcrumbsPiecesList";function TW({piece:t,showSeparator:e}){const n=Xo();return d.jsxs("li",{className:uW(n.listItem),children:[e?d.jsx(EW,{}):null,t.kind==="ellipsis"?d.jsx(IW,{hiddenItems:t.hiddenItems}):d.jsx(LW,{piece:t})]})}function Cv({className:t,iconClassName:e,...n}){const r=Xo();return d.jsx("span",{className:SW(er("",r.separatorWrapper,t)),...n,children:d.jsx(Ie.IoChevronForward,{className:mv(er("",r.separator,e)),"aria-hidden":!0})})}Cv.displayName="Breadcrumbs.Separator";function LW({piece:t}){const e=Xo(),{item:n,isLast:r}=t;return r?d.jsx(ee,{as:"span",variant:"small","aria-current":"page",className:dW(er("",e.current,n.className)),children:n.label}):n.href||n.onClick?d.jsx(bv,{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:fW(er("",e.static,n.className)),children:n.label})}function EW(){const t=Xo();return d.jsx(Ie.IoChevronForward,{className:mv(t.separator),"aria-hidden":!0})}const bv=l.forwardRef(function({href:e,onClick:n,children:r,className:o="",innerClassName:s,textClassName:i,"aria-current":a},c){const{textRef:u,handlePointerDown:f}=dv(),m=l.useCallback(C=>{u.current=C,dt(c,C)},[c,u]),p=e?mW(s):pW(s);return d.jsx("span",{className:hW(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})})})});bv.displayName="BreadcrumbsInteractiveCrumb";function IW({hiddenItems:t}){const e=Xo(),n=t.length,{textRef:r,handlePointerDown:o}=dv();return n===0?null:d.jsxs(wr,{children:[d.jsx(wr.Trigger,{"aria-label":q$(n),className:gW(e.ellipsisTrigger),onPointerDown:o,children:d.jsx("span",{ref:r,className:CW(e.ellipsisLiftWrapper),children:d.jsx(ee,{as:"span",variant:"small",className:bW(e.ellipsisText),children:"…"})})}),d.jsx(wr.Popover,{"aria-label":Z$,bodyClassName:_W(e.ellipsisPopover),children:t.map(s=>{const i=s.href??`hidden-${String(s.label)}`;return d.jsx(wW,{item:s,className:xW(er("",e.dropdownItem,s.className))},i)})})]})}function wW({item:t,className:e}){const n=t.href??`hidden-${String(t.label)}`;return t.href?d.jsx(wr.Item,{href:t.href,selection:!1,onClick:t.onClick,className:e,children:t.label}):d.jsx(wr.Item,{value:n,selection:!1,onClick:t.onClick,className:e,children:t.label})}function RW({items:t,className:e,...n}){const{pieces:r}=AW(t);return d.jsx(jf,{pieces:r,className:e,...n})}const xv=l.forwardRef(function({collapse:e=!0,className:n,classNames:r,items:o,children:s,"aria-label":i,...a},c){const{isCompound:u}=vW({children:s});return d.jsx(X$,{collapse:e,children:d.jsx(iv,{classNames:r,children:d.jsx("nav",{ref:c,"aria-label":K$(i),className:cW(er("",r==null?void 0:r.root,n)),...a,children:u?s:o!=null?d.jsx(RW,{items:o}):s})})})});xv.displayName="Breadcrumbs";const NW=Object.assign(xv,{List:gv,Item:hv,Separator:Cv}),Mf=l.createContext(null),fc=l.createContext({});function DW({value:t,children:e}){return d.jsx(Mf.Provider,{value:t,children:e})}function OW({classNames:t,children:e}){const n=l.useContext(fc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(fc.Provider,{value:r,children:e})}function PW(){const t=l.useContext(Mf);if(!t)throw new Error("Pagination components must be inside <Pagination>.");return t}function Ff(){return l.useContext(Mf)}function an(){return l.useContext(fc)}const kW="Pagination",BW=!0,_v=!0,jW="Back",MW="Forward";function FW({ariaLabel:t,children:e,pageNumber:n}){if(t!=null)return t;if(e!=null)return`Page ${n}`}function Zt(...t){return R(...t)}function GW(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 HW({disabled:t,page:e}){return t??(e!=null?e<=1:!1)}function zW({disabled:t,page:e,totalPages:n}){return t??(e!=null&&n!=null?e>=n:!1)}function VW(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(),C={x:p.left,y:p.top};if(c.set(m,C),a||n.current)continue;const g=u.get(m);if(g){const h=g.x-C.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 UW(t){const e=l.useRef(null),n=l.useCallback(r=>{e.current=r,dt(t,r)},[t]);return VW(e),{olRef:e,setRefs:n}}const $W="flex w-full flex-wrap items-center justify-between gap-xsmall gap-y-xsmall text-left",WW="min-w-0 flex",XW="text-muted",YW="m-0 flex shrink-0 list-none flex-wrap items-center gap-xsmall p-0",KW="flex items-center",qW="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",ZW="inline-flex min-w-[1.75rem] items-center justify-center px-xsmall py-xsmall font-w-mid text-foreground tabular-nums text-base",QW="min-w-[1.75rem] tabular-nums",JW="inline-flex min-w-[1.75rem] items-center justify-center px-xsmall py-xsmall text-muted tabular-nums",e5="",t5="shrink-0 icon-small opacity-75",n5="shrink-0 icon-small opacity-75";function r5({slotClass:t,className:e}){return Zt($W,t,e)}function o5({slotClass:t,className:e}){return Zt(WW,t,e)}function s5({slotClass:t,className:e}){return Zt(XW,t,e)}function i5({slotClass:t,className:e}){return Zt(YW,t,e)}function a5({slotClass:t,className:e}){return Zt(KW,t,e)}function l5({slotClass:t,className:e}){return Zt(qW,et(),t,e)}function c5({slotClass:t,className:e}){return Zt(ZW,t,e)}function u5({slotClass:t,className:e}){return Zt(QW,t,e)}function d5({slotClass:t,className:e}){return Zt(JW,t,e)}function Sv({slotClass:t,className:e}){return Zt(e5,t,e)}function f5({slotClass:t,className:e}){return Zt(t5,t,e)}function m5({slotClass:t,className:e}){return Zt(n5,t,e)}const vv=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:r5({slotClass:f.root,className:n}),...c,children:e})});vv.displayName="Pagination";const Ra=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:l5({slotClass:a.interactive,className:n}),onPointerDown:f,...s,children:e})});Ra.displayName="PaginationInteractive";const yv=l.forwardRef(function({className:e,children:n,...r},o){const s=an();return d.jsx("div",{ref:o,className:o5({slotClass:s.summary,className:e}),...r,children:d.jsx(ee,{as:"span",variant:"small",className:s5({slotClass:s.summaryText}),children:n})})});yv.displayName="Pagination.Summary";const Av=l.forwardRef(function({className:e,children:n,...r},o){const s=an(),{setRefs:i}=UW(o);return d.jsx("ol",{ref:i,className:i5({slotClass:s.content,className:e}),...r,children:n})});Av.displayName="Pagination.Content";const Xi=l.forwardRef(function({className:e,children:n,...r},o){const s=an();return d.jsx("li",{ref:o,className:a5({slotClass:s.item,className:e}),...r,children:n})});Xi.displayName="Pagination.Item";const Tv=l.forwardRef(function({disabled:e,onClick:n,children:r,"aria-label":o,...s},i){const a=Ff(),c=an(),u=a==null?void 0:a.page,f=HW({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(Ra,{ref:i,disabled:f,...o!=null?{"aria-label":o}:{},onClick:m,...s,children:r??d.jsxs(d.Fragment,{children:[d.jsx(Gf,{}),d.jsx(ee,{variant:"small",inheritColor:!0,as:"span",className:Sv({slotClass:c.navText}),children:jW})]})})});Tv.displayName="Pagination.Previous";const Lv=l.forwardRef(function({disabled:e,onClick:n,children:r,"aria-label":o,...s},i){const a=Ff(),c=an(),u=a==null?void 0:a.page,f=a==null?void 0:a.totalPages,m=zW({disabled:e,page:u,totalPages:f}),p=l.useCallback(C=>{n==null||n(C),!(C.defaultPrevented||m)&&a!=null&&a.onPageChange&&u!=null&&f!=null&&u<f&&a.onPageChange(u+1)},[a,n,u,m,f]);return d.jsx(Ra,{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:Sv({slotClass:c.navText}),children:MW}),d.jsx(Hf,{})]})})});Lv.displayName="Pagination.Next";function Gf({className:t}){const e=an();return d.jsx(Ie.IoChevronBack,{"aria-hidden":_v,className:f5({slotClass:e.previousIcon,className:t})})}Gf.displayName="Pagination.PreviousIcon";function Hf({className:t}){const e=an();return d.jsx(Ie.IoChevronForward,{"aria-hidden":_v,className:m5({slotClass:e.nextIcon,className:t})})}Hf.displayName="Pagination.NextIcon";const zf=l.forwardRef(function({page:e,isActive:n,children:r,onClick:o,className:s,"aria-label":i,...a},c){const u=Ff(),f=an(),m=n??((u==null?void 0:u.page)!=null?u.page===e:!1),p=l.useCallback(h=>{var b;o==null||o(h),!(h.defaultPrevented||m)&&((b=u==null?void 0:u.onPageChange)==null||b.call(u,e))},[m,u,o,e]),C=r??e;if(m)return d.jsx(ee,{as:"span",variant:"small","aria-current":"page",className:c5({slotClass:f.pageActive,className:s}),children:C});const g=FW({ariaLabel:i,children:r,pageNumber:e});return d.jsx(Ra,{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:C})})});zf.displayName="Pagination.Page";const Vf=l.forwardRef(function({className:e,...n},r){const o=an();return d.jsx(ee,{ref:r,as:"span",variant:"small","aria-hidden":BW,className:d5({slotClass:o.ellipsis,className:e}),...n,children:"…"})});Vf.displayName="Pagination.Ellipsis";function Ev(){const{page:t,totalPages:e,siblingCount:n}=PW();if(t==null||e==null)throw new Error("Pagination.Pages requires `page` and `totalPages` on the root <Pagination>.");const r=l.useMemo(()=>GW(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(Xi,{"data-flip-key":a,children:d.jsx(Vf,{})},a)}return d.jsx(Xi,{"data-flip-key":`page-${s}`,children:d.jsx(zf,{page:s})},s)})})}Ev.displayName="Pagination.Pages";function p5({page:t,totalPages:e,onPageChange:n,siblingCount:r=1,"aria-label":o=kW}){return{contextValue:l.useMemo(()=>({page:t,totalPages:e,onPageChange:n,siblingCount:r}),[n,t,r,e]),ariaLabel:o}}const Iv=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}=p5({page:o,totalPages:s,onPageChange:i,siblingCount:a,"aria-label":c});return d.jsx(DW,{value:m,children:d.jsx(OW,{classNames:r,children:d.jsx(vv,{ref:f,className:n,page:o,totalPages:s,onPageChange:i,siblingCount:a,"aria-label":p,...u,children:e})})})});Iv.displayName="Pagination";const h5=Object.assign(Iv,{Summary:yv,Content:Av,Item:Xi,Previous:Tv,Next:Lv,PreviousIcon:Gf,NextIcon:Hf,Page:zf,Pages:Ev,Ellipsis:Vf}),g5={default:"bg-surface",secondary:"bg-secondary",tertiary:"bg-tertiary"},xp={none:"",base:"shadow-token-base",mid:"shadow-token-mid",large:"shadow-token-large"},_p={none:"",small:"p-small",base:"p-base",plus:"p-plus",mid:"p-mid"},Sp={base:"rounded-base",mid:"rounded-mid",large:"rounded-large"},wv=l.forwardRef(function({className:e="",variant:n="default",shadow:r="none",padding:o="none",radius:s="mid",children:i,...a},c){const u=wo(c,n==="gloss");return n==="gloss"?d.jsx("div",{ref:u,className:R("gloss-panel min-w-0 text-left text-foreground",Sp[s],xp[r],_p[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",g5[n],Sp[s],xp[r],_p[o],e),...a,children:i})});wv.displayName="Surface";const Rv=l.createContext(null);function C5(){return l.useContext(Rv)}function b5({value:t,children:e}){return d.jsx(Rv.Provider,{value:t,children:e})}const Nv=l.createContext(!1);function x5(){return l.useContext(Nv)}function _5({children:t}){return d.jsx(Nv.Provider,{value:!0,children:t})}const mc=l.createContext({});function Dv({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 Na(){return l.useContext(mc)}function S5({variant:t,hoverLift:e=!0,forwardedRef:n,isDirectAnchorChild:r,placement:o,onPointerOver:s,onPointerOut:i,syncDeps:a}){const c=C5(),u=l.useRef(null),f=l.useRef(null),m=t==="gloss",p=!!(r&&(c!=null&&c.hoverLift)&&!m),C=e&&!p,g=l.useMemo(()=>Mt(u,C&&m),[m,C]),h=No(u,C&&m),b=Oo(u,C&&!m),x=l.useMemo(()=>({onPointerOver:w=>{s==null||s(w),!w.defaultPrevented&&C&&(m?h.onPointerOver(w):b.onPointerEnter(w))},onPointerOut:w=>{i==null||i(w),C&&(m?h.onPointerOut(w):b.onPointerLeave(w))}}),[h.onPointerOut,h.onPointerOver,m,i,s,C,b.onPointerEnter,b.onPointerLeave]),_=C?m?nn:b.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(w=>{g(w),u.current=w,w===null&&(c==null||c.registerLiftTarget(null)),dt(n,w)},[g,n,c]),{meaningChild:T,icon:L,dot:A,iconOnly:E,children:I}=a;return l.useLayoutEffect(()=>{y(),queueMicrotask(()=>{y()})},[r,c==null?void 0:c.anchorCommitGen,c==null?void 0:c.hoverLift,o,y,T,L,A,E,I]),{isGloss:m,splitLift:p,selfLiftEnabled:C,innerLiftRef:f,setMergedRef:S,pointerHandlers:x,selfLiftMotionCls:_,splitLiftMotionCls:v}}function v5(t,e){return Qc(t,e,{liftScale:Se().badgeAnchorHoverLiftScale})}function y5(t,e){t&&e&&Ss(t,Cn())}function A5(t){return typeof t["aria-label"]=="string"||typeof t["aria-labelledby"]=="string"}function T5(t){return A5(t)?{role:"img"}:{"aria-hidden":!0,role:"presentation"}}function pc(t){const e=t.props;return e["aria-hidden"]===!0||e["aria-label"]?t:l.cloneElement(t,{"aria-hidden":!0})}function Uf(t){const e=t.props["data-icon"];return e==="inline-start"||e==="start"?"inline-start":e==="inline-end"||e==="end"?"inline-end":null}function L5(t){return l.isValidElement(t)&&Uf(t)!=null}const E5={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"},I5={"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%]"},w5={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"},$f={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"},hc={small:"tools",base:"small",mid:"base",large:"mid"},R5={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"},N5={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"},D5={small:"[&_svg]:icon-small",base:"[&_svg]:icon-small",mid:"[&_svg]:icon-base",large:"[&_svg]:icon-large"},O5="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",P5="box-border isolate inline-flex items-center justify-center rounded-full whitespace-nowrap",k5="box-border isolate inline-flex shrink-0 rounded-full ring-2 ring-background motion-reduce:ring-1",ci={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 B5(t,e){return t==="gloss"?e!=="default"?ci[e]:ci.default:e!=="default"?ci[e]:ci[t]}function j5(t,e){if(t==="gloss")return R("gloss-panel border-0 text-foreground",e!=="default"?bt[e]:"");if(e==="default")return E5[t];switch(t){case"default":return R(Ec[e],bt[e]);case"primary":return Zp[e];case"outline":return R("bg-transparent",Ic[e],bt[e]);case"secondary":return R("bg-secondary border-token",bt[e])}}function M5(t){return t!=="default"?bt[t]:""}function F5(t,e,n){return n?R("gloss-panel border-0",M5(e)):B5(t,e)}const G5="inline-flex shrink-0 [&_svg]:shrink-0";function Ov(t){return R(G5,D5[t])}const H5="relative isolate inline-grid w-fit shrink-0 [&>*]:col-start-1 [&>*]:row-start-1",z5="pointer-events-none",V5="pointer-events-none";function U5(t,e,n,r,o=""){return R(k5,N5[t],$f[t],F5(e,n,r),o)}function $5(t,e,n=""){return R(P5,e,R5[t],$f[t],n)}function W5(t,e,n=""){return R(O5,e,w5[t],$f[t],n)}function X5(t,e){return t&&!e?V5:""}function Y5({node:t,size:e}){return t==null||t===!1?null:typeof t=="string"?t.trim()?d.jsx(ee,{as:"span",variant:hc[e],inheritColor:!0,children:t}):null:typeof t=="number"?d.jsx(ee,{as:"span",variant:hc[e],inheritColor:!0,children:t}):l.isValidElement(t)?Uf(t)?d.jsx("span",{className:Ov(e),children:pc(t)}):t:null}function K5(t){return l.Children.toArray(t).some(L5)}function q5(t){return typeof t=="string"?t.trim().length>0:typeof t=="number"?!0:l.isValidElement(t)?Uf(t)==null:!1}function Z5(t){return l.Children.toArray(t).some(q5)}function Pv(t){return t==null||t===!1?!1:typeof t=="string"?t.trim().length>0:typeof t=="number"?!0:Array.isArray(t)?t.some(Pv):l.isValidElement(t)}function Q5(t,e){return l.Children.map(l.Children.toArray(t),(n,r)=>d.jsx(l.Fragment,{children:d.jsx(Y5,{node:n,size:e})},r))}function J5(t){return t.type.displayName==="BadgeRoot"}function eX({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:Ov(t),children:l.isValidElement(c)?pc(c):c}):null,C=i&&!s?d.jsx(ee,{as:"span",variant:hc[t],inheritColor:!0,children:e}):null,g=s?Q5(e,t):null,h=s?g:d.jsxs(d.Fragment,{children:[o==="start"&&p,C,o==="end"&&p]}),b=f?g:c?l.isValidElement(c)?pc(c):c:e,_=!!(!s&&p&&C)?o:void 0;return m?{layoutKind:"iconOnly",bodyContent:h,iconOnlyBody:b,dataIcon:_}:{layoutKind:"text",bodyContent:h,iconOnlyBody:b,dataIcon:_}}function Wf({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:C=!1}){const g=C?T5(u):void 0,h=R(f,r,!e&&n);return e?d.jsx("span",{ref:t,"data-badge-root":!0,className:R(z5,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,X5(s,i),n),...c,...u,...g,children:p})}function tX({size:t,variant:e,status:n,shell:r,className:o,rest:s}){const i=Na(),a=U5(t,e,n,r.isGloss,R(i.root,i.dot,o));return d.jsx(Wf,{...r,className:a,rest:s,withA11y:!0,children:null})}function nX({size:t,surfaceClass:e,shell:n,className:r,rest:o,iconOnlyBody:s}){const i=Na(),a=$5(t,e,R(i.root,i.iconOnly,r));return d.jsx(Wf,{...n,className:a,rest:o,withA11y:!0,children:s})}function rX({size:t,surfaceClass:e,shell:n,className:r,rest:o,bodyContent:s,dataIcon:i}){const a=Na(),c=W5(t,e,R(a.root,a.text,r));return d.jsx(Wf,{...n,className:c,rest:o,dataIcon:i,children:s})}const kv=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(x=>{u.current=x,typeof c=="function"?c(x):c&&(c.current=x)},[c]),C=l.useCallback(x=>{f.current=x,y5(x,o)},[o]),g=l.useMemo(()=>({registerLiftTarget:C,anchorRef:u,anchorCommitGen:m,hoverLift:o}),[C,m,o]),h=v5(f,o),b=Na();return d.jsx(Dv,{classNames:n,children:d.jsx(b5,{value:g,children:d.jsx("div",{ref:p,"data-badge-anchor":!0,className:R(H5,b.anchor,n==null?void 0:n.anchor,e),onPointerOver:x=>{s==null||s(x),x.defaultPrevented||h.onPointerOver(x)},onPointerOut:x=>{i==null||i(x),h.onPointerOut(x)},...a,children:l.Children.map(r,(x,_)=>l.isValidElement(x)&&J5(x)?d.jsx(_5,{children:x},x.key??`badge-anchor-child-${_}`):x)})})})});kv.displayName="BadgeAnchor";function oX({variant:t,status:e,size:n,children:r,icon:o,iconOnly:s,iconPosition:i,dot:a,placement:c}){const u=x5(),f=j5(t,e),m=K5(r),p=l.useMemo(()=>m?Z5(r):Pv(r),[r,m]),C=u?c??"top-right":void 0,g=C?I5[C]:"",h=l.useMemo(()=>eX({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 Bv=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:C,onPointerOut:g,...h},b){const x=a,{surfaceClass:_,meaningChild:v,placementClass:y,isDirectAnchorChild:S,layoutKind:T,bodyContent:L,iconOnlyBody:A,dataIcon:E}=oX({variant:e,status:n,size:r,children:m,icon:o,iconOnly:i,iconPosition:s,dot:x,placement:c}),I=S5({variant:e,hoverLift:p,forwardedRef:b,isDirectAnchorChild:S,placement:c,onPointerOver:C,onPointerOut:g,syncDeps:{meaningChild:v,icon:o,dot:x,iconOnly:i,children:m}}),w={setMergedRef:I.setMergedRef,splitLift:I.splitLift,placementClass:y,splitLiftMotionCls:I.splitLiftMotionCls,selfLiftMotionCls:I.selfLiftMotionCls,isDirectAnchorChild:S,isGloss:I.isGloss,innerLiftRef:I.innerLiftRef,pointerHandlers:I.pointerHandlers,rest:h},N=O=>d.jsx(Dv,{classNames:u,children:O});return N(T==="dot"?d.jsx(tX,{size:r,variant:e,status:n,shell:w,className:f,rest:h}):T==="iconOnly"?d.jsx(nX,{size:r,surfaceClass:_,shell:w,className:f,rest:h,iconOnlyBody:A}):d.jsx(rX,{size:r,surfaceClass:_,shell:w,className:f,rest:h,bodyContent:L,dataIcon:E}))});Bv.displayName="BadgeRoot";const sX=Object.assign(Bv,{Anchor:kv});function jv(...t){return R(...t)}function iX(t){return t.type.displayName==="KbdRoot"}function aX(t){const e=[];for(const n of l.Children.toArray(t)){if(!l.isValidElement(n)){n!=null&&e.push(n);continue}if(iX(n)){e.push(n);continue}e.push(n)}return e}function lX({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=No(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]),C=a&&!i?f.motionClass:"";return{setMergedRef:m,motionClass:C,glossMotionClass:a&&i?nn:"",pointerHandlers:p}}const cX={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"},dX={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"},fX="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",mX="inline-flex items-center gap-xsmall",pX="select-none text-muted text-tools";function hX(t){return t==="gloss"?"gloss-panel gloss-deep border-0 text-foreground":cX[t]}function gX({variant:t,size:e,motionClass:n,slotRoot:r,className:o}){return jv(fX,hX(t),dX[e],n,r,o)}function CX(t,e){return R(mX,e,t)}function bX(t){return R(pX,t)}function Xf({size:t,children:e}){return d.jsx(ee,{as:"span",variant:uX[t],inheritColor:!0,children:e})}Xf.displayName="KbdText";function Mv({size:t,children:e}){return e==null||e===!1?null:l.isValidElement(e)?e:d.jsx(Xf,{size:t,children:e})}Mv.displayName="KbdBody";const gc=l.createContext({});function xX({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 _X(){return l.useContext(gc)}function SX({variant:t,size:e,className:n,classNames:r}){const o=l.useMemo(()=>gX({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 Fv=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=SX({variant:e,size:n,className:o,classNames:r}),p=lX({variant:m.variant,hoverLift:i,forwardedRef:f,onPointerOver:a,onPointerOut:c});return d.jsx(xX,{classNames:r,children:d.jsx("kbd",{ref:p.setMergedRef,className:jv(m.rootClass,p.motionClass,p.glossMotionClass),...p.pointerHandlers,...u,children:d.jsx(Mv,{size:m.size,children:s})})})});Fv.displayName="KbdRoot";const vX=!0;function Gv({className:t,classNames:e,separator:n="+",children:r,...o}){const s=_X(),i=aX(r);return d.jsx("span",{className:CX(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":vX,className:bX((e==null?void 0:e.separator)??s.separator),children:n}):null,a]},c))})}Gv.displayName="KbdGroup";const yX=Object.assign(Fv,{Group:Gv,Text:Xf}),AX=new Set,vp="secondary";function it(...t){return R(...t)}function TX(t,e){return t==="all"?!0:t.has(e)}function LX({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 EX(t,e){if(!(!t||(e==null?void 0:e.column)!==t))return e.direction}function IX(t,e){return{column:t,direction:(e==null?void 0:e.column)===t&&e.direction==="ascending"?"descending":"ascending"}}function wX(t,e){if(t)return e==="ascending"?"ascending":e==="descending"?"descending":"none"}function RX(t,e){return t!=="none"?e:void 0}const Hv=l.createContext("default"),Cc=l.createContext({}),zv=l.createContext({selectionMode:"none",selectedKeys:new Set,onRowSelect:()=>{},isRowSelected:()=>!1,sortDescriptor:void 0,onSortChange:void 0}),Vv=l.createContext(null);function NX({variant:t,children:e}){return d.jsx(Hv.Provider,{value:t,children:e})}function DX({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 OX({value:t,children:e}){return d.jsx(zv.Provider,{value:t,children:e})}function PX({value:t,children:e}){return d.jsx(Vv.Provider,{value:t,children:e})}function Vs(){return l.useContext(Hv)}function zn(){return l.useContext(Cc)}function Uv(){return l.useContext(zv)}function kX(){return l.useContext(Vv)}const BX="w-full",jX={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"},MX="gloss-content w-full min-w-0",FX="w-full overflow-x-auto",GX="w-full",HX={default:"border-collapse",secondary:"border-collapse",toned:"border-separate border-spacing-y-xsmall",gloss:"border-collapse"},zX={default:"border-b-token",secondary:"border-b-token",toned:"",gloss:"border-b-token"},VX="group/col",UX={default:"bg-secondary px-large py-plus text-secondary-foreground whitespace-nowrap",secondary:"px-large py-plus text-secondary-foreground whitespace-nowrap",toned:"px-large py-plus text-muted whitespace-nowrap bg-transparent",gloss:"bg-transparent px-large py-plus text-muted whitespace-nowrap"},$X="cursor-pointer select-none hover:text-foreground",WX="inline-flex items-center gap-xsmall",XX="min-w-0 text-small text-left font-w-mid",YX="shrink-0 origin-center",KX="text-primary opacity-100",qX="opacity-0 group-hover/col:opacity-40 text-muted",ZX="px-large py-xlarge text-center",QX="outline-none",JX={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"},eY="cursor-pointer",tY="bg-default-hover",nY="bg-primary-tint hover:bg-primary-tint-strong",rY=R(Io,"hover:bg-primary-tint focus-visible:bg-primary-tint"),oY="focus-ring-inset",sY="text-small",iY={default:"px-large py-plus",secondary:"px-large py-plus",toned:"px-large py-plus first:rounded-l-mid last:rounded-r-mid",gloss:"px-large py-plus"},aY="ring-2 ring-inset ring-primary",lY="hover:brightness-[0.97] motion-reduce:hover:brightness-100",cY="flex flex-wrap items-center justify-between gap-base border-t-token px-mid py-plus",$v={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 uY({variant:t,slotClass:e,className:n}){return it(BX,jX[t],e,n)}function dY({variant:t,slotClass:e,className:n}){return it(GX,HX[t],e,n)}function fY({variant:t,allowsSorting:e,slotClass:n,className:r}){return it(VX,UX[t],e&&it($X,gn),n,r)}function mY({variant:t,isToned:e,isSelectable:n,isSelected:r,slotClass:o,className:s}){return it(QX,JX[t],n&&eY,t==="gloss"&&!e&&(r?nY:rY),t!=="gloss"&&!e&&(r?tY:et()),n&&oY,o,s)}function pY({variant:t,tone:e,isSelected:n,slotClass:r,className:o}){const s=t==="toned",i=e?$v[e]:void 0;return it(sY,iY[t],s&&i,s&&n&&aY,s&&!n&&lY,r,o)}function hY(t){return it(YX,t?KX:qX)}function gY({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(hY(!!t),e.columnSortChevron),children:d.jsx(Ie.IoChevronUp,{className:"icon-xsmall"})})}function CY({selectionMode:t="none",selectedKeys:e,onSelectionChange:n,sortDescriptor:r,onSortChange:o}){const s=e??AX,i=l.useCallback(c=>TX(s,c),[s]),a=l.useCallback(c=>{const u=LX({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 Wv=l.forwardRef(function({className:e,tabIndex:n=0,...r},o){const s=zn();return d.jsx("div",{ref:o,tabIndex:n,className:it(FX,s.scrollContainer,e),...r})});Wv.displayName="TableScrollContainer";const Xv=l.forwardRef(function({selectionMode:e="none",selectedKeys:n,onSelectionChange:r,sortDescriptor:o,onSortChange:s,className:i,children:a,...c},u){const f=Vs(),m=zn(),p=CY({selectionMode:e,selectedKeys:n,onSelectionChange:r,sortDescriptor:o,onSortChange:s});return d.jsx(OX,{value:p,children:d.jsx("table",{ref:u,className:dY({variant:f,slotClass:m.content,className:i}),...c,children:a})})});Xv.displayName="TableContent";const Yv=l.forwardRef(function({columns:e,children:n,className:r,...o},s){const i=Vs(),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(zX[i],a.headerRow),children:c})})});Yv.displayName="TableHeader";const Kv=l.forwardRef(function({id:e,allowsSorting:n=!1,isRowHeader:r=!1,children:o,className:s,onClick:i,...a},c){const u=Vs(),f=zn(),{sortDescriptor:m,onSortChange:p}=Uv(),C=EX(e,m),g=l.useCallback(b=>{i==null||i(b),!(!n||!e||!p)&&p(IX(e,m))},[n,e,i,p,m]),h=typeof o=="function"?o({sortDirection:C}):o;return d.jsx("th",{ref:c,scope:r?"row":"col","aria-sort":wX(n,C),"data-allows-sorting":n||void 0,className:fY({variant:u,allowsSorting:n,slotClass:f.column,className:s}),onClick:g,...a,children:d.jsxs("span",{className:it(WX,f.columnInner),children:[d.jsx("span",{className:it(XX,f.columnLabel),children:h}),n?d.jsx(gY,{direction:C}):null]})})});Kv.displayName="TableColumn";const qv=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(ZX,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})});qv.displayName="TableBody";const Zv=l.forwardRef(function({id:e,tone:n,children:r,className:o,onClick:s,...i},a){const c=Vs(),u=zn(),{selectionMode:f,isRowSelected:m,onRowSelect:p}=Uv(),C=e!==void 0?m(e):!1,g=f!=="none"&&e!==void 0,h=c==="toned",b=n??(h?vp:void 0),x=l.useMemo(()=>({tone:b??vp,isSelected:C}),[C,b]),_=l.useCallback(y=>{s==null||s(y),!y.defaultPrevented&&g&&p(e)},[e,g,s,p]),v=l.useCallback(y=>{g&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),p(e))},[e,g,p]);return d.jsx(PX,{value:h||b?x:null,children:d.jsx("tr",{ref:a,"data-selected":C||void 0,"data-tone":b,"aria-selected":RX(f,C),tabIndex:g?0:void 0,className:mY({variant:c,isToned:h,isSelectable:g,isSelected:C,slotClass:u.row,className:o}),onClick:_,onKeyDown:v,...i,children:r})})});Zv.displayName="TableRow";const Qv=l.forwardRef(function({className:e,...n},r){const o=Vs(),s=zn(),i=kX();return d.jsx("td",{ref:r,className:pY({variant:o,tone:i==null?void 0:i.tone,isSelected:(i==null?void 0:i.isSelected)??!1,slotClass:s.cell,className:e}),...n})});Qv.displayName="TableCell";const Jv=l.forwardRef(function({className:e,...n},r){const o=zn();return d.jsx("div",{ref:r,className:it(cY,o.footer,e),...n})});Jv.displayName="TableFooter";function bY({variant:t="default"}){return{variant:t,isGloss:t==="gloss"}}const ey=l.forwardRef(function({variant:e="default",className:n,classNames:r,children:o,...s},i){const{variant:a,isGloss:c}=bY({variant:e}),u=wo(i,c);return d.jsx(NX,{variant:a,children:d.jsx(DX,{classNames:r,children:d.jsx("div",{ref:u,className:uY({variant:a,slotClass:r==null?void 0:r.root,className:n}),...s,children:c?d.jsx("div",{className:it(MX,r==null?void 0:r.glossContent),children:o}):o})})})});ey.displayName="TableRoot";const xY=Object.assign(ey,{ScrollContainer:Wv,Content:Xv,Header:Yv,Column:Kv,Body:qv,Row:Zv,Cell:Qv,Footer:Jv});function _Y(){return"Previous"}function SY(){return"Next"}function vY(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 yp(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())}function yY(t,e){return new Date(t,e+1,0).getDate()}function AY(t,e){return(new Date(t,e,1).getDay()+6)%7}function TY(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 EY(t,e){if(t==="single"){const n=e;return n?[n]:[]}if(t==="multiple"){const n=e;return Array.isArray(n)?n:[]}return[]}function IY(t,e,n){return t!=="range"?null:e||((n==null?void 0:n.start)??null)}function wY(t,e,n){return t!=="range"||e?null:(n==null?void 0:n.end)??null}function RY(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 NY({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=yY(f,m),C=AY(f,m),g=r??(n&&o?o:null),h=n&&g?n<=g?n:g:null,b=n&&g?n<=g?g:n:null,x=[...Array(C).fill(null),...Array.from({length:p},(v,y)=>y+1)],_=x.length%7;return _!==0&&x.push(...Array(7-_).fill(null)),x.map((v,y)=>{if(v===null)return{key:`empty-${f}-${m}-${y}`,day:null};const S=new Date(f,m,v),T=`${f}-${m}-${v}`,L=Xn(S,u),A=s!=="range"&&e.some(D=>Xn(D,S)),E=s==="range"&&!!n&&Xn(S,n),I=s==="range"&&!!g&&Xn(S,g),w=s==="range"&&h&&b?S>h&&S<b:!1,N=s==="range"&&!!n&&!!g&&Xn(n,g),O=!N&&(w||I),j=!N&&(w||E),k=!!a&&S<a||!!c&&S>c;return{key:T,day:v,date:S,isToday:L,isSelected:A,isRangeStart:E,isRangeEnd:I,showLeftBg:O,showRightBg:j,isDisabled:k,circleActive:A||E||I,ariaLabel:vY(v,m,f,i)}})}function DY(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 OY(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),bc=l.createContext({});function kY({value:t,children:e}){return d.jsx(ty.Provider,{value:t,children:e})}function BY({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 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(bc)}function jY(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 MY(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 FY={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"},GY={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"},HY={small:"p-small gap-xsmall",base:"p-mid gap-small",mid:"p-mid gap-small",large:"p-large gap-base"},zY={small:"min-w-[15.5rem]",base:"min-w-[18rem]",mid:"min-w-[21rem]",large:"min-w-[24rem]"},VY={small:"text-small",base:"text-base",mid:"text-mid",large:"text-mid"},UY={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"},ny={small:"gap-xsmall",base:"gap-xsmall",mid:"gap-small",large:"gap-small"},$Y={small:"small",base:"base",mid:"mid",large:"mid"},ry={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"},XY={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"},YY="inline-flex flex-col select-none text-left text-foreground",KY="gloss-panel gloss-deep rounded-large",qY="gloss-content flex flex-col",ZY="pointer-events-none absolute inset-y-0 bg-default-hover",QY="flex items-center gap-xsmall",JY="flex-1 rounded-base py-xsmall text-center font-w-mid",e3="cursor-pointer hover:text-primary focus-ring",t3="cursor-default",n3="min-w-0",r3="grid grid-cols-7 gap-xsmall",o3="grid grid-cols-7 gap-xsmall",s3="flex items-center justify-center font-w-mid text-muted",i3="relative flex items-center justify-center",a3="relative z-10",l3="grid grid-cols-3",c3="grid grid-cols-4",u3="flex items-center justify-between border-t-token pt-small",d3=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"),f3="group/calendar-cell relative inline-flex origin-center items-center justify-center overflow-hidden outline-none will-change-transform focus-ring rounded-mid",m3=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"),p3=R(JY,gn),h3="relative z-[1] min-w-0 shrink-0 leading-none",g3="absolute bottom-[3px] left-1/2 z-[1] h-[3px] w-[3px] -translate-x-1/2 rounded-full bg-primary",Ap="icon-xsmall",C3="bg-transparent font-w-mid text-primary-foreground",b3="font-w-mid text-primary",x3="text-foreground",_3="cursor-not-allowed opacity-35",S3="cursor-pointer",v3="text-muted",y3="text-muted",A3={opacity:0};function T3(t){return R(d3,GY[t])}function L3(t,e,n,r){return R(YY,n?KY:UY[t],HY[e],zY[e],r)}function E3(t){return t==="left"?"left-0 right-1/2":"left-1/2 right-0"}function I3(t,e){return e==="day"?ry[t]:XY[t]}function w3(t,e){return e==="day"?$Y[t]:WY[t]}function R3({selected:t,isToday:e,isCurrent:n}){return t?C3:e||n?b3:x3}function N3(t,e,n,r){return R(f3,I3(t,e),R3({selected:n.selected,isToday:n.isToday,isCurrent:n.isCurrent}),!n.selected&&!n.disabled&&et(),n.disabled?_3:S3,r)}function D3(t){return R(s3,FY[t])}function O3(t){return R(l3,ny[t])}function P3(t){return R(c3,ny[t])}function k3(t,e){return t&&!e?v3:void 0}function B3(t,e){return R(p3,VY[t],e!=="years"?e3:t3)}function Tp({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,...Jh(),overwrite:"auto"})},[t]),d.jsx("div",{ref:r,"aria-hidden":!0,className:Ke(R(ZY,E3(e)),n.rangeHalfFill),style:A3})}function Lp({direction:t,size:e,onClick:n,disabled:r}){const o=Vn(),s=jY(r),i=t==="prev"?_Y():SY(),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(T3(e),a),children:t==="prev"?d.jsx(Ie.IoChevronBack,{className:Ap}):d.jsx(Ie.IoChevronForward,{className:Ap})})}const j3=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:C,children:g},h){const b=l.useRef(null),x=l.useRef(m),_=l.useRef(p),v=l.useRef(C);x.current=m,_.current=p,v.current=C;const{bindFillRef:y}=nx(e,b),S=MY(n),T=Vn(),L=a==="month"?T.monthCell:a==="year"?T.yearCell:T.dayCell,A=w3(r,i),E=l.useCallback(O=>{S.btnRef.current=O,typeof h=="function"?h(O):h&&(h.current=O)},[S.btnRef,h]),I=l.useCallback(()=>{n||x.current()},[n]),w=l.useCallback(O=>{var j;(j=_.current)==null||j.call(_),S.handlePointerEnter(O)},[S]),N=l.useCallback(()=>{var O;(O=v.current)==null||O.call(v),S.handlePointerLeave()},[S]);return d.jsxs("button",{ref:E,type:"button","aria-label":o,"aria-pressed":s,"aria-disabled":n,disabled:n,onClick:I,onPointerEnter:w,onPointerLeave:N,onPointerDown:S.handlePointerDown,className:N3(r,i,{selected:e,disabled:n,isToday:c,isCurrent:u},Ke(T.cell,L,f)),children:[d.jsx("span",{ref:y,"aria-hidden":!0,className:Ke(m3,T.cellFill)}),d.jsx(ee,{variant:A,as:"span",inheritColor:!0,className:Ke(h3,T.cellText),children:g}),c&&!e&&d.jsx("span",{"aria-hidden":!0,className:Ke(g3,T.cellTodayDot)})]})});function M3(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 Da=l.memo(j3,M3);function F3(){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:C}=ro(),g=l.useMemo(()=>NY({viewDate:e,selectedDates:n,rangeStart:r,rangeEnd:o,hoverDate:s,mode:u,locale:f,minDate:m,maxDate:p,today:C}),[e,n,r,o,s,u,f,m,p,C]);return d.jsxs("div",{children:[d.jsx("div",{className:Ke(r3,t.weekdayGrid),children:f.weekDays.map(h=>d.jsx("div",{className:Ke(D3(c),t.weekdayCell),children:h},h))}),d.jsx("div",{className:Ke(o3,t.daysGrid),children:g.map(h=>h.day===null?d.jsx("div",{className:ry[c]},h.key):d.jsxs("div",{className:Ke(i3,t.dayCellWrapper),children:[h.showLeftBg?d.jsx(Tp,{visible:!0,side:"left"}):null,h.showRightBg?d.jsx(Tp,{visible:!0,side:"right"}):null,d.jsx(Da,{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:a3,children:h.day})]},h.key))})]})}function G3(){const t=Vn(),{viewDate:e,onMonthPress:n,selectedDates:r,size:o,locale:s,today:i}=ro(),a=l.useMemo(()=>DY(e,r,s,i),[e,r,s,i]);return d.jsx("div",{className:Ke(O3(o),t.monthsGrid),children:a.map(c=>d.jsx(Da,{selected:c.isSelected,isCurrent:c.isCurrentMonth,size:o,cellKind:"month",rounded:"picker",onPress:()=>n(c.month),children:c.name},c.month))})}function H3(){const t=Vn(),{viewDate:e,onYearPress:n,selectedDates:r,size:o,today:s}=ro(),i=l.useMemo(()=>OY(e,r,s),[e,r,s]);return d.jsx("div",{className:Ke(P3(o),t.yearsGrid),children:i.map(a=>d.jsx(Da,{selected:a.isSelected,isCurrent:a.isCurrentYear,size:o,cellKind:"year",rounded:"picker",onPress:()=>n(a.year),className:k3(a.outOfDecade,a.isSelected),children:a.year},a.year))})}const Yf=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(()=>TY(s,a,f),[s,a,f]);return d.jsxs("div",{ref:r,className:Ke(QY,o.header,e),...n,children:[d.jsx(Lp,{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(B3(u,s),o.headerTitle),children:m}),d.jsx(Lp,{direction:"next",size:u,onClick:()=>c(1)})]})}),Kf=l.forwardRef(function({className:e="",...n},r){const o=Vn(),{view:s}=ro();return d.jsxs("div",{ref:r,className:Ke(n3,o.grid,e),...n,children:[s==="days"&&d.jsx(F3,{}),s==="months"&&d.jsx(G3,{}),s==="years"&&d.jsx(H3,{})]})}),oy=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(u3,o.footer,e),...n,children:[d.jsx(yo,{variant:"ghost",size:"small",className:Ke(y3,o.footerToday),onClick:i,children:a.today}),d.jsx(yo,{variant:"ghost",size:"small",status:"danger",className:o.footerClear,onClick:s,children:a.clear})]})});Yf.displayName="Calendar.Header";Kf.displayName="Calendar.Grid";oy.displayName="Calendar.Footer";Da.displayName="CalendarInteractiveCell";function z3(){return d.jsxs(d.Fragment,{children:[d.jsx(Yf,{}),d.jsx(Kf,{})]})}const sy={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 V3(t){const{mode:e="single",variant:n="default",size:r="base",defaultMonth:o,initialView:s="days",locale:i=sy,minDate:a,maxDate:c,value:u,defaultValue:f,onValueChange:m}=t,p=n==="gloss",C=l.useMemo(()=>yp(new Date),[]),g=u!==void 0,[h,b]=l.useState(()=>PY(e,f)),x=g?u:h,_=l.useRef(x);_.current=x;const v=l.useCallback(W=>{const M=_.current,z=typeof W=="function"?W(M):W;_.current=z,g||b(z),m==null||m(z)},[g,m]),[y,S]=l.useState(s),[T,L]=l.useState(()=>LY(o,e,x,C)),[A,E]=l.useState(null),[I,w]=l.useState(null),N=l.useMemo(()=>EY(e,x),[e,x]),O=l.useMemo(()=>IY(e,A,x),[e,A,x]),j=l.useMemo(()=>wY(e,A,x),[e,A,x]),k=l.useCallback(W=>{L(M=>RY(M,y,W))},[y]),G=l.useCallback(W=>{const M=yp(W);if(e==="single")v(z=>{const H=z instanceof Date?z:null;return H&&Xn(H,M)?null:M});else if(e==="multiple")v(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(!A)E(M),v({start:null,end:null});else if(Xn(M,A))E(null);else{const z=M<=A?M:A,H=M<=A?A:M;E(null),w(null),v({start:z,end:H})}},[e,A,v]),D=l.useCallback(W=>{L(new Date(T.getFullYear(),W,1)),S("days")},[T]),P=l.useCallback(W=>{L(new Date(W,T.getMonth(),1)),S("months")},[T]),F=l.useCallback(()=>{E(null),w(null),v(e==="single"?null:e==="multiple"?[]:{start:null,end:null})},[e,v]),B=l.useCallback(()=>{L(new Date(C.getFullYear(),C.getMonth(),1)),S("days")},[C]),$=l.useMemo(()=>({mode:e,view:y,setView:S,viewDate:T,navigate:k,selectedDates:N,rangeStart:O,rangeEnd:j,hoverDate:I,setHoverDate:w,onDayPress:G,onMonthPress:D,onYearPress:P,onClear:F,onToday:B,size:r,variant:n,locale:i,minDate:a,maxDate:c,today:C}),[e,y,T,k,N,O,j,I,G,D,P,F,B,r,n,i,a,c,C]);return{isGloss:p,variant:n,size:r,contextValue:$,today:C}}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:C,classNames:g,children:h,className:b="",...x}=e,{isGloss:_,contextValue:v}=V3(e),y=wo(n,_),S=h??d.jsx(z3,{});return d.jsx(kY,{value:v,children:d.jsx(BY,{classNames:g,children:d.jsx("div",{ref:y,className:L3(v.variant,v.size,_,Ke("",g==null?void 0:g.root,b)),...x,children:_?d.jsx("div",{className:R(qY,g==null?void 0:g.glossContent),children:S}):S})})})});iy.displayName="Calendar";const U3=Object.assign(iy,{Header:Yf,Grid:Kf,Footer:oy}),ay=l.createContext(null),xc=l.createContext({});function $3({value:t,children:e}){return d.jsx(ay.Provider,{value:t,children:e})}function W3({classNames:t,children:e}){const n=l.useContext(xc),r=l.useMemo(()=>({...n,...t}),[t,n]);return d.jsx(xc.Provider,{value:r,children:e})}function Oa(){const t=l.useContext(ay);if(!t)throw new Error("ColorPicker compound parts must be inside <ColorPicker>.");return t}function Yo(){return l.useContext(xc)}const X3="Saturation and brightness",Y3="Color selection",K3="Hex code of the color",q3="Transparency (%)";function Z3(t){return`Selected color: ${t}`}function Cs(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 C=0,g=0,h=0;switch(c%6){case 0:C=s,g=p,h=f;break;case 1:C=m,g=s,h=f;break;case 2:C=f,g=s,h=p;break;case 3:C=f,g=m,h=s;break;case 4:C=p,g=f,h=s;break;case 5:C=s,g=f,h=m;break}return{r:Math.round(C*255),g:Math.round(g*255),b:Math.round(h*255),a:r}}function ly({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 cy({r:t,g:e,b:n,a:r}){const o=i=>Math.round(Cs(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 uy(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 _c(t){return cy(Dr(t))}function Us(t){const e=uy(t);return e?ly(e):null}function dy(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 Yi(t){const{r:e,g:n,b:r}=Dr({h:t,s:100,v:100,a:100});return`rgb(${e},${n},${r})`}function Q3(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 J3({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=Cs((i-u.left)/u.width*100,0,100),m=Cs(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 fy="#3b82f6",eK={h:217,s:90,v:96,a:100};function tK(t,e){return Us(t??e??fy)??eK}const my={small:"small",base:"base",mid:"mid"},nK={small:"small",base:"base",mid:"mid"},rK={small:"w-52",base:"w-64",mid:"w-72"},oK={small:"h-32",base:"h-40",mid:"h-48"},sK={small:"p-small gap-small",base:"p-plus gap-plus",mid:"p-mid gap-mid"},iK="relative w-full touch-none select-none rounded-small cursor-crosshair overflow-hidden",aK="pointer-events-none absolute z-10 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-token-mid",lK="flex items-center gap-small",cK="flex min-w-0 flex-1 flex-col gap-xsmall",uK="flex items-center gap-small",dK="flex items-center gap-xsmall rounded-small border-token bg-secondary px-small py-xsmall",fK="text-small text-muted select-none",mK=`min-w-0 flex-1 bg-transparent text-small font-mono uppercase text-foreground outline-none ${Lt}`,pK="flex items-center gap-xsmall rounded-small border-token bg-secondary px-small py-xsmall",hK=`w-8 bg-transparent text-right text-small font-mono text-foreground outline-none ${Lt}`,gK="text-small text-muted select-none",CK="flex flex-wrap gap-xsmall border-t-token pt-small",bK="flex flex-col rounded-mid text-foreground";function xK(t,e){return mt(bK,rK[t],sK[t],e)}function _K(t,e){return mt(iK,oK[t],e)}const SK="overflow-hidden rounded-full",vK="opacity-48",Ep="flex flex-col gap-xsmall",yK="flex items-center justify-between",AK={hue:"Hue",saturation:"Saturation",value:"Value",alpha:"Alpha",red:"Red",green:"Green",blue:"Blue"};function TK({size:t,orientation:e,disabled:n,className:r}){return R(iS({isHorizontal:e==="horizontal",size:t,className:r}),SK,n&&vK)}function LK(t,e,n){const r=n==="horizontal";if(t==="alpha")return Q3(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=Yi(e.h);return{background:`linear-gradient(${o}, rgb(${c.r},${c.g},${c.b}), ${u})`}}case"value":{const c=Yi(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 EK={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}},py={hue:0,saturation:100,value:100,alpha:100,red:255,green:0,blue:0};function IK(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 Lo=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:C,step:g}=EK[e],[h,b]=IK(r,o,py[e]),x=l.useRef(!1),_=l.useRef(null),[v,y]=l.useState(!1),[S,T]=l.useState(0),L=l.useMemo(()=>sS(void 0,i),[i]),[A,E]=l.useState(L);l.useLayoutEffect(()=>{const P=_.current;if(!P)return;const F=()=>{const $=P.getBoundingClientRect(),{trackSpanPx:W,thumbSpanPx:M}=Ci($,a);T(W),M>0&&E(z=>z===M?z:M)};F();const B=new ResizeObserver(F);return B.observe(P),()=>B.disconnect()},[a]);const I=l.useCallback(P=>{_.current=P,typeof m=="function"?m(P):m&&(m.current=P)},[m]),w=l.useCallback(P=>{const F=Cs(Math.round(P/g)*g,p,C);b(F),s==null||s(F)},[p,C,g,b,s]),N=A>0?A:L,O=l.useCallback((P,F)=>{const B=_.current;if(!B||c)return;const $=B.getBoundingClientRect();w(tc(P,F,$,a,p,C,N))},[c,N,w,C,p,a]);l.useEffect(()=>{const P=B=>{x.current&&O(B.clientX,B.clientY)},F=()=>{x.current=!1,y(!1)};return window.addEventListener("pointermove",P),window.addEventListener("pointerup",F),window.addEventListener("pointercancel",F),()=>{window.removeEventListener("pointermove",P),window.removeEventListener("pointerup",F),window.removeEventListener("pointercancel",F)}},[O]);const j=l.useCallback(P=>{c||P.button!==0||(P.preventDefault(),x.current=!0,y(!0),O(P.clientX,P.clientY))},[c,O]),k=l.useCallback(P=>{c||P.button!==0||(P.stopPropagation(),x.current=!0,y(!0),P.currentTarget.setPointerCapture(P.pointerId))},[c]),G=l.useCallback(P=>{if(c)return;let F=0;if(a==="horizontal"){if(P.key==="ArrowRight")F=g;else if(P.key==="ArrowLeft")F=-g;else if(P.key==="PageUp")F=g*10;else if(P.key==="PageDown")F=-g*10;else if(P.key==="Home"){w(p);return}else if(P.key==="End"){w(C);return}}else if(P.key==="ArrowUp")F=g;else if(P.key==="ArrowDown")F=-g;else if(P.key==="Home"){w(p);return}else if(P.key==="End"){w(C);return}F!==0&&(P.preventDefault(),w(h+F))},[c,a,g,p,C,h,w]),D=ec(h,p,C,S,N);return d.jsx("div",{ref:I,role:"presentation",className:TK({size:i,orientation:a,disabled:c,className:u}),style:LK(e,n,a),onPointerDown:j,...f,children:d.jsx(bi,{size:i,percent:D,orientation:a,disabled:c,active:v,ariaLabel:AK[e],ariaValueNow:h,ariaValueMin:p,ariaValueMax:C,onPointerDown:k,onKeyDown:G})})});Lo.displayName="ColorSliderTrack";const hy=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(Ep,i),children:a}):d.jsxs("div",{ref:u,className:R(Ep,i),children:[r?d.jsxs("div",{className:yK,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??py[e]})]}):null,d.jsx(Lo,{channel:e,color:n,size:o,orientation:s,...c})]})});hy.displayName="ColorSliderRoot";const Ip={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"},wp={circle:"rounded-full",rounded:"rounded-small",square:"rounded-none"};function wK(t,e){if(typeof e["aria-label"]=="string")return e["aria-label"];if(typeof e["aria-labelledby"]!="string")return`Select color ${t}`}const $s=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:C,handlePointerEnter:g,handlePointerLeave:h,handlePointerDown:b}=Ji({isGloss:!1,animated:!0,enabled:!s,hasHoverShadow:!0,forwardedRef:p,onPointerEnter:c,onPointerLeave:u,onPointerDown:f}),{"aria-label":x,..._}=m,v=!!a,y=typeof x=="string"||typeof _["aria-labelledby"]=="string";if(!v&&!y)return d.jsx("span",{"aria-hidden":!0,className:R("relative shrink-0 overflow-hidden",Ip[n],wp[r],i),style:{backgroundColor:e}});const S=x??(v?wK(e,m):void 0);return d.jsx("button",{ref:C,type:"button",disabled:s,onClick:a,onPointerEnter:g,onPointerLeave:h,onPointerDown:b,"aria-label":S,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,Ip[n],wp[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},..._})});$s.displayName="ColorSwatch";function RK({size:t}){const{hsva:e,setHsva:n}=Oa(),r=Yo(),{areaRef:o,handlePointerDown:s}=J3({hsva:e,setHsva:n}),i=Yi(e.h),a=dy(e);return d.jsx("div",{ref:o,role:"group","aria-label":X3,className:_K(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(aK,r.areaThumb),style:{left:`${e.s}%`,top:`${100-e.v}%`,width:"14px",height:"14px",backgroundColor:a}})})}function NK({hex:t,setHsva:e}){const n=Yo(),[r,o]=l.useState(!1),[s,i]=l.useState(""),a=l.useCallback(u=>{const f=`#${u}`,m=Us(f);m&&e(m)},[e]),c=r?s:t.slice(1);return d.jsxs("div",{className:mt(dK,n.hexInput),children:[d.jsx("span",{className:mt(fK,n.hexPrefix),children:"#"}),d.jsx("input",{type:"text",value:c,maxLength:8,spellCheck:!1,"aria-label":K3,className:mt(mK,n.hexInputField,Lt),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 DK({hsva:t,setHsva:e}){const n=Yo();return d.jsxs("div",{className:mt(pK,n.alphaInput),children:[d.jsx("input",{type:"text",value:Math.round(t.a),"aria-label":q3,className:mt(hK,n.alphaInputField,Lt),onChange:r=>{const o=parseInt(r.target.value,10);Number.isNaN(o)||e({...t,a:Cs(o,0,100)})}}),d.jsx("span",{className:mt(gK,n.alphaSuffix),children:"%"})]})}function OK({presets:t,hex:e,setHsva:n,size:r}){const o=Yo();return d.jsx("div",{className:mt(CK,o.presets),children:t.map(s=>d.jsx($s,{color:s,size:my[r],shape:"rounded",selected:e.toLowerCase()===s.toLowerCase(),className:o.presetSwatch,onClick:()=>{const i=Us(s);i&&n(i)}},s))})}const gy=l.forwardRef(function({swatchSize:e,className:n,...r},o){const{hex:s,disabled:i,size:a}=Oa(),c=Yo();return d.jsx(Ot.Trigger,{ref:o,className:mt(c.trigger,n),...r,children:d.jsx($s,{color:s,size:e??my[a],shape:"rounded",disabled:i,"aria-label":Z3(s)})})});gy.displayName="ColorPickerTrigger";const Cy=l.forwardRef(function({showAlpha:e=!1,presets:n,className:r,...o},s){const{hsva:i,setHsva:a,hex:c,size:u}=Oa(),f=Yo(),m=nK[u];return d.jsx(Ot.Content,{ref:s,unstyled:!0,offset:ws,align:"start","aria-label":Y3,className:mt(f.content,r),children:d.jsxs("div",{className:xK(u,f.contentPanel),...o,children:[d.jsx(RK,{size:u}),d.jsxs("div",{className:mt(lK,f.slidersRow),children:[d.jsx($s,{color:c,size:"mid",shape:"circle",className:mt("shrink-0",f.previewSwatch)}),d.jsxs("div",{className:cK,children:[d.jsx(Lo,{channel:"hue",color:i,value:i.h,size:m,className:f.hueSlider,onValueChange:p=>a({...i,h:p})}),e?d.jsx(Lo,{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(NK,{hex:c,setHsva:a}),e?d.jsx(DK,{hsva:i,setHsva:a}):null]}),n&&n.length>0?d.jsx(OK,{presets:n,hex:c,setHsva:a,size:u}):null]})})});Cy.displayName="ColorPickerContent";function PK({value:t,defaultValue:e=fy,onValueChange:n,size:r="base",disabled:o=!1}){const s=t!==void 0,[i,a]=l.useState(()=>tK(t,e)),c=l.useMemo(()=>s&&t!=null?Us(t)??i:i,[i,s,t]),u=l.useCallback(p=>{s||a(p),n==null||n(_c(p))},[s,n]),f=_c(c);return{contextValue:l.useMemo(()=>({hsva:c,setHsva:u,hex:f,disabled:o,size:r}),[c,u,f,o,r])}}function by({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}=PK({value:e,defaultValue:n,onValueChange:r,size:a,disabled:f});return d.jsx($3,{value:p,children:d.jsx(W3,{classNames:m,children:d.jsx(Ot,{open:o,defaultOpen:s,onOpenChange:i,side:u,variant:c==="gloss"?"gloss":"default",children:t})})})}by.displayName="ColorPickerRoot";const kK=Object.assign(by,{Trigger:gy,Content:Cy}),BK=Object.assign(hy,{Track:Lo}),qf=l.createContext(null),Sc=l.createContext({});function jK({value:t,children:e}){return d.jsx(qf.Provider,{value:t,children:e})}function MK({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 xy(){const t=l.useContext(qf);if(!t)throw new Error("Components TimeField must be inside <TimeField>.");return t}function FK(){return l.useContext(qf)}function Ws(){return l.useContext(Sc)}const GK="Time",HK={h:"hours",m:"minutes",s:"seconds"};function zK({labelConnected:t,labelId:e}){return{"aria-label":t?void 0:GK,"aria-labelledby":t?e:void 0}}function VK({seg:t,value:e,isRequired:n,isDanger:r,isFirstSegment:o,disabled:s}){return{role:"spinbutton","aria-label":HK[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 UK(t){return t==="danger"||t==="default"?"default":t}function jt(...t){return R(...t)}const vc={h:23,m:59,s:59};function Rp(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 $K(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 Np(t,e){return t[e]}function Wn(t,e,n){const r=Math.max(0,Math.min(vc[e],n));return{...t,[e]:r}}function WK(t,e,n,r){const o=t!==void 0,[s,i]=l.useState(()=>Rp(t??e)),a=o?Rp(t):s,c=l.useCallback(u=>{o||i(u),r==null||r($K(u,n))},[n,o,r]);return[a,c,o]}function XK(t){return t==="HH:mm:ss"?["h","m","s"]:["h","m"]}function YK(t){return t==="segmented"||t==="gloss"?"default":t}const KK={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},qK={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},ZK="bg-primary-tint",QK="border-r-token",JK="border-l-token",e4=`pointer-events-none absolute h-px w-px opacity-0 ${Lt}`,t4="inline-flex min-w-[2ch] select-none items-center justify-center outline-none",n4="h-[1.65em] min-w-[2.25ch] rounded-small px-[3px] bg-default-hover",r4="rounded-[3px] px-[2px]",o4="bg-primary text-primary-foreground",s4="cursor-not-allowed",i4="cursor-default",a4="inline-flex w-[0.45em] shrink-0 select-none items-center justify-center self-center text-muted",l4="mx-[1px]",c4="relative flex min-w-0 flex-1 items-center font-mono tabular-nums leading-none",u4="flex min-w-0 w-full items-stretch",d4="gap-xsmall",f4={small:wn("small"),base:wn("base"),mid:wn("mid"),large:wn("large")};function m4(t){return t==="default"?ZK:qK[t]}function p4({side:t,status:e,size:n,slotClass:r}){return jt(f4[n],m4(e),t==="prefix"?QK:JK,r)}function h4({variant:t,status:e,statusTinted:n}){return Rs({variant:t==="segmented"?"default":t,statusTinted:n&&e!=="default",statusTintClass:e!=="default"?KK[e]:""})}function g4({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,YK(t)),u?s:i,n?"cursor-not-allowed opacity-55 shadow-token-base":"",a,c)}function C4({variant:t}){return jt(u4,!(t==="gloss")&&jt("min-h-full"))}function b4({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(c4,n?"justify-center px-small":o.padX,o.padY,t==="segmented"&&d4,s,r)}function x4({variant:t,focused:e,disabled:n,slotClass:r}){return jt(t4,t==="segmented"?n4:r4,e&&o4,n?s4:i4,r)}function _4({variant:t,slotClass:e}){return jt(a4,t==="segmented"&&l4,e)}function S4({compact:t,slotClass:e,className:n}){return jt(t&&"w-fit",e,n)}function v4({shellRef:t,disabled:e,variant:n,onPointerDown:r,onPointerEnter:o,onPointerLeave:s}){const i=n==="gloss",a=Mo(t,!e&&!i),c=Do(t,!e&&i),u=l.useCallback((C,g)=>{g(C),!e&&i&&c.bindShellRef(C)},[e,c,i]),f=l.useCallback(C=>{if(r==null||r(C),C.defaultPrevented||e||i)return;const g=t.current;!g||de()||We(g)},[e,i,r,t]),m=l.useCallback(C=>{o==null||o(C),!C.defaultPrevented&&(i?c.onShellPointerEnter(C):a.onShellPointerEnter(C))},[c,i,o,a]),p=l.useCallback(C=>{s==null||s(C),i?c.onShellPointerLeave(C):a.onShellPointerLeave(C)},[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 y4({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:C}){const g=FK(),h=s??(g==null?void 0:g.size)??"base",b=i??(g==null?void 0:g.status)??"default",x=a??(g==null?void 0:g.variant)??"default",_=c??(g==null?void 0:g.compact)??!1,v=x==="gloss",y=g==null?void 0:g.fieldId,S=(g==null?void 0:g.labelId)??"",T=(g==null?void 0:g.labelConnected)??!1,L=(g==null?void 0:g.isRequired)??!1,[A,E]=WK(t,e,r,n),I=l.useRef(null),[w,N]=l.useState(null),O=l.useRef(null),j=l.useRef(null),k=l.useRef(null),G=l.useRef(null),D=l.useRef(null),P=l.useMemo(()=>({h:k,m:G,s:D}),[]),F=l.useMemo(()=>XK(r),[r]),B=l.useCallback(q=>{O.current=q,typeof C=="function"?C(q):C&&(C.current=q)},[C]),$=v4({shellRef:O,disabled:o,variant:x,onPointerDown:f,onPointerEnter:m,onPointerLeave:p}),W=l.useCallback(q=>{$.bindShellRef(q,B)},[B,$]),M=l.useCallback(q=>{var se,ue;I.current=null,N(q),(se=O.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=I.current;q&&(E(Wn(A,q.seg,q.digit)),I.current=null)},[A,E]),oe=l.useCallback((q,se)=>{const ue=vc[q],ke=I.current;if(ke&&ke.seg===q){const ft=ke.digit*10+se;ft>ue?(E(Wn(A,q,ke.digit)),se*10>ue?(E(Wn(A,q,Math.min(se,ue))),I.current=null,z(q,"next")):I.current={seg:q,digit:se}):(E(Wn(A,q,ft)),I.current=null,z(q,"next"))}else se*10>ue?(E(Wn(A,q,Math.min(se,ue))),I.current=null,z(q,"next")):(I.current={seg:q,digit:se},E(Wn(A,q,se)))},[A,z,E]),pe=l.useCallback((q,se)=>{if(o)return;const ue=vc[se],ke=parseInt(q.key,10);if(!Number.isNaN(ke))q.preventDefault(),oe(se,ke);else if(q.key==="ArrowUp"){q.preventDefault(),I.current=null;const ft=Np(A,se);E(Wn(A,se,ft>=ue?0:ft+1))}else if(q.key==="ArrowDown"){q.preventDefault(),I.current=null;const ft=Np(A,se);E(Wn(A,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,A,z,E]),ce=l.useCallback(q=>{const se=O.current,ue=q.relatedTarget;if(!(se&&ue&&se.contains(ue))){if(se&&ue==null){requestAnimationFrame(()=>{const ke=document.activeElement;se.contains(ke)||(H(),N(null))});return}H(),N(null)}},[H]),Y=l.useCallback(q=>{I.current=null,N(q)},[]),ne=l.useCallback(q=>{const se=q.currentTarget.value;if(q.currentTarget.value="",!(o||!w))for(const ue of se){const ke=parseInt(ue,10);Number.isNaN(ke)||oe(w,ke)}},[oe,o,w]),me=l.useCallback(q=>{o||!w||pe(q,w)},[o,w,pe]),re=l.useCallback((q,se)=>{q.stopPropagation(),M(se)},[M]),be=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=I.current)==null?void 0:se.seg)===q&&w===q},U=q=>te(q)?String(I.current.digit):String(A[q]).padStart(2,"0"),he=h4({variant:x,status:b,statusTinted:b==="danger"||b==="success"||b==="warning"}),Ne=zK({labelConnected:T,labelId:S}),Ye=Ft(g!=null&&g.hintConnected?g.hintId:void 0,g!=null&&g.errorConnected?g.errorId:void 0);return{size:h,status:b,variant:x,compact:_,disabled:o,isGloss:v,format:r,fieldId:y,controlId:u??y,shellAria:Ne,ariaDescribedBy:Ye,isRequired:L,hms:A,segments:F,segRefById:P,keyboardInputRef:j,bindShellRef:W,shellMotion:$,shellSurface:he,focusedSeg:w,handleSegKeyDown:pe,handleFieldBlur:ce,handleSegFocus:Y,handleKeyboardInput:ne,handleKeyboardInputKeyDown:me,handleSegClick:re,handleShellClick:be,segDisplay:U}}function Dp({side:t,status:e,size:n,className:r,children:o}){return d.jsx("span",{className:p4({side:t,status:e,size:n,slotClass:r}),children:o})}const Pa=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:C,className:g,id:h,onPointerDown:b,onPointerEnter:x,onPointerLeave:_,...v}=e,y=Ws(),S=y4({value:r,defaultValue:o,onValueChange:s,format:i,disabled:a,size:c,status:u,variant:f,compact:m,id:h,onPointerDown:b,onPointerEnter:x,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:g4({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:C4({variant:S.variant}),onClick:S.handleShellClick,children:[p!=null?d.jsx(Dp,{side:"prefix",status:S.status,size:S.size,className:y.prefix,children:p}):null,d.jsxs("div",{className:b4({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(e4,y.keyboardInput,Lt),onInput:S.handleKeyboardInput,onKeyDown:S.handleKeyboardInputKeyDown,onBlur:S.handleFieldBlur}),S.segments.map((T,L)=>d.jsxs("span",{className:"inline-flex items-center",children:[L>0&&d.jsx("span",{"aria-hidden":!0,className:_4({variant:S.variant,slotClass:y.segmentSeparator}),children:":"}),d.jsx("span",{ref:S.segRefById[T],...VK({seg:T,value:S.hms[T],isRequired:S.isRequired,isDanger:S.status==="danger",isFirstSegment:T===S.segments[0],disabled:S.disabled}),className:x4({variant:S.variant,focused:S.focusedSeg===T,disabled:S.disabled,slotClass:y.segment}),onKeyDown:A=>S.handleSegKeyDown(A,T),onFocus:()=>S.handleSegFocus(T),onBlur:S.handleFieldBlur,onClick:A=>S.handleSegClick(A,T),children:S.segDisplay(T)})]},T))]}),C!=null?d.jsx(Dp,{side:"suffix",status:S.status,size:S.size,className:y.suffix,children:C}):null]})})});Pa.displayName="TimeFieldControl";function _y({className:t,classNames:e,...n}){const r=Ws();return d.jsx(Ue,{className:t,classNames:{...e,root:jt(r.label,e==null?void 0:e.root)},...n})}_y.displayName="TimeFieldLabel";function ka({children:t,id:e,className:n,...r}){const o=xy(),s=Ws();return d.jsx(Xe,{id:e??o.hintId,status:UK(o.status),className:jt(s.hint,n),...r,children:t})}ka.displayName="TimeFieldHint";function Ba({children:t,id:e,className:n,...r}){const o=xy(),s=Ws();return d.jsx(Ze,{id:e??o.errorId,role:"alert",className:jt(s.error,n),...r,children:t})}Ba.displayName="TimeFieldError";function A4({label:t,hint:e,error:n,labelId:r,controlProps:o}){const s=Ws();return d.jsxs(d.Fragment,{children:[t!=null?d.jsx(Ue,{id:r,classNames:{root:s.label},children:t}):null,d.jsx(Pa,{...o}),e!=null&&d.jsx(ka,{children:e}),n!=null&&d.jsx(Ba,{children:n})]})}function T4({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),C=Kt(m),g=`${m}-label`,h=qt(t),b=e!=null||h&&Ae(t,"Label"),x=n!=null||h&&Ae(t,"TimeFieldHint"),_=r!=null||h&&Ae(t,"TimeFieldError"),v=l.useMemo(()=>({fieldId:m,labelId:g,labelConnected:b,hintId:p,errorId:C,hintConnected:x,errorConnected:_,isRequired:s,status:i,size:a,variant:c,compact:u}),[u,C,m,_,x,b,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 Sy({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:C,format:g,disabled:h,compact:b=!1,prefix:x,suffix:_,...v}){const y=T4({children:t,label:e,hint:n,error:r,id:i,isRequired:a,status:c,size:u,variant:f,compact:b}),S=y.isCompound?t:d.jsx(A4,{label:y.label,hint:y.hint,error:y.error,labelId:y.fieldCtx.labelId,controlProps:{id:y.fieldId,value:m,defaultValue:p,onValueChange:C,format:g,disabled:h,size:y.size,status:y.status,variant:y.variant,compact:y.compact,prefix:x,suffix:_}});return d.jsx(jK,{value:y.fieldCtx,children:d.jsx(MK,{classNames:s,children:d.jsx(Xt.Provider,{value:y.fieldLabelCtx,children:d.jsx(pn,{className:S4({compact:y.compact,slotClass:s==null?void 0:s.root,className:o}),...v,children:S})})})})}Sy.displayName="TimeField";const L4=Object.assign(Sy,{Label:_y,Control:Pa,Hint:ka,Error:Ba});function ja(){return{"aria-hidden":!0,role:"presentation"}}const Ma="relative overflow-hidden bg-primary-tint",E4="pointer-events-none absolute inset-0 -translate-x-full",I4="rounded-full",w4="h-control-base w-control-base",R4="flex flex-col gap-small",N4="h-[1em] rounded-small",D4="w-3/5",O4="w-full",P4="rounded-mid px-mid py-plus",k4={none:"rounded-none",small:"rounded-small",mid:"rounded-mid",full:"rounded-full"},B4="skeleton-pulse 1.6s ease-in-out infinite",j4="skeleton-wave-slide 2s linear 0.2s infinite",M4="skeleton-shimmer 2s linear infinite",F4="linear-gradient(90deg, transparent 0%, var(--color-primary-tint-strong) 50%, transparent 100%)",G4="linear-gradient(90deg, var(--color-primary-tint) 0%, var(--color-primary-tint-strong) 50%, var(--color-primary-tint) 100%)";function H4(){return{animation:B4}}function z4(){return{backgroundImage:G4,backgroundSize:"400% 100%",animation:M4}}function V4(){return{animation:j4,background:F4}}function U4(t){return k4[t]}function $4(t){return`${t*.06}s`}function Eo(...t){return R(...t)}function Fa(t){return t==="pulse"?H4():t==="shimmer"?z4():{}}function Ga({className:t,style:e}){return d.jsx("span",{"aria-hidden":!0,className:Eo(E4,t),style:{...V4(),...e}})}const vy=l.forwardRef(function({variant:e="wave",size:n=w4,className:r,classNames:o,style:s,...i},a){return d.jsx("div",{ref:a,className:Eo(Ma,I4,n,o==null?void 0:o.root,r),style:{...Fa(e),...s},...ja(),...i,children:e==="wave"?d.jsx(Ga,{className:o==null?void 0:o.wave}):null})});vy.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?D4:O4);return d.jsx("div",{ref:c,className:Eo(R4,s==null?void 0:s.root,o),style:i,...ja(),...a,children:u.map((f,m)=>d.jsx("div",{className:Eo(Ma,N4,f,s==null?void 0:s.line),style:{...Fa(e),animationDelay:$4(m)},children:e==="wave"?d.jsx(Ga,{className:s==null?void 0:s.wave}):null},f))})});yy.displayName="SkeletonText";const Ay=l.forwardRef(function({variant:e="wave",className:n,classNames:r,style:o,children:s,...i},a){return d.jsxs("div",{ref:a,className:Eo(Ma,P4,r==null?void 0:r.root,n),style:{...Fa(e),...o},...ja(),...i,children:[e==="wave"?d.jsx(Ga,{className:r==null?void 0:r.wave}):null,s]})});Ay.displayName="SkeletonBlock";function W4({variant:t="wave",radius:e="small"}){return{variant:t,radius:e,isWave:t==="wave"}}const Ty=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}=W4({variant:e,radius:n});return d.jsxs("div",{ref:c,className:Eo(Ma,U4(f),o==null?void 0:o.root,r),style:{...Fa(u),...s},...ja(),...a,children:[m?d.jsx(Ga,{className:o==null?void 0:o.wave}):null,i]})});Ty.displayName="Skeleton";const X4=Object.assign(Ty,{Circle:vy,Text:yy,Block:Ay}),Ly=l.createContext(null);function Y4({value:t,children:e}){return d.jsx(Ly.Provider,{value:t,children:e})}function K4(){return l.useContext(Ly)}const Ey=l.createContext(null);function q4({value:t,children:e}){return d.jsx(Ey.Provider,{value:t,children:e})}function Zf(){const t=l.useContext(Ey);if(!t)throw new Error("Disclosure parts must be inside <Disclosure>.");return t}const yc=l.createContext({});function Iy({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 Qf(){return l.useContext(yc)}function xt(...t){return R(...t)}function Z4(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function Q4(t){return t==="outline"||t==="secondary"||t==="default"}function J4(t){return t.displayName}function eq(t){const e=[],n=[],r=[],o=[];return l.Children.forEach(t,s=>{if(!l.isValidElement(s)){o.push(s);return}const i=J4(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 wy={small:"p-base",base:"p-plus",mid:"p-mid",large:"p-large"},tq={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"},Op={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()),nq={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)},rq="flex w-full select-none items-center gap-small text-left outline-none focus-ring py-base",oq="cursor-not-allowed opacity-48",sq="cursor-pointer",iq="min-w-0 flex-1 origin-center will-change-transform",aq="block",lq="inline-flex shrink-0 origin-center items-center justify-center text-muted",cq="text-primary",uq="overflow-hidden",dq="flex touch-none select-none shrink-0 cursor-grab items-center justify-center border-t-token py-xsmall active:cursor-grabbing",fq="pointer-events-none opacity-48",mq="h-1 w-10 rounded-full bg-tertiary",pq="gloss-panel gloss-deep rounded-mid text-foreground",hq="gloss-content text-muted";function Ry(t){const e=le[t];return{padX:e.padX,text:e.controlText,chevron:e.chevronIcon}}function gq({variant:t,groupedCardShell:e,className:n,slotClass:r}){const o=t==="card"&&e?"":tq[t];return xt(o,n,r)}function Cq({variant:t,size:e,disabled:n,className:r,slotClass:o}){const s=Ry(e);return xt(rq,s.padX,nq[t],n?oq:sq,r,o)}function bq(t){if(t==="outline"||t==="secondary"||t==="gloss")return"pt-xsmall"}function xq({variant:t,size:e,className:n,slotClass:r}){const o=Q4(t);return xt(wy[e],o&&t==="outline"&&Op.outline,o&&t==="secondary"&&Op.secondary,t==="card"&&"border-t-token",t==="ghost"&&"text-muted",t==="default"&&"text-muted",n,r)}function _q(t,e){return xt(hq,wy[t],e)}function Sq({separated:t,variant:e,className:n,slotClass:r}){return xt("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 vq(t){return t!=null&&!t.separated&&t.variant==="card"}function yq({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),C=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&&V(S)}},[]),l.useEffect(()=>{if(!e)return;C.current=!1;const S=p.current;S&&V(S)},[e]);const b=l.useCallback(S=>{i==null||i(S),!(S.defaultPrevented||e)&&n(!t)},[e,i,t,n]),x=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;C.current=!0;const T=p.current;!T||Re()||pt(T,!0)},[e,c]),v=l.useCallback(S=>{u==null||u(S),C.current=!1;const T=p.current;!T||Re()||pt(T,!1)},[u]),y=l.useCallback(S=>{if(f==null||f(S),S.defaultPrevented||e)return;const T=p.current;!T||de()||We(T,{pointerInside:C.current})},[e,f]);return{setRefs:g,titleLiftRef:p,bindChevronRef:h,handleClick:b,handleKeyDown:x,handlePointerEnter:_,handlePointerLeave:v,handlePointerDown:y,mergeRefs:Z4}}const Pp=.38,Aq=.45,Tq=-.45;function Lq(t){return t.getBoundingClientRect().height}function Eq(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 Iq(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=Bi(f);if(m<=0)return;const p=c.currentTarget;p.setPointerCapture(c.pointerId);const C=c.clientY,g=Lq(u);let h=C,b=performance.now(),x=0;V(u,n.current),u.style.overflow="hidden",u.style.willChange="height";const _=y=>{if(y.pointerId!==c.pointerId)return;const S=y.clientY,T=S-C,L=performance.now(),A=L-b;A>0&&(x=(S-h)/A),h=S,b=L;const E=Math.max(0,Math.min(m,g+T));u.style.height=`${E}px`,Eq(n.current,E,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 T=y.clientY-C,A=Math.max(0,Math.min(m,g+T))/m,E={...ve(),overwrite:"auto"},I=A>=Pp||x>Aq,w=A<=1-Pp||x<Tq;if(V(u,n.current),!r&&I){const k=X.timeline({onComplete:()=>{u.style.willChange="",u.style.height="auto",u.style.overflow="",i&&(i.current=!0),o(!0)}});k.to(u,{height:m,...E},0),n.current&&k.to(n.current,{rotation:180,...E},0);return}if(r&&w){const k=X.timeline({onComplete:()=>{u.style.willChange="",u.style.height="0px",u.style.overflow="hidden",i&&(i.current=!0),o(!1)}});k.to(u,{height:0,...E},0),n.current&&k.to(n.current,{rotation:0,...E},0);return}const N=A>=.5,O=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:O,...E},0),n.current&&j.to(n.current,{rotation:N?180:0,...E},0)};p.addEventListener("pointermove",_),p.addEventListener("pointerup",v),p.addEventListener("pointercancel",v)},[n,s,e,r,o,t,i])}}function Ny({className:t,onPointerDown:e,...n}){const r=Qf(),{variant:o,disabled:s,dragHandle:i,shellRef:a,innerRef:c,chevronRef:u,open:f,setOpen:m,skipContentAnimRef:p}=Zf(),{onPointerDown:C}=Iq(a,c,u,f,m,s,p);return!i||o!=="card"?null:d.jsx("div",{"aria-hidden":!0,className:xt(dq,s&&fq,r.handle,t),onPointerDown:g=>{e==null||e(g),C(g)},...n,children:d.jsx("span",{className:mq})})}Ny.displayName="DisclosureHandle";const Dy=l.forwardRef(function({children:e,className:n,...r},o){const s=Qf(),{open:i,panelId:a,triggerId:c,size:u,variant:f,shellRef:m,innerRef:p,skipContentAnimRef:C}=Zf();ob(i,m,p,{skipAnimRef:C});const g=rb(m,i),h=l.useCallback(_=>{g(_),typeof o=="function"?o(_):o&&(o.current=_)},[g,o]),b=bq(f),x=f==="gloss";return d.jsx("div",{ref:h,"aria-hidden":!i,className:xt(uq,s.contentShell),children:d.jsx("div",{ref:p,className:xt(b,s.contentWrap),children:x?d.jsx("section",{id:a,"aria-labelledby":c,className:xt(s.contentPanel,n),...r,children:d.jsx("div",{className:xt(pq,s.glossPanel),children:d.jsx("div",{className:_q(u,s.glossContent),children:e})})}):d.jsx("section",{id:a,"aria-labelledby":c,className:xq({variant:f,size:u,className:n,slotClass:s.contentPanel}),...r,children:e})})})});Dy.displayName="DisclosureContent";const Oy=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=Qf(),{open:C,setOpen:g,triggerId:h,panelId:b,variant:x,size:_,disabled:v,iconPos:y,chevronRef:S,skipContentAnimRef:T}=Zf(),L=Ry(_),A=yq({open:C,disabled:v,setOpen:g,chevronRef:S,skipContentAnimRef:T,forwardedRef:m,onClick:i,onKeyDown:s,onPointerEnter:a,onPointerLeave:c,onPointerDown:u}),E=n!==null?d.jsx("span",{ref:A.bindChevronRef,"aria-hidden":!0,className:xt(lq,L.chevron,gn,C&&cq,p.triggerChevron),children:n??d.jsx(Ie.IoChevronDown,{className:"size-full"})}):null;if(r&&l.isValidElement(e)){const I=e;return l.cloneElement(I,{...f,id:h,ref:A.mergeRefs(m,A.setRefs,I.props.ref),className:xt(I.props.className,o),disabled:v||I.props.disabled,"aria-expanded":C,"aria-controls":b,onClick:w=>{var N,O;(O=(N=I.props).onClick)==null||O.call(N,w),A.handleClick(w)},onKeyDown:w=>{var N,O;(O=(N=I.props).onKeyDown)==null||O.call(N,w),A.handleKeyDown(w)}})}return d.jsxs("button",{ref:A.setRefs,id:h,type:"button","aria-expanded":C,"aria-controls":b,disabled:v,className:Cq({variant:x,size:_,disabled:v,className:o,slotClass:p.trigger}),onClick:A.handleClick,onKeyDown:A.handleKeyDown,onPointerEnter:A.handlePointerEnter,onPointerLeave:A.handlePointerLeave,onPointerDown:A.handlePointerDown,...f,children:[y==="left"&&E,d.jsx("span",{ref:A.titleLiftRef,className:xt(iq,p.triggerTitleLift),children:d.jsx(ee,{as:"span",variant:L.text,className:xt(aq,C?"text-primary":"text-foreground",p.triggerTitle),children:e})}),y==="right"&&E]})});Oy.displayName="DisclosureTrigger";function wq(t){return`disclosure-trigger-${t}`}function Rq(t){return`disclosure-panel-${t}`}function Nq({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=K4(),m=f!==null&&o!==void 0&&f.accordion,p=m?f.openValue===o:void 0,[C,g]=l.useState(n),h=m?p:e!==void 0?e:C,b=l.useCallback(O=>{m?f.setOpenValue(O?o??null:null):(e===void 0&&g(O),r==null||r(O))},[m,f,o,e,r]),x=l.useId(),_=wq(x),v=Rq(x),y=l.useRef(null),S=l.useRef(null),T=l.useRef(null),L=l.useRef(!1),A=s??(f==null?void 0:f.variant)??"default",E=i??(f==null?void 0:f.size)??"base",I=vq(f),w=l.useMemo(()=>({open:h,setOpen:b,triggerId:_,panelId:v,variant:A,size:E,disabled:a,iconPos:c,dragHandle:u,shellRef:y,innerRef:S,chevronRef:T,skipContentAnimRef:L}),[a,u,c,h,v,b,E,_,A]),N=u&&A==="card"?eq(t):t;return{contextValue:w,variant:A,groupedCardShell:I,orderedChildren:N}}const Py=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,...C},g){const h=Nq({children:e,open:o,defaultOpen:s,onOpenChange:i,value:a,variant:c,size:u,disabled:f,iconPos:m,dragHandle:p});return d.jsx(q4,{value:h.contextValue,children:d.jsx(Iy,{classNames:r,children:d.jsx("div",{ref:g,className:gq({variant:h.variant,groupedCardShell:h.groupedCardShell,className:n,slotClass:r==null?void 0:r.root}),...C,children:h.orderedChildren})})})});Py.displayName="Disclosure";function Dq({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(C=>{const g=t&&C===f?null:C;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 ky=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 C=Dq({accordion:n,separated:r,variant:o,size:s,value:i,defaultValue:a,onValueChange:c});return d.jsx(Y4,{value:C.contextValue,children:d.jsx(Iy,{classNames:f,children:d.jsx("div",{ref:p,className:Sq({separated:C.separated,variant:C.variant,className:u,slotClass:f==null?void 0:f.group}),...m,children:e})})})});ky.displayName="DisclosureGroup";const Oq=Object.assign(Py,{Trigger:Oy,Handle:Ny,Content:Dy});exports.Accordion=XP;exports.Alert=kP;exports.AlertDialog=fB;exports.Avatar=W$;exports.AvatarGroup=ev;exports.Badge=sX;exports.Breadcrumbs=NW;exports.Button=yo;exports.ButtonGroup=hk;exports.ButtonGroupText=ex;exports.COMPONENT_SIZES=FA;exports.CONTROL_SIZE_LAYOUT=le;exports.Calendar=U3;exports.Card=FU;exports.Checkbox=kG;exports.CheckboxGroup=lk;exports.CloseButton=Fo;exports.ColorPicker=kK;exports.ColorSlider=BK;exports.ColorSliderTrack=Lo;exports.ColorSwatch=$s;exports.ComboBox=NC;exports.ConvergeRippleLayer=lg;exports.Dialog=xB;exports.Disclosure=Oq;exports.DisclosureGroup=ky;exports.Drawer=yM;exports.Dropdown=wr;exports.DropdownGroup=Bu;exports.DropdownItem=$u;exports.DropdownItemHint=Vu;exports.DropdownItemIcon=Uu;exports.DropdownItemIndicator=ua;exports.DropdownItemLabel=zu;exports.DropdownLabel=ju;exports.DropdownPopover=ki;exports.DropdownSeparator=Mu;exports.DropdownSub=Fu;exports.DropdownSubContent=Hu;exports.DropdownSubTrigger=Gu;exports.DropdownTrigger=ku;exports.EN_LOCALE=sy;exports.Expandable=jn;exports.FIELD_SHELL_FOCUS_CLASS=Ur;exports.FIELD_SHELL_TRANSITION_CLASS=Vr;exports.FONT_WEIGHT_CSS_VAR=eE;exports.FONT_WEIGHT_DEFAULTS=tE;exports.Field=nI;exports.FieldLegend=ys;exports.FieldLegendHeader=ta;exports.FieldSet=yg;exports.FieldSetActions=Bo;exports.FieldSetGroup=Fr;exports.Form=rk;exports.Input=RD;exports.Kbd=yX;exports.Label=Ue;exports.Link=WM;exports.LinkIcon=Vd;exports.ListBox=Ir;exports.Loading=Bd;exports.Meter=SV;exports.Pagination=h5;exports.Popover=Ot;exports.ProgressBar=dU;exports.RIPPLE_COLOR=mi;exports.Radio=mH;exports.RadioGroup=fk;exports.Ripple=vs;exports.SHADOW_CSS_VAR=bs;exports.SHADOW_LIFT_MOTION_CLASS=ir;exports.SearchInput=qu;exports.Select=tG;exports.SelectionIndicator=Bt;exports.SelectionThumb=_a;exports.SelectionThumbIcon=Sa;exports.Separator=Pu;exports.Skeleton=X4;exports.Slider=j2;exports.Surface=wv;exports.Switch=hz;exports.TABLE_ROW_TONE_SURFACE=$v;exports.TOAST_SCRIM_CSS_VAR=Tn;exports.TOAST_SCRIM_DEFAULTS=OA;exports.Table=xY;exports.Tabs=Fz;exports.Text=ee;exports.TextArea=xF;exports.TimeField=L4;exports.TimeFieldControl=Pa;exports.TimeFieldError=Ba;exports.TimeFieldHint=ka;exports.Toast=xj;exports.ToastContext=kd;exports.ToggleButton=ux;exports.ToggleButtonGroup=c1;exports.Tooltip=xi;exports.affixSlotClass=wn;exports.affixToggleMinWClass=qp;exports.animateInteractiveHoverLift=pt;exports.animateInteractivePressSqueeze=We;exports.burneFontWeightScale=JL;exports.burneShadowScale=NA;exports.buttonGroupTextFrameClass=YC;exports.buttonRippleTone=VE;exports.buttonRootClass=eu;exports.buttonSpinnerClass=ig;exports.cn=R;exports.colorToken=_e;exports.configureMotion=IL;exports.controlShellClass=NE;exports.createConvergeRippleAtPointer=tu;exports.createConvergeRippleFromPointer=XE;exports.designTokenNames=rE;exports.ensureRippleEase=Xc;exports.fieldErrorId=Kt;exports.fieldHintId=Yt;exports.fieldShellHoverClass=zr;exports.firstLevelHoverShadow=og;exports.fontWeightToken=nE;exports.footerButtonSizeForAlertDialog=Ax;exports.getMotionConfig=Se;exports.gsap=X;exports.hexToHsva=Us;exports.hexToRgba=uy;exports.hsvaToColorString=dy;exports.hsvaToHex=_c;exports.hsvaToRgba=Dr;exports.hueToRgbString=Yi;exports.initElementShadow=Ss;exports.joinFieldDescribedBy=Ft;exports.killMotion=V;exports.prefersReducedInteractiveHoverLift=de;exports.primaryButtonStatusForAlertTone=h1;exports.primaryButtonVariantForAlertTone=p1;exports.readControlHeightPx=Lc;exports.readShadowSize=kL;exports.resolveAlertLiveRole=Cb;exports.resolveAlertStatus=dd;exports.resolveAlertVariant=ud;exports.rgbaToHex=cy;exports.rgbaToHsva=ly;exports.secondLevelShadow=qc;exports.shadowBase=Cn;exports.shadowLarge=PL;exports.shadowMid=eg;exports.shadowNone=_o;exports.shadowToken=DA;exports.shouldSkipInteractiveHoverLift=Re;exports.sliderThicknessToCss=zs;exports.toastScrimToken=Ln;exports.tokensConfig=PA;exports.useAlertDialog=Mn;exports.useCalendar=ro;exports.useColorPicker=Oa;exports.useComboBoxContext=As;exports.useConvergeRipples=cg;exports.useFieldSetErrorId=mu;exports.useFieldSetHintId=fu;exports.useFieldShellHoverLift=Mo;exports.useFormField=KN;exports.useGSAP=Qi;exports.useInteractiveHoverLiftContainerHandlers=ng;exports.useListBox=Rg;exports.usePersistentElShadow=Zc;exports.useSecondLevelShadow=Oo;exports.useSecondLevelShadowContainer=Qc;exports.useTabsContext=La;exports.useToast=bj;exports.useToastContext=Xx;
|