@workday/canvas-kit-mcp 15.0.1 → 15.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -302,7 +302,7 @@ ${s}
302
302
  </svg>`,filename:"wd-icon-x-small.svg",category:"Core",tags:["close","exit","X"]},ne=he({extends:xU,vars:{color:"",accentColor:"",backgroundColor:""},base:({size:e,accentColor:t,backgroundColor:n,color:a})=>({"& svg":{width:M(e,vr.systemIcon.size.lg),height:M(e,vr.systemIcon.size.lg)},".wd-icon .wd-icon-fill":{fill:M(a,vr.systemIcon.color.fill)},".wd-icon .wd-icon-accent, & .wd-icon-accent2":{fill:M(t,M(a,vr.systemIcon.color.accent))},".wd-icon .wd-icon-background":{fill:M(n,"transparent")},"@media (prefers-contrast: more)":{".wd-icon .wd-icon-fill, .wd-icon .wd-icon-accent":{color:"currentColor",fill:"currentColor"}}}),modifiers:{}}),vs=$e("span")({displayName:"SystemIcon",Component:({accent:e,background:t,color:n,icon:a,size:r,...i},o,s)=>p.jsx(jte,{as:s,src:a,type:Or.System,ref:o,...jt(i,ne({size:zte(r,vr.systemIcon.size),color:n,accentColor:e,backgroundColor:t}))})}),Kte=GX($l.as("span"))({position:"relative",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}),Xte=$e("span")({displayName:"ButtonLabel",Component:({children:e,...t},n,a)=>p.jsx(Kte,{as:a,ref:n,...t,children:e})}),Jte=he({base:{display:"inline-block"},modifiers:{size:{extraSmall:{[ne.vars.size]:vr.systemIcon.size.xs},small:{[ne.vars.size]:vr.systemIcon.size.md},medium:{[ne.vars.size]:vr.systemIcon.size.md},large:{[ne.vars.size]:vr.systemIcon.size.lg}}}}),Qte=$e("span")({Component:({icon:e,size:t="medium",shouldMirrorIcon:n=!1,shouldMirrorIconInRTL:a=!1,...r},i,o)=>e===void 0?null:p.jsx(vs,{ref:i,as:o,icon:e,shouldMirror:n,shouldMirrorInRTL:a,...jt(r,Jte({size:t}))})}),X={default:Ka("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),focus:Ka("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),hover:Ka("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),active:Ka("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),disabled:Ka("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius")},q=he({vars:{background:"",border:"",boxShadowInner:"",boxShadowOuter:"",label:"",opacity:"",borderRadius:""},base:({background:e,border:t,boxShadowInner:n,boxShadowOuter:a,label:r,opacity:i,borderRadius:o})=>({fontFamily:ut.default,fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,fontWeight:Xe.bold,backgroundColor:M(X.default.background,M(e,"transparent")),color:M(X.default.label,M(r,L.fg.strong)),borderWidth:fe(1),borderStyle:"solid",gap:_.gap.sm,borderColor:M(X.default.border,M(t,"transparent")),cursor:"pointer",display:"inline-flex",boxShadow:"none",alignItems:"center",justifyContent:"center",outline:`${fe(2)} transparent`,whiteSpace:"nowrap",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",borderRadius:M(X.default.borderRadius,M(o,_.shape.full)),position:"relative",verticalAlign:"middle",overflow:"hidden",[ne.vars.color]:M(X.default.icon,L.fg.strong),transition:"box-shadow 120ms linear, border 120ms linear, background-color 120ms linear, color 120ms linear","&:disabled, &:disabled:active, &.disabled":{cursor:"default",boxShadow:"none",opacity:M(X.default.opacity,M(i,ht.full))},"&:focus-visible, &.focus":{backgroundColor:M(X.focus.background,M(e,"transparent")),borderColor:M(X.focus.border,M(t,"transparent")),color:M(X.focus.label,M(r,L.fg.strong)),[ne.vars.color]:M(X.focus.icon,L.fg.strong),outline:`${fe(2)} solid transparent`,outlineOffset:fe(2),boxShadow:`0 0 0 ${fe(2)} ${M(X.focus.boxShadowInner,M(n,_.color.border.inverse.default))},0 0 0 ${fe(4)} ${M(X.focus.boxShadowOuter,M(a,_.color.brand.focus.primary))}`},"&:hover, &.hover":{backgroundColor:M(X.hover.background,M(e,_.color.surface.contrast.strong)),borderColor:M(X.hover.border,M(t,"transparent")),color:M(X.hover.label,M(r,L.fg.stronger)),[ne.vars.color]:M(X.hover.icon,L.fg.stronger)},"&:hover:active":{transitionDuration:"40ms"},"&:active, &.active":{backgroundColor:M(X.active.background,M(e,"transparent")),borderColor:M(X.active.border,M(t,"transparent")),color:M(X.active.label,M(r,L.fg.strong)),[ne.vars.color]:M(X.active.icon,L.fg.strong)},"&:disabled, &.disabled":{backgroundColor:M(X.disabled.background,M(e,"transparent")),borderColor:M(X.disabled.border,M(t,"transparent")),color:M(X.disabled.label,M(r,L.fg.strong)),[ne.vars.color]:M(X.disabled.icon,"currentColor")},"@media (prefers-contrast: more)":{'&[aria-pressed="true"]':{outline:`${fe(2)} solid transparent`,outlineOffset:`-${fe(1)}`},'&[aria-pressed="true"]:focus-visible, &[aria-pressed="true"].focus':{outline:`${fe(4)} double transparent`,outlineOffset:0}},svg:{pointerEvents:"none"}}),modifiers:{size:{large:{fontSize:_.fontSize.body.sm,lineHeight:_.lineHeight.body.sm,letterSpacing:_.letterSpacing.body.sm,height:_.size.lg,paddingInline:_.padding.xxl,minWidth:Br.size1400},medium:{fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,minWidth:Br.size1200,paddingInline:_.padding.xl,height:_.size.md},small:{fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,height:_.size.sm,minWidth:Br.size1000,paddingInline:_.padding.md,gap:_.gap.xs},extraSmall:{fontSize:_.fontSize.subtext.md,lineHeight:_.lineHeight.subtext.md,letterSpacing:_.letterSpacing.subtext.md,height:_.size.xs,minWidth:"auto",paddingInline:_.padding.sm,gap:_.gap.xs}},grow:{true:{width:"100%",maxWidth:"100%"}},iconPosition:{only:{padding:0},start:{},end:{}}},compound:[{modifiers:{size:"large",iconPosition:"only"},styles:{minWidth:_.size.lg}},{modifiers:{size:"large",iconPosition:"start"},styles:{paddingInlineStart:_.padding.xl,paddingInlineEnd:_.padding.xxl}},{modifiers:{size:"large",iconPosition:"end"},styles:{paddingInlineStart:_.padding.xxl,paddingInlineEnd:_.padding.xl}},{modifiers:{size:"medium",iconPosition:"only"},styles:{minWidth:_.size.md}},{modifiers:{size:"medium",iconPosition:"start"},styles:{paddingInlineStart:_.padding.lg,paddingInlineEnd:_.padding.xl}},{modifiers:{size:"medium",iconPosition:"end"},styles:{paddingInlineStart:_.padding.xl,paddingInlineEnd:_.padding.lg}},{modifiers:{size:"small",iconPosition:"only"},styles:{minWidth:_.size.sm}},{modifiers:{size:"small",iconPosition:"start"},styles:{paddingInlineStart:_.padding.sm,paddingInlineEnd:_.padding.md}},{modifiers:{size:"small",iconPosition:"end"},styles:{paddingInlineStart:_.padding.md,paddingInlineEnd:_.padding.sm}},{modifiers:{size:"extraSmall",iconPosition:"only"},styles:{minWidth:_.size.xs}},{modifiers:{size:"extraSmall",iconPosition:"start"},styles:{paddingInlineStart:_.padding.xs,paddingInlineEnd:_.padding.sm}},{modifiers:{size:"extraSmall",iconPosition:"end"},styles:{paddingInlineStart:_.padding.sm,paddingInlineEnd:_.padding.xs}}]}),gc=$e("button")({displayName:"BaseButton",Component:({children:e,size:t,fillIcon:n,grow:a,iconPosition:r,icon:i,colors:o,...s},l,c)=>p.jsx(c,{ref:l,type:"button",...Ue(s,[q({size:t,iconPosition:r,grow:a}),X.default((o==null?void 0:o.default)||{}),X.focus((o==null?void 0:o.focus)||{}),X.hover((o==null?void 0:o.hover)||{}),X.active((o==null?void 0:o.active)||{}),X.disabled((o==null?void 0:o.disabled)||{})]),children:e}),subComponents:{Icon:Qte,Label:Xte}}),Fw=$e("button")({displayName:"Button",Component:({children:e,icon:t,colors:n,iconPosition:a,shouldMirrorIcon:r,shouldMirrorIconInRTL:i,size:o="medium",...s},l,c)=>{const u=a||(t?e?"start":"only":void 0);return p.jsxs(gc,{as:c,ref:l,size:o,icon:t,colors:n,iconPosition:u,...s,children:[t&&u==="start"&&p.jsx(gc.Icon,{size:o,icon:t,shouldMirrorIcon:r,shouldMirrorIconInRTL:i}),e&&p.jsx(gc.Label,{children:e}),t&&u&&["only","end"].includes(u)&&p.jsx(gc.Icon,{size:o,icon:t,shouldMirrorIcon:r,shouldMirrorIconInRTL:i})]})}}),ene=he({extends:q,base:{[q.vars.background]:M(xt.base,_.color.brand.accent.primary),[q.vars.borderRadius]:_.shape.full,[q.vars.label]:M(xt.accent,L.fg.inverse),[ne.vars.color]:M(X.default.icon,"currentColor"),"&:focus-visible, &.focus":{[q.vars.background]:M(xt.base,_.color.brand.accent.primary),[q.vars.label]:M(xt.accent,L.fg.inverse),[q.vars.boxShadowInner]:_.color.focus.inverse,[q.vars.boxShadowOuter]:_.color.brand.focus.primary,[ne.vars.color]:M(X.focus.icon,"currentColor")},"&:hover, &.hover":{[q.vars.background]:Sn.darken({color:M(xt.base,_.color.brand.accent.primary),mixinColor:_.color.accent.overlay.mixin,mixinValue:_.opacity.accent.hover}),[q.vars.label]:M(xt.accent,L.fg.inverse),[ne.vars.color]:M(X.hover.icon,"currentColor")},"&:active, &.active":{[q.vars.background]:Sn.darken({color:M(xt.base,_.color.brand.accent.primary),mixinColor:_.color.accent.overlay.mixin,mixinValue:_.opacity.accent.pressed}),[q.vars.label]:M(xt.accent,L.fg.inverse),[ne.vars.color]:M(X.active.icon,"currentColor")},"&:disabled, &.disabled":{[q.vars.opacity]:ht.disabled,[q.vars.background]:M(xt.base,_.color.brand.accent.primary),[q.vars.label]:M(xt.accent,L.fg.inverse),[ne.vars.color]:M(X.default.icon,"currentColor")}},modifiers:{variant:{inverse:{[q.vars.background]:M(xt.lightest,_.color.surface.inverse),[q.vars.borderRadius]:_.shape.full,[q.vars.label]:L.fg.strong,[ne.vars.color]:M(X.default.icon,"currentColor"),"&:hover, &.hover":{[q.vars.background]:Sn.darken({color:M(xt.lightest,_.color.surface.inverse),mixinColor:_.color.accent.overlay.mixin,mixinValue:_.opacity.accent.hover}),[q.vars.label]:L.fg.stronger,[ne.vars.color]:M(X.hover.icon,"currentColor")},"&:focus-visible, &.focus":{[q.vars.background]:M(xt.lightest,_.color.surface.inverse),[q.vars.label]:L.fg.strong,[q.vars.boxShadowInner]:L.border.contrast.default,[q.vars.boxShadowOuter]:_.color.focus.inverse,[ne.vars.color]:M(X.focus.icon,"currentColor")},"&:active, &.active":{[q.vars.background]:Sn.darken({color:M(xt.lightest,_.color.surface.inverse),mixinColor:_.color.accent.overlay.mixin,mixinValue:_.opacity.accent.pressed}),[q.vars.label]:L.fg.stronger,[ne.vars.color]:M(X.active.icon,"currentColor")},"&:disabled, &.disabled":{[q.vars.opacity]:ht.disabled,[q.vars.background]:M(xt.lightest,_.color.surface.inverse),[q.vars.label]:L.fg.strong,[ne.vars.color]:M(X.disabled.icon,"currentColor")}}}}}),TU=$e("button")({displayName:"PrimaryButton",Component:({children:e,variant:t,size:n,iconPosition:a,grow:r,cs:i,...o},s,l)=>p.jsx(Fw,{as:l,ref:s,iconPosition:a,size:n,grow:r,cs:[ene({variant:t,iconPosition:a,grow:r,size:n}),i],...o,children:e})}),tne=he({extends:q,base:{[q.vars.background]:_.color.surface.transparent,[q.vars.borderRadius]:_.shape.full,[q.vars.border]:L.border.input.default,[q.vars.label]:L.fg.default,[ne.vars.color]:M(X.default.icon,"currentColor"),"&:focus-visible, &.focus":{[q.vars.background]:_.color.surface.default,[q.vars.label]:L.fg.strong,[q.vars.boxShadowInner]:_.color.focus.inverse,[q.vars.boxShadowOuter]:_.color.brand.focus.primary,[ne.vars.color]:M(X.focus.icon,"currentColor")},"&:hover, &.hover":{[q.vars.background]:Sn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.hover}),[q.vars.label]:L.fg.strong,[q.vars.border]:_.color.border.input.hover,[ne.vars.color]:M(X.hover.icon,"currentColor")},"&:active, &.active":{[q.vars.background]:Sn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.pressed}),[q.vars.label]:L.fg.strong,[q.vars.border]:_.color.border.input.hover,[ne.vars.color]:M(X.active.icon,"currentColor")},"&:disabled, &.disabled":{[q.vars.opacity]:ht.disabled,[q.vars.background]:_.color.surface.transparent,[q.vars.label]:L.fg.default,[ne.vars.color]:M(X.default.icon,"currentColor")}},modifiers:{variant:{inverse:{[q.vars.background]:_.color.surface.transparent,[q.vars.border]:_.color.border.inverse.default,[q.vars.label]:L.fg.inverse,[ne.vars.color]:M(X.default.icon,"currentColor"),"&:hover, &.hover":{[q.vars.background]:Sn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.hover}),[q.vars.border]:_.color.border.inverse.default,[q.vars.label]:L.fg.inverse,[ne.vars.color]:M(X.hover.icon,"currentColor")},"&:focus-visible, &.focus":{[q.vars.background]:_.color.surface.inverse,[q.vars.border]:L.border.transparent,[q.vars.label]:L.fg.contrast.default,[q.vars.boxShadowInner]:L.border.contrast.default,[q.vars.boxShadowOuter]:_.color.focus.inverse,[ne.vars.color]:M(X.focus.icon,"currentColor")},"&:active, &.active":{[q.vars.background]:Sn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.pressed}),[q.vars.border]:_.color.border.inverse.default,[q.vars.label]:L.fg.inverse,[ne.vars.color]:M(X.active.icon,"currentColor")},"&:disabled, &.disabled":{[q.vars.opacity]:ht.disabled,[q.vars.background]:_.color.surface.transparent,[q.vars.label]:L.fg.inverse,[ne.vars.color]:M(X.default.icon,"currentColor")}}}}}),bs=$e("button")({displayName:"SecondaryButton",Component:({children:e,variant:t,size:n,iconPosition:a,grow:r,cs:i,...o},s,l)=>p.jsx(Fw,{as:l,ref:s,iconPosition:a,size:n,grow:r,cs:[tne({variant:t,iconPosition:a,grow:r,size:n}),i],...o,children:e})}),nne=he({extends:q,base:{paddingInline:_.padding.xs,minWidth:"auto",borderWidth:fe(2),[q.vars.borderRadius]:_.shape.full,[q.vars.background]:_.color.surface.transparent,[q.vars.label]:L.fg.default,[ne.vars.color]:M(X.default.icon,"currentColor"),"&:focus-visible, &.focus":{[q.vars.background]:_.color.surface.transparent,[q.vars.label]:L.fg.default,[ne.vars.color]:M(X.focus.icon,"currentColor"),[q.vars.border]:L.border.transparent,[q.vars.label]:L.fg.contrast.default,...yC({width:2,separation:0,innerColor:_.color.focus.inverse,outerColor:_.color.brand.focus.primary})},"&:hover, &.hover":{[q.vars.background]:Sn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.hover}),[q.vars.label]:L.fg.strong,[ne.vars.color]:L.fg.strong,textDecoration:"underline"},"&:active, &.active":{[q.vars.background]:Sn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.pressed}),[q.vars.label]:L.fg.strong,[ne.vars.color]:M(X.active.icon,"currentColor"),textDecoration:"underline"},"&:disabled, &.disabled":{textDecoration:"none",[q.vars.opacity]:ht.disabled,[q.vars.background]:_.color.surface.transparent,[q.vars.label]:L.fg.default,[ne.vars.color]:M(X.default.icon,"currentColor")}},modifiers:{iconPosition:{only:{padding:0,[ne.vars.color]:M(X.default.icon,L.fg.default),"&:focus-visible, &.focus":{[ne.vars.color]:M(X.focus.icon,L.fg.strong)},"&:hover, &.hover":{[ne.vars.color]:M(X.hover.icon,L.fg.strong)},"&:active, &.active":{[ne.vars.color]:M(X.active.icon,L.fg.strong)},"&:disabled, &.disabled":{[q.vars.opacity]:ht.disabled,[ne.vars.color]:M(X.disabled.icon,L.fg.default)}},start:{},end:{}},variant:{inverse:{[q.vars.background]:_.color.surface.transparent,[q.vars.label]:L.fg.inverse,[ne.vars.color]:M(X.default.icon,"currentColor"),"&:hover, &.hover":{[q.vars.background]:Sn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.hover}),[q.vars.label]:L.fg.inverse,[ne.vars.color]:M(X.hover.icon,"currentColor")},"&:focus-visible, &.focus":{[q.vars.background]:_.color.surface.inverse,[q.vars.label]:L.fg.contrast.default,[ne.vars.color]:M(X.focus.icon,"currentColor"),...yC({width:2,separation:2,innerColor:L.border.contrast.default,outerColor:_.color.focus.inverse})},"&:active, &.active":{[q.vars.background]:Sn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.pressed}),[q.vars.label]:L.fg.inverse,[ne.vars.color]:M(X.active.icon,"currentColor")},"&:disabled, &.disabled":{[q.vars.opacity]:ht.disabled,[q.vars.background]:_.color.surface.transparent,[q.vars.label]:L.fg.inverse,[ne.vars.color]:M(X.default.icon,"currentColor")}}}},compound:[{modifiers:{size:"large",iconPosition:"only"},styles:{minWidth:_.size.lg}},{modifiers:{size:"large",iconPosition:"start"},styles:{paddingInlineStart:_.padding.xs,paddingInlineEnd:_.padding.sm}},{modifiers:{size:"large",iconPosition:"end"},styles:{paddingInlineStart:_.padding.sm,paddingInlineEnd:_.padding.xs}},{modifiers:{size:"medium",iconPosition:"only"},styles:{minWidth:_.size.md}},{modifiers:{size:"medium",iconPosition:"start"},styles:{paddingInlineStart:_.padding.xs,paddingInlineEnd:_.padding.sm}},{modifiers:{size:"medium",iconPosition:"end"},styles:{paddingInlineStart:_.padding.sm,paddingInlineEnd:_.padding.xs}},{modifiers:{size:"small",iconPosition:"only"},styles:{minWidth:_.size.sm}},{modifiers:{size:"small",iconPosition:"start"},styles:{paddingInlineStart:_.padding.xs,paddingInlineEnd:_.padding.sm}},{modifiers:{size:"small",iconPosition:"end"},styles:{paddingInlineStart:_.padding.sm,paddingInlineEnd:_.padding.xs}},{modifiers:{size:"extraSmall",iconPosition:"only"},styles:{minWidth:_.size.xs}},{modifiers:{size:"extraSmall",iconPosition:"start"},styles:{paddingInlineStart:_.padding.xxs,paddingInlineEnd:_.padding.xs}},{modifiers:{size:"extraSmall",iconPosition:"end"},styles:{paddingInlineStart:_.padding.xs,paddingInlineEnd:_.padding.xxs}}]}),rne=$e("button")({displayName:"TertiaryButton",Component:({children:e,icon:t,size:n="medium",variant:a,iconPosition:r,grow:i,cs:o,...s},l,c)=>{const u=r||(t?e?"start":"only":void 0);return p.jsx(Fw,{as:c,ref:l,icon:t,size:n,iconPosition:r,grow:i,cs:[nne({size:n,variant:a,grow:i,iconPosition:u}),o],...s,children:e})}}),Dl=fn({})(()=>({state:{inputRef:$.useRef(null)},events:{}})),RU=he({vars:{insetInlineStart:"initial",insetInlineEnd:"initial",width:_.size.md,height:_.size.md,pointerEvents:""},base:({width:e,height:t,insetInlineStart:n,insetInlineEnd:a})=>({display:"flex",position:"absolute",alignItems:"center",justifyContent:"center",width:e,height:t,insetInlineStart:n,insetInlineEnd:a}),modifiers:{pointerEvents:{_:({pointerEvents:e})=>({pointerEvents:e})}}}),Yv=Ne("div")({modelHook:Dl})(({pointerEvents:e,insetInlineStart:t,insetInlineEnd:n,width:a,height:r,...i},o)=>p.jsx(o,{...Ue(i,RU({pointerEvents:e,insetInlineStart:br(t),insetInlineEnd:br(n),width:br(a),height:br(r)}))})),Kv=Ne("div")({modelHook:Dl})(({pointerEvents:e,insetInlineStart:t,insetInlineEnd:n,width:a,height:r,...i},o)=>p.jsx(o,{...Ue(i,RU({pointerEvents:e,insetInlineStart:t,insetInlineEnd:n,width:br(a),height:br(r)}))})),ane=le()((e,t)=>({ref:la(t,e.state.inputRef),placeholder:""})),ine=he({vars:{paddingInlineStart:"",paddingInlineEnd:""},base:{display:"flex",width:"100%"},modifiers:{paddingInlineStart:{_:({paddingInlineStart:e})=>({paddingInlineStart:e})},paddingInlineEnd:{_:({paddingInlineEnd:e})=>({paddingInlineEnd:e})}}}),CC=Ne(Dw)({modelHook:Dl,elemPropsHook:ane})(({paddingInlineStart:e,paddingInlineEnd:t,...n},a)=>p.jsx(a,{as:a,...Ue(n,ine({paddingInlineStart:br(e),paddingInlineEnd:br(t)}))})),one=le()(e=>({role:"presentation",tabIndex:-1,icon:Yte,size:"small",onMouseDown(t){t.preventDefault()},onClick(){uy(e.state.inputRef.current,"")}})),sne=Ne(rne)({modelHook:Dl,elemPropsHook:one})((e,t)=>p.jsx(t,{"data-part":"input-group-clear-button",...jt(e)})),br=e=>typeof e=="number"?`${e}px`:e,hc=e=>{if(e.length!==0)return e.length===1?e[0]:`calc(${e.map(br).join(" + ")})`},lne=he({base:{display:"flex",position:"relative",alignItems:"center",'& :has([data-part="input-group-clear-button"])':{transition:"opacity 300ms ease"},'&:where(:has(input:placeholder-shown)) :has([data-part="input-group-clear-button"])':{opacity:0,pointerEvents:"none"}}}),Io=sa("div")({displayName:"InputGroup",modelHook:Dl,subComponents:{InnerStart:Yv,Input:CC,InnerEnd:Kv,ClearButton:sne}})(({children:e,...t},n)=>{const a=[],r=[];$.Children.forEach(e,l=>{if($.isValidElement(l)&&l.type===Yv){const c=xn(l.props.width||_.size.md);a.push(c)}if($.isValidElement(l)&&l.type===Kv){const c=xn(l.props.width||_.size.md);r.push(c)}});let i=0,o=0;const s=$.Children.map(e,l=>{if($.isValidElement(l)){if(l.type===CC)return $.cloneElement(l,{paddingInlineStart:hc(a),paddingInlineEnd:hc(r)});if(l.type===Yv){const c=hc(a.slice(0,i))||"0px";return i++,$.cloneElement(l,{insetInlineStart:c})}if(l.type===Kv){const c=hc(r.slice(o+1,r.length))||"0px";return o++,$.cloneElement(l,{insetInlineEnd:c})}}return l});return p.jsx(n,{...Ue(t,lne()),children:s})});function Za(e,t,n){let a=n.initialDeps??[],r;function i(){var o,s,l,c;let u;n.key&&((o=n.debug)!=null&&o.call(n))&&(u=Date.now());const d=e();if(!(d.length!==a.length||d.some((b,y)=>a[y]!==b)))return r;a=d;let g;if(n.key&&((s=n.debug)!=null&&s.call(n))&&(g=Date.now()),r=t(...d),n.key&&((l=n.debug)!=null&&l.call(n))){const b=Math.round((Date.now()-u)*100)/100,y=Math.round((Date.now()-g)*100)/100,I=y/16,v=(m,h)=>{for(m=String(m);m.length<h;)m=" "+m;return m};console.info(`%c⏱ ${v(y,5)} /${v(b,5)} ms`,`
303
303
  font-size: .6rem;
304
304
  font-weight: bold;
305
- color: hsl(${Math.max(0,Math.min(120-120*I,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(c=n==null?void 0:n.onChange)==null||c.call(n,r),r}return i.updateDeps=o=>{a=o},i}function NC(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const cne=(e,t)=>Math.abs(e-t)<=1,une=(e,t,n)=>{let a;return function(...r){e.clearTimeout(a),a=e.setTimeout(()=>t.apply(this,r),n)}},OC=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},dne=e=>e,pne=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),a=[];for(let r=t;r<=n;r++)a.push(r);return a},fne=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=e.targetWindow;if(!a)return;const r=o=>{const{width:s,height:l}=o;t({width:Math.round(s),height:Math.round(l)})};if(r(OC(n)),!a.ResizeObserver)return()=>{};const i=new a.ResizeObserver(o=>{const s=()=>{const l=o[0];if(l!=null&&l.borderBoxSize){const c=l.borderBoxSize[0];if(c){r({width:c.inlineSize,height:c.blockSize});return}}r(OC(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},LC={passive:!0},$C=typeof window>"u"?!0:"onscrollend"in window,mne=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=e.targetWindow;if(!a)return;let r=0;const i=e.options.useScrollendEvent&&$C?()=>{}:une(a,()=>{t(r,!1)},e.options.isScrollingResetDelay),o=u=>()=>{const{horizontal:d,isRtl:f}=e.options;r=d?n.scrollLeft*(f&&-1||1):n.scrollTop,i(),t(r,u)},s=o(!0),l=o(!1);l(),n.addEventListener("scroll",s,LC);const c=e.options.useScrollendEvent&&$C;return c&&n.addEventListener("scrollend",l,LC),()=>{n.removeEventListener("scroll",s),c&&n.removeEventListener("scrollend",l)}},gne=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const a=t.borderBoxSize[0];if(a)return Math.round(a[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},hne=(e,{adjustments:t=0,behavior:n},a)=>{var r,i;const o=e+t;(i=(r=a.scrollElement)==null?void 0:r.scrollTo)==null||i.call(r,{[a.options.horizontal?"left":"top"]:o,behavior:n})};class vne{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const a=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(r=>{r.forEach(i=>{const o=()=>{this._measureElement(i.target,i)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var r;(r=a())==null||r.disconnect(),n=null},observe:r=>{var i;return(i=a())==null?void 0:i.observe(r,{box:"border-box"})},unobserve:r=>{var i;return(i=a())==null?void 0:i.unobserve(r)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([a,r])=>{typeof r>"u"&&delete n[a]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:dne,rangeExtractor:pne,onChange:()=>{},measureElement:gne,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var a,r;(r=(a=this.options).onChange)==null||r.call(a,this,n)},this.maybeNotify=Za(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const a=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==a){if(this.cleanup(),!a){this.maybeNotify();return}this.scrollElement=a,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(r=>{this.observer.observe(r)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(r,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<r?"forward":"backward":null,this.scrollOffset=r,this.isScrolling=i,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,a)=>{const r=new Map,i=new Map;for(let o=a-1;o>=0;o--){const s=n[o];if(r.has(s.lane))continue;const l=i.get(s.lane);if(l==null||s.end>l.end?i.set(s.lane,s):s.end<l.end&&r.set(s.lane,!0),r.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((o,s)=>o.end===s.end?o.index-s.index:o.end-s.end)[0]:void 0},this.getMeasurementOptions=Za(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,a,r,i,o)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:a,scrollMargin:r,getItemKey:i,enabled:o}),{key:!1}),this.getMeasurements=Za(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:a,scrollMargin:r,getItemKey:i,enabled:o},s)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(u=>{this.itemSizeCache.set(u.key,u.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,l);for(let u=l;u<n;u++){const d=i(u),f=this.options.lanes===1?c[u-1]:this.getFurthestMeasurement(c,u),g=f?f.end+this.options.gap:a+r,b=s.get(d),y=typeof b=="number"?b:this.options.estimateSize(u),I=g+y,v=f?f.lane:u%this.options.lanes;c[u]={index:u,start:g,size:y,end:I,key:d,lane:v}}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Za(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,a,r,i)=>this.range=n.length>0&&a>0?bne({measurements:n,outerSize:a,scrollOffset:r,lanes:i}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Za(()=>{let n=null,a=null;const r=this.calculateRange();return r&&(n=r.startIndex,a=r.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,a]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,a]},(n,a,r,i,o)=>i===null||o===null?[]:n({startIndex:i,endIndex:o,overscan:a,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const a=this.options.indexAttribute,r=n.getAttribute(a);return r?parseInt(r,10):(console.warn(`Missing attribute name '${a}={index}' on measured element.`),-1)},this._measureElement=(n,a)=>{const r=this.indexFromElement(n),i=this.measurementsCache[r];if(!i)return;const o=i.key,s=this.elementsCache.get(o);s!==n&&(s&&this.observer.unobserve(s),this.observer.observe(n),this.elementsCache.set(o,n)),n.isConnected&&this.resizeItem(r,this.options.measureElement(n,a,this))},this.resizeItem=(n,a)=>{const r=this.measurementsCache[n];if(!r)return;const i=this.itemSizeCache.get(r.key)??r.size,o=a-i;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,o,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,a)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((a,r)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(r))});return}this._measureElement(n,void 0)},this.getVirtualItems=Za(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,a)=>{const r=[];for(let i=0,o=n.length;i<o;i++){const s=n[i],l=a[s];r.push(l)}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const a=this.getMeasurements();if(a.length!==0)return NC(a[AU(0,a.length-1,r=>NC(a[r]).start,n)])},this.getOffsetForAlignment=(n,a,r=0)=>{const i=this.getSize(),o=this.getScrollOffset();a==="auto"&&(a=n>=o+i?"end":"start"),a==="center"?n+=(r-i)/2:a==="end"&&(n-=i);const s=this.getTotalSize()-i;return Math.max(Math.min(s,n),0)},this.getOffsetForIndex=(n,a="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const r=this.measurementsCache[n];if(!r)return;const i=this.getSize(),o=this.getScrollOffset();if(a==="auto")if(r.end>=o+i-this.options.scrollPaddingEnd)a="end";else if(r.start<=o+this.options.scrollPaddingStart)a="start";else return[o,a];const s=a==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,a,r.size),a]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:a="start",behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,a),{adjustments:void 0,behavior:r})},this.scrollToIndex=(n,{align:a="auto",behavior:r}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(n,a);if(!i)return;const[o,s]=i;this._scrollToOffset(o,{adjustments:void 0,behavior:r}),r!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const c=this.getOffsetForIndex(n,s);if(!c)return;const[u]=c,d=this.getScrollOffset();cne(u,d)||this.scrollToIndex(n,{align:s,behavior:r})}else this.scrollToIndex(n,{align:s,behavior:r})}))},this.scrollBy=(n,{behavior:a}={})=>{this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:a})},this.getTotalSize=()=>{var n;const a=this.getMeasurements();let r;if(a.length===0)r=this.options.paddingStart;else if(this.options.lanes===1)r=((n=a[a.length-1])==null?void 0:n.end)??0;else{const i=Array(this.options.lanes).fill(null);let o=a.length-1;for(;o>=0&&i.some(s=>s===null);){const s=a[o];i[s.lane]===null&&(i[s.lane]=s.end),o--}r=Math.max(...i.filter(s=>s!==null))}return Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:a,behavior:r})=>{this.options.scrollToFn(n,{behavior:r,adjustments:a},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const AU=(e,t,n,a)=>{for(;e<=t;){const r=(e+t)/2|0,i=n(r);if(i<a)e=r+1;else if(i>a)t=r-1;else return r}return e>0?e-1:0};function bne({measurements:e,outerSize:t,scrollOffset:n,lanes:a}){const r=e.length-1,i=l=>e[l].start;if(e.length<=a)return{startIndex:0,endIndex:r};let o=AU(0,r,i,n),s=o;if(a===1)for(;s<r&&e[s].end<n+t;)s++;else if(a>1){const l=Array(a).fill(0);for(;s<r&&l.some(u=>u<n+t);){const u=e[s];l[u.lane]=u.end,s++}const c=Array(a).fill(n+t);for(;o>=0&&c.some(u=>u>=n);){const u=e[o];c[u.lane]=u.start,o--}o=Math.max(0,o-o%a),s=Math.min(r,s+(a-1-s%a))}return{startIndex:o,endIndex:s}}const DC=typeof document<"u"?J.useLayoutEffect:J.useEffect;function yne(e){const t=J.useReducer(()=>({}),{})[1],n={...e,onChange:(r,i)=>{var o;i?lS.flushSync(t):t(),(o=e.onChange)==null||o.call(e,r,i)}},[a]=J.useState(()=>new vne(n));return a.setOptions(n),DC(()=>a._didMount(),[]),DC(()=>a._willUpdate()),a}function Sne(e){return yne({observeElementRect:fne,observeElementOffset:mne,scrollToFn:hne,...e})}const Xv=e=>e===void 0?"":typeof e=="string"?e:e.id||"",Jv=e=>typeof e=="string"?e:e===void 0?"":e.text||"",Ene={items:[]},vc=fn({defaultConfig:{...Ene,id:"",getId:Xv,getTextValue:Jv,nonInteractiveIds:[],orientation:"vertical",defaultItemHeight:50,shouldVirtualize:!0}})(e=>{var v;const t=Ll(e.id),n=$.useRef(Xv),a=$.useRef(Jv);n.current=e.getId||Xv,a.current=e.getTextValue||e.getId||Jv;const[r]=$.useState(e.orientation||"vertical"),[i,o]=$.useState(e.defaultItemHeight),s=e.shouldVirtualize&&!!((v=e.items)!=null&&v.length),l=$.useRef(0),c=$.useRef(null),u=$.useMemo(()=>(e.items||[]).map((m,h)=>({id:n.current(m),index:h,value:m,textValue:a.current(m)})),[e.items]),[d,f]=$.useState([]),g=Sne({count:u.length,getScrollElement:()=>c.current,estimateSize:$.useCallback(()=>i,[i]),horizontal:e.orientation==="horizontal",overscan:3});return{state:{...{items:u.length?u:d},UNSTABLE_virtual:g,UNSTABLE_defaultItemHeight:i,containerRef:c,id:t,orientation:r,indexRef:l,nonInteractiveIds:e.nonInteractiveIds||[],isVirtualized:s},events:{registerItem(m){l.current++,f(h=>h.concat({...m,value:m,index:h.length}))},unregisterItem(m){f(h=>h.find(S=>S.id===m.id)?h.filter(S=>S.id!==m.id):h)},updateItemHeight(m){o(m.value)}},getId:e.getId,getTextValue:e.getTextValue}}),_ne=e=>e,up=()=>0,dp=(e,{state:t})=>t.items.length-1,wne=(e,{state:t})=>{if(t.columnCount){const n=e%t.columnCount;return e-n}return up()},kne=(e,{state:t})=>{if(t.columnCount){const n=e%t.columnCount-t.columnCount+1;let a=e-n;return a>=t.items.length&&(a=t.items.length-1),a}return dp(e,{state:t})},Ine=(e,{state:t})=>t.columnCount?e%t.columnCount:up(),xne=(e,{state:t})=>t.columnCount?t.items.length-t.columnCount+e%t.columnCount:dp(e,{state:t}),Tne=(e,{state:t})=>t.items.find(n=>n.id===e),yr=e=>typeof e.cursorId=="string"?e.cursorId:e.cursorId.slice(-1)[0]||"",Tu=(e,t)=>e.cursorId&&typeof e.cursorId=="string"?e.cursorId===t:e.cursorId.includes(t),$o=e=>(t,{state:n},a=n.items.length)=>{if(Number.isNaN(t)){if(e===1)return up();if(e===-1)return dp(t,{state:n})}const r=n.items;let i=t+e;const s=Math.ceil(r.length/n.columnCount)*n.columnCount;return i<0?e===-1?i=r.length-1:(s+i>=r.length&&(i-=n.columnCount),i=s+i):i>=r.length&&(e===1?i=0:(i-s<0&&(i+=n.columnCount),i=i-s)),r.length>1&&n.nonInteractiveIds.includes(r[i].id)&&a>0?$o(e)(i,{state:n},a-1):i},Rne=_ne({getFirst:up,getLast:dp,getItem:Tne,getNext:$o(1),getNextRow:(e,{state:t})=>$o(t.columnCount)(e,{state:t}),getPrevious:$o(-1),getPreviousRow:(e,{state:t})=>$o(-t.columnCount)(e,{state:t}),getPreviousPage:Ine,getNextPage:xne,getFirstOfRow:wne,getLastOfRow:kne}),bc=fn({defaultConfig:{...vc.defaultConfig,initialCursorId:"",columnCount:0,navigation:Rne,pageSize:0},requiredConfig:vc.requiredConfig,contextOverride:vc.Context})(e=>{var d;const[t,n]=$.useState(e.initialCursorId),a=$.useRef(e.pageSize),r=e.columnCount||0,i=vc(e),o=e.navigation,s=$.useRef(-1),l=f=>{var b;const g=((b=c.items[f])==null?void 0:b.id)||"";n(g)};t&&((d=i.state.items[s.current])==null?void 0:d.id)!==t?s.current=i.state.items.findIndex(f=>f.id===t):t||(s.current=-1);const c={...i.state,cursorId:t,columnCount:r,pageSizeRef:a,cursorIndexRef:s},u={...i.events,goTo(f){const g=c.items.findIndex(b=>b.id===f.id);l(g)},goToNext(){const f=o.getNext(s.current,{state:c});l(f)},goToPrevious(){const f=o.getPrevious(s.current,{state:c});l(f)},goToPreviousRow(){const f=o.getPreviousRow(s.current,{state:c});l(f)},goToNextRow(){const f=o.getNextRow(s.current,{state:c});l(f)},goToFirst(){const f=o.getFirst(s.current,{state:c});l(f)},goToLast(){const f=o.getLast(s.current,{state:c});l(f)},goToFirstOfRow(){const f=o.getFirstOfRow(s.current,{state:c});l(f)},goToLastOfRow(){const f=o.getLastOfRow(s.current,{state:c});l(f)},goToNextPage(){const f=o.getNextPage(s.current,{state:c});l(f)},goToPreviousPage(){const f=o.getPreviousPage(s.current,{state:c});l(f)}};return{...i,state:c,events:u,navigation:o}}),Ane=(e,{selectedIds:t,unselectedIds:n})=>t==="all"?!n.includes(e):t.includes(e),CU={select(e){return{selectedIds:[e],unselectedIds:[]}}},Cne={select(e,{selectedIds:t,unselectedIds:n}){return t==="all"?{selectedIds:"all",unselectedIds:n.includes(e)?n.filter(r=>r!==e):n.concat(e)}:{selectedIds:t.includes(e)?t.filter(r=>r!==e):t.concat(e),unselectedIds:[]}}},Qv=fn({defaultConfig:{...bc.defaultConfig,initialSelectedIds:[],initialUnselectedIds:[],selection:CU},requiredConfig:bc.requiredConfig,contextOverride:bc.Context})(e=>{const t=bc(e),[n,a]=$.useState(e.initialSelectedIds),[r,i]=$.useState(e.initialUnselectedIds),o=e.selection,s={...t.state,selectedIds:n,unselectedIds:r},l={...t.events,select(c){const{selectedIds:u,unselectedIds:d}=o.select(c.id,s);a(u),i(d)},selectAll(){a("all")},unselectAll(){a([])},setSelectedIds(c){a(c)},remove(c){}};return{...t,state:s,events:l,selection:o}}),ui=fn({defaultConfig:{UNSTABLE_parentModel:void 0,...Qv.defaultConfig},requiredConfig:Qv.requiredConfig})(e=>({UNSTABLE_parentModel:e.UNSTABLE_parentModel,...Qv(e)})),Mc=$.createContext({});function Nne(e,t){return typeof t=="function"?e.state.isVirtualized?e.state.UNSTABLE_virtual.getVirtualItems().map(a=>{const r=e.state.items[a.index],i=t(r.value,a.index);return p.jsx(Mc.Provider,{value:{item:r,virtual:a},children:i},r.id||r.index)}):e.state.items.map(a=>{const r=t(a.value,a.index);return p.jsx(Mc.Provider,{value:{item:a},children:r},a.id||a.index)}):p.jsx(Mc.Provider,{value:{},children:t})}const pp=le()((e,t,n={})=>{const{state:a,events:r}=e,{item:i,virtual:o}=$.useContext(Mc),[s,l]=$.useState(n["data-id"]||(i==null?void 0:i.id)||""),{localRef:c,elementRef:u}=La(la(t,o?e.state.UNSTABLE_virtual.measureElement:null)),d=o?{position:"absolute",top:0,left:0,transform:`translateY(${o.start}px)`}:{};return Aee(()=>{var y;if((o==null?void 0:o.index)===0&&((y=c.current)!=null&&y.clientHeight),i)return;const f=a.indexRef.current,g=s||(n["data-has-children"]?`${a.id}-`:"")+String(f);if(a.items.find(I=>I.id===g))return;const b={id:g,textValue:n["data-text"]?n["data-text"]:typeof n.children=="string"?n.children:""};return r.registerItem(b),l(g),()=>{r.unregisterItem({id:g})}}),{ref:u,"data-id":s,disabled:n.disabled||a.nonInteractiveIds.includes(s)?!0:void 0,"aria-setsize":o?a.UNSTABLE_virtual.options.count:void 0,"aria-posinset":o?i.index+1:void 0,"data-index":o?i.index:void 0,style:d,id:Lw(`${a.id}-${s}`)}}),dy={horizontal:{ArrowLeft:"goToPrevious",Left:"goToPrevious",ArrowRight:"goToNext",Right:"goToNext",Home:"goToFirst",End:"goToLast",PageDown:"goToNextPage",PageUp:"goToPreviousPage"},vertical:{ArrowUp:"goToPrevious",Up:"goToPrevious",ArrowDown:"goToNext",Down:"goToNext",Home:"goToFirst",End:"goToLast",PageDown:"goToNextPage",PageUp:"goToPreviousPage"}},One={ArrowLeft:"ArrowRight",Left:"Right",ArrowRight:"ArrowLeft",Right:"Left",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",Home:"Home",End:"End",PageDown:"PageDown",PageUp:"PageUp"},FC={...dy.horizontal,Home:"goToFirstOfRow",End:"goToLastOfRow",ArrowUp:"goToPreviousRow",Up:"goToPreviousRow",ArrowDown:"goToNextRow",Down:"goToNextRow"},eb={Home:"goToFirst",End:"goToLast"},PC=(e,t)=>e.hasOwnProperty(t);function NU(e,t){var r,i,o,s;if(e.ctrlKey){for(const l in eb)if(PC(eb,l)&&e.key===l)return(i=(r=t.events)[eb[l]])==null||i.call(r),!0}const n=t.state.columnCount>0?FC:dy[t.state.orientation],a=XM(e.currentTarget);for(const l in n)if(PC(n,l)&&(a?e.key===One[l]:e.key===l)){const c=t.state.columnCount>0?FC[l]:dy[t.state.orientation][l];if(t.events[c])return(s=(o=t.events)[c])==null||s.call(o),!0}return!1}const OU=(e,t,n)=>{e()===!1&&t>1&&requestAnimationFrame(()=>OU(e,t-1)),n==null||n("Retry timeout")},Lne=(e,t,n)=>new Promise((a,r)=>{var s;const i=(((s=n==null?void 0:n.dataset)==null?void 0:s.focusId)||"").split("-")[0]||e.state.id,o=e.navigation.getItem(t,e);if(o){e.state.isVirtualized&&e.state.UNSTABLE_virtual.scrollToIndex(o.index);const l=c=>document.querySelector(`[data-focus-id="${YM(`${c}-${o.id}`)}"]`);OU(()=>{const c=l(i)||l(e.state.id);return c&&(c.focus(),a(c)),!!c},5,r)}}),LU=le()((e,t,n={})=>{const a=$.useRef(e.state);a.current=e.state;const r=$.useRef(null);return $.useEffect(()=>{r.current&&Lne(e,yr(e.state),r.current).then(()=>{r.current=null})},[e.state.cursorId]),$.useEffect(()=>{!e.state.cursorId&&e.state.items.length&&e.events.goTo({id:e.state.items[0].id})},[e.state.cursorId,e.state.items,e.events]),{onKeyDown(i){NU(i,e)&&(i.preventDefault(),r.current=i.currentTarget)},onClick(){e.events.goTo({id:n["data-id"]})},"data-focus-id":Lw(`${e.state.id}-${n["data-id"]}`),tabIndex:e.state.cursorId?n["data-id"]&&Tu(e.state,n["data-id"])?0:-1:0}}),$ne=le()(({state:e,events:t},n,a={})=>{const r=a["data-id"]||"";return{onClick:o=>{!e.nonInteractiveIds.includes(r)&&o.currentTarget.getAttribute("aria-disabled")!=="true"&&t.select({id:r})}}}),Dne=le()(e=>({"aria-activedescendant":e.state.cursorId?Lw(`${e.state.id}-${typeof e.state.cursorId=="string"?e.state.cursorId:e.state.cursorId.join("-")}`):void 0})),Fne=le()((e,t,n={})=>{const a=n["data-id"]||"";return{className:Tu(e.state,a)?"focus":""}}),Pne=Ne("li")({displayName:"Item",modelHook:ui,elemPropsHook:pp})((e,t)=>p.jsx(t,{...Ue(e)})),Mne=le()(e=>({style:{position:"relative",height:e.state.isVirtualized?e.state.UNSTABLE_virtual.getTotalSize():void 0}})),MC=he({parts:{listBoxContainer:"list-box-container"},base:{'& :where([data-part="list"])':{display:"flex",flexDirection:"column",marginBlock:0}},modifiers:{orientation:{vertical:{overflowY:"auto"},horizontal:{overflowY:void 0,'& :where([data-part="list"])':{flexDirection:"row"}}}}}),$U=sa("ul")({displayName:"ListBox",modelHook:ui,elemPropsHook:Mne,subComponents:{Item:Pne}})(({height:e,maxHeight:t,marginY:n,marginBottom:a,overflowY:r,marginTop:i,...o},s,l)=>p.jsx("div",{ref:l.state.containerRef,...MC.parts.listBoxContainer,...jt({style:{height:e,maxHeight:t,marginBottom:a??n,marginTop:i??n}},MC({orientation:l.state.orientation})),children:p.jsx(s,{...Ue(o),"data-part":"list",children:Nne(l,o.children)})})),Lr=he({base:{},modifiers:{typeLevel:{"title.large":{fontFamily:ut.default,fontWeight:Xe.bold,fontSize:_.fontSize.title.lg,lineHeight:_.lineHeight.title.lg,color:L.fg.strong},"title.medium":{fontFamily:ut.default,fontWeight:Xe.bold,fontSize:_.fontSize.title.md,lineHeight:_.lineHeight.title.md,color:L.fg.strong},"title.small":{fontFamily:ut.default,fontWeight:Xe.bold,lineHeight:_.lineHeight.title.sm,fontSize:_.fontSize.title.sm,color:L.fg.strong},"heading.large":{fontFamily:ut.default,fontWeight:Xe.bold,fontSize:_.fontSize.heading.lg,lineHeight:_.lineHeight.heading.lg,color:L.fg.strong},"heading.medium":{fontFamily:ut.default,fontWeight:Xe.bold,fontSize:_.fontSize.heading.md,lineHeight:_.lineHeight.heading.md,color:L.fg.strong},"heading.small":{fontFamily:ut.default,fontWeight:Xe.bold,fontSize:_.fontSize.heading.sm,lineHeight:_.lineHeight.heading.sm,color:L.fg.strong},"body.large":{fontFamily:ut.default,fontWeight:Xe.normal,fontSize:_.fontSize.body.lg,lineHeight:_.lineHeight.body.lg,color:L.fg.default},"body.medium":{fontFamily:ut.default,fontWeight:Xe.normal,fontSize:_.fontSize.body.md,lineHeight:_.lineHeight.body.md,color:L.fg.default},"body.small":{fontFamily:ut.default,fontWeight:Xe.normal,fontSize:_.fontSize.body.sm,lineHeight:_.lineHeight.body.sm,letterSpacing:_.letterSpacing.body.sm,color:L.fg.default},"subtext.large":{fontFamily:ut.default,fontWeight:Xe.normal,fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,color:L.fg.default},"subtext.medium":{fontFamily:ut.default,fontWeight:Xe.normal,fontSize:_.fontSize.subtext.md,lineHeight:_.lineHeight.subtext.md,letterSpacing:_.letterSpacing.subtext.md,color:L.fg.default},"subtext.small":{fontFamily:ut.default,fontWeight:Xe.normal,fontSize:_.fontSize.subtext.sm,lineHeight:_.lineHeight.subtext.sm,letterSpacing:_.letterSpacing.subtext.sm,color:L.fg.default}},variant:{error:{color:_.color.brand.fg.critical.default},hint:{color:L.fg.muted.default},inverse:{color:L.fg.inverse}}}});$e("span")({displayName:"Text",Component:({children:e,typeLevel:t,variant:n,...a},r,i)=>p.jsx(i,{ref:r,...Ue(a,Lr({typeLevel:t,variant:n})),children:e})});const Une=he({extends:Lr,base:{}});$e("p")({displayName:"Subtext",Component:({size:e,variant:t,...n},a,r)=>{const i=`subtext.${e}`;return p.jsx(r,{ref:a,...Ue(n,Une({typeLevel:i,variant:t}))})}});const zne=he({extends:Lr,base:{}}),jne=$e("p")({displayName:"BodyText",Component:({size:e,variant:t,...n},a,r)=>{const i=`body.${e}`;return p.jsx(r,{ref:a,...Ue(n,zne({typeLevel:i,variant:t}))})}}),Bne=he({extends:Lr,base:{}});$e("h2")({displayName:"Heading",Component:({size:e,variant:t,...n},a,r)=>{const i=`heading.${e}`;return p.jsx(r,{ref:a,...Ue(n,Bne({typeLevel:i,variant:t}))})}});const qne=he({extends:Lr,base:{}});$e("h1")({displayName:"Title",Component:({size:e,variant:t,...n},a,r)=>{const i=`title.${e}`;return p.jsx(r,{ref:a,...Ue(n,qne({typeLevel:i,variant:t}))})}});const Gne=he({extends:Lr,base:{},defaultModifiers:{typeLevel:"subtext.large"}}),Hne=$e("div")({displayName:"Card.Body",Component:({children:e,...t},n,a)=>p.jsx(a,{ref:n,...Ue(t,Gne()),children:e})}),Vne=he({extends:Lr,base:{color:L.fg.strong,fontWeight:Xe.bold,marginBlock:_.padding.none},defaultModifiers:{typeLevel:"body.large"}}),Wne=$e("h3")({displayName:"Card.Heading",Component:({children:e,...t},n,a)=>p.jsx(a,{ref:n,...Ue(t,Vne()),children:e})}),Zne=he({base:{display:"flex",flexDirection:"column",gap:_.gap.lg,padding:_.padding.xl,backgroundColor:_.color.surface.default,borderRadius:_.shape.xxl,border:`${fe(1)} solid ${_.color.border.default}`},modifiers:{variant:{borderless:{borderColor:"transparent"},tonal:{backgroundColor:_.color.surface.alt.default,borderColor:L.border.transparent}}}}),Yne=$e("div")({displayName:"Card",Component:({children:e,variant:t,...n},a,r)=>p.jsx(r,{ref:a,...Ue(n,Zne({variant:t})),children:e}),subComponents:{Heading:Wne,Body:Hne}});function Kne(e){return e.length?e[e.length-1]:null}function DU(e,t){const{min:n,max:a}=Pw.zIndex;return t<=a-n?e+n:Math.max(n,a-(t-e)+1)}function tb(e){const t=e.length;e.forEach((n,a)=>{n.style.zIndex=String(DU(a,t))})}function Xne(e,t){let n=e;do{const a=t.find(r=>r.element===n);if(a)return a.element}while(n=n.parentElement)}function Jne(e,t){return t.filter(a=>a.owner).map(a=>({element:a.element,parent:Xne(a.owner,t)})).filter(a=>a.parent===e.element)}function FU(e,t){const n=t.split("."),a=n.splice(0,1)[0];return n.length&&e[a]?FU(e[a],n.join(".")):e[a]}function PU(e,t,n){const a=t.split("."),r=a.splice(0,1)[0];return a.length?(e[r]===void 0&&(e[r]={}),PU(e[r],a.join("."),n)):e[r]=n,n}typeof window<"u"&&(window.workday=window.workday||{});const MU=e=>{if(typeof window<"u")return FU(window,e)},UU=(e,t)=>{typeof window<"u"&&PU(window,e,t)},UC=(e,t)=>{var a;let n=(a=e.container)==null?void 0:a.call(e);return n===document.body&&(n=t==null?void 0:t.ownerDocument.body),n||document.body},Pw=MU("workday.__popupStack")||{description:"Global popup stack from @workday/canvas-kit/popup-stack",container:e=>(e==null?void 0:e.ownerDocument.body)||document.body,items:[],zIndex:{min:30,max:50,getValue:DU},_adapter:{}};UU("workday.__popupStack",Pw);const fr=MU("workday.__popupStackOfStacks")||[Pw];fr.description="Global stack of popup stacks from @workday/canvas-kit/popup-stack";UU("workday.__popupStackOfStacks",fr);function cr(){return fr[fr.length-1]}const Rt={createContainer(){var n;const e=cr();if((n=e._adapter)!=null&&n.createContainer)return e._adapter.createContainer();const t=document.createElement("div");return t.style.position="relative",t},add(e){var n;const t=cr();if((n=t._adapter)!=null&&n.add){t._adapter.add(e);return}t.items.push(e),UC(t,e.owner).appendChild(e.element),tb(Rt.getElements())},remove(e){var n;const t=fr.find(a=>!!Rt.getElements(a).find(r=>r===e));if(t){if((n=t._adapter)!=null&&n.remove){t._adapter.remove(e);return}const a=t.items.find(r=>r.element===e);t.items=t.items.filter(r=>r.element!==e),UC(t,a==null?void 0:a.owner).removeChild(e),tb(Rt.getElements(t))}},isTopmost(e){var a;const t=cr();if((a=t._adapter)!=null&&a.isTopmost)return t._adapter.isTopmost(e);const n=Kne(t.items);return n?n.element===e:!1},getElements(e){var n;const t=e||cr();return(n=t._adapter)!=null&&n.getElements?t._adapter.getElements():t.items.map(a=>a.element)},bringToTop(e){var a;const t=cr();if((a=t._adapter)!=null&&a.bringToTop){t._adapter.bringToTop(e);return}const n=t.items.find(r=>r.element===e);if(n)t.items=[...t.items.filter(r=>r!==n),n],Jne(n,t.items).forEach(r=>{Rt.bringToTop(r.element)}),tb(Rt.getElements());else{const r=new Error;console.warn("Could not find item",r.stack)}},contains(e,t){var i;const n=cr();if((i=n._adapter)!=null&&i.contains)return n._adapter.contains(e,t);const a=n.items.find(o=>o.element===e);if(a)return r(a,t);return!1;function r(o,s,l=0){var u;if(l>30)return!1;if(o.element===s||o.owner===s||o.element.contains(s)||(u=o.owner)!=null&&u.contains(s))return!0;const c=n.items.find(d=>d.owner&&o.element.contains(d.owner));return c?r(c,s,l+1):!1}},pushStackContext(e){var a,r;const t=cr();if((a=t._adapter)!=null&&a.pushStackContext)return t._adapter.pushStackContext(e);if(((r=t.container)==null?void 0:r.call(t))===e)return;const n={items:[],zIndex:t.zIndex,container:()=>e,_adapter:{}};fr.push(n)},popStackContext(e){var n,a;const t=cr();if((n=t._adapter)!=null&&n.popStackContext)return t._adapter.popStackContext(e);((a=t.container)==null?void 0:a.call(t))===e&&fr.length>1&&fr.pop()},transferToCurrentContext(e){var a;const t=cr();if((a=t._adapter)!=null&&a.transferToCurrentContext)return t._adapter.transferToCurrentContext(e);if(t.items.find(r=>r.element===e.element))return;fr.find(r=>!!r.items.find(i=>i.element===e.element))&&Rt.remove(e.element),Rt.add(e)}};let yc=null;pr.isEnabled&&pr.on("change",()=>{pr.isFullscreen?pr.element&&(yc=pr.element,Rt.pushStackContext(yc)):yc&&Rt.popStackContext(yc)});const nb=fn({defaultConfig:{id:"",initialVisibility:"hidden"}})(e=>{const t=Ll(e.id),[n,a]=$.useState(e.initialVisibility||"hidden");return{state:{id:t,visibility:n},events:{show(o){a("visible")},hide(o){a("hidden")}}}}),zC=()=>{},ha=fn({defaultContext:{state:{},events:{show:zC,hide:zC}},defaultConfig:{...nb.defaultConfig,returnFocusRef:void 0,initialFocusRef:void 0},requiredConfig:nb.requiredConfig})(e=>{const t=J.useRef(null),n=J.useRef(null),[a,r]=J.useState("bottom"),i=nb(e),o={...i.state,stackRef:t,targetRef:n,initialFocusRef:e.initialFocusRef,returnFocusRef:e.returnFocusRef,placement:a},s={...i.events,updatePlacement(l){r(l.placement)}};return{state:o,events:s}});ha.Context;const zU=le()(e=>{const t=$.useCallback(a=>{e.state.stackRef.current&&document.contains(a.target)&&!Rt.contains(e.state.stackRef.current,a.target)&&e.events.hide(a)},[e.events,e.state.stackRef]),n=e.state.visibility!=="hidden";return $.useLayoutEffect(()=>{var a;if(n)return document.addEventListener("mousedown",t),(a=e.state.stackRef.current)==null||a.setAttribute("data-behavior-click-outside-close","always"),()=>{document.removeEventListener("mousedown",t)}},[e.state.stackRef,n,t]),{}}),jU=le()(e=>{const t=$.useCallback(a=>{(a.key==="Esc"||a.key==="Escape")&&Rt.isTopmost(e.state.stackRef.current)&&e.events.hide(a)},[e.state.stackRef,e.events]),n=e.state.visibility!=="hidden";return $.useLayoutEffect(()=>{if(n)return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[t,n]),{}}),Qne=le()(e=>{const t=$.useCallback(a=>{pr.isFullscreen||e.events.hide(a)},[e.events]),n=e.state.visibility!=="hidden";return $.useEffect(()=>{if(n&&pr.isEnabled)return pr.on("change",t),()=>{pr.off("change",t)}},[t,n]),{}});function BU(e){if(e===document.body||!e.parentElement)return e;const t=getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"||t.overflowX==="scroll"||t.overflowX==="auto"?e:BU(e.parentElement)}const ere=le()(e=>{const t=e.state.visibility!=="hidden",n=$.useCallback(a=>{a[0].intersectionRatio<.5&&e.events.hide()},[e.events]);return $.useLayoutEffect(()=>{if(!t||!e.state.targetRef.current)return;const a=e.state.targetRef.current,r=BU(a),i=new IntersectionObserver(n,{root:r,threshold:.5});return i.observe(e.state.targetRef.current),()=>{i.disconnect()}},[n,e.state.targetRef,t]),{}}),tre=le()(e=>{const t=$.useCallback(a=>{if(e.state.stackRef.current&&a.key==="Tab"){const r=Mee(e.state.stackRef.current),i=Uee(e.state.stackRef.current);a.getModifierState("Shift")&&document.activeElement===r?(a.preventDefault(),e.events.hide(a)):!a.getModifierState("Shift")&&(Array.isArray(i)&&document.activeElement&&i.includes(document.activeElement)||document.activeElement===i)&&e.events.hide(a)}},[e.events,e.state.stackRef]),n=e.state.visibility!=="hidden";return $.useLayoutEffect(()=>{if(n)return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[n,t]),{}}),qU=le()(({state:e,events:t},n)=>{const a=la(n,e.stackRef),r=$.useRef(e.placement);r.current=e.placement;const i=$.useCallback(o=>{o!==r.current&&t.updatePlacement({placement:o})},[t]);return{open:e.visibility!=="hidden",anchorElement:e.targetRef,ref:a,onPlacementChange:i}}),nre=(e,t)=>{const{elementRef:n,localRef:a}=La(e),r=$.useContext(Rw),{style:i}=Zee(r,{}),o=$.useRef(!0),[s]=$.useState(()=>{if(o.current){const l=Rt.createContainer();return n(l),o.current=!1,l}return a.current});return $.useLayoutEffect(()=>{const l=a.current;if(!l)return;const c=Object.keys(i);if(c.length!==0)for(const u of c)l.style.setProperty(u,i[u])},[a,i]),$.useLayoutEffect(()=>{if(s!==a.current)throw Error("The 'ref' passed to usePopupStack should not be applied to a React element. This will cause a runtime error where the PopupStack and React compete for the element. Instead use ReactDOM.createPortal(<YourComponent />, ref.current)");const l=t?"current"in t?t.current||void 0:t:void 0,c=a.current;return Rt.add({element:c,owner:l}),()=>{Rt.remove(c)}},[a,t,s]),$.useLayoutEffect(()=>{var u,d;let c=(t?"current"in t?t.current:t:void 0)??void 0;if(c==null&&typeof document<"u"){const f=document.activeElement,g=a.current;c=(f&&g&&!g.contains(f)?f:document.body).closest("[dir]")??document.documentElement}if(c){const f=c.getAttribute("dir");(f!=null?f.toLowerCase()==="rtl":XM(c))?(u=a.current)==null||u.setAttribute("dir","rtl"):(d=a.current)==null||d.setAttribute("dir","ltr")}},[a,t]),a},GU=le()(({events:e,state:t},n)=>({ref:la(n,t.targetRef),onClick:r=>{t.targetRef.current instanceof Element||(t.targetRef.current=r.currentTarget),t.visibility!=="hidden"?e.hide(r):e.show(r)}})),rre=le()(({events:e,state:t},n)=>({ref:la(n,t.targetRef),onContextMenu:r=>{t.targetRef.current||(t.targetRef.current=r.currentTarget),t.visibility!=="hidden"?e.hide(r):e.show(r),r.preventDefault()}}));function HU(e){if(e===document.body||!e.parentElement)return e;const t=getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"?e:HU(e.parentElement)}function VU(e){return e===null||e===document.body||!e.parentElement?null:Pee(e)?e:VU(e.parentElement)}function jC(e,t){const n=e.getBoundingClientRect();return n.top+n.height/2<t.top||n.bottom-n.height/2>t.bottom||n.left+n.width/2<t.left||n.right-n.width/2>t.right}const are=le()(e=>{const t=e.state.visibility!=="hidden",n=$.useRef(null),a=$.useRef(!1),r=$.useCallback(o=>{o.key==="Tab"&&(a.current=!0)},[]),i=$.useCallback(o=>{e.state.stackRef.current&&o.target instanceof Element&&(Rt.contains(e.state.stackRef.current,o.target)||(n.current=o.target))},[e.state.stackRef]);return $.useLayoutEffect(()=>{if(!t)return;const o=(e.state.returnFocusRef||e.state.targetRef).current;return document.addEventListener("mousedown",i,!0),document.addEventListener("keydown",r,!0),()=>{if(document.removeEventListener("mousedown",i,!0),document.removeEventListener("keydown",r,!0),!o)return;const l=HU(o).getBoundingClientRect(),c={left:0,top:0,right:window.innerWidth,bottom:window.innerHeight};if(n.current&&VU(n.current)||jC(o,l)||jC(o,c)){n.current=null;return}document.activeElement!==document.body&&e.state.stackRef.current&&document.activeElement instanceof Element&&!Rt.contains(e.state.stackRef.current,document.activeElement)||a.current?_C(o):requestAnimationFrame(()=>{_C(o)}),n.current=null}},[e.state.returnFocusRef,e.state.targetRef,t,i,r,e.state.stackRef]),{}}),WU=e=>{const[t,n]=e.split("-");return{vertical:t==="top"?"bottom":t==="bottom"||n==="end"?"top":n==="start"?"bottom":"center",horizontal:t==="left"?"right":t==="right"||n==="end"?"left":n==="start"?"right":"center"}};var Tn="top",jn="bottom",Bn="right",Rn="left",Mw="auto",Fl=[Tn,jn,Bn,Rn],Bi="start",Uw="end",ire="clippingParents",ZU="viewport",xo="popper",ore="reference",BC=Fl.reduce(function(e,t){return e.concat([t+"-"+Bi,t+"-"+Uw])},[]),YU=[].concat(Fl,[Mw]).reduce(function(e,t){return e.concat([t,t+"-"+Bi,t+"-"+Uw])},[]),sre="beforeRead",lre="read",cre="afterRead",ure="beforeMain",dre="main",pre="afterMain",fre="beforeWrite",mre="write",gre="afterWrite",hre=[sre,lre,cre,ure,dre,pre,fre,mre,gre];function qn(e){return e?(e.nodeName||"").toLowerCase():null}function Gn(e){if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ys(e){var t=Gn(e).Element;return e instanceof t||e instanceof Element}function ar(e){var t=Gn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function vre(e){var t=Gn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function bre(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var a=t.styles[n]||{},r=t.attributes[n]||{},i=t.elements[n];!ar(i)||!qn(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(o){var s=r[o];s===!1?i.removeAttribute(o):i.setAttribute(o,s===!0?"":s)}))})}function yre(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(a){var r=t.elements[a],i=t.attributes[a]||{},o=Object.keys(t.styles.hasOwnProperty(a)?t.styles[a]:n[a]),s=o.reduce(function(l,c){return l[c]="",l},{});!ar(r)||!qn(r)||(Object.assign(r.style,s),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const Sre={name:"applyStyles",enabled:!0,phase:"write",fn:bre,effect:yre,requires:["computeStyles"]};function rr(e){return e.split("-")[0]}function zw(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function KU(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&vre(n)){var a=t;do{if(a&&e.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function _r(e){return Gn(e).getComputedStyle(e)}function Ere(e){return["table","td","th"].indexOf(qn(e))>=0}function $r(e){return((ys(e)?e.ownerDocument:e.document)||window.document).documentElement}function fp(e){return qn(e)==="html"?e:e.assignedSlot||e.parentNode||e.host||$r(e)}function qC(e){if(!ar(e)||_r(e).position==="fixed")return null;var t=e.offsetParent;if(t){var n=$r(t);if(qn(t)==="body"&&_r(t).position==="static"&&_r(n).position!=="static")return n}return t}function _re(e){for(var t=fp(e);ar(t)&&["html","body"].indexOf(qn(t))<0;){var n=_r(t);if(n.transform!=="none"||n.perspective!=="none"||n.willChange&&n.willChange!=="auto")return t;t=t.parentNode}return null}function Pl(e){for(var t=Gn(e),n=qC(e);n&&Ere(n)&&_r(n).position==="static";)n=qC(n);return n&&qn(n)==="body"&&_r(n).position==="static"?t:n||_re(e)||t}function jw(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Uc(e,t,n){return Math.max(e,Math.min(t,n))}function XU(){return{top:0,right:0,bottom:0,left:0}}function JU(e){return Object.assign(Object.assign({},XU()),e)}function QU(e,t){return t.reduce(function(n,a){return n[a]=e,n},{})}function wre(e){var t,n=e.state,a=e.name,r=n.elements.arrow,i=n.modifiersData.popperOffsets,o=rr(n.placement),s=jw(o),l=[Rn,Bn].indexOf(o)>=0,c=l?"height":"width";if(!(!r||!i)){var u=n.modifiersData[a+"#persistent"].padding,d=zw(r),f=s==="y"?Tn:Rn,g=s==="y"?jn:Bn,b=n.rects.reference[c]+n.rects.reference[s]-i[s]-n.rects.popper[c],y=i[s]-n.rects.reference[s],I=Pl(r),v=I?s==="y"?I.clientHeight||0:I.clientWidth||0:0,m=b/2-y/2,h=u[f],S=v-d[c]-u[g],w=v/2-d[c]/2+m,k=Uc(h,w,S),x=s;n.modifiersData[a]=(t={},t[x]=k,t.centerOffset=k-w,t)}}function kre(e){var t=e.state,n=e.options,a=e.name,r=n.element,i=r===void 0?"[data-popper-arrow]":r,o=n.padding,s=o===void 0?0:o;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||KU(t.elements.popper,i)&&(t.elements.arrow=i,t.modifiersData[a+"#persistent"]={padding:JU(typeof s!="number"?s:QU(s,Fl))}))}const Ire={name:"arrow",enabled:!0,phase:"main",fn:wre,effect:kre,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};var xre={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Tre(e){var t=e.x,n=e.y,a=window,r=a.devicePixelRatio||1;return{x:Math.round(t*r)/r||0,y:Math.round(n*r)/r||0}}function GC(e){var t,n=e.popper,a=e.popperRect,r=e.placement,i=e.offsets,o=e.position,s=e.gpuAcceleration,l=e.adaptive,c=Tre(i),u=c.x,d=c.y,f=i.hasOwnProperty("x"),g=i.hasOwnProperty("y"),b=Rn,y=Tn,I=window;if(l){var v=Pl(n);v===Gn(n)&&(v=$r(n)),r===Tn&&(y=jn,d-=v.clientHeight-a.height,d*=s?1:-1),r===Rn&&(b=Bn,u-=v.clientWidth-a.width,u*=s?1:-1)}var m=Object.assign({position:o},l&&xre);if(s){var h;return Object.assign(Object.assign({},m),{},(h={},h[y]=g?"0":"",h[b]=f?"0":"",h.transform=(I.devicePixelRatio||1)<2?"translate("+u+"px, "+d+"px)":"translate3d("+u+"px, "+d+"px, 0)",h))}return Object.assign(Object.assign({},m),{},(t={},t[y]=g?d+"px":"",t[b]=f?u+"px":"",t.transform="",t))}function Rre(e){var t=e.state,n=e.options,a=n.gpuAcceleration,r=a===void 0?!0:a,i=n.adaptive,o=i===void 0?!0:i,s={placement:rr(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign(Object.assign({},t.styles.popper),GC(Object.assign(Object.assign({},s),{},{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign(Object.assign({},t.styles.arrow),GC(Object.assign(Object.assign({},s),{},{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1})))),t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-placement":t.placement})}const Are={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Rre,data:{}};var Sc={passive:!0};function Cre(e){var t=e.state,n=e.instance,a=e.options,r=a.scroll,i=r===void 0?!0:r,o=a.resize,s=o===void 0?!0:o,l=Gn(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,Sc)}),s&&l.addEventListener("resize",n.update,Sc),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,Sc)}),s&&l.removeEventListener("resize",n.update,Sc)}}const Nre={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Cre,data:{}};var Ore={left:"right",right:"left",bottom:"top",top:"bottom"};function zc(e){return e.replace(/left|right|bottom|top/g,function(t){return Ore[t]})}var Lre={start:"end",end:"start"};function HC(e){return e.replace(/start|end/g,function(t){return Lre[t]})}function Ss(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function Bw(e){var t=Gn(e),n=t.pageXOffset,a=t.pageYOffset;return{scrollLeft:n,scrollTop:a}}function qw(e){return Ss($r(e)).left+Bw(e).scrollLeft}function $re(e){var t=Gn(e),n=$r(e),a=t.visualViewport,r=n.clientWidth,i=n.clientHeight,o=0,s=0;return a&&(r=a.width,i=a.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=a.offsetLeft,s=a.offsetTop)),{width:r,height:i,x:o+qw(e),y:s}}function Dre(e){var t=$r(e),n=Bw(e),a=e.ownerDocument.body,r=Math.max(t.scrollWidth,t.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),i=Math.max(t.scrollHeight,t.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),o=-n.scrollLeft+qw(e),s=-n.scrollTop;return _r(a||t).direction==="rtl"&&(o+=Math.max(t.clientWidth,a?a.clientWidth:0)-r),{width:r,height:i,x:o,y:s}}function Gw(e){var t=_r(e),n=t.overflow,a=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function ez(e){return["html","body","#document"].indexOf(qn(e))>=0?e.ownerDocument.body:ar(e)&&Gw(e)?e:ez(fp(e))}function Ho(e,t){t===void 0&&(t=[]);var n=ez(e),a=qn(n)==="body",r=Gn(n),i=a?[r].concat(r.visualViewport||[],Gw(n)?n:[]):n,o=t.concat(i);return a?o:o.concat(Ho(fp(i)))}function py(e){return Object.assign(Object.assign({},e),{},{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Fre(e){var t=Ss(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function VC(e,t){return t===ZU?py($re(e)):ar(t)?Fre(t):py(Dre($r(e)))}function Pre(e){var t=Ho(fp(e)),n=["absolute","fixed"].indexOf(_r(e).position)>=0,a=n&&ar(e)?Pl(e):e;return ys(a)?t.filter(function(r){return ys(r)&&KU(r,a)&&qn(r)!=="body"}):[]}function Mre(e,t,n){var a=t==="clippingParents"?Pre(e):[].concat(t),r=[].concat(a,[n]),i=r[0],o=r.reduce(function(s,l){var c=VC(e,l);return s.top=Math.max(c.top,s.top),s.right=Math.min(c.right,s.right),s.bottom=Math.min(c.bottom,s.bottom),s.left=Math.max(c.left,s.left),s},VC(e,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function Es(e){return e.split("-")[1]}function tz(e){var t=e.reference,n=e.element,a=e.placement,r=a?rr(a):null,i=a?Es(a):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(r){case Tn:l={x:o,y:t.y-n.height};break;case jn:l={x:o,y:t.y+t.height};break;case Bn:l={x:t.x+t.width,y:s};break;case Rn:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=r?jw(r):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case Bi:l[c]=Math.floor(l[c])-Math.floor(t[u]/2-n[u]/2);break;case Uw:l[c]=Math.floor(l[c])+Math.ceil(t[u]/2-n[u]/2);break}}return l}function qi(e,t){t===void 0&&(t={});var n=t,a=n.placement,r=a===void 0?e.placement:a,i=n.boundary,o=i===void 0?ire:i,s=n.rootBoundary,l=s===void 0?ZU:s,c=n.elementContext,u=c===void 0?xo:c,d=n.altBoundary,f=d===void 0?!1:d,g=n.padding,b=g===void 0?0:g,y=JU(typeof b!="number"?b:QU(b,Fl)),I=u===xo?ore:xo,v=e.elements.reference,m=e.rects.popper,h=e.elements[f?I:u],S=Mre(ys(h)?h:h.contextElement||$r(e.elements.popper),o,l),w=Ss(v),k=tz({reference:w,element:m,placement:r}),x=py(Object.assign(Object.assign({},m),k)),N=u===xo?x:w,O={top:S.top-N.top+y.top,bottom:N.bottom-S.bottom+y.bottom,left:S.left-N.left+y.left,right:N.right-S.right+y.right},U=e.modifiersData.offset;if(u===xo&&U){var Z=U[r];Object.keys(O).forEach(function(ae){var ie=[Bn,jn].indexOf(ae)>=0?1:-1,we=[Tn,jn].indexOf(ae)>=0?"y":"x";O[ae]+=Z[we]*ie})}return O}function Ure(e,t){t===void 0&&(t={});var n=t,a=n.placement,r=n.boundary,i=n.rootBoundary,o=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?YU:l,u=Es(a),d=u?s?BC:BC.filter(function(b){return Es(b)===u}):Fl,f=d.filter(function(b){return c.indexOf(b)>=0});f.length===0&&(f=d);var g=f.reduce(function(b,y){return b[y]=qi(e,{placement:y,boundary:r,rootBoundary:i,padding:o})[rr(y)],b},{});return Object.keys(g).sort(function(b,y){return g[b]-g[y]})}function zre(e){if(rr(e)===Mw)return[];var t=zc(e);return[HC(e),t,HC(t)]}function jre(e){var t=e.state,n=e.options,a=e.name;if(!t.modifiersData[a]._skip){for(var r=n.mainAxis,i=r===void 0?!0:r,o=n.altAxis,s=o===void 0?!0:o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,g=n.flipVariations,b=g===void 0?!0:g,y=n.allowedAutoPlacements,I=t.options.placement,v=rr(I),m=v===I,h=l||(m||!b?[zc(I)]:zre(I)),S=[I].concat(h).reduce(function(Se,Pe){return Se.concat(rr(Pe)===Mw?Ure(t,{placement:Pe,boundary:u,rootBoundary:d,padding:c,flipVariations:b,allowedAutoPlacements:y}):Pe)},[]),w=t.rects.reference,k=t.rects.popper,x=new Map,N=!0,O=S[0],U=0;U<S.length;U++){var Z=S[U],ae=rr(Z),ie=Es(Z)===Bi,we=[Tn,jn].indexOf(ae)>=0,Te=we?"width":"height",ye=qi(t,{placement:Z,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),Re=we?ie?Bn:Rn:ie?jn:Tn;w[Te]>k[Te]&&(Re=zc(Re));var P=zc(Re),G=[];if(i&&G.push(ye[ae]<=0),s&&G.push(ye[Re]<=0,ye[P]<=0),G.every(function(Se){return Se})){O=Z,N=!1;break}x.set(Z,G)}if(N)for(var H=b?3:1,Y=function(Pe){var ze=S.find(function(nt){var gn=x.get(nt);if(gn)return gn.slice(0,Pe).every(function(ja){return ja})});if(ze)return O=ze,"break"},Q=H;Q>0;Q--){var Ke=Y(Q);if(Ke==="break")break}t.placement!==O&&(t.modifiersData[a]._skip=!0,t.placement=O,t.reset=!0)}}const Bre={name:"flip",enabled:!0,phase:"main",fn:jre,requiresIfExists:["offset"],data:{_skip:!1}};function WC(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ZC(e){return[Tn,Bn,jn,Rn].some(function(t){return e[t]>=0})}function qre(e){var t=e.state,n=e.name,a=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,o=qi(t,{elementContext:"reference"}),s=qi(t,{altBoundary:!0}),l=WC(o,a),c=WC(s,r,i),u=ZC(l),d=ZC(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const Gre={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:qre};function Hre(e,t,n){var a=rr(e),r=[Rn,Tn].indexOf(a)>=0?-1:1,i=typeof n=="function"?n(Object.assign(Object.assign({},t),{},{placement:e})):n,o=i[0],s=i[1];return o=o||0,s=(s||0)*r,[Rn,Bn].indexOf(a)>=0?{x:s,y:o}:{x:o,y:s}}function Vre(e){var t=e.state,n=e.options,a=e.name,r=n.offset,i=r===void 0?[0,0]:r,o=YU.reduce(function(u,d){return u[d]=Hre(d,t.rects,i),u},{}),s=o[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[a]=o}const Wre={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Vre};function Zre(e){var t=e.state,n=e.name;t.modifiersData[n]=tz({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const Yre={name:"popperOffsets",enabled:!0,phase:"read",fn:Zre,data:{}};function Kre(e){return e==="x"?"y":"x"}function Xre(e){var t=e.state,n=e.options,a=e.name,r=n.mainAxis,i=r===void 0?!0:r,o=n.altAxis,s=o===void 0?!1:o,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,g=f===void 0?!0:f,b=n.tetherOffset,y=b===void 0?0:b,I=qi(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=rr(t.placement),m=Es(t.placement),h=!m,S=jw(v),w=Kre(S),k=t.modifiersData.popperOffsets,x=t.rects.reference,N=t.rects.popper,O=typeof y=="function"?y(Object.assign(Object.assign({},t.rects),{},{placement:t.placement})):y,U={x:0,y:0};if(k){if(i){var Z=S==="y"?Tn:Rn,ae=S==="y"?jn:Bn,ie=S==="y"?"height":"width",we=k[S],Te=k[S]+I[Z],ye=k[S]-I[ae],Re=g?-N[ie]/2:0,P=m===Bi?x[ie]:N[ie],G=m===Bi?-N[ie]:-x[ie],H=t.elements.arrow,Y=g&&H?zw(H):{width:0,height:0},Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:XU(),Ke=Q[Z],Se=Q[ae],Pe=Uc(0,x[ie],Y[ie]),ze=h?x[ie]/2-Re-Pe-Ke-O:P-Pe-Ke-O,nt=h?-x[ie]/2+Re+Pe+Se+O:G+Pe+Se+O,gn=t.elements.arrow&&Pl(t.elements.arrow),ja=gn?S==="y"?gn.clientTop||0:gn.clientLeft||0:0,Ba=t.modifiersData.offset?t.modifiersData.offset[t.placement][S]:0,qa=k[S]+ze-Ba-ja,mp=k[S]+nt-Ba,Ga=Uc(g?Math.min(Te,qa):Te,we,g?Math.max(ye,mp):ye);k[S]=Ga,U[S]=Ga-we}if(s){var Gz=S==="x"?Tn:Rn,Hz=S==="x"?jn:Bn,zl=k[w],Vz=zl+I[Gz],Wz=zl-I[Hz],Ww=Uc(Vz,zl,Wz);k[w]=Ww,U[w]=Ww-zl}t.modifiersData[a]=U}}const Jre={name:"preventOverflow",enabled:!0,phase:"main",fn:Xre,requiresIfExists:["offset"]};function Qre(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function eae(e){return e===Gn(e)||!ar(e)?Bw(e):Qre(e)}function tae(e,t,n){n===void 0&&(n=!1);var a=$r(t),r=Ss(e),i=ar(t),o={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(i||!i&&!n)&&((qn(t)!=="body"||Gw(a))&&(o=eae(t)),ar(t)?(s=Ss(t),s.x+=t.clientLeft,s.y+=t.clientTop):a&&(s.x=qw(a))),{x:r.left+o.scrollLeft-s.x,y:r.top+o.scrollTop-s.y,width:r.width,height:r.height}}function nae(e){var t=new Map,n=new Set,a=[];e.forEach(function(i){t.set(i.name,i)});function r(i){n.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&r(l)}}),a.push(i)}return e.forEach(function(i){n.has(i.name)||r(i)}),a}function rae(e){var t=nae(e);return hre.reduce(function(n,a){return n.concat(t.filter(function(r){return r.phase===a}))},[])}function aae(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function iae(e){var t=e.reduce(function(n,a){var r=n[a.name];return n[a.name]=r?Object.assign(Object.assign(Object.assign({},r),a),{},{options:Object.assign(Object.assign({},r.options),a.options),data:Object.assign(Object.assign({},r.data),a.data)}):a,n},{});return Object.keys(t).map(function(n){return t[n]})}var YC={placement:"bottom",modifiers:[],strategy:"absolute"};function KC(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function oae(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,a=n===void 0?[]:n,r=t.defaultOptions,i=r===void 0?YC:r;return function(s,l,c){c===void 0&&(c=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},YC),i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],f=!1,g={state:u,setOptions:function(v){y(),u.options=Object.assign(Object.assign(Object.assign({},i),u.options),v),u.scrollParents={reference:ys(s)?Ho(s):s.contextElement?Ho(s.contextElement):[],popper:Ho(l)};var m=rae(iae([].concat(a,u.options.modifiers)));return u.orderedModifiers=m.filter(function(h){return h.enabled}),b(),g.update()},forceUpdate:function(){if(!f){var v=u.elements,m=v.reference,h=v.popper;if(KC(m,h)){u.rects={reference:tae(m,Pl(h),u.options.strategy==="fixed"),popper:zw(h)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(U){return u.modifiersData[U.name]=Object.assign({},U.data)});for(var S=0;S<u.orderedModifiers.length;S++){if(u.reset===!0){u.reset=!1,S=-1;continue}var w=u.orderedModifiers[S],k=w.fn,x=w.options,N=x===void 0?{}:x,O=w.name;typeof k=="function"&&(u=k({state:u,options:N,name:O,instance:g})||u)}}}},update:aae(function(){return new Promise(function(I){g.forceUpdate(),I(u)})}),destroy:function(){y(),f=!0}};if(!KC(s,l))return g;g.setOptions(c).then(function(I){!f&&c.onFirstUpdate&&c.onFirstUpdate(I)});function b(){u.orderedModifiers.forEach(function(I){var v=I.name,m=I.options,h=m===void 0?{}:m,S=I.effect;if(typeof S=="function"){var w=S({state:u,name:v,instance:g,options:h}),k=function(){};d.push(w||k)}})}function y(){d.forEach(function(I){return I()}),d=[]}return g}}var sae=[Nre,Yre,Are,Sre,Wre,Bre,Jre,Ire,Gre],lae=oae({defaultModifiers:sae});const cae=["top","top-start","top-end","bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end","auto","auto-start","auto-end"],uae=e=>{const[t,n]=e.split("-");let a;switch(t){case"top":a="bottom";break;case"bottom":a="top";break;case"left":a="right";break;case"right":a="left";break;default:a="auto"}return n&&(a=cae.find(r=>r.includes(`${a}-${n}`))??a),a},nz=(e,t,n)=>{if(e.length===0||e[0].split("-")[0]==="auto")return n;const{reference:a,popper:r}=t.rects,i=qi({...t,placement:e[0]}),o=/left|right/.test(e[0].split("-")[0])?"horizontal":"vertical",s=(i.top>0||i.bottom>0||i.left>0||i.right>0)&&(o==="horizontal"?r.height/2-i.top<a.height||r.height/2-i.bottom<a.height:r.width-i.left<a.width||r.width-i.right<a.width),l=e[0].split("-")[0];return!s&&i[l]<=0?e[0]:nz(e.slice(1),t,n)},XC="fallbackModifier",JC={name:XC,enabled:!0,phase:"main",data:{_skip:!1},fn({state:e,options:t}){const n=e.options.placement,{fallbackPlacements:a}=t,r=[n,uae(n),...a||[]],i=nz(r,e,n);e.placement!==i&&(e.modifiersData[XC]._skip=!0,e.placement=i,e.reset=!0)}},rz=["top","right","bottom","left"],Hw=J.forwardRef(({portal:e=!0,open:t=!0,...n},a)=>t?p.jsx(fae,{ref:a,portal:e,...n}):null),dae=e=>{if(e!==null)return"current"in e?e.current||void 0:e},pae={},fae=J.forwardRef(({anchorElement:e,getAnchorClientRect:t,popperOptions:n=pae,placement:a="bottom",fallbackPlacements:r=rz,onPlacementChange:i,children:o,portal:s,popperInstanceRef:l},c)=>{const u=J.useRef(!0),{localRef:d,elementRef:f}=La(l),[g,b]=J.useState(a),y=nre(c,e),I=J.useRef(a);I.current=g;const v=J.useMemo(()=>({name:"setPlacement",enabled:!0,phase:"afterWrite",fn({state:h}){b(h.placement),i==null||i(h.placement)}}),[b,i]);J.useLayoutEffect(()=>{const h=t?{getBoundingClientRect:t}:dae(e??null);if(!h){console.warn("Popper: neither anchorElement or getAnchorClientRect was defined. A valid anchorElement or getAnchorClientRect callback must be provided to render a Popper");return}if(y.current){const S=lae(h,y.current,{placement:a,...n,modifiers:[v,{...JC,options:{fallbackPlacements:r}},...n.modifiers||[]]});return f(S),()=>{S==null||S.destroy()}}},[e,t,y]),J.useLayoutEffect(()=>{var h;u.current||(h=d.current)==null||h.setOptions({placement:a,...n,modifiers:[v,{...JC,options:{fallbackPlacements:r}},...n.modifiers||[]]}),u.current=!1},[n,a,r,v,d]);const m=p.jsx(p.Fragment,{children:mae(o)?o({placement:g}):o});return s?lS.createPortal(m,y.current):m});function mae(e){return typeof e=="function"}const pt=fn({defaultConfig:{...ui.defaultConfig,...ha.defaultConfig,mode:"single",shouldVirtualize:!1},requiredConfig:{...ui.requiredConfig,...ha.requiredConfig},contextOverride:ha.Context})(e=>{const t=ui(ui.mergeConfig(e,{selection:e.mode==="single"?CU:Cne})),n=ha(ha.mergeConfig(e,{id:t.state.id,onHide(){t.state.indexRef.current=0}}));zU(n),jU(n);const a={mode:e.mode,...t.state,...n.state},r={...t.events,...n.events};return{...t,...n,state:a,events:r,UNSTABLE_parentModel:e.UNSTABLE_parentModel}}),az=he({vars:{minWidth:fe(1),transformOriginVertical:"top",transformOriginHorizontal:"left",maxHeight:""},base:({transformOriginVertical:e,transformOriginHorizontal:t,minWidth:n,maxHeight:a})=>({fontFamily:ut.default,fontWeight:Xe.normal,fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,color:L.fg.default,position:"relative",display:"flex",flexDirection:"column",transition:"transform ease-out 150ms",padding:_.padding.xxs,borderRadius:_.shape.xxl,maxWidth:Kn.subtract("100vw",_.size.sm),boxShadow:HM[3],minWidth:n,maxHeight:a,transformOrigin:`${e} ${t}`,".wd-no-animation &":{animation:"none"}})}),gae=le()(()=>({})),iz=Ne("div")({displayName:"Menu.Card",modelHook:pt,elemPropsHook:gae})(({minWidth:e,maxHeight:t,...n},a,r)=>{const i=J.useMemo(()=>WU(r.state.placement||"bottom"),[r.state.placement]);return p.jsx(Yne,{as:a,...Ue(n,az({minWidth:typeof e=="number"?fe(e):e,maxHeight:typeof t=="number"?fe(t):t,transformOriginVertical:i.vertical,transformOriginHorizontal:i.horizontal})),children:n.children})}),hae=he({base:{display:"block",height:fe(1),border:"none",borderTop:`${fe(1)} solid ${_.color.border.default}`,margin:`${_.gap.sm} ${_.gap.md}`}}),oz=$e("hr")({displayName:"Menu.Divider",Component({...e},t,n){return p.jsx(n,{ref:t,...jt(e,hae())})}}),QC={vertical:"bottom",horizontal:"center"},fy=Ka("positionX","positionY"),vae=nee({"0%":{opacity:0,transform:`translate(${fy.positionX}, ${fy.positionY})`},"100%":{opacity:1,transform:"translate(0)"}}),bae=he({vars:{tooltipTransformOriginHorizontal:"",tooltipTransformOriginVertical:""},base:({tooltipTransformOriginHorizontal:e,tooltipTransformOriginVertical:t})=>({fontFamily:ut.default,fontWeight:Xe.normal,fontSize:_.fontSize.subtext.md,lineHeight:_.lineHeight.subtext.md,letterSpacing:_.letterSpacing.subtext.md,display:"inline-flex",position:"relative",padding:_.padding.sm,color:L.fg.inverse,animationName:vae,animationDuration:"150ms",animationTimingFunction:"ease-out",transformOrigin:`${t} ${e}`,a:{color:L.fg.inverse,textDecoration:"underline"},"&:before":{content:'""',borderRadius:_.shape.md,outline:`${fe(1)} solid transparent`,outlineOffset:`-${fe(1)}`,zIndex:-1,margin:_.gap.xs,backgroundColor:_.color.surface.contrast.default,position:"absolute",top:0,left:0,right:0,bottom:0,boxShadow:HM[2]},"[data-popper-reference-hidden] &":{visibility:"hidden",pointerEvents:"none"},'[data-popper-placement="top-start"] &, [data-popper-placement="bottom-start"] &':{left:Kn.negate(Br.size50)},'[data-popper-placement="top-end"] &, [data-popper-placement="bottom-end"] &':{right:Kn.negate(Br.size50)},'[data-popper-placement="left-start"] &, [data-popper-placement="right-start"] &':{top:Kn.negate(Br.size50)},'[data-popper-placement="left-end"] &, [data-popper-placement="right-end"] &':{bottom:Kn.negate(Br.size50)}}),modifiers:{elementHasFocus:{true:{padding:Kn.subtract(_.padding.md,Kn.divide(_.padding.xxs,2)),"&:before":{margin:Br.size75}}}}}),yae=$e("div")({displayName:"TooltipContainer",Component:({children:e,transformOrigin:t=QC,elementHasFocus:n=!1,...a},r,i)=>{const o=wee(t||QC,_.gap.sm);return p.jsx(i,{ref:r,...Ue(a,[bae({tooltipTransformOriginHorizontal:t==null?void 0:t.horizontal,tooltipTransformOriginVertical:t==null?void 0:t.vertical,elementHasFocus:n}),fy({positionX:o.x,positionY:o.y})]),children:e})}}),eN=(e,t=0)=>{const n=J.useRef(),a=()=>{n.current=window.setTimeout(e,t)},r=()=>{window.clearTimeout(n.current),n.current=void 0};return J.useEffect(()=>()=>{window.clearTimeout(n.current)},[n]),{start:a,clear:r}},Sae=e=>{const t=e.tagName.toLowerCase(),n=e.getAttribute("tabindex");switch(t){case"button":case"input":case"select":case"textarea":case"details":return!0;default:return n?Number(n)>=0:!1}};function Eae({type:e="label",titleText:t="",showDelay:n=300,hideDelay:a=100}={}){const r=J.useRef(!1),i=ha(),[o,s]=J.useState(null),l=Ll(),c=eN(i.events.hide,a),u=eN(i.events.show,n),d=()=>{c.start(),u.clear()},f=()=>{u.start(),c.clear()},g=m=>{s(m.currentTarget),f()},b=m=>{r.current||g(m),r.current=!1},y=m=>{r.current=!0,Sae(m.currentTarget)&&i.events.hide()};jU(i),zU(i),Qne(i),ere(i);const I=i.state.visibility!=="hidden",v={"aria-describedby":e==="describe"&&I?l:void 0,"aria-description":e==="description"?t:void 0,"aria-label":e==="label"?t:void 0,onMouseEnter:g,onMouseLeave:d,onMouseDown:y,onFocus:b,onBlur:d};return v["aria-describedby"]===void 0&&delete v["aria-describedby"],{targetProps:v,popperProps:{open:I,anchorElement:o,ref:i.state.stackRef},tooltipProps:{id:e==="describe"&&I?l:void 0,role:"tooltip",onMouseEnter:f,onMouseLeave:d}}}const sz=e=>{const t=getComputedStyle(e);if(t.overflow==="auto"||t.overflow==="scroll"||t.overflow==="clip"||t.overflow==="hidden")return e;if(e.children){for(let n=0;n<e.children.length;n++){const a=sz(e.children[n]);if(a)return a}return null}return null},lz=e=>{const t=getComputedStyle(e);if(t.textOverflow==="ellipsis"||Number(t.webkitLineClamp)>0)return e;for(let n=0;n<e.children.length;n++){const a=lz(e.children[n]);if(a)return a}return null},tN=e=>{const t=lz(e)||sz(e);return t?t.scrollWidth>t.clientWidth||t.scrollHeight>t.clientHeight:!1};function _ae(e,t,n=Object.keys(t)){return n.reduce((a,r)=>(typeof e[r]=="function"?a[r]=JM(t[r],e[r]):a[r]=t[r],a),{})}const Vw=({placement:e="top",fallbackPlacements:t=rz,children:n,...a})=>{const[r,i]=J.useState(""),{targetProps:o,popperProps:s,tooltipProps:l}=Eae({type:"muted"}),c=d=>{const f=d.currentTarget;i(f instanceof HTMLElement?f.innerText:""),tN(f)&&o.onMouseEnter(d)},u=d=>{const f=d.currentTarget;i(f instanceof HTMLElement?f.innerText:""),tN(f)&&o.onFocus(d)};return p.jsxs(J.Fragment,{children:[J.cloneElement(n,{...o,onMouseEnter:c,onFocus:u,"aria-label":void 0,..._ae({...o,onMouseEnter:c,onFocus:u},n.props)}),p.jsx(Hw,{placement:e,fallbackPlacements:t,...s,children:({placement:d})=>{const f=WU(d);return p.jsx(yae,{transformOrigin:f,...l,...a,children:r})}})]})},cz=fn({defaultConfig:{id:void 0},requiredConfig:{}})(e=>({state:{id:Ll(e.id)},events:{}})),wae=he({base:{fontFamily:ut.default,fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,fontWeight:Xe.bold,display:"flex",alignItems:"center",width:"100%",gap:_.gap.md,padding:`${_.padding.xs} ${_.padding.md}`}}),kae=le()(e=>({"data-type":"group",role:"group","aria-labelledby":e.state.id})),Iae=le()(e=>({id:e.state.id})),nN=Ne("div")({modelHook:cz,elemPropsHook:Iae})(({children:e,...t},n)=>p.jsx(Vw,{children:p.jsx(n,{...Ue(t,wae()),children:e})})),uz=sa("div")({displayName:"Menu.Group",modelHook:cz,elemPropsHook:kae,subComponents:{Heading:nN}})(({children:e,title:t,...n},a)=>p.jsxs(a,{...Ue(n),children:[t?p.jsx(nN,{children:t}):null,e]})),Ml=he({parts:{text:"menu-item-text",icon:"menu-item-icon",selected:"menu-item-selected"},base:({textPart:e,iconPart:t,selectedPart:n})=>({fontFamily:ut.default,fontWeight:Xe.normal,fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,display:"flex",alignItems:"center",width:"100%",gap:_.gap.md,padding:`${_.padding.sm} ${_.padding.md}`,boxSizing:"border-box",cursor:"pointer",color:L.fg.default,borderWidth:0,borderRadius:_.shape.xxl,textAlign:"start",transition:"background-color 80ms, color 80ms",backgroundColor:"inherit",minHeight:_.size.md,overflowWrap:"anywhere",[ne.vars.color]:"currentColor",[`& :where(${n})`]:{transition:"opacity 80ms linear",opacity:ht.zero},"&:where(:has(span))":{display:"flex"},"&[aria-selected=true]":{color:_.color.brand.fg.primary.strong,backgroundColor:_.color.brand.surface.primary.strong,[`& :where(${n})`]:{opacity:ht.full},"&:where(.focus, :focus-visible)":{[ne.vars.color]:"currentColor",outline:"none",backgroundColor:_.color.brand.accent.primary,color:L.fg.inverse}},"&:is(.hover, :hover)":{color:L.fg.strong,backgroundColor:_.color.surface.overlay.hover.default},"&:is(.focus, :focus-visible)":{color:L.fg.inverse,backgroundColor:_.color.brand.accent.primary,outline:`${fe(2)} solid transparent`,outlineOffset:`-${fe(2)}`},"&:is(:disabled, [aria-disabled=true])":{cursor:"default",opacity:ht.disabled,"&:where(.hover, :hover, [aria-selected=true])":{background:"none"},"&:where(.focus, :focus-visible)":{backgroundColor:_.color.brand.accent.primary,opacity:ht.disabled}},[`& :where(${e})`]:{flexGrow:1,alignSelf:"center"},[`& :where(${t})`]:{alignSelf:"start"}})}),xae=e=>p.jsx(vs,{...Ml.parts.icon,...e}),dz=$e("span")({Component:({...e},t,n)=>p.jsx(n,{ref:t,...Ml.parts.text,...jt(e)})}),pz=$e("button")({displayName:"MenuItem",Component:({children:e,isDisabled:t,...n},a,r)=>p.jsx(r,{ref:a,"aria-disabled":t,...Ue(n,Ml({})),children:typeof e=="string"?p.jsx(dz,{children:e}):e})}),fz=le()(e=>({onKeyDown(t){const n=getComputedStyle(t.currentTarget);t.key==="ArrowLeft"&&n.direction==="ltr"&&e.UNSTABLE_parentModel&&e.events.hide(t)}})),mz=le()((e,t,n={"data-id":""})=>{const{localRef:a,elementRef:r}=La(t),i=n["data-id"];return J.useLayoutEffect(()=>{e.state.mode==="single"&&Tu(e.state,i)&&requestAnimationFrame(()=>{var o;(o=a.current)==null||o.focus()})},[i,a,e.state.cursorId,e.state.mode]),{ref:r,className:Tu(e.state,n["data-id"])?"focus":void 0}});function gz(e){e.UNSTABLE_parentModel&&(e.UNSTABLE_parentModel.events.hide(),gz(e.UNSTABLE_parentModel))}const Tae=ca(le()(e=>({role:"menuitem",onMouseDown(t){e.events.goTo({id:t.currentTarget.getAttribute("data-id")})},onClick:e.state.mode==="single"?t=>{t.currentTarget.getAttribute("aria-disabled")!=="true"&&(e.events.hide(t),gz(e))}:void 0})),mz,fz,$ne,LU,pp),Gi=Ne("button")({displayName:"Menu.Item",modelHook:pt,elemPropsHook:Tae,subComponents:{Icon:xae,Text:dz}})(({children:e,...t},n)=>p.jsx(Vw,{placement:"left",children:p.jsx(pz,{as:n,...t,children:e})})),Rae=ca(le()(e=>({role:"menu","aria-labelledby":e.state.id,"aria-orientation":e.state.orientation})),are,tre),hz=he({base:{background:_.color.surface.popover,borderRadius:_.shape.xxl,padding:0,gap:_.gap.xs},modifiers:{orientation:{vertical:{flexDirection:"column"},horizontal:{flexDirection:"row"}}}}),vz=Ne("div")({displayName:"Menu.List",modelHook:pt,elemPropsHook:Rae})(({children:e,...t},n,a)=>p.jsx($U,{as:n,model:a,marginY:_.gap.none,...jt(t,hz({orientation:a.state.orientation})),children:e})),bz=$e("span")({Component:({...e},t,n)=>p.jsxs(p.Fragment,{children:[p.jsx(Gi.Text,{ref:t,as:n,...e}),p.jsx(vs,{...Ml.parts.selected,icon:qte})]})}),Aae=$e("li")({displayName:"MenuOption",Component:({children:e,...t},n,a)=>p.jsx(a,{ref:n,...Ue(t,Ml()),children:typeof e=="string"?p.jsx(bz,{children:e}):e})}),Cae=ca(le()((e,t,n={})=>{const a=n["data-id"]||"";return{role:"option","aria-selected":Ane(a,e.state),onMouseDown:o=>{o.button===0&&o.currentTarget.getAttribute("aria-disabled")!=="true"&&(e.events.select({id:a}),e.state.mode==="single"&&e.events.hide(o)),o.preventDefault()}}}),Fne,pp),yz=Ne("li")({displayName:"Menu.Item",modelHook:pt,elemPropsHook:Cae,subComponents:{Icon:Gi.Icon,Text:bz}})(({children:e,...t},n)=>p.jsx(Vw,{placement:"left",children:p.jsx(Aae,{as:n,...t,children:e})})),Sz=qU,Ez={modifiers:[{name:"offset",options:{offset:()=>[0,4]}}]},Nae=Ne("div")({modelHook:pt,elemPropsHook:Sz})(({children:e,...t})=>p.jsx(Hw,{placement:"bottom-start",popperOptions:Ez,...t,children:e})),_z=le()(e=>({id:e.state.id,"aria-haspopup":"true","aria-expanded":e.state.visibility==="visible",onKeyDown(t){switch(t.key){case"ArrowDown":case"ArrowUp":e.events.show(t)}}})),Oae=ca(_z,GU),Lae=ca(_z,rre),$ae=Ne(bs)({displayName:"Menu.Target",modelHook:pt,elemPropsHook:Oae})(({children:e,...t},n)=>p.jsx(n,{...t,children:e})),Dae=Ne(bs)({displayName:"Menu.Target",modelHook:pt,elemPropsHook:Lae})(({children:e,...t},n)=>p.jsx(n,{...t,children:e})),Fae=Ne("div")({modelHook:pt,elemPropsHook:Sz})(({children:e,...t})=>p.jsx(Hw,{placement:"right-start",popperOptions:Ez,...t,children:e})),Pae=(e,t=0)=>{const n=$.useRef(),a=()=>{n.current=window.setTimeout(e,t)},r=()=>{window.clearTimeout(n.current),n.current=void 0};return $.useEffect(()=>()=>{window.clearTimeout(n.current)},[n]),{start:a,clear:r}},Mae=ca(mc(e=>e.UNSTABLE_parentModel,mz),mc(e=>e.UNSTABLE_parentModel,fz),mc(e=>e.UNSTABLE_parentModel,LU),le()((e,t)=>({ref:la(t,e.state.targetRef)})),mc(e=>e.UNSTABLE_parentModel,pp),le()(e=>{const t=$.useRef(),n=Pae(()=>{e.UNSTABLE_parentModel.events.goTo({id:t.current||""}),e.events.show(event)},300);return{id:e.state.id,role:"menuitem","aria-haspopup":"true","aria-expanded":e.state.visibility==="visible",onMouseDown(a){e.UNSTABLE_parentModel.events.goTo({id:a.currentTarget.getAttribute("data-id")})},onMouseEnter(a){t.current=a.currentTarget.getAttribute("data-id"),n.start()},onMouseLeave(){n.clear()},onClick(a){e.state.targetRef.current instanceof Element||(e.state.targetRef.current=a.currentTarget),e.state.visibility!=="hidden"?e.events.hide(a):e.events.show(a)},"data-has-children":!0,onKeyDown(a){if(e.state.orientation==="vertical")switch(a.key){case"ArrowRight":case"Enter":case" ":e.events.show(a);break}}}})),Uae=Ne("button")({modelHook:pt,elemPropsHook:Mae})(({children:e,...t},n)=>p.jsxs(pz,{as:n,...t,children:[typeof e=="string"?p.jsx(Gi.Text,{children:e}):e,p.jsx(Gi.Icon,{icon:Gte})]})),zae=Ne()({modelHook:pt,subComponents:{Card:iz,List:vz,Item:Gi,TargetItem:Uae,Group:uz,Option:yz,Divider:oz,Popper:Fae}})(({children:e,model:t,...n},a,r)=>{const i=pt(pt.mergeConfig(n,{getId:r.getId,getTextValue:r.getTextValue,UNSTABLE_parentModel:r,mode:r.state.mode,orientation:r.state.orientation,onSelect(s){r.events.select(s)},onSelectAll(){r.events.selectAll()}})),o=pt.Context;return p.jsx(o.Provider,{value:i,children:e})}),wa=sa()({displayName:"Menu",modelHook:pt,subComponents:{Target:$ae,Card:iz,List:vz,Item:Gi,Group:uz,Option:yz,Divider:oz,TargetContext:Dae,Popper:Nae,Submenu:zae}})(({children:e})=>p.jsx(p.Fragment,{children:e})),rb=fn({defaultConfig:{value:void 0,onFilterChange(e){},onChange(e){}}})(e=>{const t=$.createRef();return{onFilterChange:e.onFilterChange,onChange:e.onChange,state:{value:e.value,inputRef:t},events:{}}}),Sr=fn({defaultConfig:{...rb.defaultConfig,...pt.defaultConfig,shouldVirtualize:!0},requiredConfig:{...rb.requiredConfig,...pt.requiredConfig}})(e=>{const t=rb(e),n=pt(e),[a,r]=$.useState(0),i={width:a,...t.state,...n.state},o={...t.events,...n.events,setWidth(s){r(s)}};return{...n,...t,state:i,events:o}}),jae=le()(e=>({onKeyDown(t){(t.key==="ArrowDown"||t.key==="ArrowUp"&&e.state.visibility!=="visible")&&(e.events.show(t),e.events.setWidth(t.currentTarget.getBoundingClientRect().width))}})),Bae=le()(e=>({onKeyDown(t){e.state.visibility==="visible"&&NU(t,e)&&t.preventDefault()}})),qae=le()(e=>{const t=e.state.visibility!=="hidden";return $.useLayoutEffect(()=>{var n;t&&e.events.setWidth(((n=e.state.targetRef.current)==null?void 0:n.getBoundingClientRect().width)||0)},[t,e.events,e.state.targetRef]),{}}),wz=ca(le()((e,t)=>{const n=la(t,e.state.inputRef);return $.useEffect(()=>{if(e.state.cursorId&&e.state.visibility==="visible"){const a=e.navigation.getItem(yr(e.state),e);if(e.state.isVirtualized&&a)e.state.UNSTABLE_virtual.scrollToIndex(a.index);else{const r=document.querySelector(`[id="${e.state.id}-list"] [data-id="${yr(e.state)}"]`);r&&requestAnimationFrame(()=>{r.scrollIntoView({block:"nearest"})})}}},[e.state.cursorId,e.state.selectedIds,e.state.visibility]),{onKeyDown(a){if(a.key==="Enter"&&!a.metaKey&&e.state.visibility==="visible"){const r=document.querySelector(`[data-id="${yr(e.state)}"]`);r&&(r==null?void 0:r.getAttribute("aria-disabled"))!=="true"&&(e.events.select({id:yr(e.state)}),e.state.mode==="single"&&e.events.hide(a)),a.preventDefault()}},onBlur(a){e.events.hide(a)},onClick(a){e.state.visibility==="hidden"&&e.events.setWidth(a.currentTarget.getBoundingClientRect().width)},value:e.state.value,role:"combobox","aria-haspopup":"listbox","aria-expanded":e.state.visibility==="visible","aria-autocomplete":"list","aria-controls":`${e.state.id}-list`,"aria-activedescendant":e.state.visibility==="hidden"?null:void 0,id:e.state.id,ref:n}}),qae,jae,Dne,Bae,GU),Gae=Ne(Dw)({modelHook:Sr,elemPropsHook:wz})(({children:e,...t},n)=>p.jsx(n,{...t,children:e})),Hae=le()(e=>({minWidth:e.state.width})),Vae=he({base:{'& :where([data-part="list-box-container"])':{borderRadius:_.shape.xxl}}}),Wae=Ne("div")({modelHook:Sr,elemPropsHook:Hae})(({children:e,...t},n)=>p.jsx(wa.Card,{as:n,...jt(t,Vae()),children:e})),Zae=le()(e=>({role:"listbox","aria-labelledby":e.state.id,id:`${e.state.id}-list`})),Yae=he({base:{},extends:hz}),Kae=Ne("ul")({modelHook:Sr,elemPropsHook:Zae})(({children:e,...t},n,a)=>p.jsx($U,{as:n,model:a,marginY:_.gap.none,...jt(t,Yae({orientation:a.state.orientation})),children:e})),Xae=qU,Jae=Ne("div")({displayName:"Combobox.Menu.Popper",modelHook:pt,elemPropsHook:Xae})(({children:e,...t})=>p.jsx(wa.Popper,{fallbackPlacements:["top","bottom"],...t,children:e})),rN=Ne()({modelHook:Sr,subComponents:{Popper:Jae,List:Kae,Item:wa.Option,Card:Wae,Divider:wa.Divider}})(({children:e},t,n)=>p.jsx(wa,{model:n,children:e})),Si=sa()({displayName:"Combobox",modelHook:Sr,subComponents:{Input:Gae,Menu:rN}})(({children:e},t,n)=>p.jsx(rN,{model:n,children:e})),Qae=le()(e=>($.useLayoutEffect(()=>{var n;const t=(n=e.state.items.find(a=>a.id===e.state.cursorId))==null?void 0:n.id;!e.state.selectedIds.length&&e.state.items.length&&!t?e.events.goTo({id:e.state.items[0].id}):e.state.selectedIds.length&&!t&&e.events.goTo({id:e.state.selectedIds[0]})},[e.state.selectedIds,e.events,e.state.items,e.state.cursorId,e.state.visibility]),{})),eie=le()(e=>{var c;const t=$.useRef(""),n=$.useRef(),[a,r]=$.useState(t.current),i=()=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t.current="",r(t.current)},500)},o=(u,d,f=e.state.items.length,g=!0)=>{for(let b=u;b<f;b++)if(e.state.items[b].textValue.toLowerCase().startsWith(d.toLowerCase())&&(!g||g&&!e.state.nonInteractiveIds.includes(e.state.items[b].id)))return b;return-1},s=e.state.items.length>0&&((c=e.navigation.getItem(yr(e.state),e))==null?void 0:c.index)||0,l=(u,d)=>{const f=t.current.length===0?s+1:s,g=f===d?0:f;t.current+=u,r(t.current),i();let b=o(g,t.current);o(g,t.current),b===-1&&(b=o(0,t.current,g)),b>-1&&(e.events.goTo({id:e.state.items[b].id}),e.state.visibility==="hidden"&&e.events.select({id:e.state.items[b].id}))};return{onKeyDown(u){u.key.length===1&&u.key.match(/\S/)&&l(u.key,e.state.items.length),(u.key==="Spacebar"||u.key===" ")&&e.state.visibility==="visible"&&t.current!==""&&l(" ",e.state.items.length),(u.key==="Spacebar"||u.key===" ")&&e.state.visibility==="hidden"&&t.current!==""&&l(" ",e.state.items.length)},keySoFar:a}});function tie(e){return!!e}const nie=le()((e,t,{disabled:n,value:a,onChange:r,name:i}={})=>{const{elementRef:o,localRef:s}=La(e.state.targetRef),{elementRef:l,localRef:c}=La(t),u=$.useRef(e.navigation);u.current=e.navigation;const d=$.useRef(e.state);return d.current=e.state,$.useLayoutEffect(()=>{c.current&&typeof a=="string"&&a!==c.current.value&&e.events.setSelectedIds(a?a.split(", "):[])},[a,c,e.events]),$.useImperativeHandle(l,()=>{if(c.current&&s.current){const f=c.current,g=s.current;return Object.defineProperty(f,"value",{get(){var y,I;return(I=(y=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(f),"value"))==null?void 0:y.get)==null?void 0:I.call(f)},set(b){f&&b!==(d.current.selectedIds==="all"?[]:d.current.selectedIds).join(", ")&&e.events.setSelectedIds(b?b.split(", "):[])}}),Object.defineProperty(f,"focus",{configurable:!0,writable:!0,value:b=>g.focus(b)}),Object.defineProperty(f,"blur",{configurable:!0,writable:!0,value:()=>g.blur()}),f}return c.current},[c,s,e.events]),$.useLayoutEffect(()=>{if(s.current){const f=e.state.items.length===0?"":(e.state.selectedIds==="all"?[]:e.state.selectedIds.map(g=>u.current.getItem(g,{state:d.current})).filter(tie).map(g=>g.textValue)).join(", ");f!==s.current.value&&uy(s.current,f)}if(c.current){const f=(e.state.selectedIds==="all"?[]:e.state.selectedIds).join(", ");f!==c.current.value&&uy(c.current,f)}},[e.state.selectedIds,e.state.items,c,s]),{ref:o,form:"",value:null,onChange:f=>{var g;return(g=e.onFilterChange)==null||g.call(e,f),null},name:null,disabled:n,formInputProps:{disabled:n,tabIndex:-1,"aria-hidden":!0,ref:l,onChange:f=>{var g;r==null||r(f),(g=e.onChange)==null||g.call(e,f)},name:i}}}),rie=le()(e=>{const t=e.state.visibility!=="hidden";return $.useEffect(()=>{!t&&e.state.selectedIds.length&&e.events.goTo({id:e.state.selectedIds[0]})},[t,e.events,e.state.selectedIds]),{}}),Dr=fn({defaultConfig:{...Sr.defaultConfig,shouldVirtualize:!1},requiredConfig:{...Sr.requiredConfig},contextOverride:Sr.Context})(e=>Sr(e)),aie=le()(e=>({width:e.state.width})),iie=he({base:{[az.vars.maxHeight]:fe(300)}}),oie=Ne("div")({modelHook:Dr,elemPropsHook:aie})(({children:e,...t},n)=>p.jsx(Si.Menu.Card,{as:n,...jt(t,iie()),children:e})),sie=ca(le()((e,t,n={})=>{const{elementRef:a,localRef:r}=La(t);return Bee({ref:r,onResize:i=>{if(e.state.visibility==="visible"){const o=i.width?i.width+42+8:0;e.events.setWidth(o)}}}),$.useEffect(()=>{var i;if(e.state.cursorId&&e.state.visibility==="visible"){const o=e.navigation.getItem(yr(e.state),e);if(e.state.isVirtualized&&o)e.state.UNSTABLE_virtual.scrollToIndex(o.index);else{const s=(i=r.current)==null?void 0:i.getAttribute("aria-controls");if(s){const l=document.querySelector(`[id="${s}"] [data-id="${yr(e.state)}"]`);l&&requestAnimationFrame(()=>{l.scrollIntoView({block:"nearest"})})}}}},[e.state.cursorId,e.state.selectedIds,e.state.visibility]),{onKeyDown(i){i.key!=="Tab"&&i.preventDefault(),(i.key==="Spacebar"||i.key===" "&&e.state.visibility==="hidden"&&(n==null?void 0:n.keySoFar)==="")&&e.events.show(),(i.key==="Spacebar"||i.key===" ")&&e.state.visibility==="visible"&&(n==null?void 0:n.keySoFar)===""&&(e.events.select({id:yr(e.state)}),e.events.hide())},autoComplete:"off",keySoFar:null,ref:a}}),eie,rie,Qae,nie,wz),pa=he({parts:{caret:"select-caret-icon",caretContainer:"select-caret-container",startIconContainer:"select-start-icon-container",startIcon:"select-start-icon",endIcon:"select-end-icon",hiddenInput:"select-hidden-input",visualInput:"select-visual-input"},base:({hiddenInputPart:e,startIconPart:t,endIconPart:n,visualInputPart:a,caretContainerPart:r,startIconContainerPart:i,caretPart:o})=>({[e]:{position:"absolute",top:0,bottom:0,left:0,right:0,opacity:ht.zero,cursor:"default",pointerEvents:"none",minWidth:"100%",width:"100%"},[`${t}, ${n}, ${r}, ${i}`]:{position:"absolute",pointerEvents:"none"},[a]:{caretColor:"transparent",backgroundColor:_.color.surface.default,color:L.fg.default,cursor:"default","&::placeholder":{color:L.fg.default},"&::selection":{backgroundColor:"transparent"}},[o]:{[ne.vars.color]:L.fg.default},"&:has(:disabled, .disabled)":{[o]:{[ne.vars.color]:L.fg.disabled}}}),modifiers:{error:{error:({visualInputPart:e})=>({[e]:{backgroundColor:_.color.brand.surface.critical.default}}),caution:({visualInputPart:e})=>({[e]:{backgroundColor:_.color.brand.surface.caution.default}})}}}),lie=Ne(Dw)({modelHook:Dr,elemPropsHook:sie})(({inputStartIcon:e,formInputProps:t,error:n,...a},r,i)=>p.jsxs(Io,{"data-width":"ck-formfield-width",...pa({error:n}),children:[e&&i.state.selectedIds.length>0&&p.jsx(Io.InnerStart,{...pa.parts.startIconContainer,children:p.jsx(vs,{...pa.parts.startIcon,icon:e})}),p.jsx(Io.Input,{...pa.parts.hiddenInput,...t}),p.jsx(Io.Input,{as:r,placeholder:"Choose an option",error:n,...pa.parts.visualInput,...a}),p.jsx(Io.InnerEnd,{...pa.parts.caretContainer,children:p.jsx(vs,{...pa.parts.caret,icon:Bte})})]})),cie=Ne("li")({modelHook:Dr,subComponents:{Icon:Si.Menu.Item.Icon}})(({children:e,...t},n,a)=>p.jsx(Si.Menu.Item,{as:n,...t,children:e})),D=sa()({displayName:"Select",modelHook:Dr,subComponents:{Input:lie,Popper:Si.Menu.Popper,Card:oie,List:Si.Menu.List,Item:cie}})(({children:e,...t},n,a)=>p.jsx(Si,{model:a,...t,children:e})),Ul=fn({defaultConfig:{error:void 0,id:"",isRequired:!1,orientation:"vertical"}})(e=>{const t=Ll(e.id);return{state:{...e,id:t},events:{}}}),uie=le()(({state:e})=>({id:`hint-${e.id}`})),die=le()(({state:e})=>({required:e.isRequired?!0:void 0,"aria-invalid":e.error==="error"?!0:void 0,"aria-describedby":e.id?`hint-${e.id}`:void 0,"aria-labelledby":e.id?`label-${e.id}`:void 0,id:e.id?`input-${e.id}`:void 0,error:e.error})),pie=le()(({state:e})=>({htmlFor:`input-${e.id}`,id:`label-${e.id}`})),fie=he({base:{display:"flex",flexDirection:"column",gap:_.gap.sm}}),mie=Ne("div")({displayName:"FormField.Field",modelHook:Ul})((e,t,n)=>p.jsx(t,{"data-width":"ck-formfield-width",...jt(e,fie())})),gie=he({extends:Lr,base:{margin:0},modifiers:{error:{error:{color:_.color.brand.fg.critical.default},caution:{color:L.fg.default}}},defaultModifiers:{typeLevel:"subtext.medium"}}),hie=Ne("p")({displayName:"FormField.Hint",modelHook:Ul,elemPropsHook:uie})(({children:e,typeLevel:t,variant:n,...a},r,i)=>e?p.jsx(r,{...Ue(a,gie({typeLevel:t,variant:n,error:i.state.error})),children:e}):null),vie=Ne("input")({displayName:"FormField.Input",modelHook:Ul,elemPropsHook:die})((e,t)=>p.jsx($l,{"data-width":"ck-formfield-width",as:t,...Ue(e)})),bie=he({extends:Lr,base:{fontWeight:Xe.medium,color:L.fg.default,paddingInlineStart:0,display:"flex",alignItems:"center",minWidth:fe(180)},modifiers:{isRequired:{true:{"&::after":{content:'"*"',fontSize:_.fontSize.body.lg,fontWeight:Xe.normal,color:_.color.brand.fg.critical.default,textDecoration:"unset",marginInlineStart:_.gap.xs}}},orientation:{horizontalStart:{justifyContent:"flex-start",float:"left",maxHeight:_.size.md},horizontalEnd:{maxHeight:_.size.md,float:"left",justifyContent:"flex-end"},vertical:{width:"100%"}},isHidden:{true:{...sU}}},defaultModifiers:{typeLevel:"subtext.large"}}),yie=Ne("label")({displayName:"FormField.Label",modelHook:Ul,elemPropsHook:pie})(({children:e,typeLevel:t,variant:n,isHidden:a,...r},i,o)=>p.jsx(i,{...Ue(r,bie({typeLevel:t,variant:n,isHidden:a?"true":void 0,isRequired:o.state.isRequired,orientation:o.state.orientation})),children:e})),Sie=he({base:{display:"flex",border:"none",padding:0,margin:`0 0 ${_.gap.lg}`},modifiers:{grow:{true:{width:"100%",'[data-width="ck-formfield-width"]':{width:"100%"},'&:has(div[data-width="ck-formfield-width"])':{width:"100%"}}},orientation:{horizontalStart:{flexDirection:"row",gap:_.gap.xl,width:"100%"},horizontalEnd:{flexDirection:"row",gap:_.gap.xl,width:"100%"},vertical:{flexDirection:"column",gap:_.gap.xs,alignItems:"flex-start"}},required:{true:{}},error:{error:{},caution:{}}},defaultModifiers:{orientation:"vertical"}}),W=sa("div")({displayName:"FormField",modelHook:Ul,subComponents:{Input:vie,Label:yie,Hint:hie,Field:mie}})(({children:e,grow:t,orientation:n="vertical",...a},r,i)=>p.jsx(r,{...Ue(a,Sie({grow:t,orientation:i.state.orientation,error:i.state.error,required:i.state.isRequired})),children:e})),Eie=lt({flexDirection:"column"}),_ie=["E-mail","Phone","Fax","Mail","Mobile Phone","The Ontologically Anthropocentric Sensory Immersive Simulation","Thisisalongstringwithnobreaksandwillwrap"],kz=()=>{const[e,t]=$.useState(""),n=a=>{console.log("change",a.currentTarget.value),t(a.target.value)};return p.jsxs(Mt,{cs:Eie,children:[p.jsxs(W,{children:[p.jsx(W.Label,{children:"Contact"}),p.jsx(W.Field,{children:p.jsxs(D,{items:_ie,children:[p.jsx(W.Input,{as:D.Input,onChange:n}),p.jsx(D.Popper,{children:p.jsx(D.Card,{children:p.jsx(D.List,{children:a=>p.jsx(D.Item,{children:a})})})})]})})]}),"Selected Value: ",e]})};kz.__RAW__=`import React from 'react';
305
+ color: hsl(${Math.max(0,Math.min(120-120*I,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(c=n==null?void 0:n.onChange)==null||c.call(n,r),r}return i.updateDeps=o=>{a=o},i}function NC(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const cne=(e,t)=>Math.abs(e-t)<=1,une=(e,t,n)=>{let a;return function(...r){e.clearTimeout(a),a=e.setTimeout(()=>t.apply(this,r),n)}},OC=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},dne=e=>e,pne=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),a=[];for(let r=t;r<=n;r++)a.push(r);return a},fne=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=e.targetWindow;if(!a)return;const r=o=>{const{width:s,height:l}=o;t({width:Math.round(s),height:Math.round(l)})};if(r(OC(n)),!a.ResizeObserver)return()=>{};const i=new a.ResizeObserver(o=>{const s=()=>{const l=o[0];if(l!=null&&l.borderBoxSize){const c=l.borderBoxSize[0];if(c){r({width:c.inlineSize,height:c.blockSize});return}}r(OC(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},LC={passive:!0},$C=typeof window>"u"?!0:"onscrollend"in window,mne=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=e.targetWindow;if(!a)return;let r=0;const i=e.options.useScrollendEvent&&$C?()=>{}:une(a,()=>{t(r,!1)},e.options.isScrollingResetDelay),o=u=>()=>{const{horizontal:d,isRtl:f}=e.options;r=d?n.scrollLeft*(f&&-1||1):n.scrollTop,i(),t(r,u)},s=o(!0),l=o(!1);l(),n.addEventListener("scroll",s,LC);const c=e.options.useScrollendEvent&&$C;return c&&n.addEventListener("scrollend",l,LC),()=>{n.removeEventListener("scroll",s),c&&n.removeEventListener("scrollend",l)}},gne=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const a=t.borderBoxSize[0];if(a)return Math.round(a[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},hne=(e,{adjustments:t=0,behavior:n},a)=>{var r,i;const o=e+t;(i=(r=a.scrollElement)==null?void 0:r.scrollTo)==null||i.call(r,{[a.options.horizontal?"left":"top"]:o,behavior:n})};class vne{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const a=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(r=>{r.forEach(i=>{const o=()=>{this._measureElement(i.target,i)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var r;(r=a())==null||r.disconnect(),n=null},observe:r=>{var i;return(i=a())==null?void 0:i.observe(r,{box:"border-box"})},unobserve:r=>{var i;return(i=a())==null?void 0:i.unobserve(r)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([a,r])=>{typeof r>"u"&&delete n[a]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:dne,rangeExtractor:pne,onChange:()=>{},measureElement:gne,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var a,r;(r=(a=this.options).onChange)==null||r.call(a,this,n)},this.maybeNotify=Za(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const a=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==a){if(this.cleanup(),!a){this.maybeNotify();return}this.scrollElement=a,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(r=>{this.observer.observe(r)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(r,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<r?"forward":"backward":null,this.scrollOffset=r,this.isScrolling=i,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,a)=>{const r=new Map,i=new Map;for(let o=a-1;o>=0;o--){const s=n[o];if(r.has(s.lane))continue;const l=i.get(s.lane);if(l==null||s.end>l.end?i.set(s.lane,s):s.end<l.end&&r.set(s.lane,!0),r.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((o,s)=>o.end===s.end?o.index-s.index:o.end-s.end)[0]:void 0},this.getMeasurementOptions=Za(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,a,r,i,o)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:a,scrollMargin:r,getItemKey:i,enabled:o}),{key:!1}),this.getMeasurements=Za(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:a,scrollMargin:r,getItemKey:i,enabled:o},s)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(u=>{this.itemSizeCache.set(u.key,u.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,l);for(let u=l;u<n;u++){const d=i(u),f=this.options.lanes===1?c[u-1]:this.getFurthestMeasurement(c,u),g=f?f.end+this.options.gap:a+r,b=s.get(d),y=typeof b=="number"?b:this.options.estimateSize(u),I=g+y,v=f?f.lane:u%this.options.lanes;c[u]={index:u,start:g,size:y,end:I,key:d,lane:v}}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Za(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,a,r,i)=>this.range=n.length>0&&a>0?bne({measurements:n,outerSize:a,scrollOffset:r,lanes:i}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Za(()=>{let n=null,a=null;const r=this.calculateRange();return r&&(n=r.startIndex,a=r.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,a]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,a]},(n,a,r,i,o)=>i===null||o===null?[]:n({startIndex:i,endIndex:o,overscan:a,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const a=this.options.indexAttribute,r=n.getAttribute(a);return r?parseInt(r,10):(console.warn(`Missing attribute name '${a}={index}' on measured element.`),-1)},this._measureElement=(n,a)=>{const r=this.indexFromElement(n),i=this.measurementsCache[r];if(!i)return;const o=i.key,s=this.elementsCache.get(o);s!==n&&(s&&this.observer.unobserve(s),this.observer.observe(n),this.elementsCache.set(o,n)),n.isConnected&&this.resizeItem(r,this.options.measureElement(n,a,this))},this.resizeItem=(n,a)=>{const r=this.measurementsCache[n];if(!r)return;const i=this.itemSizeCache.get(r.key)??r.size,o=a-i;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,o,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,a)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((a,r)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(r))});return}this._measureElement(n,void 0)},this.getVirtualItems=Za(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,a)=>{const r=[];for(let i=0,o=n.length;i<o;i++){const s=n[i],l=a[s];r.push(l)}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const a=this.getMeasurements();if(a.length!==0)return NC(a[AU(0,a.length-1,r=>NC(a[r]).start,n)])},this.getOffsetForAlignment=(n,a,r=0)=>{const i=this.getSize(),o=this.getScrollOffset();a==="auto"&&(a=n>=o+i?"end":"start"),a==="center"?n+=(r-i)/2:a==="end"&&(n-=i);const s=this.getTotalSize()-i;return Math.max(Math.min(s,n),0)},this.getOffsetForIndex=(n,a="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const r=this.measurementsCache[n];if(!r)return;const i=this.getSize(),o=this.getScrollOffset();if(a==="auto")if(r.end>=o+i-this.options.scrollPaddingEnd)a="end";else if(r.start<=o+this.options.scrollPaddingStart)a="start";else return[o,a];const s=a==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,a,r.size),a]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:a="start",behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,a),{adjustments:void 0,behavior:r})},this.scrollToIndex=(n,{align:a="auto",behavior:r}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(n,a);if(!i)return;const[o,s]=i;this._scrollToOffset(o,{adjustments:void 0,behavior:r}),r!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const c=this.getOffsetForIndex(n,s);if(!c)return;const[u]=c,d=this.getScrollOffset();cne(u,d)||this.scrollToIndex(n,{align:s,behavior:r})}else this.scrollToIndex(n,{align:s,behavior:r})}))},this.scrollBy=(n,{behavior:a}={})=>{this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:a})},this.getTotalSize=()=>{var n;const a=this.getMeasurements();let r;if(a.length===0)r=this.options.paddingStart;else if(this.options.lanes===1)r=((n=a[a.length-1])==null?void 0:n.end)??0;else{const i=Array(this.options.lanes).fill(null);let o=a.length-1;for(;o>=0&&i.some(s=>s===null);){const s=a[o];i[s.lane]===null&&(i[s.lane]=s.end),o--}r=Math.max(...i.filter(s=>s!==null))}return Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:a,behavior:r})=>{this.options.scrollToFn(n,{behavior:r,adjustments:a},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const AU=(e,t,n,a)=>{for(;e<=t;){const r=(e+t)/2|0,i=n(r);if(i<a)e=r+1;else if(i>a)t=r-1;else return r}return e>0?e-1:0};function bne({measurements:e,outerSize:t,scrollOffset:n,lanes:a}){const r=e.length-1,i=l=>e[l].start;if(e.length<=a)return{startIndex:0,endIndex:r};let o=AU(0,r,i,n),s=o;if(a===1)for(;s<r&&e[s].end<n+t;)s++;else if(a>1){const l=Array(a).fill(0);for(;s<r&&l.some(u=>u<n+t);){const u=e[s];l[u.lane]=u.end,s++}const c=Array(a).fill(n+t);for(;o>=0&&c.some(u=>u>=n);){const u=e[o];c[u.lane]=u.start,o--}o=Math.max(0,o-o%a),s=Math.min(r,s+(a-1-s%a))}return{startIndex:o,endIndex:s}}const DC=typeof document<"u"?J.useLayoutEffect:J.useEffect;function yne(e){const t=J.useReducer(()=>({}),{})[1],n={...e,onChange:(r,i)=>{var o;i?lS.flushSync(t):t(),(o=e.onChange)==null||o.call(e,r,i)}},[a]=J.useState(()=>new vne(n));return a.setOptions(n),DC(()=>a._didMount(),[]),DC(()=>a._willUpdate()),a}function Sne(e){return yne({observeElementRect:fne,observeElementOffset:mne,scrollToFn:hne,...e})}const Xv=e=>e===void 0?"":typeof e=="string"?e:e.id||"",Jv=e=>typeof e=="string"?e:e===void 0?"":e.text||"",Ene={items:[]},vc=fn({defaultConfig:{...Ene,id:"",getId:Xv,getTextValue:Jv,nonInteractiveIds:[],orientation:"vertical",defaultItemHeight:50,shouldVirtualize:!0}})(e=>{var v;const t=Ll(e.id),n=$.useRef(Xv),a=$.useRef(Jv);n.current=e.getId||Xv,a.current=e.getTextValue||e.getId||Jv;const[r]=$.useState(e.orientation||"vertical"),[i,o]=$.useState(e.defaultItemHeight),s=e.shouldVirtualize&&!!((v=e.items)!=null&&v.length),l=$.useRef(0),c=$.useRef(null),u=$.useMemo(()=>(e.items||[]).map((m,h)=>({id:n.current(m),index:h,value:m,textValue:a.current(m)})),[e.items]),[d,f]=$.useState([]),g=Sne({count:u.length,getScrollElement:()=>c.current,estimateSize:$.useCallback(()=>i,[i]),horizontal:e.orientation==="horizontal",overscan:3});return{state:{...{items:u.length?u:d},UNSTABLE_virtual:g,UNSTABLE_defaultItemHeight:i,containerRef:c,id:t,orientation:r,indexRef:l,nonInteractiveIds:e.nonInteractiveIds||[],isVirtualized:s},events:{registerItem(m){l.current++,f(h=>h.concat({...m,value:m,index:h.length}))},unregisterItem(m){f(h=>h.find(S=>S.id===m.id)?h.filter(S=>S.id!==m.id):h)},updateItemHeight(m){o(m.value)}},getId:e.getId,getTextValue:e.getTextValue}}),_ne=e=>e,up=()=>0,dp=(e,{state:t})=>t.items.length-1,wne=(e,{state:t})=>{if(t.columnCount){const n=e%t.columnCount;return e-n}return up()},kne=(e,{state:t})=>{if(t.columnCount){const n=e%t.columnCount-t.columnCount+1;let a=e-n;return a>=t.items.length&&(a=t.items.length-1),a}return dp(e,{state:t})},Ine=(e,{state:t})=>t.columnCount?e%t.columnCount:up(),xne=(e,{state:t})=>t.columnCount?t.items.length-t.columnCount+e%t.columnCount:dp(e,{state:t}),Tne=(e,{state:t})=>t.items.find(n=>n.id===e),yr=e=>typeof e.cursorId=="string"?e.cursorId:e.cursorId.slice(-1)[0]||"",Tu=(e,t)=>e.cursorId&&typeof e.cursorId=="string"?e.cursorId===t:e.cursorId.includes(t),$o=e=>(t,{state:n},a=n.items.length)=>{if(Number.isNaN(t)){if(e===1)return up();if(e===-1)return dp(t,{state:n})}const r=n.items;let i=t+e;const s=Math.ceil(r.length/n.columnCount)*n.columnCount;return i<0?e===-1?i=r.length-1:(s+i>=r.length&&(i-=n.columnCount),i=s+i):i>=r.length&&(e===1?i=0:(i-s<0&&(i+=n.columnCount),i=i-s)),r.length>1&&n.nonInteractiveIds.includes(r[i].id)&&a>0?$o(e)(i,{state:n},a-1):i},Rne=_ne({getFirst:up,getLast:dp,getItem:Tne,getNext:$o(1),getNextRow:(e,{state:t})=>$o(t.columnCount)(e,{state:t}),getPrevious:$o(-1),getPreviousRow:(e,{state:t})=>$o(-t.columnCount)(e,{state:t}),getPreviousPage:Ine,getNextPage:xne,getFirstOfRow:wne,getLastOfRow:kne}),bc=fn({defaultConfig:{...vc.defaultConfig,initialCursorId:"",columnCount:0,navigation:Rne,pageSize:0},requiredConfig:vc.requiredConfig,contextOverride:vc.Context})(e=>{var d;const[t,n]=$.useState(e.initialCursorId),a=$.useRef(e.pageSize),r=e.columnCount||0,i=vc(e),o=e.navigation,s=$.useRef(-1),l=f=>{var b;const g=((b=c.items[f])==null?void 0:b.id)||"";n(g)};t&&((d=i.state.items[s.current])==null?void 0:d.id)!==t?s.current=i.state.items.findIndex(f=>f.id===t):t||(s.current=-1);const c={...i.state,cursorId:t,columnCount:r,pageSizeRef:a,cursorIndexRef:s},u={...i.events,goTo(f){const g=c.items.findIndex(b=>b.id===f.id);l(g)},goToNext(){const f=o.getNext(s.current,{state:c});l(f)},goToPrevious(){const f=o.getPrevious(s.current,{state:c});l(f)},goToPreviousRow(){const f=o.getPreviousRow(s.current,{state:c});l(f)},goToNextRow(){const f=o.getNextRow(s.current,{state:c});l(f)},goToFirst(){const f=o.getFirst(s.current,{state:c});l(f)},goToLast(){const f=o.getLast(s.current,{state:c});l(f)},goToFirstOfRow(){const f=o.getFirstOfRow(s.current,{state:c});l(f)},goToLastOfRow(){const f=o.getLastOfRow(s.current,{state:c});l(f)},goToNextPage(){const f=o.getNextPage(s.current,{state:c});l(f)},goToPreviousPage(){const f=o.getPreviousPage(s.current,{state:c});l(f)}};return{...i,state:c,events:u,navigation:o}}),Ane=(e,{selectedIds:t,unselectedIds:n})=>t==="all"?!n.includes(e):t.includes(e),CU={select(e){return{selectedIds:[e],unselectedIds:[]}}},Cne={select(e,{selectedIds:t,unselectedIds:n}){return t==="all"?{selectedIds:"all",unselectedIds:n.includes(e)?n.filter(r=>r!==e):n.concat(e)}:{selectedIds:t.includes(e)?t.filter(r=>r!==e):t.concat(e),unselectedIds:[]}}},Qv=fn({defaultConfig:{...bc.defaultConfig,initialSelectedIds:[],initialUnselectedIds:[],selection:CU},requiredConfig:bc.requiredConfig,contextOverride:bc.Context})(e=>{const t=bc(e),[n,a]=$.useState(e.initialSelectedIds),[r,i]=$.useState(e.initialUnselectedIds),o=e.selection,s={...t.state,selectedIds:n,unselectedIds:r},l={...t.events,select(c){const{selectedIds:u,unselectedIds:d}=o.select(c.id,s);a(u),i(d)},selectAll(){a("all")},unselectAll(){a([])},setSelectedIds(c){a(c)},remove(c){}};return{...t,state:s,events:l,selection:o}}),ui=fn({defaultConfig:{UNSTABLE_parentModel:void 0,...Qv.defaultConfig},requiredConfig:Qv.requiredConfig})(e=>({UNSTABLE_parentModel:e.UNSTABLE_parentModel,...Qv(e)})),Mc=$.createContext({});function Nne(e,t){return typeof t=="function"?e.state.isVirtualized?e.state.UNSTABLE_virtual.getVirtualItems().map(a=>{const r=e.state.items[a.index],i=t(r.value,a.index);return p.jsx(Mc.Provider,{value:{item:r,virtual:a},children:i},r.id||r.index)}):e.state.items.map(a=>{const r=t(a.value,a.index);return p.jsx(Mc.Provider,{value:{item:a},children:r},a.id||a.index)}):p.jsx(Mc.Provider,{value:{},children:t})}const pp=le()((e,t,n={})=>{const{state:a,events:r}=e,{item:i,virtual:o}=$.useContext(Mc),[s,l]=$.useState(n["data-id"]||(i==null?void 0:i.id)||""),{localRef:c,elementRef:u}=La(la(t,o?e.state.UNSTABLE_virtual.measureElement:null)),d=o?{position:"absolute",top:0,left:0,transform:`translateY(${o.start}px)`}:{};return Aee(()=>{var y;if((o==null?void 0:o.index)===0&&((y=c.current)!=null&&y.clientHeight),i)return;const f=a.indexRef.current,g=s||(n["data-has-children"]?`${a.id}-`:"")+String(f);if(a.items.find(I=>I.id===g))return;const b={id:g,textValue:n["data-text"]?n["data-text"]:typeof n.children=="string"?n.children:""};return r.registerItem(b),l(g),()=>{r.unregisterItem({id:g})}}),{ref:u,"data-id":s,disabled:n.disabled||a.nonInteractiveIds.includes(s)?!0:void 0,"aria-setsize":o?a.UNSTABLE_virtual.options.count:void 0,"aria-posinset":o?i.index+1:void 0,"data-index":o?i.index:void 0,style:d,id:Lw(`${a.id}-${s}`)}}),dy={horizontal:{ArrowLeft:"goToPrevious",Left:"goToPrevious",ArrowRight:"goToNext",Right:"goToNext",Home:"goToFirst",End:"goToLast",PageDown:"goToNextPage",PageUp:"goToPreviousPage"},vertical:{ArrowUp:"goToPrevious",Up:"goToPrevious",ArrowDown:"goToNext",Down:"goToNext",Home:"goToFirst",End:"goToLast",PageDown:"goToNextPage",PageUp:"goToPreviousPage"}},One={ArrowLeft:"ArrowRight",Left:"Right",ArrowRight:"ArrowLeft",Right:"Left",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",Home:"Home",End:"End",PageDown:"PageDown",PageUp:"PageUp"},FC={...dy.horizontal,Home:"goToFirstOfRow",End:"goToLastOfRow",ArrowUp:"goToPreviousRow",Up:"goToPreviousRow",ArrowDown:"goToNextRow",Down:"goToNextRow"},eb={Home:"goToFirst",End:"goToLast"},PC=(e,t)=>e.hasOwnProperty(t);function NU(e,t){var r,i,o,s;if(e.ctrlKey){for(const l in eb)if(PC(eb,l)&&e.key===l)return(i=(r=t.events)[eb[l]])==null||i.call(r),!0}const n=t.state.columnCount>0?FC:dy[t.state.orientation],a=XM(e.currentTarget);for(const l in n)if(PC(n,l)&&(a?e.key===One[l]:e.key===l)){const c=t.state.columnCount>0?FC[l]:dy[t.state.orientation][l];if(t.events[c])return(s=(o=t.events)[c])==null||s.call(o),!0}return!1}const OU=(e,t,n)=>{e()===!1&&t>1&&requestAnimationFrame(()=>OU(e,t-1)),n==null||n("Retry timeout")},Lne=(e,t,n)=>new Promise((a,r)=>{var s;const i=(((s=n==null?void 0:n.dataset)==null?void 0:s.focusId)||"").split("-")[0]||e.state.id,o=e.navigation.getItem(t,e);if(o){e.state.isVirtualized&&e.state.UNSTABLE_virtual.scrollToIndex(o.index);const l=c=>document.querySelector(`[data-focus-id="${YM(`${c}-${o.id}`)}"]`);OU(()=>{const c=l(i)||l(e.state.id);return c&&(c.focus(),a(c)),!!c},5,r)}}),LU=le()((e,t,n={})=>{const a=$.useRef(e.state);a.current=e.state;const r=$.useRef(null);return $.useEffect(()=>{r.current&&Lne(e,yr(e.state),r.current).then(()=>{r.current=null})},[e.state.cursorId]),$.useEffect(()=>{!e.state.cursorId&&e.state.items.length&&e.events.goTo({id:e.state.items[0].id})},[e.state.cursorId,e.state.items,e.events]),{onKeyDown(i){NU(i,e)&&(i.preventDefault(),r.current=i.currentTarget)},onClick(){e.events.goTo({id:n["data-id"]})},"data-focus-id":Lw(`${e.state.id}-${n["data-id"]}`),tabIndex:e.state.cursorId?n["data-id"]&&Tu(e.state,n["data-id"])?0:-1:0}}),$ne=le()(({state:e,events:t},n,a={})=>{const r=a["data-id"]||"";return{onClick:o=>{!e.nonInteractiveIds.includes(r)&&o.currentTarget.getAttribute("aria-disabled")!=="true"&&t.select({id:r})}}}),Dne=le()(e=>({"aria-activedescendant":e.state.cursorId?Lw(`${e.state.id}-${typeof e.state.cursorId=="string"?e.state.cursorId:e.state.cursorId.join("-")}`):void 0})),Fne=le()((e,t,n={})=>{const a=n["data-id"]||"";return{className:Tu(e.state,a)?"focus":""}}),Pne=Ne("li")({displayName:"Item",modelHook:ui,elemPropsHook:pp})((e,t)=>p.jsx(t,{...Ue(e)})),Mne=le()(e=>({style:{position:"relative",height:e.state.isVirtualized?e.state.UNSTABLE_virtual.getTotalSize():void 0}})),MC=he({parts:{listBoxContainer:"list-box-container"},base:{'& :where([data-part="list"])':{display:"flex",flexDirection:"column",marginBlock:0}},modifiers:{orientation:{vertical:{overflowY:"auto"},horizontal:{overflowY:void 0,'& :where([data-part="list"])':{flexDirection:"row"}}}}}),$U=sa("ul")({displayName:"ListBox",modelHook:ui,elemPropsHook:Mne,subComponents:{Item:Pne}})(({height:e,maxHeight:t,marginY:n,marginBottom:a,overflowY:r,marginTop:i,...o},s,l)=>p.jsx("div",{ref:l.state.containerRef,...MC.parts.listBoxContainer,...jt({style:{height:e,maxHeight:t,marginBottom:a??n,marginTop:i??n}},MC({orientation:l.state.orientation})),children:p.jsx(s,{...Ue(o),"data-part":"list",children:Nne(l,o.children)})})),Lr=he({base:{},modifiers:{typeLevel:{"title.large":{fontFamily:ut.default,fontWeight:Xe.bold,fontSize:_.fontSize.title.lg,lineHeight:_.lineHeight.title.lg,color:L.fg.strong},"title.medium":{fontFamily:ut.default,fontWeight:Xe.bold,fontSize:_.fontSize.title.md,lineHeight:_.lineHeight.title.md,color:L.fg.strong},"title.small":{fontFamily:ut.default,fontWeight:Xe.bold,lineHeight:_.lineHeight.title.sm,fontSize:_.fontSize.title.sm,color:L.fg.strong},"heading.large":{fontFamily:ut.default,fontWeight:Xe.bold,fontSize:_.fontSize.heading.lg,lineHeight:_.lineHeight.heading.lg,color:L.fg.strong},"heading.medium":{fontFamily:ut.default,fontWeight:Xe.bold,fontSize:_.fontSize.heading.md,lineHeight:_.lineHeight.heading.md,color:L.fg.strong},"heading.small":{fontFamily:ut.default,fontWeight:Xe.bold,fontSize:_.fontSize.heading.sm,lineHeight:_.lineHeight.heading.sm,color:L.fg.strong},"body.large":{fontFamily:ut.default,fontWeight:Xe.normal,fontSize:_.fontSize.body.lg,lineHeight:_.lineHeight.body.lg,color:L.fg.default},"body.medium":{fontFamily:ut.default,fontWeight:Xe.normal,fontSize:_.fontSize.body.md,lineHeight:_.lineHeight.body.md,color:L.fg.default},"body.small":{fontFamily:ut.default,fontWeight:Xe.normal,fontSize:_.fontSize.body.sm,lineHeight:_.lineHeight.body.sm,letterSpacing:_.letterSpacing.body.sm,color:L.fg.default},"subtext.large":{fontFamily:ut.default,fontWeight:Xe.normal,fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,color:L.fg.default},"subtext.medium":{fontFamily:ut.default,fontWeight:Xe.normal,fontSize:_.fontSize.subtext.md,lineHeight:_.lineHeight.subtext.md,letterSpacing:_.letterSpacing.subtext.md,color:L.fg.default},"subtext.small":{fontFamily:ut.default,fontWeight:Xe.normal,fontSize:_.fontSize.subtext.sm,lineHeight:_.lineHeight.subtext.sm,letterSpacing:_.letterSpacing.subtext.sm,color:L.fg.default}},variant:{error:{color:_.color.brand.fg.critical.default},hint:{color:L.fg.muted.default},inverse:{color:L.fg.inverse}}}});$e("span")({displayName:"Text",Component:({children:e,typeLevel:t,variant:n,...a},r,i)=>p.jsx(i,{ref:r,...Ue(a,Lr({typeLevel:t,variant:n})),children:e})});const Une=he({extends:Lr,base:{}});$e("p")({displayName:"Subtext",Component:({size:e,variant:t,...n},a,r)=>{const i=`subtext.${e}`;return p.jsx(r,{ref:a,...Ue(n,Une({typeLevel:i,variant:t}))})}});const zne=he({extends:Lr,base:{}}),jne=$e("p")({displayName:"BodyText",Component:({size:e,variant:t,...n},a,r)=>{const i=`body.${e}`;return p.jsx(r,{ref:a,...Ue(n,zne({typeLevel:i,variant:t}))})}}),Bne=he({extends:Lr,base:{}});$e("h2")({displayName:"Heading",Component:({size:e,variant:t,...n},a,r)=>{const i=`heading.${e}`;return p.jsx(r,{ref:a,...Ue(n,Bne({typeLevel:i,variant:t}))})}});const qne=he({extends:Lr,base:{}});$e("h1")({displayName:"Title",Component:({size:e,variant:t,...n},a,r)=>{const i=`title.${e}`;return p.jsx(r,{ref:a,...Ue(n,qne({typeLevel:i,variant:t}))})}});const Gne=he({extends:Lr,base:{},defaultModifiers:{typeLevel:"subtext.large"}}),Hne=$e("div")({displayName:"Card.Body",Component:({children:e,...t},n,a)=>p.jsx(a,{ref:n,...Ue(t,Gne()),children:e})}),Vne=he({extends:Lr,base:{color:L.fg.strong,fontWeight:Xe.bold,marginBlock:_.padding.none},defaultModifiers:{typeLevel:"body.large"}}),Wne=$e("h3")({displayName:"Card.Heading",Component:({children:e,...t},n,a)=>p.jsx(a,{ref:n,...Ue(t,Vne()),children:e})}),Zne=he({base:{display:"flex",flexDirection:"column",gap:_.gap.lg,padding:_.padding.xl,backgroundColor:_.color.surface.default,borderRadius:_.shape.xxl,border:`${fe(1)} solid ${_.color.border.default}`},modifiers:{variant:{borderless:{borderColor:"transparent"},tonal:{backgroundColor:_.color.surface.alt.default,borderColor:L.border.transparent}}}}),Yne=$e("div")({displayName:"Card",Component:({children:e,variant:t,...n},a,r)=>p.jsx(r,{ref:a,...Ue(n,Zne({variant:t})),children:e}),subComponents:{Heading:Wne,Body:Hne}});function Kne(e){return e.length?e[e.length-1]:null}function DU(e,t){const{min:n,max:a}=Pw.zIndex;return t<=a-n?e+n:Math.max(n,a-(t-e)+1)}function tb(e){const t=e.length;e.forEach((n,a)=>{n.style.zIndex=String(DU(a,t))})}function Xne(e,t){let n=e;do{const a=t.find(r=>r.element===n);if(a)return a.element}while(n=n.parentElement)}function Jne(e,t){return t.filter(a=>a.owner).map(a=>({element:a.element,parent:Xne(a.owner,t)})).filter(a=>a.parent===e.element)}function FU(e,t){const n=t.split("."),a=n.splice(0,1)[0];return n.length&&e[a]?FU(e[a],n.join(".")):e[a]}function PU(e,t,n){const a=t.split("."),r=a.splice(0,1)[0];return a.length?(e[r]===void 0&&(e[r]={}),PU(e[r],a.join("."),n)):e[r]=n,n}typeof window<"u"&&(window.workday=window.workday||{});const MU=e=>{if(typeof window<"u")return FU(window,e)},UU=(e,t)=>{typeof window<"u"&&PU(window,e,t)},UC=(e,t)=>{var a;let n=(a=e.container)==null?void 0:a.call(e);return n===document.body&&(n=t==null?void 0:t.ownerDocument.body),n||document.body},Pw=MU("workday.__popupStack")||{description:"Global popup stack from @workday/canvas-kit/popup-stack",container:e=>(e==null?void 0:e.ownerDocument.body)||document.body,items:[],zIndex:{min:30,max:50,getValue:DU},_adapter:{}};UU("workday.__popupStack",Pw);const fr=MU("workday.__popupStackOfStacks")||[Pw];fr.description="Global stack of popup stacks from @workday/canvas-kit/popup-stack";UU("workday.__popupStackOfStacks",fr);function cr(){return fr[fr.length-1]}const Rt={createContainer(){var n;const e=cr();if((n=e._adapter)!=null&&n.createContainer)return e._adapter.createContainer();const t=document.createElement("div");return t.style.position="relative",t},add(e){var n;const t=cr();if((n=t._adapter)!=null&&n.add){t._adapter.add(e);return}t.items.push(e),UC(t,e.owner).appendChild(e.element),tb(Rt.getElements())},remove(e){var n;const t=fr.find(a=>!!Rt.getElements(a).find(r=>r===e));if(t){if((n=t._adapter)!=null&&n.remove){t._adapter.remove(e);return}const a=t.items.find(r=>r.element===e);t.items=t.items.filter(r=>r.element!==e),UC(t,a==null?void 0:a.owner).removeChild(e),tb(Rt.getElements(t))}},isTopmost(e){var a;const t=cr();if((a=t._adapter)!=null&&a.isTopmost)return t._adapter.isTopmost(e);const n=Kne(t.items);return n?n.element===e:!1},getElements(e){var n;const t=e||cr();return(n=t._adapter)!=null&&n.getElements?t._adapter.getElements():t.items.map(a=>a.element)},bringToTop(e){var a;const t=cr();if((a=t._adapter)!=null&&a.bringToTop){t._adapter.bringToTop(e);return}const n=t.items.find(r=>r.element===e);if(n)t.items=[...t.items.filter(r=>r!==n),n],Jne(n,t.items).forEach(r=>{Rt.bringToTop(r.element)}),tb(Rt.getElements());else{const r=new Error;console.warn("Could not find item",r.stack)}},contains(e,t){var i;const n=cr();if((i=n._adapter)!=null&&i.contains)return n._adapter.contains(e,t);const a=n.items.find(o=>o.element===e);if(a)return r(a,t);return!1;function r(o,s,l=0){var u;if(l>30)return!1;if(o.element===s||o.owner===s||o.element.contains(s)||(u=o.owner)!=null&&u.contains(s))return!0;const c=n.items.find(d=>d.owner&&o.element.contains(d.owner));return c?r(c,s,l+1):!1}},pushStackContext(e){var a,r;const t=cr();if((a=t._adapter)!=null&&a.pushStackContext)return t._adapter.pushStackContext(e);if(((r=t.container)==null?void 0:r.call(t))===e)return;const n={items:[],zIndex:t.zIndex,container:()=>e,_adapter:{}};fr.push(n)},popStackContext(e){var n,a;const t=cr();if((n=t._adapter)!=null&&n.popStackContext)return t._adapter.popStackContext(e);((a=t.container)==null?void 0:a.call(t))===e&&fr.length>1&&fr.pop()},transferToCurrentContext(e){var a;const t=cr();if((a=t._adapter)!=null&&a.transferToCurrentContext)return t._adapter.transferToCurrentContext(e);if(t.items.find(r=>r.element===e.element))return;fr.find(r=>!!r.items.find(i=>i.element===e.element))&&Rt.remove(e.element),Rt.add(e)}};let yc=null;pr.isEnabled&&pr.on("change",()=>{pr.isFullscreen?pr.element&&(yc=pr.element,Rt.pushStackContext(yc)):yc&&Rt.popStackContext(yc)});const nb=fn({defaultConfig:{id:"",initialVisibility:"hidden"}})(e=>{const t=Ll(e.id),[n,a]=$.useState(e.initialVisibility||"hidden");return{state:{id:t,visibility:n},events:{show(o){a("visible")},hide(o){a("hidden")}}}}),zC=()=>{},ha=fn({defaultContext:{state:{},events:{show:zC,hide:zC}},defaultConfig:{...nb.defaultConfig,returnFocusRef:void 0,initialFocusRef:void 0},requiredConfig:nb.requiredConfig})(e=>{const t=J.useRef(null),n=J.useRef(null),[a,r]=J.useState("bottom"),i=nb(e),o={...i.state,stackRef:t,targetRef:n,initialFocusRef:e.initialFocusRef,returnFocusRef:e.returnFocusRef,placement:a},s={...i.events,updatePlacement(l){r(l.placement)}};return{state:o,events:s}});ha.Context;const zU=le()(e=>{const t=$.useCallback(a=>{e.state.stackRef.current&&document.contains(a.target)&&!Rt.contains(e.state.stackRef.current,a.target)&&e.events.hide(a)},[e.events,e.state.stackRef]),n=e.state.visibility!=="hidden";return $.useLayoutEffect(()=>{var a;if(n)return document.addEventListener("mousedown",t),(a=e.state.stackRef.current)==null||a.setAttribute("data-behavior-click-outside-close","always"),()=>{document.removeEventListener("mousedown",t)}},[e.state.stackRef,n,t]),{}}),jU=le()(e=>{const t=$.useCallback(a=>{(a.key==="Esc"||a.key==="Escape")&&Rt.isTopmost(e.state.stackRef.current)&&e.events.hide(a)},[e.state.stackRef,e.events]),n=e.state.visibility!=="hidden";return $.useLayoutEffect(()=>{if(n)return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[t,n]),{}}),Qne=le()(e=>{const t=$.useCallback(a=>{pr.isFullscreen||e.events.hide(a)},[e.events]),n=e.state.visibility!=="hidden";return $.useEffect(()=>{if(n&&pr.isEnabled)return pr.on("change",t),()=>{pr.off("change",t)}},[t,n]),{}});function BU(e){if(e===document.body||!e.parentElement)return e;const t=getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"||t.overflowX==="scroll"||t.overflowX==="auto"?e:BU(e.parentElement)}const ere=le()(e=>{const t=e.state.visibility!=="hidden",n=$.useCallback(a=>{a[0].intersectionRatio<.5&&e.events.hide()},[e.events]);return $.useLayoutEffect(()=>{if(!t||!e.state.targetRef.current)return;const a=e.state.targetRef.current,r=BU(a),i=new IntersectionObserver(n,{root:r,threshold:.5});return i.observe(e.state.targetRef.current),()=>{i.disconnect()}},[n,e.state.targetRef,t]),{}}),tre=le()(e=>{const t=$.useCallback(a=>{if(e.state.stackRef.current&&a.key==="Tab"){const r=Mee(e.state.stackRef.current),i=Uee(e.state.stackRef.current);a.getModifierState("Shift")&&document.activeElement===r?(a.preventDefault(),e.events.hide(a)):!a.getModifierState("Shift")&&(Array.isArray(i)&&document.activeElement&&i.includes(document.activeElement)||document.activeElement===i)&&e.events.hide(a)}},[e.events,e.state.stackRef]),n=e.state.visibility!=="hidden";return $.useLayoutEffect(()=>{if(n)return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[n,t]),{}}),qU=le()(({state:e,events:t},n)=>{const a=la(n,e.stackRef),r=$.useRef(e.placement);r.current=e.placement;const i=$.useCallback(o=>{o!==r.current&&t.updatePlacement({placement:o})},[t]);return{open:e.visibility!=="hidden",anchorElement:e.targetRef,ref:a,onPlacementChange:i}}),nre=(e,t)=>{const{elementRef:n,localRef:a}=La(e),r=$.useContext(Rw),{style:i}=Zee(r,{}),o=$.useRef(!0),[s]=$.useState(()=>{if(o.current){const l=Rt.createContainer();return n(l),o.current=!1,l}return a.current});return $.useLayoutEffect(()=>{const l=a.current;if(!l)return;const c=Object.keys(i);if(c.length!==0)for(const u of c)l.style.setProperty(u,i[u])},[a,i]),$.useLayoutEffect(()=>{if(s!==a.current)throw Error("The 'ref' passed to usePopupStack should not be applied to a React element. This will cause a runtime error where the PopupStack and React compete for the element. Instead use ReactDOM.createPortal(<YourComponent />, ref.current)");const l=t?"current"in t?t.current||void 0:t:void 0,c=a.current;return Rt.add({element:c,owner:l}),()=>{Rt.remove(c)}},[a,t,s]),$.useLayoutEffect(()=>{var u,d;let c=(t?"current"in t?t.current:t:void 0)??void 0;if(c==null&&typeof document<"u"){const f=document.activeElement,g=a.current;c=(f&&g&&!g.contains(f)?f:document.body).closest("[dir]")??document.documentElement}if(c){const f=c.getAttribute("dir");(f!=null?f.toLowerCase()==="rtl":XM(c))?(u=a.current)==null||u.setAttribute("dir","rtl"):(d=a.current)==null||d.setAttribute("dir","ltr")}},[a,t]),a},GU=le()(({events:e,state:t},n)=>({ref:la(n,t.targetRef),onClick:r=>{t.targetRef.current instanceof Element||(t.targetRef.current=r.currentTarget),t.visibility!=="hidden"?e.hide(r):e.show(r)}})),rre=le()(({events:e,state:t},n)=>({ref:la(n,t.targetRef),onContextMenu:r=>{t.targetRef.current||(t.targetRef.current=r.currentTarget),t.visibility!=="hidden"?e.hide(r):e.show(r),r.preventDefault()}}));function HU(e){if(e===document.body||!e.parentElement)return e;const t=getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"?e:HU(e.parentElement)}function VU(e){return e===null||e===document.body||!e.parentElement?null:Pee(e)?e:VU(e.parentElement)}function jC(e,t){const n=e.getBoundingClientRect();return n.top+n.height/2<t.top||n.bottom-n.height/2>t.bottom||n.left+n.width/2<t.left||n.right-n.width/2>t.right}const are=le()(e=>{const t=e.state.visibility!=="hidden",n=$.useRef(null),a=$.useRef(!1),r=$.useCallback(o=>{o.key==="Tab"&&(a.current=!0)},[]),i=$.useCallback(o=>{e.state.stackRef.current&&o.target instanceof Element&&(Rt.contains(e.state.stackRef.current,o.target)||(n.current=o.target))},[e.state.stackRef]);return $.useLayoutEffect(()=>{if(!t)return;const o=(e.state.returnFocusRef||e.state.targetRef).current;return document.addEventListener("mousedown",i,!0),document.addEventListener("keydown",r,!0),()=>{if(document.removeEventListener("mousedown",i,!0),document.removeEventListener("keydown",r,!0),!o)return;const l=HU(o).getBoundingClientRect(),c={left:0,top:0,right:window.innerWidth,bottom:window.innerHeight};if(n.current&&VU(n.current)||jC(o,l)||jC(o,c)){n.current=null;return}document.activeElement!==document.body&&e.state.stackRef.current&&document.activeElement instanceof Element&&!Rt.contains(e.state.stackRef.current,document.activeElement)||a.current?_C(o):requestAnimationFrame(()=>{_C(o)}),n.current=null}},[e.state.returnFocusRef,e.state.targetRef,t,i,r,e.state.stackRef]),{}}),WU=e=>{const[t,n]=e.split("-");return{vertical:t==="top"?"bottom":t==="bottom"||n==="end"?"top":n==="start"?"bottom":"center",horizontal:t==="left"?"right":t==="right"||n==="end"?"left":n==="start"?"right":"center"}};var Tn="top",jn="bottom",Bn="right",Rn="left",Mw="auto",Fl=[Tn,jn,Bn,Rn],Bi="start",Uw="end",ire="clippingParents",ZU="viewport",xo="popper",ore="reference",BC=Fl.reduce(function(e,t){return e.concat([t+"-"+Bi,t+"-"+Uw])},[]),YU=[].concat(Fl,[Mw]).reduce(function(e,t){return e.concat([t,t+"-"+Bi,t+"-"+Uw])},[]),sre="beforeRead",lre="read",cre="afterRead",ure="beforeMain",dre="main",pre="afterMain",fre="beforeWrite",mre="write",gre="afterWrite",hre=[sre,lre,cre,ure,dre,pre,fre,mre,gre];function qn(e){return e?(e.nodeName||"").toLowerCase():null}function Gn(e){if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ys(e){var t=Gn(e).Element;return e instanceof t||e instanceof Element}function ar(e){var t=Gn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function vre(e){var t=Gn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function bre(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var a=t.styles[n]||{},r=t.attributes[n]||{},i=t.elements[n];!ar(i)||!qn(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(o){var s=r[o];s===!1?i.removeAttribute(o):i.setAttribute(o,s===!0?"":s)}))})}function yre(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(a){var r=t.elements[a],i=t.attributes[a]||{},o=Object.keys(t.styles.hasOwnProperty(a)?t.styles[a]:n[a]),s=o.reduce(function(l,c){return l[c]="",l},{});!ar(r)||!qn(r)||(Object.assign(r.style,s),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const Sre={name:"applyStyles",enabled:!0,phase:"write",fn:bre,effect:yre,requires:["computeStyles"]};function rr(e){return e.split("-")[0]}function zw(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function KU(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&vre(n)){var a=t;do{if(a&&e.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function _r(e){return Gn(e).getComputedStyle(e)}function Ere(e){return["table","td","th"].indexOf(qn(e))>=0}function $r(e){return((ys(e)?e.ownerDocument:e.document)||window.document).documentElement}function fp(e){return qn(e)==="html"?e:e.assignedSlot||e.parentNode||e.host||$r(e)}function qC(e){if(!ar(e)||_r(e).position==="fixed")return null;var t=e.offsetParent;if(t){var n=$r(t);if(qn(t)==="body"&&_r(t).position==="static"&&_r(n).position!=="static")return n}return t}function _re(e){for(var t=fp(e);ar(t)&&["html","body"].indexOf(qn(t))<0;){var n=_r(t);if(n.transform!=="none"||n.perspective!=="none"||n.willChange&&n.willChange!=="auto")return t;t=t.parentNode}return null}function Pl(e){for(var t=Gn(e),n=qC(e);n&&Ere(n)&&_r(n).position==="static";)n=qC(n);return n&&qn(n)==="body"&&_r(n).position==="static"?t:n||_re(e)||t}function jw(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Uc(e,t,n){return Math.max(e,Math.min(t,n))}function XU(){return{top:0,right:0,bottom:0,left:0}}function JU(e){return Object.assign(Object.assign({},XU()),e)}function QU(e,t){return t.reduce(function(n,a){return n[a]=e,n},{})}function wre(e){var t,n=e.state,a=e.name,r=n.elements.arrow,i=n.modifiersData.popperOffsets,o=rr(n.placement),s=jw(o),l=[Rn,Bn].indexOf(o)>=0,c=l?"height":"width";if(!(!r||!i)){var u=n.modifiersData[a+"#persistent"].padding,d=zw(r),f=s==="y"?Tn:Rn,g=s==="y"?jn:Bn,b=n.rects.reference[c]+n.rects.reference[s]-i[s]-n.rects.popper[c],y=i[s]-n.rects.reference[s],I=Pl(r),v=I?s==="y"?I.clientHeight||0:I.clientWidth||0:0,m=b/2-y/2,h=u[f],S=v-d[c]-u[g],w=v/2-d[c]/2+m,k=Uc(h,w,S),x=s;n.modifiersData[a]=(t={},t[x]=k,t.centerOffset=k-w,t)}}function kre(e){var t=e.state,n=e.options,a=e.name,r=n.element,i=r===void 0?"[data-popper-arrow]":r,o=n.padding,s=o===void 0?0:o;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||KU(t.elements.popper,i)&&(t.elements.arrow=i,t.modifiersData[a+"#persistent"]={padding:JU(typeof s!="number"?s:QU(s,Fl))}))}const Ire={name:"arrow",enabled:!0,phase:"main",fn:wre,effect:kre,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};var xre={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Tre(e){var t=e.x,n=e.y,a=window,r=a.devicePixelRatio||1;return{x:Math.round(t*r)/r||0,y:Math.round(n*r)/r||0}}function GC(e){var t,n=e.popper,a=e.popperRect,r=e.placement,i=e.offsets,o=e.position,s=e.gpuAcceleration,l=e.adaptive,c=Tre(i),u=c.x,d=c.y,f=i.hasOwnProperty("x"),g=i.hasOwnProperty("y"),b=Rn,y=Tn,I=window;if(l){var v=Pl(n);v===Gn(n)&&(v=$r(n)),r===Tn&&(y=jn,d-=v.clientHeight-a.height,d*=s?1:-1),r===Rn&&(b=Bn,u-=v.clientWidth-a.width,u*=s?1:-1)}var m=Object.assign({position:o},l&&xre);if(s){var h;return Object.assign(Object.assign({},m),{},(h={},h[y]=g?"0":"",h[b]=f?"0":"",h.transform=(I.devicePixelRatio||1)<2?"translate("+u+"px, "+d+"px)":"translate3d("+u+"px, "+d+"px, 0)",h))}return Object.assign(Object.assign({},m),{},(t={},t[y]=g?d+"px":"",t[b]=f?u+"px":"",t.transform="",t))}function Rre(e){var t=e.state,n=e.options,a=n.gpuAcceleration,r=a===void 0?!0:a,i=n.adaptive,o=i===void 0?!0:i,s={placement:rr(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign(Object.assign({},t.styles.popper),GC(Object.assign(Object.assign({},s),{},{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign(Object.assign({},t.styles.arrow),GC(Object.assign(Object.assign({},s),{},{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1})))),t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-placement":t.placement})}const Are={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Rre,data:{}};var Sc={passive:!0};function Cre(e){var t=e.state,n=e.instance,a=e.options,r=a.scroll,i=r===void 0?!0:r,o=a.resize,s=o===void 0?!0:o,l=Gn(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,Sc)}),s&&l.addEventListener("resize",n.update,Sc),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,Sc)}),s&&l.removeEventListener("resize",n.update,Sc)}}const Nre={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Cre,data:{}};var Ore={left:"right",right:"left",bottom:"top",top:"bottom"};function zc(e){return e.replace(/left|right|bottom|top/g,function(t){return Ore[t]})}var Lre={start:"end",end:"start"};function HC(e){return e.replace(/start|end/g,function(t){return Lre[t]})}function Ss(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function Bw(e){var t=Gn(e),n=t.pageXOffset,a=t.pageYOffset;return{scrollLeft:n,scrollTop:a}}function qw(e){return Ss($r(e)).left+Bw(e).scrollLeft}function $re(e){var t=Gn(e),n=$r(e),a=t.visualViewport,r=n.clientWidth,i=n.clientHeight,o=0,s=0;return a&&(r=a.width,i=a.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=a.offsetLeft,s=a.offsetTop)),{width:r,height:i,x:o+qw(e),y:s}}function Dre(e){var t=$r(e),n=Bw(e),a=e.ownerDocument.body,r=Math.max(t.scrollWidth,t.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),i=Math.max(t.scrollHeight,t.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),o=-n.scrollLeft+qw(e),s=-n.scrollTop;return _r(a||t).direction==="rtl"&&(o+=Math.max(t.clientWidth,a?a.clientWidth:0)-r),{width:r,height:i,x:o,y:s}}function Gw(e){var t=_r(e),n=t.overflow,a=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function ez(e){return["html","body","#document"].indexOf(qn(e))>=0?e.ownerDocument.body:ar(e)&&Gw(e)?e:ez(fp(e))}function Ho(e,t){t===void 0&&(t=[]);var n=ez(e),a=qn(n)==="body",r=Gn(n),i=a?[r].concat(r.visualViewport||[],Gw(n)?n:[]):n,o=t.concat(i);return a?o:o.concat(Ho(fp(i)))}function py(e){return Object.assign(Object.assign({},e),{},{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Fre(e){var t=Ss(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function VC(e,t){return t===ZU?py($re(e)):ar(t)?Fre(t):py(Dre($r(e)))}function Pre(e){var t=Ho(fp(e)),n=["absolute","fixed"].indexOf(_r(e).position)>=0,a=n&&ar(e)?Pl(e):e;return ys(a)?t.filter(function(r){return ys(r)&&KU(r,a)&&qn(r)!=="body"}):[]}function Mre(e,t,n){var a=t==="clippingParents"?Pre(e):[].concat(t),r=[].concat(a,[n]),i=r[0],o=r.reduce(function(s,l){var c=VC(e,l);return s.top=Math.max(c.top,s.top),s.right=Math.min(c.right,s.right),s.bottom=Math.min(c.bottom,s.bottom),s.left=Math.max(c.left,s.left),s},VC(e,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function Es(e){return e.split("-")[1]}function tz(e){var t=e.reference,n=e.element,a=e.placement,r=a?rr(a):null,i=a?Es(a):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(r){case Tn:l={x:o,y:t.y-n.height};break;case jn:l={x:o,y:t.y+t.height};break;case Bn:l={x:t.x+t.width,y:s};break;case Rn:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=r?jw(r):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case Bi:l[c]=Math.floor(l[c])-Math.floor(t[u]/2-n[u]/2);break;case Uw:l[c]=Math.floor(l[c])+Math.ceil(t[u]/2-n[u]/2);break}}return l}function qi(e,t){t===void 0&&(t={});var n=t,a=n.placement,r=a===void 0?e.placement:a,i=n.boundary,o=i===void 0?ire:i,s=n.rootBoundary,l=s===void 0?ZU:s,c=n.elementContext,u=c===void 0?xo:c,d=n.altBoundary,f=d===void 0?!1:d,g=n.padding,b=g===void 0?0:g,y=JU(typeof b!="number"?b:QU(b,Fl)),I=u===xo?ore:xo,v=e.elements.reference,m=e.rects.popper,h=e.elements[f?I:u],S=Mre(ys(h)?h:h.contextElement||$r(e.elements.popper),o,l),w=Ss(v),k=tz({reference:w,element:m,placement:r}),x=py(Object.assign(Object.assign({},m),k)),N=u===xo?x:w,O={top:S.top-N.top+y.top,bottom:N.bottom-S.bottom+y.bottom,left:S.left-N.left+y.left,right:N.right-S.right+y.right},U=e.modifiersData.offset;if(u===xo&&U){var Z=U[r];Object.keys(O).forEach(function(ae){var ie=[Bn,jn].indexOf(ae)>=0?1:-1,we=[Tn,jn].indexOf(ae)>=0?"y":"x";O[ae]+=Z[we]*ie})}return O}function Ure(e,t){t===void 0&&(t={});var n=t,a=n.placement,r=n.boundary,i=n.rootBoundary,o=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?YU:l,u=Es(a),d=u?s?BC:BC.filter(function(b){return Es(b)===u}):Fl,f=d.filter(function(b){return c.indexOf(b)>=0});f.length===0&&(f=d);var g=f.reduce(function(b,y){return b[y]=qi(e,{placement:y,boundary:r,rootBoundary:i,padding:o})[rr(y)],b},{});return Object.keys(g).sort(function(b,y){return g[b]-g[y]})}function zre(e){if(rr(e)===Mw)return[];var t=zc(e);return[HC(e),t,HC(t)]}function jre(e){var t=e.state,n=e.options,a=e.name;if(!t.modifiersData[a]._skip){for(var r=n.mainAxis,i=r===void 0?!0:r,o=n.altAxis,s=o===void 0?!0:o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,g=n.flipVariations,b=g===void 0?!0:g,y=n.allowedAutoPlacements,I=t.options.placement,v=rr(I),m=v===I,h=l||(m||!b?[zc(I)]:zre(I)),S=[I].concat(h).reduce(function(Se,Pe){return Se.concat(rr(Pe)===Mw?Ure(t,{placement:Pe,boundary:u,rootBoundary:d,padding:c,flipVariations:b,allowedAutoPlacements:y}):Pe)},[]),w=t.rects.reference,k=t.rects.popper,x=new Map,N=!0,O=S[0],U=0;U<S.length;U++){var Z=S[U],ae=rr(Z),ie=Es(Z)===Bi,we=[Tn,jn].indexOf(ae)>=0,Te=we?"width":"height",ye=qi(t,{placement:Z,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),Re=we?ie?Bn:Rn:ie?jn:Tn;w[Te]>k[Te]&&(Re=zc(Re));var P=zc(Re),G=[];if(i&&G.push(ye[ae]<=0),s&&G.push(ye[Re]<=0,ye[P]<=0),G.every(function(Se){return Se})){O=Z,N=!1;break}x.set(Z,G)}if(N)for(var H=b?3:1,Y=function(Pe){var ze=S.find(function(nt){var gn=x.get(nt);if(gn)return gn.slice(0,Pe).every(function(ja){return ja})});if(ze)return O=ze,"break"},Q=H;Q>0;Q--){var Ke=Y(Q);if(Ke==="break")break}t.placement!==O&&(t.modifiersData[a]._skip=!0,t.placement=O,t.reset=!0)}}const Bre={name:"flip",enabled:!0,phase:"main",fn:jre,requiresIfExists:["offset"],data:{_skip:!1}};function WC(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ZC(e){return[Tn,Bn,jn,Rn].some(function(t){return e[t]>=0})}function qre(e){var t=e.state,n=e.name,a=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,o=qi(t,{elementContext:"reference"}),s=qi(t,{altBoundary:!0}),l=WC(o,a),c=WC(s,r,i),u=ZC(l),d=ZC(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const Gre={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:qre};function Hre(e,t,n){var a=rr(e),r=[Rn,Tn].indexOf(a)>=0?-1:1,i=typeof n=="function"?n(Object.assign(Object.assign({},t),{},{placement:e})):n,o=i[0],s=i[1];return o=o||0,s=(s||0)*r,[Rn,Bn].indexOf(a)>=0?{x:s,y:o}:{x:o,y:s}}function Vre(e){var t=e.state,n=e.options,a=e.name,r=n.offset,i=r===void 0?[0,0]:r,o=YU.reduce(function(u,d){return u[d]=Hre(d,t.rects,i),u},{}),s=o[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[a]=o}const Wre={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Vre};function Zre(e){var t=e.state,n=e.name;t.modifiersData[n]=tz({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const Yre={name:"popperOffsets",enabled:!0,phase:"read",fn:Zre,data:{}};function Kre(e){return e==="x"?"y":"x"}function Xre(e){var t=e.state,n=e.options,a=e.name,r=n.mainAxis,i=r===void 0?!0:r,o=n.altAxis,s=o===void 0?!1:o,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,g=f===void 0?!0:f,b=n.tetherOffset,y=b===void 0?0:b,I=qi(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=rr(t.placement),m=Es(t.placement),h=!m,S=jw(v),w=Kre(S),k=t.modifiersData.popperOffsets,x=t.rects.reference,N=t.rects.popper,O=typeof y=="function"?y(Object.assign(Object.assign({},t.rects),{},{placement:t.placement})):y,U={x:0,y:0};if(k){if(i){var Z=S==="y"?Tn:Rn,ae=S==="y"?jn:Bn,ie=S==="y"?"height":"width",we=k[S],Te=k[S]+I[Z],ye=k[S]-I[ae],Re=g?-N[ie]/2:0,P=m===Bi?x[ie]:N[ie],G=m===Bi?-N[ie]:-x[ie],H=t.elements.arrow,Y=g&&H?zw(H):{width:0,height:0},Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:XU(),Ke=Q[Z],Se=Q[ae],Pe=Uc(0,x[ie],Y[ie]),ze=h?x[ie]/2-Re-Pe-Ke-O:P-Pe-Ke-O,nt=h?-x[ie]/2+Re+Pe+Se+O:G+Pe+Se+O,gn=t.elements.arrow&&Pl(t.elements.arrow),ja=gn?S==="y"?gn.clientTop||0:gn.clientLeft||0:0,Ba=t.modifiersData.offset?t.modifiersData.offset[t.placement][S]:0,qa=k[S]+ze-Ba-ja,mp=k[S]+nt-Ba,Ga=Uc(g?Math.min(Te,qa):Te,we,g?Math.max(ye,mp):ye);k[S]=Ga,U[S]=Ga-we}if(s){var Gz=S==="x"?Tn:Rn,Hz=S==="x"?jn:Bn,zl=k[w],Vz=zl+I[Gz],Wz=zl-I[Hz],Ww=Uc(Vz,zl,Wz);k[w]=Ww,U[w]=Ww-zl}t.modifiersData[a]=U}}const Jre={name:"preventOverflow",enabled:!0,phase:"main",fn:Xre,requiresIfExists:["offset"]};function Qre(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function eae(e){return e===Gn(e)||!ar(e)?Bw(e):Qre(e)}function tae(e,t,n){n===void 0&&(n=!1);var a=$r(t),r=Ss(e),i=ar(t),o={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(i||!i&&!n)&&((qn(t)!=="body"||Gw(a))&&(o=eae(t)),ar(t)?(s=Ss(t),s.x+=t.clientLeft,s.y+=t.clientTop):a&&(s.x=qw(a))),{x:r.left+o.scrollLeft-s.x,y:r.top+o.scrollTop-s.y,width:r.width,height:r.height}}function nae(e){var t=new Map,n=new Set,a=[];e.forEach(function(i){t.set(i.name,i)});function r(i){n.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&r(l)}}),a.push(i)}return e.forEach(function(i){n.has(i.name)||r(i)}),a}function rae(e){var t=nae(e);return hre.reduce(function(n,a){return n.concat(t.filter(function(r){return r.phase===a}))},[])}function aae(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function iae(e){var t=e.reduce(function(n,a){var r=n[a.name];return n[a.name]=r?Object.assign(Object.assign(Object.assign({},r),a),{},{options:Object.assign(Object.assign({},r.options),a.options),data:Object.assign(Object.assign({},r.data),a.data)}):a,n},{});return Object.keys(t).map(function(n){return t[n]})}var YC={placement:"bottom",modifiers:[],strategy:"absolute"};function KC(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function oae(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,a=n===void 0?[]:n,r=t.defaultOptions,i=r===void 0?YC:r;return function(s,l,c){c===void 0&&(c=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},YC),i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],f=!1,g={state:u,setOptions:function(v){y(),u.options=Object.assign(Object.assign(Object.assign({},i),u.options),v),u.scrollParents={reference:ys(s)?Ho(s):s.contextElement?Ho(s.contextElement):[],popper:Ho(l)};var m=rae(iae([].concat(a,u.options.modifiers)));return u.orderedModifiers=m.filter(function(h){return h.enabled}),b(),g.update()},forceUpdate:function(){if(!f){var v=u.elements,m=v.reference,h=v.popper;if(KC(m,h)){u.rects={reference:tae(m,Pl(h),u.options.strategy==="fixed"),popper:zw(h)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(U){return u.modifiersData[U.name]=Object.assign({},U.data)});for(var S=0;S<u.orderedModifiers.length;S++){if(u.reset===!0){u.reset=!1,S=-1;continue}var w=u.orderedModifiers[S],k=w.fn,x=w.options,N=x===void 0?{}:x,O=w.name;typeof k=="function"&&(u=k({state:u,options:N,name:O,instance:g})||u)}}}},update:aae(function(){return new Promise(function(I){g.forceUpdate(),I(u)})}),destroy:function(){y(),f=!0}};if(!KC(s,l))return g;g.setOptions(c).then(function(I){!f&&c.onFirstUpdate&&c.onFirstUpdate(I)});function b(){u.orderedModifiers.forEach(function(I){var v=I.name,m=I.options,h=m===void 0?{}:m,S=I.effect;if(typeof S=="function"){var w=S({state:u,name:v,instance:g,options:h}),k=function(){};d.push(w||k)}})}function y(){d.forEach(function(I){return I()}),d=[]}return g}}var sae=[Nre,Yre,Are,Sre,Wre,Bre,Jre,Ire,Gre],lae=oae({defaultModifiers:sae});const cae=["top","top-start","top-end","bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end","auto","auto-start","auto-end"],uae=e=>{const[t,n]=e.split("-");let a;switch(t){case"top":a="bottom";break;case"bottom":a="top";break;case"left":a="right";break;case"right":a="left";break;default:a="auto"}return n&&(a=cae.find(r=>r.includes(`${a}-${n}`))??a),a},nz=(e,t,n)=>{if(e.length===0||e[0].split("-")[0]==="auto")return n;const{reference:a,popper:r}=t.rects,i=qi({...t,placement:e[0]}),o=/left|right/.test(e[0].split("-")[0])?"horizontal":"vertical",s=(i.top>0||i.bottom>0||i.left>0||i.right>0)&&(o==="horizontal"?r.height/2-i.top<a.height||r.height/2-i.bottom<a.height:r.width-i.left<a.width||r.width-i.right<a.width),l=e[0].split("-")[0];return!s&&i[l]<=0?e[0]:nz(e.slice(1),t,n)},XC="fallbackModifier",JC={name:XC,enabled:!0,phase:"main",data:{_skip:!1},fn({state:e,options:t}){const n=e.options.placement,{fallbackPlacements:a}=t,r=[n,uae(n),...a||[]],i=nz(r,e,n);e.placement!==i&&(e.modifiersData[XC]._skip=!0,e.placement=i,e.reset=!0)}},rz=["top","right","bottom","left"],Hw=J.forwardRef(({portal:e=!0,open:t=!0,...n},a)=>t?p.jsx(fae,{ref:a,portal:e,...n}):null),dae=e=>{if(e!==null)return"current"in e?e.current||void 0:e},pae={},fae=J.forwardRef(({anchorElement:e,getAnchorClientRect:t,popperOptions:n=pae,placement:a="bottom",fallbackPlacements:r=rz,onPlacementChange:i,children:o,portal:s,popperInstanceRef:l},c)=>{const u=J.useRef(!0),{localRef:d,elementRef:f}=La(l),[g,b]=J.useState(a),y=nre(c,e),I=J.useRef(a);I.current=g;const v=J.useMemo(()=>({name:"setPlacement",enabled:!0,phase:"afterWrite",fn({state:h}){b(h.placement),i==null||i(h.placement)}}),[b,i]);J.useLayoutEffect(()=>{const h=t?{getBoundingClientRect:t}:dae(e??null);if(!h){console.warn("Popper: neither anchorElement or getAnchorClientRect was defined. A valid anchorElement or getAnchorClientRect callback must be provided to render a Popper");return}if(y.current){const S=lae(h,y.current,{placement:a,...n,modifiers:[v,{...JC,options:{fallbackPlacements:r}},...n.modifiers||[]]});return f(S),()=>{S==null||S.destroy()}}},[e,t,y]),J.useLayoutEffect(()=>{var h;u.current||(h=d.current)==null||h.setOptions({placement:a,...n,modifiers:[v,{...JC,options:{fallbackPlacements:r}},...n.modifiers||[]]}),u.current=!1},[n,a,r,v,d]);const m=p.jsx(p.Fragment,{children:mae(o)?o({placement:g}):o});return s?lS.createPortal(m,y.current):m});function mae(e){return typeof e=="function"}const pt=fn({defaultConfig:{...ui.defaultConfig,...ha.defaultConfig,mode:"single",shouldVirtualize:!1},requiredConfig:{...ui.requiredConfig,...ha.requiredConfig},contextOverride:ha.Context})(e=>{const t=ui(ui.mergeConfig(e,{selection:e.mode==="single"?CU:Cne})),n=ha(ha.mergeConfig(e,{id:t.state.id,onHide(){t.state.indexRef.current=0}}));zU(n),jU(n);const a={mode:e.mode,...t.state,...n.state},r={...t.events,...n.events};return{...t,...n,state:a,events:r,UNSTABLE_parentModel:e.UNSTABLE_parentModel}}),az=he({vars:{minWidth:fe(1),transformOriginVertical:"top",transformOriginHorizontal:"left",maxHeight:""},base:({transformOriginVertical:e,transformOriginHorizontal:t,minWidth:n,maxHeight:a})=>({fontFamily:ut.default,fontWeight:Xe.normal,fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,color:L.fg.default,position:"relative",display:"flex",flexDirection:"column",transition:"transform ease-out 150ms",padding:_.padding.xxs,borderRadius:_.shape.xxl,maxWidth:Kn.subtract("100vw",_.size.sm),boxShadow:HM[3],minWidth:n,maxHeight:a,transformOrigin:`${e} ${t}`,".wd-no-animation &":{animation:"none"}})}),gae=le()(()=>({})),iz=Ne("div")({displayName:"Menu.Card",modelHook:pt,elemPropsHook:gae})(({minWidth:e,maxHeight:t,...n},a,r)=>{const i=J.useMemo(()=>WU(r.state.placement||"bottom"),[r.state.placement]);return p.jsx(Yne,{as:a,...Ue(n,az({minWidth:typeof e=="number"?fe(e):e,maxHeight:typeof t=="number"?fe(t):t,transformOriginVertical:i.vertical,transformOriginHorizontal:i.horizontal})),children:n.children})}),hae=he({base:{display:"block",height:fe(1),border:"none",borderTop:`${fe(1)} solid ${_.color.border.default}`,margin:`${_.gap.sm} ${_.gap.md}`}}),oz=$e("hr")({displayName:"Menu.Divider",Component({...e},t,n){return p.jsx(n,{ref:t,...jt(e,hae())})}}),QC={vertical:"bottom",horizontal:"center"},fy=Ka("positionX","positionY"),vae=nee({"0%":{opacity:0,transform:`translate(${fy.positionX}, ${fy.positionY})`},"100%":{opacity:1,transform:"translate(0)"}}),bae=he({vars:{tooltipTransformOriginHorizontal:"",tooltipTransformOriginVertical:""},base:({tooltipTransformOriginHorizontal:e,tooltipTransformOriginVertical:t})=>({fontFamily:ut.default,fontWeight:Xe.normal,fontSize:_.fontSize.subtext.md,lineHeight:_.lineHeight.subtext.md,letterSpacing:_.letterSpacing.subtext.md,display:"inline-flex",position:"relative",padding:_.padding.sm,color:L.fg.inverse,animationName:vae,animationDuration:"150ms",animationTimingFunction:"ease-out",transformOrigin:`${t} ${e}`,a:{color:L.fg.inverse,textDecoration:"underline"},"&:before":{content:'""',borderRadius:_.shape.md,outline:`${fe(1)} solid transparent`,outlineOffset:`-${fe(1)}`,zIndex:-1,margin:_.gap.xs,backgroundColor:_.color.surface.contrast.default,position:"absolute",top:0,left:0,right:0,bottom:0,boxShadow:HM[2]},"[data-popper-reference-hidden] &":{visibility:"hidden",pointerEvents:"none"},'[data-popper-placement="top-start"] &, [data-popper-placement="bottom-start"] &':{left:Kn.negate(Br.size50)},'[data-popper-placement="top-end"] &, [data-popper-placement="bottom-end"] &':{right:Kn.negate(Br.size50)},'[data-popper-placement="left-start"] &, [data-popper-placement="right-start"] &':{top:Kn.negate(Br.size50)},'[data-popper-placement="left-end"] &, [data-popper-placement="right-end"] &':{bottom:Kn.negate(Br.size50)}}),modifiers:{elementHasFocus:{true:{padding:Kn.subtract(_.padding.md,Kn.divide(_.padding.xxs,2)),"&:before":{margin:Br.size75}}}}}),yae=$e("div")({displayName:"TooltipContainer",Component:({children:e,transformOrigin:t=QC,elementHasFocus:n=!1,...a},r,i)=>{const o=wee(t||QC,_.gap.sm);return p.jsx(i,{ref:r,...Ue(a,[bae({tooltipTransformOriginHorizontal:t==null?void 0:t.horizontal,tooltipTransformOriginVertical:t==null?void 0:t.vertical,elementHasFocus:n}),fy({positionX:o.x,positionY:o.y})]),children:e})}}),eN=(e,t=0)=>{const n=J.useRef(),a=()=>{n.current=window.setTimeout(e,t)},r=()=>{window.clearTimeout(n.current),n.current=void 0};return J.useEffect(()=>()=>{window.clearTimeout(n.current)},[n]),{start:a,clear:r}},Sae=e=>{const t=e.tagName.toLowerCase(),n=e.getAttribute("tabindex");switch(t){case"button":case"input":case"select":case"textarea":case"details":return!0;default:return n?Number(n)>=0:!1}};function Eae({type:e="label",titleText:t="",showDelay:n=300,hideDelay:a=100}={}){const r=J.useRef(!1),i=ha(),[o,s]=J.useState(null),l=Ll(),c=eN(i.events.hide,a),u=eN(i.events.show,n),d=()=>{c.start(),u.clear()},f=()=>{u.start(),c.clear()},g=m=>{s(m.currentTarget),f()},b=m=>{r.current||g(m),r.current=!1},y=m=>{r.current=!0,Sae(m.currentTarget)&&i.events.hide()};jU(i),zU(i),Qne(i),ere(i);const I=i.state.visibility!=="hidden",v={"aria-describedby":e==="describe"&&I?l:void 0,"aria-description":e==="description"?t:void 0,"aria-label":e==="label"?t:void 0,onMouseEnter:g,onMouseLeave:d,onMouseDown:y,onFocus:b,onBlur:d};return v["aria-describedby"]===void 0&&delete v["aria-describedby"],{targetProps:v,popperProps:{open:I,anchorElement:o,ref:i.state.stackRef},tooltipProps:{id:e==="describe"&&I?l:void 0,role:"tooltip",onMouseEnter:f,onMouseLeave:d}}}const sz=e=>{const t=getComputedStyle(e);if(t.overflow==="auto"||t.overflow==="scroll"||t.overflow==="clip"||t.overflow==="hidden")return e;if(e.children){for(let n=0;n<e.children.length;n++){const a=sz(e.children[n]);if(a)return a}return null}return null},lz=e=>{const t=getComputedStyle(e);if(t.textOverflow==="ellipsis"||Number(t.webkitLineClamp)>0)return e;for(let n=0;n<e.children.length;n++){const a=lz(e.children[n]);if(a)return a}return null},tN=e=>{const t=lz(e)||sz(e);return t?t.scrollWidth>t.clientWidth||t.scrollHeight>t.clientHeight:!1};function _ae(e,t,n=Object.keys(t)){return n.reduce((a,r)=>(typeof e[r]=="function"?a[r]=JM(t[r],e[r]):a[r]=t[r],a),{})}const Vw=({placement:e="top",fallbackPlacements:t=rz,children:n,...a})=>{const[r,i]=J.useState(""),{targetProps:o,popperProps:s,tooltipProps:l}=Eae({type:"muted"}),c=d=>{const f=d.currentTarget;i(f instanceof HTMLElement?f.innerText:""),tN(f)&&o.onMouseEnter(d)},u=d=>{const f=d.currentTarget;i(f instanceof HTMLElement?f.innerText:""),tN(f)&&o.onFocus(d)};return p.jsxs(J.Fragment,{children:[J.cloneElement(n,{...o,onMouseEnter:c,onFocus:u,"aria-label":void 0,..._ae({...o,onMouseEnter:c,onFocus:u},n.props)}),p.jsx(Hw,{placement:e,fallbackPlacements:t,...s,children:({placement:d})=>{const f=WU(d);return p.jsx(yae,{transformOrigin:f,...l,...a,children:r})}})]})},cz=fn({defaultConfig:{id:void 0},requiredConfig:{}})(e=>({state:{id:Ll(e.id)},events:{}})),wae=he({base:{fontFamily:ut.default,fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,fontWeight:Xe.bold,display:"flex",alignItems:"center",width:"100%",gap:_.gap.md,padding:`${_.padding.xs} ${_.padding.md}`}}),kae=le()(e=>({"data-type":"group",role:"group","aria-labelledby":e.state.id})),Iae=le()(e=>({id:e.state.id})),nN=Ne("div")({modelHook:cz,elemPropsHook:Iae})(({children:e,...t},n)=>p.jsx(Vw,{children:p.jsx(n,{...Ue(t,wae()),children:e})})),uz=sa("div")({displayName:"Menu.Group",modelHook:cz,elemPropsHook:kae,subComponents:{Heading:nN}})(({children:e,title:t,...n},a)=>p.jsxs(a,{...Ue(n),children:[t?p.jsx(nN,{children:t}):null,e]})),Ml=he({parts:{text:"menu-item-text",icon:"menu-item-icon",selected:"menu-item-selected"},base:({textPart:e,iconPart:t,selectedPart:n})=>({fontFamily:ut.default,fontWeight:Xe.normal,fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,display:"flex",alignItems:"center",width:"100%",gap:_.gap.md,padding:`${_.padding.sm} ${_.padding.md}`,boxSizing:"border-box",cursor:"pointer",color:L.fg.default,borderWidth:0,borderRadius:_.shape.xxl,textAlign:"start",transition:"background-color 80ms, color 80ms",backgroundColor:"inherit",minHeight:_.size.md,overflowWrap:"anywhere",[ne.vars.color]:"currentColor",[`& :where(${n})`]:{transition:"opacity 80ms linear",opacity:ht.zero},"&:where(:has(span))":{display:"flex"},"&[aria-selected=true]":{color:_.color.brand.fg.primary.strong,backgroundColor:_.color.brand.surface.primary.strong,[`& :where(${n})`]:{opacity:ht.full},"&:where(.focus, :focus-visible)":{[ne.vars.color]:"currentColor",outline:"none",backgroundColor:_.color.brand.accent.primary,color:L.fg.inverse}},"&:is(.hover, :hover)":{color:L.fg.strong,backgroundColor:_.color.surface.overlay.hover.default},"&:is(.focus, :focus-visible)":{color:L.fg.inverse,backgroundColor:_.color.brand.accent.primary,outline:`${fe(2)} solid transparent`,outlineOffset:`-${fe(2)}`},"&:is(:disabled, [aria-disabled=true])":{cursor:"default",opacity:ht.disabled,"&:where(.hover, :hover, [aria-selected=true])":{background:"none"},"&:where(.focus, :focus-visible)":{backgroundColor:_.color.brand.accent.primary,opacity:ht.disabled}},[`& :where(${e})`]:{flexGrow:1,alignSelf:"center"},[`& :where(${t})`]:{alignSelf:"start"}})}),xae=e=>p.jsx(vs,{...Ml.parts.icon,...e}),dz=$e("span")({Component:({...e},t,n)=>p.jsx(n,{ref:t,...Ml.parts.text,...jt(e)})}),pz=$e("button")({displayName:"MenuItem",Component:({children:e,isDisabled:t,...n},a,r)=>p.jsx(r,{ref:a,"aria-disabled":t,...Ue(n,Ml({})),children:typeof e=="string"?p.jsx(dz,{children:e}):e})}),fz=le()(e=>({onKeyDown(t){const n=getComputedStyle(t.currentTarget);t.key==="ArrowLeft"&&n.direction==="ltr"&&e.UNSTABLE_parentModel&&e.events.hide(t)}})),mz=le()((e,t,n={"data-id":""})=>{const{localRef:a,elementRef:r}=La(t),i=n["data-id"];return J.useLayoutEffect(()=>{e.state.mode==="single"&&Tu(e.state,i)&&requestAnimationFrame(()=>{var o;(o=a.current)==null||o.focus()})},[i,a,e.state.cursorId,e.state.mode]),{ref:r,className:Tu(e.state,n["data-id"])?"focus":void 0}});function gz(e){e.UNSTABLE_parentModel&&(e.UNSTABLE_parentModel.events.hide(),gz(e.UNSTABLE_parentModel))}const Tae=ca(le()(e=>({role:"menuitem",onMouseDown(t){e.events.goTo({id:t.currentTarget.getAttribute("data-id")})},onClick:e.state.mode==="single"?t=>{t.currentTarget.getAttribute("aria-disabled")!=="true"&&(e.events.hide(t),gz(e))}:void 0})),mz,fz,$ne,LU,pp),Gi=Ne("button")({displayName:"Menu.Item",modelHook:pt,elemPropsHook:Tae,subComponents:{Icon:xae,Text:dz}})(({children:e,...t},n)=>p.jsx(Vw,{placement:"left",children:p.jsx(pz,{as:n,...t,children:e})})),Rae=ca(le()(e=>({role:"menu","aria-labelledby":e.state.id,"aria-orientation":e.state.orientation})),are,tre),hz=he({base:{background:_.color.surface.popover,borderRadius:_.shape.xxl,padding:0,gap:_.gap.xs},modifiers:{orientation:{vertical:{flexDirection:"column"},horizontal:{flexDirection:"row"}}}}),vz=Ne("div")({displayName:"Menu.List",modelHook:pt,elemPropsHook:Rae})(({children:e,...t},n,a)=>p.jsx($U,{as:n,model:a,marginY:_.gap.none,...jt(t,hz({orientation:a.state.orientation})),children:e})),bz=$e("span")({Component:({...e},t,n)=>p.jsxs(p.Fragment,{children:[p.jsx(Gi.Text,{ref:t,as:n,...e}),p.jsx(vs,{...Ml.parts.selected,icon:qte})]})}),Aae=$e("li")({displayName:"MenuOption",Component:({children:e,...t},n,a)=>p.jsx(a,{ref:n,...Ue(t,Ml()),children:typeof e=="string"?p.jsx(bz,{children:e}):e})}),Cae=ca(le()((e,t,n={})=>{const a=n["data-id"]||"";return{role:"option","aria-selected":Ane(a,e.state),onMouseDown:o=>{o.button===0&&o.currentTarget.getAttribute("aria-disabled")!=="true"&&(e.events.goTo({id:a}),e.events.select({id:a}),e.state.mode==="single"&&e.events.hide(o)),o.preventDefault()}}}),Fne,pp),yz=Ne("li")({displayName:"Menu.Item",modelHook:pt,elemPropsHook:Cae,subComponents:{Icon:Gi.Icon,Text:bz}})(({children:e,...t},n)=>p.jsx(Vw,{placement:"left",children:p.jsx(Aae,{as:n,...t,children:e})})),Sz=qU,Ez={modifiers:[{name:"offset",options:{offset:()=>[0,4]}}]},Nae=Ne("div")({modelHook:pt,elemPropsHook:Sz})(({children:e,...t})=>p.jsx(Hw,{placement:"bottom-start",popperOptions:Ez,...t,children:e})),_z=le()(e=>({id:e.state.id,"aria-haspopup":"true","aria-expanded":e.state.visibility==="visible",onKeyDown(t){switch(t.key){case"ArrowDown":case"ArrowUp":e.events.show(t)}}})),Oae=ca(_z,GU),Lae=ca(_z,rre),$ae=Ne(bs)({displayName:"Menu.Target",modelHook:pt,elemPropsHook:Oae})(({children:e,...t},n)=>p.jsx(n,{...t,children:e})),Dae=Ne(bs)({displayName:"Menu.Target",modelHook:pt,elemPropsHook:Lae})(({children:e,...t},n)=>p.jsx(n,{...t,children:e})),Fae=Ne("div")({modelHook:pt,elemPropsHook:Sz})(({children:e,...t})=>p.jsx(Hw,{placement:"right-start",popperOptions:Ez,...t,children:e})),Pae=(e,t=0)=>{const n=$.useRef(),a=()=>{n.current=window.setTimeout(e,t)},r=()=>{window.clearTimeout(n.current),n.current=void 0};return $.useEffect(()=>()=>{window.clearTimeout(n.current)},[n]),{start:a,clear:r}},Mae=ca(mc(e=>e.UNSTABLE_parentModel,mz),mc(e=>e.UNSTABLE_parentModel,fz),mc(e=>e.UNSTABLE_parentModel,LU),le()((e,t)=>({ref:la(t,e.state.targetRef)})),mc(e=>e.UNSTABLE_parentModel,pp),le()(e=>{const t=$.useRef(),n=Pae(()=>{e.UNSTABLE_parentModel.events.goTo({id:t.current||""}),e.events.show(event)},300);return{id:e.state.id,role:"menuitem","aria-haspopup":"true","aria-expanded":e.state.visibility==="visible",onMouseDown(a){e.UNSTABLE_parentModel.events.goTo({id:a.currentTarget.getAttribute("data-id")})},onMouseEnter(a){t.current=a.currentTarget.getAttribute("data-id"),n.start()},onMouseLeave(){n.clear()},onClick(a){e.state.targetRef.current instanceof Element||(e.state.targetRef.current=a.currentTarget),e.state.visibility!=="hidden"?e.events.hide(a):e.events.show(a)},"data-has-children":!0,onKeyDown(a){if(e.state.orientation==="vertical")switch(a.key){case"ArrowRight":case"Enter":case" ":e.events.show(a);break}}}})),Uae=Ne("button")({modelHook:pt,elemPropsHook:Mae})(({children:e,...t},n)=>p.jsxs(pz,{as:n,...t,children:[typeof e=="string"?p.jsx(Gi.Text,{children:e}):e,p.jsx(Gi.Icon,{icon:Gte})]})),zae=Ne()({modelHook:pt,subComponents:{Card:iz,List:vz,Item:Gi,TargetItem:Uae,Group:uz,Option:yz,Divider:oz,Popper:Fae}})(({children:e,model:t,...n},a,r)=>{const i=pt(pt.mergeConfig(n,{getId:r.getId,getTextValue:r.getTextValue,UNSTABLE_parentModel:r,mode:r.state.mode,orientation:r.state.orientation,onSelect(s){r.events.select(s)},onSelectAll(){r.events.selectAll()}})),o=pt.Context;return p.jsx(o.Provider,{value:i,children:e})}),wa=sa()({displayName:"Menu",modelHook:pt,subComponents:{Target:$ae,Card:iz,List:vz,Item:Gi,Group:uz,Option:yz,Divider:oz,TargetContext:Dae,Popper:Nae,Submenu:zae}})(({children:e})=>p.jsx(p.Fragment,{children:e})),rb=fn({defaultConfig:{value:void 0,onFilterChange(e){},onChange(e){}}})(e=>{const t=$.createRef();return{onFilterChange:e.onFilterChange,onChange:e.onChange,state:{value:e.value,inputRef:t},events:{}}}),Sr=fn({defaultConfig:{...rb.defaultConfig,...pt.defaultConfig,shouldVirtualize:!0},requiredConfig:{...rb.requiredConfig,...pt.requiredConfig}})(e=>{const t=rb(e),n=pt(e),[a,r]=$.useState(0),i={width:a,...t.state,...n.state},o={...t.events,...n.events,setWidth(s){r(s)}};return{...n,...t,state:i,events:o}}),jae=le()(e=>({onKeyDown(t){(t.key==="ArrowDown"||t.key==="ArrowUp"&&e.state.visibility!=="visible")&&(e.events.show(t),e.events.setWidth(t.currentTarget.getBoundingClientRect().width))}})),Bae=le()(e=>({onKeyDown(t){e.state.visibility==="visible"&&NU(t,e)&&t.preventDefault()}})),qae=le()(e=>{const t=e.state.visibility!=="hidden";return $.useLayoutEffect(()=>{var n;t&&e.events.setWidth(((n=e.state.targetRef.current)==null?void 0:n.getBoundingClientRect().width)||0)},[t,e.events,e.state.targetRef]),{}}),wz=ca(le()((e,t)=>{const n=la(t,e.state.inputRef);return $.useEffect(()=>{if(e.state.cursorId&&e.state.visibility==="visible"){const a=e.navigation.getItem(yr(e.state),e);if(e.state.isVirtualized&&a)e.state.UNSTABLE_virtual.scrollToIndex(a.index);else{const r=document.querySelector(`[id="${e.state.id}-list"] [data-id="${yr(e.state)}"]`);r&&requestAnimationFrame(()=>{r.scrollIntoView({block:"nearest"})})}}},[e.state.cursorId,e.state.selectedIds,e.state.visibility]),{onKeyDown(a){if(a.key==="Enter"&&!a.metaKey&&e.state.visibility==="visible"){const r=document.querySelector(`[data-id="${yr(e.state)}"]`);r&&(r==null?void 0:r.getAttribute("aria-disabled"))!=="true"&&(e.events.select({id:yr(e.state)}),e.state.mode==="single"&&e.events.hide(a)),a.preventDefault()}},onBlur(a){e.events.hide(a)},onClick(a){e.state.visibility==="hidden"&&e.events.setWidth(a.currentTarget.getBoundingClientRect().width)},value:e.state.value,role:"combobox","aria-haspopup":"listbox","aria-expanded":e.state.visibility==="visible","aria-autocomplete":"list","aria-controls":`${e.state.id}-list`,"aria-activedescendant":e.state.visibility==="hidden"?null:void 0,id:e.state.id,ref:n}}),qae,jae,Dne,Bae,GU),Gae=Ne(Dw)({modelHook:Sr,elemPropsHook:wz})(({children:e,...t},n)=>p.jsx(n,{...t,children:e})),Hae=le()(e=>({minWidth:e.state.width})),Vae=he({base:{'& :where([data-part="list-box-container"])':{borderRadius:_.shape.xxl}}}),Wae=Ne("div")({modelHook:Sr,elemPropsHook:Hae})(({children:e,...t},n)=>p.jsx(wa.Card,{as:n,...jt(t,Vae()),children:e})),Zae=le()(e=>({role:"listbox","aria-labelledby":e.state.id,id:`${e.state.id}-list`})),Yae=he({base:{},extends:hz}),Kae=Ne("ul")({modelHook:Sr,elemPropsHook:Zae})(({children:e,...t},n,a)=>p.jsx($U,{as:n,model:a,marginY:_.gap.none,...jt(t,Yae({orientation:a.state.orientation})),children:e})),Xae=qU,Jae=Ne("div")({displayName:"Combobox.Menu.Popper",modelHook:pt,elemPropsHook:Xae})(({children:e,...t})=>p.jsx(wa.Popper,{fallbackPlacements:["top","bottom"],...t,children:e})),rN=Ne()({modelHook:Sr,subComponents:{Popper:Jae,List:Kae,Item:wa.Option,Card:Wae,Divider:wa.Divider}})(({children:e},t,n)=>p.jsx(wa,{model:n,children:e})),Si=sa()({displayName:"Combobox",modelHook:Sr,subComponents:{Input:Gae,Menu:rN}})(({children:e},t,n)=>p.jsx(rN,{model:n,children:e})),Qae=le()(e=>($.useLayoutEffect(()=>{var n;const t=(n=e.state.items.find(a=>a.id===e.state.cursorId))==null?void 0:n.id;!e.state.selectedIds.length&&e.state.items.length&&!t?e.events.goTo({id:e.state.items[0].id}):e.state.selectedIds.length&&!t&&e.events.goTo({id:e.state.selectedIds[0]})},[e.state.selectedIds,e.events,e.state.items,e.state.cursorId,e.state.visibility]),{})),eie=le()(e=>{var c;const t=$.useRef(""),n=$.useRef(),[a,r]=$.useState(t.current),i=()=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t.current="",r(t.current)},500)},o=(u,d,f=e.state.items.length,g=!0)=>{for(let b=u;b<f;b++)if(e.state.items[b].textValue.toLowerCase().startsWith(d.toLowerCase())&&(!g||g&&!e.state.nonInteractiveIds.includes(e.state.items[b].id)))return b;return-1},s=e.state.items.length>0&&((c=e.navigation.getItem(yr(e.state),e))==null?void 0:c.index)||0,l=(u,d)=>{const f=t.current.length===0?s+1:s,g=f===d?0:f;t.current+=u,r(t.current),i();let b=o(g,t.current);o(g,t.current),b===-1&&(b=o(0,t.current,g)),b>-1&&(e.events.goTo({id:e.state.items[b].id}),e.state.visibility==="hidden"&&e.events.select({id:e.state.items[b].id}))};return{onKeyDown(u){u.key.length===1&&u.key.match(/\S/)&&l(u.key,e.state.items.length),(u.key==="Spacebar"||u.key===" ")&&e.state.visibility==="visible"&&t.current!==""&&l(" ",e.state.items.length),(u.key==="Spacebar"||u.key===" ")&&e.state.visibility==="hidden"&&t.current!==""&&l(" ",e.state.items.length)},keySoFar:a}});function tie(e){return!!e}const nie=le()((e,t,{disabled:n,value:a,onChange:r,name:i}={})=>{const{elementRef:o,localRef:s}=La(e.state.targetRef),{elementRef:l,localRef:c}=La(t),u=$.useRef(e.navigation);u.current=e.navigation;const d=$.useRef(e.state);return d.current=e.state,$.useLayoutEffect(()=>{c.current&&typeof a=="string"&&a!==c.current.value&&e.events.setSelectedIds(a?a.split(", "):[])},[a,c,e.events]),$.useImperativeHandle(l,()=>{if(c.current&&s.current){const f=c.current,g=s.current;return Object.defineProperty(f,"value",{get(){var y,I;return(I=(y=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(f),"value"))==null?void 0:y.get)==null?void 0:I.call(f)},set(b){f&&b!==(d.current.selectedIds==="all"?[]:d.current.selectedIds).join(", ")&&e.events.setSelectedIds(b?b.split(", "):[])}}),Object.defineProperty(f,"focus",{configurable:!0,writable:!0,value:b=>g.focus(b)}),Object.defineProperty(f,"blur",{configurable:!0,writable:!0,value:()=>g.blur()}),f}return c.current},[c,s,e.events]),$.useLayoutEffect(()=>{if(s.current){const f=e.state.items.length===0?"":(e.state.selectedIds==="all"?[]:e.state.selectedIds.map(g=>u.current.getItem(g,{state:d.current})).filter(tie).map(g=>g.textValue)).join(", ");f!==s.current.value&&uy(s.current,f)}if(c.current){const f=(e.state.selectedIds==="all"?[]:e.state.selectedIds).join(", ");f!==c.current.value&&uy(c.current,f)}},[e.state.selectedIds,e.state.items,c,s]),{ref:o,form:"",value:null,onChange:f=>{var g;return(g=e.onFilterChange)==null||g.call(e,f),null},name:null,disabled:n,formInputProps:{disabled:n,tabIndex:-1,"aria-hidden":!0,ref:l,onChange:f=>{var g;r==null||r(f),(g=e.onChange)==null||g.call(e,f)},name:i}}}),rie=le()(e=>{const t=e.state.visibility!=="hidden";return $.useEffect(()=>{!t&&e.state.selectedIds.length&&e.events.goTo({id:e.state.selectedIds[0]})},[t,e.events,e.state.selectedIds]),{}}),Dr=fn({defaultConfig:{...Sr.defaultConfig,shouldVirtualize:!1},requiredConfig:{...Sr.requiredConfig},contextOverride:Sr.Context})(e=>Sr(e)),aie=le()(e=>({width:e.state.width})),iie=he({base:{[az.vars.maxHeight]:fe(300)}}),oie=Ne("div")({modelHook:Dr,elemPropsHook:aie})(({children:e,...t},n)=>p.jsx(Si.Menu.Card,{as:n,...jt(t,iie()),children:e})),sie=ca(le()((e,t,n={})=>{const{elementRef:a,localRef:r}=La(t);return Bee({ref:r,onResize:i=>{if(e.state.visibility==="visible"){const o=i.width?i.width+42+8:0;e.events.setWidth(o)}}}),$.useEffect(()=>{var i;if(e.state.cursorId&&e.state.visibility==="visible"){const o=e.navigation.getItem(yr(e.state),e);if(e.state.isVirtualized&&o)e.state.UNSTABLE_virtual.scrollToIndex(o.index);else{const s=(i=r.current)==null?void 0:i.getAttribute("aria-controls");if(s){const l=document.querySelector(`[id="${s}"] [data-id="${yr(e.state)}"]`);l&&requestAnimationFrame(()=>{l.scrollIntoView({block:"nearest"})})}}}},[e.state.cursorId,e.state.selectedIds,e.state.visibility]),{onKeyDown(i){i.key!=="Tab"&&i.preventDefault(),(i.key==="Spacebar"||i.key===" "&&e.state.visibility==="hidden"&&(n==null?void 0:n.keySoFar)==="")&&e.events.show(),(i.key==="Spacebar"||i.key===" ")&&e.state.visibility==="visible"&&(n==null?void 0:n.keySoFar)===""&&(e.events.select({id:yr(e.state)}),e.events.hide())},autoComplete:"off",keySoFar:null,ref:a}}),eie,rie,Qae,nie,wz),pa=he({parts:{caret:"select-caret-icon",caretContainer:"select-caret-container",startIconContainer:"select-start-icon-container",startIcon:"select-start-icon",endIcon:"select-end-icon",hiddenInput:"select-hidden-input",visualInput:"select-visual-input"},base:({hiddenInputPart:e,startIconPart:t,endIconPart:n,visualInputPart:a,caretContainerPart:r,startIconContainerPart:i,caretPart:o})=>({[e]:{position:"absolute",top:0,bottom:0,left:0,right:0,opacity:ht.zero,cursor:"default",pointerEvents:"none",minWidth:"100%",width:"100%"},[`${t}, ${n}, ${r}, ${i}`]:{position:"absolute",pointerEvents:"none"},[a]:{caretColor:"transparent",backgroundColor:_.color.surface.default,color:L.fg.default,cursor:"default","&::placeholder":{color:L.fg.default},"&::selection":{backgroundColor:"transparent"}},[o]:{[ne.vars.color]:L.fg.default},"&:has(:disabled, .disabled)":{[o]:{[ne.vars.color]:L.fg.disabled}}}),modifiers:{error:{error:({visualInputPart:e})=>({[e]:{backgroundColor:_.color.brand.surface.critical.default}}),caution:({visualInputPart:e})=>({[e]:{backgroundColor:_.color.brand.surface.caution.default}})}}}),lie=Ne(Dw)({modelHook:Dr,elemPropsHook:sie})(({inputStartIcon:e,formInputProps:t,error:n,...a},r,i)=>p.jsxs(Io,{"data-width":"ck-formfield-width",...pa({error:n}),children:[e&&i.state.selectedIds.length>0&&p.jsx(Io.InnerStart,{...pa.parts.startIconContainer,children:p.jsx(vs,{...pa.parts.startIcon,icon:e})}),p.jsx(Io.Input,{...pa.parts.hiddenInput,...t}),p.jsx(Io.Input,{as:r,placeholder:"Choose an option",error:n,...pa.parts.visualInput,...a}),p.jsx(Io.InnerEnd,{...pa.parts.caretContainer,children:p.jsx(vs,{...pa.parts.caret,icon:Bte})})]})),cie=Ne("li")({modelHook:Dr,subComponents:{Icon:Si.Menu.Item.Icon}})(({children:e,...t},n,a)=>p.jsx(Si.Menu.Item,{as:n,...t,children:e})),D=sa()({displayName:"Select",modelHook:Dr,subComponents:{Input:lie,Popper:Si.Menu.Popper,Card:oie,List:Si.Menu.List,Item:cie}})(({children:e,...t},n,a)=>p.jsx(Si,{model:a,...t,children:e})),Ul=fn({defaultConfig:{error:void 0,id:"",isRequired:!1,orientation:"vertical"}})(e=>{const t=Ll(e.id);return{state:{...e,id:t},events:{}}}),uie=le()(({state:e})=>({id:`hint-${e.id}`})),die=le()(({state:e})=>({required:e.isRequired?!0:void 0,"aria-invalid":e.error==="error"?!0:void 0,"aria-describedby":e.id?`hint-${e.id}`:void 0,"aria-labelledby":e.id?`label-${e.id}`:void 0,id:e.id?`input-${e.id}`:void 0,error:e.error})),pie=le()(({state:e})=>({htmlFor:`input-${e.id}`,id:`label-${e.id}`})),fie=he({base:{display:"flex",flexDirection:"column",gap:_.gap.sm}}),mie=Ne("div")({displayName:"FormField.Field",modelHook:Ul})((e,t,n)=>p.jsx(t,{"data-width":"ck-formfield-width",...jt(e,fie())})),gie=he({extends:Lr,base:{margin:0},modifiers:{error:{error:{color:_.color.brand.fg.critical.default},caution:{color:L.fg.default}}},defaultModifiers:{typeLevel:"subtext.medium"}}),hie=Ne("p")({displayName:"FormField.Hint",modelHook:Ul,elemPropsHook:uie})(({children:e,typeLevel:t,variant:n,...a},r,i)=>e?p.jsx(r,{...Ue(a,gie({typeLevel:t,variant:n,error:i.state.error})),children:e}):null),vie=Ne("input")({displayName:"FormField.Input",modelHook:Ul,elemPropsHook:die})((e,t)=>p.jsx($l,{"data-width":"ck-formfield-width",as:t,...Ue(e)})),bie=he({extends:Lr,base:{fontWeight:Xe.medium,color:L.fg.default,paddingInlineStart:0,display:"flex",alignItems:"center",minWidth:fe(180)},modifiers:{isRequired:{true:{"&::after":{content:'"*"',fontSize:_.fontSize.body.lg,fontWeight:Xe.normal,color:_.color.brand.fg.critical.default,textDecoration:"unset",marginInlineStart:_.gap.xs}}},orientation:{horizontalStart:{justifyContent:"flex-start",float:"left",maxHeight:_.size.md},horizontalEnd:{maxHeight:_.size.md,float:"left",justifyContent:"flex-end"},vertical:{width:"100%"}},isHidden:{true:{...sU}}},defaultModifiers:{typeLevel:"subtext.large"}}),yie=Ne("label")({displayName:"FormField.Label",modelHook:Ul,elemPropsHook:pie})(({children:e,typeLevel:t,variant:n,isHidden:a,...r},i,o)=>p.jsx(i,{...Ue(r,bie({typeLevel:t,variant:n,isHidden:a?"true":void 0,isRequired:o.state.isRequired,orientation:o.state.orientation})),children:e})),Sie=he({base:{display:"flex",border:"none",padding:0,margin:`0 0 ${_.gap.lg}`},modifiers:{grow:{true:{width:"100%",'[data-width="ck-formfield-width"]':{width:"100%"},'&:has(div[data-width="ck-formfield-width"])':{width:"100%"}}},orientation:{horizontalStart:{flexDirection:"row",gap:_.gap.xl,width:"100%"},horizontalEnd:{flexDirection:"row",gap:_.gap.xl,width:"100%"},vertical:{flexDirection:"column",gap:_.gap.xs,alignItems:"flex-start"}},required:{true:{}},error:{error:{},caution:{}}},defaultModifiers:{orientation:"vertical"}}),W=sa("div")({displayName:"FormField",modelHook:Ul,subComponents:{Input:vie,Label:yie,Hint:hie,Field:mie}})(({children:e,grow:t,orientation:n="vertical",...a},r,i)=>p.jsx(r,{...Ue(a,Sie({grow:t,orientation:i.state.orientation,error:i.state.error,required:i.state.isRequired})),children:e})),Eie=lt({flexDirection:"column"}),_ie=["E-mail","Phone","Fax","Mail","Mobile Phone","The Ontologically Anthropocentric Sensory Immersive Simulation","Thisisalongstringwithnobreaksandwillwrap"],kz=()=>{const[e,t]=$.useState(""),n=a=>{console.log("change",a.currentTarget.value),t(a.target.value)};return p.jsxs(Mt,{cs:Eie,children:[p.jsxs(W,{children:[p.jsx(W.Label,{children:"Contact"}),p.jsx(W.Field,{children:p.jsxs(D,{items:_ie,children:[p.jsx(W.Input,{as:D.Input,onChange:n}),p.jsx(D.Popper,{children:p.jsx(D.Card,{children:p.jsx(D.List,{children:a=>p.jsx(D.Item,{children:a})})})})]})})]}),"Selected Value: ",e]})};kz.__RAW__=`import React from 'react';
306
306
 
307
307
  import {FormField} from '@workday/canvas-kit-react/form-field';
308
308
  import {Flex} from '@workday/canvas-kit-react/layout';