@workday/canvas-kit-mcp 15.0.20 → 15.0.21

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.
@@ -290,7 +290,7 @@ ${s}
290
290
  * screenfull
291
291
  * v5.2.0 - 2021-11-03
292
292
  * (c) Sindre Sorhus; MIT License
293
- */(function(e){(function(){var t=typeof window<"u"&&typeof window.document<"u"?window.document:{},n=e.exports,a=function(){for(var o,s=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],l=0,u=s.length,c={};l<u;l++)if(o=s[l],o&&o[1]in t){for(l=0;l<o.length;l++)c[s[0][l]]=o[l];return c}return!1}(),r={change:a.fullscreenchange,error:a.fullscreenerror},i={request:function(o,s){return new Promise((function(l,u){var c=(function(){this.off("change",c),l()}).bind(this);this.on("change",c),o=o||t.documentElement;var d=o[a.requestFullscreen](s);d instanceof Promise&&d.then(c).catch(u)}).bind(this))},exit:function(){return new Promise((function(o,s){if(!this.isFullscreen){o();return}var l=(function(){this.off("change",l),o()}).bind(this);this.on("change",l);var u=t[a.exitFullscreen]();u instanceof Promise&&u.then(l).catch(s)}).bind(this))},toggle:function(o,s){return this.isFullscreen?this.exit():this.request(o,s)},onchange:function(o){this.on("change",o)},onerror:function(o){this.on("error",o)},on:function(o,s){var l=r[o];l&&t.addEventListener(l,s,!1)},off:function(o,s){var l=r[o];l&&t.removeEventListener(l,s,!1)},raw:a};if(!a){n?e.exports={isEnabled:!1}:window.screenfull={isEnabled:!1};return}Object.defineProperties(i,{isFullscreen:{get:function(){return!!t[a.fullscreenElement]}},element:{enumerable:!0,get:function(){return t[a.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return!!t[a.fullscreenEnabled]}}}),n?e.exports=i:window.screenfull=i})()})(_U);var CQ=_U.exports;const nr=Hv(CQ),OQ={lightest:"lightest",lighter:"lighter",light:"light",main:"base",dark:"dark",darkest:"darkest",contrast:"accent"},rN={lightest:"25",lighter:"50",light:"200",main:"600",dark:"700",darkest:"800"},$Q={primary:"primary",error:"critical",success:"positive",alert:"caution",neutral:"neutral"},LQ={focusOutline:Vt.focus,alertInner:Vt.caution.inner,alertOuter:Vt.caution.outer,errorInner:Vt.critical},DQ=No({[Vt.alertInner]:tc,[Vt.alertOuter]:nc,[Vt.errorInner]:KP,[Vt.focusOutline]:MP,[wr.accent]:sr,[wr.darkest]:iU,[wr.dark]:aU,[wr.base]:rU,[wr.light]:nU,[wr.lighter]:tU,[wr.lightest]:eU,[Gt.accent]:sr,[Gt.darkest]:HP,[Gt.dark]:GP,[Gt.base]:qP,[Gt.light]:BP,[Gt.lighter]:jP,[Gt.lightest]:zP,[It.accent]:sr,[It.darkest]:QP,[It.dark]:JP,[It.base]:XP,[It.light]:YP,[It.lighter]:ZP,[It.lightest]:WP,[Tt.accent]:VP,[Tt.darkest]:OP,[Tt.dark]:nc,[Tt.base]:tc,[Tt.light]:CP,[Tt.lighter]:NP,[Tt.lightest]:AP,[nt.accent]:sr,[nt.darkest]:FP,[nt.dark]:UP,[nt.base]:PP,[nt.light]:DP,[nt.lighter]:LP,[nt.lightest]:$P,[oU.primary]:`linear-gradient(90deg, ${nt.base} 0%, ${nt.dark} 100%)`,[M.brand.focus.primary]:Vt.focusOutline,[M.brand.border.primary]:Vt.focusOutline,[M.brand.accent.primary]:nt.base,[M.brand.accent.action]:nt.base,[M.brand.accent.critical]:It.base,[M.brand.accent.caution]:Tt.base,[M.brand.accent.positive]:Gt.base,[M.brand.fg.primary.default]:nt.base,[M.brand.fg.primary.strong]:nt.dark,[M.brand.fg.critical.default]:It.base,[M.brand.fg.critical.strong]:It.dark,[M.brand.fg.caution.default]:Tt.darkest,[M.brand.fg.caution.strong]:Tt.darkest,[M.brand.fg.positive.default]:Gt.base,[M.brand.fg.positive.strong]:Gt.dark,[M.brand.fg.selected]:nt.dark,[M.brand.focus.critical]:It.dark,[M.brand.border.critical]:It.base,...M.brand.focus.caution?{[M.brand.focus.caution.inner]:Vt.alertInner,[M.brand.focus.caution.outer]:Tt.dark}:{},[M.brand.border.caution]:Tt.dark,[M.brand.surface.primary.default]:nt.lightest,[M.brand.surface.primary.strong]:nt.lighter,[M.brand.surface.critical.default]:It.lightest,[M.brand.surface.critical.strong]:It.lighter,[M.brand.surface.caution.default]:Tt.lightest,[M.brand.surface.caution.strong]:Tt.lighter,[M.brand.surface.positive.default]:Gt.lightest,[M.brand.surface.positive.strong]:Gt.lighter,[M.brand.surface.selected]:nt.lighter}),MQ=(e,t)=>{const n=rQ(e),a=(t.className||"").split(" ").concat(DQ).join(" "),r=t.style||{},{palette:i}=n.canvas;return["common","primary","error","alert","success","neutral"].forEach(o=>{o==="common"?["focusOutline","alertInner","alertOuter","errorInner"].forEach(s=>{if(i.common[s]!==Gn.palette.common[s]){const l=zv(i.common[s]);r[Vt[s]]=l,r[LQ[s]]=l,s==="focusOutline"&&(r[M.brand.focus.primary]=l,r[M.brand.border.primary]=l),s==="alertInner"&&(r[M.brand.focus.caution.inner]=l),s==="alertOuter"&&(r[M.brand.border.caution]=l),s==="errorInner"&&(r[M.brand.focus.critical]=l,r[M.brand.border.critical]=l)}}):["lightest","lighter","light","main","dark","darkest","contrast"].forEach(s=>{var l,u,c,d,p;if(i[o][s]!==Gn.palette[o][s]){const g=zv(i[o][s]);if(r[VA[o][OQ[s]]]=g,s!=="contrast"&&s in rN){const b=$Q[o],v=rN[s],I=VA[b+v];if(I&&(r[I]=g),s==="main"){const h=M.brand.accent[b];h&&(r[h]=g);const f=(l=M.brand.fg[b])==null?void 0:l.default;if(f&&(r[f]=g),b==="primary"&&!(i.common.focusOutline!==Gn.palette.common.focusOutline)){const y=M.brand.focus.primary;r[y]=g}}else if(s==="dark"){const h=(u=M.brand.fg[b])==null?void 0:u.strong;if(h&&(r[h]=g),b==="primary"){const f=M.brand.fg.selected;r[f]=g}if(b==="critical"){const f=M.brand.focus.critical;r[f]=g;const m=M.brand.border.critical;r[m]=g}if(b==="caution"){const f=(c=M.brand.focus.caution)==null?void 0:c.outer;r[f]=g;const m=M.brand.border.caution;r[m]=g}}else if(s==="lighter"){const h=(d=M.brand.surface[b])==null?void 0:d.strong;if(h&&(r[h]=g),b==="primary"){const f=M.brand.surface.selected;r[f]=g}}else if(s==="lightest"){const h=(p=M.brand.surface[b])==null?void 0:p.default;h&&(r[h]=g)}}}})}),{...t,className:a,style:r}},Nb=e=>e===void 0?"":typeof e=="string"?e:e.id||"",Cb=e=>typeof e=="string"?e:e===void 0?"":e.text||"",PQ={items:[]},Yl=Wr({defaultConfig:{...PQ,id:"",getId:Nb,getTextValue:Cb,nonInteractiveIds:[],orientation:"vertical",defaultItemHeight:50,shouldVirtualize:!0}})(e=>{var h;const t=Bd(e.id),n=F.useRef(Nb),a=F.useRef(Cb);n.current=e.getId||Nb,a.current=e.getTextValue||e.getId||Cb;const[r]=F.useState(e.orientation||"vertical"),[i,o]=F.useState(e.defaultItemHeight),s=e.shouldVirtualize&&!!((h=e.items)!=null&&h.length),l=F.useRef(0),u=F.useRef(null),c=F.useMemo(()=>(e.items||[]).map((f,m)=>({id:n.current(f),index:m,value:f,textValue:a.current(f)})),[e.items]),[d,p]=F.useState([]),g=qY({count:c.length,getScrollElement:()=>u.current,estimateSize:F.useCallback(()=>i,[i]),horizontal:e.orientation==="horizontal",overscan:3});return{state:{...{items:c.length?c:d},UNSTABLE_virtual:g,UNSTABLE_defaultItemHeight:i,containerRef:u,id:t,orientation:r,indexRef:l,nonInteractiveIds:e.nonInteractiveIds||[],isVirtualized:s},events:{registerItem(f){l.current++,p(m=>m.concat({...f,value:f,index:m.length}))},unregisterItem(f){p(m=>m.find(y=>y.id===f.id)?m.filter(y=>y.id!==f.id):m)},updateItemHeight(f){o(f.value)}},getId:e.getId,getTextValue:e.getTextValue}}),UQ=e=>e,Hd=()=>0,Vd=(e,{state:t})=>t.items.length-1,FQ=(e,{state:t})=>{if(t.columnCount){const n=e%t.columnCount;return e-n}return Hd()},zQ=(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 Vd(e,{state:t})},jQ=(e,{state:t})=>t.columnCount?e%t.columnCount:Hd(),BQ=(e,{state:t})=>t.columnCount?t.items.length-t.columnCount+e%t.columnCount:Vd(e,{state:t}),qQ=(e,{state:t})=>t.items.find(n=>n.id===e),GQ=e=>typeof e.cursorId=="string"?e.cursorId:e.cursorId.slice(-1)[0]||"",ic=(e,t)=>e.cursorId&&typeof e.cursorId=="string"?e.cursorId===t:e.cursorId.includes(t),yo=e=>(t,{state:n},a=n.items.length)=>{if(Number.isNaN(t)){if(e===1)return Hd();if(e===-1)return Vd(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?yo(e)(i,{state:n},a-1):i},HQ=UQ({getFirst:Hd,getLast:Vd,getItem:qQ,getNext:yo(1),getNextRow:(e,{state:t})=>yo(t.columnCount)(e,{state:t}),getPrevious:yo(-1),getPreviousRow:(e,{state:t})=>yo(-t.columnCount)(e,{state:t}),getPreviousPage:jQ,getNextPage:BQ,getFirstOfRow:FQ,getLastOfRow:zQ}),Kl=Wr({defaultConfig:{...Yl.defaultConfig,initialCursorId:"",columnCount:0,navigation:HQ,pageSize:0},requiredConfig:Yl.requiredConfig,contextOverride:Yl.Context})(e=>{var d;const[t,n]=F.useState(e.initialCursorId),a=F.useRef(e.pageSize),r=e.columnCount||0,i=Yl(e),o=e.navigation,s=F.useRef(-1),l=p=>{var b;const g=((b=u.items[p])==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(p=>p.id===t):t||(s.current=-1);const u={...i.state,cursorId:t,columnCount:r,pageSizeRef:a,cursorIndexRef:s},c={...i.events,goTo(p){const g=u.items.findIndex(b=>b.id===p.id);l(g)},goToNext(){const p=o.getNext(s.current,{state:u});l(p)},goToPrevious(){const p=o.getPrevious(s.current,{state:u});l(p)},goToPreviousRow(){const p=o.getPreviousRow(s.current,{state:u});l(p)},goToNextRow(){const p=o.getNextRow(s.current,{state:u});l(p)},goToFirst(){const p=o.getFirst(s.current,{state:u});l(p)},goToLast(){const p=o.getLast(s.current,{state:u});l(p)},goToFirstOfRow(){const p=o.getFirstOfRow(s.current,{state:u});l(p)},goToLastOfRow(){const p=o.getLastOfRow(s.current,{state:u});l(p)},goToNextPage(){const p=o.getNextPage(s.current,{state:u});l(p)},goToPreviousPage(){const p=o.getPreviousPage(s.current,{state:u});l(p)}};return{...i,state:u,events:c,navigation:o}}),VQ=(e,{selectedIds:t,unselectedIds:n})=>t==="all"?!n.includes(e):t.includes(e),wU={select(e){return{selectedIds:[e],unselectedIds:[]}}},WQ={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:[]}}},Ob=Wr({defaultConfig:{...Kl.defaultConfig,initialSelectedIds:[],initialUnselectedIds:[],selection:wU},requiredConfig:Kl.requiredConfig,contextOverride:Kl.Context})(e=>{const t=Kl(e),[n,a]=F.useState(e.initialSelectedIds),[r,i]=F.useState(e.initialUnselectedIds),o=e.selection,s={...t.state,selectedIds:n,unselectedIds:r},l={...t.events,select(u){const{selectedIds:c,unselectedIds:d}=o.select(u.id,s);a(c),i(d)},selectAll(){a("all")},unselectAll(){a([])},setSelectedIds(u){a(u)},remove(u){}};return{...t,state:s,events:l,selection:o}}),Za=Wr({defaultConfig:{UNSTABLE_parentModel:void 0,...Ob.defaultConfig},requiredConfig:Ob.requiredConfig})(e=>({UNSTABLE_parentModel:e.UNSTABLE_parentModel,...Ob(e)})),gu=F.createContext({});function ZQ(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 S.jsx(gu.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 S.jsx(gu.Provider,{value:{item:a},children:r},a.id||a.index)}):S.jsx(gu.Provider,{value:{},children:t})}const Wd=De()((e,t,n={})=>{const{state:a,events:r}=e,{item:i,virtual:o}=F.useContext(gu),[s,l]=F.useState(n["data-id"]||(i==null?void 0:i.id)||""),{localRef:u,elementRef:c}=Gd(Wi(t,o?e.state.UNSTABLE_virtual.measureElement:null)),d=o?{position:"absolute",top:0,left:0,transform:`translateY(${o.start}px)`}:{};return SQ(()=>{var v;if((o==null?void 0:o.index)===0&&((v=u.current)!=null&&v.clientHeight),i)return;const p=a.indexRef.current,g=s||(n["data-has-children"]?`${a.id}-`:"")+String(p);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:c,"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:bU(`${a.id}-${s}`)}}),Bv={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"}},YQ={ArrowLeft:"ArrowRight",Left:"Right",ArrowRight:"ArrowLeft",Right:"Left",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",Home:"Home",End:"End",PageDown:"PageDown",PageUp:"PageUp"},aN={...Bv.horizontal,Home:"goToFirstOfRow",End:"goToLastOfRow",ArrowUp:"goToPreviousRow",Up:"goToPreviousRow",ArrowDown:"goToNextRow",Down:"goToNextRow"},$b={Home:"goToFirst",End:"goToLast"},iN=(e,t)=>e.hasOwnProperty(t);function KQ(e,t){var r,i,o,s;if(e.ctrlKey){for(const l in $b)if(iN($b,l)&&e.key===l)return(i=(r=t.events)[$b[l]])==null||i.call(r),!0}const n=t.state.columnCount>0?aN:Bv[t.state.orientation],a=pU(e.currentTarget);for(const l in n)if(iN(n,l)&&(a?e.key===YQ[l]:e.key===l)){const u=t.state.columnCount>0?aN[l]:Bv[t.state.orientation][l];if(t.events[u])return(s=(o=t.events)[u])==null||s.call(o),!0}return!1}const kU=(e,t,n)=>{e()===!1&&t>1&&requestAnimationFrame(()=>kU(e,t-1)),n==null||n("Retry timeout")},XQ=(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=u=>document.querySelector(`[data-focus-id="${dU(`${u}-${o.id}`)}"]`);kU(()=>{const u=l(i)||l(e.state.id);return u&&(u.focus(),a(u)),!!u},5,r)}}),IU=De()((e,t,n={})=>{const a=F.useRef(e.state);a.current=e.state;const r=F.useRef(null);return F.useEffect(()=>{r.current&&XQ(e,GQ(e.state),r.current).then(()=>{r.current=null})},[e.state.cursorId]),F.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){KQ(i,e)&&(i.preventDefault(),r.current=i.currentTarget)},onClick(){e.events.goTo({id:n["data-id"]})},"data-focus-id":bU(`${e.state.id}-${n["data-id"]}`),tabIndex:e.state.cursorId?n["data-id"]&&ic(e.state,n["data-id"])?0:-1:0}}),JQ=De()(({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})}}}),QQ=De()((e,t,n={})=>{const a=n["data-id"]||"";return{className:ic(e.state,a)?"focus":""}}),eee=e=>aQ[e]||Vn(e),tee=e=>iQ[e],nee=e=>oQ[e]||Vn(e),ree=e=>sQ[e]||Vn(e),aee=e=>sw.properties.fontFamilies[e]||Vn(e),iee=e=>sw.properties.fontSizes[e]||Vn(e),oee=e=>sw.properties.fontWeights[e]||Vn(e);function mt(e){return e.reduce((t={},n)=>{const a=r=>n.properties.reduce((i={},o)=>{if(n.system==="color")return{...i,[o]:eee(r)};if(n.system==="depth"){const s=tee(r);return{...i,...s}}return n.system==="font"?{...i,[o]:aee(r)}:n.system==="fontSize"?{...i,[o]:iee(r)}:n.system==="fontWeight"?{...i,[o]:oee(r)}:n.system==="shape"?{...i,[o]:nee(r)}:n.system==="space"?{...i,[o]:ree(r)}:{...i,[o]:r}},{});return{...t,[n.name]:a}},{})}function an(e){return t=>{let n={};for(const a in t)if(a in t&&a in e){const r=e[a],i=t[a],o=r(i);n={...n,...o};continue}return n}}const TU=[{name:"background",properties:["background"],system:"color"},{name:"backgroundAttachment",properties:["backgroundAttachment"],system:"none"},{name:"backgroundColor",properties:["backgroundColor"],system:"color"},{name:"backgroundImage",properties:["backgroundImage"],system:"none"},{name:"backgroundPosition",properties:["backgroundPosition"],system:"none"},{name:"backgroundRepeat",properties:["backgroundRepeat"],system:"none"},{name:"backgroundSize",properties:["backgroundSize"],system:"none"}],see=mt(TU),lee=an(see),xU=[{name:"borderColor",properties:["borderColor"],system:"color"},{name:"borderTopColor",properties:["borderTopColor"],system:"color"},{name:"borderRightColor",properties:["borderRightColor"],system:"color"},{name:"borderBottomColor",properties:["borderBottomColor"],system:"color"},{name:"borderLeftColor",properties:["borderLeftColor"],system:"color"},{name:"borderInlineStartColor",properties:["borderInlineStartColor"],system:"color"},{name:"borderInlineEndColor",properties:["borderInlineEndColor"],system:"color"}],uee=mt(xU),RU=[{name:"borderCollapse",properties:["borderCollapse"],system:"none"},{name:"borderSpacing",properties:["borderSpacing"],system:"none"},{name:"borderStyle",properties:["borderStyle"],system:"none"},{name:"borderTopStyle",properties:["borderTopStyle"],system:"none"},{name:"borderRightStyle",properties:["borderRightStyle"],system:"none"},{name:"borderBottomStyle",properties:["borderBottomStyle"],system:"none"},{name:"borderLeftStyle",properties:["borderLeftStyle"],system:"none"},{name:"borderInlineStartStyle",properties:["borderInlineStartStyle"],system:"none"},{name:"borderInlineEndStyle",properties:["borderInlineEndStyle"],system:"none"}],cee=mt(RU),AU=[{name:"borderRadius",properties:["borderRadius"],system:"shape"},{name:"borderTopLeftRadius",properties:["borderTopLeftRadius"],system:"shape"},{name:"borderTopRightRadius",properties:["borderTopRightRadius"],system:"shape"},{name:"borderBottomLeftRadius",properties:["borderBottomLeftRadius"],system:"shape"},{name:"borderBottomRightRadius",properties:["borderBottomRightRadius"],system:"shape"}],dee=mt(AU),NU=[{name:"border",properties:["border"],system:"none"},{name:"borderTop",properties:["borderTop"],system:"none"},{name:"borderRight",properties:["borderRight"],system:"none"},{name:"borderBottom",properties:["borderBottom"],system:"none"},{name:"borderLeft",properties:["borderLeft"],system:"none"},{name:"borderInlineStart",properties:["borderInlineStart"],system:"none"},{name:"borderInlineEnd",properties:["borderInlineEnd"],system:"none"}],pee=mt(NU),CU=[{name:"borderWidth",properties:["borderWidth"],system:"none"},{name:"borderTopWidth",properties:["borderTopWidth"],system:"none"},{name:"borderRightWidth",properties:["borderRightWidth"],system:"none"},{name:"borderBottomWidth",properties:["borderBottomWidth"],system:"none"},{name:"borderLeftWidth",properties:["borderLeftWidth"],system:"none"},{name:"borderInlineStartWidth",properties:["borderInlineStartWidth"],system:"none"},{name:"borderInlineEndWidth",properties:["borderInlineEndWidth"],system:"none"}],fee=mt(CU),mee=an({...uee,...cee,...dee,...pee,...fee}),gee=[...xU,...RU,...AU,...NU,...CU],OU=[{name:"backgroundColor",properties:["backgroundColor"],system:"color"},{name:"color",properties:["color"],system:"color"},{name:"opacity",properties:["opacity"],system:"none"}],hee=mt(OU),bee=an(hee),$U=[{name:"boxShadow",properties:["boxShadow"],system:"none"},{name:"depth",properties:["boxShadow"],system:"depth"}],vee=mt($U),yee=an(vee),LU=[{name:"flex",properties:["flex"],system:"none"},{name:"flexGrow",properties:["flexGrow"],system:"none"},{name:"flexShrink",properties:["flexShrink"],system:"none"},{name:"flexBasis",properties:["flexBasis"],system:"none"},{name:"justifySelf",properties:["justifySelf"],system:"none"},{name:"alignSelf",properties:["alignSelf"],system:"none"},{name:"order",properties:["order"],system:"none"}],See=mt(LU),Eee=an(See),DU=[{name:"gridColumnStart",properties:["gridColumnStart"],system:"none"},{name:"gridColumnEnd",properties:["gridColumnEnd"],system:"none"},{name:"gridRowStart",properties:["gridRowStart"],system:"none"},{name:"gridRowEnd",properties:["gridRowEnd"],system:"none"},{name:"gridColumn",properties:["gridColumn"],system:"none"},{name:"gridRow",properties:["gridRow"],system:"none"},{name:"gridArea",properties:["gridArea"],system:"none"},{name:"justifySelf",properties:["justifySelf"],system:"none"},{name:"alignSelf",properties:["alignSelf"],system:"none"},{name:"placeSelf",properties:["placeSelf"],system:"none"}],_ee=mt(DU),wee=an(_ee),MU=[{name:"display",properties:["display"],system:"none"},{name:"height",properties:["height"],system:"space"},{name:"listStyle",properties:["listStyle"],system:"none"},{name:"maxHeight",properties:["maxHeight"],system:"space"},{name:"maxWidth",properties:["maxWidth"],system:"space"},{name:"minHeight",properties:["minHeight"],system:"space"},{name:"minWidth",properties:["minWidth"],system:"space"},{name:"overflow",properties:["overflow"],system:"none"},{name:"overflowX",properties:["overflowX"],system:"none"},{name:"overflowY",properties:["overflowY"],system:"none"},{name:"verticalAlign",properties:["verticalAlign"],system:"none"},{name:"width",properties:["width"],system:"space"}],kee=mt(MU),Iee=an(kee),PU=[{name:"animation",properties:["animation"],system:"none"},{name:"appearance",properties:["appearance"],system:"none"},{name:"boxSizing",properties:["boxSizing"],system:"none"},{name:"content",properties:["content"],system:"none"},{name:"cursor",properties:["cursor"],system:"none"},{name:"fill",properties:["fill"],system:"none"},{name:"float",properties:["float"],system:"none"},{name:"objectFit",properties:["objectFit"],system:"none"},{name:"objectPosition",properties:["objectPosition"],system:"none"},{name:"outline",properties:["outline"],system:"none"},{name:"outlineOffset",properties:["outlineOffset"],system:"none"},{name:"overflowWrap",properties:["overflowWrap"],system:"none"},{name:"pointerEvents",properties:["pointerEvents"],system:"none"},{name:"resize",properties:["resize"],system:"none"},{name:"stroke",properties:["stroke"],system:"none"},{name:"transform",properties:["transform"],system:"none"},{name:"transition",properties:["transition"],system:"none"},{name:"userSelect",properties:["userSelect"],system:"none"},{name:"visibility",properties:["visibility"],system:"none"}],Tee=mt(PU),xee=an(Tee),UU=[{name:"position",properties:["position"],system:"none"},{name:"zIndex",properties:["zIndex"],system:"none"},{name:"top",properties:["top"],system:"none"},{name:"right",properties:["right"],system:"none"},{name:"bottom",properties:["bottom"],system:"none"},{name:"left",properties:["left"],system:"none"},{name:"inset",properties:["inset"],system:"none"},{name:"insetInlineStart",properties:["insetInlineStart"],system:"none"},{name:"insetInlineEnd",properties:["insetInlineEnd"],system:"none"}],Ree=mt(UU),Aee=an(Ree),FU=[{name:"marginInlineStart",properties:["marginInlineStart"],system:"space"},{name:"marginInlineEnd",properties:["marginInlineEnd"],system:"space"},{name:"paddingInlineStart",properties:["paddingInlineStart"],system:"space"},{name:"paddingInlineEnd",properties:["paddingInlineEnd"],system:"space"},{name:"margin",properties:["margin"],system:"space"},{name:"marginX",properties:["marginInline"],system:"space"},{name:"marginY",properties:["marginBlock"],system:"space"},{name:"marginTop",properties:["marginTop"],system:"space"},{name:"marginRight",properties:["marginRight"],system:"space"},{name:"marginBottom",properties:["marginBottom"],system:"space"},{name:"marginLeft",properties:["marginLeft"],system:"space"},{name:"padding",properties:["padding"],system:"space"},{name:"paddingX",properties:["paddingInline"],system:"space"},{name:"paddingY",properties:["paddingBlock"],system:"space"},{name:"paddingTop",properties:["paddingTop"],system:"space"},{name:"paddingRight",properties:["paddingRight"],system:"space"},{name:"paddingBottom",properties:["paddingBottom"],system:"space"},{name:"paddingLeft",properties:["paddingLeft"],system:"space"}],Nee=mt(FU),Cee=an(Nee),zU=[{name:"fontFamily",properties:["fontFamily"],system:"font"},{name:"fontSize",properties:["fontSize"],system:"fontSize"},{name:"fontStyle",properties:["fontStyle"],system:"none"},{name:"fontWeight",properties:["fontWeight"],system:"fontWeight"},{name:"lineHeight",properties:["lineHeight"],system:"none"},{name:"letterSpacing",properties:["letterSpacing"],system:"none"},{name:"textAlign",properties:["textAlign"],system:"none"},{name:"textDecoration",properties:["textDecoration"],system:"none"},{name:"textOverflow",properties:["textOverflow"],system:"none"},{name:"textTransform",properties:["textTransform"],system:"none"},{name:"textShadow",properties:["textShadow"],system:"none"},{name:"whiteSpace",properties:["whiteSpace"],system:"none"},{name:"wordBreak",properties:["wordBreak"],system:"none"}],Oee=mt(zU),$ee=an(Oee),Lee=["display","color","height","overflow","width","border","background","fontSize","fontWeight","fontFamily","letterSpacing","lineHeight","textAlign","opacity","textDecoration","textOverflow","textTransform","textShadow","whiteSpace","wordBreak"],Dee=e=>bP(e)&&!Lee.includes(e),uw=e=>[{boxSizing:"border-box"},lee,mee,bee,yee,Eee,wee,Iee,xee,Aee,Cee,$ee].reduce((t,n)=>{const a=typeof n=="function"?n(e):n;for(const r in a)t[r]=a[r];return t},{}),Mee=ec("div",{shouldForwardProp:Dee})(uw),Pee=ec("div")(uw),Uee=je("div")({displayName:"Box",Component:({children:e,...t},n,a)=>{const r=mU(()=>typeof a=="string"?Mee:Pee);return S.jsx(r,{as:a,ref:n,...Jn(t),children:e})}}),jU=[{name:"alignContent",properties:["alignContent"],system:"none"},{name:"alignItems",properties:["alignItems"],system:"none"},{name:"display",properties:["display"],system:"none"},{name:"flexDirection",properties:["flexDirection"],system:"none"},{name:"flexWrap",properties:["flexWrap"],system:"none"},{name:"justifyContent",properties:["justifyContent"],system:"none"},{name:"justifyItems",properties:["justifyItems"],system:"none"},{name:"gap",properties:["gap"],system:"space"},{name:"columnGap",properties:["columnGap"],system:"space"},{name:"rowGap",properties:["rowGap"],system:"space"}],Fee=mt(jU),zee=an(Fee),BU=[{name:"gridGap",properties:["gridGap"],system:"space"},{name:"gridRowGap",properties:["gridRowGap"],system:"space"},{name:"gridColumnGap",properties:["gridColumnGap"],system:"space"},{name:"alignContent",properties:["alignContent"],system:"none"},{name:"alignItems",properties:["alignItems"],system:"none"},{name:"display",properties:["display"],system:"none"},{name:"justifyContent",properties:["justifyContent"],system:"none"},{name:"justifyItems",properties:["justifyItems"],system:"none"},{name:"gridTemplateAreas",properties:["gridTemplateAreas"],system:"none"},{name:"gridTemplate",properties:["gridTemplate"],system:"none"},{name:"gridTemplateColumns",properties:["gridTemplateColumns"],system:"none"},{name:"gridTemplateRows",properties:["gridTemplateRows"],system:"none"},{name:"gridPlaceItems",properties:["gridPlaceItems"],system:"none"},{name:"gridAutoColumns",properties:["gridAutoColumns"],system:"none"},{name:"gridAutoRows",properties:["gridAutoRows"],system:"none"},{name:"gridAutoFlow",properties:["gridAutoFlow"],system:"none"},{name:"gridArea",properties:["gridArea"],system:"none"},{name:"grid",properties:["grid"],system:"none"}],jee=mt(BU),Bee=an(jee),qee=[...TU,...gee,...OU,...$U,...jU,...LU,...BU,...DU,...MU,...PU,...UU,...FU,...zU].reduce((e,t)=>(e[t.name]=!0,e),{});function Gee(e){return qee[e]||!1}function gt(e,t){const n={};let a=!1;const r=Object.keys(e).reduce((o,s)=>(Gee(s)?(a=!0,n[s]=e[s]):o[s]=e[s],o),{});let i={};return a&&(i={...uw(n),...zee(n),...Bee(n)}),Jn(r,[t,i])}const Hee=rn("li")({displayName:"Item",modelHook:Za,elemPropsHook:Wd})((e,t)=>S.jsx(t,{...gt(e)})),Vee=De()(e=>({style:{position:"relative",height:e.state.isVirtualized?e.state.UNSTABLE_virtual.getTotalSize():void 0}})),oN=Ke({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"}}}}}),Wee=qd("ul")({displayName:"ListBox",modelHook:Za,elemPropsHook:Vee,subComponents:{Item:Hee}})(({height:e,maxHeight:t,marginY:n,marginBottom:a,overflowY:r,marginTop:i,...o},s,l)=>S.jsx("div",{ref:l.state.containerRef,...oN.parts.listBoxContainer,...Jn({style:{height:e,maxHeight:t,marginBottom:a??n,marginTop:i??n}},oN({orientation:l.state.orientation})),children:S.jsx(s,{...gt(o),"data-part":"list",children:ZQ(l,o.children)})})),wa=Ke({base:{},modifiers:{typeLevel:{"title.large":{fontFamily:st.default,fontWeight:rt.bold,fontSize:A.fontSize.title.lg,lineHeight:A.lineHeight.title.lg,color:M.fg.strong},"title.medium":{fontFamily:st.default,fontWeight:rt.bold,fontSize:A.fontSize.title.md,lineHeight:A.lineHeight.title.md,color:M.fg.strong},"title.small":{fontFamily:st.default,fontWeight:rt.bold,lineHeight:A.lineHeight.title.sm,fontSize:A.fontSize.title.sm,color:M.fg.strong},"heading.large":{fontFamily:st.default,fontWeight:rt.bold,fontSize:A.fontSize.heading.lg,lineHeight:A.lineHeight.heading.lg,color:M.fg.strong},"heading.medium":{fontFamily:st.default,fontWeight:rt.bold,fontSize:A.fontSize.heading.md,lineHeight:A.lineHeight.heading.md,color:M.fg.strong},"heading.small":{fontFamily:st.default,fontWeight:rt.bold,fontSize:A.fontSize.heading.sm,lineHeight:A.lineHeight.heading.sm,color:M.fg.strong},"body.large":{fontFamily:st.default,fontWeight:rt.normal,fontSize:A.fontSize.body.lg,lineHeight:A.lineHeight.body.lg,color:M.fg.default},"body.medium":{fontFamily:st.default,fontWeight:rt.normal,fontSize:A.fontSize.body.md,lineHeight:A.lineHeight.body.md,color:M.fg.default},"body.small":{fontFamily:st.default,fontWeight:rt.normal,fontSize:A.fontSize.body.sm,lineHeight:A.lineHeight.body.sm,letterSpacing:A.letterSpacing.body.sm,color:M.fg.default},"subtext.large":{fontFamily:st.default,fontWeight:rt.normal,fontSize:A.fontSize.subtext.lg,lineHeight:A.lineHeight.subtext.lg,letterSpacing:A.letterSpacing.subtext.lg,color:M.fg.default},"subtext.medium":{fontFamily:st.default,fontWeight:rt.normal,fontSize:A.fontSize.subtext.md,lineHeight:A.lineHeight.subtext.md,letterSpacing:A.letterSpacing.subtext.md,color:M.fg.default},"subtext.small":{fontFamily:st.default,fontWeight:rt.normal,fontSize:A.fontSize.subtext.sm,lineHeight:A.lineHeight.subtext.sm,letterSpacing:A.letterSpacing.subtext.sm,color:M.fg.default}},variant:{error:{color:A.color.brand.fg.critical.default},hint:{color:M.fg.muted.default},inverse:{color:M.fg.inverse}}}});je("span")({displayName:"Text",Component:({children:e,typeLevel:t,variant:n,...a},r,i)=>S.jsx(i,{ref:r,...gt(a,wa({typeLevel:t,variant:n})),children:e})});const Zee=Ke({extends:wa,base:{}});je("p")({displayName:"Subtext",Component:({size:e,variant:t,...n},a,r)=>{const i=`subtext.${e}`;return S.jsx(r,{ref:a,...gt(n,Zee({typeLevel:i,variant:t}))})}});const Yee=Ke({extends:wa,base:{}}),Yi=je("p")({displayName:"BodyText",Component:({size:e,variant:t,...n},a,r)=>{const i=`body.${e}`;return S.jsx(r,{ref:a,...gt(n,Yee({typeLevel:i,variant:t}))})}}),Kee=Ke({extends:wa,base:{}});je("h2")({displayName:"Heading",Component:({size:e,variant:t,...n},a,r)=>{const i=`heading.${e}`;return S.jsx(r,{ref:a,...gt(n,Kee({typeLevel:i,variant:t}))})}});const Xee=Ke({extends:wa,base:{}});je("h1")({displayName:"Title",Component:({size:e,variant:t,...n},a,r)=>{const i=`title.${e}`;return S.jsx(r,{ref:a,...gt(n,Xee({typeLevel:i,variant:t}))})}});const Jee=Ke({extends:wa,base:{},defaultModifiers:{typeLevel:"subtext.large"}}),Qee=je("div")({displayName:"Card.Body",Component:({children:e,...t},n,a)=>S.jsx(a,{ref:n,...gt(t,Jee()),children:e})}),ete=Ke({extends:wa,base:{color:M.fg.strong,fontWeight:rt.bold,marginBlock:A.padding.none},defaultModifiers:{typeLevel:"body.large"}}),tte=je("h3")({displayName:"Card.Heading",Component:({children:e,...t},n,a)=>S.jsx(a,{ref:n,...gt(t,ete()),children:e})}),nte=Ke({base:{display:"flex",flexDirection:"column",gap:A.gap.lg,padding:A.padding.xl,backgroundColor:A.color.surface.default,borderRadius:A.shape.xxl,border:`${Ve(1)} solid ${A.color.border.default}`},modifiers:{variant:{borderless:{borderColor:"transparent"},tonal:{backgroundColor:A.color.surface.alt.default,borderColor:M.border.transparent}}}}),rte=je("div")({displayName:"Card",Component:({children:e,variant:t,...n},a,r)=>S.jsx(r,{ref:a,...gt(n,nte({variant:t})),children:e}),subComponents:{Heading:tte,Body:Qee}});function ate(e){return e.length?e[e.length-1]:null}function qU(e,t){const{min:n,max:a}=cw.zIndex;return t<=a-n?e+n:Math.max(n,a-(t-e)+1)}function Lb(e){const t=e.length;e.forEach((n,a)=>{n.style.zIndex=String(qU(a,t))})}function ite(e,t){let n=e;do{const a=t.find(r=>r.element===n);if(a)return a.element}while(n=n.parentElement)}function ote(e,t){return t.filter(a=>a.owner).map(a=>({element:a.element,parent:ite(a.owner,t)})).filter(a=>a.parent===e.element)}function GU(e,t){const n=t.split("."),a=n.splice(0,1)[0];return n.length&&e[a]?GU(e[a],n.join(".")):e[a]}function HU(e,t,n){const a=t.split("."),r=a.splice(0,1)[0];return a.length?(e[r]===void 0&&(e[r]={}),HU(e[r],a.join("."),n)):e[r]=n,n}typeof window<"u"&&(window.workday=window.workday||{});const VU=e=>{if(typeof window<"u")return GU(window,e)},WU=(e,t)=>{typeof window<"u"&&HU(window,e,t)},sN=(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},cw=VU("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:qU},_adapter:{}};WU("workday.__popupStack",cw);const rr=VU("workday.__popupStackOfStacks")||[cw];rr.description="Global stack of popup stacks from @workday/canvas-kit/popup-stack";WU("workday.__popupStackOfStacks",rr);function Qn(){return rr[rr.length-1]}const St={createContainer(){var n;const e=Qn();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=Qn();if((n=t._adapter)!=null&&n.add){t._adapter.add(e);return}t.items.push(e),sN(t,e.owner).appendChild(e.element),Lb(St.getElements())},remove(e){var n;const t=rr.find(a=>!!St.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),sN(t,a==null?void 0:a.owner).removeChild(e),Lb(St.getElements(t))}},isTopmost(e){var a;const t=Qn();if((a=t._adapter)!=null&&a.isTopmost)return t._adapter.isTopmost(e);const n=ate(t.items);return n?n.element===e:!1},getElements(e){var n;const t=e||Qn();return(n=t._adapter)!=null&&n.getElements?t._adapter.getElements():t.items.map(a=>a.element)},bringToTop(e){var a;const t=Qn();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],ote(n,t.items).forEach(r=>{St.bringToTop(r.element)}),Lb(St.getElements());else{const r=new Error;console.warn("Could not find item",r.stack)}},contains(e,t){var i;const n=Qn();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 c;if(l>30)return!1;if(o.element===s||o.owner===s||o.element.contains(s)||(c=o.owner)!=null&&c.contains(s))return!0;const u=n.items.find(d=>d.owner&&o.element.contains(d.owner));return u?r(u,s,l+1):!1}},pushStackContext(e){var a,r;const t=Qn();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:{}};rr.push(n)},popStackContext(e){var n,a;const t=Qn();if((n=t._adapter)!=null&&n.popStackContext)return t._adapter.popStackContext(e);((a=t.container)==null?void 0:a.call(t))===e&&rr.length>1&&rr.pop()},transferToCurrentContext(e){var a;const t=Qn();if((a=t._adapter)!=null&&a.transferToCurrentContext)return t._adapter.transferToCurrentContext(e);if(t.items.find(r=>r.element===e.element))return;rr.find(r=>!!r.items.find(i=>i.element===e.element))&&St.remove(e.element),St.add(e)}};let Xl=null;nr.isEnabled&&nr.on("change",()=>{nr.isFullscreen?nr.element&&(Xl=nr.element,St.pushStackContext(Xl)):Xl&&St.popStackContext(Xl)});const Db=Wr({defaultConfig:{id:"",initialVisibility:"hidden"}})(e=>{const t=Bd(e.id),[n,a]=F.useState(e.initialVisibility||"hidden");return{state:{id:t,visibility:n},events:{show(o){a("visible")},hide(o){a("hidden")}}}}),lN=()=>{},ea=Wr({defaultContext:{state:{},events:{show:lN,hide:lN}},defaultConfig:{...Db.defaultConfig,returnFocusRef:void 0,initialFocusRef:void 0},requiredConfig:Db.requiredConfig})(e=>{const t=X.useRef(null),n=X.useRef(null),[a,r]=X.useState("bottom"),i=Db(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}});ea.Context;const ZU=De()(e=>{const t=F.useCallback(a=>{e.state.stackRef.current&&document.contains(a.target)&&!St.contains(e.state.stackRef.current,a.target)&&e.events.hide(a)},[e.events,e.state.stackRef]),n=e.state.visibility!=="hidden";return F.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]),{}}),YU=De()(e=>{const t=F.useCallback(a=>{(a.key==="Esc"||a.key==="Escape")&&St.isTopmost(e.state.stackRef.current)&&e.events.hide(a)},[e.state.stackRef,e.events]),n=e.state.visibility!=="hidden";return F.useLayoutEffect(()=>{if(n)return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[t,n]),{}}),ste=De()(e=>{const t=F.useCallback(a=>{nr.isFullscreen||e.events.hide(a)},[e.events]),n=e.state.visibility!=="hidden";return F.useEffect(()=>{if(n&&nr.isEnabled)return nr.on("change",t),()=>{nr.off("change",t)}},[t,n]),{}});function KU(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:KU(e.parentElement)}const lte=De()(e=>{const t=e.state.visibility!=="hidden",n=F.useCallback(a=>{a[0].intersectionRatio<.5&&e.events.hide()},[e.events]);return F.useLayoutEffect(()=>{if(!t||!e.state.targetRef.current)return;const a=e.state.targetRef.current,r=KU(a),i=new IntersectionObserver(n,{root:r,threshold:.5});return i.observe(e.state.targetRef.current),()=>{i.disconnect()}},[n,e.state.targetRef,t]),{}}),ute=De()(e=>{const t=F.useCallback(a=>{if(e.state.stackRef.current&&a.key==="Tab"){const r=AQ(e.state.stackRef.current),i=NQ(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 F.useLayoutEffect(()=>{if(n)return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[n,t]),{}}),cte=De()(({state:e,events:t},n)=>{const a=Wi(n,e.stackRef),r=F.useRef(e.placement);r.current=e.placement;const i=F.useCallback(o=>{o!==r.current&&t.updatePlacement({placement:o})},[t]);return{open:e.visibility!=="hidden",anchorElement:e.targetRef,ref:a,onPlacementChange:i}}),dte=(e,t)=>{const{elementRef:n,localRef:a}=Gd(e),r=F.useContext(aw),{style:i}=MQ(r,{}),o=F.useRef(!0),[s]=F.useState(()=>{if(o.current){const l=St.createContainer();return n(l),o.current=!1,l}return a.current});return F.useLayoutEffect(()=>{const l=a.current;if(!l)return;const u=Object.keys(i);if(u.length!==0)for(const c of u)l.style.setProperty(c,i[c])},[a,i]),F.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,u=a.current;return St.add({element:u,owner:l}),()=>{St.remove(u)}},[a,t,s]),F.useLayoutEffect(()=>{var c,d;let u=(t?"current"in t?t.current:t:void 0)??void 0;if(u==null&&typeof document<"u"){const p=document.activeElement,g=a.current;u=(p&&g&&!g.contains(p)?p:document.body).closest("[dir]")??document.documentElement}if(u){const p=u.getAttribute("dir");(p!=null?p.toLowerCase()==="rtl":pU(u))?(c=a.current)==null||c.setAttribute("dir","rtl"):(d=a.current)==null||d.setAttribute("dir","ltr")}},[a,t]),a},pte=De()(({events:e,state:t},n)=>({ref:Wi(n,t.targetRef),onClick:r=>{t.targetRef.current instanceof Element||(t.targetRef.current=r.currentTarget),t.visibility!=="hidden"?e.hide(r):e.show(r)}})),fte=De()(({events:e,state:t},n)=>({ref:Wi(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 XU(e){if(e===document.body||!e.parentElement)return e;const t=getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"?e:XU(e.parentElement)}function JU(e){return e===null||e===document.body||!e.parentElement?null:RQ(e)?e:JU(e.parentElement)}function uN(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 mte=De()(e=>{const t=e.state.visibility!=="hidden",n=F.useRef(null),a=F.useRef(!1),r=F.useCallback(o=>{o.key==="Tab"&&(a.current=!0)},[]),i=F.useCallback(o=>{e.state.stackRef.current&&o.target instanceof Element&&(St.contains(e.state.stackRef.current,o.target)||(n.current=o.target))},[e.state.stackRef]);return F.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=XU(o).getBoundingClientRect(),u={left:0,top:0,right:window.innerWidth,bottom:window.innerHeight};if(n.current&&JU(n.current)||uN(o,l)||uN(o,u)){n.current=null;return}document.activeElement!==document.body&&e.state.stackRef.current&&document.activeElement instanceof Element&&!St.contains(e.state.stackRef.current,document.activeElement)||a.current?XA(o):requestAnimationFrame(()=>{XA(o)}),n.current=null}},[e.state.returnFocusRef,e.state.targetRef,t,i,r,e.state.stackRef]),{}}),QU=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"}},eF=Ke({vars:{width:"",height:"",size:""},base:({height:e,size:t,width:n})=>({display:"inline-block","> svg":{display:"block",width:W(n,t),height:W(e,t)}}),modifiers:{shouldMirror:{true:{transform:"scaleX(-1)"}},shouldMirrorInRTL:{true:{"&:dir(rtl)":{transform:"scaleX(-1)"}}}}}),gte=(e,t)=>e?e in t?t[e]:typeof e=="number"?Ve(e):e:"",hte=je("span")({displayName:"Svg",Component:({shouldMirror:e,shouldMirrorInRTL:t,src:n,type:a,...r},i,o)=>(n==null?void 0:n.type)!==a?(console.error(`Icon type "${n.type}" does not match expected type "${a}"`),null):S.jsx(o,{ref:i,dangerouslySetInnerHTML:{__html:n.svg},...Jn(r,eF({shouldMirror:e,shouldMirrorInRTL:t}))})}),ka={System:"system"},cN={name:"book-user",type:ka.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-book-user" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="transparent" d="M18.5 19h-12A1.5 1.5 0 0 0 5 20.5v-18a.5.5 0 0 1 .5-.5h13a.5.5 0 0 1 .5.5v16a.5.5 0 0 1-.5.5" class="wd-icon-background"/><path fill="oklch(0.3523 0 0 / 1)" d="M18.5 1A1.5 1.5 0 0 1 20 2.5v16a1.5 1.5 0 0 1-1.5 1.5h-12a.5.5 0 0 0 0 1h13a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-13A2.5 2.5 0 0 1 4 20.5v-18A1.5 1.5 0 0 1 5.5 1zM6 18.05q.243-.05.5-.05H18V3H6z" class="wd-icon-fill"/><path fill="oklch(0.3523 0 0 / 1)" d="M12 11c1.456 0 2.792.519 3.831 1.382.11.09.169.227.169.369v.749a.5.5 0 0 1-.5.5h-7l-.1-.01a.5.5 0 0 1-.4-.49v-.749c0-.142.06-.278.169-.37A5.98 5.98 0 0 1 12 11M12 6a2 2 0 1 1 0 4 2 2 0 0 1 0-4" class="wd-icon-accent"/></svg>',filename:"wd-icon-book-user.svg",category:"Files & Docs",tags:["profile","identity","i.d.","id","phonebook","contacts"]},bte={name:"check-small",type:ka.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-check-small" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="oklch(0.3523 0 0 / 1)" d="M16.44 7.646a.5.5 0 0 1 .706 0l.707.707a.5.5 0 0 1 0 .707l-.646.645v.001l-6 6a1 1 0 0 1-1.413 0l-1.35-1.35-.005-.003-1.793-1.793a.5.5 0 0 1 0-.707l.707-.707a.5.5 0 0 1 .707 0l2.44 2.44z" class="wd-icon-fill"/></svg>',filename:"wd-icon-check-small.svg",category:"Notification",tags:["success","complete","check mark","check box"]},vte={name:"chevron-right-small",type:ka.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-chevron-right-small" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="oklch(0.3523 0 0 / 1)" d="M9.958 6.112a.5.5 0 0 1 .704.07l1.617 1.976.007.01 2.56 3.128a1 1 0 0 1 0 1.266l-4.184 5.113a.5.5 0 0 1-.704.071l-.775-.633a.5.5 0 0 1-.07-.704l3.666-4.48L9.92 8.437l.001-.001-.808-.988a.5.5 0 0 1 .07-.703z" class="wd-icon-fill"/></svg>',filename:"wd-icon-chevron-right-small.svg",category:"Navigation",tags:["navigation","arrow"]},dN={name:"cloud-arrow-up",type:ka.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-cloud-arrow-up" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="oklch(0.3523 0 0 / 1)" d="M9.5 4c1.735 0 3.28.805 4.286 2.057Q14.136 6 14.5 6a4.5 4.5 0 0 1 4.262 3.058A5.001 5.001 0 0 1 18 19H6a5 5 0 0 1-1.998-9.585A5.5 5.5 0 0 1 9.5 4m0 2a3.5 3.5 0 0 0-3.466 3.98l.121.892-.874.214A3.002 3.002 0 0 0 6 17h5v-3.89l-1.48 1.21a.5.5 0 0 1-.703-.071l-.316-.387-.317-.386a.5.5 0 0 1 .07-.705l3.113-2.546q.035-.029.07-.053c.364-.247.852-.23 1.197.053l3.112 2.547c.213.174.245.49.07.704l-.632.773a.5.5 0 0 1-.703.07L13 13.11V17h5a3 3 0 1 0 0-6h-.027l-.875.008-.124-.866a2.5 2.5 0 0 0-3.287-2.007l-.767.263-.416-.694A3.5 3.5 0 0 0 9.5 6" class="wd-icon-fill"/></svg>',filename:"wd-icon-cloud-arrow-up.svg",category:"Data Stream",tags:["storage","store"]},yte={name:"configure",type:ka.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-configure" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="transparent" d="M2 6.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-5a.5.5 0 0 1-.5-.5zM9 14.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-5a.5.5 0 0 1-.5-.5zM16 7.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-5a.5.5 0 0 1-.5-.5z" class="wd-icon-background"/><path fill="oklch(0.3523 0 0 / 1)" d="M5.5 3a.5.5 0 0 1 .5.5V5h1.5A1.5 1.5 0 0 1 9 6.5v3A1.5 1.5 0 0 1 7.5 11H6v9.5a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5V11H2.5A1.5 1.5 0 0 1 1 9.5v-3A1.5 1.5 0 0 1 2.5 5H4V3.5a.5.5 0 0 1 .5-.5zM3 9h4V7H3zM12.5 3a.5.5 0 0 1 .5.5V13h1.5a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5H13v1.5a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5V19H9.5A1.5 1.5 0 0 1 8 17.5v-3A1.5 1.5 0 0 1 9.5 13H11V3.5a.5.5 0 0 1 .5-.5zM10 17h4v-2h-4z" class="wd-icon-fill"/><path fill="oklch(0.3523 0 0 / 1)" d="M19.5 3a.5.5 0 0 1 .5.5V6h1.5A1.5 1.5 0 0 1 23 7.5v3a1.5 1.5 0 0 1-1.5 1.5H20v8.5a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5V12h-1.5a1.5 1.5 0 0 1-1.5-1.5v-3A1.5 1.5 0 0 1 16.5 6H18V3.5a.5.5 0 0 1 .5-.5zM17 10h4V8h-4z" class="wd-icon-fill"/></svg>',filename:"wd-icon-configure.svg",category:"Core",tags:["config","settings","preferences","sound board","configure"]},Ste={name:"user",type:ka.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-user" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="transparent" d="M16 6a4 4 0 1 1-8 0 4 4 0 0 1 8 0M3 16.661a.5.5 0 0 1 .168-.371A13.45 13.45 0 0 1 12 13c3.377 0 6.465 1.24 8.832 3.29a.5.5 0 0 1 .168.371V20.5a.5.5 0 0 1-.5.5h-17a.5.5 0 0 1-.5-.5z" class="wd-icon-background"/><path fill="transparent" d="M21 16.661a.5.5 0 0 0-.168-.371A13.45 13.45 0 0 0 12 13c-3.377 0-6.465 1.24-8.832 3.29A.5.5 0 0 0 3 16.66V20.5a.5.5 0 0 0 .5.5h17a.5.5 0 0 0 .5-.5z" class="wd-icon-background"/><path fill="oklch(0.3523 0 0 / 1)" d="M12 12c3.627 0 6.944 1.333 9.486 3.534.334.289.514.704.514 1.127V20.5a1.5 1.5 0 0 1-1.5 1.5h-17a1.5 1.5 0 0 1-1.492-1.347L2 20.5v-3.839l.009-.158c.039-.367.213-.716.505-.969l.485-.402A14.44 14.44 0 0 1 12 12m0 2c-3.045 0-5.832 1.09-8 2.898V20h16v-3.102A12.44 12.44 0 0 0 12 14M12 1a5 5 0 1 1 0 10 5 5 0 0 1 0-10m0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6" class="wd-icon-fill"/></svg>',filename:"wd-icon-user.svg",category:"People",tags:["person","people","profile","avatar"]},Be=Ke({extends:eF,vars:{color:"",accentColor:"",backgroundColor:""},base:({size:e,accentColor:t,backgroundColor:n,color:a})=>({"& svg":{width:W(e,ur.systemIcon.size.lg),height:W(e,ur.systemIcon.size.lg)},".wd-icon .wd-icon-fill":{fill:W(a,ur.systemIcon.color.fill)},".wd-icon .wd-icon-accent, & .wd-icon-accent2":{fill:W(t,W(a,ur.systemIcon.color.accent))},".wd-icon .wd-icon-background":{fill:W(n,"transparent")},"@media (prefers-contrast: more)":{".wd-icon .wd-icon-fill, .wd-icon .wd-icon-accent":{color:"currentColor",fill:"currentColor"}}}),modifiers:{}}),dw=je("span")({displayName:"SystemIcon",Component:({accent:e,background:t,color:n,icon:a,size:r,...i},o,s)=>S.jsx(hte,{as:s,src:a,type:ka.System,ref:o,...Jn(i,Be({size:gte(r,ur.systemIcon.size),color:n,accentColor:e,backgroundColor:t}))})}),Ete=No({position:"relative",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}),_te=je("span")({displayName:"ButtonLabel",Component:({children:e,...t},n,a)=>S.jsx(Uee,{as:a,ref:n,...Jn(t,Ete),children:e})}),wte=Ke({base:{display:"inline-block"},modifiers:{size:{extraSmall:{[Be.vars.size]:ur.systemIcon.size.xs},small:{[Be.vars.size]:ur.systemIcon.size.md},medium:{[Be.vars.size]:ur.systemIcon.size.md},large:{[Be.vars.size]:ur.systemIcon.size.lg}}}}),kte=je("span")({Component:({icon:e,size:t="medium",shouldMirrorIcon:n=!1,shouldMirrorIconInRTL:a=!1,...r},i,o)=>e===void 0?null:S.jsx(dw,{ref:i,as:o,icon:e,shouldMirror:n,shouldMirrorInRTL:a,...Jn(r,wte({size:t}))})}),ie={default:La("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),focus:La("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),hover:La("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),active:La("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),disabled:La("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius")},le=Ke({vars:{background:"",border:"",boxShadowInner:"",boxShadowOuter:"",label:"",opacity:"",borderRadius:""},base:({background:e,border:t,boxShadowInner:n,boxShadowOuter:a,label:r,opacity:i,borderRadius:o})=>({fontFamily:st.default,fontSize:A.fontSize.subtext.lg,lineHeight:A.lineHeight.subtext.lg,letterSpacing:A.letterSpacing.subtext.lg,fontWeight:rt.bold,backgroundColor:W(ie.default.background,W(e,"transparent")),color:W(ie.default.label,W(r,M.fg.strong)),borderWidth:Ve(1),borderStyle:"solid",gap:A.gap.sm,borderColor:W(ie.default.border,W(t,"transparent")),cursor:"pointer",display:"inline-flex",boxShadow:"none",alignItems:"center",justifyContent:"center",outline:`${Ve(2)} transparent`,whiteSpace:"nowrap",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",borderRadius:W(ie.default.borderRadius,W(o,A.shape.full)),position:"relative",verticalAlign:"middle",overflow:"hidden",[Be.vars.color]:W(ie.default.icon,M.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:W(ie.default.opacity,W(i,lr.full))},"&:focus-visible, &.focus":{backgroundColor:W(ie.focus.background,W(e,"transparent")),borderColor:W(ie.focus.border,W(t,"transparent")),color:W(ie.focus.label,W(r,M.fg.strong)),[Be.vars.color]:W(ie.focus.icon,M.fg.strong),outline:`${Ve(2)} solid transparent`,outlineOffset:Ve(2),boxShadow:`0 0 0 ${Ve(2)} ${W(ie.focus.boxShadowInner,W(n,A.color.border.inverse.default))},0 0 0 ${Ve(4)} ${W(ie.focus.boxShadowOuter,W(a,A.color.brand.focus.primary))}`},"&:hover, &.hover":{backgroundColor:W(ie.hover.background,W(e,A.color.surface.contrast.strong)),borderColor:W(ie.hover.border,W(t,"transparent")),color:W(ie.hover.label,W(r,M.fg.stronger)),[Be.vars.color]:W(ie.hover.icon,M.fg.stronger)},"&:hover:active":{transitionDuration:"40ms"},"&:active, &.active":{backgroundColor:W(ie.active.background,W(e,"transparent")),borderColor:W(ie.active.border,W(t,"transparent")),color:W(ie.active.label,W(r,M.fg.strong)),[Be.vars.color]:W(ie.active.icon,M.fg.strong)},"&:disabled, &.disabled":{backgroundColor:W(ie.disabled.background,W(e,"transparent")),borderColor:W(ie.disabled.border,W(t,"transparent")),color:W(ie.disabled.label,W(r,M.fg.strong)),[Be.vars.color]:W(ie.disabled.icon,"currentColor")},"@media (prefers-contrast: more)":{'&[aria-pressed="true"]':{outline:`${Ve(2)} solid transparent`,outlineOffset:`-${Ve(1)}`},'&[aria-pressed="true"]:focus-visible, &[aria-pressed="true"].focus':{outline:`${Ve(4)} double transparent`,outlineOffset:0}},svg:{pointerEvents:"none"}}),modifiers:{size:{large:{fontSize:A.fontSize.body.sm,lineHeight:A.lineHeight.body.sm,letterSpacing:A.letterSpacing.body.sm,height:A.size.lg,paddingInline:A.padding.xxl,minWidth:Rr.size1400},medium:{fontSize:A.fontSize.subtext.lg,lineHeight:A.lineHeight.subtext.lg,letterSpacing:A.letterSpacing.subtext.lg,minWidth:Rr.size1200,paddingInline:A.padding.xl,height:A.size.md},small:{fontSize:A.fontSize.subtext.lg,lineHeight:A.lineHeight.subtext.lg,letterSpacing:A.letterSpacing.subtext.lg,height:A.size.sm,minWidth:Rr.size1000,paddingInline:A.padding.md,gap:A.gap.xs},extraSmall:{fontSize:A.fontSize.subtext.md,lineHeight:A.lineHeight.subtext.md,letterSpacing:A.letterSpacing.subtext.md,height:A.size.xs,minWidth:"auto",paddingInline:A.padding.sm,gap:A.gap.xs}},grow:{true:{width:"100%",maxWidth:"100%"}},iconPosition:{only:{padding:0},start:{},end:{}}},compound:[{modifiers:{size:"large",iconPosition:"only"},styles:{minWidth:A.size.lg}},{modifiers:{size:"large",iconPosition:"start"},styles:{paddingInlineStart:A.padding.xl,paddingInlineEnd:A.padding.xxl}},{modifiers:{size:"large",iconPosition:"end"},styles:{paddingInlineStart:A.padding.xxl,paddingInlineEnd:A.padding.xl}},{modifiers:{size:"medium",iconPosition:"only"},styles:{minWidth:A.size.md}},{modifiers:{size:"medium",iconPosition:"start"},styles:{paddingInlineStart:A.padding.lg,paddingInlineEnd:A.padding.xl}},{modifiers:{size:"medium",iconPosition:"end"},styles:{paddingInlineStart:A.padding.xl,paddingInlineEnd:A.padding.lg}},{modifiers:{size:"small",iconPosition:"only"},styles:{minWidth:A.size.sm}},{modifiers:{size:"small",iconPosition:"start"},styles:{paddingInlineStart:A.padding.sm,paddingInlineEnd:A.padding.md}},{modifiers:{size:"small",iconPosition:"end"},styles:{paddingInlineStart:A.padding.md,paddingInlineEnd:A.padding.sm}},{modifiers:{size:"extraSmall",iconPosition:"only"},styles:{minWidth:A.size.xs}},{modifiers:{size:"extraSmall",iconPosition:"start"},styles:{paddingInlineStart:A.padding.xs,paddingInlineEnd:A.padding.sm}},{modifiers:{size:"extraSmall",iconPosition:"end"},styles:{paddingInlineStart:A.padding.sm,paddingInlineEnd:A.padding.xs}}]}),Jl=je("button")({displayName:"BaseButton",Component:({children:e,size:t,fillIcon:n,grow:a,iconPosition:r,icon:i,colors:o,...s},l,u)=>S.jsx(u,{ref:l,type:"button",...gt(s,[le({size:t,iconPosition:r,grow:a}),ie.default((o==null?void 0:o.default)||{}),ie.focus((o==null?void 0:o.focus)||{}),ie.hover((o==null?void 0:o.hover)||{}),ie.active((o==null?void 0:o.active)||{}),ie.disabled((o==null?void 0:o.disabled)||{})]),children:e}),subComponents:{Icon:kte,Label:_te}}),Ite=je("button")({displayName:"Button",Component:({children:e,icon:t,colors:n,iconPosition:a,shouldMirrorIcon:r,shouldMirrorIconInRTL:i,size:o="medium",...s},l,u)=>{const c=a||(t?e?"start":"only":void 0);return S.jsxs(Jl,{as:u,ref:l,size:o,icon:t,colors:n,iconPosition:c,...s,children:[t&&c==="start"&&S.jsx(Jl.Icon,{size:o,icon:t,shouldMirrorIcon:r,shouldMirrorIconInRTL:i}),e&&S.jsx(Jl.Label,{children:e}),t&&c&&["only","end"].includes(c)&&S.jsx(Jl.Icon,{size:o,icon:t,shouldMirrorIcon:r,shouldMirrorIconInRTL:i})]})}}),Tte=Ke({extends:le,base:{[le.vars.background]:A.color.surface.transparent,[le.vars.borderRadius]:A.shape.full,[le.vars.border]:M.border.input.default,[le.vars.label]:M.fg.default,[Be.vars.color]:W(ie.default.icon,"currentColor"),"&:focus-visible, &.focus":{[le.vars.background]:A.color.surface.default,[le.vars.label]:M.fg.strong,[le.vars.boxShadowInner]:A.color.focus.inverse,[le.vars.boxShadowOuter]:A.color.brand.focus.primary,[Be.vars.color]:W(ie.focus.icon,"currentColor")},"&:hover, &.hover":{[le.vars.background]:Wl.darken({color:A.color.surface.transparent,mixinColor:A.color.surface.overlay.mixin,mixinValue:A.opacity.surface.hover}),[le.vars.label]:M.fg.strong,[le.vars.border]:A.color.border.input.hover,[Be.vars.color]:W(ie.hover.icon,"currentColor")},"&:active, &.active":{[le.vars.background]:Wl.darken({color:A.color.surface.transparent,mixinColor:A.color.surface.overlay.mixin,mixinValue:A.opacity.surface.pressed}),[le.vars.label]:M.fg.strong,[le.vars.border]:A.color.border.input.hover,[Be.vars.color]:W(ie.active.icon,"currentColor")},"&:disabled, &.disabled":{[le.vars.opacity]:lr.disabled,[le.vars.background]:A.color.surface.transparent,[le.vars.label]:M.fg.default,[Be.vars.color]:W(ie.default.icon,"currentColor")}},modifiers:{variant:{inverse:{[le.vars.background]:A.color.surface.transparent,[le.vars.border]:A.color.border.inverse.default,[le.vars.label]:M.fg.inverse,[Be.vars.color]:W(ie.default.icon,"currentColor"),"&:hover, &.hover":{[le.vars.background]:Wl.darken({color:A.color.surface.transparent,mixinColor:A.color.surface.overlay.mixin,mixinValue:A.opacity.surface.hover}),[le.vars.border]:A.color.border.inverse.default,[le.vars.label]:M.fg.inverse,[Be.vars.color]:W(ie.hover.icon,"currentColor")},"&:focus-visible, &.focus":{[le.vars.background]:A.color.surface.inverse,[le.vars.border]:M.border.transparent,[le.vars.label]:M.fg.contrast.default,[le.vars.boxShadowInner]:M.border.contrast.default,[le.vars.boxShadowOuter]:A.color.focus.inverse,[Be.vars.color]:W(ie.focus.icon,"currentColor")},"&:active, &.active":{[le.vars.background]:Wl.darken({color:A.color.surface.transparent,mixinColor:A.color.surface.overlay.mixin,mixinValue:A.opacity.surface.pressed}),[le.vars.border]:A.color.border.inverse.default,[le.vars.label]:M.fg.inverse,[Be.vars.color]:W(ie.active.icon,"currentColor")},"&:disabled, &.disabled":{[le.vars.opacity]:lr.disabled,[le.vars.background]:A.color.surface.transparent,[le.vars.label]:M.fg.inverse,[Be.vars.color]:W(ie.default.icon,"currentColor")}}}}}),tF=je("button")({displayName:"SecondaryButton",Component:({children:e,variant:t,size:n,iconPosition:a,grow:r,cs:i,...o},s,l)=>S.jsx(Ite,{as:l,ref:s,iconPosition:a,size:n,grow:r,cs:[Tte({variant:t,iconPosition:a,grow:r,size:n}),i],...o,children:e})});var hn="top",Nn="bottom",Cn="right",bn="left",pw="auto",bl=[hn,Nn,Cn,bn],ki="start",fw="end",xte="clippingParents",nF="viewport",co="popper",Rte="reference",pN=bl.reduce(function(e,t){return e.concat([t+"-"+ki,t+"-"+fw])},[]),rF=[].concat(bl,[pw]).reduce(function(e,t){return e.concat([t,t+"-"+ki,t+"-"+fw])},[]),Ate="beforeRead",Nte="read",Cte="afterRead",Ote="beforeMain",$te="main",Lte="afterMain",Dte="beforeWrite",Mte="write",Pte="afterWrite",Ute=[Ate,Nte,Cte,Ote,$te,Lte,Dte,Mte,Pte];function On(e){return e?(e.nodeName||"").toLowerCase():null}function $n(e){if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function rs(e){var t=$n(e).Element;return e instanceof t||e instanceof Element}function Wn(e){var t=$n(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Fte(e){var t=$n(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function zte(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];!Wn(i)||!On(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 jte(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,u){return l[u]="",l},{});!Wn(r)||!On(r)||(Object.assign(r.style,s),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const Bte={name:"applyStyles",enabled:!0,phase:"write",fn:zte,effect:jte,requires:["computeStyles"]};function Hn(e){return e.split("-")[0]}function mw(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function aF(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Fte(n)){var a=t;do{if(a&&e.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function dr(e){return $n(e).getComputedStyle(e)}function qte(e){return["table","td","th"].indexOf(On(e))>=0}function Er(e){return((rs(e)?e.ownerDocument:e.document)||window.document).documentElement}function Zd(e){return On(e)==="html"?e:e.assignedSlot||e.parentNode||e.host||Er(e)}function fN(e){if(!Wn(e)||dr(e).position==="fixed")return null;var t=e.offsetParent;if(t){var n=Er(t);if(On(t)==="body"&&dr(t).position==="static"&&dr(n).position!=="static")return n}return t}function Gte(e){for(var t=Zd(e);Wn(t)&&["html","body"].indexOf(On(t))<0;){var n=dr(t);if(n.transform!=="none"||n.perspective!=="none"||n.willChange&&n.willChange!=="auto")return t;t=t.parentNode}return null}function vl(e){for(var t=$n(e),n=fN(e);n&&qte(n)&&dr(n).position==="static";)n=fN(n);return n&&On(n)==="body"&&dr(n).position==="static"?t:n||Gte(e)||t}function gw(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function hu(e,t,n){return Math.max(e,Math.min(t,n))}function iF(){return{top:0,right:0,bottom:0,left:0}}function oF(e){return Object.assign(Object.assign({},iF()),e)}function sF(e,t){return t.reduce(function(n,a){return n[a]=e,n},{})}function Hte(e){var t,n=e.state,a=e.name,r=n.elements.arrow,i=n.modifiersData.popperOffsets,o=Hn(n.placement),s=gw(o),l=[bn,Cn].indexOf(o)>=0,u=l?"height":"width";if(!(!r||!i)){var c=n.modifiersData[a+"#persistent"].padding,d=mw(r),p=s==="y"?hn:bn,g=s==="y"?Nn:Cn,b=n.rects.reference[u]+n.rects.reference[s]-i[s]-n.rects.popper[u],v=i[s]-n.rects.reference[s],I=vl(r),h=I?s==="y"?I.clientHeight||0:I.clientWidth||0:0,f=b/2-v/2,m=c[p],y=h-d[u]-c[g],_=h/2-d[u]/2+f,w=hu(m,_,y),k=s;n.modifiersData[a]=(t={},t[k]=w,t.centerOffset=w-_,t)}}function Vte(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)||aF(t.elements.popper,i)&&(t.elements.arrow=i,t.modifiersData[a+"#persistent"]={padding:oF(typeof s!="number"?s:sF(s,bl))}))}const Wte={name:"arrow",enabled:!0,phase:"main",fn:Hte,effect:Vte,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};var Zte={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Yte(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 mN(e){var t,n=e.popper,a=e.popperRect,r=e.placement,i=e.offsets,o=e.position,s=e.gpuAcceleration,l=e.adaptive,u=Yte(i),c=u.x,d=u.y,p=i.hasOwnProperty("x"),g=i.hasOwnProperty("y"),b=bn,v=hn,I=window;if(l){var h=vl(n);h===$n(n)&&(h=Er(n)),r===hn&&(v=Nn,d-=h.clientHeight-a.height,d*=s?1:-1),r===bn&&(b=Cn,c-=h.clientWidth-a.width,c*=s?1:-1)}var f=Object.assign({position:o},l&&Zte);if(s){var m;return Object.assign(Object.assign({},f),{},(m={},m[v]=g?"0":"",m[b]=p?"0":"",m.transform=(I.devicePixelRatio||1)<2?"translate("+c+"px, "+d+"px)":"translate3d("+c+"px, "+d+"px, 0)",m))}return Object.assign(Object.assign({},f),{},(t={},t[v]=g?d+"px":"",t[b]=p?c+"px":"",t.transform="",t))}function Kte(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:Hn(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),mN(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),mN(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 Xte={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Kte,data:{}};var Ql={passive:!0};function Jte(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=$n(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,Ql)}),s&&l.addEventListener("resize",n.update,Ql),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,Ql)}),s&&l.removeEventListener("resize",n.update,Ql)}}const Qte={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Jte,data:{}};var ene={left:"right",right:"left",bottom:"top",top:"bottom"};function bu(e){return e.replace(/left|right|bottom|top/g,function(t){return ene[t]})}var tne={start:"end",end:"start"};function gN(e){return e.replace(/start|end/g,function(t){return tne[t]})}function as(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 hw(e){var t=$n(e),n=t.pageXOffset,a=t.pageYOffset;return{scrollLeft:n,scrollTop:a}}function bw(e){return as(Er(e)).left+hw(e).scrollLeft}function nne(e){var t=$n(e),n=Er(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+bw(e),y:s}}function rne(e){var t=Er(e),n=hw(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+bw(e),s=-n.scrollTop;return dr(a||t).direction==="rtl"&&(o+=Math.max(t.clientWidth,a?a.clientWidth:0)-r),{width:r,height:i,x:o,y:s}}function vw(e){var t=dr(e),n=t.overflow,a=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function lF(e){return["html","body","#document"].indexOf(On(e))>=0?e.ownerDocument.body:Wn(e)&&vw(e)?e:lF(Zd(e))}function Co(e,t){t===void 0&&(t=[]);var n=lF(e),a=On(n)==="body",r=$n(n),i=a?[r].concat(r.visualViewport||[],vw(n)?n:[]):n,o=t.concat(i);return a?o:o.concat(Co(Zd(i)))}function qv(e){return Object.assign(Object.assign({},e),{},{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ane(e){var t=as(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 hN(e,t){return t===nF?qv(nne(e)):Wn(t)?ane(t):qv(rne(Er(e)))}function ine(e){var t=Co(Zd(e)),n=["absolute","fixed"].indexOf(dr(e).position)>=0,a=n&&Wn(e)?vl(e):e;return rs(a)?t.filter(function(r){return rs(r)&&aF(r,a)&&On(r)!=="body"}):[]}function one(e,t,n){var a=t==="clippingParents"?ine(e):[].concat(t),r=[].concat(a,[n]),i=r[0],o=r.reduce(function(s,l){var u=hN(e,l);return s.top=Math.max(u.top,s.top),s.right=Math.min(u.right,s.right),s.bottom=Math.min(u.bottom,s.bottom),s.left=Math.max(u.left,s.left),s},hN(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 is(e){return e.split("-")[1]}function uF(e){var t=e.reference,n=e.element,a=e.placement,r=a?Hn(a):null,i=a?is(a):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(r){case hn:l={x:o,y:t.y-n.height};break;case Nn:l={x:o,y:t.y+t.height};break;case Cn:l={x:t.x+t.width,y:s};break;case bn:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=r?gw(r):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case ki:l[u]=Math.floor(l[u])-Math.floor(t[c]/2-n[c]/2);break;case fw:l[u]=Math.floor(l[u])+Math.ceil(t[c]/2-n[c]/2);break}}return l}function Ii(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?xte:i,s=n.rootBoundary,l=s===void 0?nF:s,u=n.elementContext,c=u===void 0?co:u,d=n.altBoundary,p=d===void 0?!1:d,g=n.padding,b=g===void 0?0:g,v=oF(typeof b!="number"?b:sF(b,bl)),I=c===co?Rte:co,h=e.elements.reference,f=e.rects.popper,m=e.elements[p?I:c],y=one(rs(m)?m:m.contextElement||Er(e.elements.popper),o,l),_=as(h),w=uF({reference:_,element:f,placement:r}),k=qv(Object.assign(Object.assign({},f),w)),C=c===co?k:_,O={top:y.top-C.top+v.top,bottom:C.bottom-y.bottom+v.bottom,left:y.left-C.left+v.left,right:C.right-y.right+v.right},D=e.modifiersData.offset;if(c===co&&D){var G=D[r];Object.keys(O).forEach(function(Q){var ee=[Cn,Nn].indexOf(Q)>=0?1:-1,be=[hn,Nn].indexOf(Q)>=0?"y":"x";O[Q]+=G[be]*ee})}return O}function sne(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,u=l===void 0?rF:l,c=is(a),d=c?s?pN:pN.filter(function(b){return is(b)===c}):bl,p=d.filter(function(b){return u.indexOf(b)>=0});p.length===0&&(p=d);var g=p.reduce(function(b,v){return b[v]=Ii(e,{placement:v,boundary:r,rootBoundary:i,padding:o})[Hn(v)],b},{});return Object.keys(g).sort(function(b,v){return g[b]-g[v]})}function lne(e){if(Hn(e)===pw)return[];var t=bu(e);return[gN(e),t,gN(t)]}function une(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,u=n.padding,c=n.boundary,d=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,b=g===void 0?!0:g,v=n.allowedAutoPlacements,I=t.options.placement,h=Hn(I),f=h===I,m=l||(f||!b?[bu(I)]:lne(I)),y=[I].concat(m).reduce(function(me,Ae){return me.concat(Hn(Ae)===pw?sne(t,{placement:Ae,boundary:c,rootBoundary:d,padding:u,flipVariations:b,allowedAutoPlacements:v}):Ae)},[]),_=t.rects.reference,w=t.rects.popper,k=new Map,C=!0,O=y[0],D=0;D<y.length;D++){var G=y[D],Q=Hn(G),ee=is(G)===ki,be=[hn,Nn].indexOf(Q)>=0,Ee=be?"width":"height",fe=Ii(t,{placement:G,boundary:c,rootBoundary:d,altBoundary:p,padding:u}),_e=be?ee?Cn:bn:ee?Nn:hn;_[Ee]>w[Ee]&&(_e=bu(_e));var L=bu(_e),j=[];if(i&&j.push(fe[Q]<=0),s&&j.push(fe[_e]<=0,fe[L]<=0),j.every(function(me){return me})){O=G,C=!1;break}k.set(G,j)}if(C)for(var B=b?3:1,H=function(Ae){var Ce=y.find(function(Xe){var on=k.get(Xe);if(on)return on.slice(0,Ae).every(function(Ia){return Ia})});if(Ce)return O=Ce,"break"},Z=B;Z>0;Z--){var Ge=H(Z);if(Ge==="break")break}t.placement!==O&&(t.modifiersData[a]._skip=!0,t.placement=O,t.reset=!0)}}const cne={name:"flip",enabled:!0,phase:"main",fn:une,requiresIfExists:["offset"],data:{_skip:!1}};function bN(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 vN(e){return[hn,Cn,Nn,bn].some(function(t){return e[t]>=0})}function dne(e){var t=e.state,n=e.name,a=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,o=Ii(t,{elementContext:"reference"}),s=Ii(t,{altBoundary:!0}),l=bN(o,a),u=bN(s,r,i),c=vN(l),d=vN(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const pne={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:dne};function fne(e,t,n){var a=Hn(e),r=[bn,hn].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,[bn,Cn].indexOf(a)>=0?{x:s,y:o}:{x:o,y:s}}function mne(e){var t=e.state,n=e.options,a=e.name,r=n.offset,i=r===void 0?[0,0]:r,o=rF.reduce(function(c,d){return c[d]=fne(d,t.rects,i),c},{}),s=o[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[a]=o}const gne={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:mne};function hne(e){var t=e.state,n=e.name;t.modifiersData[n]=uF({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const bne={name:"popperOffsets",enabled:!0,phase:"read",fn:hne,data:{}};function vne(e){return e==="x"?"y":"x"}function yne(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,u=n.rootBoundary,c=n.altBoundary,d=n.padding,p=n.tether,g=p===void 0?!0:p,b=n.tetherOffset,v=b===void 0?0:b,I=Ii(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),h=Hn(t.placement),f=is(t.placement),m=!f,y=gw(h),_=vne(y),w=t.modifiersData.popperOffsets,k=t.rects.reference,C=t.rects.popper,O=typeof v=="function"?v(Object.assign(Object.assign({},t.rects),{},{placement:t.placement})):v,D={x:0,y:0};if(w){if(i){var G=y==="y"?hn:bn,Q=y==="y"?Nn:Cn,ee=y==="y"?"height":"width",be=w[y],Ee=w[y]+I[G],fe=w[y]-I[Q],_e=g?-C[ee]/2:0,L=f===ki?k[ee]:C[ee],j=f===ki?-C[ee]:-k[ee],B=t.elements.arrow,H=g&&B?mw(B):{width:0,height:0},Z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:iF(),Ge=Z[G],me=Z[Q],Ae=hu(0,k[ee],H[ee]),Ce=m?k[ee]/2-_e-Ae-Ge-O:L-Ae-Ge-O,Xe=m?-k[ee]/2+_e+Ae+me+O:j+Ae+me+O,on=t.elements.arrow&&vl(t.elements.arrow),Ia=on?y==="y"?on.clientTop||0:on.clientLeft||0:0,Ta=t.modifiersData.offset?t.modifiersData.offset[t.placement][y]:0,xa=w[y]+Ce-Ta-Ia,Yd=w[y]+Xe-Ta,Ra=hu(g?Math.min(Ee,xa):Ee,be,g?Math.max(fe,Yd):fe);w[y]=Ra,D[y]=Ra-be}if(s){var PF=y==="x"?hn:bn,UF=y==="x"?Nn:Cn,Sl=w[_],FF=Sl+I[PF],zF=Sl-I[UF],Ew=hu(FF,Sl,zF);w[_]=Ew,D[_]=Ew-Sl}t.modifiersData[a]=D}}const Sne={name:"preventOverflow",enabled:!0,phase:"main",fn:yne,requiresIfExists:["offset"]};function Ene(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function _ne(e){return e===$n(e)||!Wn(e)?hw(e):Ene(e)}function wne(e,t,n){n===void 0&&(n=!1);var a=Er(t),r=as(e),i=Wn(t),o={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(i||!i&&!n)&&((On(t)!=="body"||vw(a))&&(o=_ne(t)),Wn(t)?(s=as(t),s.x+=t.clientLeft,s.y+=t.clientTop):a&&(s.x=bw(a))),{x:r.left+o.scrollLeft-s.x,y:r.top+o.scrollTop-s.y,width:r.width,height:r.height}}function kne(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 Ine(e){var t=kne(e);return Ute.reduce(function(n,a){return n.concat(t.filter(function(r){return r.phase===a}))},[])}function Tne(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function xne(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 yN={placement:"bottom",modifiers:[],strategy:"absolute"};function SN(){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 Rne(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,a=n===void 0?[]:n,r=t.defaultOptions,i=r===void 0?yN:r;return function(s,l,u){u===void 0&&(u=i);var c={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},yN),i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],p=!1,g={state:c,setOptions:function(h){v(),c.options=Object.assign(Object.assign(Object.assign({},i),c.options),h),c.scrollParents={reference:rs(s)?Co(s):s.contextElement?Co(s.contextElement):[],popper:Co(l)};var f=Ine(xne([].concat(a,c.options.modifiers)));return c.orderedModifiers=f.filter(function(m){return m.enabled}),b(),g.update()},forceUpdate:function(){if(!p){var h=c.elements,f=h.reference,m=h.popper;if(SN(f,m)){c.rects={reference:wne(f,vl(m),c.options.strategy==="fixed"),popper:mw(m)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(D){return c.modifiersData[D.name]=Object.assign({},D.data)});for(var y=0;y<c.orderedModifiers.length;y++){if(c.reset===!0){c.reset=!1,y=-1;continue}var _=c.orderedModifiers[y],w=_.fn,k=_.options,C=k===void 0?{}:k,O=_.name;typeof w=="function"&&(c=w({state:c,options:C,name:O,instance:g})||c)}}}},update:Tne(function(){return new Promise(function(I){g.forceUpdate(),I(c)})}),destroy:function(){v(),p=!0}};if(!SN(s,l))return g;g.setOptions(u).then(function(I){!p&&u.onFirstUpdate&&u.onFirstUpdate(I)});function b(){c.orderedModifiers.forEach(function(I){var h=I.name,f=I.options,m=f===void 0?{}:f,y=I.effect;if(typeof y=="function"){var _=y({state:c,name:h,instance:g,options:m}),w=function(){};d.push(_||w)}})}function v(){d.forEach(function(I){return I()}),d=[]}return g}}var Ane=[Qte,bne,Xte,Bte,gne,cne,Sne,Wte,pne],Nne=Rne({defaultModifiers:Ane});const Cne=["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"],One=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=Cne.find(r=>r.includes(`${a}-${n}`))??a),a},cF=(e,t,n)=>{if(e.length===0||e[0].split("-")[0]==="auto")return n;const{reference:a,popper:r}=t.rects,i=Ii({...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]:cF(e.slice(1),t,n)},EN="fallbackModifier",_N={name:EN,enabled:!0,phase:"main",data:{_skip:!1},fn({state:e,options:t}){const n=e.options.placement,{fallbackPlacements:a}=t,r=[n,One(n),...a||[]],i=cF(r,e,n);e.placement!==i&&(e.modifiersData[EN]._skip=!0,e.placement=i,e.reset=!0)}},dF=["top","right","bottom","left"],yw=X.forwardRef(({portal:e=!0,open:t=!0,...n},a)=>t?S.jsx(Dne,{ref:a,portal:e,...n}):null),$ne=e=>{if(e!==null)return"current"in e?e.current||void 0:e},Lne={},Dne=X.forwardRef(({anchorElement:e,getAnchorClientRect:t,popperOptions:n=Lne,placement:a="bottom",fallbackPlacements:r=dF,onPlacementChange:i,children:o,portal:s,popperInstanceRef:l},u)=>{const c=X.useRef(!0),{localRef:d,elementRef:p}=Gd(l),[g,b]=X.useState(a),v=dte(u,e),I=X.useRef(a);I.current=g;const h=X.useMemo(()=>({name:"setPlacement",enabled:!0,phase:"afterWrite",fn({state:m}){b(m.placement),i==null||i(m.placement)}}),[b,i]);X.useLayoutEffect(()=>{const m=t?{getBoundingClientRect:t}:$ne(e??null);if(!m){console.warn("Popper: neither anchorElement or getAnchorClientRect was defined. A valid anchorElement or getAnchorClientRect callback must be provided to render a Popper");return}if(v.current){const y=Nne(m,v.current,{placement:a,...n,modifiers:[h,{..._N,options:{fallbackPlacements:r}},...n.modifiers||[]]});return p(y),()=>{y==null||y.destroy()}}},[e,t,v]),X.useLayoutEffect(()=>{var m;c.current||(m=d.current)==null||m.setOptions({placement:a,...n,modifiers:[h,{..._N,options:{fallbackPlacements:r}},...n.modifiers||[]]}),c.current=!1},[n,a,r,h,d]);const f=S.jsx(S.Fragment,{children:Mne(o)?o({placement:g}):o});return s?Fy.createPortal(f,v.current):f});function Mne(e){return typeof e=="function"}const Pt=Wr({defaultConfig:{...Za.defaultConfig,...ea.defaultConfig,mode:"single",shouldVirtualize:!1},requiredConfig:{...Za.requiredConfig,...ea.requiredConfig},contextOverride:ea.Context})(e=>{const t=Za(Za.mergeConfig(e,{selection:e.mode==="single"?wU:WQ})),n=ea(ea.mergeConfig(e,{id:t.state.id,onHide(){t.state.indexRef.current=0}}));ZU(n),YU(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}}),Pne=Ke({vars:{minWidth:Ve(1),transformOriginVertical:"top",transformOriginHorizontal:"left",maxHeight:""},base:({transformOriginVertical:e,transformOriginHorizontal:t,minWidth:n,maxHeight:a})=>({fontFamily:st.default,fontWeight:rt.normal,fontSize:A.fontSize.subtext.lg,lineHeight:A.lineHeight.subtext.lg,letterSpacing:A.letterSpacing.subtext.lg,color:M.fg.default,position:"relative",display:"flex",flexDirection:"column",transition:"transform ease-out 150ms",padding:A.padding.xxs,borderRadius:A.shape.xxl,maxWidth:Fn.subtract("100vw",A.size.sm),boxShadow:sU[3],minWidth:n,maxHeight:a,transformOrigin:`${e} ${t}`,".wd-no-animation &":{animation:"none"}})}),Une=De()(()=>({})),pF=rn("div")({displayName:"Menu.Card",modelHook:Pt,elemPropsHook:Une})(({minWidth:e,maxHeight:t,...n},a,r)=>{const i=X.useMemo(()=>QU(r.state.placement||"bottom"),[r.state.placement]);return S.jsx(rte,{as:a,...gt(n,Pne({minWidth:typeof e=="number"?Ve(e):e,maxHeight:typeof t=="number"?Ve(t):t,transformOriginVertical:i.vertical,transformOriginHorizontal:i.horizontal})),children:n.children})}),Fne=Ke({base:{display:"block",height:Ve(1),border:"none",borderBlockStart:`${Ve(1)} solid ${A.color.border.default}`,margin:`${A.gap.sm} ${A.gap.md}`}}),fF=je("hr")({displayName:"Menu.Divider",Component({...e},t,n){return S.jsx(n,{ref:t,...Jn(e,Fne())})}}),wN={vertical:"bottom",horizontal:"center"},Gv=La("positionX","positionY"),zne=ZJ({"0%":{opacity:0,transform:`translate(${Gv.positionX}, ${Gv.positionY})`},"100%":{opacity:1,transform:"translate(0)"}}),jne=Ke({vars:{tooltipTransformOriginHorizontal:"",tooltipTransformOriginVertical:""},base:({tooltipTransformOriginHorizontal:e,tooltipTransformOriginVertical:t})=>({fontFamily:st.default,fontWeight:rt.normal,fontSize:A.fontSize.subtext.md,lineHeight:A.lineHeight.subtext.md,letterSpacing:A.letterSpacing.subtext.md,display:"inline-flex",position:"relative",padding:A.padding.sm,color:M.fg.inverse,animationName:zne,animationDuration:"150ms",animationTimingFunction:"ease-out",transformOrigin:`${t} ${e}`,a:{color:M.fg.inverse,textDecoration:"underline"},"&:before":{content:'""',borderRadius:A.shape.md,outline:`${Ve(1)} solid transparent`,outlineOffset:`-${Ve(1)}`,zIndex:-1,margin:A.gap.xs,backgroundColor:A.color.surface.contrast.default,position:"absolute",top:0,left:0,right:0,bottom:0,boxShadow:sU[2]},"[data-popper-reference-hidden] &":{visibility:"hidden",pointerEvents:"none"},'[data-popper-placement="top-start"] &, [data-popper-placement="bottom-start"] &':{left:Fn.negate(Rr.size50)},'[data-popper-placement="top-end"] &, [data-popper-placement="bottom-end"] &':{right:Fn.negate(Rr.size50)},'[data-popper-placement="left-start"] &, [data-popper-placement="right-start"] &':{top:Fn.negate(Rr.size50)},'[data-popper-placement="left-end"] &, [data-popper-placement="right-end"] &':{bottom:Fn.negate(Rr.size50)}}),modifiers:{elementHasFocus:{true:{padding:Fn.subtract(A.padding.md,Fn.divide(A.padding.xxs,2)),"&:before":{margin:Rr.size75}}}}}),Bne=je("div")({displayName:"TooltipContainer",Component:({children:e,transformOrigin:t=wN,elementHasFocus:n=!1,...a},r,i)=>{const o=gQ(t||wN,A.gap.sm);return S.jsx(i,{ref:r,...gt(a,[jne({tooltipTransformOriginHorizontal:t==null?void 0:t.horizontal,tooltipTransformOriginVertical:t==null?void 0:t.vertical,elementHasFocus:n}),Gv({positionX:o.x,positionY:o.y})]),children:e})}}),kN=(e,t=0)=>{const n=X.useRef(),a=()=>{n.current=window.setTimeout(e,t)},r=()=>{window.clearTimeout(n.current),n.current=void 0};return X.useEffect(()=>()=>{window.clearTimeout(n.current)},[n]),{start:a,clear:r}},qne=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 Gne({type:e="label",titleText:t="",showDelay:n=300,hideDelay:a=100}={}){const r=X.useRef(!1),i=ea(),[o,s]=X.useState(null),l=Bd(),u=kN(i.events.hide,a),c=kN(i.events.show,n),d=()=>{u.start(),c.clear()},p=()=>{c.start(),u.clear()},g=f=>{s(f.currentTarget),p()},b=f=>{r.current||g(f),r.current=!1},v=f=>{r.current=!0,qne(f.currentTarget)&&i.events.hide()};YU(i),ZU(i),ste(i),lte(i);const I=i.state.visibility!=="hidden",h={"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:v,onFocus:b,onBlur:d};return h["aria-describedby"]===void 0&&delete h["aria-describedby"],{targetProps:h,popperProps:{open:I,anchorElement:o,ref:i.state.stackRef},tooltipProps:{id:e==="describe"&&I?l:void 0,role:"tooltip",onMouseEnter:p,onMouseLeave:d}}}const mF=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=mF(e.children[n]);if(a)return a}return null}return null},gF=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=gF(e.children[n]);if(a)return a}return null},IN=e=>{const t=gF(e)||mF(e);return t?t.scrollWidth>t.clientWidth||t.scrollHeight>t.clientHeight:!1};function Hne(e,t,n=Object.keys(t)){return n.reduce((a,r)=>(typeof e[r]=="function"?a[r]=fU(t[r],e[r]):a[r]=t[r],a),{})}const Sw=({placement:e="top",fallbackPlacements:t=dF,children:n,...a})=>{const[r,i]=X.useState(""),{targetProps:o,popperProps:s,tooltipProps:l}=Gne({type:"muted"}),u=d=>{const p=d.currentTarget;i(p instanceof HTMLElement?p.innerText:""),IN(p)&&o.onMouseEnter(d)},c=d=>{const p=d.currentTarget;i(p instanceof HTMLElement?p.innerText:""),IN(p)&&o.onFocus(d)};return S.jsxs(X.Fragment,{children:[X.cloneElement(n,{...o,onMouseEnter:u,onFocus:c,"aria-label":void 0,...Hne({...o,onMouseEnter:u,onFocus:c},n.props)}),S.jsx(yw,{placement:e,fallbackPlacements:t,...s,children:({placement:d})=>{const p=QU(d);return S.jsx(Bne,{transformOrigin:p,...l,...a,children:r})}})]})},hF=Wr({defaultConfig:{id:void 0},requiredConfig:{}})(e=>({state:{id:Bd(e.id)},events:{}})),Vne=Ke({base:{fontFamily:st.default,fontSize:A.fontSize.subtext.lg,lineHeight:A.lineHeight.subtext.lg,letterSpacing:A.letterSpacing.subtext.lg,fontWeight:rt.bold,display:"flex",alignItems:"center",width:"100%",gap:A.gap.md,padding:`${A.padding.xs} ${A.padding.md}`}}),Wne=De()(e=>({"data-type":"group",role:"group","aria-labelledby":e.state.id})),Zne=De()(e=>({id:e.state.id})),TN=rn("div")({modelHook:hF,elemPropsHook:Zne})(({children:e,...t},n)=>S.jsx(Sw,{children:S.jsx(n,{...gt(t,Vne()),children:e})})),bF=qd("div")({displayName:"Menu.Group",modelHook:hF,elemPropsHook:Wne,subComponents:{Heading:TN}})(({children:e,title:t,...n},a)=>S.jsxs(a,{...gt(n),children:[t?S.jsx(TN,{children:t}):null,e]})),yl=Ke({parts:{text:"menu-item-text",icon:"menu-item-icon",selected:"menu-item-selected"},base:({textPart:e,iconPart:t,selectedPart:n})=>({fontFamily:st.default,fontWeight:rt.normal,fontSize:A.fontSize.subtext.lg,lineHeight:A.lineHeight.subtext.lg,letterSpacing:A.letterSpacing.subtext.lg,display:"flex",alignItems:"center",width:"100%",gap:A.gap.md,padding:`${A.padding.sm} ${A.padding.md}`,boxSizing:"border-box",cursor:"pointer",color:M.fg.default,borderWidth:0,borderRadius:A.shape.xxl,textAlign:"start",transition:"background-color 80ms, color 80ms",backgroundColor:"inherit",minHeight:A.size.md,overflowWrap:"anywhere",[Be.vars.color]:"currentColor",[`& :where(${n})`]:{transition:"opacity 80ms linear",opacity:lr.zero},"&:where(:has(span))":{display:"flex"},"&[aria-selected=true]":{color:A.color.brand.fg.primary.strong,backgroundColor:A.color.brand.surface.primary.strong,[`& :where(${n})`]:{opacity:lr.full},"&:where(.focus, :focus-visible)":{[Be.vars.color]:"currentColor",outline:"none",backgroundColor:A.color.brand.accent.primary,color:M.fg.inverse}},"&:is(.hover, :hover)":{color:M.fg.strong,backgroundColor:A.color.surface.overlay.hover.default},"&:is(.focus, :focus-visible)":{color:M.fg.inverse,backgroundColor:A.color.brand.accent.primary,outline:`${Ve(2)} solid transparent`,outlineOffset:`-${Ve(2)}`},"&:is(:disabled, [aria-disabled=true])":{cursor:"default",opacity:lr.disabled,"&:where(.hover, :hover, [aria-selected=true])":{background:"none"},"&:where(.focus, :focus-visible)":{backgroundColor:A.color.brand.accent.primary,opacity:lr.disabled}},[`& :where(${e})`]:{flexGrow:1,alignSelf:"center"},[`& :where(${t})`]:{alignSelf:"start"}})}),Yne=e=>S.jsx(dw,{...yl.parts.icon,...e}),vF=je("span")({Component:({...e},t,n)=>S.jsx(n,{ref:t,...yl.parts.text,...Jn(e)})}),yF=je("button")({displayName:"MenuItem",Component:({children:e,isDisabled:t,...n},a,r)=>S.jsx(r,{ref:a,"aria-disabled":t,...gt(n,yl({})),children:typeof e=="string"?S.jsx(vF,{children:e}):e})}),SF=De()(e=>({onKeyDown(t){const n=getComputedStyle(t.currentTarget);t.key==="ArrowLeft"&&n.direction==="ltr"&&e.UNSTABLE_parentModel&&e.events.hide(t)}})),EF=De()((e,t,n={"data-id":""})=>{const{localRef:a,elementRef:r}=Gd(t),i=n["data-id"];return X.useLayoutEffect(()=>{e.state.mode==="single"&&ic(e.state,i)&&requestAnimationFrame(()=>{var o;(o=a.current)==null||o.focus()})},[i,a,e.state.cursorId,e.state.mode]),{ref:r,className:ic(e.state,n["data-id"])?"focus":void 0}});function _F(e){e.UNSTABLE_parentModel&&(e.UNSTABLE_parentModel.events.hide(),_F(e.UNSTABLE_parentModel))}const Kne=Zi(De()(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),_F(e))}:void 0})),EF,SF,JQ,IU,Wd),Ti=rn("button")({displayName:"Menu.Item",modelHook:Pt,elemPropsHook:Kne,subComponents:{Icon:Yne,Text:vF}})(({children:e,...t},n)=>S.jsx(Sw,{placement:"left",children:S.jsx(yF,{as:n,...t,children:e})})),Xne=Zi(De()(e=>({role:"menu","aria-labelledby":e.state.id,"aria-orientation":e.state.orientation})),mte,ute),Jne=Ke({base:{background:A.color.surface.popover,borderRadius:A.shape.xxl,padding:0,gap:A.gap.xs},modifiers:{orientation:{vertical:{flexDirection:"column"},horizontal:{flexDirection:"row"}}}}),wF=rn("div")({displayName:"Menu.List",modelHook:Pt,elemPropsHook:Xne})(({children:e,...t},n,a)=>S.jsx(Wee,{as:n,model:a,marginY:A.gap.none,...Jn(t,Jne({orientation:a.state.orientation})),children:e})),kF=je("span")({Component:({...e},t,n)=>S.jsxs(S.Fragment,{children:[S.jsx(Ti.Text,{ref:t,as:n,...e}),S.jsx(dw,{...yl.parts.selected,icon:bte})]})}),Qne=je("li")({displayName:"MenuOption",Component:({children:e,...t},n,a)=>S.jsx(a,{ref:n,...gt(t,yl()),children:typeof e=="string"?S.jsx(kF,{children:e}):e})}),ere=Zi(De()((e,t,n={})=>{const a=n["data-id"]||"";return{role:"option","aria-selected":VQ(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()}}}),QQ,Wd),IF=rn("li")({displayName:"Menu.Item",modelHook:Pt,elemPropsHook:ere,subComponents:{Icon:Ti.Icon,Text:kF}})(({children:e,...t},n)=>S.jsx(Sw,{placement:"left",children:S.jsx(Qne,{as:n,...t,children:e})})),TF=cte,xF={modifiers:[{name:"offset",options:{offset:()=>[0,4]}}]},tre=rn("div")({modelHook:Pt,elemPropsHook:TF})(({children:e,...t})=>S.jsx(yw,{placement:"bottom-start",popperOptions:xF,...t,children:e})),RF=De()(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)}}})),nre=Zi(RF,pte),rre=Zi(RF,fte),are=rn(tF)({displayName:"Menu.Target",modelHook:Pt,elemPropsHook:nre})(({children:e,...t},n)=>S.jsx(n,{...t,children:e})),ire=rn(tF)({displayName:"Menu.Target",modelHook:Pt,elemPropsHook:rre})(({children:e,...t},n)=>S.jsx(n,{...t,children:e})),ore=rn("div")({modelHook:Pt,elemPropsHook:TF})(({children:e,...t})=>S.jsx(yw,{placement:"right-start",popperOptions:xF,...t,children:e})),sre=(e,t=0)=>{const n=F.useRef(),a=()=>{n.current=window.setTimeout(e,t)},r=()=>{window.clearTimeout(n.current),n.current=void 0};return F.useEffect(()=>()=>{window.clearTimeout(n.current)},[n]),{start:a,clear:r}},lre=Zi(Zl(e=>e.UNSTABLE_parentModel,EF),Zl(e=>e.UNSTABLE_parentModel,SF),Zl(e=>e.UNSTABLE_parentModel,IU),De()((e,t)=>({ref:Wi(t,e.state.targetRef)})),Zl(e=>e.UNSTABLE_parentModel,Wd),De()(e=>{const t=F.useRef(),n=sre(()=>{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}}}})),ure=rn("button")({modelHook:Pt,elemPropsHook:lre})(({children:e,...t},n)=>S.jsxs(yF,{as:n,...t,children:[typeof e=="string"?S.jsx(Ti.Text,{children:e}):e,S.jsx(Ti.Icon,{icon:vte})]})),cre=rn()({modelHook:Pt,subComponents:{Card:pF,List:wF,Item:Ti,TargetItem:ure,Group:bF,Option:IF,Divider:fF,Popper:ore}})(({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 S.jsx(o.Provider,{value:i,children:e})}),z=qd()({displayName:"Menu",modelHook:Pt,subComponents:{Target:are,Card:pF,List:wF,Item:Ti,Group:bF,Option:IF,Divider:fF,TargetContext:ire,Popper:tre,Submenu:cre}})(({children:e})=>S.jsx(S.Fragment,{children:e})),AF=()=>{const[e,t]=F.useState("");return S.jsxs(z,{onSelect:n=>t(n.id),children:[S.jsx(z.Target,{children:"Open Menu"}),S.jsx(z.Popper,{children:S.jsx(z.Card,{children:S.jsxs(z.List,{children:[S.jsx(z.Item,{children:"First Item"}),S.jsx(z.Item,{children:"Second Item"}),S.jsx(z.Divider,{}),S.jsx(z.Item,{children:"Third Item (with a really, really, really long label)"}),S.jsx(z.Item,{"aria-disabled":!0,children:"Fourth Item"})]})})}),S.jsxs(Yi,{size:"small",cs:{marginBlockStart:Vi.md},children:["Selected: ",S.jsx("span",{"data-testid":"output",children:e})]})]})};AF.__RAW__=`import React from 'react';
293
+ */(function(e){(function(){var t=typeof window<"u"&&typeof window.document<"u"?window.document:{},n=e.exports,a=function(){for(var o,s=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],l=0,u=s.length,c={};l<u;l++)if(o=s[l],o&&o[1]in t){for(l=0;l<o.length;l++)c[s[0][l]]=o[l];return c}return!1}(),r={change:a.fullscreenchange,error:a.fullscreenerror},i={request:function(o,s){return new Promise((function(l,u){var c=(function(){this.off("change",c),l()}).bind(this);this.on("change",c),o=o||t.documentElement;var d=o[a.requestFullscreen](s);d instanceof Promise&&d.then(c).catch(u)}).bind(this))},exit:function(){return new Promise((function(o,s){if(!this.isFullscreen){o();return}var l=(function(){this.off("change",l),o()}).bind(this);this.on("change",l);var u=t[a.exitFullscreen]();u instanceof Promise&&u.then(l).catch(s)}).bind(this))},toggle:function(o,s){return this.isFullscreen?this.exit():this.request(o,s)},onchange:function(o){this.on("change",o)},onerror:function(o){this.on("error",o)},on:function(o,s){var l=r[o];l&&t.addEventListener(l,s,!1)},off:function(o,s){var l=r[o];l&&t.removeEventListener(l,s,!1)},raw:a};if(!a){n?e.exports={isEnabled:!1}:window.screenfull={isEnabled:!1};return}Object.defineProperties(i,{isFullscreen:{get:function(){return!!t[a.fullscreenElement]}},element:{enumerable:!0,get:function(){return t[a.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return!!t[a.fullscreenEnabled]}}}),n?e.exports=i:window.screenfull=i})()})(_U);var CQ=_U.exports;const nr=Hv(CQ),OQ={lightest:"lightest",lighter:"lighter",light:"light",main:"base",dark:"dark",darkest:"darkest",contrast:"accent"},rN={lightest:"25",lighter:"50",light:"200",main:"600",dark:"700",darkest:"800"},$Q={primary:"primary",error:"critical",success:"positive",alert:"caution",neutral:"neutral"},LQ={focusOutline:Vt.focus,alertInner:Vt.caution.inner,alertOuter:Vt.caution.outer,errorInner:Vt.critical},DQ=No({[Vt.alertInner]:tc,[Vt.alertOuter]:nc,[Vt.errorInner]:KP,[Vt.focusOutline]:MP,[wr.accent]:sr,[wr.darkest]:iU,[wr.dark]:aU,[wr.base]:rU,[wr.light]:nU,[wr.lighter]:tU,[wr.lightest]:eU,[Gt.accent]:sr,[Gt.darkest]:HP,[Gt.dark]:GP,[Gt.base]:qP,[Gt.light]:BP,[Gt.lighter]:jP,[Gt.lightest]:zP,[It.accent]:sr,[It.darkest]:QP,[It.dark]:JP,[It.base]:XP,[It.light]:YP,[It.lighter]:ZP,[It.lightest]:WP,[Tt.accent]:VP,[Tt.darkest]:OP,[Tt.dark]:nc,[Tt.base]:tc,[Tt.light]:CP,[Tt.lighter]:NP,[Tt.lightest]:AP,[nt.accent]:sr,[nt.darkest]:FP,[nt.dark]:UP,[nt.base]:PP,[nt.light]:DP,[nt.lighter]:LP,[nt.lightest]:$P,[oU.primary]:`linear-gradient(90deg, ${nt.base} 0%, ${nt.dark} 100%)`,[M.brand.focus.primary]:Vt.focusOutline,[M.brand.border.primary]:Vt.focusOutline,[M.brand.accent.primary]:nt.base,[M.brand.accent.action]:nt.base,[M.brand.accent.critical]:It.base,[M.brand.accent.caution]:Tt.base,[M.brand.accent.positive]:Gt.base,[M.brand.fg.primary.default]:nt.base,[M.brand.fg.primary.strong]:nt.dark,[M.brand.fg.critical.default]:It.base,[M.brand.fg.critical.strong]:It.dark,[M.brand.fg.caution.default]:Tt.darkest,[M.brand.fg.caution.strong]:Tt.darkest,[M.brand.fg.positive.default]:Gt.base,[M.brand.fg.positive.strong]:Gt.dark,[M.brand.fg.selected]:nt.dark,[M.brand.focus.critical]:It.dark,[M.brand.border.critical]:It.base,...M.brand.focus.caution?{[M.brand.focus.caution.inner]:Vt.alertInner,[M.brand.focus.caution.outer]:Tt.dark}:{},[M.brand.border.caution]:Tt.dark,[M.brand.surface.primary.default]:nt.lightest,[M.brand.surface.primary.strong]:nt.lighter,[M.brand.surface.critical.default]:It.lightest,[M.brand.surface.critical.strong]:It.lighter,[M.brand.surface.caution.default]:Tt.lightest,[M.brand.surface.caution.strong]:Tt.lighter,[M.brand.surface.positive.default]:Gt.lightest,[M.brand.surface.positive.strong]:Gt.lighter,[M.brand.surface.selected]:nt.lighter}),MQ=(e,t)=>{const n=rQ(e),a=(t.className||"").split(" ").concat(DQ).join(" "),r=t.style||{},{palette:i}=n.canvas;return["common","primary","error","alert","success","neutral"].forEach(o=>{o==="common"?["focusOutline","alertInner","alertOuter","errorInner"].forEach(s=>{if(i.common[s]!==Gn.palette.common[s]){const l=zv(i.common[s]);r[Vt[s]]=l,r[LQ[s]]=l,s==="focusOutline"&&(r[M.brand.focus.primary]=l,r[M.brand.border.primary]=l),s==="alertInner"&&(r[M.brand.focus.caution.inner]=l),s==="alertOuter"&&(r[M.brand.border.caution]=l),s==="errorInner"&&(r[M.brand.focus.critical]=l,r[M.brand.border.critical]=l)}}):["lightest","lighter","light","main","dark","darkest","contrast"].forEach(s=>{var l,u,c,d,p;if(i[o][s]!==Gn.palette[o][s]){const g=zv(i[o][s]);if(r[VA[o][OQ[s]]]=g,s!=="contrast"&&s in rN){const b=$Q[o],v=rN[s],I=VA[b+v];if(I&&(r[I]=g),s==="main"){const h=M.brand.accent[b];h&&(r[h]=g);const f=(l=M.brand.fg[b])==null?void 0:l.default;if(f&&(r[f]=g),b==="primary"&&!(i.common.focusOutline!==Gn.palette.common.focusOutline)){const y=M.brand.focus.primary;r[y]=g}}else if(s==="dark"){const h=(u=M.brand.fg[b])==null?void 0:u.strong;if(h&&(r[h]=g),b==="primary"){const f=M.brand.fg.selected;r[f]=g}if(b==="critical"){const f=M.brand.focus.critical;r[f]=g;const m=M.brand.border.critical;r[m]=g}if(b==="caution"){const f=(c=M.brand.focus.caution)==null?void 0:c.outer;r[f]=g;const m=M.brand.border.caution;r[m]=g}}else if(s==="lighter"){const h=(d=M.brand.surface[b])==null?void 0:d.strong;if(h&&(r[h]=g),b==="primary"){const f=M.brand.surface.selected;r[f]=g}}else if(s==="lightest"){const h=(p=M.brand.surface[b])==null?void 0:p.default;h&&(r[h]=g)}}}})}),{...t,className:a,style:r}},Nb=e=>e===void 0?"":typeof e=="string"?e:e.id||"",Cb=e=>typeof e=="string"?e:e===void 0?"":e.text||"",PQ={items:[]},Yl=Wr({defaultConfig:{...PQ,id:"",getId:Nb,getTextValue:Cb,nonInteractiveIds:[],orientation:"vertical",defaultItemHeight:50,shouldVirtualize:!0}})(e=>{var h;const t=Bd(e.id),n=F.useRef(Nb),a=F.useRef(Cb);n.current=e.getId||Nb,a.current=e.getTextValue||e.getId||Cb;const[r]=F.useState(e.orientation||"vertical"),[i,o]=F.useState(e.defaultItemHeight),s=e.shouldVirtualize&&!!((h=e.items)!=null&&h.length),l=F.useRef(0),u=F.useRef(null),c=F.useMemo(()=>(e.items||[]).map((f,m)=>({id:n.current(f),index:m,value:f,textValue:a.current(f)})),[e.items]),[d,p]=F.useState([]),g=qY({count:c.length,getScrollElement:()=>u.current,estimateSize:F.useCallback(()=>i,[i]),horizontal:e.orientation==="horizontal",overscan:3});return{state:{...{items:c.length?c:d},UNSTABLE_virtual:g,UNSTABLE_defaultItemHeight:i,containerRef:u,id:t,orientation:r,indexRef:l,nonInteractiveIds:e.nonInteractiveIds||[],isVirtualized:s},events:{registerItem(f){l.current++,p(m=>m.concat({...f,value:f,index:m.length}))},unregisterItem(f){p(m=>m.find(y=>y.id===f.id)?m.filter(y=>y.id!==f.id):m)},updateItemHeight(f){o(f.value)}},getId:e.getId,getTextValue:e.getTextValue}}),UQ=e=>e,Hd=()=>0,Vd=(e,{state:t})=>t.items.length-1,FQ=(e,{state:t})=>{if(t.columnCount){const n=e%t.columnCount;return e-n}return Hd()},zQ=(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 Vd(e,{state:t})},jQ=(e,{state:t})=>t.columnCount?e%t.columnCount:Hd(),BQ=(e,{state:t})=>t.columnCount?t.items.length-t.columnCount+e%t.columnCount:Vd(e,{state:t}),qQ=(e,{state:t})=>t.items.find(n=>n.id===e),GQ=e=>typeof e.cursorId=="string"?e.cursorId:e.cursorId.slice(-1)[0]||"",ic=(e,t)=>{const{cursorId:n}=e;return n==null||n===""?!1:typeof n=="string"?n===t:n.includes(t)},yo=e=>(t,{state:n},a=n.items.length)=>{if(Number.isNaN(t)){if(e===1)return Hd();if(e===-1)return Vd(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?yo(e)(i,{state:n},a-1):i},HQ=UQ({getFirst:Hd,getLast:Vd,getItem:qQ,getNext:yo(1),getNextRow:(e,{state:t})=>yo(t.columnCount)(e,{state:t}),getPrevious:yo(-1),getPreviousRow:(e,{state:t})=>yo(-t.columnCount)(e,{state:t}),getPreviousPage:jQ,getNextPage:BQ,getFirstOfRow:FQ,getLastOfRow:zQ}),Kl=Wr({defaultConfig:{...Yl.defaultConfig,initialCursorId:"",columnCount:0,navigation:HQ,pageSize:0},requiredConfig:Yl.requiredConfig,contextOverride:Yl.Context})(e=>{var d;const[t,n]=F.useState(e.initialCursorId),a=F.useRef(e.pageSize),r=e.columnCount||0,i=Yl(e),o=e.navigation,s=F.useRef(-1),l=p=>{var b;const g=((b=u.items[p])==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(p=>p.id===t):t||(s.current=-1);const u={...i.state,cursorId:t,columnCount:r,pageSizeRef:a,cursorIndexRef:s},c={...i.events,goTo(p){const g=u.items.findIndex(b=>b.id===p.id);l(g)},goToNext(){const p=o.getNext(s.current,{state:u});l(p)},goToPrevious(){const p=o.getPrevious(s.current,{state:u});l(p)},goToPreviousRow(){const p=o.getPreviousRow(s.current,{state:u});l(p)},goToNextRow(){const p=o.getNextRow(s.current,{state:u});l(p)},goToFirst(){const p=o.getFirst(s.current,{state:u});l(p)},goToLast(){const p=o.getLast(s.current,{state:u});l(p)},goToFirstOfRow(){const p=o.getFirstOfRow(s.current,{state:u});l(p)},goToLastOfRow(){const p=o.getLastOfRow(s.current,{state:u});l(p)},goToNextPage(){const p=o.getNextPage(s.current,{state:u});l(p)},goToPreviousPage(){const p=o.getPreviousPage(s.current,{state:u});l(p)}};return{...i,state:u,events:c,navigation:o}}),VQ=(e,{selectedIds:t,unselectedIds:n})=>t==="all"?!n.includes(e):t.includes(e),wU={select(e){return{selectedIds:[e],unselectedIds:[]}}},WQ={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:[]}}},Ob=Wr({defaultConfig:{...Kl.defaultConfig,initialSelectedIds:[],initialUnselectedIds:[],selection:wU},requiredConfig:Kl.requiredConfig,contextOverride:Kl.Context})(e=>{const t=Kl(e),[n,a]=F.useState(e.initialSelectedIds),[r,i]=F.useState(e.initialUnselectedIds),o=e.selection,s={...t.state,selectedIds:n,unselectedIds:r},l={...t.events,select(u){const{selectedIds:c,unselectedIds:d}=o.select(u.id,s);a(c),i(d)},selectAll(){a("all")},unselectAll(){a([])},setSelectedIds(u){a(u)},remove(u){}};return{...t,state:s,events:l,selection:o}}),Za=Wr({defaultConfig:{UNSTABLE_parentModel:void 0,...Ob.defaultConfig},requiredConfig:Ob.requiredConfig})(e=>({UNSTABLE_parentModel:e.UNSTABLE_parentModel,...Ob(e)})),gu=F.createContext({});function ZQ(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 S.jsx(gu.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 S.jsx(gu.Provider,{value:{item:a},children:r},a.id||a.index)}):S.jsx(gu.Provider,{value:{},children:t})}const Wd=De()((e,t,n={})=>{const{state:a,events:r}=e,{item:i,virtual:o}=F.useContext(gu),[s,l]=F.useState(n["data-id"]||(i==null?void 0:i.id)||""),{localRef:u,elementRef:c}=Gd(Wi(t,o?e.state.UNSTABLE_virtual.measureElement:null)),d=o?{position:"absolute",top:0,left:0,transform:`translateY(${o.start}px)`}:{};return SQ(()=>{var v;if((o==null?void 0:o.index)===0&&((v=u.current)!=null&&v.clientHeight),i)return;const p=a.indexRef.current,g=s||(n["data-has-children"]?`${a.id}-`:"")+String(p);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:c,"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:bU(`${a.id}-${s}`)}}),Bv={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"}},YQ={ArrowLeft:"ArrowRight",Left:"Right",ArrowRight:"ArrowLeft",Right:"Left",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",Home:"Home",End:"End",PageDown:"PageDown",PageUp:"PageUp"},aN={...Bv.horizontal,Home:"goToFirstOfRow",End:"goToLastOfRow",ArrowUp:"goToPreviousRow",Up:"goToPreviousRow",ArrowDown:"goToNextRow",Down:"goToNextRow"},$b={Home:"goToFirst",End:"goToLast"},iN=(e,t)=>e.hasOwnProperty(t);function KQ(e,t){var r,i,o,s;if(e.ctrlKey){for(const l in $b)if(iN($b,l)&&e.key===l)return(i=(r=t.events)[$b[l]])==null||i.call(r),!0}const n=t.state.columnCount>0?aN:Bv[t.state.orientation],a=pU(e.currentTarget);for(const l in n)if(iN(n,l)&&(a?e.key===YQ[l]:e.key===l)){const u=t.state.columnCount>0?aN[l]:Bv[t.state.orientation][l];if(t.events[u])return(s=(o=t.events)[u])==null||s.call(o),!0}return!1}const kU=(e,t,n)=>{e()===!1&&t>1&&requestAnimationFrame(()=>kU(e,t-1)),n==null||n("Retry timeout")},XQ=(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=u=>document.querySelector(`[data-focus-id="${dU(`${u}-${o.id}`)}"]`);kU(()=>{const u=l(i)||l(e.state.id);return u&&(u.focus(),a(u)),!!u},5,r)}}),IU=De()((e,t,n={})=>{const a=F.useRef(e.state);a.current=e.state;const r=F.useRef(null);return F.useEffect(()=>{r.current&&XQ(e,GQ(e.state),r.current).then(()=>{r.current=null})},[e.state.cursorId]),F.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){KQ(i,e)&&(i.preventDefault(),r.current=i.currentTarget)},onClick(){e.events.goTo({id:n["data-id"]})},"data-focus-id":bU(`${e.state.id}-${n["data-id"]}`),tabIndex:e.state.cursorId?n["data-id"]&&ic(e.state,n["data-id"])?0:-1:0}}),JQ=De()(({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})}}}),QQ=De()((e,t,n={})=>{const a=n["data-id"]||"";return{className:ic(e.state,a)?"focus":""}}),eee=e=>aQ[e]||Vn(e),tee=e=>iQ[e],nee=e=>oQ[e]||Vn(e),ree=e=>sQ[e]||Vn(e),aee=e=>sw.properties.fontFamilies[e]||Vn(e),iee=e=>sw.properties.fontSizes[e]||Vn(e),oee=e=>sw.properties.fontWeights[e]||Vn(e);function mt(e){return e.reduce((t={},n)=>{const a=r=>n.properties.reduce((i={},o)=>{if(n.system==="color")return{...i,[o]:eee(r)};if(n.system==="depth"){const s=tee(r);return{...i,...s}}return n.system==="font"?{...i,[o]:aee(r)}:n.system==="fontSize"?{...i,[o]:iee(r)}:n.system==="fontWeight"?{...i,[o]:oee(r)}:n.system==="shape"?{...i,[o]:nee(r)}:n.system==="space"?{...i,[o]:ree(r)}:{...i,[o]:r}},{});return{...t,[n.name]:a}},{})}function an(e){return t=>{let n={};for(const a in t)if(a in t&&a in e){const r=e[a],i=t[a],o=r(i);n={...n,...o};continue}return n}}const TU=[{name:"background",properties:["background"],system:"color"},{name:"backgroundAttachment",properties:["backgroundAttachment"],system:"none"},{name:"backgroundColor",properties:["backgroundColor"],system:"color"},{name:"backgroundImage",properties:["backgroundImage"],system:"none"},{name:"backgroundPosition",properties:["backgroundPosition"],system:"none"},{name:"backgroundRepeat",properties:["backgroundRepeat"],system:"none"},{name:"backgroundSize",properties:["backgroundSize"],system:"none"}],see=mt(TU),lee=an(see),xU=[{name:"borderColor",properties:["borderColor"],system:"color"},{name:"borderTopColor",properties:["borderTopColor"],system:"color"},{name:"borderRightColor",properties:["borderRightColor"],system:"color"},{name:"borderBottomColor",properties:["borderBottomColor"],system:"color"},{name:"borderLeftColor",properties:["borderLeftColor"],system:"color"},{name:"borderInlineStartColor",properties:["borderInlineStartColor"],system:"color"},{name:"borderInlineEndColor",properties:["borderInlineEndColor"],system:"color"}],uee=mt(xU),RU=[{name:"borderCollapse",properties:["borderCollapse"],system:"none"},{name:"borderSpacing",properties:["borderSpacing"],system:"none"},{name:"borderStyle",properties:["borderStyle"],system:"none"},{name:"borderTopStyle",properties:["borderTopStyle"],system:"none"},{name:"borderRightStyle",properties:["borderRightStyle"],system:"none"},{name:"borderBottomStyle",properties:["borderBottomStyle"],system:"none"},{name:"borderLeftStyle",properties:["borderLeftStyle"],system:"none"},{name:"borderInlineStartStyle",properties:["borderInlineStartStyle"],system:"none"},{name:"borderInlineEndStyle",properties:["borderInlineEndStyle"],system:"none"}],cee=mt(RU),AU=[{name:"borderRadius",properties:["borderRadius"],system:"shape"},{name:"borderTopLeftRadius",properties:["borderTopLeftRadius"],system:"shape"},{name:"borderTopRightRadius",properties:["borderTopRightRadius"],system:"shape"},{name:"borderBottomLeftRadius",properties:["borderBottomLeftRadius"],system:"shape"},{name:"borderBottomRightRadius",properties:["borderBottomRightRadius"],system:"shape"}],dee=mt(AU),NU=[{name:"border",properties:["border"],system:"none"},{name:"borderTop",properties:["borderTop"],system:"none"},{name:"borderRight",properties:["borderRight"],system:"none"},{name:"borderBottom",properties:["borderBottom"],system:"none"},{name:"borderLeft",properties:["borderLeft"],system:"none"},{name:"borderInlineStart",properties:["borderInlineStart"],system:"none"},{name:"borderInlineEnd",properties:["borderInlineEnd"],system:"none"}],pee=mt(NU),CU=[{name:"borderWidth",properties:["borderWidth"],system:"none"},{name:"borderTopWidth",properties:["borderTopWidth"],system:"none"},{name:"borderRightWidth",properties:["borderRightWidth"],system:"none"},{name:"borderBottomWidth",properties:["borderBottomWidth"],system:"none"},{name:"borderLeftWidth",properties:["borderLeftWidth"],system:"none"},{name:"borderInlineStartWidth",properties:["borderInlineStartWidth"],system:"none"},{name:"borderInlineEndWidth",properties:["borderInlineEndWidth"],system:"none"}],fee=mt(CU),mee=an({...uee,...cee,...dee,...pee,...fee}),gee=[...xU,...RU,...AU,...NU,...CU],OU=[{name:"backgroundColor",properties:["backgroundColor"],system:"color"},{name:"color",properties:["color"],system:"color"},{name:"opacity",properties:["opacity"],system:"none"}],hee=mt(OU),bee=an(hee),$U=[{name:"boxShadow",properties:["boxShadow"],system:"none"},{name:"depth",properties:["boxShadow"],system:"depth"}],vee=mt($U),yee=an(vee),LU=[{name:"flex",properties:["flex"],system:"none"},{name:"flexGrow",properties:["flexGrow"],system:"none"},{name:"flexShrink",properties:["flexShrink"],system:"none"},{name:"flexBasis",properties:["flexBasis"],system:"none"},{name:"justifySelf",properties:["justifySelf"],system:"none"},{name:"alignSelf",properties:["alignSelf"],system:"none"},{name:"order",properties:["order"],system:"none"}],See=mt(LU),Eee=an(See),DU=[{name:"gridColumnStart",properties:["gridColumnStart"],system:"none"},{name:"gridColumnEnd",properties:["gridColumnEnd"],system:"none"},{name:"gridRowStart",properties:["gridRowStart"],system:"none"},{name:"gridRowEnd",properties:["gridRowEnd"],system:"none"},{name:"gridColumn",properties:["gridColumn"],system:"none"},{name:"gridRow",properties:["gridRow"],system:"none"},{name:"gridArea",properties:["gridArea"],system:"none"},{name:"justifySelf",properties:["justifySelf"],system:"none"},{name:"alignSelf",properties:["alignSelf"],system:"none"},{name:"placeSelf",properties:["placeSelf"],system:"none"}],_ee=mt(DU),wee=an(_ee),MU=[{name:"display",properties:["display"],system:"none"},{name:"height",properties:["height"],system:"space"},{name:"listStyle",properties:["listStyle"],system:"none"},{name:"maxHeight",properties:["maxHeight"],system:"space"},{name:"maxWidth",properties:["maxWidth"],system:"space"},{name:"minHeight",properties:["minHeight"],system:"space"},{name:"minWidth",properties:["minWidth"],system:"space"},{name:"overflow",properties:["overflow"],system:"none"},{name:"overflowX",properties:["overflowX"],system:"none"},{name:"overflowY",properties:["overflowY"],system:"none"},{name:"verticalAlign",properties:["verticalAlign"],system:"none"},{name:"width",properties:["width"],system:"space"}],kee=mt(MU),Iee=an(kee),PU=[{name:"animation",properties:["animation"],system:"none"},{name:"appearance",properties:["appearance"],system:"none"},{name:"boxSizing",properties:["boxSizing"],system:"none"},{name:"content",properties:["content"],system:"none"},{name:"cursor",properties:["cursor"],system:"none"},{name:"fill",properties:["fill"],system:"none"},{name:"float",properties:["float"],system:"none"},{name:"objectFit",properties:["objectFit"],system:"none"},{name:"objectPosition",properties:["objectPosition"],system:"none"},{name:"outline",properties:["outline"],system:"none"},{name:"outlineOffset",properties:["outlineOffset"],system:"none"},{name:"overflowWrap",properties:["overflowWrap"],system:"none"},{name:"pointerEvents",properties:["pointerEvents"],system:"none"},{name:"resize",properties:["resize"],system:"none"},{name:"stroke",properties:["stroke"],system:"none"},{name:"transform",properties:["transform"],system:"none"},{name:"transition",properties:["transition"],system:"none"},{name:"userSelect",properties:["userSelect"],system:"none"},{name:"visibility",properties:["visibility"],system:"none"}],Tee=mt(PU),xee=an(Tee),UU=[{name:"position",properties:["position"],system:"none"},{name:"zIndex",properties:["zIndex"],system:"none"},{name:"top",properties:["top"],system:"none"},{name:"right",properties:["right"],system:"none"},{name:"bottom",properties:["bottom"],system:"none"},{name:"left",properties:["left"],system:"none"},{name:"inset",properties:["inset"],system:"none"},{name:"insetInlineStart",properties:["insetInlineStart"],system:"none"},{name:"insetInlineEnd",properties:["insetInlineEnd"],system:"none"}],Ree=mt(UU),Aee=an(Ree),FU=[{name:"marginInlineStart",properties:["marginInlineStart"],system:"space"},{name:"marginInlineEnd",properties:["marginInlineEnd"],system:"space"},{name:"paddingInlineStart",properties:["paddingInlineStart"],system:"space"},{name:"paddingInlineEnd",properties:["paddingInlineEnd"],system:"space"},{name:"margin",properties:["margin"],system:"space"},{name:"marginX",properties:["marginInline"],system:"space"},{name:"marginY",properties:["marginBlock"],system:"space"},{name:"marginTop",properties:["marginTop"],system:"space"},{name:"marginRight",properties:["marginRight"],system:"space"},{name:"marginBottom",properties:["marginBottom"],system:"space"},{name:"marginLeft",properties:["marginLeft"],system:"space"},{name:"padding",properties:["padding"],system:"space"},{name:"paddingX",properties:["paddingInline"],system:"space"},{name:"paddingY",properties:["paddingBlock"],system:"space"},{name:"paddingTop",properties:["paddingTop"],system:"space"},{name:"paddingRight",properties:["paddingRight"],system:"space"},{name:"paddingBottom",properties:["paddingBottom"],system:"space"},{name:"paddingLeft",properties:["paddingLeft"],system:"space"}],Nee=mt(FU),Cee=an(Nee),zU=[{name:"fontFamily",properties:["fontFamily"],system:"font"},{name:"fontSize",properties:["fontSize"],system:"fontSize"},{name:"fontStyle",properties:["fontStyle"],system:"none"},{name:"fontWeight",properties:["fontWeight"],system:"fontWeight"},{name:"lineHeight",properties:["lineHeight"],system:"none"},{name:"letterSpacing",properties:["letterSpacing"],system:"none"},{name:"textAlign",properties:["textAlign"],system:"none"},{name:"textDecoration",properties:["textDecoration"],system:"none"},{name:"textOverflow",properties:["textOverflow"],system:"none"},{name:"textTransform",properties:["textTransform"],system:"none"},{name:"textShadow",properties:["textShadow"],system:"none"},{name:"whiteSpace",properties:["whiteSpace"],system:"none"},{name:"wordBreak",properties:["wordBreak"],system:"none"}],Oee=mt(zU),$ee=an(Oee),Lee=["display","color","height","overflow","width","border","background","fontSize","fontWeight","fontFamily","letterSpacing","lineHeight","textAlign","opacity","textDecoration","textOverflow","textTransform","textShadow","whiteSpace","wordBreak"],Dee=e=>bP(e)&&!Lee.includes(e),uw=e=>[{boxSizing:"border-box"},lee,mee,bee,yee,Eee,wee,Iee,xee,Aee,Cee,$ee].reduce((t,n)=>{const a=typeof n=="function"?n(e):n;for(const r in a)t[r]=a[r];return t},{}),Mee=ec("div",{shouldForwardProp:Dee})(uw),Pee=ec("div")(uw),Uee=je("div")({displayName:"Box",Component:({children:e,...t},n,a)=>{const r=mU(()=>typeof a=="string"?Mee:Pee);return S.jsx(r,{as:a,ref:n,...Jn(t),children:e})}}),jU=[{name:"alignContent",properties:["alignContent"],system:"none"},{name:"alignItems",properties:["alignItems"],system:"none"},{name:"display",properties:["display"],system:"none"},{name:"flexDirection",properties:["flexDirection"],system:"none"},{name:"flexWrap",properties:["flexWrap"],system:"none"},{name:"justifyContent",properties:["justifyContent"],system:"none"},{name:"justifyItems",properties:["justifyItems"],system:"none"},{name:"gap",properties:["gap"],system:"space"},{name:"columnGap",properties:["columnGap"],system:"space"},{name:"rowGap",properties:["rowGap"],system:"space"}],Fee=mt(jU),zee=an(Fee),BU=[{name:"gridGap",properties:["gridGap"],system:"space"},{name:"gridRowGap",properties:["gridRowGap"],system:"space"},{name:"gridColumnGap",properties:["gridColumnGap"],system:"space"},{name:"alignContent",properties:["alignContent"],system:"none"},{name:"alignItems",properties:["alignItems"],system:"none"},{name:"display",properties:["display"],system:"none"},{name:"justifyContent",properties:["justifyContent"],system:"none"},{name:"justifyItems",properties:["justifyItems"],system:"none"},{name:"gridTemplateAreas",properties:["gridTemplateAreas"],system:"none"},{name:"gridTemplate",properties:["gridTemplate"],system:"none"},{name:"gridTemplateColumns",properties:["gridTemplateColumns"],system:"none"},{name:"gridTemplateRows",properties:["gridTemplateRows"],system:"none"},{name:"gridPlaceItems",properties:["gridPlaceItems"],system:"none"},{name:"gridAutoColumns",properties:["gridAutoColumns"],system:"none"},{name:"gridAutoRows",properties:["gridAutoRows"],system:"none"},{name:"gridAutoFlow",properties:["gridAutoFlow"],system:"none"},{name:"gridArea",properties:["gridArea"],system:"none"},{name:"grid",properties:["grid"],system:"none"}],jee=mt(BU),Bee=an(jee),qee=[...TU,...gee,...OU,...$U,...jU,...LU,...BU,...DU,...MU,...PU,...UU,...FU,...zU].reduce((e,t)=>(e[t.name]=!0,e),{});function Gee(e){return qee[e]||!1}function gt(e,t){const n={};let a=!1;const r=Object.keys(e).reduce((o,s)=>(Gee(s)?(a=!0,n[s]=e[s]):o[s]=e[s],o),{});let i={};return a&&(i={...uw(n),...zee(n),...Bee(n)}),Jn(r,[t,i])}const Hee=rn("li")({displayName:"Item",modelHook:Za,elemPropsHook:Wd})((e,t)=>S.jsx(t,{...gt(e)})),Vee=De()(e=>({style:{position:"relative",height:e.state.isVirtualized?e.state.UNSTABLE_virtual.getTotalSize():void 0}})),oN=Ke({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"}}}}}),Wee=qd("ul")({displayName:"ListBox",modelHook:Za,elemPropsHook:Vee,subComponents:{Item:Hee}})(({height:e,maxHeight:t,marginY:n,marginBottom:a,overflowY:r,marginTop:i,...o},s,l)=>S.jsx("div",{ref:l.state.containerRef,...oN.parts.listBoxContainer,...Jn({style:{height:e,maxHeight:t,marginBottom:a??n,marginTop:i??n}},oN({orientation:l.state.orientation})),children:S.jsx(s,{...gt(o),"data-part":"list",children:ZQ(l,o.children)})})),wa=Ke({base:{},modifiers:{typeLevel:{"title.large":{fontFamily:st.default,fontWeight:rt.bold,fontSize:A.fontSize.title.lg,lineHeight:A.lineHeight.title.lg,color:M.fg.strong},"title.medium":{fontFamily:st.default,fontWeight:rt.bold,fontSize:A.fontSize.title.md,lineHeight:A.lineHeight.title.md,color:M.fg.strong},"title.small":{fontFamily:st.default,fontWeight:rt.bold,lineHeight:A.lineHeight.title.sm,fontSize:A.fontSize.title.sm,color:M.fg.strong},"heading.large":{fontFamily:st.default,fontWeight:rt.bold,fontSize:A.fontSize.heading.lg,lineHeight:A.lineHeight.heading.lg,color:M.fg.strong},"heading.medium":{fontFamily:st.default,fontWeight:rt.bold,fontSize:A.fontSize.heading.md,lineHeight:A.lineHeight.heading.md,color:M.fg.strong},"heading.small":{fontFamily:st.default,fontWeight:rt.bold,fontSize:A.fontSize.heading.sm,lineHeight:A.lineHeight.heading.sm,color:M.fg.strong},"body.large":{fontFamily:st.default,fontWeight:rt.normal,fontSize:A.fontSize.body.lg,lineHeight:A.lineHeight.body.lg,color:M.fg.default},"body.medium":{fontFamily:st.default,fontWeight:rt.normal,fontSize:A.fontSize.body.md,lineHeight:A.lineHeight.body.md,color:M.fg.default},"body.small":{fontFamily:st.default,fontWeight:rt.normal,fontSize:A.fontSize.body.sm,lineHeight:A.lineHeight.body.sm,letterSpacing:A.letterSpacing.body.sm,color:M.fg.default},"subtext.large":{fontFamily:st.default,fontWeight:rt.normal,fontSize:A.fontSize.subtext.lg,lineHeight:A.lineHeight.subtext.lg,letterSpacing:A.letterSpacing.subtext.lg,color:M.fg.default},"subtext.medium":{fontFamily:st.default,fontWeight:rt.normal,fontSize:A.fontSize.subtext.md,lineHeight:A.lineHeight.subtext.md,letterSpacing:A.letterSpacing.subtext.md,color:M.fg.default},"subtext.small":{fontFamily:st.default,fontWeight:rt.normal,fontSize:A.fontSize.subtext.sm,lineHeight:A.lineHeight.subtext.sm,letterSpacing:A.letterSpacing.subtext.sm,color:M.fg.default}},variant:{error:{color:A.color.brand.fg.critical.default},hint:{color:M.fg.muted.default},inverse:{color:M.fg.inverse}}}});je("span")({displayName:"Text",Component:({children:e,typeLevel:t,variant:n,...a},r,i)=>S.jsx(i,{ref:r,...gt(a,wa({typeLevel:t,variant:n})),children:e})});const Zee=Ke({extends:wa,base:{}});je("p")({displayName:"Subtext",Component:({size:e,variant:t,...n},a,r)=>{const i=`subtext.${e}`;return S.jsx(r,{ref:a,...gt(n,Zee({typeLevel:i,variant:t}))})}});const Yee=Ke({extends:wa,base:{}}),Yi=je("p")({displayName:"BodyText",Component:({size:e,variant:t,...n},a,r)=>{const i=`body.${e}`;return S.jsx(r,{ref:a,...gt(n,Yee({typeLevel:i,variant:t}))})}}),Kee=Ke({extends:wa,base:{}});je("h2")({displayName:"Heading",Component:({size:e,variant:t,...n},a,r)=>{const i=`heading.${e}`;return S.jsx(r,{ref:a,...gt(n,Kee({typeLevel:i,variant:t}))})}});const Xee=Ke({extends:wa,base:{}});je("h1")({displayName:"Title",Component:({size:e,variant:t,...n},a,r)=>{const i=`title.${e}`;return S.jsx(r,{ref:a,...gt(n,Xee({typeLevel:i,variant:t}))})}});const Jee=Ke({extends:wa,base:{},defaultModifiers:{typeLevel:"subtext.large"}}),Qee=je("div")({displayName:"Card.Body",Component:({children:e,...t},n,a)=>S.jsx(a,{ref:n,...gt(t,Jee()),children:e})}),ete=Ke({extends:wa,base:{color:M.fg.strong,fontWeight:rt.bold,marginBlock:A.padding.none},defaultModifiers:{typeLevel:"body.large"}}),tte=je("h3")({displayName:"Card.Heading",Component:({children:e,...t},n,a)=>S.jsx(a,{ref:n,...gt(t,ete()),children:e})}),nte=Ke({base:{display:"flex",flexDirection:"column",gap:A.gap.lg,padding:A.padding.xl,backgroundColor:A.color.surface.default,borderRadius:A.shape.xxl,border:`${Ve(1)} solid ${A.color.border.default}`},modifiers:{variant:{borderless:{borderColor:"transparent"},tonal:{backgroundColor:A.color.surface.alt.default,borderColor:M.border.transparent}}}}),rte=je("div")({displayName:"Card",Component:({children:e,variant:t,...n},a,r)=>S.jsx(r,{ref:a,...gt(n,nte({variant:t})),children:e}),subComponents:{Heading:tte,Body:Qee}});function ate(e){return e.length?e[e.length-1]:null}function qU(e,t){const{min:n,max:a}=cw.zIndex;return t<=a-n?e+n:Math.max(n,a-(t-e)+1)}function Lb(e){const t=e.length;e.forEach((n,a)=>{n.style.zIndex=String(qU(a,t))})}function ite(e,t){let n=e;do{const a=t.find(r=>r.element===n);if(a)return a.element}while(n=n.parentElement)}function ote(e,t){return t.filter(a=>a.owner).map(a=>({element:a.element,parent:ite(a.owner,t)})).filter(a=>a.parent===e.element)}function GU(e,t){const n=t.split("."),a=n.splice(0,1)[0];return n.length&&e[a]?GU(e[a],n.join(".")):e[a]}function HU(e,t,n){const a=t.split("."),r=a.splice(0,1)[0];return a.length?(e[r]===void 0&&(e[r]={}),HU(e[r],a.join("."),n)):e[r]=n,n}typeof window<"u"&&(window.workday=window.workday||{});const VU=e=>{if(typeof window<"u")return GU(window,e)},WU=(e,t)=>{typeof window<"u"&&HU(window,e,t)},sN=(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},cw=VU("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:qU},_adapter:{}};WU("workday.__popupStack",cw);const rr=VU("workday.__popupStackOfStacks")||[cw];rr.description="Global stack of popup stacks from @workday/canvas-kit/popup-stack";WU("workday.__popupStackOfStacks",rr);function Qn(){return rr[rr.length-1]}const St={createContainer(){var n;const e=Qn();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=Qn();if((n=t._adapter)!=null&&n.add){t._adapter.add(e);return}t.items.push(e),sN(t,e.owner).appendChild(e.element),Lb(St.getElements())},remove(e){var n;const t=rr.find(a=>!!St.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),sN(t,a==null?void 0:a.owner).removeChild(e),Lb(St.getElements(t))}},isTopmost(e){var a;const t=Qn();if((a=t._adapter)!=null&&a.isTopmost)return t._adapter.isTopmost(e);const n=ate(t.items);return n?n.element===e:!1},getElements(e){var n;const t=e||Qn();return(n=t._adapter)!=null&&n.getElements?t._adapter.getElements():t.items.map(a=>a.element)},bringToTop(e){var a;const t=Qn();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],ote(n,t.items).forEach(r=>{St.bringToTop(r.element)}),Lb(St.getElements());else{const r=new Error;console.warn("Could not find item",r.stack)}},contains(e,t){var i;const n=Qn();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 c;if(l>30)return!1;if(o.element===s||o.owner===s||o.element.contains(s)||(c=o.owner)!=null&&c.contains(s))return!0;const u=n.items.find(d=>d.owner&&o.element.contains(d.owner));return u?r(u,s,l+1):!1}},pushStackContext(e){var a,r;const t=Qn();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:{}};rr.push(n)},popStackContext(e){var n,a;const t=Qn();if((n=t._adapter)!=null&&n.popStackContext)return t._adapter.popStackContext(e);((a=t.container)==null?void 0:a.call(t))===e&&rr.length>1&&rr.pop()},transferToCurrentContext(e){var a;const t=Qn();if((a=t._adapter)!=null&&a.transferToCurrentContext)return t._adapter.transferToCurrentContext(e);if(t.items.find(r=>r.element===e.element))return;rr.find(r=>!!r.items.find(i=>i.element===e.element))&&St.remove(e.element),St.add(e)}};let Xl=null;nr.isEnabled&&nr.on("change",()=>{nr.isFullscreen?nr.element&&(Xl=nr.element,St.pushStackContext(Xl)):Xl&&St.popStackContext(Xl)});const Db=Wr({defaultConfig:{id:"",initialVisibility:"hidden"}})(e=>{const t=Bd(e.id),[n,a]=F.useState(e.initialVisibility||"hidden");return{state:{id:t,visibility:n},events:{show(o){a("visible")},hide(o){a("hidden")}}}}),lN=()=>{},ea=Wr({defaultContext:{state:{},events:{show:lN,hide:lN}},defaultConfig:{...Db.defaultConfig,returnFocusRef:void 0,initialFocusRef:void 0},requiredConfig:Db.requiredConfig})(e=>{const t=X.useRef(null),n=X.useRef(null),[a,r]=X.useState("bottom"),i=Db(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}});ea.Context;const ZU=De()(e=>{const t=F.useCallback(a=>{e.state.stackRef.current&&document.contains(a.target)&&!St.contains(e.state.stackRef.current,a.target)&&e.events.hide(a)},[e.events,e.state.stackRef]),n=e.state.visibility!=="hidden";return F.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]),{}}),YU=De()(e=>{const t=F.useCallback(a=>{(a.key==="Esc"||a.key==="Escape")&&St.isTopmost(e.state.stackRef.current)&&e.events.hide(a)},[e.state.stackRef,e.events]),n=e.state.visibility!=="hidden";return F.useLayoutEffect(()=>{if(n)return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[t,n]),{}}),ste=De()(e=>{const t=F.useCallback(a=>{nr.isFullscreen||e.events.hide(a)},[e.events]),n=e.state.visibility!=="hidden";return F.useEffect(()=>{if(n&&nr.isEnabled)return nr.on("change",t),()=>{nr.off("change",t)}},[t,n]),{}});function KU(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:KU(e.parentElement)}const lte=De()(e=>{const t=e.state.visibility!=="hidden",n=F.useCallback(a=>{a[0].intersectionRatio<.5&&e.events.hide()},[e.events]);return F.useLayoutEffect(()=>{if(!t||!e.state.targetRef.current)return;const a=e.state.targetRef.current,r=KU(a),i=new IntersectionObserver(n,{root:r,threshold:.5});return i.observe(e.state.targetRef.current),()=>{i.disconnect()}},[n,e.state.targetRef,t]),{}}),ute=De()(e=>{const t=F.useCallback(a=>{if(e.state.stackRef.current&&a.key==="Tab"){const r=AQ(e.state.stackRef.current),i=NQ(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 F.useLayoutEffect(()=>{if(n)return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[n,t]),{}}),cte=De()(({state:e,events:t},n)=>{const a=Wi(n,e.stackRef),r=F.useRef(e.placement);r.current=e.placement;const i=F.useCallback(o=>{o!==r.current&&t.updatePlacement({placement:o})},[t]);return{open:e.visibility!=="hidden",anchorElement:e.targetRef,ref:a,onPlacementChange:i}}),dte=(e,t)=>{const{elementRef:n,localRef:a}=Gd(e),r=F.useContext(aw),{style:i}=MQ(r,{}),o=F.useRef(!0),[s]=F.useState(()=>{if(o.current){const l=St.createContainer();return n(l),o.current=!1,l}return a.current});return F.useLayoutEffect(()=>{const l=a.current;if(!l)return;const u=Object.keys(i);if(u.length!==0)for(const c of u)l.style.setProperty(c,i[c])},[a,i]),F.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,u=a.current;return St.add({element:u,owner:l}),()=>{St.remove(u)}},[a,t,s]),F.useLayoutEffect(()=>{var c,d;let u=(t?"current"in t?t.current:t:void 0)??void 0;if(u==null&&typeof document<"u"){const p=document.activeElement,g=a.current;u=(p&&g&&!g.contains(p)?p:document.body).closest("[dir]")??document.documentElement}if(u){const p=u.getAttribute("dir");(p!=null?p.toLowerCase()==="rtl":pU(u))?(c=a.current)==null||c.setAttribute("dir","rtl"):(d=a.current)==null||d.setAttribute("dir","ltr")}},[a,t]),a},pte=De()(({events:e,state:t},n)=>({ref:Wi(n,t.targetRef),onClick:r=>{t.targetRef.current instanceof Element||(t.targetRef.current=r.currentTarget),t.visibility!=="hidden"?e.hide(r):e.show(r)}})),fte=De()(({events:e,state:t},n)=>({ref:Wi(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 XU(e){if(e===document.body||!e.parentElement)return e;const t=getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"?e:XU(e.parentElement)}function JU(e){return e===null||e===document.body||!e.parentElement?null:RQ(e)?e:JU(e.parentElement)}function uN(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 mte=De()(e=>{const t=e.state.visibility!=="hidden",n=F.useRef(null),a=F.useRef(!1),r=F.useCallback(o=>{o.key==="Tab"&&(a.current=!0)},[]),i=F.useCallback(o=>{e.state.stackRef.current&&o.target instanceof Element&&(St.contains(e.state.stackRef.current,o.target)||(n.current=o.target))},[e.state.stackRef]);return F.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=XU(o).getBoundingClientRect(),u={left:0,top:0,right:window.innerWidth,bottom:window.innerHeight};if(n.current&&JU(n.current)||uN(o,l)||uN(o,u)){n.current=null;return}document.activeElement!==document.body&&e.state.stackRef.current&&document.activeElement instanceof Element&&!St.contains(e.state.stackRef.current,document.activeElement)||a.current?XA(o):requestAnimationFrame(()=>{XA(o)}),n.current=null}},[e.state.returnFocusRef,e.state.targetRef,t,i,r,e.state.stackRef]),{}}),QU=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"}},eF=Ke({vars:{width:"",height:"",size:""},base:({height:e,size:t,width:n})=>({display:"inline-block","> svg":{display:"block",width:W(n,t),height:W(e,t)}}),modifiers:{shouldMirror:{true:{transform:"scaleX(-1)"}},shouldMirrorInRTL:{true:{"&:dir(rtl)":{transform:"scaleX(-1)"}}}}}),gte=(e,t)=>e?e in t?t[e]:typeof e=="number"?Ve(e):e:"",hte=je("span")({displayName:"Svg",Component:({shouldMirror:e,shouldMirrorInRTL:t,src:n,type:a,...r},i,o)=>(n==null?void 0:n.type)!==a?(console.error(`Icon type "${n.type}" does not match expected type "${a}"`),null):S.jsx(o,{ref:i,dangerouslySetInnerHTML:{__html:n.svg},...Jn(r,eF({shouldMirror:e,shouldMirrorInRTL:t}))})}),ka={System:"system"},cN={name:"book-user",type:ka.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-book-user" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="transparent" d="M18.5 19h-12A1.5 1.5 0 0 0 5 20.5v-18a.5.5 0 0 1 .5-.5h13a.5.5 0 0 1 .5.5v16a.5.5 0 0 1-.5.5" class="wd-icon-background"/><path fill="oklch(0.3523 0 0 / 1)" d="M18.5 1A1.5 1.5 0 0 1 20 2.5v16a1.5 1.5 0 0 1-1.5 1.5h-12a.5.5 0 0 0 0 1h13a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-13A2.5 2.5 0 0 1 4 20.5v-18A1.5 1.5 0 0 1 5.5 1zM6 18.05q.243-.05.5-.05H18V3H6z" class="wd-icon-fill"/><path fill="oklch(0.3523 0 0 / 1)" d="M12 11c1.456 0 2.792.519 3.831 1.382.11.09.169.227.169.369v.749a.5.5 0 0 1-.5.5h-7l-.1-.01a.5.5 0 0 1-.4-.49v-.749c0-.142.06-.278.169-.37A5.98 5.98 0 0 1 12 11M12 6a2 2 0 1 1 0 4 2 2 0 0 1 0-4" class="wd-icon-accent"/></svg>',filename:"wd-icon-book-user.svg",category:"Files & Docs",tags:["profile","identity","i.d.","id","phonebook","contacts"]},bte={name:"check-small",type:ka.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-check-small" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="oklch(0.3523 0 0 / 1)" d="M16.44 7.646a.5.5 0 0 1 .706 0l.707.707a.5.5 0 0 1 0 .707l-.646.645v.001l-6 6a1 1 0 0 1-1.413 0l-1.35-1.35-.005-.003-1.793-1.793a.5.5 0 0 1 0-.707l.707-.707a.5.5 0 0 1 .707 0l2.44 2.44z" class="wd-icon-fill"/></svg>',filename:"wd-icon-check-small.svg",category:"Notification",tags:["success","complete","check mark","check box"]},vte={name:"chevron-right-small",type:ka.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-chevron-right-small" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="oklch(0.3523 0 0 / 1)" d="M9.958 6.112a.5.5 0 0 1 .704.07l1.617 1.976.007.01 2.56 3.128a1 1 0 0 1 0 1.266l-4.184 5.113a.5.5 0 0 1-.704.071l-.775-.633a.5.5 0 0 1-.07-.704l3.666-4.48L9.92 8.437l.001-.001-.808-.988a.5.5 0 0 1 .07-.703z" class="wd-icon-fill"/></svg>',filename:"wd-icon-chevron-right-small.svg",category:"Navigation",tags:["navigation","arrow"]},dN={name:"cloud-arrow-up",type:ka.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-cloud-arrow-up" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="oklch(0.3523 0 0 / 1)" d="M9.5 4c1.735 0 3.28.805 4.286 2.057Q14.136 6 14.5 6a4.5 4.5 0 0 1 4.262 3.058A5.001 5.001 0 0 1 18 19H6a5 5 0 0 1-1.998-9.585A5.5 5.5 0 0 1 9.5 4m0 2a3.5 3.5 0 0 0-3.466 3.98l.121.892-.874.214A3.002 3.002 0 0 0 6 17h5v-3.89l-1.48 1.21a.5.5 0 0 1-.703-.071l-.316-.387-.317-.386a.5.5 0 0 1 .07-.705l3.113-2.546q.035-.029.07-.053c.364-.247.852-.23 1.197.053l3.112 2.547c.213.174.245.49.07.704l-.632.773a.5.5 0 0 1-.703.07L13 13.11V17h5a3 3 0 1 0 0-6h-.027l-.875.008-.124-.866a2.5 2.5 0 0 0-3.287-2.007l-.767.263-.416-.694A3.5 3.5 0 0 0 9.5 6" class="wd-icon-fill"/></svg>',filename:"wd-icon-cloud-arrow-up.svg",category:"Data Stream",tags:["storage","store"]},yte={name:"configure",type:ka.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-configure" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="transparent" d="M2 6.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-5a.5.5 0 0 1-.5-.5zM9 14.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-5a.5.5 0 0 1-.5-.5zM16 7.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-5a.5.5 0 0 1-.5-.5z" class="wd-icon-background"/><path fill="oklch(0.3523 0 0 / 1)" d="M5.5 3a.5.5 0 0 1 .5.5V5h1.5A1.5 1.5 0 0 1 9 6.5v3A1.5 1.5 0 0 1 7.5 11H6v9.5a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5V11H2.5A1.5 1.5 0 0 1 1 9.5v-3A1.5 1.5 0 0 1 2.5 5H4V3.5a.5.5 0 0 1 .5-.5zM3 9h4V7H3zM12.5 3a.5.5 0 0 1 .5.5V13h1.5a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5H13v1.5a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5V19H9.5A1.5 1.5 0 0 1 8 17.5v-3A1.5 1.5 0 0 1 9.5 13H11V3.5a.5.5 0 0 1 .5-.5zM10 17h4v-2h-4z" class="wd-icon-fill"/><path fill="oklch(0.3523 0 0 / 1)" d="M19.5 3a.5.5 0 0 1 .5.5V6h1.5A1.5 1.5 0 0 1 23 7.5v3a1.5 1.5 0 0 1-1.5 1.5H20v8.5a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5V12h-1.5a1.5 1.5 0 0 1-1.5-1.5v-3A1.5 1.5 0 0 1 16.5 6H18V3.5a.5.5 0 0 1 .5-.5zM17 10h4V8h-4z" class="wd-icon-fill"/></svg>',filename:"wd-icon-configure.svg",category:"Core",tags:["config","settings","preferences","sound board","configure"]},Ste={name:"user",type:ka.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-user" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="transparent" d="M16 6a4 4 0 1 1-8 0 4 4 0 0 1 8 0M3 16.661a.5.5 0 0 1 .168-.371A13.45 13.45 0 0 1 12 13c3.377 0 6.465 1.24 8.832 3.29a.5.5 0 0 1 .168.371V20.5a.5.5 0 0 1-.5.5h-17a.5.5 0 0 1-.5-.5z" class="wd-icon-background"/><path fill="transparent" d="M21 16.661a.5.5 0 0 0-.168-.371A13.45 13.45 0 0 0 12 13c-3.377 0-6.465 1.24-8.832 3.29A.5.5 0 0 0 3 16.66V20.5a.5.5 0 0 0 .5.5h17a.5.5 0 0 0 .5-.5z" class="wd-icon-background"/><path fill="oklch(0.3523 0 0 / 1)" d="M12 12c3.627 0 6.944 1.333 9.486 3.534.334.289.514.704.514 1.127V20.5a1.5 1.5 0 0 1-1.5 1.5h-17a1.5 1.5 0 0 1-1.492-1.347L2 20.5v-3.839l.009-.158c.039-.367.213-.716.505-.969l.485-.402A14.44 14.44 0 0 1 12 12m0 2c-3.045 0-5.832 1.09-8 2.898V20h16v-3.102A12.44 12.44 0 0 0 12 14M12 1a5 5 0 1 1 0 10 5 5 0 0 1 0-10m0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6" class="wd-icon-fill"/></svg>',filename:"wd-icon-user.svg",category:"People",tags:["person","people","profile","avatar"]},Be=Ke({extends:eF,vars:{color:"",accentColor:"",backgroundColor:""},base:({size:e,accentColor:t,backgroundColor:n,color:a})=>({"& svg":{width:W(e,ur.systemIcon.size.lg),height:W(e,ur.systemIcon.size.lg)},".wd-icon .wd-icon-fill":{fill:W(a,ur.systemIcon.color.fill)},".wd-icon .wd-icon-accent, & .wd-icon-accent2":{fill:W(t,W(a,ur.systemIcon.color.accent))},".wd-icon .wd-icon-background":{fill:W(n,"transparent")},"@media (prefers-contrast: more)":{".wd-icon .wd-icon-fill, .wd-icon .wd-icon-accent":{color:"currentColor",fill:"currentColor"}}}),modifiers:{}}),dw=je("span")({displayName:"SystemIcon",Component:({accent:e,background:t,color:n,icon:a,size:r,...i},o,s)=>S.jsx(hte,{as:s,src:a,type:ka.System,ref:o,...Jn(i,Be({size:gte(r,ur.systemIcon.size),color:n,accentColor:e,backgroundColor:t}))})}),Ete=No({position:"relative",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}),_te=je("span")({displayName:"ButtonLabel",Component:({children:e,...t},n,a)=>S.jsx(Uee,{as:a,ref:n,...Jn(t,Ete),children:e})}),wte=Ke({base:{display:"inline-block"},modifiers:{size:{extraSmall:{[Be.vars.size]:ur.systemIcon.size.xs},small:{[Be.vars.size]:ur.systemIcon.size.md},medium:{[Be.vars.size]:ur.systemIcon.size.md},large:{[Be.vars.size]:ur.systemIcon.size.lg}}}}),kte=je("span")({Component:({icon:e,size:t="medium",shouldMirrorIcon:n=!1,shouldMirrorIconInRTL:a=!1,...r},i,o)=>e===void 0?null:S.jsx(dw,{ref:i,as:o,icon:e,shouldMirror:n,shouldMirrorInRTL:a,...Jn(r,wte({size:t}))})}),ie={default:La("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),focus:La("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),hover:La("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),active:La("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),disabled:La("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius")},le=Ke({vars:{background:"",border:"",boxShadowInner:"",boxShadowOuter:"",label:"",opacity:"",borderRadius:""},base:({background:e,border:t,boxShadowInner:n,boxShadowOuter:a,label:r,opacity:i,borderRadius:o})=>({fontFamily:st.default,fontSize:A.fontSize.subtext.lg,lineHeight:A.lineHeight.subtext.lg,letterSpacing:A.letterSpacing.subtext.lg,fontWeight:rt.bold,backgroundColor:W(ie.default.background,W(e,"transparent")),color:W(ie.default.label,W(r,M.fg.strong)),borderWidth:Ve(1),borderStyle:"solid",gap:A.gap.sm,borderColor:W(ie.default.border,W(t,"transparent")),cursor:"pointer",display:"inline-flex",boxShadow:"none",alignItems:"center",justifyContent:"center",outline:`${Ve(2)} transparent`,whiteSpace:"nowrap",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",borderRadius:W(ie.default.borderRadius,W(o,A.shape.full)),position:"relative",verticalAlign:"middle",overflow:"hidden",[Be.vars.color]:W(ie.default.icon,M.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:W(ie.default.opacity,W(i,lr.full))},"&:focus-visible, &.focus":{backgroundColor:W(ie.focus.background,W(e,"transparent")),borderColor:W(ie.focus.border,W(t,"transparent")),color:W(ie.focus.label,W(r,M.fg.strong)),[Be.vars.color]:W(ie.focus.icon,M.fg.strong),outline:`${Ve(2)} solid transparent`,outlineOffset:Ve(2),boxShadow:`0 0 0 ${Ve(2)} ${W(ie.focus.boxShadowInner,W(n,A.color.border.inverse.default))},0 0 0 ${Ve(4)} ${W(ie.focus.boxShadowOuter,W(a,A.color.brand.focus.primary))}`},"&:hover, &.hover":{backgroundColor:W(ie.hover.background,W(e,A.color.surface.contrast.strong)),borderColor:W(ie.hover.border,W(t,"transparent")),color:W(ie.hover.label,W(r,M.fg.stronger)),[Be.vars.color]:W(ie.hover.icon,M.fg.stronger)},"&:hover:active":{transitionDuration:"40ms"},"&:active, &.active":{backgroundColor:W(ie.active.background,W(e,"transparent")),borderColor:W(ie.active.border,W(t,"transparent")),color:W(ie.active.label,W(r,M.fg.strong)),[Be.vars.color]:W(ie.active.icon,M.fg.strong)},"&:disabled, &.disabled":{backgroundColor:W(ie.disabled.background,W(e,"transparent")),borderColor:W(ie.disabled.border,W(t,"transparent")),color:W(ie.disabled.label,W(r,M.fg.strong)),[Be.vars.color]:W(ie.disabled.icon,"currentColor")},"@media (prefers-contrast: more)":{'&[aria-pressed="true"]':{outline:`${Ve(2)} solid transparent`,outlineOffset:`-${Ve(1)}`},'&[aria-pressed="true"]:focus-visible, &[aria-pressed="true"].focus':{outline:`${Ve(4)} double transparent`,outlineOffset:0}},svg:{pointerEvents:"none"}}),modifiers:{size:{large:{fontSize:A.fontSize.body.sm,lineHeight:A.lineHeight.body.sm,letterSpacing:A.letterSpacing.body.sm,height:A.size.lg,paddingInline:A.padding.xxl,minWidth:Rr.size1400},medium:{fontSize:A.fontSize.subtext.lg,lineHeight:A.lineHeight.subtext.lg,letterSpacing:A.letterSpacing.subtext.lg,minWidth:Rr.size1200,paddingInline:A.padding.xl,height:A.size.md},small:{fontSize:A.fontSize.subtext.lg,lineHeight:A.lineHeight.subtext.lg,letterSpacing:A.letterSpacing.subtext.lg,height:A.size.sm,minWidth:Rr.size1000,paddingInline:A.padding.md,gap:A.gap.xs},extraSmall:{fontSize:A.fontSize.subtext.md,lineHeight:A.lineHeight.subtext.md,letterSpacing:A.letterSpacing.subtext.md,height:A.size.xs,minWidth:"auto",paddingInline:A.padding.sm,gap:A.gap.xs}},grow:{true:{width:"100%",maxWidth:"100%"}},iconPosition:{only:{padding:0},start:{},end:{}}},compound:[{modifiers:{size:"large",iconPosition:"only"},styles:{minWidth:A.size.lg}},{modifiers:{size:"large",iconPosition:"start"},styles:{paddingInlineStart:A.padding.xl,paddingInlineEnd:A.padding.xxl}},{modifiers:{size:"large",iconPosition:"end"},styles:{paddingInlineStart:A.padding.xxl,paddingInlineEnd:A.padding.xl}},{modifiers:{size:"medium",iconPosition:"only"},styles:{minWidth:A.size.md}},{modifiers:{size:"medium",iconPosition:"start"},styles:{paddingInlineStart:A.padding.lg,paddingInlineEnd:A.padding.xl}},{modifiers:{size:"medium",iconPosition:"end"},styles:{paddingInlineStart:A.padding.xl,paddingInlineEnd:A.padding.lg}},{modifiers:{size:"small",iconPosition:"only"},styles:{minWidth:A.size.sm}},{modifiers:{size:"small",iconPosition:"start"},styles:{paddingInlineStart:A.padding.sm,paddingInlineEnd:A.padding.md}},{modifiers:{size:"small",iconPosition:"end"},styles:{paddingInlineStart:A.padding.md,paddingInlineEnd:A.padding.sm}},{modifiers:{size:"extraSmall",iconPosition:"only"},styles:{minWidth:A.size.xs}},{modifiers:{size:"extraSmall",iconPosition:"start"},styles:{paddingInlineStart:A.padding.xs,paddingInlineEnd:A.padding.sm}},{modifiers:{size:"extraSmall",iconPosition:"end"},styles:{paddingInlineStart:A.padding.sm,paddingInlineEnd:A.padding.xs}}]}),Jl=je("button")({displayName:"BaseButton",Component:({children:e,size:t,fillIcon:n,grow:a,iconPosition:r,icon:i,colors:o,...s},l,u)=>S.jsx(u,{ref:l,type:"button",...gt(s,[le({size:t,iconPosition:r,grow:a}),ie.default((o==null?void 0:o.default)||{}),ie.focus((o==null?void 0:o.focus)||{}),ie.hover((o==null?void 0:o.hover)||{}),ie.active((o==null?void 0:o.active)||{}),ie.disabled((o==null?void 0:o.disabled)||{})]),children:e}),subComponents:{Icon:kte,Label:_te}}),Ite=je("button")({displayName:"Button",Component:({children:e,icon:t,colors:n,iconPosition:a,shouldMirrorIcon:r,shouldMirrorIconInRTL:i,size:o="medium",...s},l,u)=>{const c=a||(t?e?"start":"only":void 0);return S.jsxs(Jl,{as:u,ref:l,size:o,icon:t,colors:n,iconPosition:c,...s,children:[t&&c==="start"&&S.jsx(Jl.Icon,{size:o,icon:t,shouldMirrorIcon:r,shouldMirrorIconInRTL:i}),e&&S.jsx(Jl.Label,{children:e}),t&&c&&["only","end"].includes(c)&&S.jsx(Jl.Icon,{size:o,icon:t,shouldMirrorIcon:r,shouldMirrorIconInRTL:i})]})}}),Tte=Ke({extends:le,base:{[le.vars.background]:A.color.surface.transparent,[le.vars.borderRadius]:A.shape.full,[le.vars.border]:M.border.input.default,[le.vars.label]:M.fg.default,[Be.vars.color]:W(ie.default.icon,"currentColor"),"&:focus-visible, &.focus":{[le.vars.background]:A.color.surface.default,[le.vars.label]:M.fg.strong,[le.vars.boxShadowInner]:A.color.focus.inverse,[le.vars.boxShadowOuter]:A.color.brand.focus.primary,[Be.vars.color]:W(ie.focus.icon,"currentColor")},"&:hover, &.hover":{[le.vars.background]:Wl.darken({color:A.color.surface.transparent,mixinColor:A.color.surface.overlay.mixin,mixinValue:A.opacity.surface.hover}),[le.vars.label]:M.fg.strong,[le.vars.border]:A.color.border.input.hover,[Be.vars.color]:W(ie.hover.icon,"currentColor")},"&:active, &.active":{[le.vars.background]:Wl.darken({color:A.color.surface.transparent,mixinColor:A.color.surface.overlay.mixin,mixinValue:A.opacity.surface.pressed}),[le.vars.label]:M.fg.strong,[le.vars.border]:A.color.border.input.hover,[Be.vars.color]:W(ie.active.icon,"currentColor")},"&:disabled, &.disabled":{[le.vars.opacity]:lr.disabled,[le.vars.background]:A.color.surface.transparent,[le.vars.label]:M.fg.default,[Be.vars.color]:W(ie.default.icon,"currentColor")}},modifiers:{variant:{inverse:{[le.vars.background]:A.color.surface.transparent,[le.vars.border]:A.color.border.inverse.default,[le.vars.label]:M.fg.inverse,[Be.vars.color]:W(ie.default.icon,"currentColor"),"&:hover, &.hover":{[le.vars.background]:Wl.darken({color:A.color.surface.transparent,mixinColor:A.color.surface.overlay.mixin,mixinValue:A.opacity.surface.hover}),[le.vars.border]:A.color.border.inverse.default,[le.vars.label]:M.fg.inverse,[Be.vars.color]:W(ie.hover.icon,"currentColor")},"&:focus-visible, &.focus":{[le.vars.background]:A.color.surface.inverse,[le.vars.border]:M.border.transparent,[le.vars.label]:M.fg.contrast.default,[le.vars.boxShadowInner]:M.border.contrast.default,[le.vars.boxShadowOuter]:A.color.focus.inverse,[Be.vars.color]:W(ie.focus.icon,"currentColor")},"&:active, &.active":{[le.vars.background]:Wl.darken({color:A.color.surface.transparent,mixinColor:A.color.surface.overlay.mixin,mixinValue:A.opacity.surface.pressed}),[le.vars.border]:A.color.border.inverse.default,[le.vars.label]:M.fg.inverse,[Be.vars.color]:W(ie.active.icon,"currentColor")},"&:disabled, &.disabled":{[le.vars.opacity]:lr.disabled,[le.vars.background]:A.color.surface.transparent,[le.vars.label]:M.fg.inverse,[Be.vars.color]:W(ie.default.icon,"currentColor")}}}}}),tF=je("button")({displayName:"SecondaryButton",Component:({children:e,variant:t,size:n,iconPosition:a,grow:r,cs:i,...o},s,l)=>S.jsx(Ite,{as:l,ref:s,iconPosition:a,size:n,grow:r,cs:[Tte({variant:t,iconPosition:a,grow:r,size:n}),i],...o,children:e})});var hn="top",Nn="bottom",Cn="right",bn="left",pw="auto",bl=[hn,Nn,Cn,bn],ki="start",fw="end",xte="clippingParents",nF="viewport",co="popper",Rte="reference",pN=bl.reduce(function(e,t){return e.concat([t+"-"+ki,t+"-"+fw])},[]),rF=[].concat(bl,[pw]).reduce(function(e,t){return e.concat([t,t+"-"+ki,t+"-"+fw])},[]),Ate="beforeRead",Nte="read",Cte="afterRead",Ote="beforeMain",$te="main",Lte="afterMain",Dte="beforeWrite",Mte="write",Pte="afterWrite",Ute=[Ate,Nte,Cte,Ote,$te,Lte,Dte,Mte,Pte];function On(e){return e?(e.nodeName||"").toLowerCase():null}function $n(e){if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function rs(e){var t=$n(e).Element;return e instanceof t||e instanceof Element}function Wn(e){var t=$n(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Fte(e){var t=$n(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function zte(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];!Wn(i)||!On(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 jte(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,u){return l[u]="",l},{});!Wn(r)||!On(r)||(Object.assign(r.style,s),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const Bte={name:"applyStyles",enabled:!0,phase:"write",fn:zte,effect:jte,requires:["computeStyles"]};function Hn(e){return e.split("-")[0]}function mw(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function aF(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Fte(n)){var a=t;do{if(a&&e.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function dr(e){return $n(e).getComputedStyle(e)}function qte(e){return["table","td","th"].indexOf(On(e))>=0}function Er(e){return((rs(e)?e.ownerDocument:e.document)||window.document).documentElement}function Zd(e){return On(e)==="html"?e:e.assignedSlot||e.parentNode||e.host||Er(e)}function fN(e){if(!Wn(e)||dr(e).position==="fixed")return null;var t=e.offsetParent;if(t){var n=Er(t);if(On(t)==="body"&&dr(t).position==="static"&&dr(n).position!=="static")return n}return t}function Gte(e){for(var t=Zd(e);Wn(t)&&["html","body"].indexOf(On(t))<0;){var n=dr(t);if(n.transform!=="none"||n.perspective!=="none"||n.willChange&&n.willChange!=="auto")return t;t=t.parentNode}return null}function vl(e){for(var t=$n(e),n=fN(e);n&&qte(n)&&dr(n).position==="static";)n=fN(n);return n&&On(n)==="body"&&dr(n).position==="static"?t:n||Gte(e)||t}function gw(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function hu(e,t,n){return Math.max(e,Math.min(t,n))}function iF(){return{top:0,right:0,bottom:0,left:0}}function oF(e){return Object.assign(Object.assign({},iF()),e)}function sF(e,t){return t.reduce(function(n,a){return n[a]=e,n},{})}function Hte(e){var t,n=e.state,a=e.name,r=n.elements.arrow,i=n.modifiersData.popperOffsets,o=Hn(n.placement),s=gw(o),l=[bn,Cn].indexOf(o)>=0,u=l?"height":"width";if(!(!r||!i)){var c=n.modifiersData[a+"#persistent"].padding,d=mw(r),p=s==="y"?hn:bn,g=s==="y"?Nn:Cn,b=n.rects.reference[u]+n.rects.reference[s]-i[s]-n.rects.popper[u],v=i[s]-n.rects.reference[s],I=vl(r),h=I?s==="y"?I.clientHeight||0:I.clientWidth||0:0,f=b/2-v/2,m=c[p],y=h-d[u]-c[g],_=h/2-d[u]/2+f,w=hu(m,_,y),k=s;n.modifiersData[a]=(t={},t[k]=w,t.centerOffset=w-_,t)}}function Vte(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)||aF(t.elements.popper,i)&&(t.elements.arrow=i,t.modifiersData[a+"#persistent"]={padding:oF(typeof s!="number"?s:sF(s,bl))}))}const Wte={name:"arrow",enabled:!0,phase:"main",fn:Hte,effect:Vte,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};var Zte={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Yte(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 mN(e){var t,n=e.popper,a=e.popperRect,r=e.placement,i=e.offsets,o=e.position,s=e.gpuAcceleration,l=e.adaptive,u=Yte(i),c=u.x,d=u.y,p=i.hasOwnProperty("x"),g=i.hasOwnProperty("y"),b=bn,v=hn,I=window;if(l){var h=vl(n);h===$n(n)&&(h=Er(n)),r===hn&&(v=Nn,d-=h.clientHeight-a.height,d*=s?1:-1),r===bn&&(b=Cn,c-=h.clientWidth-a.width,c*=s?1:-1)}var f=Object.assign({position:o},l&&Zte);if(s){var m;return Object.assign(Object.assign({},f),{},(m={},m[v]=g?"0":"",m[b]=p?"0":"",m.transform=(I.devicePixelRatio||1)<2?"translate("+c+"px, "+d+"px)":"translate3d("+c+"px, "+d+"px, 0)",m))}return Object.assign(Object.assign({},f),{},(t={},t[v]=g?d+"px":"",t[b]=p?c+"px":"",t.transform="",t))}function Kte(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:Hn(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),mN(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),mN(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 Xte={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Kte,data:{}};var Ql={passive:!0};function Jte(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=$n(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,Ql)}),s&&l.addEventListener("resize",n.update,Ql),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,Ql)}),s&&l.removeEventListener("resize",n.update,Ql)}}const Qte={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Jte,data:{}};var ene={left:"right",right:"left",bottom:"top",top:"bottom"};function bu(e){return e.replace(/left|right|bottom|top/g,function(t){return ene[t]})}var tne={start:"end",end:"start"};function gN(e){return e.replace(/start|end/g,function(t){return tne[t]})}function as(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 hw(e){var t=$n(e),n=t.pageXOffset,a=t.pageYOffset;return{scrollLeft:n,scrollTop:a}}function bw(e){return as(Er(e)).left+hw(e).scrollLeft}function nne(e){var t=$n(e),n=Er(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+bw(e),y:s}}function rne(e){var t=Er(e),n=hw(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+bw(e),s=-n.scrollTop;return dr(a||t).direction==="rtl"&&(o+=Math.max(t.clientWidth,a?a.clientWidth:0)-r),{width:r,height:i,x:o,y:s}}function vw(e){var t=dr(e),n=t.overflow,a=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function lF(e){return["html","body","#document"].indexOf(On(e))>=0?e.ownerDocument.body:Wn(e)&&vw(e)?e:lF(Zd(e))}function Co(e,t){t===void 0&&(t=[]);var n=lF(e),a=On(n)==="body",r=$n(n),i=a?[r].concat(r.visualViewport||[],vw(n)?n:[]):n,o=t.concat(i);return a?o:o.concat(Co(Zd(i)))}function qv(e){return Object.assign(Object.assign({},e),{},{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ane(e){var t=as(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 hN(e,t){return t===nF?qv(nne(e)):Wn(t)?ane(t):qv(rne(Er(e)))}function ine(e){var t=Co(Zd(e)),n=["absolute","fixed"].indexOf(dr(e).position)>=0,a=n&&Wn(e)?vl(e):e;return rs(a)?t.filter(function(r){return rs(r)&&aF(r,a)&&On(r)!=="body"}):[]}function one(e,t,n){var a=t==="clippingParents"?ine(e):[].concat(t),r=[].concat(a,[n]),i=r[0],o=r.reduce(function(s,l){var u=hN(e,l);return s.top=Math.max(u.top,s.top),s.right=Math.min(u.right,s.right),s.bottom=Math.min(u.bottom,s.bottom),s.left=Math.max(u.left,s.left),s},hN(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 is(e){return e.split("-")[1]}function uF(e){var t=e.reference,n=e.element,a=e.placement,r=a?Hn(a):null,i=a?is(a):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(r){case hn:l={x:o,y:t.y-n.height};break;case Nn:l={x:o,y:t.y+t.height};break;case Cn:l={x:t.x+t.width,y:s};break;case bn:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=r?gw(r):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case ki:l[u]=Math.floor(l[u])-Math.floor(t[c]/2-n[c]/2);break;case fw:l[u]=Math.floor(l[u])+Math.ceil(t[c]/2-n[c]/2);break}}return l}function Ii(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?xte:i,s=n.rootBoundary,l=s===void 0?nF:s,u=n.elementContext,c=u===void 0?co:u,d=n.altBoundary,p=d===void 0?!1:d,g=n.padding,b=g===void 0?0:g,v=oF(typeof b!="number"?b:sF(b,bl)),I=c===co?Rte:co,h=e.elements.reference,f=e.rects.popper,m=e.elements[p?I:c],y=one(rs(m)?m:m.contextElement||Er(e.elements.popper),o,l),_=as(h),w=uF({reference:_,element:f,placement:r}),k=qv(Object.assign(Object.assign({},f),w)),C=c===co?k:_,O={top:y.top-C.top+v.top,bottom:C.bottom-y.bottom+v.bottom,left:y.left-C.left+v.left,right:C.right-y.right+v.right},D=e.modifiersData.offset;if(c===co&&D){var G=D[r];Object.keys(O).forEach(function(Q){var ee=[Cn,Nn].indexOf(Q)>=0?1:-1,be=[hn,Nn].indexOf(Q)>=0?"y":"x";O[Q]+=G[be]*ee})}return O}function sne(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,u=l===void 0?rF:l,c=is(a),d=c?s?pN:pN.filter(function(b){return is(b)===c}):bl,p=d.filter(function(b){return u.indexOf(b)>=0});p.length===0&&(p=d);var g=p.reduce(function(b,v){return b[v]=Ii(e,{placement:v,boundary:r,rootBoundary:i,padding:o})[Hn(v)],b},{});return Object.keys(g).sort(function(b,v){return g[b]-g[v]})}function lne(e){if(Hn(e)===pw)return[];var t=bu(e);return[gN(e),t,gN(t)]}function une(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,u=n.padding,c=n.boundary,d=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,b=g===void 0?!0:g,v=n.allowedAutoPlacements,I=t.options.placement,h=Hn(I),f=h===I,m=l||(f||!b?[bu(I)]:lne(I)),y=[I].concat(m).reduce(function(me,Ae){return me.concat(Hn(Ae)===pw?sne(t,{placement:Ae,boundary:c,rootBoundary:d,padding:u,flipVariations:b,allowedAutoPlacements:v}):Ae)},[]),_=t.rects.reference,w=t.rects.popper,k=new Map,C=!0,O=y[0],D=0;D<y.length;D++){var G=y[D],Q=Hn(G),ee=is(G)===ki,be=[hn,Nn].indexOf(Q)>=0,Ee=be?"width":"height",fe=Ii(t,{placement:G,boundary:c,rootBoundary:d,altBoundary:p,padding:u}),_e=be?ee?Cn:bn:ee?Nn:hn;_[Ee]>w[Ee]&&(_e=bu(_e));var L=bu(_e),j=[];if(i&&j.push(fe[Q]<=0),s&&j.push(fe[_e]<=0,fe[L]<=0),j.every(function(me){return me})){O=G,C=!1;break}k.set(G,j)}if(C)for(var B=b?3:1,H=function(Ae){var Ce=y.find(function(Xe){var on=k.get(Xe);if(on)return on.slice(0,Ae).every(function(Ia){return Ia})});if(Ce)return O=Ce,"break"},Z=B;Z>0;Z--){var Ge=H(Z);if(Ge==="break")break}t.placement!==O&&(t.modifiersData[a]._skip=!0,t.placement=O,t.reset=!0)}}const cne={name:"flip",enabled:!0,phase:"main",fn:une,requiresIfExists:["offset"],data:{_skip:!1}};function bN(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 vN(e){return[hn,Cn,Nn,bn].some(function(t){return e[t]>=0})}function dne(e){var t=e.state,n=e.name,a=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,o=Ii(t,{elementContext:"reference"}),s=Ii(t,{altBoundary:!0}),l=bN(o,a),u=bN(s,r,i),c=vN(l),d=vN(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const pne={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:dne};function fne(e,t,n){var a=Hn(e),r=[bn,hn].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,[bn,Cn].indexOf(a)>=0?{x:s,y:o}:{x:o,y:s}}function mne(e){var t=e.state,n=e.options,a=e.name,r=n.offset,i=r===void 0?[0,0]:r,o=rF.reduce(function(c,d){return c[d]=fne(d,t.rects,i),c},{}),s=o[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[a]=o}const gne={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:mne};function hne(e){var t=e.state,n=e.name;t.modifiersData[n]=uF({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const bne={name:"popperOffsets",enabled:!0,phase:"read",fn:hne,data:{}};function vne(e){return e==="x"?"y":"x"}function yne(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,u=n.rootBoundary,c=n.altBoundary,d=n.padding,p=n.tether,g=p===void 0?!0:p,b=n.tetherOffset,v=b===void 0?0:b,I=Ii(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),h=Hn(t.placement),f=is(t.placement),m=!f,y=gw(h),_=vne(y),w=t.modifiersData.popperOffsets,k=t.rects.reference,C=t.rects.popper,O=typeof v=="function"?v(Object.assign(Object.assign({},t.rects),{},{placement:t.placement})):v,D={x:0,y:0};if(w){if(i){var G=y==="y"?hn:bn,Q=y==="y"?Nn:Cn,ee=y==="y"?"height":"width",be=w[y],Ee=w[y]+I[G],fe=w[y]-I[Q],_e=g?-C[ee]/2:0,L=f===ki?k[ee]:C[ee],j=f===ki?-C[ee]:-k[ee],B=t.elements.arrow,H=g&&B?mw(B):{width:0,height:0},Z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:iF(),Ge=Z[G],me=Z[Q],Ae=hu(0,k[ee],H[ee]),Ce=m?k[ee]/2-_e-Ae-Ge-O:L-Ae-Ge-O,Xe=m?-k[ee]/2+_e+Ae+me+O:j+Ae+me+O,on=t.elements.arrow&&vl(t.elements.arrow),Ia=on?y==="y"?on.clientTop||0:on.clientLeft||0:0,Ta=t.modifiersData.offset?t.modifiersData.offset[t.placement][y]:0,xa=w[y]+Ce-Ta-Ia,Yd=w[y]+Xe-Ta,Ra=hu(g?Math.min(Ee,xa):Ee,be,g?Math.max(fe,Yd):fe);w[y]=Ra,D[y]=Ra-be}if(s){var PF=y==="x"?hn:bn,UF=y==="x"?Nn:Cn,Sl=w[_],FF=Sl+I[PF],zF=Sl-I[UF],Ew=hu(FF,Sl,zF);w[_]=Ew,D[_]=Ew-Sl}t.modifiersData[a]=D}}const Sne={name:"preventOverflow",enabled:!0,phase:"main",fn:yne,requiresIfExists:["offset"]};function Ene(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function _ne(e){return e===$n(e)||!Wn(e)?hw(e):Ene(e)}function wne(e,t,n){n===void 0&&(n=!1);var a=Er(t),r=as(e),i=Wn(t),o={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(i||!i&&!n)&&((On(t)!=="body"||vw(a))&&(o=_ne(t)),Wn(t)?(s=as(t),s.x+=t.clientLeft,s.y+=t.clientTop):a&&(s.x=bw(a))),{x:r.left+o.scrollLeft-s.x,y:r.top+o.scrollTop-s.y,width:r.width,height:r.height}}function kne(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 Ine(e){var t=kne(e);return Ute.reduce(function(n,a){return n.concat(t.filter(function(r){return r.phase===a}))},[])}function Tne(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function xne(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 yN={placement:"bottom",modifiers:[],strategy:"absolute"};function SN(){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 Rne(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,a=n===void 0?[]:n,r=t.defaultOptions,i=r===void 0?yN:r;return function(s,l,u){u===void 0&&(u=i);var c={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},yN),i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],p=!1,g={state:c,setOptions:function(h){v(),c.options=Object.assign(Object.assign(Object.assign({},i),c.options),h),c.scrollParents={reference:rs(s)?Co(s):s.contextElement?Co(s.contextElement):[],popper:Co(l)};var f=Ine(xne([].concat(a,c.options.modifiers)));return c.orderedModifiers=f.filter(function(m){return m.enabled}),b(),g.update()},forceUpdate:function(){if(!p){var h=c.elements,f=h.reference,m=h.popper;if(SN(f,m)){c.rects={reference:wne(f,vl(m),c.options.strategy==="fixed"),popper:mw(m)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(D){return c.modifiersData[D.name]=Object.assign({},D.data)});for(var y=0;y<c.orderedModifiers.length;y++){if(c.reset===!0){c.reset=!1,y=-1;continue}var _=c.orderedModifiers[y],w=_.fn,k=_.options,C=k===void 0?{}:k,O=_.name;typeof w=="function"&&(c=w({state:c,options:C,name:O,instance:g})||c)}}}},update:Tne(function(){return new Promise(function(I){g.forceUpdate(),I(c)})}),destroy:function(){v(),p=!0}};if(!SN(s,l))return g;g.setOptions(u).then(function(I){!p&&u.onFirstUpdate&&u.onFirstUpdate(I)});function b(){c.orderedModifiers.forEach(function(I){var h=I.name,f=I.options,m=f===void 0?{}:f,y=I.effect;if(typeof y=="function"){var _=y({state:c,name:h,instance:g,options:m}),w=function(){};d.push(_||w)}})}function v(){d.forEach(function(I){return I()}),d=[]}return g}}var Ane=[Qte,bne,Xte,Bte,gne,cne,Sne,Wte,pne],Nne=Rne({defaultModifiers:Ane});const Cne=["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"],One=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=Cne.find(r=>r.includes(`${a}-${n}`))??a),a},cF=(e,t,n)=>{if(e.length===0||e[0].split("-")[0]==="auto")return n;const{reference:a,popper:r}=t.rects,i=Ii({...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]:cF(e.slice(1),t,n)},EN="fallbackModifier",_N={name:EN,enabled:!0,phase:"main",data:{_skip:!1},fn({state:e,options:t}){const n=e.options.placement,{fallbackPlacements:a}=t,r=[n,One(n),...a||[]],i=cF(r,e,n);e.placement!==i&&(e.modifiersData[EN]._skip=!0,e.placement=i,e.reset=!0)}},dF=["top","right","bottom","left"],yw=X.forwardRef(({portal:e=!0,open:t=!0,...n},a)=>t?S.jsx(Dne,{ref:a,portal:e,...n}):null),$ne=e=>{if(e!==null)return"current"in e?e.current||void 0:e},Lne={},Dne=X.forwardRef(({anchorElement:e,getAnchorClientRect:t,popperOptions:n=Lne,placement:a="bottom",fallbackPlacements:r=dF,onPlacementChange:i,children:o,portal:s,popperInstanceRef:l},u)=>{const c=X.useRef(!0),{localRef:d,elementRef:p}=Gd(l),[g,b]=X.useState(a),v=dte(u,e),I=X.useRef(a);I.current=g;const h=X.useMemo(()=>({name:"setPlacement",enabled:!0,phase:"afterWrite",fn({state:m}){b(m.placement),i==null||i(m.placement)}}),[b,i]);X.useLayoutEffect(()=>{const m=t?{getBoundingClientRect:t}:$ne(e??null);if(!m){console.warn("Popper: neither anchorElement or getAnchorClientRect was defined. A valid anchorElement or getAnchorClientRect callback must be provided to render a Popper");return}if(v.current){const y=Nne(m,v.current,{placement:a,...n,modifiers:[h,{..._N,options:{fallbackPlacements:r}},...n.modifiers||[]]});return p(y),()=>{y==null||y.destroy()}}},[e,t,v]),X.useLayoutEffect(()=>{var m;c.current||(m=d.current)==null||m.setOptions({placement:a,...n,modifiers:[h,{..._N,options:{fallbackPlacements:r}},...n.modifiers||[]]}),c.current=!1},[n,a,r,h,d]);const f=S.jsx(S.Fragment,{children:Mne(o)?o({placement:g}):o});return s?Fy.createPortal(f,v.current):f});function Mne(e){return typeof e=="function"}const Pt=Wr({defaultConfig:{...Za.defaultConfig,...ea.defaultConfig,mode:"single",shouldVirtualize:!1},requiredConfig:{...Za.requiredConfig,...ea.requiredConfig},contextOverride:ea.Context})(e=>{const t=Za(Za.mergeConfig(e,{selection:e.mode==="single"?wU:WQ})),n=ea(ea.mergeConfig(e,{id:t.state.id,onHide(){t.state.indexRef.current=0}}));ZU(n),YU(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}}),Pne=Ke({vars:{minWidth:Ve(1),transformOriginVertical:"top",transformOriginHorizontal:"left",maxHeight:""},base:({transformOriginVertical:e,transformOriginHorizontal:t,minWidth:n,maxHeight:a})=>({fontFamily:st.default,fontWeight:rt.normal,fontSize:A.fontSize.subtext.lg,lineHeight:A.lineHeight.subtext.lg,letterSpacing:A.letterSpacing.subtext.lg,color:M.fg.default,position:"relative",display:"flex",flexDirection:"column",transition:"transform ease-out 150ms",padding:A.padding.xxs,borderRadius:A.shape.xxl,maxWidth:Fn.subtract("100vw",A.size.sm),boxShadow:sU[3],minWidth:n,maxHeight:a,transformOrigin:`${e} ${t}`,".wd-no-animation &":{animation:"none"}})}),Une=De()(()=>({})),pF=rn("div")({displayName:"Menu.Card",modelHook:Pt,elemPropsHook:Une})(({minWidth:e,maxHeight:t,...n},a,r)=>{const i=X.useMemo(()=>QU(r.state.placement||"bottom"),[r.state.placement]);return S.jsx(rte,{as:a,...gt(n,Pne({minWidth:typeof e=="number"?Ve(e):e,maxHeight:typeof t=="number"?Ve(t):t,transformOriginVertical:i.vertical,transformOriginHorizontal:i.horizontal})),children:n.children})}),Fne=Ke({base:{display:"block",height:Ve(1),border:"none",borderBlockStart:`${Ve(1)} solid ${A.color.border.default}`,margin:`${A.gap.sm} ${A.gap.md}`}}),fF=je("hr")({displayName:"Menu.Divider",Component({...e},t,n){return S.jsx(n,{ref:t,...Jn(e,Fne())})}}),wN={vertical:"bottom",horizontal:"center"},Gv=La("positionX","positionY"),zne=ZJ({"0%":{opacity:0,transform:`translate(${Gv.positionX}, ${Gv.positionY})`},"100%":{opacity:1,transform:"translate(0)"}}),jne=Ke({vars:{tooltipTransformOriginHorizontal:"",tooltipTransformOriginVertical:""},base:({tooltipTransformOriginHorizontal:e,tooltipTransformOriginVertical:t})=>({fontFamily:st.default,fontWeight:rt.normal,fontSize:A.fontSize.subtext.md,lineHeight:A.lineHeight.subtext.md,letterSpacing:A.letterSpacing.subtext.md,display:"inline-flex",position:"relative",padding:A.padding.sm,color:M.fg.inverse,animationName:zne,animationDuration:"150ms",animationTimingFunction:"ease-out",transformOrigin:`${t} ${e}`,a:{color:M.fg.inverse,textDecoration:"underline"},"&:before":{content:'""',borderRadius:A.shape.md,outline:`${Ve(1)} solid transparent`,outlineOffset:`-${Ve(1)}`,zIndex:-1,margin:A.gap.xs,backgroundColor:A.color.surface.contrast.default,position:"absolute",top:0,left:0,right:0,bottom:0,boxShadow:sU[2]},"[data-popper-reference-hidden] &":{visibility:"hidden",pointerEvents:"none"},'[data-popper-placement="top-start"] &, [data-popper-placement="bottom-start"] &':{left:Fn.negate(Rr.size50)},'[data-popper-placement="top-end"] &, [data-popper-placement="bottom-end"] &':{right:Fn.negate(Rr.size50)},'[data-popper-placement="left-start"] &, [data-popper-placement="right-start"] &':{top:Fn.negate(Rr.size50)},'[data-popper-placement="left-end"] &, [data-popper-placement="right-end"] &':{bottom:Fn.negate(Rr.size50)}}),modifiers:{elementHasFocus:{true:{padding:Fn.subtract(A.padding.md,Fn.divide(A.padding.xxs,2)),"&:before":{margin:Rr.size75}}}}}),Bne=je("div")({displayName:"TooltipContainer",Component:({children:e,transformOrigin:t=wN,elementHasFocus:n=!1,...a},r,i)=>{const o=gQ(t||wN,A.gap.sm);return S.jsx(i,{ref:r,...gt(a,[jne({tooltipTransformOriginHorizontal:t==null?void 0:t.horizontal,tooltipTransformOriginVertical:t==null?void 0:t.vertical,elementHasFocus:n}),Gv({positionX:o.x,positionY:o.y})]),children:e})}}),kN=(e,t=0)=>{const n=X.useRef(),a=()=>{n.current=window.setTimeout(e,t)},r=()=>{window.clearTimeout(n.current),n.current=void 0};return X.useEffect(()=>()=>{window.clearTimeout(n.current)},[n]),{start:a,clear:r}},qne=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 Gne({type:e="label",titleText:t="",showDelay:n=300,hideDelay:a=100}={}){const r=X.useRef(!1),i=ea(),[o,s]=X.useState(null),l=Bd(),u=kN(i.events.hide,a),c=kN(i.events.show,n),d=()=>{u.start(),c.clear()},p=()=>{c.start(),u.clear()},g=f=>{s(f.currentTarget),p()},b=f=>{r.current||g(f),r.current=!1},v=f=>{r.current=!0,qne(f.currentTarget)&&i.events.hide()};YU(i),ZU(i),ste(i),lte(i);const I=i.state.visibility!=="hidden",h={"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:v,onFocus:b,onBlur:d};return h["aria-describedby"]===void 0&&delete h["aria-describedby"],{targetProps:h,popperProps:{open:I,anchorElement:o,ref:i.state.stackRef},tooltipProps:{id:e==="describe"&&I?l:void 0,role:"tooltip",onMouseEnter:p,onMouseLeave:d}}}const mF=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=mF(e.children[n]);if(a)return a}return null}return null},gF=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=gF(e.children[n]);if(a)return a}return null},IN=e=>{const t=gF(e)||mF(e);return t?t.scrollWidth>t.clientWidth||t.scrollHeight>t.clientHeight:!1};function Hne(e,t,n=Object.keys(t)){return n.reduce((a,r)=>(typeof e[r]=="function"?a[r]=fU(t[r],e[r]):a[r]=t[r],a),{})}const Sw=({placement:e="top",fallbackPlacements:t=dF,children:n,...a})=>{const[r,i]=X.useState(""),{targetProps:o,popperProps:s,tooltipProps:l}=Gne({type:"muted"}),u=d=>{const p=d.currentTarget;i(p instanceof HTMLElement?p.innerText:""),IN(p)&&o.onMouseEnter(d)},c=d=>{const p=d.currentTarget;i(p instanceof HTMLElement?p.innerText:""),IN(p)&&o.onFocus(d)};return S.jsxs(X.Fragment,{children:[X.cloneElement(n,{...o,onMouseEnter:u,onFocus:c,"aria-label":void 0,...Hne({...o,onMouseEnter:u,onFocus:c},n.props)}),S.jsx(yw,{placement:e,fallbackPlacements:t,...s,children:({placement:d})=>{const p=QU(d);return S.jsx(Bne,{transformOrigin:p,...l,...a,children:r})}})]})},hF=Wr({defaultConfig:{id:void 0},requiredConfig:{}})(e=>({state:{id:Bd(e.id)},events:{}})),Vne=Ke({base:{fontFamily:st.default,fontSize:A.fontSize.subtext.lg,lineHeight:A.lineHeight.subtext.lg,letterSpacing:A.letterSpacing.subtext.lg,fontWeight:rt.bold,display:"flex",alignItems:"center",width:"100%",gap:A.gap.md,padding:`${A.padding.xs} ${A.padding.md}`}}),Wne=De()(e=>({"data-type":"group",role:"group","aria-labelledby":e.state.id})),Zne=De()(e=>({id:e.state.id})),TN=rn("div")({modelHook:hF,elemPropsHook:Zne})(({children:e,...t},n)=>S.jsx(Sw,{children:S.jsx(n,{...gt(t,Vne()),children:e})})),bF=qd("div")({displayName:"Menu.Group",modelHook:hF,elemPropsHook:Wne,subComponents:{Heading:TN}})(({children:e,title:t,...n},a)=>S.jsxs(a,{...gt(n),children:[t?S.jsx(TN,{children:t}):null,e]})),yl=Ke({parts:{text:"menu-item-text",icon:"menu-item-icon",selected:"menu-item-selected"},base:({textPart:e,iconPart:t,selectedPart:n})=>({fontFamily:st.default,fontWeight:rt.normal,fontSize:A.fontSize.subtext.lg,lineHeight:A.lineHeight.subtext.lg,letterSpacing:A.letterSpacing.subtext.lg,display:"flex",alignItems:"center",width:"100%",gap:A.gap.md,padding:`${A.padding.sm} ${A.padding.md}`,boxSizing:"border-box",cursor:"pointer",color:M.fg.default,borderWidth:0,borderRadius:A.shape.xxl,textAlign:"start",transition:"background-color 80ms, color 80ms",backgroundColor:"inherit",minHeight:A.size.md,overflowWrap:"anywhere",[Be.vars.color]:"currentColor",[`& :where(${n})`]:{transition:"opacity 80ms linear",opacity:lr.zero},"&:where(:has(span))":{display:"flex"},"&[aria-selected=true]":{color:A.color.brand.fg.primary.strong,backgroundColor:A.color.brand.surface.primary.strong,[`& :where(${n})`]:{opacity:lr.full},"&:where(.focus, :focus-visible)":{[Be.vars.color]:"currentColor",outline:"none",backgroundColor:A.color.brand.accent.primary,color:M.fg.inverse}},"&:is(.hover, :hover)":{color:M.fg.strong,backgroundColor:A.color.surface.overlay.hover.default},"&:is(.focus, :focus-visible)":{color:M.fg.inverse,backgroundColor:A.color.brand.accent.primary,outline:`${Ve(2)} solid transparent`,outlineOffset:`-${Ve(2)}`},"&:is(:disabled, [aria-disabled=true])":{cursor:"default",opacity:lr.disabled,"&:where(.hover, :hover, [aria-selected=true])":{background:"none"},"&:where(.focus, :focus-visible)":{backgroundColor:A.color.brand.accent.primary,opacity:lr.disabled}},[`& :where(${e})`]:{flexGrow:1,alignSelf:"center"},[`& :where(${t})`]:{alignSelf:"start"}})}),Yne=e=>S.jsx(dw,{...yl.parts.icon,...e}),vF=je("span")({Component:({...e},t,n)=>S.jsx(n,{ref:t,...yl.parts.text,...Jn(e)})}),yF=je("button")({displayName:"MenuItem",Component:({children:e,isDisabled:t,...n},a,r)=>S.jsx(r,{ref:a,"aria-disabled":t,...gt(n,yl({})),children:typeof e=="string"?S.jsx(vF,{children:e}):e})}),SF=De()(e=>({onKeyDown(t){const n=getComputedStyle(t.currentTarget);t.key==="ArrowLeft"&&n.direction==="ltr"&&e.UNSTABLE_parentModel&&e.events.hide(t)}})),EF=De()((e,t,n={"data-id":""})=>{const{localRef:a,elementRef:r}=Gd(t),i=n["data-id"];return X.useLayoutEffect(()=>{e.state.mode==="single"&&ic(e.state,i)&&requestAnimationFrame(()=>{var o;(o=a.current)==null||o.focus()})},[i,a,e.state.cursorId,e.state.mode]),{ref:r,className:ic(e.state,n["data-id"])?"focus":void 0}});function _F(e){e.UNSTABLE_parentModel&&(e.UNSTABLE_parentModel.events.hide(),_F(e.UNSTABLE_parentModel))}const Kne=Zi(De()(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),_F(e))}:void 0})),EF,SF,JQ,IU,Wd),Ti=rn("button")({displayName:"Menu.Item",modelHook:Pt,elemPropsHook:Kne,subComponents:{Icon:Yne,Text:vF}})(({children:e,...t},n)=>S.jsx(Sw,{placement:"left",children:S.jsx(yF,{as:n,...t,children:e})})),Xne=Zi(De()(e=>({role:"menu","aria-labelledby":e.state.id,"aria-orientation":e.state.orientation})),mte,ute),Jne=Ke({base:{background:A.color.surface.popover,borderRadius:A.shape.xxl,padding:0,gap:A.gap.xs},modifiers:{orientation:{vertical:{flexDirection:"column"},horizontal:{flexDirection:"row"}}}}),wF=rn("div")({displayName:"Menu.List",modelHook:Pt,elemPropsHook:Xne})(({children:e,...t},n,a)=>S.jsx(Wee,{as:n,model:a,marginY:A.gap.none,...Jn(t,Jne({orientation:a.state.orientation})),children:e})),kF=je("span")({Component:({...e},t,n)=>S.jsxs(S.Fragment,{children:[S.jsx(Ti.Text,{ref:t,as:n,...e}),S.jsx(dw,{...yl.parts.selected,icon:bte})]})}),Qne=je("li")({displayName:"MenuOption",Component:({children:e,...t},n,a)=>S.jsx(a,{ref:n,...gt(t,yl()),children:typeof e=="string"?S.jsx(kF,{children:e}):e})}),ere=Zi(De()((e,t,n={})=>{const a=n["data-id"]||"";return{role:"option","aria-selected":VQ(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()}}}),QQ,Wd),IF=rn("li")({displayName:"Menu.Item",modelHook:Pt,elemPropsHook:ere,subComponents:{Icon:Ti.Icon,Text:kF}})(({children:e,...t},n)=>S.jsx(Sw,{placement:"left",children:S.jsx(Qne,{as:n,...t,children:e})})),TF=cte,xF={modifiers:[{name:"offset",options:{offset:()=>[0,4]}}]},tre=rn("div")({modelHook:Pt,elemPropsHook:TF})(({children:e,...t})=>S.jsx(yw,{placement:"bottom-start",popperOptions:xF,...t,children:e})),RF=De()(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)}}})),nre=Zi(RF,pte),rre=Zi(RF,fte),are=rn(tF)({displayName:"Menu.Target",modelHook:Pt,elemPropsHook:nre})(({children:e,...t},n)=>S.jsx(n,{...t,children:e})),ire=rn(tF)({displayName:"Menu.Target",modelHook:Pt,elemPropsHook:rre})(({children:e,...t},n)=>S.jsx(n,{...t,children:e})),ore=rn("div")({modelHook:Pt,elemPropsHook:TF})(({children:e,...t})=>S.jsx(yw,{placement:"right-start",popperOptions:xF,...t,children:e})),sre=(e,t=0)=>{const n=F.useRef(),a=()=>{n.current=window.setTimeout(e,t)},r=()=>{window.clearTimeout(n.current),n.current=void 0};return F.useEffect(()=>()=>{window.clearTimeout(n.current)},[n]),{start:a,clear:r}},lre=Zi(Zl(e=>e.UNSTABLE_parentModel,EF),Zl(e=>e.UNSTABLE_parentModel,SF),Zl(e=>e.UNSTABLE_parentModel,IU),De()((e,t)=>({ref:Wi(t,e.state.targetRef)})),Zl(e=>e.UNSTABLE_parentModel,Wd),De()(e=>{const t=F.useRef(),n=sre(()=>{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}}}})),ure=rn("button")({modelHook:Pt,elemPropsHook:lre})(({children:e,...t},n)=>S.jsxs(yF,{as:n,...t,children:[typeof e=="string"?S.jsx(Ti.Text,{children:e}):e,S.jsx(Ti.Icon,{icon:vte})]})),cre=rn()({modelHook:Pt,subComponents:{Card:pF,List:wF,Item:Ti,TargetItem:ure,Group:bF,Option:IF,Divider:fF,Popper:ore}})(({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 S.jsx(o.Provider,{value:i,children:e})}),z=qd()({displayName:"Menu",modelHook:Pt,subComponents:{Target:are,Card:pF,List:wF,Item:Ti,Group:bF,Option:IF,Divider:fF,TargetContext:ire,Popper:tre,Submenu:cre}})(({children:e})=>S.jsx(S.Fragment,{children:e})),AF=()=>{const[e,t]=F.useState("");return S.jsxs(z,{onSelect:n=>t(n.id),children:[S.jsx(z.Target,{children:"Open Menu"}),S.jsx(z.Popper,{children:S.jsx(z.Card,{children:S.jsxs(z.List,{children:[S.jsx(z.Item,{children:"First Item"}),S.jsx(z.Item,{children:"Second Item"}),S.jsx(z.Divider,{}),S.jsx(z.Item,{children:"Third Item (with a really, really, really long label)"}),S.jsx(z.Item,{"aria-disabled":!0,children:"Fourth Item"})]})})}),S.jsxs(Yi,{size:"small",cs:{marginBlockStart:Vi.md},children:["Selected: ",S.jsx("span",{"data-testid":"output",children:e})]})]})};AF.__RAW__=`import React from 'react';
294
294
 
295
295
  import {Menu} from '@workday/canvas-kit-react/menu';
296
296
  import {BodyText} from '@workday/canvas-kit-react/text';